define(["@jupyter-widgets/base"], function(__WEBPACK_EXTERNAL_MODULE__jupyter_widgets_base__) { return /******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "./lib/index.js");
/******/ })
/************************************************************************/
/******/ ({

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

// Export widget models and views, and the npm package version number.
module.exports = __webpack_require__(/*! ./widget.js */ "./lib/widget.js");
module.exports['version'] = __webpack_require__(/*! ../package.json */ "./package.json").version;

/***/ }),

/***/ "./lib/widget.css":
/*!************************!*\
  !*** ./lib/widget.css ***!
  \************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {


var content = __webpack_require__(/*! !../node_modules/css-loader!./widget.css */ "./node_modules/css-loader/index.js!./lib/widget.css");

if(typeof content === 'string') content = [[module.i, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(/*! ../node_modules/style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ "./lib/widget.js":
/*!***********************!*\
  !*** ./lib/widget.js ***!
  \***********************/
/*! exports provided: VitessceModel, VitessceView */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VitessceModel", function() { return VitessceModel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VitessceView", function() { return VitessceView; });
/* harmony import */ var _home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/classCallCheck */ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
/* harmony import */ var _home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createClass */ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createClass.js");
/* harmony import */ var _home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_get__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/get */ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/get.js");
/* harmony import */ var _home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/getPrototypeOf */ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");
/* harmony import */ var _home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/inherits */ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/inherits.js");
/* harmony import */ var _home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createSuper */ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createSuper.js");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @jupyter-widgets/base */ "@jupyter-widgets/base");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var lodash_extend__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash/extend */ "./node_modules/lodash/extend.js");
/* harmony import */ var lodash_extend__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_extend__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var vitessce__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! vitessce */ "./node_modules/vitessce/dist/umd/production/index.min.js");
/* harmony import */ var vitessce__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(vitessce__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../package.json */ "./package.json");
var _package_json__WEBPACK_IMPORTED_MODULE_11___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../package.json */ "./package.json", 1);
/* harmony import */ var vitessce_dist_es_production_static_css_index_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! vitessce/dist/es/production/static/css/index.css */ "./node_modules/vitessce/dist/es/production/static/css/index.css");
/* harmony import */ var vitessce_dist_es_production_static_css_index_css__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(vitessce_dist_es_production_static_css_index_css__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var _widget_css__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./widget.css */ "./lib/widget.css");
/* harmony import */ var _widget_css__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_widget_css__WEBPACK_IMPORTED_MODULE_13__);













 // See widget.py for the kernel counterpart to this file.

var prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;

function VitessceWidget(props) {
  var model = props.model;
  var config = model.get('config');
  var height = model.get('height');
  var theme = model.get('theme') === 'auto' ? prefersDark ? 'dark' : 'light' : model.get('theme');
  var divRef = Object(react__WEBPACK_IMPORTED_MODULE_7__["useRef"])();
  Object(react__WEBPACK_IMPORTED_MODULE_7__["useEffect"])(function () {
    if (!divRef.current) {
      return function () {};
    }

    function handleMouseEnter() {
      var jpn = divRef.current.closest('.jp-Notebook');

      if (jpn) {
        jpn.style.overflow = "hidden";
      }
    }

    function handleMouseLeave() {
      var jpn = divRef.current.closest('.jp-Notebook');

      if (jpn) {
        jpn.style.overflow = "auto";
      }
    }

    divRef.current.addEventListener("mouseenter", handleMouseEnter);
    divRef.current.addEventListener("mouseleave", handleMouseLeave);
    return function () {
      divRef.current.removeEventListener("mouseenter", handleMouseEnter);
      divRef.current.removeEventListener("mouseleave", handleMouseLeave);
    };
  }, [divRef]);
  var onConfigChange = Object(react__WEBPACK_IMPORTED_MODULE_7__["useCallback"])(function (config) {
    model.set('config', config);
    model.save_changes();
  }, [model]);
  return react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement('div', {
    className: 'vitessce-widget',
    ref: divRef,
    style: {
      height: "".concat(height, "px")
    }
  }, react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(vitessce__WEBPACK_IMPORTED_MODULE_10__["Vitessce"], {
    config: config,
    onConfigChange: onConfigChange,
    height: height,
    theme: theme
  }));
} // Custom Model. Custom widgets models must at least provide default values
// for model attributes, including
//
//  - `_view_name`
//  - `_view_module`
//  - `_view_module_version`
//
//  - `_model_name`
//  - `_model_module`
//  - `_model_module_version`
//
//  when different from the base class.
// When serialiazing the entire widget state for embedding, only values that
// differ from the defaults will be specified.


var VitessceModel = _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_6__["DOMWidgetModel"].extend({
  defaults: lodash_extend__WEBPACK_IMPORTED_MODULE_9___default()(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_6__["DOMWidgetModel"].prototype.defaults(), {
    _model_name: 'VitessceModel',
    _view_name: 'VitessceView',
    _model_module: 'vitessce-jupyter',
    _view_module: 'vitessce-jupyter',
    _model_module_version: _package_json__WEBPACK_IMPORTED_MODULE_11__.version,
    _view_module_version: _package_json__WEBPACK_IMPORTED_MODULE_11__.version,
    config: {},
    height: 600,
    theme: 'auto'
  })
});
var VitessceView = /*#__PURE__*/function (_DOMWidgetView) {
  Object(_home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(VitessceView, _DOMWidgetView);

  var _super = Object(_home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_5__["default"])(VitessceView);

  function VitessceView() {
    Object(_home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, VitessceView);

    return _super.apply(this, arguments);
  }

  Object(_home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(VitessceView, [{
    key: "render",
    value: function render() {
      Object(_home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_get__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(VitessceView.prototype), "render", this).call(this);

      react_dom__WEBPACK_IMPORTED_MODULE_8___default.a.render(this._render(this.model, this), this.el);
      setTimeout(function () {
        window.dispatchEvent(new Event('resize'));
      }, 500);
    }
  }, {
    key: "_render",
    value: function _render(model, view) {
      return react__WEBPACK_IMPORTED_MODULE_7___default.a.createElement(VitessceWidget, {
        model: model,
        view: view
      });
    }
  }, {
    key: "remove",
    value: function remove() {
      react_dom__WEBPACK_IMPORTED_MODULE_8___default.a.unmountComponentAtNode(this.el);
      return Object(_home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_get__WEBPACK_IMPORTED_MODULE_2__["default"])(Object(_home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__["default"])(VitessceView.prototype), "remove", this).call(this);
    }
  }]);

  return VitessceView;
}(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_6__["DOMWidgetView"]);

/***/ }),

/***/ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":
/*!**************************************************************************************************************!*\
  !*** ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***!
  \**************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _assertThisInitialized; });
function _assertThisInitialized(self) {
  if (self === void 0) {
    throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  }

  return self;
}

/***/ }),

/***/ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/classCallCheck.js":
/*!*******************************************************************************************************!*\
  !*** ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***!
  \*******************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _classCallCheck; });
function _classCallCheck(instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
}

/***/ }),

/***/ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createClass.js":
/*!****************************************************************************************************!*\
  !*** ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createClass.js ***!
  \****************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _createClass; });
function _defineProperties(target, props) {
  for (var i = 0; i < props.length; i++) {
    var descriptor = props[i];
    descriptor.enumerable = descriptor.enumerable || false;
    descriptor.configurable = true;
    if ("value" in descriptor) descriptor.writable = true;
    Object.defineProperty(target, descriptor.key, descriptor);
  }
}

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

/***/ }),

/***/ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createSuper.js":
/*!****************************************************************************************************!*\
  !*** ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createSuper.js ***!
  \****************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _createSuper; });
/* harmony import */ var _getPrototypeOf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getPrototypeOf */ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");
/* harmony import */ var _isNativeReflectConstruct__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./isNativeReflectConstruct */ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js");
/* harmony import */ var _possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./possibleConstructorReturn */ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js");



function _createSuper(Derived) {
  return function () {
    var Super = Object(_getPrototypeOf__WEBPACK_IMPORTED_MODULE_0__["default"])(Derived),
        result;

    if (Object(_isNativeReflectConstruct__WEBPACK_IMPORTED_MODULE_1__["default"])()) {
      var NewTarget = Object(_getPrototypeOf__WEBPACK_IMPORTED_MODULE_0__["default"])(this).constructor;
      result = Reflect.construct(Super, arguments, NewTarget);
    } else {
      result = Super.apply(this, arguments);
    }

    return Object(_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__["default"])(this, result);
  };
}

/***/ }),

/***/ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/get.js":
/*!********************************************************************************************!*\
  !*** ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/get.js ***!
  \********************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _get; });
/* harmony import */ var _superPropBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./superPropBase */ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/superPropBase.js");

function _get(target, property, receiver) {
  if (typeof Reflect !== "undefined" && Reflect.get) {
    _get = Reflect.get;
  } else {
    _get = function _get(target, property, receiver) {
      var base = Object(_superPropBase__WEBPACK_IMPORTED_MODULE_0__["default"])(target, property);
      if (!base) return;
      var desc = Object.getOwnPropertyDescriptor(base, property);

      if (desc.get) {
        return desc.get.call(receiver);
      }

      return desc.value;
    };
  }

  return _get(target, property, receiver || target);
}

/***/ }),

/***/ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":
/*!*******************************************************************************************************!*\
  !*** ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***!
  \*******************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _getPrototypeOf; });
function _getPrototypeOf(o) {
  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
    return o.__proto__ || Object.getPrototypeOf(o);
  };
  return _getPrototypeOf(o);
}

/***/ }),

/***/ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/inherits.js":
/*!*************************************************************************************************!*\
  !*** ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/inherits.js ***!
  \*************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _inherits; });
/* harmony import */ var _setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf */ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");

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

  subClass.prototype = Object.create(superClass && superClass.prototype, {
    constructor: {
      value: subClass,
      writable: true,
      configurable: true
    }
  });
  if (superClass) Object(_setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__["default"])(subClass, superClass);
}

/***/ }),

/***/ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js":
/*!*****************************************************************************************************************!*\
  !*** ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js ***!
  \*****************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _isNativeReflectConstruct; });
function _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;
  }
}

/***/ }),

/***/ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":
/*!******************************************************************************************************************!*\
  !*** ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***!
  \******************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _possibleConstructorReturn; });
/* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helpers/esm/typeof */ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/typeof.js");
/* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized */ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");


function _possibleConstructorReturn(self, call) {
  if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(call) === "object" || typeof call === "function")) {
    return call;
  }

  return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__["default"])(self);
}

/***/ }),

/***/ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":
/*!*******************************************************************************************************!*\
  !*** ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***!
  \*******************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _setPrototypeOf; });
function _setPrototypeOf(o, p) {
  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
    o.__proto__ = p;
    return o;
  };

  return _setPrototypeOf(o, p);
}

/***/ }),

/***/ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/superPropBase.js":
/*!******************************************************************************************************!*\
  !*** ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/superPropBase.js ***!
  \******************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _superPropBase; });
/* harmony import */ var _getPrototypeOf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getPrototypeOf */ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");

function _superPropBase(object, property) {
  while (!Object.prototype.hasOwnProperty.call(object, property)) {
    object = Object(_getPrototypeOf__WEBPACK_IMPORTED_MODULE_0__["default"])(object);
    if (object === null) break;
  }

  return object;
}

/***/ }),

/***/ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/typeof.js":
/*!***********************************************************************************************!*\
  !*** ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/typeof.js ***!
  \***********************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _typeof; });
function _typeof(obj) {
  "@babel/helpers - typeof";

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

  return _typeof(obj);
}

/***/ }),

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

exports = module.exports = __webpack_require__(/*! ../node_modules/css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false);
// imports


// module
exports.push([module.i, ".vitessce-container {\n    width: 100%;\n}\n\n.vitessce-widget {\n    width: 100%;\n    \n}\n\n.vitessce-container div {\n    font-size: 14px;\n}", ""]);

// exports


/***/ }),

/***/ "./node_modules/css-loader/index.js!./node_modules/vitessce/dist/es/production/static/css/index.css":
/*!*************************************************************************************************!*\
  !*** ./node_modules/css-loader!./node_modules/vitessce/dist/es/production/static/css/index.css ***!
  \*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__(/*! ../../../../../../css-loader/lib/css-base.js */ "./node_modules/css-loader/lib/css-base.js")(false);
// imports


// module
exports.push([module.i, ".react-draggable-transparent-selection .react-grid-item{-webkit-user-select:none !important;-moz-user-select:none !important;-o-user-select:none !important;-ms-user-select:none !important;user-select:none !important}body{margin:0;text-align:left}.container-fluid{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto;box-sizing:border-box}.vitessce-container .higlass-wrapper .ContextMenu-module_context-menu-2OwvL{position:fixed;background-color:rgba(255,255,255,0.95);border:1px solid rgba(0,0,0,0.1);border-radius:3px;font-size:12px;cursor:default;padding:3px;box-shadow:0 0 3px 0 rgba(0,0,0,0.1),0 1px 5px 0 rgba(0,0,0,0.05)}.vitessce-container .higlass-wrapper .ContextMenu-module_context-menu-dark-2PO31{color:#ccc;background-color:rgba(68,68,68,0.97)}.vitessce-container .higlass-wrapper .ContextMenu-module_context-menu-icon-I4kiw{display:inline-block;margin-right:3px;vertical-align:middle}.vitessce-container .higlass-wrapper .ContextMenu-module_context-menu-icon-I4kiw>svg{width:30px;height:20px}.vitessce-container .higlass-wrapper .ContextMenu-module_context-menu-item-1HeVv{padding:2px;white-space:nowrap;border-radius:2px;transition:background .15s ease,color .15s ease}.vitessce-container .higlass-wrapper .ContextMenu-module_context-menu-item-1HeVv:hover{background:#337ab7;color:#fff}.vitessce-container .higlass-wrapper .ContextMenu-module_context-menu-hr-3yapb{margin-top:5px;margin-bottom:5px;border:0;border-top:1px solid rgba(0,0,0,0.1)}.vitessce-container .higlass-wrapper .ContextMenu-module_play-icon-R4pIO{width:12px;height:12px;position:absolute;right:5px}.vitessce-container .higlass-wrapper .ContextMenu-module_context-menu-span-8EUfZ{margin-right:20px;vertical-align:middle;display:inline-block;line-height:normal;white-space:nowrap}.vitessce-container .higlass-wrapper .ContextMenu-module_context-menu-thumbnail-2vHLD{margin-right:10px;border:1px solid #888}.vitessce-container .higlass-wrapper .ContextMenu-module_context-menu-thumbnail-inline-1iOcg{display:inline-block;margin-right:10px;vertical-align:middle}.vitessce-container .higlass-wrapper .TrackControl-module_track-control-2zDf3,.vitessce-container .higlass-wrapper .TrackControl-module_track-control-vertical-2McB_{position:absolute;z-index:1;display:flex;background:rgba(255,255,255,0.75);right:2px;top:2px;border-radius:2.5px;box-shadow:0 0 0 1px rgba(0,0,0,0.05),0 0 3px 0 rgba(0,0,0,0.1);opacity:0;transition:opacity .15s ease,background .15s ease,box-shadow .15s ease}.vitessce-container .higlass-wrapper .TrackControl-module_track-control-dark-fP2uZ,.vitessce-container .higlass-wrapper .TrackControl-module_track-control-dark-fP2uZ .TrackControl-module_track-control-active-2JD9i{background:rgba(40,40,40,0.85)}.vitessce-container .higlass-wrapper .TrackControl-module_track-control-vertical-2McB_{flex-direction:column-reverse}.vitessce-container .higlass-wrapper .TrackControl-module_track-control-left-zHd9W{left:2px;right:auto}.vitessce-container .higlass-wrapper .TrackControl-module_track-control-active-2JD9i,.vitessce-container .higlass-wrapper .TrackControl-module_track-control-vertical-active-1QCKn{opacity:1;z-index:1}.vitessce-container .higlass-wrapper .TrackControl-module_track-control-active-2JD9i:hover,.vitessce-container .higlass-wrapper .TrackControl-module_track-control-vertical-active-1QCKn:hover{background:#fff;box-shadow:0 0 0 1px rgba(0,0,0,0.1),0 0 3px 0 rgba(0,0,0,0.2)}.vitessce-container .higlass-wrapper .TrackControl-module_track-control-dark-fP2uZ.TrackControl-module_track-control-active-2JD9i:hover{background:rgba(34,34,34,0.95)}.vitessce-container .higlass-wrapper .TrackControl-module_track-control-padding-right-2p6Lp{right:80px}.vitessce-container .higlass-wrapper .TrackControl-module_track-control-button-2fdIb{width:20px;height:20px;padding:4px;cursor:pointer;opacity:.66;transition:background .15s ease,color .15s ease,opacity .15s ease}.vitessce-container .higlass-wrapper .TrackControl-module_track-control-button-2fdIb:hover{color:#fff;background:#337ab7;opacity:1}.vitessce-container .higlass-wrapper .TrackControl-module_track-control-button-2fdIb:first-child{border-radius:2.5px 0 0 2.5px}.vitessce-container .higlass-wrapper .TrackControl-module_track-control-button-2fdIb:last-child{border-radius:0 2.5px 2.5px 0}.vitessce-container .higlass-wrapper .TrackControl-module_track-control-dark-fP2uZ .TrackControl-module_track-control-button-2fdIb{color:#ccc}.vitessce-container .higlass-wrapper .TrackControl-module_track-control-dark-fP2uZ .TrackControl-module_track-control-button-2fdIb:hover{color:#fff;background:#337ab7;opacity:1}.vitessce-container .higlass-wrapper .TrackControl-module_track-control-button-vertical-1s22z:first-child{border-radius:0 0 2.5px 2.5px}.vitessce-container .higlass-wrapper .TrackControl-module_track-control-button-vertical-1s22z:last-child{border-radius:2.5px 2.5px 0 0}.vitessce-container .higlass-wrapper .CenterTrack-module_center-track-3ptRW{position:relative;background:transparent}.vitessce-container .higlass-wrapper .CenterTrack-module_center-track-container-2ELhp{position:absolute;z-index:1}.vitessce-container .higlass-wrapper .Track-module_track-range-selection-1yrDf{position:absolute;z-index:-1;opacity:0;transition:opacity .15s ease}.vitessce-container .higlass-wrapper .Track-module_track-range-selection-active-1oljJ{z-index:1;opacity:1}.vitessce-container .higlass-wrapper .Track-module_track-range-selection-group-inactive-YNRM4{display:none}.vitessce-container .higlass-wrapper .Track-module_track-range-selection-group-brush-selection-2VYDl{outline:2px solid rgba(0,0,0,0.33);fill:#000;fill-opacity:.1}.vitessce-container .higlass-wrapper .DragListeningDiv-module_drag-listening-div-active-3wpRk{z-index:10;box-shadow:inset 0 0 3px 0 red}.vitessce-container .higlass-wrapper .GalleryTracks-module_gallery-tracks-3tsUO{position:relative;top:0;left:0;width:100%;height:100%}.vitessce-container .higlass-wrapper .GalleryTracks-module_gallery-track-eGKoq{position:absolute;box-sizing:border-box;top:0;right:0;bottom:0;left:0}.vitessce-container .higlass-wrapper .GalleryTracks-module_gallery-invisible-track-1hMJp,.vitessce-container .higlass-wrapper .GalleryTracks-module_gallery-sub-track-z1HEh{position:absolute}.vitessce-container .higlass-wrapper .TiledPlot-module_tiled-plot-uFHiB{position:relative;flex:1 1;overflow:hidden}.vitessce-container .higlass-wrapper .TiledPlot-module_horizontalList-1c1P8{display:flex;width:600px;height:300px;white-space:nowrap}.vitessce-container .higlass-wrapper .TiledPlot-module_list-24zgV{width:400px;height:600px;overflow:hidden;-webkit-overflow-scrolling:touch}.vitessce-container .higlass-wrapper .TiledPlot-module_stylizedList-Mt4JL{position:relative;z-index:0;background-color:#f3f3f3;outline:none}.vitessce-container .higlass-wrapper .TiledPlot-module_stylizedItem-2bQBK{position:relative;display:flex;align-items:center;width:100%;background-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#333;font-weight:400}.vitessce-container .higlass-wrapper .TiledPlot-module_stylizedHelper-3IVEu{box-shadow:0 5px 5px -5px rgba(0,0,0,0.2),0 -5px 5px -5px rgba(0,0,0,0.2);background-color:rgba(255,255,255,0.8);cursor:row-resize}.vitessce-container .higlass-wrapper .TiledPlot-module_stylizedHelper-3IVEu.TiledPlot-module_horizontalItem-2-ZjU{cursor:col-resize}.vitessce-container .higlass-wrapper .TiledPlot-module_horizontalItem-2-ZjU{display:flex;flex-shrink:0;align-items:center;justify-content:center}.vitessce-container .higlass-wrapper .TiledPlot-module_resizable-track-2oLT9{width:100%;height:100%}.vitessce-container .higlass-wrapper path.TiledPlot-module_domain-qYw6K{stroke-width:0px}.vitessce-container .higlass-wrapper .TrackRenderer-module_track-renderer-3TM7n{position:relative}.vitessce-container .higlass-wrapper .TrackRenderer-module_track-renderer-element-2i16D,.vitessce-container .higlass-wrapper .TrackRenderer-module_track-renderer-events-3tVM2{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}.vitessce-container .higlass-wrapper .TrackRenderer-module_track-renderer-events-3tVM2{z-index:1}.vitessce-container .higlass-wrapper .Button-module_button-3YXsQ{display:flex;align-items:center;box-sizing:border-box;padding:.5em;color:#000;font-size:1em;line-height:1em;border:0;border-radius:2.5px;background:#fff;box-shadow:0 0 0 1px #ccc;transition:transform .15s ease,box-shadow .15s ease,background .15s ease;-webkit-appearance:none}.vitessce-container .higlass-wrapper .Button-module_button-3YXsQ:hover{background:#f2f2f2;box-shadow:0 0 0 1px #ccc}.vitessce-container .higlass-wrapper .Button-module_button-3YXsQ:focus{box-shadow:0 0 0 2px #0089ff}.vitessce-container .higlass-wrapper .Button-module_button-3YXsQ:active{transform:scale(0.9)}.vitessce-container .higlass-wrapper .Button-module_button-3YXsQ:active,.vitessce-container .higlass-wrapper .Button-module_button-3YXsQ:focus,.vitessce-container .higlass-wrapper .Button-module_button-3YXsQ:hover{cursor:pointer;outline:none}.vitessce-container .higlass-wrapper .Button-module_button-shortcut-1zMAn{padding:.1em 5px;color:#999;font-size:.8em;transition:color .15s ease}.vitessce-container .higlass-wrapper .Cross-module_cross-3WYME{position:relative;width:1em;height:1em}.vitessce-container .higlass-wrapper .Cross-module_cross-3WYME:after,.vitessce-container .higlass-wrapper .Cross-module_cross-3WYME:before{content:\"\";display:block;position:absolute;top:50%;left:0;width:1em;height:1px;background:#000;transform-origin:center}.vitessce-container .higlass-wrapper .Cross-module_cross-3WYME:before{transform:translateY(-50%) rotate(45deg)}.vitessce-container .higlass-wrapper .Cross-module_cross-3WYME:after{transform:translateY(-50%) rotate(-45deg)}.vitessce-container .higlass-wrapper .Modal-module_modal-background-3vDy1{position:absolute;z-index:1000;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,0.666);-webkit-animation:Modal-module_fade-in-3Nm-O .2s ease 1;animation:Modal-module_fade-in-3Nm-O .2s ease 1;transition:opacity .2s ease}.vitessce-container .higlass-wrapper .Modal-module_modal-hide-3huBg{opacity:0}.vitessce-container .higlass-wrapper .Modal-module_modal-wrap-1HWNn{position:absolute;top:20px;right:20px;bottom:20px;left:20px}.vitessce-container .higlass-wrapper .Modal-module_modal-window-1XZAq{position:relative;width:100%;max-width:640px;max-height:100%;margin-left:auto;margin-right:auto;color:#000;border-radius:5px;background:#fff;-webkit-animation:Modal-module_fade-scale-in-11Dkx .2s ease 1;animation:Modal-module_fade-scale-in-11Dkx .2s ease 1}.vitessce-container .higlass-wrapper .Modal-module_modal-window-max-height-CZYCl{height:100%}.vitessce-container .higlass-wrapper .Modal-module_modal-content-2xb_x{padding:10px}@-webkit-keyframes Modal-module_fade-in-3Nm-O{0%{opacity:0}to{opacity:1}}@keyframes Modal-module_fade-in-3Nm-O{0%{opacity:0}to{opacity:1}}@-webkit-keyframes Modal-module_fade-scale-in-11Dkx{0%{opacity:0;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}@keyframes Modal-module_fade-scale-in-11Dkx{0%{opacity:0;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}.vitessce-container .higlass-wrapper .Dialog-module_dialog-header-2mk2M{position:relative;z-index:2;display:flex;justify-content:space-between;margin:0 -10px 10px;padding:0 10px 10px;border-bottom:1px solid #ccc}.vitessce-container .higlass-wrapper .Dialog-module_dialog-header-2mk2M h3{margin:0;padding:0;font-size:20px;line-height:1em}.vitessce-container .higlass-wrapper .Dialog-module_dialog-header-2mk2M button{font-size:10px}.vitessce-container .higlass-wrapper .Dialog-module_dialog-main-max-height-1EAb2{position:absolute;z-index:1;top:40px;right:0;bottom:50px;left:0;padding:10px;overflow:auto}.vitessce-container .higlass-wrapper .Dialog-module_dialog-footer-1BnEv,.vitessce-container .higlass-wrapper .Dialog-module_dialog-footer-max-height-KjDek{display:flex;justify-content:space-between;margin:10px -10px 0;padding:10px 10px 0;border-top:1px solid #ccc}.vitessce-container .higlass-wrapper .Dialog-module_dialog-footer-1BnEv button,.vitessce-container .higlass-wrapper .Dialog-module_dialog-footer-max-height-KjDek button{font-size:14px}.vitessce-container .higlass-wrapper .Dialog-module_dialog-footer-max-height-KjDek{position:absolute;z-index:2;left:10px;right:10px;bottom:10px}.vitessce-container .higlass-wrapper .tileset-finder-label{font-weight:700}.vitessce-container .higlass-wrapper .tileset-finder-search-box{margin-left:10px}.vitessce-container .higlass-wrapper .tileset-finder-search-bar{display:flex;margin-left:5px;justify-content:space-between;align-items:center}.vitessce-container .higlass-wrapper .tileset-finder-checkbox-tree{margin:5px;padding:3px;border:1px solid #aaa;border-radius:5px}.vitessce-container .higlass-wrapper .react-checkbox-tree{display:flex;flex-direction:row;font-size:14px}.vitessce-container .higlass-wrapper .react-checkbox-tree>ol{flex:1 1 auto}.vitessce-container .higlass-wrapper .react-checkbox-tree ol{margin:0;padding-left:0;list-style-type:none}.vitessce-container .higlass-wrapper .react-checkbox-tree ol ol{padding-left:24px}.vitessce-container .higlass-wrapper .react-checkbox-tree button{line-height:normal;color:inherit}.vitessce-container .higlass-wrapper .react-checkbox-tree button:focus{outline:none}.vitessce-container .higlass-wrapper .react-checkbox-tree button:disabled{cursor:not-allowed}.vitessce-container .higlass-wrapper .react-checkbox-tree .rct-bare-label{cursor:default}.vitessce-container .higlass-wrapper .react-checkbox-tree label{margin-bottom:0;cursor:pointer;font-weight:400}.vitessce-container .higlass-wrapper .react-checkbox-tree label:hover{background:rgba(51,51,204,0.1)}.vitessce-container .higlass-wrapper .react-checkbox-tree label:active{background:rgba(51,51,204,0.15)}.vitessce-container .higlass-wrapper .react-checkbox-tree:not(.rct-native-display) input{display:none}.vitessce-container .higlass-wrapper .react-checkbox-tree.rct-native-display input{margin:0 5px}.vitessce-container .higlass-wrapper .react-checkbox-tree .rct-icon{font-family:FontAwesome;font-style:normal}.vitessce-container .higlass-wrapper .rct-disabled>.rct-text>label{opacity:.75;cursor:not-allowed}.vitessce-container .higlass-wrapper .rct-disabled>.rct-text>label:active,.vitessce-container .higlass-wrapper .rct-disabled>.rct-text>label:hover{background:transparent}.vitessce-container .higlass-wrapper .rct-text{display:flex;align-items:center}.vitessce-container .higlass-wrapper .rct-options{flex:0 0 auto;margin-left:.5rem;text-align:right}.vitessce-container .higlass-wrapper .rct-option{opacity:.75;border:0;background:none;cursor:pointer;padding:0 4px;font-size:18px}.vitessce-container .higlass-wrapper .rct-option:hover{opacity:1}.vitessce-container .higlass-wrapper .rct-option+.rct-option{margin-left:2px}.vitessce-container .higlass-wrapper .rct-checkbox,.vitessce-container .higlass-wrapper .rct-collapse,.vitessce-container .higlass-wrapper .rct-node-icon{padding:0 5px}.vitessce-container .higlass-wrapper .rct-checkbox *,.vitessce-container .higlass-wrapper .rct-collapse *,.vitessce-container .higlass-wrapper .rct-node-icon *{display:inline-block;margin:0;width:14px}.vitessce-container .higlass-wrapper .rct-collapse{border:0;background:none;line-height:normal;color:inherit;font-size:12px}.vitessce-container .higlass-wrapper .rct-collapse.rct-collapse-btn{cursor:pointer}.vitessce-container .higlass-wrapper .rct-collapse>.rct-icon-expand-close{opacity:.5}.vitessce-container .higlass-wrapper .rct-collapse>.rct-icon-expand-close:hover{opacity:1}.vitessce-container .higlass-wrapper .rct-native-display .rct-checkbox{display:none}.vitessce-container .higlass-wrapper .rct-node-clickable{cursor:pointer}.vitessce-container .higlass-wrapper .rct-node-clickable:hover{background:rgba(51,51,204,0.1)}.vitessce-container .higlass-wrapper .rct-node-clickable:focus{outline:0;background:rgba(51,51,204,0.2)}.vitessce-container .higlass-wrapper .rct-node-icon{color:#33c}.vitessce-container .higlass-wrapper .rct-title{padding:0 5px}.vitessce-container .higlass-wrapper .rct-icon-expand-close:before{content:\"\\F054\"}.vitessce-container .higlass-wrapper .rct-icon-expand-open:before{content:\"\\F078\"}.vitessce-container .higlass-wrapper .rct-icon-uncheck:before{content:\"\\F096\"}.vitessce-container .higlass-wrapper .rct-icon-check:before{content:\"\\F046\"}.vitessce-container .higlass-wrapper .rct-icon-half-check:before{opacity:.5;content:\"\\F046\"}.vitessce-container .higlass-wrapper .rct-icon-leaf:before{content:\"\\F016\"}.vitessce-container .higlass-wrapper .rct-icon-parent-open:before{content:\"\\F115\"}.vitessce-container .higlass-wrapper .rct-icon-parent-close:before{content:\"\\F114\"}.vitessce-container .higlass-wrapper .rct-icon-expand-all:before{content:\"\\F0FE\"}.vitessce-container .higlass-wrapper .rct-icon-collapse-all:before{content:\"\\F146\"}.vitessce-container .higlass-wrapper .plot-type-selected{background-color:rgba(0,0,255,0.3)}.vitessce-container .higlass-wrapper .plot-type-container{overflow-y:scroll;padding:3px;max-height:15vh}.vitessce-container .higlass-wrapper .plot-type-container,.vitessce-container .higlass-wrapper .plot-type-container-empty{margin:5px;border:1px solid #aaa;border-radius:5px}.vitessce-container .higlass-wrapper .plot-type-container-empty{padding:3px 8px;background-color:#e8e8e8}.vitessce-container .higlass-wrapper .plot-type-item{cursor:pointer}.vitessce-container .higlass-wrapper .plot-type-item:not(.plot-type-selected):hover{background-color:rgba(51,51,204,0.1)}.vitessce-container .higlass-wrapper .track-thumbnail{width:30px;height:20px;display:inline-block;margin-right:10;vertical-align:middle}.vitessce-container .higlass-wrapper .track-thumbnail>svg{width:20px;height:20px}.vitessce-container .higlass-wrapper .AddTrackDialog-module_collapse-toggle-icon-1Of5_:before{font-family:Glyphicons Halflings;content:\"\\E159\";float:left;padding-right:3px}.vitessce-container .higlass-wrapper .AddTrackDialog-module_collapse-toggle-icon-1Of5_.AddTrackDialog-module_collapsed-1ifB1:before{content:\"\\E158\"}.vitessce-container .higlass-wrapper .AddTrackDialog-module_modal-title-1Atka{font-family:Roboto;font-weight:700}.vitessce-container .higlass-wrapper .AddTrackDialog-module_modal-container-14d_4{position:relative}.vitessce-container .higlass-wrapper .AddTrackDialog-module_modal-container-14d_4 .AddTrackDialog-module_modal-backdrop-ZrVQg,.vitessce-container .higlass-wrapper .AddTrackDialog-module_modal-container-14d_4 .AddTrackDialog-module_modal-bZqLI{position:absolute}.vitessce-container .higlass-wrapper .AddTrackDialog-module_modal-dialog-3bKDk{position:relative;display:table;overflow-y:auto;overflow-x:auto;width:600px;min-width:300px;margin:auto}.vitessce-container .higlass-wrapper .DraggableDiv-module_bottom-right-handle-o7UYG,.vitessce-container .higlass-wrapper .DraggableDiv-module_top-right-handle-oUk0R{border-right:solid #000;border-top:solid #000}.vitessce-container .higlass-wrapper .DraggableDiv-module_bottom-left-handle-FO7d4,.vitessce-container .higlass-wrapper .DraggableDiv-module_top-left-handle-R5Zui{border-left:solid #000;border-top:solid #000}.vitessce-container .higlass-wrapper .DraggableDiv-module_bottom-draggable-handle-3olLp,.vitessce-container .higlass-wrapper .DraggableDiv-module_left-draggable-handle-2gpow,.vitessce-container .higlass-wrapper .DraggableDiv-module_right-draggable-handle-2Sriq,.vitessce-container .higlass-wrapper .DraggableDiv-module_top-draggable-handle-3W5bP{position:absolute;opacity:0;transition:transform .15s ease,opacity .15s ease}.vitessce-container .higlass-wrapper .DraggableDiv-module_draggable-div-2eWml{background-color:transparent;box-sizing:border-box}.vitessce-container .higlass-wrapper .DraggableDiv-module_bottom-draggable-handle-grabber-GN1_k,.vitessce-container .higlass-wrapper .DraggableDiv-module_top-draggable-handle-grabber-2mVDE{width:10px;height:4px;border-top:1px solid #000;border-bottom:1px solid #000}.vitessce-container .higlass-wrapper .DraggableDiv-module_bottom-draggable-handle-grabber-GN1_k,.vitessce-container .higlass-wrapper .DraggableDiv-module_top-draggable-handle-grabber-2mVDE{margin:4px 7px}.vitessce-container .higlass-wrapper .DraggableDiv-module_left-draggable-handle-grabber-1Pqhc,.vitessce-container .higlass-wrapper .DraggableDiv-module_right-draggable-handle-grabber-1mtC0{width:4px;height:10px;border-left:1px solid #000;border-right:1px solid #000}.vitessce-container .higlass-wrapper .DraggableDiv-module_left-draggable-handle-grabber-1Pqhc,.vitessce-container .higlass-wrapper .DraggableDiv-module_right-draggable-handle-grabber-1mtC0{margin:7px 4px}.vitessce-container .higlass-wrapper .DraggableDiv-module_draggable-div-2eWml:hover .DraggableDiv-module_bottom-draggable-handle-3olLp,.vitessce-container .higlass-wrapper .DraggableDiv-module_draggable-div-2eWml:hover .DraggableDiv-module_left-draggable-handle-2gpow,.vitessce-container .higlass-wrapper .DraggableDiv-module_draggable-div-2eWml:hover .DraggableDiv-module_right-draggable-handle-2Sriq,.vitessce-container .higlass-wrapper .DraggableDiv-module_draggable-div-2eWml:hover .DraggableDiv-module_top-draggable-handle-3W5bP{opacity:.5;background:rgba(255,255,255,0.75);box-shadow:0 0 3px 1px rgba(255,255,255,0.75);border-radius:3px}.vitessce-container .higlass-wrapper .DraggableDiv-module_bottom-draggable-handle-3olLp:active,.vitessce-container .higlass-wrapper .DraggableDiv-module_bottom-draggable-handle-3olLp:hover,.vitessce-container .higlass-wrapper .DraggableDiv-module_left-draggable-handle-2gpow:active,.vitessce-container .higlass-wrapper .DraggableDiv-module_left-draggable-handle-2gpow:hover,.vitessce-container .higlass-wrapper .DraggableDiv-module_right-draggable-handle-2Sriq:active,.vitessce-container .higlass-wrapper .DraggableDiv-module_right-draggable-handle-2Sriq:hover,.vitessce-container .higlass-wrapper .DraggableDiv-module_top-draggable-handle-3W5bP:active,.vitessce-container .higlass-wrapper .DraggableDiv-module_top-draggable-handle-3W5bP:hover{opacity:1 !important;transform:scale(2)}.vitessce-container .higlass-wrapper .DraggableDiv-module_bottom-draggable-handle-3olLp:active .DraggableDiv-module_bottom-draggable-handle-grabber-GN1_k,.vitessce-container .higlass-wrapper .DraggableDiv-module_bottom-draggable-handle-3olLp:active .DraggableDiv-module_left-draggable-handle-grabber-1Pqhc,.vitessce-container .higlass-wrapper .DraggableDiv-module_bottom-draggable-handle-3olLp:active .DraggableDiv-module_right-draggable-handle-grabber-1mtC0,.vitessce-container .higlass-wrapper .DraggableDiv-module_bottom-draggable-handle-3olLp:active .DraggableDiv-module_top-draggable-handle-grabber-2mVDE,.vitessce-container .higlass-wrapper .DraggableDiv-module_bottom-draggable-handle-3olLp:hover .DraggableDiv-module_bottom-draggable-handle-grabber-GN1_k,.vitessce-container .higlass-wrapper .DraggableDiv-module_bottom-draggable-handle-3olLp:hover .DraggableDiv-module_left-draggable-handle-grabber-1Pqhc,.vitessce-container .higlass-wrapper .DraggableDiv-module_bottom-draggable-handle-3olLp:hover .DraggableDiv-module_right-draggable-handle-grabber-1mtC0,.vitessce-container .higlass-wrapper .DraggableDiv-module_bottom-draggable-handle-3olLp:hover .DraggableDiv-module_top-draggable-handle-grabber-2mVDE,.vitessce-container .higlass-wrapper .DraggableDiv-module_left-draggable-handle-2gpow:active .DraggableDiv-module_bottom-draggable-handle-grabber-GN1_k,.vitessce-container .higlass-wrapper .DraggableDiv-module_left-draggable-handle-2gpow:active .DraggableDiv-module_left-draggable-handle-grabber-1Pqhc,.vitessce-container .higlass-wrapper .DraggableDiv-module_left-draggable-handle-2gpow:active .DraggableDiv-module_right-draggable-handle-grabber-1mtC0,.vitessce-container .higlass-wrapper .DraggableDiv-module_left-draggable-handle-2gpow:active .DraggableDiv-module_top-draggable-handle-grabber-2mVDE,.vitessce-container .higlass-wrapper .DraggableDiv-module_left-draggable-handle-2gpow:hover .DraggableDiv-module_bottom-draggable-handle-grabber-GN1_k,.vitessce-container .higlass-wrapper .DraggableDiv-module_left-draggable-handle-2gpow:hover .DraggableDiv-module_left-draggable-handle-grabber-1Pqhc,.vitessce-container .higlass-wrapper .DraggableDiv-module_left-draggable-handle-2gpow:hover .DraggableDiv-module_right-draggable-handle-grabber-1mtC0,.vitessce-container .higlass-wrapper .DraggableDiv-module_left-draggable-handle-2gpow:hover .DraggableDiv-module_top-draggable-handle-grabber-2mVDE,.vitessce-container .higlass-wrapper .DraggableDiv-module_right-draggable-handle-2Sriq:active .DraggableDiv-module_bottom-draggable-handle-grabber-GN1_k,.vitessce-container .higlass-wrapper .DraggableDiv-module_right-draggable-handle-2Sriq:active .DraggableDiv-module_left-draggable-handle-grabber-1Pqhc,.vitessce-container .higlass-wrapper .DraggableDiv-module_right-draggable-handle-2Sriq:active .DraggableDiv-module_right-draggable-handle-grabber-1mtC0,.vitessce-container .higlass-wrapper .DraggableDiv-module_right-draggable-handle-2Sriq:active .DraggableDiv-module_top-draggable-handle-grabber-2mVDE,.vitessce-container .higlass-wrapper .DraggableDiv-module_right-draggable-handle-2Sriq:hover .DraggableDiv-module_bottom-draggable-handle-grabber-GN1_k,.vitessce-container .higlass-wrapper .DraggableDiv-module_right-draggable-handle-2Sriq:hover .DraggableDiv-module_left-draggable-handle-grabber-1Pqhc,.vitessce-container .higlass-wrapper .DraggableDiv-module_right-draggable-handle-2Sriq:hover .DraggableDiv-module_right-draggable-handle-grabber-1mtC0,.vitessce-container .higlass-wrapper .DraggableDiv-module_right-draggable-handle-2Sriq:hover .DraggableDiv-module_top-draggable-handle-grabber-2mVDE,.vitessce-container .higlass-wrapper .DraggableDiv-module_top-draggable-handle-3W5bP:active .DraggableDiv-module_bottom-draggable-handle-grabber-GN1_k,.vitessce-container .higlass-wrapper .DraggableDiv-module_top-draggable-handle-3W5bP:active .DraggableDiv-module_left-draggable-handle-grabber-1Pqhc,.vitessce-container .higlass-wrapper .DraggableDiv-module_top-draggable-handle-3W5bP:active .DraggableDiv-module_right-draggable-handle-grabber-1mtC0,.vitessce-container .higlass-wrapper .DraggableDiv-module_top-draggable-handle-3W5bP:active .DraggableDiv-module_top-draggable-handle-grabber-2mVDE,.vitessce-container .higlass-wrapper .DraggableDiv-module_top-draggable-handle-3W5bP:hover .DraggableDiv-module_bottom-draggable-handle-grabber-GN1_k,.vitessce-container .higlass-wrapper .DraggableDiv-module_top-draggable-handle-3W5bP:hover .DraggableDiv-module_left-draggable-handle-grabber-1Pqhc,.vitessce-container .higlass-wrapper .DraggableDiv-module_top-draggable-handle-3W5bP:hover .DraggableDiv-module_right-draggable-handle-grabber-1mtC0,.vitessce-container .higlass-wrapper .DraggableDiv-module_top-draggable-handle-3W5bP:hover .DraggableDiv-module_top-draggable-handle-grabber-2mVDE{box-shadow:0 0 3px 1px #0089ff;background:#0089ff}.vitessce-container .higlass-wrapper .DraggableDiv-module_bottom-draggable-handle-3olLp,.vitessce-container .higlass-wrapper .DraggableDiv-module_top-draggable-handle-3W5bP{height:12px;cursor:row-resize}.vitessce-container .higlass-wrapper .DraggableDiv-module_left-draggable-handle-2gpow,.vitessce-container .higlass-wrapper .DraggableDiv-module_right-draggable-handle-2Sriq{width:12px;cursor:col-resize}.vitessce-container .higlass-wrapper .HorizontalTiledPlot-module_horizontal-tiled-plot-3EK65,.vitessce-container .higlass-wrapper .VerticalTiledPlot-module_vertical-tiled-plot-R3sb7{position:relative}.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-focus-23by2,.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-SYccr{position:relative;display:flex;align-items:stretch;height:100%;margin-bottom:0;font-size:13.71429px;transition:box-shadow .15s ease,font-size .15s ease}.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-focus-23by2{box-shadow:0 0 0 1px #337ab7,0 0 3px 1px #337ab7}.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-1_0ZU{position:relative;box-sizing:border-box;width:100%;height:100%;padding:3px;color:#666;font-size:inherit;line-height:24px;border:0;border-radius:3px 0 0 3px;background:transparent}.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-1_0ZU:focus{outline:none;color:#000}.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-dark-EML2e .GenomePositionSearchBox-module_genome-position-search-bar-1_0ZU:focus{color:#e5e5e5}.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-button-33SWJ,.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-button-focus-1IhAk{display:block;height:100%;padding:0 8px !important;color:#999;border:0 !important;border-radius:0 !important;background:transparent;transition:background .15s ease,color .15s ease}.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-button-33SWJ:active,.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-button-33SWJ:focus,.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-button-33SWJ:hover,.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-button-focus-1IhAk,.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-button-focus-1IhAk:active,.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-button-focus-1IhAk:focus,.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-button-focus-1IhAk:hover{color:#fff;background:#337ab7}.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-icon-14AEk,.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-icon-focus-1Ay7Z{display:flex;align-items:center;transition:color .15s ease}.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-icon-14AEk:first-child,.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-icon-focus-1Ay7Z:first-child{margin-left:6px;margin-right:2px}.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-icon-14AEk span,.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-icon-focus-1Ay7Z span{display:block;margin-top:-2px}.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-icon-focus-1Ay7Z{color:#337ab7}.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-bar-suggestions-SrIoU{position:fixed;border-radius:3px;box-shadow:0 0 3px 0 rgba(0,0,0,0.1),0 1px 5px 0 rgba(0,0,0,0.05);background-color:rgba(255,255,255,0.95);border:1px solid rgba(0,0,0,0.1);padding:2px 0;font-size:90%;overflow:auto;max-height:50%}.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_btn-2bTUd{display:inline-block;margin-bottom:0;font-size:13.71429px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_btn-sm-2Ltms{font-size:12px;line-height:1.5;border-radius:3px}.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_btn-default-2pap4{color:#666;background-color:#fff;border-color:#ccc}.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_btn-default-2pap4:hover{color:#000;background:#ccc}.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_btn-default-2pap4:active,.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_btn-default-2pap4:focus{color:#fff;border-color:#000;background:#000}.vitessce-container .higlass-wrapper .GenomePositionSearchBox-module_genome-position-search-SYccr .GenomePositionSearchBox-module_btn-2bTUd{border-radius:0 3px 3px 0}.vitessce-container .higlass-wrapper .ExportLinkDialog-module_export-link-dialog-wrapper-ldYlL{display:flex}.vitessce-container .higlass-wrapper .ExportLinkDialog-module_export-link-dialog-wrapper-ldYlL input{flex-grow:1}.vitessce-container .higlass-wrapper .AddTrackPositionMenu-module_add-track-position-table-RHODc{border-collapse:collapse;margin:5px;color:#666}.vitessce-container .higlass-wrapper .AddTrackPositionMenu-module_add-track-position-table-dark-_B9fu{color:#ccc}.vitessce-container .higlass-wrapper .AddTrackPositionMenu-module_add-track-position-other-lIGbb{outline:none}.vitessce-container .higlass-wrapper .AddTrackPositionMenu-module_add-track-position-top-center-2Dw4e{min-width:80px;min-height:20px;text-align:center;outline:none;border-top:1px solid #999;border-left:1px solid #999;border-right:1px solid #999;border-radius:2px 2px 0 0}.vitessce-container .higlass-wrapper .AddTrackPositionMenu-module_add-track-position-top-center-2Dw4e:hover{color:#fff;background-color:#337ab7}.vitessce-container .higlass-wrapper .AddTrackPositionMenu-module_add-track-position-middle-left-2ycaN{min-width:40px;text-align:center;outline:none;border-top:1px solid #999;border-left:1px solid #999;border-bottom:1px solid #999;border-radius:2px 0 0 2px}.vitessce-container .higlass-wrapper .AddTrackPositionMenu-module_add-track-position-middle-left-2ycaN:hover{background-color:#337ab7;color:#fff}.vitessce-container .higlass-wrapper .AddTrackPositionMenu-module_add-track-position-middle-right-Qqjnn{min-width:40px;text-align:center;outline:none;border-top:1px solid #999;border-right:1px solid #999;border-bottom:1px solid #999;border-radius:0 2px 2px 0}.vitessce-container .higlass-wrapper .AddTrackPositionMenu-module_add-track-position-middle-right-Qqjnn:hover{background-color:#337ab7;color:#fff}.vitessce-container .higlass-wrapper .AddTrackPositionMenu-module_add-track-position-middle-middle-2YFZd{text-align:center;outline:none;border:1px solid #999}.vitessce-container .higlass-wrapper .AddTrackPositionMenu-module_add-track-position-middle-middle-2YFZd:hover{background-color:#337ab7;color:#fff}.vitessce-container .higlass-wrapper .AddTrackPositionMenu-module_add-track-position-bottom-middle-3ityE{min-height:20px;text-align:center;outline:none;border-left:1px solid #999;border-right:1px solid #999;border-bottom:1px solid #999;border-radius:0 0 2px 2px}.vitessce-container .higlass-wrapper .AddTrackPositionMenu-module_add-track-position-bottom-middle-3ityE:hover{background-color:#337ab7;color:#fff}.vitessce-container .higlass-wrapper .AddTrackPositionMenu-module_add-track-position-span-2hbwE{margin:5px}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-3XnZx,.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-focus-3akkN,.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-squeazed-GHIVd{position:relative;display:flex;justify-content:space-between;height:24px;margin-top:4px;margin-bottom:4px;color:#999;font-size:12px;line-height:24px;vertical-align:middle;border:0;border-radius:3px;background:#e5e5e5;transition:height .15s ease,margin .15s ease}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-dark-97tZt{background:#222}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-focus-3akkN{height:32px;margin-top:0;margin-bottom:0}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-id-3YURk{padding-left:3px}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-id-3YURk:before{content:\"ID:\";font-weight:700;padding-right:5px}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-left-Qj9Sm{display:flex;flex-grow:1}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-grabber-3jrIz,.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-grabber-squeazed-dU45Z{display:flex;align-items:center;justify-content:center;width:24px;height:100%;cursor:move;border-radius:3px 0 0 3px;transition:background .15s ease}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-grabber-3jrIz:hover,.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-grabber-squeazed-dU45Z:hover{background:#999}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-grabber-3jrIz:hover div,.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-grabber-squeazed-dU45Z:hover div{background:#fff}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-grabber-3jrIz div,.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-grabber-squeazed-dU45Z div{width:1px;height:50%;margin:1px;background:#999;transition:background .15s ease}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-dark-97tZt .ViewHeader-module_multitrack-header-grabber-3jrIz div{background:#666}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-grabber-squeazed-dU45Z{width:19.2px}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-search-1X_3_{position:relative;flex-grow:1;height:100%;margin-right:12px}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-search-1X_3_:after{position:absolute;top:3px;bottom:3px;right:-12px;display:block;content:\"\";width:1px;margin:0 6px;background:#ccc}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-dark-97tZt .ViewHeader-module_multitrack-header-search-1X_3_:after{background:#666}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-3XnZx>nav,.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-nav-list-2nvcu{display:flex}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-icon-16QKZ,.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-icon-squeazed-25lkF{width:24px;height:100%;padding:6px;transition:background .15s ease,color .15s ease}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-icon-16QKZ:active,.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-icon-16QKZ:focus,.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-icon-16QKZ:hover,.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-icon-squeazed-25lkF:active,.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-icon-squeazed-25lkF:focus,.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-icon-squeazed-25lkF:hover{color:#fff;background:#337ab7}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-icon-16QKZ:last-child,.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-icon-squeazed-25lkF:last-child{border-radius:0 3px 3px 0}.vitessce-container .higlass-wrapper .ViewHeader-module_mouse-tool-selection-1pg2m{color:#fff;border-radius:3px 0 0 3px;background:#337ab7}.vitessce-container .higlass-wrapper .ViewHeader-module_multitrack-header-icon-squeazed-25lkF{width:20px 5;padding-left:3px;padding-right:3px}.vitessce-container .higlass-wrapper .ViewConfigEditor-module_view-config-editor-header-2nTtX{margin:-10px -10px 0;padding:10px;display:flex;justify-content:space-between;background:#f2f2f2}.vitessce-container .higlass-wrapper .ViewConfigEditor-module_view-config-editor-header-2nTtX button{display:flex;align-items:center;font-size:14px;background:#f2f2f2}.vitessce-container .higlass-wrapper .ViewConfigEditor-module_view-config-editor-header-2nTtX button:hover{background:#e5e5e5}.vitessce-container .higlass-wrapper .ViewConfigEditor-module_view-config-editor-header-2nTtX button:hover span{color:#666}.vitessce-container .higlass-wrapper .ViewConfigEditor-module_view-config-editor-2HAFN{position:absolute;top:50px;right:0;bottom:0;left:0;margin:1px 0 0;padding:0;overflow:auto;font-size:12.5px;height:calc(100% - 80px)}.vitessce-container .higlass-wrapper .ViewConfigEditor-module_view-config-log-1mYmL{position:absolute;right:0;bottom:0;left:0;margin:1px 0 0;padding:0;min-height:30px;background:#f2f2f2;transition:height .15s ease}.vitessce-container .higlass-wrapper .ViewConfigEditor-module_view-config-log-header-3EbEM{background:#f2f2f2;border-top:1px solid #ccc;border-bottom:1px solid #ccc;padding-left:10px;height:30px;display:flex;align-items:center;cursor:pointer;position:sticky;position:-webkit-sticky;top:0}.vitessce-container .higlass-wrapper .ViewConfigEditor-module_view-config-log-msg-2-CJZ{background:#f2f2f2;overflow:auto;height:calc(100% - 30px)}.vitessce-container .higlass-wrapper .ViewConfigEditor-module_view-config-log-msg-2-CJZ td,.vitessce-container .higlass-wrapper .ViewConfigEditor-module_view-config-log-msg-2-CJZ tr{outline:none;vertical-align:top}.vitessce-container .higlass-wrapper .ViewConfigEditor-module_view-config-log-msg-2-CJZ .ViewConfigEditor-module_title-3nLH_{font-weight:700;padding-left:8px;padding-top:8px;width:100px}.vitessce-container .higlass-wrapper .ViewConfigEditor-module_view-config-log-msg-2-CJZ .ViewConfigEditor-module_Warning-_sgiB{color:orange}.vitessce-container .higlass-wrapper .ViewConfigEditor-module_view-config-log-msg-2-CJZ .ViewConfigEditor-module_Success-nclFo{color:green}.vitessce-container .higlass-wrapper .ViewConfigEditor-module_view-config-log-msg-2-CJZ .ViewConfigEditor-module_Error-3enaC{color:red}.vitessce-container .higlass-wrapper .ViewConfigEditor-module_view-config-log-msg-2-CJZ pre{background:#fff;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}.vitessce-container .higlass-wrapper .HiGlass-module_higlass-1NHR2{position:relative}.vitessce-container .higlass-wrapper .HiGlass-module_higlass-dark-theme-2visd{background:#000}.vitessce-container .higlass-wrapper .HiGlass-module_higlass-container-overflow-zNXnY,.vitessce-container .higlass-wrapper .HiGlass-module_higlass-scroll-container-overflow-2FS0w,.vitessce-container .higlass-wrapper .HiGlass-module_higlass-scroll-container-scroll-2lAU4{position:absolute;top:0;right:0;bottom:0;left:0}.vitessce-container .higlass-wrapper .HiGlass-module_higlass-scroll-container-overflow-2FS0w{overflow:hidden}.vitessce-container .higlass-wrapper .HiGlass-module_higlass-scroll-container-scroll-2lAU4{overflow-x:hidden;overflow-y:auto}.vitessce-container .higlass-wrapper .HiGlass-module_higlass-canvas-_mP9r{position:absolute;width:100%;height:100%}.vitessce-container .higlass-wrapper .HiGlass-module_higlass-drawing-surface-3aQQo{position:relative}.vitessce-container .higlass-wrapper .HiGlass-module_higlass-svg-JJZbf{position:absolute;width:100%;height:100%;left:0;top:0;pointer-events:none}.vitessce-container .higlass-wrapper .HiGlass-module_tiled-area-22H1L{display:flex;flex-direction:column}.vitessce-container .higlass-wrapper .HiGlass-module_track-mouseover-menu-1AoaP{position:fixed;z-index:1;margin:17px 0 0 9px;padding:0 .25rem;max-width:50vw;word-wrap:break-word;font-size:.8em;pointer-events:none;background:#fff;border-radius:.25rem;box-shadow:0 0 0 1px rgba(0,0,0,0.1),0 0 3px 0 rgba(0,0,0,0.075),0 0 7px 0 rgba(0,0,0,0.05)}.vitessce-container .higlass-wrapper .higlass .react-grid-layout{position:relative;transition:height .2s ease}.vitessce-container .higlass-wrapper .higlass .react-grid-item{transition:all .2s ease;transition-property:left,top}.vitessce-container .higlass-wrapper .higlass .react-grid-item.cssTransforms{transition-property:transform}.vitessce-container .higlass-wrapper .higlass .react-grid-item.resizing{z-index:1;will-change:width,height}.vitessce-container .higlass-wrapper .higlass .react-grid-item.react-draggable-dragging{transition:none;z-index:3;will-change:transform}.vitessce-container .higlass-wrapper .higlass .react-grid-item.react-grid-placeholder{background:red;opacity:.2;transition-duration:.1s;z-index:2;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.vitessce-container .higlass-wrapper .higlass .react-grid-item>.react-resizable-handle{position:absolute;width:20px;height:20px;bottom:0;right:0;cursor:se-resize}.vitessce-container .higlass-wrapper .higlass .react-grid-item>.react-resizable-handle:after{content:\"\";position:absolute;right:3px;bottom:3px;width:5px;height:5px;border-right:2px solid rgba(0,0,0,0.4);border-bottom:2px solid rgba(0,0,0,0.4)}.vitessce-container .higlass-wrapper .higlass .react-resizable{position:relative}.vitessce-container .higlass-wrapper .higlass .react-resizable-handle{position:absolute;width:20px;height:20px;background-repeat:no-repeat;background-origin:content-box;box-sizing:border-box;background-image:url(\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgd2lkdGg9IjYiIGhlaWdodD0iNiI+PHBhdGggZD0iTTYgNkgwVjQuMmg0LjJWMEg2djZ6IiBvcGFjaXR5PSIuMzAyIi8+PC9zdmc+\");background-position:100% 100%;padding:0 3px 3px 0}.vitessce-container .higlass-wrapper .higlass .react-resizable-handle-sw{bottom:0;left:0;cursor:sw-resize;transform:rotate(90deg)}.vitessce-container .higlass-wrapper .higlass .react-resizable-handle-se{bottom:0;right:0;cursor:se-resize}.vitessce-container .higlass-wrapper .higlass .react-resizable-handle-nw{top:0;left:0;cursor:nw-resize;transform:rotate(180deg)}.vitessce-container .higlass-wrapper .higlass .react-resizable-handle-ne{top:0;right:0;cursor:ne-resize;transform:rotate(270deg)}.vitessce-container .higlass-wrapper .higlass .react-resizable-handle-e,.vitessce-container .higlass-wrapper .higlass .react-resizable-handle-w{top:50%;margin-top:-10px;cursor:ew-resize}.vitessce-container .higlass-wrapper .higlass .react-resizable-handle-w{left:0;transform:rotate(135deg)}.vitessce-container .higlass-wrapper .higlass .react-resizable-handle-e{right:0;transform:rotate(315deg)}.vitessce-container .higlass-wrapper .higlass .react-resizable-handle-n,.vitessce-container .higlass-wrapper .higlass .react-resizable-handle-s{left:50%;margin-left:-10px;cursor:ns-resize}.vitessce-container .higlass-wrapper .higlass .react-resizable-handle-n{top:0;transform:rotate(225deg)}.vitessce-container .higlass-wrapper .higlass .react-resizable-handle-s{bottom:0;transform:rotate(45deg)}.vitessce-container .higlass-wrapper .higlass code[class*=language-],.vitessce-container .higlass-wrapper .higlass pre[class*=language-]{color:#393a34;font-family:Consolas,Bitstream Vera Sans Mono,Courier New,Courier,monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;font-size:.95em;line-height:1.2em;-moz-tab-size:4;tab-size:4;-webkit-hyphens:none;-ms-hyphens:none;hyphens:none}.vitessce-container .higlass-wrapper .higlass code[class*=language-]::selection,.vitessce-container .higlass-wrapper .higlass code[class*=language-] ::selection,.vitessce-container .higlass-wrapper .higlass pre[class*=language-]::selection,.vitessce-container .higlass-wrapper .higlass pre[class*=language-] ::selection{background:#b3d4fc}.vitessce-container .higlass-wrapper .higlass pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border:1px solid #ddd;background-color:#fff}.vitessce-container .higlass-wrapper .higlass :not(pre)>code[class*=language-]{padding:1px .2em;background:#f8f8f8;border:1px solid #ddd}.vitessce-container .higlass-wrapper .higlass .token.cdata,.vitessce-container .higlass-wrapper .higlass .token.comment,.vitessce-container .higlass-wrapper .higlass .token.doctype,.vitessce-container .higlass-wrapper .higlass .token.prolog{color:#998;font-style:italic}.vitessce-container .higlass-wrapper .higlass .token.namespace{opacity:.7}.vitessce-container .higlass-wrapper .higlass .token.attr-value,.vitessce-container .higlass-wrapper .higlass .token.string{color:#e3116c}.vitessce-container .higlass-wrapper .higlass .token.operator,.vitessce-container .higlass-wrapper .higlass .token.punctuation{color:#393a34}.vitessce-container .higlass-wrapper .higlass .token.boolean,.vitessce-container .higlass-wrapper .higlass .token.constant,.vitessce-container .higlass-wrapper .higlass .token.entity,.vitessce-container .higlass-wrapper .higlass .token.inserted,.vitessce-container .higlass-wrapper .higlass .token.number,.vitessce-container .higlass-wrapper .higlass .token.property,.vitessce-container .higlass-wrapper .higlass .token.regex,.vitessce-container .higlass-wrapper .higlass .token.symbol,.vitessce-container .higlass-wrapper .higlass .token.url,.vitessce-container .higlass-wrapper .higlass .token.variable{color:#36acaa}.vitessce-container .higlass-wrapper .higlass .language-autohotkey .token.selector,.vitessce-container .higlass-wrapper .higlass .token.atrule,.vitessce-container .higlass-wrapper .higlass .token.attr-name,.vitessce-container .higlass-wrapper .higlass .token.keyword{color:#00a4db}.vitessce-container .higlass-wrapper .higlass .language-autohotkey .token.tag,.vitessce-container .higlass-wrapper .higlass .token.deleted,.vitessce-container .higlass-wrapper .higlass .token.function{color:#9a050f}.vitessce-container .higlass-wrapper .higlass .language-autohotkey .token.keyword,.vitessce-container .higlass-wrapper .higlass .token.selector,.vitessce-container .higlass-wrapper .higlass .token.tag{color:#00009f}.vitessce-container .higlass-wrapper .higlass .token.bold,.vitessce-container .higlass-wrapper .higlass .token.function,.vitessce-container .higlass-wrapper .higlass .token.important{font-weight:700}.vitessce-container .higlass-wrapper .higlass .token.italic{font-style:italic}.vitessce-container .higlass-wrapper .higlass *{box-sizing:border-box}.vitessce-container .higlass-wrapper .higlass .react-resizable-handle{z-index:1}.vitessce-container .higlass-wrapper table.table-track-options{border-collapse:collapse;margin-left:auto;margin-right:auto}.vitessce-container .higlass-wrapper td.td-track-options{border:1px solid #fff;outline:none;padding:3px;position:relative;font-family:Roboto,sans-serif;font-size:14px;color:#666}.vitessce-container .higlass-wrapper .cell-label{position:absolute;left:0;top:0;margin-left:5px;color:#777}.vitessce-container .higlass-wrapper .modal-dialog{position:relative;display:table;overflow-y:auto;overflow-x:auto;width:auto;min-width:300px;margin:auto}.vitessce-container{position:relative}.vitessce-container *,.vitessce-container *::before,.vitessce-container *::after{box-sizing:border-box}.vitessce-container div{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";font-size:1rem;font-weight:400;line-height:1.5;text-align:left}.vitessce-container article,.vitessce-container aside,.vitessce-container figcaption,.vitessce-container figure,.vitessce-container footer,.vitessce-container header,.vitessce-container hgroup,.vitessce-container main,.vitessce-container nav,.vitessce-container section{display:block}.vitessce-container h1,.vitessce-container h2,.vitessce-container h3,.vitessce-container h4,.vitessce-container h5,.vitessce-container h6{margin-top:0;margin-bottom:0.5rem;font-weight:500;line-height:1.2}.vitessce-container p{margin-top:0;margin-bottom:1rem}.vitessce-container ol,.vitessce-container ul,.vitessce-container dl{margin-top:0;margin-bottom:0}.vitessce-container b,.vitessce-container strong{font-weight:bolder}.vitessce-container small{font-size:80%}.vitessce-container a{color:#007bff;text-decoration:none;background-color:transparent}.vitessce-container a:hover{color:#0056b3;text-decoration:underline}.vitessce-container a:not([href]){color:inherit;text-decoration:none}.vitessce-container a:not([href]):hover{color:inherit;text-decoration:none}.vitessce-container img{vertical-align:middle;border-style:none}.vitessce-container svg{overflow:hidden}.vitessce-container table{border-collapse:collapse}.vitessce-container th{text-align:inherit}.vitessce-container button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.vitessce-container input,.vitessce-container button,.vitessce-container select,.vitessce-container optgroup,.vitessce-container textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}.vitessce-container button,.vitessce-container input{overflow:visible}.vitessce-container button,.vitessce-container select{text-transform:none}.vitessce-container select{word-wrap:normal}.vitessce-container button,.vitessce-container [type=\"button\"],.vitessce-container [type=\"reset\"],.vitessce-container [type=\"submit\"]{-webkit-appearance:button}.vitessce-container button:not(:disabled),.vitessce-container [type=\"button\"]:not(:disabled),.vitessce-container [type=\"reset\"]:not(:disabled),.vitessce-container [type=\"submit\"]:not(:disabled){cursor:pointer}.vitessce-container button::-moz-focus-inner,.vitessce-container [type=\"button\"]::-moz-focus-inner,.vitessce-container [type=\"reset\"]::-moz-focus-inner,.vitessce-container [type=\"submit\"]::-moz-focus-inner{padding:0;border-style:none}.vitessce-container input[type=\"radio\"],.vitessce-container input[type=\"checkbox\"]{box-sizing:border-box;padding:0}.vitessce-container [hidden]{display:none !important}.vitessce-container h1{font-size:2.5rem}.vitessce-container h2{font-size:2rem}.vitessce-container h3{font-size:1.75rem}.vitessce-container h4{font-size:1.5rem}.vitessce-container h5{font-size:1.25rem}.vitessce-container h6{font-size:1rem}.vitessce-container .container-fluid{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.vitessce-container .row{display:flex;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.vitessce-container .col{flex-basis:0;flex-grow:1;max-width:100%;position:relative;width:100%;padding-right:15px;padding-left:15px}.vitessce-container .d-flex{display:flex !important}.vitessce-container .card>.list-group:first-child .list-group-item:first-child{border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}.vitessce-container .card>.list-group:last-child .list-group-item:last-child{border-bottom-right-radius:0.25rem;border-bottom-left-radius:0.25rem}.vitessce-container .card-header+.list-group .list-group-item:first-child{border-top:0}.vitessce-container .card-body{flex:1 1 auto;min-height:1px;padding:0.75rem}.vitessce-container .list-group{display:flex;flex-direction:column;padding-left:0;margin-bottom:0}.vitessce-container .list-group-item-action{width:100%;color:#495057;text-align:inherit}.vitessce-container .list-group-item-action:hover,.vitessce-container .list-group-item-action:focus{z-index:1;text-decoration:none}.vitessce-container .list-group-item{position:relative;display:block;padding:0.75rem 1.25rem;border:1px solid rgba(0,0,0,0.125)}.vitessce-container .list-group-item:first-child{border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}.vitessce-container .list-group-item:last-child{border-bottom-right-radius:0.25rem;border-bottom-left-radius:0.25rem}.vitessce-container .list-group-item.disabled,.vitessce-container .list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.vitessce-container .list-group-item.active{z-index:2;color:#fff;background-color:#007bff;border-color:#007bff}.vitessce-container .list-group-item+.list-group-item{border-top-width:0}.vitessce-container .list-group-item+.list-group-item.active{margin-top:-1px;border-top-width:1px}.vitessce-container .flex-column{flex-direction:column !important}.vitessce-container .align-items-start{align-items:flex-start !important}.vitessce-container .input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.vitessce-container .input-group>.form-control,.vitessce-container .input-group>.form-control-plaintext{position:relative;flex:1 1;min-width:0;margin-bottom:0}.vitessce-container .input-group>.form-control+.form-control,.vitessce-container .input-group>.form-control-plaintext+.form-control,.vitessce-container .input-group>.custom-select+.form-control,.vitessce-container .input-group>.custom-file+.form-control{margin-left:-1px}.vitessce-container .input-group>.form-control:focus{z-index:3}.vitessce-container .input-group>.form-control:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.vitessce-container .input-group>.form-control:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.vitessce-container .input-group-prepend,.vitessce-container .input-group-append{display:flex}.vitessce-container .input-group-prepend .btn,.vitessce-container .input-group-append .btn{position:relative;z-index:2}.vitessce-container .input-group-prepend .btn:focus,.vitessce-container .input-group-append .btn:focus{z-index:3}.vitessce-container .input-group-prepend .btn+.btn,.vitessce-container .input-group-append .btn+.btn{margin-left:-1px}.vitessce-container .input-group-prepend{margin-right:-1px}.vitessce-container .input-group-append{margin-left:-1px}.vitessce-container .input-group-lg>.form-control:not(textarea){height:calc(1.5em + 1rem + 2px)}.vitessce-container .input-group-lg>.form-control,.vitessce-container .input-group-lg>.input-group-prepend>.btn,.vitessce-container .input-group-lg>.input-group-append>.btn{padding:0.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:0.3rem}.vitessce-container .input-group-sm>.form-control:not(textarea){height:calc(1.5em + 0.5rem + 2px)}.vitessce-container .input-group-sm>.form-control,.vitessce-container .input-group-sm>.input-group-prepend>.btn,.vitessce-container .input-group-sm>.input-group-append>.btn{padding:0.25rem 0.5rem;font-size:0.875rem;line-height:1.5;border-radius:0.2rem}.vitessce-container .input-group>.input-group-prepend>.btn,.vitessce-container .input-group>.input-group-append:not(:last-child)>.btn,.vitessce-container .input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.vitessce-container .input-group>.input-group-append>.btn,.vitessce-container .input-group>.input-group-prepend:not(:first-child)>.btn,.vitessce-container .input-group>.input-group-prepend:first-child>.btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.vitessce-container .my-auto,.vitessce-container .mt-auto{margin-top:auto !important}.vitessce-container .my-auto,.vitessce-container .mb-auto{margin-bottom:auto !important}.vitessce-container .my-0,.vitessce-container .mt-0{margin-top:0 !important}.vitessce-container .my-0,.vitessce-container .mb-0{margin-bottom:0 !important}.vitessce-container .my-1,.vitessce-container .mt-1{margin-top:0.25rem !important}.vitessce-container .my-1,.vitessce-container .mb-1{margin-bottom:0.25rem !important}.vitessce-container .my-2,.vitessce-container .mt-2{margin-top:0.5rem !important}.vitessce-container .my-2,.vitessce-container .mb-2{margin-bottom:0.5rem !important}.vitessce-container .my-3,.vitessce-container .mt-3{margin-top:1rem !important}.vitessce-container .my-3,.vitessce-container .mb-3{margin-bottom:1rem !important}.vitessce-container .mx-auto,.vitessce-container .ml-auto{margin-left:auto !important}.vitessce-container .mx-auto,.vitessce-container .mr-auto{margin-right:auto !important}.vitessce-container .mx-0,.vitessce-container .ml-0{margin-left:0 !important}.vitessce-container .mx-0,.vitessce-container .mr-0{margin-right:0 !important}.vitessce-container .mx-1,.vitessce-container .ml-1{margin-left:0.25rem !important}.vitessce-container .mx-1,.vitessce-container .mr-1{margin-right:0.25rem !important}.vitessce-container .mx-2,.vitessce-container .ml-2{margin-left:0.5rem !important}.vitessce-container .mx-2,.vitessce-container .mr-2{margin-right:0.5rem !important}.vitessce-container .mx-3,.vitessce-container .ml-3{margin-left:1rem !important}.vitessce-container .mx-3,.vitessce-container .mr-3{margin-right:1rem !important}.vitessce-container .py-0,.vitessce-container .pt-0{padding-top:0 !important}.vitessce-container .py-0,.vitessce-container .pb-0{padding-bottom:0 !important}.vitessce-container .py-1,.vitessce-container .pt-1{padding-top:0.25rem !important}.vitessce-container .py-1,.vitessce-container .pb-1{padding-bottom:0.25rem !important}.vitessce-container .py-2,.vitessce-container .pt-2{padding-top:0.5rem !important}.vitessce-container .py-2,.vitessce-container .pb-2{padding-bottom:0.5rem !important}.vitessce-container .py-3,.vitessce-container .pt-3{padding-top:1rem !important}.vitessce-container .py-3,.vitessce-container .pb-3{padding-bottom:1rem !important}.vitessce-container .px-0,.vitessce-container .pl-0{padding-left:0 !important}.vitessce-container .px-0,.vitessce-container .pr-0{padding-right:0 !important}.vitessce-container .px-1,.vitessce-container .pl-1{padding-left:0.25rem !important}.vitessce-container .px-1,.vitessce-container .pr-1{padding-right:0.25rem !important}.vitessce-container .px-2,.vitessce-container .pl-2{padding-left:0.5rem !important}.vitessce-container .px-2,.vitessce-container .pr-2{padding-right:0.5rem !important}.vitessce-container .px-3,.vitessce-container .pl-3{padding-left:1rem !important}.vitessce-container .px-3,.vitessce-container .pr-3{padding-right:1rem !important}.vitessce-container .form-control{display:block;width:100%;height:calc(1.5em + 0.75rem + 2px);padding:0.375rem 0.75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:0.25rem;transition:border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}@media (prefers-reduced-motion: reduce){.vitessce-container .form-control{transition:none}}.vitessce-container .form-control::-ms-expand{background-color:transparent;border:0}.vitessce-container .form-control:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.vitessce-container .form-control:focus{color:#495057;background-color:#fff;border-color:#80bdff;outline:0;box-shadow:0 0 0 0.2rem rgba(0,123,255,0.25)}.vitessce-container .form-control::-webkit-input-placeholder{color:#6c757d;opacity:1}.vitessce-container .form-control:-ms-input-placeholder{color:#6c757d;opacity:1}.vitessce-container .form-control::-ms-input-placeholder{color:#6c757d;opacity:1}.vitessce-container .form-control::placeholder{color:#6c757d;opacity:1}.vitessce-container .form-control:disabled,.vitessce-container .form-control[readonly]{background-color:#e9ecef;opacity:1}.vitessce-container select.form-control:focus::-ms-value{color:#495057;background-color:#fff}.vitessce-container .btn .badge{position:relative;top:-1px}.vitessce-container .btn{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:1px solid transparent;padding:0.375rem 0.75rem;font-size:1rem;line-height:1.5;border-radius:0.25rem;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out}@media (prefers-reduced-motion: reduce){.vitessce-container .btn{transition:none}}.vitessce-container .btn:hover{color:#212529;text-decoration:none}.vitessce-container .btn:focus,.vitessce-container .btn.focus{outline:0;box-shadow:0 0 0 0.2rem rgba(0,123,255,0.25)}.vitessce-container .btn.disabled,.vitessce-container .btn:disabled{opacity:0.65}.vitessce-container .btn-outline-secondary{color:#6c757d;border-color:#6c757d}.vitessce-container .btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.vitessce-container .btn-outline-secondary:focus,.vitessce-container .btn-outline-secondary.focus{box-shadow:0 0 0 0.2rem rgba(108,117,125,0.5)}.vitessce-container .btn-outline-secondary.disabled,.vitessce-container .btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}.vitessce-container .btn-outline-secondary:not(:disabled):not(.disabled):active,.vitessce-container .btn-outline-secondary:not(:disabled):not(.disabled).active,.vitessce-container .show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#6c757d;border-color:#6c757d}.vitessce-container .btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.vitessce-container .btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.vitessce-container .show>.btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 0.2rem rgba(108,117,125,0.5)}.vitessce-container .modal-open{overflow:hidden}.vitessce-container .modal-open .modal{overflow-x:hidden;overflow-y:auto}.vitessce-container .modal{position:absolute;top:0;left:0;z-index:1050;width:100%;height:100%;overflow:hidden;outline:0}.vitessce-container .modal-dialog{position:relative;width:auto;margin:0.5rem;pointer-events:none}.vitessce-container .modal.fade .modal-dialog{transition:transform 0.3s ease-out;transform:translate(0, -50px)}@media (prefers-reduced-motion: reduce){.vitessce-container .modal.fade .modal-dialog{transition:none}}.vitessce-container .modal.show .modal-dialog{transform:none}.vitessce-container .modal.modal-static .modal-dialog{transform:scale(1.02)}.vitessce-container .modal-dialog-scrollable{display:flex;max-height:calc(100% - 1rem)}.vitessce-container .modal-dialog-scrollable .modal-content{max-height:calc(100vh - 1rem);overflow:hidden}.vitessce-container .modal-dialog-scrollable .modal-header,.vitessce-container .modal-dialog-scrollable .modal-footer{flex-shrink:0}.vitessce-container .modal-dialog-scrollable .modal-body{overflow-y:auto}.vitessce-container .modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - 1rem)}.vitessce-container .modal-dialog-centered::before{display:block;height:calc(100vh - 1rem);content:\"\"}.vitessce-container .modal-dialog-centered.modal-dialog-scrollable{flex-direction:column;justify-content:center;height:100%}.vitessce-container .modal-dialog-centered.modal-dialog-scrollable .modal-content{max-height:none}.vitessce-container .modal-dialog-centered.modal-dialog-scrollable::before{content:none}.vitessce-container .modal-content{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,0.2);border-radius:0.3rem;outline:0}.vitessce-container .modal-backdrop{position:absolute;top:0;left:0;z-index:1040;width:100%;height:100%;background-color:#000}.vitessce-container .modal-backdrop.fade{opacity:0}.vitessce-container .modal-backdrop.show{opacity:0.5}.vitessce-container .modal-header{display:flex;align-items:flex-start;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:calc(0.3rem - 1px);border-top-right-radius:calc(0.3rem - 1px)}.vitessce-container .modal-header .close{padding:1rem 1rem;margin:-1rem -1rem -1rem auto}.vitessce-container .modal-title{margin-bottom:0;line-height:1.5}.vitessce-container .modal-body{position:relative;flex:1 1 auto;padding:1rem}.vitessce-container .modal-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:0.75rem;border-top:1px solid #dee2e6;border-bottom-right-radius:calc(0.3rem - 1px);border-bottom-left-radius:calc(0.3rem - 1px)}.vitessce-container .modal-footer>*{margin:0.25rem}.vitessce-container .modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width: 576px){.vitessce-container .modal-dialog{max-width:500px;margin:1.75rem auto}.vitessce-container .modal-dialog-scrollable{max-height:calc(100% - 3.5rem)}.vitessce-container .modal-dialog-scrollable .modal-content{max-height:calc(100vh - 3.5rem)}.vitessce-container .modal-dialog-centered{min-height:calc(100% - 3.5rem)}.vitessce-container .modal-dialog-centered::before{height:calc(100vh - 3.5rem)}.vitessce-container .modal-sm{max-width:300px}}@media (min-width: 992px){.vitessce-container .modal-lg,.vitessce-container .modal-xl{max-width:800px}}@media (min-width: 1200px){.vitessce-container .modal-xl{max-width:1140px}}.vitessce-container .card{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-clip:border-box;border-radius:0.25rem}.vitessce-container .alert{position:relative;padding:0.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:0.25rem}.vitessce-container .alert-warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.vitessce-container .justify-content-between{justify-content:space-between !important}.vitessce-container .align-items-baseline{align-items:baseline !important}.vitessce-container .pl-2,.vitessce-container .px-2{padding-left:0.5rem !important}.vitessce-container .align-items-end{align-items:flex-end !important}.vitessce-container.vitessce-theme-dark.welcome-container{overflow:visible}.vitessce-container.vitessce-theme-dark.welcome-container .react-grid-layout,.vitessce-container.vitessce-theme-dark.welcome-container .warning-layout{position:relative}.vitessce-container.vitessce-theme-dark .react-grid-layout,.vitessce-container.vitessce-theme-dark .warning-layout{background-color:#333;height:auto;position:absolute;width:100%}.vitessce-container.vitessce-theme-dark .warning-layout{height:100vh}.vitessce-container.vitessce-theme-dark .warning-layout .card{margin-left:0.5rem}.vitessce-container.vitessce-theme-dark .loading-indicator-backdrop{position:absolute;top:0;left:0;z-index:1040;width:100%;height:100%;border-radius:0.25rem;background-color:rgba(0,0,0,0.5)}.vitessce-container.vitessce-theme-dark .loading-indicator-backdrop .loading-indicator-container{display:grid;place-items:center;position:absolute;width:100%;height:100%}.vitessce-container.vitessce-theme-dark .react-grid-item{flex-direction:column !important;display:flex !important;padding-right:10px}.vitessce-container.vitessce-theme-dark .d-flex{flex-shrink:0}.vitessce-container.vitessce-theme-dark .title{color:#d3d3d3;overflow-x:hidden}.vitessce-container.vitessce-theme-dark .card{border:1px solid rgba(0,0,0,0.125)}.vitessce-container.vitessce-theme-dark .bg-black{background-color:#000;color:#fff}.vitessce-container.vitessce-theme-dark .bg-black a{color:#fff}.vitessce-container.vitessce-theme-dark .bg-primary{background-color:#222;color:#d3d3d3}.vitessce-container.vitessce-theme-dark .bg-primary a{color:#9bb7d6}.vitessce-container.vitessce-theme-dark .bg-secondary{background-color:#000;color:#d3d3d3}.vitessce-container.vitessce-theme-dark .scroll{overflow-y:auto}.vitessce-container.vitessce-theme-dark .details{font-size:80%;opacity:0.8}.vitessce-container.vitessce-theme-dark .description p,.vitessce-container.vitessce-theme-dark .description details,.vitessce-container.vitessce-theme-dark .description table{font-size:80%;opacity:0.8}.vitessce-container.vitessce-theme-dark .description details{margin-bottom:6px}.vitessce-container.vitessce-theme-dark .description summary{border-bottom:1px solid #3c3c3c;cursor:pointer}.vitessce-container.vitessce-theme-dark .description .metadata-container{padding-left:14px}.vitessce-container.vitessce-theme-dark .description .metadata-container table{width:100%}.vitessce-container.vitessce-theme-dark .description .metadata-container table td,.vitessce-container.vitessce-theme-dark .description .metadata-container table th{outline:none;padding:2px 2px;max-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:50%}.vitessce-container.vitessce-theme-dark .description .metadata-container table tr:nth-child(even){background-color:#2f2f2f}.vitessce-container.vitessce-theme-dark .coll-full,.vitessce-container.vitessce-theme-dark .welcome-col-left,.vitessce-container.vitessce-theme-dark .welcome-col-right{position:relative;width:100%;padding-right:15px;padding-left:15px}.vitessce-container.vitessce-theme-dark .col-full{flex:0 0 100%;max-width:100%}.vitessce-container.vitessce-theme-dark .welcome-col-left{flex:0 0 50%;max-width:50%}.vitessce-container.vitessce-theme-dark .welcome-col-left .list-group-item{background-color:#000}.vitessce-container.vitessce-theme-dark .welcome-col-left .input-group input{background-color:#d3d3d3}.vitessce-container.vitessce-theme-dark .welcome-col-left a{color:#ffffff}.vitessce-container.vitessce-theme-dark .welcome-col-right{flex:0 0 50%;max-width:50%}.vitessce-container.vitessce-theme-dark .welcome-col-right .info-paragraph{margin-bottom:0 !important}.vitessce-container.vitessce-theme-dark .welcome-col-right .info-section-text{margin-top:0.5rem}.vitessce-container.vitessce-theme-dark .welcome-col-right a{color:#ffffff}.vitessce-container.vitessce-theme-dark .btn.icon{padding:0;height:2em;width:2em;background-color:white}.vitessce-container.vitessce-theme-dark .btn.icon>svg{vertical-align:middle}.vitessce-container.vitessce-theme-dark .roll-up{height:2em;overflow:hidden;background-color:white}.vitessce-container.vitessce-theme-dark .roll-up:hover{-webkit-animation-name:roll-up;animation-name:roll-up;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@-webkit-keyframes roll-up{0%{height:2em}100%{height:100%}}@keyframes roll-up{0%{height:2em}100%{height:100%}}.vitessce-container.vitessce-theme-dark .tool{position:absolute;display:inline;z-index:1000;opacity:.65;color:black}.vitessce-container.vitessce-theme-dark .tool:hover{opacity:.90}.vitessce-container.vitessce-theme-dark .radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-block;width:1em;height:1em;padding:6px !important;background-clip:content-box;border:2px solid lightgrey;background-color:lightgrey;border-radius:50%}.vitessce-container.vitessce-theme-dark .radio:checked{background-clip:unset}.vitessce-container.vitessce-theme-dark .layer-controller-container>div:first-child{margin-top:0 !important}.vitessce-container.vitessce-theme-dark .channel-container{width:100%;display:flex;position:relative}.vitessce-container.vitessce-theme-dark .channel-set-color{display:flex;position:relative;top:5px;width:16px;height:16px;margin-right:24px;cursor:pointer;outline:currentColor none medium;border-radius:3px;box-shadow:rgba(0,0,0,0.15) 0px 0px 0px 1px inset}.vitessce-container.vitessce-theme-dark .channel-checked{display:flex;position:relative;margin-right:10px}.vitessce-container.vitessce-theme-dark .add-image-layer{color:#c6c6c6;border:1px dashed #c6c6c6}.vitessce-container.vitessce-theme-dark pre{color:#d3d3d3}.vitessce-container.vitessce-theme-dark .cell-tooltip,.vitessce-container.vitessce-theme-dark .cell-emphasis-crosshair{z-index:50;position:absolute;pointer-events:none;box-sizing:border-box}.vitessce-container.vitessce-theme-dark .cell-emphasis-crosshair{background-color:#d3d3d3}.vitessce-container.vitessce-theme-dark .cell-tooltip{height:auto;width:auto;opacity:0;padding:0.5rem;border-radius:0.25rem;border:1px solid gray;-webkit-animation-name:cell-tooltip;animation-name:cell-tooltip;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.vitessce-container.vitessce-theme-dark .cell-tooltip table>tbody>tr>th,.vitessce-container.vitessce-theme-dark .cell-tooltip table>tbody>tr>td{font-size:80%;opacity:0.8;outline:0;padding:0 2px}.vitessce-container.vitessce-theme-dark .cell-tooltip table{border-collapse:collapse}@-webkit-keyframes cell-tooltip{from{opacity:0}to{opacity:0.9}}@keyframes cell-tooltip{from{opacity:0}to{opacity:0.9}}.vitessce-container.vitessce-theme-dark .help-tooltip.rc-tooltip{z-index:1060;display:block;max-width:250px;visibility:visible;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,0.65);font-size:14px;list-style:none;position:absolute}.vitessce-container.vitessce-theme-dark .help-tooltip.rc-tooltip-hidden{display:none}.vitessce-container.vitessce-theme-dark .help-tooltip.rc-tooltip .rc-tooltip-inner{border-radius:2px;box-shadow:0 3px 6px -4px rgba(100,100,100,0.12),0 6px 16px 0 rgba(100,100,100,0.08),0 9px 28px 8px rgba(100,100,100,0.05)}.vitessce-container.vitessce-theme-dark .help-tooltip.rc-tooltip-placement-top{padding-top:8px}.vitessce-container.vitessce-theme-dark .help-tooltip.rc-tooltip-placement-right{padding-left:8px}.vitessce-container.vitessce-theme-dark .help-tooltip.rc-tooltip-placement-bottom{padding-top:8px}.vitessce-container.vitessce-theme-dark .help-tooltip.rc-tooltip-placement-left{padding-right:8px}.vitessce-container.vitessce-theme-dark .help-tooltip.rc-tooltip .rc-tooltip-inner{font-size:10px;min-width:30px;padding:6px 8px;color:#fff;text-align:left;text-decoration:none;word-wrap:break-word;background-color:rgba(0,0,0,0.9)}.vitessce-container.vitessce-theme-dark .help-tooltip.rc-tooltip .rc-tooltip-arrow{display:none}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip{top:0;left:0;z-index:1030;font-weight:normal;white-space:normal;text-align:left;cursor:auto;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,0.65);font-size:14px;list-style:none;position:absolute}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip::after{position:absolute;background:rgba(255,255,255,0.01);content:''}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip-hidden{display:none}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .rc-tooltip-inner{border-radius:2px;box-shadow:0 3px 6px -4px rgba(100,100,100,0.12),0 6px 16px 0 rgba(100,100,100,0.08),0 9px 28px 8px rgba(100,100,100,0.05)}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip-placement-top{padding-bottom:10px}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip-placement-right{padding-left:10px}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip-placement-bottom{padding-top:10px}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip-placement-left{padding-right:10px}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .rc-tooltip-content{padding:0}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .rc-tooltip-inner{box-sizing:border-box;background-color:#fff;background-clip:padding-box}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .rc-tooltip-inner .popover-menu-list{list-style-type:none;padding:0;margin-bottom:0}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .rc-tooltip-inner .popover-menu-list dl,.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .rc-tooltip-inner .popover-menu-list ol,.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .rc-tooltip-inner .popover-menu-list ul{margin-top:0;margin-bottom:1rem}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .rc-tooltip-inner .popover-menu-list li button{border:0;padding:4px 16px;cursor:pointer;width:100%;background-color:transparent;border-radius:2px}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .rc-tooltip-inner .popover-menu-list li button span.small{font-size:11px}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .rc-tooltip-inner .popover-menu-list li button:hover{background-color:#ededed}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .rc-tooltip-inner .popover-menu-list li:not(:last-child){border-bottom:1px solid gray}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .rc-tooltip-inner .popover-menu-list button{-webkit-appearance:button;text-transform:none;overflow:visible;margin:0;font-family:inherit;font-size:14px;line-height:inherit;border-radius:0}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .rc-tooltip-inner .popover-menu-color+.popover-menu-list{border-top:1px solid gray}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .popover-menu-color.twitter-picker{box-shadow:none !important;margin:0 auto}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .popover-menu-color.twitter-picker>div:nth-child(3){padding:6px !important;transform:translate(2px, 0)}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .popover-menu-color.twitter-picker>div>div:nth-of-type(1){font-size:12px;width:20px !important}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .popover-menu-color.twitter-picker input{width:60px !important;font-size:12px}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .popover-menu-color.twitter-picker>div>span>div{width:18px !important;height:18px !important}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .rc-tooltip-inner-content{padding:12px 16px;color:rgba(0,0,0,0.65)}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip .rc-tooltip-arrow{position:absolute;display:block;width:8px;height:8px;background:transparent;border-style:solid;border-width:4px;transform:rotate(45deg)}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip.rc-tooltip-placement-top>.rc-tooltip-content>.rc-tooltip-arrow{bottom:6px;border-top-color:transparent;border-right-color:#fff;border-bottom-color:#fff;border-left-color:transparent;box-shadow:3px 3px 7px rgba(0,0,0,0.07);left:50%;transform:translateX(-50%) rotate(45deg)}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip.rc-tooltip-placement-right>.rc-tooltip-content>.rc-tooltip-arrow{left:6px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:#fff;border-left-color:#fff;box-shadow:-3px 3px 7px rgba(0,0,0,0.07);top:50%;transform:translateY(-50%) rotate(45deg)}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip.rc-tooltip-placement-bottom>.rc-tooltip-content>.rc-tooltip-arrow{top:6px;border-top-color:#fff;border-right-color:transparent;border-bottom-color:transparent;border-left-color:#fff;box-shadow:-2px -2px 5px rgba(0,0,0,0.06);left:50%;transform:translateX(-50%) rotate(45deg)}.vitessce-container.vitessce-theme-dark .popover.rc-tooltip.rc-tooltip-placement-left>.rc-tooltip-content>.rc-tooltip-arrow{right:6px;border-top-color:#fff;border-right-color:#fff;border-bottom-color:transparent;border-left-color:transparent;box-shadow:3px -3px 7px rgba(0,0,0,0.07);top:50%;transform:translateY(-50%) rotate(45deg)}.vitessce-container.vitessce-theme-dark .sets-manager{position:relative;width:100%;display:block;height:auto}.vitessce-container.vitessce-theme-dark .sets-manager .set-operation-buttons{background-color:#d3d3d3;border-radius:4px;padding:2px;display:inline-block;position:absolute;bottom:1.75rem;right:0.25rem;box-shadow:-2px -2px 5px rgba(0,0,0,0.06)}.vitessce-container.vitessce-theme-dark .sets-manager .set-operation-buttons button{border:0;background-color:transparent;color:#626262}.vitessce-container.vitessce-theme-dark .sets-manager .set-operation-buttons button[disabled]{pointer-events:none}.vitessce-container.vitessce-theme-dark .sets-manager .set-operation-buttons button[disabled] svg{fill:silver}.vitessce-container.vitessce-theme-dark .sets-manager .set-operation-buttons button svg{fill:#555;vertical-align:top;height:20px;margin-top:1px}.vitessce-container.vitessce-theme-dark .sets-manager .set-operation-buttons button:hover,.vitessce-container.vitessce-theme-dark .sets-manager .set-operation-buttons button:hover path{color:#2f2f2f;fill:#2f2f2f}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree{position:relative;top:0;left:0;width:100%;height:auto;display:block;padding-right:17px;box-sizing:content-box}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .plus-button{border:0;background-color:transparent;color:#e0e0e0;padding:0;font-size:18px;margin-bottom:2rem}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree{padding-left:0;margin:0;border:1px solid transparent}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .node-menu-icon{fill:gray;cursor:pointer;height:14px;position:relative;vertical-align:top;width:32px;top:5.5px}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .node-menu-icon:hover{fill:#9a9a9a}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .node-size-label{font-size:12px;color:#adadad}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .level-buttons-container{height:20px;width:100%;position:relative;padding-left:4px;left:0}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .level-buttons-container .level-buttons input.level-radio-button{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:12px;height:12px;padding:5px;background-clip:content-box;border:2px solid #ededed;background-color:#ededed;border-radius:50%;position:relative;top:3px;left:0px;float:left;margin-right:10px}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .level-buttons-container .level-buttons input.level-radio-button:checked{background-clip:unset}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .level-0-treenode>.rc-tree-switcher i svg path{fill:#e0e0e0}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree-focused{border-color:cyan}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode{margin:0;padding:0;line-height:24px;white-space:nowrap;list-style:none;outline:0}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .title-button,.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .title-button-with-input{padding:0;margin:0}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .title-button{height:24px;line-height:24px;border:1px solid transparent;color:#e0e0e0;background:transparent;background-color:transparent;vertical-align:top;font-size:14px}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .title-button-with-input{display:block;height:26px;box-sizing:border-box}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .title-button-with-input .title-input{font-size:14px;height:24px;line-height:24px;width:calc(100% - 60px);margin-right:10px;background-color:#d3d3d3;color:#000;border-radius:4px;outline:none;padding:4px 0px 4px 4px;border:1px solid #d3d3d3}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .title-button-with-input .title-input:focus{border:1px solid #9bb7d6}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .title-button-with-input .title-save-button{background-color:#555;border:1px solid #555;color:#d3d3d3;border-radius:3px;width:50px;height:24px;line-height:20px;font-size:13px;vertical-align:top;margin:0;padding:0}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .title-button-with-input .title-save-button:hover{background-color:#626262;border:1px solid #626262}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .draggable{color:#333;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;-khtml-user-drag:element;-webkit-user-drag:element;border:2px transparent solid}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode.drag-over>.draggable{color:white;background-color:#316ac5;border:2px #316ac5 solid;opacity:0.8}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode.drag-over-gap-top>.draggable{border-top:2px blue solid}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode.drag-over-gap-bottom>.draggable{border-bottom:2px blue solid}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode.filter-node>.rc-tree-node-content-wrapper{color:#a60000 !important;font-weight:bold !important}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode ul{margin:0;padding-left:35px}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper{width:calc(100% - 20px);display:inline-block;margin:0;padding:0;text-decoration:none;vertical-align:top;cursor:pointer;position:relative}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper>span{position:relative;width:100%;display:inline-block}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper>span .title-button{position:relative;max-width:calc(100% - 45px);overflow:hidden;text-overflow:ellipsis}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper>span .node-menu-icon{position:relative;left:0}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-switcher,.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-checkbox{display:inline-block;margin-top:4px;margin-right:6px;vertical-align:middle;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;border:0 none;outline:none;cursor:pointer}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-switcher svg{width:15px;height:15px}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-switcher.rc-tree-switcher-noop{cursor:auto}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-switcher.rc-tree-switcher_close{transform:rotate(-90deg)}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-checkbox{width:13px;height:13px;margin:0 3px;border:2px solid gray;border-radius:3px;position:relative;left:0;margin-right:10px}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-checkbox-checked{background-color:gray}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-checkbox-indeterminate{background-position:-14px -28px}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-checkbox-disabled{background-position:0 -56px}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-checkbox.rc-tree-checkbox-checked.rc-tree-checkbox-disabled{background-position:-14px -56px}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-checkbox.rc-tree-checkbox-indeterminate.rc-tree-checkbox-disabled{position:relative;background:#ccc;border-radius:3px}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-checkbox.rc-tree-checkbox-indeterminate.rc-tree-checkbox-disabled::after{position:absolute;top:5px;left:3px;width:5px;height:0;border:2px solid #fff;border-top:0;border-left:0;transform:scale(1);content:' '}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree:not(.rc-tree-show-line) .rc-tree-treenode .rc-tree-switcher-noop{background:none}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child)>.rc-tree-switcher-noop{background-position:-56px -18px}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree.rc-tree-show-line .rc-tree-treenode:last-child>.rc-tree-switcher-noop{background-position:-56px -36px}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree-child-tree{display:none}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree-child-tree-open{display:block}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree-treenode-disabled>span:not(.rc-tree-switcher),.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree-treenode-disabled>a,.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree-treenode-disabled>a span{color:#767676;cursor:not-allowed}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree-treenode-active{background:rgba(0,0,0,0.1)}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree-node-selected{background-color:#ffe6b0;border:1px #ffb951 solid;opacity:0.8}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree-icon__open{margin-right:2px;vertical-align:top;background-position:-110px -16px}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree-icon__close{margin-right:2px;vertical-align:top;background-position:-110px 0}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree-icon__docu{margin-right:2px;vertical-align:top;background-position:-110px -32px}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree-icon__customize{margin-right:2px;vertical-align:top}.vitessce-container.vitessce-theme-dark .sets-manager .sets-manager-tree .rc-tree-indent-unit{display:inline-block;padding-left:18px}.vitessce-container.vitessce-theme-dark .vitessce-tooltip .ant-tooltip-content .ant-tooltip-inner{font-size:12px;background-color:rgba(0,0,0,0.95)}.vitessce-container.vitessce-theme-dark .selectable-table{flex:1 1 auto;outline:none}.vitessce-container.vitessce-theme-dark .selectable-table .table-row{display:flex;flex-direction:row;border-bottom:1px solid #444}.vitessce-container.vitessce-theme-dark .selectable-table .table-item{cursor:pointer}.vitessce-container.vitessce-theme-dark .selectable-table .table-item:not(.row-checked):hover{background-color:#2b2b2b}.vitessce-container.vitessce-theme-dark .selectable-table .table-item.row-checked{background-color:#444}.vitessce-container.vitessce-theme-dark .selectable-table .table-item .hidden-input-column{display:none}.vitessce-container.vitessce-theme-dark .selectable-table .table-item .table-cell{padding:0 4px}.vitessce-container.vitessce-theme-dark .selectable-table .table-item .input-container{width:1em}.vitessce-container.vitessce-theme-dark .selectable-table .table-item .input-container label{display:block;margin:0;cursor:pointer}.vitessce-container.vitessce-theme-dark .selectable-table .table-item .input-container input{cursor:pointer}.vitessce-container.vitessce-theme-dark .selectable-table .table-item .input-container input.radio,.vitessce-container.vitessce-theme-dark .selectable-table .table-item .input-container input.checkbox{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-block;width:1em;height:1em;margin:0.3em 0.5em 0.0em 0.5em;padding:6px !important;background-clip:content-box;border:2px solid #d3d3d3;background-color:#d3d3d3}.vitessce-container.vitessce-theme-dark .selectable-table .table-item .input-container input.radio:checked,.vitessce-container.vitessce-theme-dark .selectable-table .table-item .input-container input.checkbox:checked{background-clip:unset}.vitessce-container.vitessce-theme-dark .selectable-table .table-item .input-container input.radio{border-radius:50%}.vitessce-container.vitessce-theme-dark .selectable-table .table-item .input-container input.checkbox{border-radius:2px}.vitessce-container.vitessce-theme-dark .higlass-title-wrapper{height:calc(100% - 20px)}.vitessce-container.vitessce-theme-dark .higlass-title-wrapper .card-body{width:inherit;height:inherit;padding:5px;background-color:#000}.vitessce-container.vitessce-theme-dark .higlass-title-wrapper .card-body .higlass-lazy-wrapper{width:inherit;height:inherit}.vitessce-container.vitessce-theme-dark .higlass-title-wrapper .card-body .higlass-wrapper-parent{display:block;position:relative;box-sizing:border-box;font-size:12px;color:#333;overflow:hidden}.vitessce-container.vitessce-theme-dark .higlass-title-wrapper .card-body .higlass-wrapper-parent .higlass-wrapper{width:inherit;height:inherit;position:relative;display:block;text-align:left;box-sizing:border-box}.vitessce-container.vitessce-theme-dark .higlass-title-wrapper .card-body .higlass-wrapper-parent .higlass-wrapper .higlass{width:100%;height:100%}.vitessce-container.vitessce-theme-dark .higlass-title-wrapper .card-body .higlass-wrapper-parent .higlass-wrapper .higlass .react-grid-layout{background-color:transparent !important}.vitessce-container.vitessce-theme-dark .higlass-title-wrapper .card-body .higlass-wrapper-parent .higlass-wrapper .higlass nav{display:flex}.vitessce-container.vitessce-theme-dark .higlass-title-wrapper .card-body .higlass-wrapper-parent .higlass-wrapper .higlass input{font-size:12px}.vitessce-container.vitessce-theme-dark .higlass-title-wrapper .card-body .higlass-wrapper-parent .higlass-wrapper .higlass .btn{color:#999;font-size:12px}.vitessce-container.vitessce-theme-dark .vega-container{display:flex;flex:1 1 auto;overflow:hidden}.vitessce-container.vitessce-theme-dark .heatmap{width:100%;left:0;position:absolute;padding-right:inherit;padding-left:inherit}.vitessce-container.vitessce-theme-dark .heatmap-container{position:absolute;top:1.25rem;left:1.25rem;width:calc(100% - 2.5rem);height:calc(100% - 2.5rem)}.vitessce-container.vitessce-theme-dark .search-bar{margin-bottom:.25rem;border:0;padding:2px;border-radius:2px}.vitessce-container.vitessce-theme-light.welcome-container{overflow:visible}.vitessce-container.vitessce-theme-light.welcome-container .react-grid-layout,.vitessce-container.vitessce-theme-light.welcome-container .warning-layout{position:relative}.vitessce-container.vitessce-theme-light .react-grid-layout,.vitessce-container.vitessce-theme-light .warning-layout{background-color:#fff;height:auto;position:absolute;width:100%}.vitessce-container.vitessce-theme-light .warning-layout{height:100vh}.vitessce-container.vitessce-theme-light .warning-layout .card{margin-left:0.5rem}.vitessce-container.vitessce-theme-light .loading-indicator-backdrop{position:absolute;top:0;left:0;z-index:1040;width:100%;height:100%;border-radius:0.25rem;background-color:rgba(0,0,0,0.5)}.vitessce-container.vitessce-theme-light .loading-indicator-backdrop .loading-indicator-container{display:grid;place-items:center;position:absolute;width:100%;height:100%}.vitessce-container.vitessce-theme-light .react-grid-item{flex-direction:column !important;display:flex !important;padding-right:10px}.vitessce-container.vitessce-theme-light .d-flex{flex-shrink:0}.vitessce-container.vitessce-theme-light .title{color:#333;overflow-x:hidden}.vitessce-container.vitessce-theme-light .card{border:1px solid rgba(241,241,241,0.125)}.vitessce-container.vitessce-theme-light .bg-black{background-color:#000;color:#fff}.vitessce-container.vitessce-theme-light .bg-black a{color:#fff}.vitessce-container.vitessce-theme-light .bg-primary{background-color:#F1F1F1;color:#333}.vitessce-container.vitessce-theme-light .bg-primary a{color:#0074D9}.vitessce-container.vitessce-theme-light .bg-secondary{background-color:#F1F1F1;color:#222}.vitessce-container.vitessce-theme-light .scroll{overflow-y:auto}.vitessce-container.vitessce-theme-light .details{font-size:80%;opacity:0.8}.vitessce-container.vitessce-theme-light .description p,.vitessce-container.vitessce-theme-light .description details,.vitessce-container.vitessce-theme-light .description table{font-size:80%;opacity:0.8}.vitessce-container.vitessce-theme-light .description details{margin-bottom:6px}.vitessce-container.vitessce-theme-light .description summary{border-bottom:1px solid #fff;cursor:pointer}.vitessce-container.vitessce-theme-light .description .metadata-container{padding-left:14px}.vitessce-container.vitessce-theme-light .description .metadata-container table{width:100%}.vitessce-container.vitessce-theme-light .description .metadata-container table td,.vitessce-container.vitessce-theme-light .description .metadata-container table th{outline:none;padding:2px 2px;max-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:50%}.vitessce-container.vitessce-theme-light .description .metadata-container table tr:nth-child(even){background-color:#fefefe}.vitessce-container.vitessce-theme-light .coll-full,.vitessce-container.vitessce-theme-light .welcome-col-left,.vitessce-container.vitessce-theme-light .welcome-col-right{position:relative;width:100%;padding-right:15px;padding-left:15px}.vitessce-container.vitessce-theme-light .col-full{flex:0 0 100%;max-width:100%}.vitessce-container.vitessce-theme-light .welcome-col-left{flex:0 0 50%;max-width:50%}.vitessce-container.vitessce-theme-light .welcome-col-left .list-group-item{background-color:#fff}.vitessce-container.vitessce-theme-light .welcome-col-left .input-group input{background-color:#fff}.vitessce-container.vitessce-theme-light .welcome-col-left a{color:#ffffff}.vitessce-container.vitessce-theme-light .welcome-col-right{flex:0 0 50%;max-width:50%}.vitessce-container.vitessce-theme-light .welcome-col-right .info-paragraph{margin-bottom:0 !important}.vitessce-container.vitessce-theme-light .welcome-col-right .info-section-text{margin-top:0.5rem}.vitessce-container.vitessce-theme-light .welcome-col-right a{color:#ffffff}.vitessce-container.vitessce-theme-light .btn.icon{padding:0;height:2em;width:2em;background-color:white}.vitessce-container.vitessce-theme-light .btn.icon>svg{vertical-align:middle}.vitessce-container.vitessce-theme-light .roll-up{height:2em;overflow:hidden;background-color:white}.vitessce-container.vitessce-theme-light .roll-up:hover{-webkit-animation-name:roll-up;animation-name:roll-up;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@keyframes roll-up{0%{height:2em}100%{height:100%}}.vitessce-container.vitessce-theme-light .tool{position:absolute;display:inline;z-index:1000;opacity:.65;color:black}.vitessce-container.vitessce-theme-light .tool:hover{opacity:.90}.vitessce-container.vitessce-theme-light .radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-block;width:1em;height:1em;padding:6px !important;background-clip:content-box;border:2px solid lightgrey;background-color:lightgrey;border-radius:50%}.vitessce-container.vitessce-theme-light .radio:checked{background-clip:unset}.vitessce-container.vitessce-theme-light .layer-controller-container>div:first-child{margin-top:0 !important}.vitessce-container.vitessce-theme-light .channel-container{width:100%;display:flex;position:relative}.vitessce-container.vitessce-theme-light .channel-set-color{display:flex;position:relative;top:5px;width:16px;height:16px;margin-right:24px;cursor:pointer;outline:currentColor none medium;border-radius:3px;box-shadow:rgba(0,0,0,0.15) 0px 0px 0px 1px inset}.vitessce-container.vitessce-theme-light .channel-checked{display:flex;position:relative;margin-right:10px}.vitessce-container.vitessce-theme-light .add-image-layer{color:#262626;border:1px dashed #262626}.vitessce-container.vitessce-theme-light pre{color:#333}.vitessce-container.vitessce-theme-light .cell-tooltip,.vitessce-container.vitessce-theme-light .cell-emphasis-crosshair{z-index:50;position:absolute;pointer-events:none;box-sizing:border-box}.vitessce-container.vitessce-theme-light .cell-emphasis-crosshair{background-color:#222}.vitessce-container.vitessce-theme-light .cell-tooltip{height:auto;width:auto;opacity:0;padding:0.5rem;border-radius:0.25rem;border:1px solid gray;-webkit-animation-name:cell-tooltip;animation-name:cell-tooltip;-webkit-animation-duration:0.5s;animation-duration:0.5s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.vitessce-container.vitessce-theme-light .cell-tooltip table>tbody>tr>th,.vitessce-container.vitessce-theme-light .cell-tooltip table>tbody>tr>td{font-size:80%;opacity:0.8;outline:0;padding:0 2px}.vitessce-container.vitessce-theme-light .cell-tooltip table{border-collapse:collapse}@keyframes cell-tooltip{from{opacity:0}to{opacity:0.9}}.vitessce-container.vitessce-theme-light .help-tooltip.rc-tooltip{z-index:1060;display:block;max-width:250px;visibility:visible;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,0.65);font-size:14px;list-style:none;position:absolute}.vitessce-container.vitessce-theme-light .help-tooltip.rc-tooltip-hidden{display:none}.vitessce-container.vitessce-theme-light .help-tooltip.rc-tooltip .rc-tooltip-inner{border-radius:2px;box-shadow:0 3px 6px -4px rgba(100,100,100,0.12),0 6px 16px 0 rgba(100,100,100,0.08),0 9px 28px 8px rgba(100,100,100,0.05)}.vitessce-container.vitessce-theme-light .help-tooltip.rc-tooltip-placement-top{padding-top:8px}.vitessce-container.vitessce-theme-light .help-tooltip.rc-tooltip-placement-right{padding-left:8px}.vitessce-container.vitessce-theme-light .help-tooltip.rc-tooltip-placement-bottom{padding-top:8px}.vitessce-container.vitessce-theme-light .help-tooltip.rc-tooltip-placement-left{padding-right:8px}.vitessce-container.vitessce-theme-light .help-tooltip.rc-tooltip .rc-tooltip-inner{font-size:10px;min-width:30px;padding:6px 8px;color:#fff;text-align:left;text-decoration:none;word-wrap:break-word;background-color:rgba(0,0,0,0.9)}.vitessce-container.vitessce-theme-light .help-tooltip.rc-tooltip .rc-tooltip-arrow{display:none}.vitessce-container.vitessce-theme-light .popover.rc-tooltip{top:0;left:0;z-index:1030;font-weight:normal;white-space:normal;text-align:left;cursor:auto;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,0.65);font-size:14px;list-style:none;position:absolute}.vitessce-container.vitessce-theme-light .popover.rc-tooltip::after{position:absolute;background:rgba(255,255,255,0.01);content:''}.vitessce-container.vitessce-theme-light .popover.rc-tooltip-hidden{display:none}.vitessce-container.vitessce-theme-light .popover.rc-tooltip .rc-tooltip-inner{border-radius:2px;box-shadow:0 3px 6px -4px rgba(100,100,100,0.12),0 6px 16px 0 rgba(100,100,100,0.08),0 9px 28px 8px rgba(100,100,100,0.05)}.vitessce-container.vitessce-theme-light .popover.rc-tooltip-placement-top{padding-bottom:10px}.vitessce-container.vitessce-theme-light .popover.rc-tooltip-placement-right{padding-left:10px}.vitessce-container.vitessce-theme-light .popover.rc-tooltip-placement-bottom{padding-top:10px}.vitessce-container.vitessce-theme-light .popover.rc-tooltip-placement-left{padding-right:10px}.vitessce-container.vitessce-theme-light .popover.rc-tooltip .rc-tooltip-content{padding:0}.vitessce-container.vitessce-theme-light .popover.rc-tooltip .rc-tooltip-inner{box-sizing:border-box;background-color:#fff;background-clip:padding-box}.vitessce-container.vitessce-theme-light .popover.rc-tooltip .rc-tooltip-inner .popover-menu-list{list-style-type:none;padding:0;margin-bottom:0}.vitessce-container.vitessce-theme-light .popover.rc-tooltip .rc-tooltip-inner .popover-menu-list dl,.vitessce-container.vitessce-theme-light .popover.rc-tooltip .rc-tooltip-inner .popover-menu-list ol,.vitessce-container.vitessce-theme-light .popover.rc-tooltip .rc-tooltip-inner .popover-menu-list ul{margin-top:0;margin-bottom:1rem}.vitessce-container.vitessce-theme-light .popover.rc-tooltip .rc-tooltip-inner .popover-menu-list li button{border:0;padding:4px 16px;cursor:pointer;width:100%;background-color:transparent;border-radius:2px}.vitessce-container.vitessce-theme-light .popover.rc-tooltip .rc-tooltip-inner .popover-menu-list li button span.small{font-size:11px}.vitessce-container.vitessce-theme-light .popover.rc-tooltip .rc-tooltip-inner .popover-menu-list li button:hover{background-color:#ededed}.vitessce-container.vitessce-theme-light .popover.rc-tooltip .rc-tooltip-inner .popover-menu-list li:not(:last-child){border-bottom:1px solid gray}.vitessce-container.vitessce-theme-light .popover.rc-tooltip .rc-tooltip-inner .popover-menu-list button{-webkit-appearance:button;text-transform:none;overflow:visible;margin:0;font-family:inherit;font-size:14px;line-height:inherit;border-radius:0}.vitessce-container.vitessce-theme-light .popover.rc-tooltip .rc-tooltip-inner .popover-menu-color+.popover-menu-list{border-top:1px solid gray}.vitessce-container.vitessce-theme-light .popover.rc-tooltip .popover-menu-color.twitter-picker{box-shadow:none !important;margin:0 auto}.vitessce-container.vitessce-theme-light .popover.rc-tooltip .popover-menu-color.twitter-picker>div:nth-child(3){padding:6px !important;transform:translate(2px, 0)}.vitessce-container.vitessce-theme-light .popover.rc-tooltip .popover-menu-color.twitter-picker>div>div:nth-of-type(1){font-size:12px;width:20px !important}.vitessce-container.vitessce-theme-light .popover.rc-tooltip .popover-menu-color.twitter-picker input{width:60px !important;font-size:12px}.vitessce-container.vitessce-theme-light .popover.rc-tooltip .popover-menu-color.twitter-picker>div>span>div{width:18px !important;height:18px !important}.vitessce-container.vitessce-theme-light .popover.rc-tooltip .rc-tooltip-inner-content{padding:12px 16px;color:rgba(0,0,0,0.65)}.vitessce-container.vitessce-theme-light .popover.rc-tooltip .rc-tooltip-arrow{position:absolute;display:block;width:8px;height:8px;background:transparent;border-style:solid;border-width:4px;transform:rotate(45deg)}.vitessce-container.vitessce-theme-light .popover.rc-tooltip.rc-tooltip-placement-top>.rc-tooltip-content>.rc-tooltip-arrow{bottom:6px;border-top-color:transparent;border-right-color:#fff;border-bottom-color:#fff;border-left-color:transparent;box-shadow:3px 3px 7px rgba(0,0,0,0.07);left:50%;transform:translateX(-50%) rotate(45deg)}.vitessce-container.vitessce-theme-light .popover.rc-tooltip.rc-tooltip-placement-right>.rc-tooltip-content>.rc-tooltip-arrow{left:6px;border-top-color:transparent;border-right-color:transparent;border-bottom-color:#fff;border-left-color:#fff;box-shadow:-3px 3px 7px rgba(0,0,0,0.07);top:50%;transform:translateY(-50%) rotate(45deg)}.vitessce-container.vitessce-theme-light .popover.rc-tooltip.rc-tooltip-placement-bottom>.rc-tooltip-content>.rc-tooltip-arrow{top:6px;border-top-color:#fff;border-right-color:transparent;border-bottom-color:transparent;border-left-color:#fff;box-shadow:-2px -2px 5px rgba(0,0,0,0.06);left:50%;transform:translateX(-50%) rotate(45deg)}.vitessce-container.vitessce-theme-light .popover.rc-tooltip.rc-tooltip-placement-left>.rc-tooltip-content>.rc-tooltip-arrow{right:6px;border-top-color:#fff;border-right-color:#fff;border-bottom-color:transparent;border-left-color:transparent;box-shadow:3px -3px 7px rgba(0,0,0,0.07);top:50%;transform:translateY(-50%) rotate(45deg)}.vitessce-container.vitessce-theme-light .sets-manager{position:relative;width:100%;display:block;height:auto}.vitessce-container.vitessce-theme-light .sets-manager .set-operation-buttons{background-color:#d3d3d3;border-radius:4px;padding:2px;display:inline-block;position:absolute;bottom:1.75rem;right:0.25rem;box-shadow:-2px -2px 5px rgba(0,0,0,0.06)}.vitessce-container.vitessce-theme-light .sets-manager .set-operation-buttons button{border:0;background-color:transparent;color:#626262}.vitessce-container.vitessce-theme-light .sets-manager .set-operation-buttons button[disabled]{pointer-events:none}.vitessce-container.vitessce-theme-light .sets-manager .set-operation-buttons button[disabled] svg{fill:silver}.vitessce-container.vitessce-theme-light .sets-manager .set-operation-buttons button svg{fill:#555;vertical-align:top;height:20px;margin-top:1px}.vitessce-container.vitessce-theme-light .sets-manager .set-operation-buttons button:hover,.vitessce-container.vitessce-theme-light .sets-manager .set-operation-buttons button:hover path{color:#2f2f2f;fill:#2f2f2f}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree{position:relative;top:0;left:0;width:100%;height:auto;display:block;padding-right:17px;box-sizing:content-box}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .plus-button{border:0;background-color:transparent;color:#404040;padding:0;font-size:18px;margin-bottom:2rem}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree{padding-left:0;margin:0;border:1px solid transparent}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .node-menu-icon{fill:gray;cursor:pointer;height:14px;position:relative;vertical-align:top;width:32px;top:5.5px}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .node-menu-icon:hover{fill:#9a9a9a}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .node-size-label{font-size:12px;color:#0d0d0d}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .level-buttons-container{height:20px;width:100%;position:relative;padding-left:4px;left:0}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .level-buttons-container .level-buttons input.level-radio-button{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:12px;height:12px;padding:5px;background-clip:content-box;border:2px solid #4d4d4d;background-color:#4d4d4d;border-radius:50%;position:relative;top:3px;left:0px;float:left;margin-right:10px}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .level-buttons-container .level-buttons input.level-radio-button:checked{background-clip:unset}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .level-0-treenode>.rc-tree-switcher i svg path{fill:#404040}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree-focused{border-color:cyan}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode{margin:0;padding:0;line-height:24px;white-space:nowrap;list-style:none;outline:0}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .title-button,.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .title-button-with-input{padding:0;margin:0}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .title-button{height:24px;line-height:24px;border:1px solid transparent;color:#404040;background:transparent;background-color:transparent;vertical-align:top;font-size:14px}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .title-button-with-input{display:block;height:26px;box-sizing:border-box}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .title-button-with-input .title-input{font-size:14px;height:24px;line-height:24px;width:calc(100% - 60px);margin-right:10px;background-color:#d3d3d3;color:#000;border-radius:4px;outline:none;padding:4px 0px 4px 4px;border:1px solid #d3d3d3}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .title-button-with-input .title-input:focus{border:1px solid #0074D9}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .title-button-with-input .title-save-button{background-color:#555;border:1px solid #555;color:#d3d3d3;border-radius:3px;width:50px;height:24px;line-height:20px;font-size:13px;vertical-align:top;margin:0;padding:0}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .title-button-with-input .title-save-button:hover{background-color:#626262;border:1px solid #626262}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .draggable{color:#333;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;-khtml-user-drag:element;-webkit-user-drag:element;border:2px transparent solid}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode.drag-over>.draggable{color:white;background-color:#316ac5;border:2px #316ac5 solid;opacity:0.8}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode.drag-over-gap-top>.draggable{border-top:2px blue solid}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode.drag-over-gap-bottom>.draggable{border-bottom:2px blue solid}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode.filter-node>.rc-tree-node-content-wrapper{color:#a60000 !important;font-weight:bold !important}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode ul{margin:0;padding-left:35px}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper{width:calc(100% - 20px);display:inline-block;margin:0;padding:0;text-decoration:none;vertical-align:top;cursor:pointer;position:relative}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper>span{position:relative;width:100%;display:inline-block}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper>span .title-button{position:relative;max-width:calc(100% - 45px);overflow:hidden;text-overflow:ellipsis}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper>span .node-menu-icon{position:relative;left:0}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-switcher,.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-checkbox{display:inline-block;margin-top:4px;margin-right:6px;vertical-align:middle;background-color:transparent;background-repeat:no-repeat;background-attachment:scroll;border:0 none;outline:none;cursor:pointer}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-switcher svg{width:15px;height:15px}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-switcher.rc-tree-switcher-noop{cursor:auto}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-switcher.rc-tree-switcher_close{transform:rotate(-90deg)}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-checkbox{width:13px;height:13px;margin:0 3px;border:2px solid gray;border-radius:3px;position:relative;left:0;margin-right:10px}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-checkbox-checked{background-color:gray}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-checkbox-indeterminate{background-position:-14px -28px}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-checkbox-disabled{background-position:0 -56px}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-checkbox.rc-tree-checkbox-checked.rc-tree-checkbox-disabled{background-position:-14px -56px}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-checkbox.rc-tree-checkbox-indeterminate.rc-tree-checkbox-disabled{position:relative;background:#ccc;border-radius:3px}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree .rc-tree-treenode span.rc-tree-checkbox.rc-tree-checkbox-indeterminate.rc-tree-checkbox-disabled::after{position:absolute;top:5px;left:3px;width:5px;height:0;border:2px solid #fff;border-top:0;border-left:0;transform:scale(1);content:' '}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree:not(.rc-tree-show-line) .rc-tree-treenode .rc-tree-switcher-noop{background:none}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child)>.rc-tree-switcher-noop{background-position:-56px -18px}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree.rc-tree-show-line .rc-tree-treenode:last-child>.rc-tree-switcher-noop{background-position:-56px -36px}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree-child-tree{display:none}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree-child-tree-open{display:block}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree-treenode-disabled>span:not(.rc-tree-switcher),.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree-treenode-disabled>a,.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree-treenode-disabled>a span{color:#767676;cursor:not-allowed}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree-treenode-active{background:rgba(0,0,0,0.1)}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree-node-selected{background-color:#ffe6b0;border:1px #ffb951 solid;opacity:0.8}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree-icon__open{margin-right:2px;vertical-align:top;background-position:-110px -16px}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree-icon__close{margin-right:2px;vertical-align:top;background-position:-110px 0}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree-icon__docu{margin-right:2px;vertical-align:top;background-position:-110px -32px}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree-icon__customize{margin-right:2px;vertical-align:top}.vitessce-container.vitessce-theme-light .sets-manager .sets-manager-tree .rc-tree-indent-unit{display:inline-block;padding-left:18px}.vitessce-container.vitessce-theme-light .vitessce-tooltip .ant-tooltip-content .ant-tooltip-inner{font-size:12px;background-color:rgba(0,0,0,0.95)}.vitessce-container.vitessce-theme-light .selectable-table{flex:1 1 auto;outline:none}.vitessce-container.vitessce-theme-light .selectable-table .table-row{display:flex;flex-direction:row;border-bottom:1px solid silver}.vitessce-container.vitessce-theme-light .selectable-table .table-item{cursor:pointer}.vitessce-container.vitessce-theme-light .selectable-table .table-item:not(.row-checked):hover{background-color:#dadada}.vitessce-container.vitessce-theme-light .selectable-table .table-item.row-checked{background-color:silver}.vitessce-container.vitessce-theme-light .selectable-table .table-item .hidden-input-column{display:none}.vitessce-container.vitessce-theme-light .selectable-table .table-item .table-cell{padding:0 4px}.vitessce-container.vitessce-theme-light .selectable-table .table-item .input-container{width:1em}.vitessce-container.vitessce-theme-light .selectable-table .table-item .input-container label{display:block;margin:0;cursor:pointer}.vitessce-container.vitessce-theme-light .selectable-table .table-item .input-container input{cursor:pointer}.vitessce-container.vitessce-theme-light .selectable-table .table-item .input-container input.radio,.vitessce-container.vitessce-theme-light .selectable-table .table-item .input-container input.checkbox{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:inline-block;width:1em;height:1em;margin:0.3em 0.5em 0.0em 0.5em;padding:6px !important;background-clip:content-box;border:2px solid #d3d3d3;background-color:#d3d3d3}.vitessce-container.vitessce-theme-light .selectable-table .table-item .input-container input.radio:checked,.vitessce-container.vitessce-theme-light .selectable-table .table-item .input-container input.checkbox:checked{background-clip:unset}.vitessce-container.vitessce-theme-light .selectable-table .table-item .input-container input.radio{border-radius:50%}.vitessce-container.vitessce-theme-light .selectable-table .table-item .input-container input.checkbox{border-radius:2px}.vitessce-container.vitessce-theme-light .higlass-title-wrapper{height:calc(100% - 20px)}.vitessce-container.vitessce-theme-light .higlass-title-wrapper .card-body{width:inherit;height:inherit;padding:5px;background-color:#F1F1F1}.vitessce-container.vitessce-theme-light .higlass-title-wrapper .card-body .higlass-lazy-wrapper{width:inherit;height:inherit}.vitessce-container.vitessce-theme-light .higlass-title-wrapper .card-body .higlass-wrapper-parent{display:block;position:relative;box-sizing:border-box;font-size:12px;color:#333;overflow:hidden}.vitessce-container.vitessce-theme-light .higlass-title-wrapper .card-body .higlass-wrapper-parent .higlass-wrapper{width:inherit;height:inherit;position:relative;display:block;text-align:left;box-sizing:border-box}.vitessce-container.vitessce-theme-light .higlass-title-wrapper .card-body .higlass-wrapper-parent .higlass-wrapper .higlass{width:100%;height:100%}.vitessce-container.vitessce-theme-light .higlass-title-wrapper .card-body .higlass-wrapper-parent .higlass-wrapper .higlass .react-grid-layout{background-color:transparent !important}.vitessce-container.vitessce-theme-light .higlass-title-wrapper .card-body .higlass-wrapper-parent .higlass-wrapper .higlass nav{display:flex}.vitessce-container.vitessce-theme-light .higlass-title-wrapper .card-body .higlass-wrapper-parent .higlass-wrapper .higlass input{font-size:12px}.vitessce-container.vitessce-theme-light .higlass-title-wrapper .card-body .higlass-wrapper-parent .higlass-wrapper .higlass .btn{color:#999;font-size:12px}.vitessce-container.vitessce-theme-light .vega-container{display:flex;flex:1 1 auto;overflow:hidden}.vitessce-container.vitessce-theme-light .heatmap{width:100%;left:0;position:absolute;padding-right:inherit;padding-left:inherit}.vitessce-container.vitessce-theme-light .heatmap-container{position:absolute;top:1.25rem;left:1.25rem;width:calc(100% - 2.5rem);height:calc(100% - 2.5rem)}.vitessce-container.vitessce-theme-light .search-bar{margin-bottom:.25rem;border:0;padding:2px;border-radius:2px}\n\n.react-grid-layout {\n  position: relative;\n  transition: height 200ms ease;\n}\n.react-grid-item {\n  transition: all 200ms ease;\n  transition-property: left, top;\n}\n.react-grid-item.cssTransforms {\n  transition-property: transform;\n}\n.react-grid-item.resizing {\n  z-index: 1;\n  will-change: width, height;\n}\n\n.react-grid-item.react-draggable-dragging {\n  transition: none;\n  z-index: 3;\n  will-change: transform;\n}\n\n.react-grid-item.dropping {\n  visibility: hidden;\n}\n\n.react-grid-item.react-grid-placeholder {\n  background: red;\n  opacity: 0.2;\n  transition-duration: 100ms;\n  z-index: 2;\n  -webkit-user-select: none;\n  -ms-user-select: none;\n  -o-user-select: none;\n  user-select: none;\n}\n\n.react-grid-item > .react-resizable-handle {\n  position: absolute;\n  width: 20px;\n  height: 20px;\n  bottom: 0;\n  right: 0;\n  cursor: se-resize;\n}\n\n.react-grid-item > .react-resizable-handle::after {\n  content: \"\";\n  position: absolute;\n  right: 3px;\n  bottom: 3px;\n  width: 5px;\n  height: 5px;\n  border-right: 2px solid rgba(0, 0, 0, 0.4);\n  border-bottom: 2px solid rgba(0, 0, 0, 0.4);\n}\n\n.react-resizable-hide > .react-resizable-handle {\n  display: none;\n}\n\n.react-resizable {\n  position: relative;\n}\n.react-resizable-handle {\n  position: absolute;\n  width: 20px;\n  height: 20px;\n  background-repeat: no-repeat;\n  background-origin: content-box;\n  box-sizing: border-box;\n  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+');\n  background-position: bottom right;\n  padding: 0 3px 3px 0;\n}\n.react-resizable-handle-sw {\n  bottom: 0;\n  left: 0;\n  cursor: sw-resize;\n  transform: rotate(90deg);\n}\n.react-resizable-handle-se {\n  bottom: 0;\n  right: 0;\n  cursor: se-resize;\n}\n.react-resizable-handle-nw {\n  top: 0;\n  left: 0;\n  cursor: nw-resize;\n  transform: rotate(180deg);\n}\n.react-resizable-handle-ne {\n  top: 0;\n  right: 0;\n  cursor: ne-resize;\n  transform: rotate(270deg);\n}\n.react-resizable-handle-w,\n.react-resizable-handle-e {\n  top: 50%;\n  margin-top: -10px;\n  cursor: ew-resize;\n}\n.react-resizable-handle-w {\n  left: 0;\n  transform: rotate(135deg);\n}\n.react-resizable-handle-e {\n  right: 0;\n  transform: rotate(315deg);\n}\n.react-resizable-handle-n,\n.react-resizable-handle-s {\n  left: 50%;\n  margin-left: -10px;\n  cursor: ns-resize;\n}\n.react-resizable-handle-n {\n  top: 0;\n  transform: rotate(225deg);\n}\n.react-resizable-handle-s {\n  bottom: 0;\n  transform: rotate(45deg);\n}", ""]);

// exports


/***/ }),

/***/ "./node_modules/css-loader/lib/css-base.js":
/*!*************************************************!*\
  !*** ./node_modules/css-loader/lib/css-base.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
// css base code, injected by the css-loader
module.exports = function(useSourceMap) {
	var list = [];

	// return the list of modules as css string
	list.toString = function toString() {
		return this.map(function (item) {
			var content = cssWithMappingToString(item, useSourceMap);
			if(item[2]) {
				return "@media " + item[2] + "{" + content + "}";
			} else {
				return content;
			}
		}).join("");
	};

	// import a list of modules into the list
	list.i = function(modules, mediaQuery) {
		if(typeof modules === "string")
			modules = [[null, modules, ""]];
		var alreadyImportedModules = {};
		for(var i = 0; i < this.length; i++) {
			var id = this[i][0];
			if(typeof id === "number")
				alreadyImportedModules[id] = true;
		}
		for(i = 0; i < modules.length; i++) {
			var item = modules[i];
			// skip already imported module
			// this implementation is not 100% perfect for weird media query combinations
			//  when a module is imported multiple times with different media queries.
			//  I hope this will never occur (Hey this way we have smaller bundles)
			if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
				if(mediaQuery && !item[2]) {
					item[2] = mediaQuery;
				} else if(mediaQuery) {
					item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
				}
				list.push(item);
			}
		}
	};
	return list;
};

function cssWithMappingToString(item, useSourceMap) {
	var content = item[1] || '';
	var cssMapping = item[3];
	if (!cssMapping) {
		return content;
	}

	if (useSourceMap && typeof btoa === 'function') {
		var sourceMapping = toComment(cssMapping);
		var sourceURLs = cssMapping.sources.map(function (source) {
			return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'
		});

		return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
	}

	return [content].join('\n');
}

// Adapted from convert-source-map (MIT)
function toComment(sourceMap) {
	// eslint-disable-next-line no-undef
	var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
	var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;

	return '/*# ' + data + ' */';
}


/***/ }),

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

var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");

/** Built-in value references. */
var Symbol = root.Symbol;

module.exports = Symbol;


/***/ }),

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

/**
 * A faster alternative to `Function#apply`, this function invokes `func`
 * with the `this` binding of `thisArg` and the arguments of `args`.
 *
 * @private
 * @param {Function} func The function to invoke.
 * @param {*} thisArg The `this` binding of `func`.
 * @param {Array} args The arguments to invoke `func` with.
 * @returns {*} Returns the result of `func`.
 */
function apply(func, thisArg, args) {
  switch (args.length) {
    case 0: return func.call(thisArg);
    case 1: return func.call(thisArg, args[0]);
    case 2: return func.call(thisArg, args[0], args[1]);
    case 3: return func.call(thisArg, args[0], args[1], args[2]);
  }
  return func.apply(thisArg, args);
}

module.exports = apply;


/***/ }),

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

var baseTimes = __webpack_require__(/*! ./_baseTimes */ "./node_modules/lodash/_baseTimes.js"),
    isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"),
    isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
    isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"),
    isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"),
    isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js");

/** Used for built-in method references. */
var objectProto = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/**
 * Creates an array of the enumerable property names of the array-like `value`.
 *
 * @private
 * @param {*} value The value to query.
 * @param {boolean} inherited Specify returning inherited property names.
 * @returns {Array} Returns the array of property names.
 */
function arrayLikeKeys(value, inherited) {
  var isArr = isArray(value),
      isArg = !isArr && isArguments(value),
      isBuff = !isArr && !isArg && isBuffer(value),
      isType = !isArr && !isArg && !isBuff && isTypedArray(value),
      skipIndexes = isArr || isArg || isBuff || isType,
      result = skipIndexes ? baseTimes(value.length, String) : [],
      length = result.length;

  for (var key in value) {
    if ((inherited || hasOwnProperty.call(value, key)) &&
        !(skipIndexes && (
           // Safari 9 has enumerable `arguments.length` in strict mode.
           key == 'length' ||
           // Node.js 0.10 has enumerable non-index properties on buffers.
           (isBuff && (key == 'offset' || key == 'parent')) ||
           // PhantomJS 2 has enumerable non-index properties on typed arrays.
           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
           // Skip index properties.
           isIndex(key, length)
        ))) {
      result.push(key);
    }
  }
  return result;
}

module.exports = arrayLikeKeys;


/***/ }),

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

var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"),
    eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js");

/** Used for built-in method references. */
var objectProto = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/**
 * Assigns `value` to `key` of `object` if the existing value is not equivalent
 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
 * for equality comparisons.
 *
 * @private
 * @param {Object} object The object to modify.
 * @param {string} key The key of the property to assign.
 * @param {*} value The value to assign.
 */
function assignValue(object, key, value) {
  var objValue = object[key];
  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
      (value === undefined && !(key in object))) {
    baseAssignValue(object, key, value);
  }
}

module.exports = assignValue;


/***/ }),

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

var defineProperty = __webpack_require__(/*! ./_defineProperty */ "./node_modules/lodash/_defineProperty.js");

/**
 * The base implementation of `assignValue` and `assignMergeValue` without
 * value checks.
 *
 * @private
 * @param {Object} object The object to modify.
 * @param {string} key The key of the property to assign.
 * @param {*} value The value to assign.
 */
function baseAssignValue(object, key, value) {
  if (key == '__proto__' && defineProperty) {
    defineProperty(object, key, {
      'configurable': true,
      'enumerable': true,
      'value': value,
      'writable': true
    });
  } else {
    object[key] = value;
  }
}

module.exports = baseAssignValue;


/***/ }),

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

var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
    getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/lodash/_getRawTag.js"),
    objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/lodash/_objectToString.js");

/** `Object#toString` result references. */
var nullTag = '[object Null]',
    undefinedTag = '[object Undefined]';

/** Built-in value references. */
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;

/**
 * The base implementation of `getTag` without fallbacks for buggy environments.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the `toStringTag`.
 */
function baseGetTag(value) {
  if (value == null) {
    return value === undefined ? undefinedTag : nullTag;
  }
  return (symToStringTag && symToStringTag in Object(value))
    ? getRawTag(value)
    : objectToString(value);
}

module.exports = baseGetTag;


/***/ }),

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

var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
    isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");

/** `Object#toString` result references. */
var argsTag = '[object Arguments]';

/**
 * The base implementation of `_.isArguments`.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 */
function baseIsArguments(value) {
  return isObjectLike(value) && baseGetTag(value) == argsTag;
}

module.exports = baseIsArguments;


/***/ }),

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

var isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"),
    isMasked = __webpack_require__(/*! ./_isMasked */ "./node_modules/lodash/_isMasked.js"),
    isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
    toSource = __webpack_require__(/*! ./_toSource */ "./node_modules/lodash/_toSource.js");

/**
 * Used to match `RegExp`
 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
 */
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;

/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;

/** Used for built-in method references. */
var funcProto = Function.prototype,
    objectProto = Object.prototype;

/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);

/**
 * The base implementation of `_.isNative` without bad shim checks.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a native function,
 *  else `false`.
 */
function baseIsNative(value) {
  if (!isObject(value) || isMasked(value)) {
    return false;
  }
  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  return pattern.test(toSource(value));
}

module.exports = baseIsNative;


/***/ }),

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

var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
    isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js"),
    isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");

/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
    arrayTag = '[object Array]',
    boolTag = '[object Boolean]',
    dateTag = '[object Date]',
    errorTag = '[object Error]',
    funcTag = '[object Function]',
    mapTag = '[object Map]',
    numberTag = '[object Number]',
    objectTag = '[object Object]',
    regexpTag = '[object RegExp]',
    setTag = '[object Set]',
    stringTag = '[object String]',
    weakMapTag = '[object WeakMap]';

var arrayBufferTag = '[object ArrayBuffer]',
    dataViewTag = '[object DataView]',
    float32Tag = '[object Float32Array]',
    float64Tag = '[object Float64Array]',
    int8Tag = '[object Int8Array]',
    int16Tag = '[object Int16Array]',
    int32Tag = '[object Int32Array]',
    uint8Tag = '[object Uint8Array]',
    uint8ClampedTag = '[object Uint8ClampedArray]',
    uint16Tag = '[object Uint16Array]',
    uint32Tag = '[object Uint32Array]';

/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;

/**
 * The base implementation of `_.isTypedArray` without Node.js optimizations.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 */
function baseIsTypedArray(value) {
  return isObjectLike(value) &&
    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}

module.exports = baseIsTypedArray;


/***/ }),

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

var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
    isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"),
    nativeKeysIn = __webpack_require__(/*! ./_nativeKeysIn */ "./node_modules/lodash/_nativeKeysIn.js");

/** Used for built-in method references. */
var objectProto = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/**
 * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 */
function baseKeysIn(object) {
  if (!isObject(object)) {
    return nativeKeysIn(object);
  }
  var isProto = isPrototype(object),
      result = [];

  for (var key in object) {
    if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
      result.push(key);
    }
  }
  return result;
}

module.exports = baseKeysIn;


/***/ }),

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

var identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"),
    overRest = __webpack_require__(/*! ./_overRest */ "./node_modules/lodash/_overRest.js"),
    setToString = __webpack_require__(/*! ./_setToString */ "./node_modules/lodash/_setToString.js");

/**
 * The base implementation of `_.rest` which doesn't validate or coerce arguments.
 *
 * @private
 * @param {Function} func The function to apply a rest parameter to.
 * @param {number} [start=func.length-1] The start position of the rest parameter.
 * @returns {Function} Returns the new function.
 */
function baseRest(func, start) {
  return setToString(overRest(func, start, identity), func + '');
}

module.exports = baseRest;


/***/ }),

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

var constant = __webpack_require__(/*! ./constant */ "./node_modules/lodash/constant.js"),
    defineProperty = __webpack_require__(/*! ./_defineProperty */ "./node_modules/lodash/_defineProperty.js"),
    identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js");

/**
 * The base implementation of `setToString` without support for hot loop shorting.
 *
 * @private
 * @param {Function} func The function to modify.
 * @param {Function} string The `toString` result.
 * @returns {Function} Returns `func`.
 */
var baseSetToString = !defineProperty ? identity : function(func, string) {
  return defineProperty(func, 'toString', {
    'configurable': true,
    'enumerable': false,
    'value': constant(string),
    'writable': true
  });
};

module.exports = baseSetToString;


/***/ }),

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

/**
 * The base implementation of `_.times` without support for iteratee shorthands
 * or max array length checks.
 *
 * @private
 * @param {number} n The number of times to invoke `iteratee`.
 * @param {Function} iteratee The function invoked per iteration.
 * @returns {Array} Returns the array of results.
 */
function baseTimes(n, iteratee) {
  var index = -1,
      result = Array(n);

  while (++index < n) {
    result[index] = iteratee(index);
  }
  return result;
}

module.exports = baseTimes;


/***/ }),

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

/**
 * The base implementation of `_.unary` without support for storing metadata.
 *
 * @private
 * @param {Function} func The function to cap arguments for.
 * @returns {Function} Returns the new capped function.
 */
function baseUnary(func) {
  return function(value) {
    return func(value);
  };
}

module.exports = baseUnary;


/***/ }),

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

var assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"),
    baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js");

/**
 * Copies properties of `source` to `object`.
 *
 * @private
 * @param {Object} source The object to copy properties from.
 * @param {Array} props The property identifiers to copy.
 * @param {Object} [object={}] The object to copy properties to.
 * @param {Function} [customizer] The function to customize copied values.
 * @returns {Object} Returns `object`.
 */
function copyObject(source, props, object, customizer) {
  var isNew = !object;
  object || (object = {});

  var index = -1,
      length = props.length;

  while (++index < length) {
    var key = props[index];

    var newValue = customizer
      ? customizer(object[key], source[key], key, object, source)
      : undefined;

    if (newValue === undefined) {
      newValue = source[key];
    }
    if (isNew) {
      baseAssignValue(object, key, newValue);
    } else {
      assignValue(object, key, newValue);
    }
  }
  return object;
}

module.exports = copyObject;


/***/ }),

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

var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");

/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];

module.exports = coreJsData;


/***/ }),

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

var baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"),
    isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js");

/**
 * Creates a function like `_.assign`.
 *
 * @private
 * @param {Function} assigner The function to assign values.
 * @returns {Function} Returns the new assigner function.
 */
function createAssigner(assigner) {
  return baseRest(function(object, sources) {
    var index = -1,
        length = sources.length,
        customizer = length > 1 ? sources[length - 1] : undefined,
        guard = length > 2 ? sources[2] : undefined;

    customizer = (assigner.length > 3 && typeof customizer == 'function')
      ? (length--, customizer)
      : undefined;

    if (guard && isIterateeCall(sources[0], sources[1], guard)) {
      customizer = length < 3 ? undefined : customizer;
      length = 1;
    }
    object = Object(object);
    while (++index < length) {
      var source = sources[index];
      if (source) {
        assigner(object, source, index, customizer);
      }
    }
    return object;
  });
}

module.exports = createAssigner;


/***/ }),

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

var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js");

var defineProperty = (function() {
  try {
    var func = getNative(Object, 'defineProperty');
    func({}, '', {});
    return func;
  } catch (e) {}
}());

module.exports = defineProperty;


/***/ }),

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

/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;

module.exports = freeGlobal;

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

/***/ }),

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

var baseIsNative = __webpack_require__(/*! ./_baseIsNative */ "./node_modules/lodash/_baseIsNative.js"),
    getValue = __webpack_require__(/*! ./_getValue */ "./node_modules/lodash/_getValue.js");

/**
 * Gets the native function at `key` of `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {string} key The key of the method to get.
 * @returns {*} Returns the function if it's native, else `undefined`.
 */
function getNative(object, key) {
  var value = getValue(object, key);
  return baseIsNative(value) ? value : undefined;
}

module.exports = getNative;


/***/ }),

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

var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js");

/** Used for built-in method references. */
var objectProto = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var nativeObjectToString = objectProto.toString;

/** Built-in value references. */
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;

/**
 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
 *
 * @private
 * @param {*} value The value to query.
 * @returns {string} Returns the raw `toStringTag`.
 */
function getRawTag(value) {
  var isOwn = hasOwnProperty.call(value, symToStringTag),
      tag = value[symToStringTag];

  try {
    value[symToStringTag] = undefined;
    var unmasked = true;
  } catch (e) {}

  var result = nativeObjectToString.call(value);
  if (unmasked) {
    if (isOwn) {
      value[symToStringTag] = tag;
    } else {
      delete value[symToStringTag];
    }
  }
  return result;
}

module.exports = getRawTag;


/***/ }),

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

/**
 * Gets the value at `key` of `object`.
 *
 * @private
 * @param {Object} [object] The object to query.
 * @param {string} key The key of the property to get.
 * @returns {*} Returns the property value.
 */
function getValue(object, key) {
  return object == null ? undefined : object[key];
}

module.exports = getValue;


/***/ }),

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

/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;

/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;

/**
 * Checks if `value` is a valid array-like index.
 *
 * @private
 * @param {*} value The value to check.
 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
 */
function isIndex(value, length) {
  var type = typeof value;
  length = length == null ? MAX_SAFE_INTEGER : length;

  return !!length &&
    (type == 'number' ||
      (type != 'symbol' && reIsUint.test(value))) &&
        (value > -1 && value % 1 == 0 && value < length);
}

module.exports = isIndex;


/***/ }),

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

var eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"),
    isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"),
    isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"),
    isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js");

/**
 * Checks if the given arguments are from an iteratee call.
 *
 * @private
 * @param {*} value The potential iteratee value argument.
 * @param {*} index The potential iteratee index or key argument.
 * @param {*} object The potential iteratee object argument.
 * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
 *  else `false`.
 */
function isIterateeCall(value, index, object) {
  if (!isObject(object)) {
    return false;
  }
  var type = typeof index;
  if (type == 'number'
        ? (isArrayLike(object) && isIndex(index, object.length))
        : (type == 'string' && index in object)
      ) {
    return eq(object[index], value);
  }
  return false;
}

module.exports = isIterateeCall;


/***/ }),

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

var coreJsData = __webpack_require__(/*! ./_coreJsData */ "./node_modules/lodash/_coreJsData.js");

/** Used to detect methods masquerading as native. */
var maskSrcKey = (function() {
  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  return uid ? ('Symbol(src)_1.' + uid) : '';
}());

/**
 * Checks if `func` has its source masked.
 *
 * @private
 * @param {Function} func The function to check.
 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
 */
function isMasked(func) {
  return !!maskSrcKey && (maskSrcKey in func);
}

module.exports = isMasked;


/***/ }),

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

/** Used for built-in method references. */
var objectProto = Object.prototype;

/**
 * Checks if `value` is likely a prototype object.
 *
 * @private
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
 */
function isPrototype(value) {
  var Ctor = value && value.constructor,
      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;

  return value === proto;
}

module.exports = isPrototype;


/***/ }),

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

/**
 * This function is like
 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
 * except that it includes inherited enumerable properties.
 *
 * @private
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 */
function nativeKeysIn(object) {
  var result = [];
  if (object != null) {
    for (var key in Object(object)) {
      result.push(key);
    }
  }
  return result;
}

module.exports = nativeKeysIn;


/***/ }),

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

/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js");

/** Detect free variable `exports`. */
var freeExports =  true && exports && !exports.nodeType && exports;

/** Detect free variable `module`. */
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;

/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports && freeGlobal.process;

/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
  try {
    // Use `util.types` for Node.js 10+.
    var types = freeModule && freeModule.require && freeModule.require('util').types;

    if (types) {
      return types;
    }

    // Legacy `process.binding('util')` for Node.js < 10.
    return freeProcess && freeProcess.binding && freeProcess.binding('util');
  } catch (e) {}
}());

module.exports = nodeUtil;

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

/***/ }),

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

/** Used for built-in method references. */
var objectProto = Object.prototype;

/**
 * Used to resolve the
 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
 * of values.
 */
var nativeObjectToString = objectProto.toString;

/**
 * Converts `value` to a string using `Object.prototype.toString`.
 *
 * @private
 * @param {*} value The value to convert.
 * @returns {string} Returns the converted string.
 */
function objectToString(value) {
  return nativeObjectToString.call(value);
}

module.exports = objectToString;


/***/ }),

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

var apply = __webpack_require__(/*! ./_apply */ "./node_modules/lodash/_apply.js");

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;

/**
 * A specialized version of `baseRest` which transforms the rest array.
 *
 * @private
 * @param {Function} func The function to apply a rest parameter to.
 * @param {number} [start=func.length-1] The start position of the rest parameter.
 * @param {Function} transform The rest array transform.
 * @returns {Function} Returns the new function.
 */
function overRest(func, start, transform) {
  start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
  return function() {
    var args = arguments,
        index = -1,
        length = nativeMax(args.length - start, 0),
        array = Array(length);

    while (++index < length) {
      array[index] = args[start + index];
    }
    index = -1;
    var otherArgs = Array(start + 1);
    while (++index < start) {
      otherArgs[index] = args[index];
    }
    otherArgs[start] = transform(array);
    return apply(func, this, otherArgs);
  };
}

module.exports = overRest;


/***/ }),

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

var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js");

/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;

/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();

module.exports = root;


/***/ }),

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

var baseSetToString = __webpack_require__(/*! ./_baseSetToString */ "./node_modules/lodash/_baseSetToString.js"),
    shortOut = __webpack_require__(/*! ./_shortOut */ "./node_modules/lodash/_shortOut.js");

/**
 * Sets the `toString` method of `func` to return `string`.
 *
 * @private
 * @param {Function} func The function to modify.
 * @param {Function} string The `toString` result.
 * @returns {Function} Returns `func`.
 */
var setToString = shortOut(baseSetToString);

module.exports = setToString;


/***/ }),

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

/** Used to detect hot functions by number of calls within a span of milliseconds. */
var HOT_COUNT = 800,
    HOT_SPAN = 16;

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeNow = Date.now;

/**
 * Creates a function that'll short out and invoke `identity` instead
 * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
 * milliseconds.
 *
 * @private
 * @param {Function} func The function to restrict.
 * @returns {Function} Returns the new shortable function.
 */
function shortOut(func) {
  var count = 0,
      lastCalled = 0;

  return function() {
    var stamp = nativeNow(),
        remaining = HOT_SPAN - (stamp - lastCalled);

    lastCalled = stamp;
    if (remaining > 0) {
      if (++count >= HOT_COUNT) {
        return arguments[0];
      }
    } else {
      count = 0;
    }
    return func.apply(undefined, arguments);
  };
}

module.exports = shortOut;


/***/ }),

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

/** Used for built-in method references. */
var funcProto = Function.prototype;

/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;

/**
 * Converts `func` to its source code.
 *
 * @private
 * @param {Function} func The function to convert.
 * @returns {string} Returns the source code.
 */
function toSource(func) {
  if (func != null) {
    try {
      return funcToString.call(func);
    } catch (e) {}
    try {
      return (func + '');
    } catch (e) {}
  }
  return '';
}

module.exports = toSource;


/***/ }),

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

var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"),
    createAssigner = __webpack_require__(/*! ./_createAssigner */ "./node_modules/lodash/_createAssigner.js"),
    keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js");

/**
 * This method is like `_.assign` except that it iterates over own and
 * inherited source properties.
 *
 * **Note:** This method mutates `object`.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @alias extend
 * @category Object
 * @param {Object} object The destination object.
 * @param {...Object} [sources] The source objects.
 * @returns {Object} Returns `object`.
 * @see _.assign
 * @example
 *
 * function Foo() {
 *   this.a = 1;
 * }
 *
 * function Bar() {
 *   this.c = 3;
 * }
 *
 * Foo.prototype.b = 2;
 * Bar.prototype.d = 4;
 *
 * _.assignIn({ 'a': 0 }, new Foo, new Bar);
 * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
 */
var assignIn = createAssigner(function(object, source) {
  copyObject(source, keysIn(source), object);
});

module.exports = assignIn;


/***/ }),

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

/**
 * Creates a function that returns `value`.
 *
 * @static
 * @memberOf _
 * @since 2.4.0
 * @category Util
 * @param {*} value The value to return from the new function.
 * @returns {Function} Returns the new constant function.
 * @example
 *
 * var objects = _.times(2, _.constant({ 'a': 1 }));
 *
 * console.log(objects);
 * // => [{ 'a': 1 }, { 'a': 1 }]
 *
 * console.log(objects[0] === objects[1]);
 * // => true
 */
function constant(value) {
  return function() {
    return value;
  };
}

module.exports = constant;


/***/ }),

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

/**
 * Performs a
 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
 * comparison between two values to determine if they are equivalent.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to compare.
 * @param {*} other The other value to compare.
 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
 * @example
 *
 * var object = { 'a': 1 };
 * var other = { 'a': 1 };
 *
 * _.eq(object, object);
 * // => true
 *
 * _.eq(object, other);
 * // => false
 *
 * _.eq('a', 'a');
 * // => true
 *
 * _.eq('a', Object('a'));
 * // => false
 *
 * _.eq(NaN, NaN);
 * // => true
 */
function eq(value, other) {
  return value === other || (value !== value && other !== other);
}

module.exports = eq;


/***/ }),

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

module.exports = __webpack_require__(/*! ./assignIn */ "./node_modules/lodash/assignIn.js");


/***/ }),

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

/**
 * This method returns the first argument it receives.
 *
 * @static
 * @since 0.1.0
 * @memberOf _
 * @category Util
 * @param {*} value Any value.
 * @returns {*} Returns `value`.
 * @example
 *
 * var object = { 'a': 1 };
 *
 * console.log(_.identity(object) === object);
 * // => true
 */
function identity(value) {
  return value;
}

module.exports = identity;


/***/ }),

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

var baseIsArguments = __webpack_require__(/*! ./_baseIsArguments */ "./node_modules/lodash/_baseIsArguments.js"),
    isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");

/** Used for built-in method references. */
var objectProto = Object.prototype;

/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;

/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;

/**
 * Checks if `value` is likely an `arguments` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
 *  else `false`.
 * @example
 *
 * _.isArguments(function() { return arguments; }());
 * // => true
 *
 * _.isArguments([1, 2, 3]);
 * // => false
 */
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
    !propertyIsEnumerable.call(value, 'callee');
};

module.exports = isArguments;


/***/ }),

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

/**
 * Checks if `value` is classified as an `Array` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
 * @example
 *
 * _.isArray([1, 2, 3]);
 * // => true
 *
 * _.isArray(document.body.children);
 * // => false
 *
 * _.isArray('abc');
 * // => false
 *
 * _.isArray(_.noop);
 * // => false
 */
var isArray = Array.isArray;

module.exports = isArray;


/***/ }),

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

var isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"),
    isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js");

/**
 * Checks if `value` is array-like. A value is considered array-like if it's
 * not a function and has a `value.length` that's an integer greater than or
 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
 * @example
 *
 * _.isArrayLike([1, 2, 3]);
 * // => true
 *
 * _.isArrayLike(document.body.children);
 * // => true
 *
 * _.isArrayLike('abc');
 * // => true
 *
 * _.isArrayLike(_.noop);
 * // => false
 */
function isArrayLike(value) {
  return value != null && isLength(value.length) && !isFunction(value);
}

module.exports = isArrayLike;


/***/ }),

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

/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"),
    stubFalse = __webpack_require__(/*! ./stubFalse */ "./node_modules/lodash/stubFalse.js");

/** Detect free variable `exports`. */
var freeExports =  true && exports && !exports.nodeType && exports;

/** Detect free variable `module`. */
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;

/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;

/** Built-in value references. */
var Buffer = moduleExports ? root.Buffer : undefined;

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;

/**
 * Checks if `value` is a buffer.
 *
 * @static
 * @memberOf _
 * @since 4.3.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
 * @example
 *
 * _.isBuffer(new Buffer(2));
 * // => true
 *
 * _.isBuffer(new Uint8Array(2));
 * // => false
 */
var isBuffer = nativeIsBuffer || stubFalse;

module.exports = isBuffer;

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

/***/ }),

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

var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
    isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js");

/** `Object#toString` result references. */
var asyncTag = '[object AsyncFunction]',
    funcTag = '[object Function]',
    genTag = '[object GeneratorFunction]',
    proxyTag = '[object Proxy]';

/**
 * Checks if `value` is classified as a `Function` object.
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
 * @example
 *
 * _.isFunction(_);
 * // => true
 *
 * _.isFunction(/abc/);
 * // => false
 */
function isFunction(value) {
  if (!isObject(value)) {
    return false;
  }
  // The use of `Object#toString` avoids issues with the `typeof` operator
  // in Safari 9 which returns 'object' for typed arrays and other constructors.
  var tag = baseGetTag(value);
  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}

module.exports = isFunction;


/***/ }),

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

/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;

/**
 * Checks if `value` is a valid array-like length.
 *
 * **Note:** This method is loosely based on
 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
 * @example
 *
 * _.isLength(3);
 * // => true
 *
 * _.isLength(Number.MIN_VALUE);
 * // => false
 *
 * _.isLength(Infinity);
 * // => false
 *
 * _.isLength('3');
 * // => false
 */
function isLength(value) {
  return typeof value == 'number' &&
    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}

module.exports = isLength;


/***/ }),

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

/**
 * Checks if `value` is the
 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
 *
 * @static
 * @memberOf _
 * @since 0.1.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
 * @example
 *
 * _.isObject({});
 * // => true
 *
 * _.isObject([1, 2, 3]);
 * // => true
 *
 * _.isObject(_.noop);
 * // => true
 *
 * _.isObject(null);
 * // => false
 */
function isObject(value) {
  var type = typeof value;
  return value != null && (type == 'object' || type == 'function');
}

module.exports = isObject;


/***/ }),

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

/**
 * Checks if `value` is object-like. A value is object-like if it's not `null`
 * and has a `typeof` result of "object".
 *
 * @static
 * @memberOf _
 * @since 4.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
 * @example
 *
 * _.isObjectLike({});
 * // => true
 *
 * _.isObjectLike([1, 2, 3]);
 * // => true
 *
 * _.isObjectLike(_.noop);
 * // => false
 *
 * _.isObjectLike(null);
 * // => false
 */
function isObjectLike(value) {
  return value != null && typeof value == 'object';
}

module.exports = isObjectLike;


/***/ }),

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

var baseIsTypedArray = __webpack_require__(/*! ./_baseIsTypedArray */ "./node_modules/lodash/_baseIsTypedArray.js"),
    baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/lodash/_baseUnary.js"),
    nodeUtil = __webpack_require__(/*! ./_nodeUtil */ "./node_modules/lodash/_nodeUtil.js");

/* Node.js helper references. */
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;

/**
 * Checks if `value` is classified as a typed array.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category Lang
 * @param {*} value The value to check.
 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
 * @example
 *
 * _.isTypedArray(new Uint8Array);
 * // => true
 *
 * _.isTypedArray([]);
 * // => false
 */
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;

module.exports = isTypedArray;


/***/ }),

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

var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ "./node_modules/lodash/_arrayLikeKeys.js"),
    baseKeysIn = __webpack_require__(/*! ./_baseKeysIn */ "./node_modules/lodash/_baseKeysIn.js"),
    isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js");

/**
 * Creates an array of the own and inherited enumerable property names of `object`.
 *
 * **Note:** Non-object values are coerced to objects.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category Object
 * @param {Object} object The object to query.
 * @returns {Array} Returns the array of property names.
 * @example
 *
 * function Foo() {
 *   this.a = 1;
 *   this.b = 2;
 * }
 *
 * Foo.prototype.c = 3;
 *
 * _.keysIn(new Foo);
 * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
 */
function keysIn(object) {
  return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
}

module.exports = keysIn;


/***/ }),

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

/**
 * This method returns `false`.
 *
 * @static
 * @memberOf _
 * @since 4.13.0
 * @category Util
 * @returns {boolean} Returns `false`.
 * @example
 *
 * _.times(2, _.stubFalse);
 * // => [false, false]
 */
function stubFalse() {
  return false;
}

module.exports = stubFalse;


/***/ }),

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

"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/


/* eslint-disable no-unused-vars */
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var hasOwnProperty = Object.prototype.hasOwnProperty;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;

function toObject(val) {
	if (val === null || val === undefined) {
		throw new TypeError('Object.assign cannot be called with null or undefined');
	}

	return Object(val);
}

function shouldUseNative() {
	try {
		if (!Object.assign) {
			return false;
		}

		// Detect buggy property enumeration order in older V8 versions.

		// https://bugs.chromium.org/p/v8/issues/detail?id=4118
		var test1 = new String('abc');  // eslint-disable-line no-new-wrappers
		test1[5] = 'de';
		if (Object.getOwnPropertyNames(test1)[0] === '5') {
			return false;
		}

		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
		var test2 = {};
		for (var i = 0; i < 10; i++) {
			test2['_' + String.fromCharCode(i)] = i;
		}
		var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
			return test2[n];
		});
		if (order2.join('') !== '0123456789') {
			return false;
		}

		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
		var test3 = {};
		'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
			test3[letter] = letter;
		});
		if (Object.keys(Object.assign({}, test3)).join('') !==
				'abcdefghijklmnopqrst') {
			return false;
		}

		return true;
	} catch (err) {
		// We don't expect any of the above to throw, but better to be safe.
		return false;
	}
}

module.exports = shouldUseNative() ? Object.assign : function (target, source) {
	var from;
	var to = toObject(target);
	var symbols;

	for (var s = 1; s < arguments.length; s++) {
		from = Object(arguments[s]);

		for (var key in from) {
			if (hasOwnProperty.call(from, key)) {
				to[key] = from[key];
			}
		}

		if (getOwnPropertySymbols) {
			symbols = getOwnPropertySymbols(from);
			for (var i = 0; i < symbols.length; i++) {
				if (propIsEnumerable.call(from, symbols[i])) {
					to[symbols[i]] = from[symbols[i]];
				}
			}
		}
	}

	return to;
};


/***/ }),

/***/ "./node_modules/prop-types/checkPropTypes.js":
/*!***************************************************!*\
  !*** ./node_modules/prop-types/checkPropTypes.js ***!
  \***************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

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



var printWarning = function() {};

if (true) {
  var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
  var loggedTypeFailures = {};
  var has = Function.call.bind(Object.prototype.hasOwnProperty);

  printWarning = function(text) {
    var message = 'Warning: ' + text;
    if (typeof console !== 'undefined') {
      console.error(message);
    }
    try {
      // --- Welcome to debugging React ---
      // This error was thrown as a convenience so that you can use this stack
      // to find the callsite that caused this warning to fire.
      throw new Error(message);
    } catch (x) {}
  };
}

/**
 * Assert that the values match with the type specs.
 * Error messages are memorized and will only be shown once.
 *
 * @param {object} typeSpecs Map of name to a ReactPropType
 * @param {object} values Runtime values that need to be type-checked
 * @param {string} location e.g. "prop", "context", "child context"
 * @param {string} componentName Name of the component for error messages.
 * @param {?Function} getStack Returns the component stack.
 * @private
 */
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
  if (true) {
    for (var typeSpecName in typeSpecs) {
      if (has(typeSpecs, typeSpecName)) {
        var error;
        // Prop type validation may throw. In case they do, we don't want to
        // fail the render phase where it didn't fail before. So we log it.
        // After these have been cleaned up, we'll let them throw.
        try {
          // This is intentionally an invariant that gets caught. It's the same
          // behavior as without this statement except with a better message.
          if (typeof typeSpecs[typeSpecName] !== 'function') {
            var err = Error(
              (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
              'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
            );
            err.name = 'Invariant Violation';
            throw err;
          }
          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
        } catch (ex) {
          error = ex;
        }
        if (error && !(error instanceof Error)) {
          printWarning(
            (componentName || 'React class') + ': type specification of ' +
            location + ' `' + typeSpecName + '` is invalid; the type checker ' +
            'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
            'You may have forgotten to pass an argument to the type checker ' +
            'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
            'shape all require an argument).'
          );
        }
        if (error instanceof Error && !(error.message in loggedTypeFailures)) {
          // Only monitor this failure once because there tends to be a lot of the
          // same error.
          loggedTypeFailures[error.message] = true;

          var stack = getStack ? getStack() : '';

          printWarning(
            'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
          );
        }
      }
    }
  }
}

/**
 * Resets warning cache when testing.
 *
 * @private
 */
checkPropTypes.resetWarningCache = function() {
  if (true) {
    loggedTypeFailures = {};
  }
}

module.exports = checkPropTypes;


/***/ }),

/***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
/*!*************************************************************!*\
  !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

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



var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';

module.exports = ReactPropTypesSecret;


/***/ }),

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

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





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

var React = __webpack_require__(/*! react */ "./node_modules/react/index.js");
var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
var checkPropTypes = __webpack_require__(/*! prop-types/checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
var Scheduler = __webpack_require__(/*! scheduler */ "./node_modules/react-dom/node_modules/scheduler/index.js");
var tracing = __webpack_require__(/*! scheduler/tracing */ "./node_modules/react-dom/node_modules/scheduler/tracing.js");

// Do not require this module directly! Use normal `invariant` calls with
// template literal strings. The messages will be converted to ReactError during
// build, and in production they will be minified.

// Do not require this module directly! Use normal `invariant` calls with
// template literal strings. The messages will be converted to ReactError during
// build, and in production they will be minified.

function ReactError(error) {
  error.name = 'Invariant Violation';
  return error;
}

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

(function () {
  if (!React) {
    {
      throw ReactError(Error('ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.'));
    }
  }
})();

/**
 * Injectable ordering of event plugins.
 */
var eventPluginOrder = null;

/**
 * Injectable mapping from names to event plugin modules.
 */
var namesToPlugins = {};

/**
 * Recomputes the plugin list using the injected plugins and plugin ordering.
 *
 * @private
 */
function recomputePluginOrdering() {
  if (!eventPluginOrder) {
    // Wait until an `eventPluginOrder` is injected.
    return;
  }
  for (var pluginName in namesToPlugins) {
    var pluginModule = namesToPlugins[pluginName];
    var pluginIndex = eventPluginOrder.indexOf(pluginName);
    (function () {
      if (!(pluginIndex > -1)) {
        {
          throw ReactError(Error('EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `' + pluginName + '`.'));
        }
      }
    })();
    if (plugins[pluginIndex]) {
      continue;
    }
    (function () {
      if (!pluginModule.extractEvents) {
        {
          throw ReactError(Error('EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `' + pluginName + '` does not.'));
        }
      }
    })();
    plugins[pluginIndex] = pluginModule;
    var publishedEvents = pluginModule.eventTypes;
    for (var eventName in publishedEvents) {
      (function () {
        if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {
          {
            throw ReactError(Error('EventPluginRegistry: Failed to publish event `' + eventName + '` for plugin `' + pluginName + '`.'));
          }
        }
      })();
    }
  }
}

/**
 * Publishes an event so that it can be dispatched by the supplied plugin.
 *
 * @param {object} dispatchConfig Dispatch configuration for the event.
 * @param {object} PluginModule Plugin publishing the event.
 * @return {boolean} True if the event was successfully published.
 * @private
 */
function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
  (function () {
    if (!!eventNameDispatchConfigs.hasOwnProperty(eventName)) {
      {
        throw ReactError(Error('EventPluginHub: More than one plugin attempted to publish the same event name, `' + eventName + '`.'));
      }
    }
  })();
  eventNameDispatchConfigs[eventName] = dispatchConfig;

  var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
  if (phasedRegistrationNames) {
    for (var phaseName in phasedRegistrationNames) {
      if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
        var phasedRegistrationName = phasedRegistrationNames[phaseName];
        publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
      }
    }
    return true;
  } else if (dispatchConfig.registrationName) {
    publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
    return true;
  }
  return false;
}

/**
 * Publishes a registration name that is used to identify dispatched events.
 *
 * @param {string} registrationName Registration name to add.
 * @param {object} PluginModule Plugin publishing the event.
 * @private
 */
function publishRegistrationName(registrationName, pluginModule, eventName) {
  (function () {
    if (!!registrationNameModules[registrationName]) {
      {
        throw ReactError(Error('EventPluginHub: More than one plugin attempted to publish the same registration name, `' + registrationName + '`.'));
      }
    }
  })();
  registrationNameModules[registrationName] = pluginModule;
  registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;

  {
    var lowerCasedName = registrationName.toLowerCase();
    possibleRegistrationNames[lowerCasedName] = registrationName;

    if (registrationName === 'onDoubleClick') {
      possibleRegistrationNames.ondblclick = registrationName;
    }
  }
}

/**
 * Registers plugins so that they can extract and dispatch events.
 *
 * @see {EventPluginHub}
 */

/**
 * Ordered list of injected plugins.
 */
var plugins = [];

/**
 * Mapping from event name to dispatch config
 */
var eventNameDispatchConfigs = {};

/**
 * Mapping from registration name to plugin module
 */
var registrationNameModules = {};

/**
 * Mapping from registration name to event name
 */
var registrationNameDependencies = {};

/**
 * Mapping from lowercase registration names to the properly cased version,
 * used to warn in the case of missing event handlers. Available
 * only in true.
 * @type {Object}
 */
var possibleRegistrationNames = {};
// Trust the developer to only use possibleRegistrationNames in true

/**
 * Injects an ordering of plugins (by plugin name). This allows the ordering
 * to be decoupled from injection of the actual plugins so that ordering is
 * always deterministic regardless of packaging, on-the-fly injection, etc.
 *
 * @param {array} InjectedEventPluginOrder
 * @internal
 * @see {EventPluginHub.injection.injectEventPluginOrder}
 */
function injectEventPluginOrder(injectedEventPluginOrder) {
  (function () {
    if (!!eventPluginOrder) {
      {
        throw ReactError(Error('EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.'));
      }
    }
  })();
  // Clone the ordering so it cannot be dynamically mutated.
  eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
  recomputePluginOrdering();
}

/**
 * Injects plugins to be used by `EventPluginHub`. The plugin names must be
 * in the ordering injected by `injectEventPluginOrder`.
 *
 * Plugins can be injected as part of page initialization or on-the-fly.
 *
 * @param {object} injectedNamesToPlugins Map from names to plugin modules.
 * @internal
 * @see {EventPluginHub.injection.injectEventPluginsByName}
 */
function injectEventPluginsByName(injectedNamesToPlugins) {
  var isOrderingDirty = false;
  for (var pluginName in injectedNamesToPlugins) {
    if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
      continue;
    }
    var pluginModule = injectedNamesToPlugins[pluginName];
    if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
      (function () {
        if (!!namesToPlugins[pluginName]) {
          {
            throw ReactError(Error('EventPluginRegistry: Cannot inject two different event plugins using the same name, `' + pluginName + '`.'));
          }
        }
      })();
      namesToPlugins[pluginName] = pluginModule;
      isOrderingDirty = true;
    }
  }
  if (isOrderingDirty) {
    recomputePluginOrdering();
  }
}

var invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) {
  var funcArgs = Array.prototype.slice.call(arguments, 3);
  try {
    func.apply(context, funcArgs);
  } catch (error) {
    this.onError(error);
  }
};

{
  // In DEV mode, we swap out invokeGuardedCallback for a special version
  // that plays more nicely with the browser's DevTools. The idea is to preserve
  // "Pause on exceptions" behavior. Because React wraps all user-provided
  // functions in invokeGuardedCallback, and the production version of
  // invokeGuardedCallback uses a try-catch, all user exceptions are treated
  // like caught exceptions, and the DevTools won't pause unless the developer
  // takes the extra step of enabling pause on caught exceptions. This is
  // unintuitive, though, because even though React has caught the error, from
  // the developer's perspective, the error is uncaught.
  //
  // To preserve the expected "Pause on exceptions" behavior, we don't use a
  // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
  // DOM node, and call the user-provided callback from inside an event handler
  // for that fake event. If the callback throws, the error is "captured" using
  // a global event handler. But because the error happens in a different
  // event loop context, it does not interrupt the normal program flow.
  // Effectively, this gives us try-catch behavior without actually using
  // try-catch. Neat!

  // Check that the browser supports the APIs we need to implement our special
  // DEV version of invokeGuardedCallback
  if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
    var fakeNode = document.createElement('react');

    var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) {
      // If document doesn't exist we know for sure we will crash in this method
      // when we call document.createEvent(). However this can cause confusing
      // errors: https://github.com/facebookincubator/create-react-app/issues/3482
      // So we preemptively throw with a better message instead.
      (function () {
        if (!(typeof document !== 'undefined')) {
          {
            throw ReactError(Error('The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.'));
          }
        }
      })();
      var evt = document.createEvent('Event');

      // Keeps track of whether the user-provided callback threw an error. We
      // set this to true at the beginning, then set it to false right after
      // calling the function. If the function errors, `didError` will never be
      // set to false. This strategy works even if the browser is flaky and
      // fails to call our global error handler, because it doesn't rely on
      // the error event at all.
      var didError = true;

      // Keeps track of the value of window.event so that we can reset it
      // during the callback to let user code access window.event in the
      // browsers that support it.
      var windowEvent = window.event;

      // Keeps track of the descriptor of window.event to restore it after event
      // dispatching: https://github.com/facebook/react/issues/13688
      var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');

      // Create an event handler for our fake event. We will synchronously
      // dispatch our fake event using `dispatchEvent`. Inside the handler, we
      // call the user-provided callback.
      var funcArgs = Array.prototype.slice.call(arguments, 3);
      function callCallback() {
        // We immediately remove the callback from event listeners so that
        // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
        // nested call would trigger the fake event handlers of any call higher
        // in the stack.
        fakeNode.removeEventListener(evtType, callCallback, false);

        // We check for window.hasOwnProperty('event') to prevent the
        // window.event assignment in both IE <= 10 as they throw an error
        // "Member not found" in strict mode, and in Firefox which does not
        // support window.event.
        if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
          window.event = windowEvent;
        }

        func.apply(context, funcArgs);
        didError = false;
      }

      // Create a global error event handler. We use this to capture the value
      // that was thrown. It's possible that this error handler will fire more
      // than once; for example, if non-React code also calls `dispatchEvent`
      // and a handler for that event throws. We should be resilient to most of
      // those cases. Even if our error event handler fires more than once, the
      // last error event is always used. If the callback actually does error,
      // we know that the last error event is the correct one, because it's not
      // possible for anything else to have happened in between our callback
      // erroring and the code that follows the `dispatchEvent` call below. If
      // the callback doesn't error, but the error event was fired, we know to
      // ignore it because `didError` will be false, as described above.
      var error = void 0;
      // Use this to track whether the error event is ever called.
      var didSetError = false;
      var isCrossOriginError = false;

      function handleWindowError(event) {
        error = event.error;
        didSetError = true;
        if (error === null && event.colno === 0 && event.lineno === 0) {
          isCrossOriginError = true;
        }
        if (event.defaultPrevented) {
          // Some other error handler has prevented default.
          // Browsers silence the error report if this happens.
          // We'll remember this to later decide whether to log it or not.
          if (error != null && typeof error === 'object') {
            try {
              error._suppressLogging = true;
            } catch (inner) {
              // Ignore.
            }
          }
        }
      }

      // Create a fake event type.
      var evtType = 'react-' + (name ? name : 'invokeguardedcallback');

      // Attach our event handlers
      window.addEventListener('error', handleWindowError);
      fakeNode.addEventListener(evtType, callCallback, false);

      // Synchronously dispatch our fake event. If the user-provided function
      // errors, it will trigger our global error handler.
      evt.initEvent(evtType, false, false);
      fakeNode.dispatchEvent(evt);

      if (windowEventDescriptor) {
        Object.defineProperty(window, 'event', windowEventDescriptor);
      }

      if (didError) {
        if (!didSetError) {
          // The callback errored, but the error event never fired.
          error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
        } else if (isCrossOriginError) {
          error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://fb.me/react-crossorigin-error for more information.');
        }
        this.onError(error);
      }

      // Remove our event listeners
      window.removeEventListener('error', handleWindowError);
    };

    invokeGuardedCallbackImpl = invokeGuardedCallbackDev;
  }
}

var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;

// Used by Fiber to simulate a try-catch.
var hasError = false;
var caughtError = null;

// Used by event system to capture/rethrow the first error.
var hasRethrowError = false;
var rethrowError = null;

var reporter = {
  onError: function (error) {
    hasError = true;
    caughtError = error;
  }
};

/**
 * Call a function while guarding against errors that happens within it.
 * Returns an error if it throws, otherwise null.
 *
 * In production, this is implemented using a try-catch. The reason we don't
 * use a try-catch directly is so that we can swap out a different
 * implementation in DEV mode.
 *
 * @param {String} name of the guard to use for logging or debugging
 * @param {Function} func The function to invoke
 * @param {*} context The context to use when calling the function
 * @param {...*} args Arguments for function
 */
function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
  hasError = false;
  caughtError = null;
  invokeGuardedCallbackImpl$1.apply(reporter, arguments);
}

/**
 * Same as invokeGuardedCallback, but instead of returning an error, it stores
 * it in a global so it can be rethrown by `rethrowCaughtError` later.
 * TODO: See if caughtError and rethrowError can be unified.
 *
 * @param {String} name of the guard to use for logging or debugging
 * @param {Function} func The function to invoke
 * @param {*} context The context to use when calling the function
 * @param {...*} args Arguments for function
 */
function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
  invokeGuardedCallback.apply(this, arguments);
  if (hasError) {
    var error = clearCaughtError();
    if (!hasRethrowError) {
      hasRethrowError = true;
      rethrowError = error;
    }
  }
}

/**
 * During execution of guarded functions we will capture the first error which
 * we will rethrow to be handled by the top level error handler.
 */
function rethrowCaughtError() {
  if (hasRethrowError) {
    var error = rethrowError;
    hasRethrowError = false;
    rethrowError = null;
    throw error;
  }
}

function hasCaughtError() {
  return hasError;
}

function clearCaughtError() {
  if (hasError) {
    var error = caughtError;
    hasError = false;
    caughtError = null;
    return error;
  } else {
    (function () {
      {
        {
          throw ReactError(Error('clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.'));
        }
      }
    })();
  }
}

/**
 * Similar to invariant but only logs a warning if the condition is not met.
 * This can be used to log issues in development environments in critical
 * paths. Removing the logging code for production environments will keep the
 * same logic and follow the same code paths.
 */

var warningWithoutStack = function () {};

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

    if (format === undefined) {
      throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
    }
    if (args.length > 8) {
      // Check before the condition to catch violations early.
      throw new Error('warningWithoutStack() currently supports at most 8 arguments.');
    }
    if (condition) {
      return;
    }
    if (typeof console !== 'undefined') {
      var argsWithFormat = args.map(function (item) {
        return '' + item;
      });
      argsWithFormat.unshift('Warning: ' + format);

      // We intentionally don't use spread (or .apply) directly because it
      // breaks IE9: https://github.com/facebook/react/issues/13610
      Function.prototype.apply.call(console.error, console, argsWithFormat);
    }
    try {
      // --- Welcome to debugging React ---
      // This error was thrown as a convenience so that you can use this stack
      // to find the callsite that caused this warning to fire.
      var argIndex = 0;
      var message = 'Warning: ' + format.replace(/%s/g, function () {
        return args[argIndex++];
      });
      throw new Error(message);
    } catch (x) {}
  };
}

var warningWithoutStack$1 = warningWithoutStack;

var getFiberCurrentPropsFromNode = null;
var getInstanceFromNode = null;
var getNodeFromInstance = null;

function setComponentTree(getFiberCurrentPropsFromNodeImpl, getInstanceFromNodeImpl, getNodeFromInstanceImpl) {
  getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl;
  getInstanceFromNode = getInstanceFromNodeImpl;
  getNodeFromInstance = getNodeFromInstanceImpl;
  {
    !(getNodeFromInstance && getInstanceFromNode) ? warningWithoutStack$1(false, 'EventPluginUtils.setComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
  }
}

var validateEventDispatches = void 0;
{
  validateEventDispatches = function (event) {
    var dispatchListeners = event._dispatchListeners;
    var dispatchInstances = event._dispatchInstances;

    var listenersIsArr = Array.isArray(dispatchListeners);
    var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;

    var instancesIsArr = Array.isArray(dispatchInstances);
    var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;

    !(instancesIsArr === listenersIsArr && instancesLen === listenersLen) ? warningWithoutStack$1(false, 'EventPluginUtils: Invalid `event`.') : void 0;
  };
}

/**
 * Dispatch the event to the listener.
 * @param {SyntheticEvent} event SyntheticEvent to handle
 * @param {function} listener Application-level callback
 * @param {*} inst Internal component instance
 */
function executeDispatch(event, listener, inst) {
  var type = event.type || 'unknown-event';
  event.currentTarget = getNodeFromInstance(inst);
  invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
  event.currentTarget = null;
}

/**
 * Standard/simple iteration through an event's collected dispatches.
 */
function executeDispatchesInOrder(event) {
  var dispatchListeners = event._dispatchListeners;
  var dispatchInstances = event._dispatchInstances;
  {
    validateEventDispatches(event);
  }
  if (Array.isArray(dispatchListeners)) {
    for (var i = 0; i < dispatchListeners.length; i++) {
      if (event.isPropagationStopped()) {
        break;
      }
      // Listeners and Instances are two parallel arrays that are always in sync.
      executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);
    }
  } else if (dispatchListeners) {
    executeDispatch(event, dispatchListeners, dispatchInstances);
  }
  event._dispatchListeners = null;
  event._dispatchInstances = null;
}

/**
 * @see executeDispatchesInOrderStopAtTrueImpl
 */


/**
 * Execution of a "direct" dispatch - there must be at most one dispatch
 * accumulated on the event or it is considered an error. It doesn't really make
 * sense for an event with multiple dispatches (bubbled) to keep track of the
 * return values at each dispatch execution, but it does tend to make sense when
 * dealing with "direct" dispatches.
 *
 * @return {*} The return value of executing the single dispatch.
 */


/**
 * @param {SyntheticEvent} event
 * @return {boolean} True iff number of dispatches accumulated is greater than 0.
 */

/**
 * Accumulates items that must not be null or undefined into the first one. This
 * is used to conserve memory by avoiding array allocations, and thus sacrifices
 * API cleanness. Since `current` can be null before being passed in and not
 * null after this function, make sure to assign it back to `current`:
 *
 * `a = accumulateInto(a, b);`
 *
 * This API should be sparingly used. Try `accumulate` for something cleaner.
 *
 * @return {*|array<*>} An accumulation of items.
 */

function accumulateInto(current, next) {
  (function () {
    if (!(next != null)) {
      {
        throw ReactError(Error('accumulateInto(...): Accumulated items must not be null or undefined.'));
      }
    }
  })();

  if (current == null) {
    return next;
  }

  // Both are not empty. Warning: Never call x.concat(y) when you are not
  // certain that x is an Array (x could be a string with concat method).
  if (Array.isArray(current)) {
    if (Array.isArray(next)) {
      current.push.apply(current, next);
      return current;
    }
    current.push(next);
    return current;
  }

  if (Array.isArray(next)) {
    // A bit too dangerous to mutate `next`.
    return [current].concat(next);
  }

  return [current, next];
}

/**
 * @param {array} arr an "accumulation" of items which is either an Array or
 * a single item. Useful when paired with the `accumulate` module. This is a
 * simple utility that allows us to reason about a collection of items, but
 * handling the case when there is exactly one item (and we do not need to
 * allocate an array).
 * @param {function} cb Callback invoked with each element or a collection.
 * @param {?} [scope] Scope used as `this` in a callback.
 */
function forEachAccumulated(arr, cb, scope) {
  if (Array.isArray(arr)) {
    arr.forEach(cb, scope);
  } else if (arr) {
    cb.call(scope, arr);
  }
}

/**
 * Internal queue of events that have accumulated their dispatches and are
 * waiting to have their dispatches executed.
 */
var eventQueue = null;

/**
 * Dispatches an event and releases it back into the pool, unless persistent.
 *
 * @param {?object} event Synthetic event to be dispatched.
 * @private
 */
var executeDispatchesAndRelease = function (event) {
  if (event) {
    executeDispatchesInOrder(event);

    if (!event.isPersistent()) {
      event.constructor.release(event);
    }
  }
};
var executeDispatchesAndReleaseTopLevel = function (e) {
  return executeDispatchesAndRelease(e);
};

function runEventsInBatch(events) {
  if (events !== null) {
    eventQueue = accumulateInto(eventQueue, events);
  }

  // Set `eventQueue` to null before processing it so that we can tell if more
  // events get enqueued while processing.
  var processingEventQueue = eventQueue;
  eventQueue = null;

  if (!processingEventQueue) {
    return;
  }

  forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
  (function () {
    if (!!eventQueue) {
      {
        throw ReactError(Error('processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.'));
      }
    }
  })();
  // This would be a good time to rethrow if any of the event handlers threw.
  rethrowCaughtError();
}

function isInteractive(tag) {
  return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
}

function shouldPreventMouseEvent(name, type, props) {
  switch (name) {
    case 'onClick':
    case 'onClickCapture':
    case 'onDoubleClick':
    case 'onDoubleClickCapture':
    case 'onMouseDown':
    case 'onMouseDownCapture':
    case 'onMouseMove':
    case 'onMouseMoveCapture':
    case 'onMouseUp':
    case 'onMouseUpCapture':
      return !!(props.disabled && isInteractive(type));
    default:
      return false;
  }
}

/**
 * This is a unified interface for event plugins to be installed and configured.
 *
 * Event plugins can implement the following properties:
 *
 *   `extractEvents` {function(string, DOMEventTarget, string, object): *}
 *     Required. When a top-level event is fired, this method is expected to
 *     extract synthetic events that will in turn be queued and dispatched.
 *
 *   `eventTypes` {object}
 *     Optional, plugins that fire events must publish a mapping of registration
 *     names that are used to register listeners. Values of this mapping must
 *     be objects that contain `registrationName` or `phasedRegistrationNames`.
 *
 *   `executeDispatch` {function(object, function, string)}
 *     Optional, allows plugins to override how an event gets dispatched. By
 *     default, the listener is simply invoked.
 *
 * Each plugin that is injected into `EventsPluginHub` is immediately operable.
 *
 * @public
 */

/**
 * Methods for injecting dependencies.
 */
var injection = {
  /**
   * @param {array} InjectedEventPluginOrder
   * @public
   */
  injectEventPluginOrder: injectEventPluginOrder,

  /**
   * @param {object} injectedNamesToPlugins Map from names to plugin modules.
   */
  injectEventPluginsByName: injectEventPluginsByName
};

/**
 * @param {object} inst The instance, which is the source of events.
 * @param {string} registrationName Name of listener (e.g. `onClick`).
 * @return {?function} The stored callback.
 */
function getListener(inst, registrationName) {
  var listener = void 0;

  // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
  // live here; needs to be moved to a better place soon
  var stateNode = inst.stateNode;
  if (!stateNode) {
    // Work in progress (ex: onload events in incremental mode).
    return null;
  }
  var props = getFiberCurrentPropsFromNode(stateNode);
  if (!props) {
    // Work in progress.
    return null;
  }
  listener = props[registrationName];
  if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
    return null;
  }
  (function () {
    if (!(!listener || typeof listener === 'function')) {
      {
        throw ReactError(Error('Expected `' + registrationName + '` listener to be a function, instead got a value of `' + typeof listener + '` type.'));
      }
    }
  })();
  return listener;
}

/**
 * Allows registered plugins an opportunity to extract events from top-level
 * native browser events.
 *
 * @return {*} An accumulation of synthetic events.
 * @internal
 */
function extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  var events = null;
  for (var i = 0; i < plugins.length; i++) {
    // Not every plugin in the ordering may be loaded at runtime.
    var possiblePlugin = plugins[i];
    if (possiblePlugin) {
      var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
      if (extractedEvents) {
        events = accumulateInto(events, extractedEvents);
      }
    }
  }
  return events;
}

function runExtractedPluginEventsInBatch(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  var events = extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
  runEventsInBatch(events);
}

var FunctionComponent = 0;
var ClassComponent = 1;
var IndeterminateComponent = 2; // Before we know whether it is function or class
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
var HostComponent = 5;
var HostText = 6;
var Fragment = 7;
var Mode = 8;
var ContextConsumer = 9;
var ContextProvider = 10;
var ForwardRef = 11;
var Profiler = 12;
var SuspenseComponent = 13;
var MemoComponent = 14;
var SimpleMemoComponent = 15;
var LazyComponent = 16;
var IncompleteClassComponent = 17;
var DehydratedSuspenseComponent = 18;
var SuspenseListComponent = 19;
var FundamentalComponent = 20;

var randomKey = Math.random().toString(36).slice(2);
var internalInstanceKey = '__reactInternalInstance$' + randomKey;
var internalEventHandlersKey = '__reactEventHandlers$' + randomKey;

function precacheFiberNode(hostInst, node) {
  node[internalInstanceKey] = hostInst;
}

/**
 * Given a DOM node, return the closest ReactDOMComponent or
 * ReactDOMTextComponent instance ancestor.
 */
function getClosestInstanceFromNode(node) {
  if (node[internalInstanceKey]) {
    return node[internalInstanceKey];
  }

  while (!node[internalInstanceKey]) {
    if (node.parentNode) {
      node = node.parentNode;
    } else {
      // Top of the tree. This node must not be part of a React tree (or is
      // unmounted, potentially).
      return null;
    }
  }

  var inst = node[internalInstanceKey];
  if (inst.tag === HostComponent || inst.tag === HostText) {
    // In Fiber, this will always be the deepest root.
    return inst;
  }

  return null;
}

/**
 * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
 * instance, or null if the node was not rendered by this React.
 */
function getInstanceFromNode$1(node) {
  var inst = node[internalInstanceKey];
  if (inst) {
    if (inst.tag === HostComponent || inst.tag === HostText) {
      return inst;
    } else {
      return null;
    }
  }
  return null;
}

/**
 * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
 * DOM node.
 */
function getNodeFromInstance$1(inst) {
  if (inst.tag === HostComponent || inst.tag === HostText) {
    // In Fiber this, is just the state node right now. We assume it will be
    // a host component or host text.
    return inst.stateNode;
  }

  // Without this first invariant, passing a non-DOM-component triggers the next
  // invariant for a missing parent, which is super confusing.
  (function () {
    {
      {
        throw ReactError(Error('getNodeFromInstance: Invalid argument.'));
      }
    }
  })();
}

function getFiberCurrentPropsFromNode$1(node) {
  return node[internalEventHandlersKey] || null;
}

function updateFiberProps(node, props) {
  node[internalEventHandlersKey] = props;
}

function getParent(inst) {
  do {
    inst = inst.return;
    // TODO: If this is a HostRoot we might want to bail out.
    // That is depending on if we want nested subtrees (layers) to bubble
    // events to their parent. We could also go through parentNode on the
    // host node but that wouldn't work for React Native and doesn't let us
    // do the portal feature.
  } while (inst && inst.tag !== HostComponent);
  if (inst) {
    return inst;
  }
  return null;
}

/**
 * Return the lowest common ancestor of A and B, or null if they are in
 * different trees.
 */
function getLowestCommonAncestor(instA, instB) {
  var depthA = 0;
  for (var tempA = instA; tempA; tempA = getParent(tempA)) {
    depthA++;
  }
  var depthB = 0;
  for (var tempB = instB; tempB; tempB = getParent(tempB)) {
    depthB++;
  }

  // If A is deeper, crawl up.
  while (depthA - depthB > 0) {
    instA = getParent(instA);
    depthA--;
  }

  // If B is deeper, crawl up.
  while (depthB - depthA > 0) {
    instB = getParent(instB);
    depthB--;
  }

  // Walk in lockstep until we find a match.
  var depth = depthA;
  while (depth--) {
    if (instA === instB || instA === instB.alternate) {
      return instA;
    }
    instA = getParent(instA);
    instB = getParent(instB);
  }
  return null;
}

/**
 * Return if A is an ancestor of B.
 */


/**
 * Return the parent instance of the passed-in instance.
 */


/**
 * Simulates the traversal of a two-phase, capture/bubble event dispatch.
 */
function traverseTwoPhase(inst, fn, arg) {
  var path = [];
  while (inst) {
    path.push(inst);
    inst = getParent(inst);
  }
  var i = void 0;
  for (i = path.length; i-- > 0;) {
    fn(path[i], 'captured', arg);
  }
  for (i = 0; i < path.length; i++) {
    fn(path[i], 'bubbled', arg);
  }
}

/**
 * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
 * should would receive a `mouseEnter` or `mouseLeave` event.
 *
 * Does not invoke the callback on the nearest common ancestor because nothing
 * "entered" or "left" that element.
 */
function traverseEnterLeave(from, to, fn, argFrom, argTo) {
  var common = from && to ? getLowestCommonAncestor(from, to) : null;
  var pathFrom = [];
  while (true) {
    if (!from) {
      break;
    }
    if (from === common) {
      break;
    }
    var alternate = from.alternate;
    if (alternate !== null && alternate === common) {
      break;
    }
    pathFrom.push(from);
    from = getParent(from);
  }
  var pathTo = [];
  while (true) {
    if (!to) {
      break;
    }
    if (to === common) {
      break;
    }
    var _alternate = to.alternate;
    if (_alternate !== null && _alternate === common) {
      break;
    }
    pathTo.push(to);
    to = getParent(to);
  }
  for (var i = 0; i < pathFrom.length; i++) {
    fn(pathFrom[i], 'bubbled', argFrom);
  }
  for (var _i = pathTo.length; _i-- > 0;) {
    fn(pathTo[_i], 'captured', argTo);
  }
}

/**
 * Some event types have a notion of different registration names for different
 * "phases" of propagation. This finds listeners by a given phase.
 */
function listenerAtPhase(inst, event, propagationPhase) {
  var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
  return getListener(inst, registrationName);
}

/**
 * A small set of propagation patterns, each of which will accept a small amount
 * of information, and generate a set of "dispatch ready event objects" - which
 * are sets of events that have already been annotated with a set of dispatched
 * listener functions/ids. The API is designed this way to discourage these
 * propagation strategies from actually executing the dispatches, since we
 * always want to collect the entire set of dispatches before executing even a
 * single one.
 */

/**
 * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
 * here, allows us to not have to bind or create functions for each event.
 * Mutating the event's members allows us to not have to create a wrapping
 * "dispatch" object that pairs the event with the listener.
 */
function accumulateDirectionalDispatches(inst, phase, event) {
  {
    !inst ? warningWithoutStack$1(false, 'Dispatching inst must not be null') : void 0;
  }
  var listener = listenerAtPhase(inst, event, phase);
  if (listener) {
    event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
    event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
  }
}

/**
 * Collect dispatches (must be entirely collected before dispatching - see unit
 * tests). Lazily allocate the array to conserve memory.  We must loop through
 * each event and perform the traversal for each one. We cannot perform a
 * single traversal for the entire collection of events because each event may
 * have a different target.
 */
function accumulateTwoPhaseDispatchesSingle(event) {
  if (event && event.dispatchConfig.phasedRegistrationNames) {
    traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
  }
}

/**
 * Accumulates without regard to direction, does not look for phased
 * registration names. Same as `accumulateDirectDispatchesSingle` but without
 * requiring that the `dispatchMarker` be the same as the dispatched ID.
 */
function accumulateDispatches(inst, ignoredDirection, event) {
  if (inst && event && event.dispatchConfig.registrationName) {
    var registrationName = event.dispatchConfig.registrationName;
    var listener = getListener(inst, registrationName);
    if (listener) {
      event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
      event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
    }
  }
}

/**
 * Accumulates dispatches on an `SyntheticEvent`, but only for the
 * `dispatchMarker`.
 * @param {SyntheticEvent} event
 */
function accumulateDirectDispatchesSingle(event) {
  if (event && event.dispatchConfig.registrationName) {
    accumulateDispatches(event._targetInst, null, event);
  }
}

function accumulateTwoPhaseDispatches(events) {
  forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
}



function accumulateEnterLeaveDispatches(leave, enter, from, to) {
  traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
}

function accumulateDirectDispatches(events) {
  forEachAccumulated(events, accumulateDirectDispatchesSingle);
}

var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');

// Do not use the below two methods directly!
// Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.
// (It is the only module that is allowed to access these methods.)

function unsafeCastStringToDOMTopLevelType(topLevelType) {
  return topLevelType;
}

function unsafeCastDOMTopLevelTypeToString(topLevelType) {
  return topLevelType;
}

/**
 * Generate a mapping of standard vendor prefixes using the defined style property and event name.
 *
 * @param {string} styleProp
 * @param {string} eventName
 * @returns {object}
 */
function makePrefixMap(styleProp, eventName) {
  var prefixes = {};

  prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
  prefixes['Webkit' + styleProp] = 'webkit' + eventName;
  prefixes['Moz' + styleProp] = 'moz' + eventName;

  return prefixes;
}

/**
 * A list of event names to a configurable list of vendor prefixes.
 */
var vendorPrefixes = {
  animationend: makePrefixMap('Animation', 'AnimationEnd'),
  animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
  animationstart: makePrefixMap('Animation', 'AnimationStart'),
  transitionend: makePrefixMap('Transition', 'TransitionEnd')
};

/**
 * Event names that have already been detected and prefixed (if applicable).
 */
var prefixedEventNames = {};

/**
 * Element to check for prefixes on.
 */
var style = {};

/**
 * Bootstrap if a DOM exists.
 */
if (canUseDOM) {
  style = document.createElement('div').style;

  // On some platforms, in particular some releases of Android 4.x,
  // the un-prefixed "animation" and "transition" properties are defined on the
  // style object but the events that fire will still be prefixed, so we need
  // to check if the un-prefixed events are usable, and if not remove them from the map.
  if (!('AnimationEvent' in window)) {
    delete vendorPrefixes.animationend.animation;
    delete vendorPrefixes.animationiteration.animation;
    delete vendorPrefixes.animationstart.animation;
  }

  // Same as above
  if (!('TransitionEvent' in window)) {
    delete vendorPrefixes.transitionend.transition;
  }
}

/**
 * Attempts to determine the correct vendor prefixed event name.
 *
 * @param {string} eventName
 * @returns {string}
 */
function getVendorPrefixedEventName(eventName) {
  if (prefixedEventNames[eventName]) {
    return prefixedEventNames[eventName];
  } else if (!vendorPrefixes[eventName]) {
    return eventName;
  }

  var prefixMap = vendorPrefixes[eventName];

  for (var styleProp in prefixMap) {
    if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
      return prefixedEventNames[eventName] = prefixMap[styleProp];
    }
  }

  return eventName;
}

/**
 * To identify top level events in ReactDOM, we use constants defined by this
 * module. This is the only module that uses the unsafe* methods to express
 * that the constants actually correspond to the browser event names. This lets
 * us save some bundle size by avoiding a top level type -> event name map.
 * The rest of ReactDOM code should import top level types from this file.
 */
var TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort');
var TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationend'));
var TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationiteration'));
var TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationstart'));
var TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur');
var TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay');
var TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough');
var TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel');
var TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change');
var TOP_CLICK = unsafeCastStringToDOMTopLevelType('click');
var TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close');
var TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend');
var TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart');
var TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate');
var TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu');
var TOP_COPY = unsafeCastStringToDOMTopLevelType('copy');
var TOP_CUT = unsafeCastStringToDOMTopLevelType('cut');
var TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick');
var TOP_AUX_CLICK = unsafeCastStringToDOMTopLevelType('auxclick');
var TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag');
var TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend');
var TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter');
var TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit');
var TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave');
var TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover');
var TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart');
var TOP_DROP = unsafeCastStringToDOMTopLevelType('drop');
var TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange');
var TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied');
var TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted');
var TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended');
var TOP_ERROR = unsafeCastStringToDOMTopLevelType('error');
var TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus');
var TOP_GOT_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('gotpointercapture');
var TOP_INPUT = unsafeCastStringToDOMTopLevelType('input');
var TOP_INVALID = unsafeCastStringToDOMTopLevelType('invalid');
var TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown');
var TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress');
var TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup');
var TOP_LOAD = unsafeCastStringToDOMTopLevelType('load');
var TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart');
var TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata');
var TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata');
var TOP_LOST_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('lostpointercapture');
var TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown');
var TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove');
var TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout');
var TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover');
var TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup');
var TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste');
var TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause');
var TOP_PLAY = unsafeCastStringToDOMTopLevelType('play');
var TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing');
var TOP_POINTER_CANCEL = unsafeCastStringToDOMTopLevelType('pointercancel');
var TOP_POINTER_DOWN = unsafeCastStringToDOMTopLevelType('pointerdown');


var TOP_POINTER_MOVE = unsafeCastStringToDOMTopLevelType('pointermove');
var TOP_POINTER_OUT = unsafeCastStringToDOMTopLevelType('pointerout');
var TOP_POINTER_OVER = unsafeCastStringToDOMTopLevelType('pointerover');
var TOP_POINTER_UP = unsafeCastStringToDOMTopLevelType('pointerup');
var TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress');
var TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange');
var TOP_RESET = unsafeCastStringToDOMTopLevelType('reset');
var TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll');
var TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked');
var TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking');
var TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange');
var TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled');
var TOP_SUBMIT = unsafeCastStringToDOMTopLevelType('submit');
var TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend');
var TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput');
var TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate');
var TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle');
var TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel');
var TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend');
var TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove');
var TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart');
var TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('transitionend'));
var TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange');
var TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting');
var TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel');

// List of events that need to be individually attached to media elements.
// Note that events in this list will *not* be listened to at the top level
// unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`.
var mediaEventTypes = [TOP_ABORT, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_VOLUME_CHANGE, TOP_WAITING];

function getRawEventName(topLevelType) {
  return unsafeCastDOMTopLevelTypeToString(topLevelType);
}

/**
 * These variables store information about text content of a target node,
 * allowing comparison of content before and after a given event.
 *
 * Identify the node where selection currently begins, then observe
 * both its text content and its current position in the DOM. Since the
 * browser may natively replace the target node during composition, we can
 * use its position to find its replacement.
 *
 *
 */

var root = null;
var startText = null;
var fallbackText = null;

function initialize(nativeEventTarget) {
  root = nativeEventTarget;
  startText = getText();
  return true;
}

function reset() {
  root = null;
  startText = null;
  fallbackText = null;
}

function getData() {
  if (fallbackText) {
    return fallbackText;
  }

  var start = void 0;
  var startValue = startText;
  var startLength = startValue.length;
  var end = void 0;
  var endValue = getText();
  var endLength = endValue.length;

  for (start = 0; start < startLength; start++) {
    if (startValue[start] !== endValue[start]) {
      break;
    }
  }

  var minEnd = startLength - start;
  for (end = 1; end <= minEnd; end++) {
    if (startValue[startLength - end] !== endValue[endLength - end]) {
      break;
    }
  }

  var sliceTail = end > 1 ? 1 - end : undefined;
  fallbackText = endValue.slice(start, sliceTail);
  return fallbackText;
}

function getText() {
  if ('value' in root) {
    return root.value;
  }
  return root.textContent;
}

/* eslint valid-typeof: 0 */

var EVENT_POOL_SIZE = 10;

/**
 * @interface Event
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */
var EventInterface = {
  type: null,
  target: null,
  // currentTarget is set when dispatching; no use in copying it here
  currentTarget: function () {
    return null;
  },
  eventPhase: null,
  bubbles: null,
  cancelable: null,
  timeStamp: function (event) {
    return event.timeStamp || Date.now();
  },
  defaultPrevented: null,
  isTrusted: null
};

function functionThatReturnsTrue() {
  return true;
}

function functionThatReturnsFalse() {
  return false;
}

/**
 * Synthetic events are dispatched by event plugins, typically in response to a
 * top-level event delegation handler.
 *
 * These systems should generally use pooling to reduce the frequency of garbage
 * collection. The system should check `isPersistent` to determine whether the
 * event should be released into the pool after being dispatched. Users that
 * need a persisted event should invoke `persist`.
 *
 * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
 * normalizing browser quirks. Subclasses do not necessarily have to implement a
 * DOM interface; custom application-specific events can also subclass this.
 *
 * @param {object} dispatchConfig Configuration used to dispatch this event.
 * @param {*} targetInst Marker identifying the event target.
 * @param {object} nativeEvent Native browser event.
 * @param {DOMEventTarget} nativeEventTarget Target node.
 */
function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
  {
    // these have a getter/setter for warnings
    delete this.nativeEvent;
    delete this.preventDefault;
    delete this.stopPropagation;
    delete this.isDefaultPrevented;
    delete this.isPropagationStopped;
  }

  this.dispatchConfig = dispatchConfig;
  this._targetInst = targetInst;
  this.nativeEvent = nativeEvent;

  var Interface = this.constructor.Interface;
  for (var propName in Interface) {
    if (!Interface.hasOwnProperty(propName)) {
      continue;
    }
    {
      delete this[propName]; // this has a getter/setter for warnings
    }
    var normalize = Interface[propName];
    if (normalize) {
      this[propName] = normalize(nativeEvent);
    } else {
      if (propName === 'target') {
        this.target = nativeEventTarget;
      } else {
        this[propName] = nativeEvent[propName];
      }
    }
  }

  var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
  if (defaultPrevented) {
    this.isDefaultPrevented = functionThatReturnsTrue;
  } else {
    this.isDefaultPrevented = functionThatReturnsFalse;
  }
  this.isPropagationStopped = functionThatReturnsFalse;
  return this;
}

_assign(SyntheticEvent.prototype, {
  preventDefault: function () {
    this.defaultPrevented = true;
    var event = this.nativeEvent;
    if (!event) {
      return;
    }

    if (event.preventDefault) {
      event.preventDefault();
    } else if (typeof event.returnValue !== 'unknown') {
      event.returnValue = false;
    }
    this.isDefaultPrevented = functionThatReturnsTrue;
  },

  stopPropagation: function () {
    var event = this.nativeEvent;
    if (!event) {
      return;
    }

    if (event.stopPropagation) {
      event.stopPropagation();
    } else if (typeof event.cancelBubble !== 'unknown') {
      // The ChangeEventPlugin registers a "propertychange" event for
      // IE. This event does not support bubbling or cancelling, and
      // any references to cancelBubble throw "Member not found".  A
      // typeof check of "unknown" circumvents this issue (and is also
      // IE specific).
      event.cancelBubble = true;
    }

    this.isPropagationStopped = functionThatReturnsTrue;
  },

  /**
   * We release all dispatched `SyntheticEvent`s after each event loop, adding
   * them back into the pool. This allows a way to hold onto a reference that
   * won't be added back into the pool.
   */
  persist: function () {
    this.isPersistent = functionThatReturnsTrue;
  },

  /**
   * Checks if this event should be released back into the pool.
   *
   * @return {boolean} True if this should not be released, false otherwise.
   */
  isPersistent: functionThatReturnsFalse,

  /**
   * `PooledClass` looks for `destructor` on each instance it releases.
   */
  destructor: function () {
    var Interface = this.constructor.Interface;
    for (var propName in Interface) {
      {
        Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
      }
    }
    this.dispatchConfig = null;
    this._targetInst = null;
    this.nativeEvent = null;
    this.isDefaultPrevented = functionThatReturnsFalse;
    this.isPropagationStopped = functionThatReturnsFalse;
    this._dispatchListeners = null;
    this._dispatchInstances = null;
    {
      Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
      Object.defineProperty(this, 'isDefaultPrevented', getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse));
      Object.defineProperty(this, 'isPropagationStopped', getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse));
      Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', function () {}));
      Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', function () {}));
    }
  }
});

SyntheticEvent.Interface = EventInterface;

/**
 * Helper to reduce boilerplate when creating subclasses.
 */
SyntheticEvent.extend = function (Interface) {
  var Super = this;

  var E = function () {};
  E.prototype = Super.prototype;
  var prototype = new E();

  function Class() {
    return Super.apply(this, arguments);
  }
  _assign(prototype, Class.prototype);
  Class.prototype = prototype;
  Class.prototype.constructor = Class;

  Class.Interface = _assign({}, Super.Interface, Interface);
  Class.extend = Super.extend;
  addEventPoolingTo(Class);

  return Class;
};

addEventPoolingTo(SyntheticEvent);

/**
 * Helper to nullify syntheticEvent instance properties when destructing
 *
 * @param {String} propName
 * @param {?object} getVal
 * @return {object} defineProperty object
 */
function getPooledWarningPropertyDefinition(propName, getVal) {
  var isFunction = typeof getVal === 'function';
  return {
    configurable: true,
    set: set,
    get: get
  };

  function set(val) {
    var action = isFunction ? 'setting the method' : 'setting the property';
    warn(action, 'This is effectively a no-op');
    return val;
  }

  function get() {
    var action = isFunction ? 'accessing the method' : 'accessing the property';
    var result = isFunction ? 'This is a no-op function' : 'This is set to null';
    warn(action, result);
    return getVal;
  }

  function warn(action, result) {
    var warningCondition = false;
    !warningCondition ? warningWithoutStack$1(false, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
  }
}

function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
  var EventConstructor = this;
  if (EventConstructor.eventPool.length) {
    var instance = EventConstructor.eventPool.pop();
    EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
    return instance;
  }
  return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst);
}

function releasePooledEvent(event) {
  var EventConstructor = this;
  (function () {
    if (!(event instanceof EventConstructor)) {
      {
        throw ReactError(Error('Trying to release an event instance into a pool of a different type.'));
      }
    }
  })();
  event.destructor();
  if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {
    EventConstructor.eventPool.push(event);
  }
}

function addEventPoolingTo(EventConstructor) {
  EventConstructor.eventPool = [];
  EventConstructor.getPooled = getPooledEvent;
  EventConstructor.release = releasePooledEvent;
}

/**
 * @interface Event
 * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
 */
var SyntheticCompositionEvent = SyntheticEvent.extend({
  data: null
});

/**
 * @interface Event
 * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
 *      /#events-inputevents
 */
var SyntheticInputEvent = SyntheticEvent.extend({
  data: null
});

var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
var START_KEYCODE = 229;

var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;

var documentMode = null;
if (canUseDOM && 'documentMode' in document) {
  documentMode = document.documentMode;
}

// Webkit offers a very useful `textInput` event that can be used to
// directly represent `beforeInput`. The IE `textinput` event is not as
// useful, so we don't use it.
var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode;

// In IE9+, we have access to composition events, but the data supplied
// by the native compositionend event may be incorrect. Japanese ideographic
// spaces, for instance (\u3000) are not recorded correctly.
var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);

var SPACEBAR_CODE = 32;
var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);

// Events and their corresponding property names.
var eventTypes = {
  beforeInput: {
    phasedRegistrationNames: {
      bubbled: 'onBeforeInput',
      captured: 'onBeforeInputCapture'
    },
    dependencies: [TOP_COMPOSITION_END, TOP_KEY_PRESS, TOP_TEXT_INPUT, TOP_PASTE]
  },
  compositionEnd: {
    phasedRegistrationNames: {
      bubbled: 'onCompositionEnd',
      captured: 'onCompositionEndCapture'
    },
    dependencies: [TOP_BLUR, TOP_COMPOSITION_END, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
  },
  compositionStart: {
    phasedRegistrationNames: {
      bubbled: 'onCompositionStart',
      captured: 'onCompositionStartCapture'
    },
    dependencies: [TOP_BLUR, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
  },
  compositionUpdate: {
    phasedRegistrationNames: {
      bubbled: 'onCompositionUpdate',
      captured: 'onCompositionUpdateCapture'
    },
    dependencies: [TOP_BLUR, TOP_COMPOSITION_UPDATE, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
  }
};

// Track whether we've ever handled a keypress on the space key.
var hasSpaceKeypress = false;

/**
 * Return whether a native keypress event is assumed to be a command.
 * This is required because Firefox fires `keypress` events for key commands
 * (cut, copy, select-all, etc.) even though no character is inserted.
 */
function isKeypressCommand(nativeEvent) {
  return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
  // ctrlKey && altKey is equivalent to AltGr, and is not a command.
  !(nativeEvent.ctrlKey && nativeEvent.altKey);
}

/**
 * Translate native top level events into event types.
 *
 * @param {string} topLevelType
 * @return {object}
 */
function getCompositionEventType(topLevelType) {
  switch (topLevelType) {
    case TOP_COMPOSITION_START:
      return eventTypes.compositionStart;
    case TOP_COMPOSITION_END:
      return eventTypes.compositionEnd;
    case TOP_COMPOSITION_UPDATE:
      return eventTypes.compositionUpdate;
  }
}

/**
 * Does our fallback best-guess model think this event signifies that
 * composition has begun?
 *
 * @param {string} topLevelType
 * @param {object} nativeEvent
 * @return {boolean}
 */
function isFallbackCompositionStart(topLevelType, nativeEvent) {
  return topLevelType === TOP_KEY_DOWN && nativeEvent.keyCode === START_KEYCODE;
}

/**
 * Does our fallback mode think that this event is the end of composition?
 *
 * @param {string} topLevelType
 * @param {object} nativeEvent
 * @return {boolean}
 */
function isFallbackCompositionEnd(topLevelType, nativeEvent) {
  switch (topLevelType) {
    case TOP_KEY_UP:
      // Command keys insert or clear IME input.
      return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
    case TOP_KEY_DOWN:
      // Expect IME keyCode on each keydown. If we get any other
      // code we must have exited earlier.
      return nativeEvent.keyCode !== START_KEYCODE;
    case TOP_KEY_PRESS:
    case TOP_MOUSE_DOWN:
    case TOP_BLUR:
      // Events are not possible without cancelling IME.
      return true;
    default:
      return false;
  }
}

/**
 * Google Input Tools provides composition data via a CustomEvent,
 * with the `data` property populated in the `detail` object. If this
 * is available on the event object, use it. If not, this is a plain
 * composition event and we have nothing special to extract.
 *
 * @param {object} nativeEvent
 * @return {?string}
 */
function getDataFromCustomEvent(nativeEvent) {
  var detail = nativeEvent.detail;
  if (typeof detail === 'object' && 'data' in detail) {
    return detail.data;
  }
  return null;
}

/**
 * Check if a composition event was triggered by Korean IME.
 * Our fallback mode does not work well with IE's Korean IME,
 * so just use native composition events when Korean IME is used.
 * Although CompositionEvent.locale property is deprecated,
 * it is available in IE, where our fallback mode is enabled.
 *
 * @param {object} nativeEvent
 * @return {boolean}
 */
function isUsingKoreanIME(nativeEvent) {
  return nativeEvent.locale === 'ko';
}

// Track the current IME composition status, if any.
var isComposing = false;

/**
 * @return {?object} A SyntheticCompositionEvent.
 */
function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  var eventType = void 0;
  var fallbackData = void 0;

  if (canUseCompositionEvent) {
    eventType = getCompositionEventType(topLevelType);
  } else if (!isComposing) {
    if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
      eventType = eventTypes.compositionStart;
    }
  } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
    eventType = eventTypes.compositionEnd;
  }

  if (!eventType) {
    return null;
  }

  if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
    // The current composition is stored statically and must not be
    // overwritten while composition continues.
    if (!isComposing && eventType === eventTypes.compositionStart) {
      isComposing = initialize(nativeEventTarget);
    } else if (eventType === eventTypes.compositionEnd) {
      if (isComposing) {
        fallbackData = getData();
      }
    }
  }

  var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);

  if (fallbackData) {
    // Inject data generated from fallback path into the synthetic event.
    // This matches the property of native CompositionEventInterface.
    event.data = fallbackData;
  } else {
    var customData = getDataFromCustomEvent(nativeEvent);
    if (customData !== null) {
      event.data = customData;
    }
  }

  accumulateTwoPhaseDispatches(event);
  return event;
}

/**
 * @param {TopLevelType} topLevelType Number from `TopLevelType`.
 * @param {object} nativeEvent Native browser event.
 * @return {?string} The string corresponding to this `beforeInput` event.
 */
function getNativeBeforeInputChars(topLevelType, nativeEvent) {
  switch (topLevelType) {
    case TOP_COMPOSITION_END:
      return getDataFromCustomEvent(nativeEvent);
    case TOP_KEY_PRESS:
      /**
       * If native `textInput` events are available, our goal is to make
       * use of them. However, there is a special case: the spacebar key.
       * In Webkit, preventing default on a spacebar `textInput` event
       * cancels character insertion, but it *also* causes the browser
       * to fall back to its default spacebar behavior of scrolling the
       * page.
       *
       * Tracking at:
       * https://code.google.com/p/chromium/issues/detail?id=355103
       *
       * To avoid this issue, use the keypress event as if no `textInput`
       * event is available.
       */
      var which = nativeEvent.which;
      if (which !== SPACEBAR_CODE) {
        return null;
      }

      hasSpaceKeypress = true;
      return SPACEBAR_CHAR;

    case TOP_TEXT_INPUT:
      // Record the characters to be added to the DOM.
      var chars = nativeEvent.data;

      // If it's a spacebar character, assume that we have already handled
      // it at the keypress level and bail immediately. Android Chrome
      // doesn't give us keycodes, so we need to ignore it.
      if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
        return null;
      }

      return chars;

    default:
      // For other native event types, do nothing.
      return null;
  }
}

/**
 * For browsers that do not provide the `textInput` event, extract the
 * appropriate string to use for SyntheticInputEvent.
 *
 * @param {number} topLevelType Number from `TopLevelEventTypes`.
 * @param {object} nativeEvent Native browser event.
 * @return {?string} The fallback string for this `beforeInput` event.
 */
function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
  // If we are currently composing (IME) and using a fallback to do so,
  // try to extract the composed characters from the fallback object.
  // If composition event is available, we extract a string only at
  // compositionevent, otherwise extract it at fallback events.
  if (isComposing) {
    if (topLevelType === TOP_COMPOSITION_END || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
      var chars = getData();
      reset();
      isComposing = false;
      return chars;
    }
    return null;
  }

  switch (topLevelType) {
    case TOP_PASTE:
      // If a paste event occurs after a keypress, throw out the input
      // chars. Paste events should not lead to BeforeInput events.
      return null;
    case TOP_KEY_PRESS:
      /**
       * As of v27, Firefox may fire keypress events even when no character
       * will be inserted. A few possibilities:
       *
       * - `which` is `0`. Arrow keys, Esc key, etc.
       *
       * - `which` is the pressed key code, but no char is available.
       *   Ex: 'AltGr + d` in Polish. There is no modified character for
       *   this key combination and no character is inserted into the
       *   document, but FF fires the keypress for char code `100` anyway.
       *   No `input` event will occur.
       *
       * - `which` is the pressed key code, but a command combination is
       *   being used. Ex: `Cmd+C`. No character is inserted, and no
       *   `input` event will occur.
       */
      if (!isKeypressCommand(nativeEvent)) {
        // IE fires the `keypress` event when a user types an emoji via
        // Touch keyboard of Windows.  In such a case, the `char` property
        // holds an emoji character like `\uD83D\uDE0A`.  Because its length
        // is 2, the property `which` does not represent an emoji correctly.
        // In such a case, we directly return the `char` property instead of
        // using `which`.
        if (nativeEvent.char && nativeEvent.char.length > 1) {
          return nativeEvent.char;
        } else if (nativeEvent.which) {
          return String.fromCharCode(nativeEvent.which);
        }
      }
      return null;
    case TOP_COMPOSITION_END:
      return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;
    default:
      return null;
  }
}

/**
 * Extract a SyntheticInputEvent for `beforeInput`, based on either native
 * `textInput` or fallback behavior.
 *
 * @return {?object} A SyntheticInputEvent.
 */
function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  var chars = void 0;

  if (canUseTextInputEvent) {
    chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
  } else {
    chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
  }

  // If no characters are being inserted, no BeforeInput event should
  // be fired.
  if (!chars) {
    return null;
  }

  var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);

  event.data = chars;
  accumulateTwoPhaseDispatches(event);
  return event;
}

/**
 * Create an `onBeforeInput` event to match
 * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
 *
 * This event plugin is based on the native `textInput` event
 * available in Chrome, Safari, Opera, and IE. This event fires after
 * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
 *
 * `beforeInput` is spec'd but not implemented in any browsers, and
 * the `input` event does not provide any useful information about what has
 * actually been added, contrary to the spec. Thus, `textInput` is the best
 * available event to identify the characters that have actually been inserted
 * into the target node.
 *
 * This plugin is also responsible for emitting `composition` events, thus
 * allowing us to share composition fallback code for both `beforeInput` and
 * `composition` event types.
 */
var BeforeInputEventPlugin = {
  eventTypes: eventTypes,

  extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
    var composition = extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);

    var beforeInput = extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);

    if (composition === null) {
      return beforeInput;
    }

    if (beforeInput === null) {
      return composition;
    }

    return [composition, beforeInput];
  }
};

// Use to restore controlled state after a change event has fired.

var restoreImpl = null;
var restoreTarget = null;
var restoreQueue = null;

function restoreStateOfTarget(target) {
  // We perform this translation at the end of the event loop so that we
  // always receive the correct fiber here
  var internalInstance = getInstanceFromNode(target);
  if (!internalInstance) {
    // Unmounted
    return;
  }
  (function () {
    if (!(typeof restoreImpl === 'function')) {
      {
        throw ReactError(Error('setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.'));
      }
    }
  })();
  var props = getFiberCurrentPropsFromNode(internalInstance.stateNode);
  restoreImpl(internalInstance.stateNode, internalInstance.type, props);
}

function setRestoreImplementation(impl) {
  restoreImpl = impl;
}

function enqueueStateRestore(target) {
  if (restoreTarget) {
    if (restoreQueue) {
      restoreQueue.push(target);
    } else {
      restoreQueue = [target];
    }
  } else {
    restoreTarget = target;
  }
}

function needsStateRestore() {
  return restoreTarget !== null || restoreQueue !== null;
}

function restoreStateIfNeeded() {
  if (!restoreTarget) {
    return;
  }
  var target = restoreTarget;
  var queuedTargets = restoreQueue;
  restoreTarget = null;
  restoreQueue = null;

  restoreStateOfTarget(target);
  if (queuedTargets) {
    for (var i = 0; i < queuedTargets.length; i++) {
      restoreStateOfTarget(queuedTargets[i]);
    }
  }
}

var enableUserTimingAPI = true;

// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
var debugRenderPhaseSideEffects = false;

// In some cases, StrictMode should also double-render lifecycles.
// This can be confusing for tests though,
// And it can be bad for performance in production.
// This feature flag can be used to control the behavior:
var debugRenderPhaseSideEffectsForStrictMode = true;

// To preserve the "Pause on caught exceptions" behavior of the debugger, we
// replay the begin phase of a failed component inside invokeGuardedCallback.
var replayFailedUnitOfWorkWithInvokeGuardedCallback = true;

// Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
var warnAboutDeprecatedLifecycles = true;

// Gather advanced timing metrics for Profiler subtrees.
var enableProfilerTimer = true;

// Trace which interactions trigger each commit.
var enableSchedulerTracing = true;

// Only used in www builds.
var enableSuspenseServerRenderer = false; // TODO: true? Here it might just be false.

// Only used in www builds.


// Only used in www builds.


// Disable javascript: URL strings in href for XSS protection.
var disableJavaScriptURLs = false;

// React Fire: prevent the value and checked attributes from syncing
// with their related DOM properties
var disableInputAttributeSyncing = false;

// These APIs will no longer be "unstable" in the upcoming 16.7 release,
// Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
var enableStableConcurrentModeAPIs = false;

var warnAboutShorthandPropertyCollision = false;

// See https://github.com/react-native-community/discussions-and-proposals/issues/72 for more information
// This is a flag so we can fix warnings in RN core before turning it on


// Experimental React Flare event system and event components support.
var enableFlareAPI = false;

// Experimental Host Component support.
var enableFundamentalAPI = false;

// New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107


// We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?)
// Till then, we warn about the missing mock, but still fallback to a sync mode compatible version
var warnAboutUnmockedScheduler = false;
// Temporary flag to revert the fix in #15650
var revertPassiveEffectsChange = false;

// For tests, we flush suspense fallbacks in an act scope;
// *except* in some of our own tests, where we test incremental loading states.
var flushSuspenseFallbacksInTests = true;

// Changes priority of some events like mousemove to user-blocking priority,
// but without making them discrete. The flag exists in case it causes
// starvation problems.
var enableUserBlockingEvents = false;

// Add a callback property to suspense to notify which promises are currently
// in the update queue. This allows reporting and tracing of what is causing
// the user to see a loading state.
var enableSuspenseCallback = false;

// Part of the simplification of React.createElement so we can eventually move
// from React.createElement to React.jsx
// https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md
var warnAboutDefaultPropsOnFunctionComponents = false;

var disableLegacyContext = false;

var disableSchedulerTimeoutBasedOnReactExpirationTime = false;

// Used as a way to call batchedUpdates when we don't have a reference to
// the renderer. Such as when we're dispatching events or if third party
// libraries need to call batchedUpdates. Eventually, this API will go away when
// everything is batched by default. We'll then have a similar API to opt-out of
// scheduled work and instead do synchronous work.

// Defaults
var batchedUpdatesImpl = function (fn, bookkeeping) {
  return fn(bookkeeping);
};
var discreteUpdatesImpl = function (fn, a, b, c) {
  return fn(a, b, c);
};
var flushDiscreteUpdatesImpl = function () {};
var batchedEventUpdatesImpl = batchedUpdatesImpl;

var isInsideEventHandler = false;

function finishEventHandler() {
  // Here we wait until all updates have propagated, which is important
  // when using controlled components within layers:
  // https://github.com/facebook/react/issues/1698
  // Then we restore state of any controlled component.
  var controlledComponentsHavePendingUpdates = needsStateRestore();
  if (controlledComponentsHavePendingUpdates) {
    // If a controlled event was fired, we may need to restore the state of
    // the DOM node back to the controlled value. This is necessary when React
    // bails out of the update without touching the DOM.
    flushDiscreteUpdatesImpl();
    restoreStateIfNeeded();
  }
}

function batchedUpdates(fn, bookkeeping) {
  if (isInsideEventHandler) {
    // If we are currently inside another batch, we need to wait until it
    // fully completes before restoring state.
    return fn(bookkeeping);
  }
  isInsideEventHandler = true;
  try {
    return batchedUpdatesImpl(fn, bookkeeping);
  } finally {
    isInsideEventHandler = false;
    finishEventHandler();
  }
}

function batchedEventUpdates(fn, a, b) {
  if (isInsideEventHandler) {
    // If we are currently inside another batch, we need to wait until it
    // fully completes before restoring state.
    return fn(a, b);
  }
  isInsideEventHandler = true;
  try {
    return batchedEventUpdatesImpl(fn, a, b);
  } finally {
    isInsideEventHandler = false;
    finishEventHandler();
  }
}

function discreteUpdates(fn, a, b, c) {
  var prevIsInsideEventHandler = isInsideEventHandler;
  isInsideEventHandler = true;
  try {
    return discreteUpdatesImpl(fn, a, b, c);
  } finally {
    isInsideEventHandler = prevIsInsideEventHandler;
    if (!isInsideEventHandler) {
      finishEventHandler();
    }
  }
}

var lastFlushedEventTimeStamp = 0;
function flushDiscreteUpdatesIfNeeded(timeStamp) {
  // event.timeStamp isn't overly reliable due to inconsistencies in
  // how different browsers have historically provided the time stamp.
  // Some browsers provide high-resolution time stamps for all events,
  // some provide low-resolution time stamps for all events. FF < 52
  // even mixes both time stamps together. Some browsers even report
  // negative time stamps or time stamps that are 0 (iOS9) in some cases.
  // Given we are only comparing two time stamps with equality (!==),
  // we are safe from the resolution differences. If the time stamp is 0
  // we bail-out of preventing the flush, which can affect semantics,
  // such as if an earlier flush removes or adds event listeners that
  // are fired in the subsequent flush. However, this is the same
  // behaviour as we had before this change, so the risks are low.
  if (!isInsideEventHandler && (!enableFlareAPI || timeStamp === 0 || lastFlushedEventTimeStamp !== timeStamp)) {
    lastFlushedEventTimeStamp = timeStamp;
    flushDiscreteUpdatesImpl();
  }
}

function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {
  batchedUpdatesImpl = _batchedUpdatesImpl;
  discreteUpdatesImpl = _discreteUpdatesImpl;
  flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;
  batchedEventUpdatesImpl = _batchedEventUpdatesImpl;
}

/**
 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
 */
var supportedInputTypes = {
  color: true,
  date: true,
  datetime: true,
  'datetime-local': true,
  email: true,
  month: true,
  number: true,
  password: true,
  range: true,
  search: true,
  tel: true,
  text: true,
  time: true,
  url: true,
  week: true
};

function isTextInputElement(elem) {
  var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();

  if (nodeName === 'input') {
    return !!supportedInputTypes[elem.type];
  }

  if (nodeName === 'textarea') {
    return true;
  }

  return false;
}

/**
 * HTML nodeType values that represent the type of the node
 */

var ELEMENT_NODE = 1;
var TEXT_NODE = 3;
var COMMENT_NODE = 8;
var DOCUMENT_NODE = 9;
var DOCUMENT_FRAGMENT_NODE = 11;

/**
 * Gets the target node from a native browser event by accounting for
 * inconsistencies in browser DOM APIs.
 *
 * @param {object} nativeEvent Native browser event.
 * @return {DOMEventTarget} Target node.
 */
function getEventTarget(nativeEvent) {
  // Fallback to nativeEvent.srcElement for IE9
  // https://github.com/facebook/react/issues/12506
  var target = nativeEvent.target || nativeEvent.srcElement || window;

  // Normalize SVG <use> element events #4963
  if (target.correspondingUseElement) {
    target = target.correspondingUseElement;
  }

  // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
  // @see http://www.quirksmode.org/js/events_properties.html
  return target.nodeType === TEXT_NODE ? target.parentNode : target;
}

/**
 * Checks if an event is supported in the current execution environment.
 *
 * NOTE: This will not work correctly for non-generic events such as `change`,
 * `reset`, `load`, `error`, and `select`.
 *
 * Borrows from Modernizr.
 *
 * @param {string} eventNameSuffix Event name, e.g. "click".
 * @return {boolean} True if the event is supported.
 * @internal
 * @license Modernizr 3.0.0pre (Custom Build) | MIT
 */
function isEventSupported(eventNameSuffix) {
  if (!canUseDOM) {
    return false;
  }

  var eventName = 'on' + eventNameSuffix;
  var isSupported = eventName in document;

  if (!isSupported) {
    var element = document.createElement('div');
    element.setAttribute(eventName, 'return;');
    isSupported = typeof element[eventName] === 'function';
  }

  return isSupported;
}

function isCheckable(elem) {
  var type = elem.type;
  var nodeName = elem.nodeName;
  return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
}

function getTracker(node) {
  return node._valueTracker;
}

function detachTracker(node) {
  node._valueTracker = null;
}

function getValueFromNode(node) {
  var value = '';
  if (!node) {
    return value;
  }

  if (isCheckable(node)) {
    value = node.checked ? 'true' : 'false';
  } else {
    value = node.value;
  }

  return value;
}

function trackValueOnNode(node) {
  var valueField = isCheckable(node) ? 'checked' : 'value';
  var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);

  var currentValue = '' + node[valueField];

  // if someone has already defined a value or Safari, then bail
  // and don't track value will cause over reporting of changes,
  // but it's better then a hard failure
  // (needed for certain tests that spyOn input values and Safari)
  if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
    return;
  }
  var get = descriptor.get,
      set = descriptor.set;

  Object.defineProperty(node, valueField, {
    configurable: true,
    get: function () {
      return get.call(this);
    },
    set: function (value) {
      currentValue = '' + value;
      set.call(this, value);
    }
  });
  // We could've passed this the first time
  // but it triggers a bug in IE11 and Edge 14/15.
  // Calling defineProperty() again should be equivalent.
  // https://github.com/facebook/react/issues/11768
  Object.defineProperty(node, valueField, {
    enumerable: descriptor.enumerable
  });

  var tracker = {
    getValue: function () {
      return currentValue;
    },
    setValue: function (value) {
      currentValue = '' + value;
    },
    stopTracking: function () {
      detachTracker(node);
      delete node[valueField];
    }
  };
  return tracker;
}

function track(node) {
  if (getTracker(node)) {
    return;
  }

  // TODO: Once it's just Fiber we can move this to node._wrapperState
  node._valueTracker = trackValueOnNode(node);
}

function updateValueIfChanged(node) {
  if (!node) {
    return false;
  }

  var tracker = getTracker(node);
  // if there is no tracker at this point it's unlikely
  // that trying again will succeed
  if (!tracker) {
    return true;
  }

  var lastValue = tracker.getValue();
  var nextValue = getValueFromNode(node);
  if (nextValue !== lastValue) {
    tracker.setValue(nextValue);
    return true;
  }
  return false;
}

var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;

// Prevent newer renderers from RTE when used with older react package versions.
// Current owner and dispatcher used to share the same ref,
// but PR #14548 split them out to better support the react-debug-tools package.
if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
  ReactSharedInternals.ReactCurrentDispatcher = {
    current: null
  };
}
if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
  ReactSharedInternals.ReactCurrentBatchConfig = {
    suspense: null
  };
}

var BEFORE_SLASH_RE = /^(.*)[\\\/]/;

var describeComponentFrame = function (name, source, ownerName) {
  var sourceInfo = '';
  if (source) {
    var path = source.fileName;
    var fileName = path.replace(BEFORE_SLASH_RE, '');
    {
      // In DEV, include code for a common special case:
      // prefer "folder/index.js" instead of just "index.js".
      if (/^index\./.test(fileName)) {
        var match = path.match(BEFORE_SLASH_RE);
        if (match) {
          var pathBeforeSlash = match[1];
          if (pathBeforeSlash) {
            var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
            fileName = folderName + '/' + fileName;
          }
        }
      }
    }
    sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
  } else if (ownerName) {
    sourceInfo = ' (created by ' + ownerName + ')';
  }
  return '\n    in ' + (name || 'Unknown') + sourceInfo;
};

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

var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
// TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
// (unstable) APIs that have been removed. Can we remove the symbols?

var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;

var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = '@@iterator';

function getIteratorFn(maybeIterable) {
  if (maybeIterable === null || typeof maybeIterable !== 'object') {
    return null;
  }
  var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
  if (typeof maybeIterator === 'function') {
    return maybeIterator;
  }
  return null;
}

var Pending = 0;
var Resolved = 1;
var Rejected = 2;

function refineResolvedLazyComponent(lazyComponent) {
  return lazyComponent._status === Resolved ? lazyComponent._result : null;
}

function getWrappedName(outerType, innerType, wrapperName) {
  var functionName = innerType.displayName || innerType.name || '';
  return outerType.displayName || (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName);
}

function getComponentName(type) {
  if (type == null) {
    // Host root, text node or just invalid type.
    return null;
  }
  {
    if (typeof type.tag === 'number') {
      warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
    }
  }
  if (typeof type === 'function') {
    return type.displayName || type.name || null;
  }
  if (typeof type === 'string') {
    return type;
  }
  switch (type) {
    case REACT_FRAGMENT_TYPE:
      return 'Fragment';
    case REACT_PORTAL_TYPE:
      return 'Portal';
    case REACT_PROFILER_TYPE:
      return 'Profiler';
    case REACT_STRICT_MODE_TYPE:
      return 'StrictMode';
    case REACT_SUSPENSE_TYPE:
      return 'Suspense';
    case REACT_SUSPENSE_LIST_TYPE:
      return 'SuspenseList';
  }
  if (typeof type === 'object') {
    switch (type.$$typeof) {
      case REACT_CONTEXT_TYPE:
        return 'Context.Consumer';
      case REACT_PROVIDER_TYPE:
        return 'Context.Provider';
      case REACT_FORWARD_REF_TYPE:
        return getWrappedName(type, type.render, 'ForwardRef');
      case REACT_MEMO_TYPE:
        return getComponentName(type.type);
      case REACT_LAZY_TYPE:
        {
          var thenable = type;
          var resolvedThenable = refineResolvedLazyComponent(thenable);
          if (resolvedThenable) {
            return getComponentName(resolvedThenable);
          }
          break;
        }
    }
  }
  return null;
}

var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;

function describeFiber(fiber) {
  switch (fiber.tag) {
    case HostRoot:
    case HostPortal:
    case HostText:
    case Fragment:
    case ContextProvider:
    case ContextConsumer:
      return '';
    default:
      var owner = fiber._debugOwner;
      var source = fiber._debugSource;
      var name = getComponentName(fiber.type);
      var ownerName = null;
      if (owner) {
        ownerName = getComponentName(owner.type);
      }
      return describeComponentFrame(name, source, ownerName);
  }
}

function getStackByFiberInDevAndProd(workInProgress) {
  var info = '';
  var node = workInProgress;
  do {
    info += describeFiber(node);
    node = node.return;
  } while (node);
  return info;
}

var current = null;
var phase = null;

function getCurrentFiberOwnerNameInDevOrNull() {
  {
    if (current === null) {
      return null;
    }
    var owner = current._debugOwner;
    if (owner !== null && typeof owner !== 'undefined') {
      return getComponentName(owner.type);
    }
  }
  return null;
}

function getCurrentFiberStackInDev() {
  {
    if (current === null) {
      return '';
    }
    // Safe because if current fiber exists, we are reconciling,
    // and it is guaranteed to be the work-in-progress version.
    return getStackByFiberInDevAndProd(current);
  }
  return '';
}

function resetCurrentFiber() {
  {
    ReactDebugCurrentFrame.getCurrentStack = null;
    current = null;
    phase = null;
  }
}

function setCurrentFiber(fiber) {
  {
    ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;
    current = fiber;
    phase = null;
  }
}

function setCurrentPhase(lifeCyclePhase) {
  {
    phase = lifeCyclePhase;
  }
}

/**
 * Similar to invariant but only logs a warning if the condition is not met.
 * This can be used to log issues in development environments in critical
 * paths. Removing the logging code for production environments will keep the
 * same logic and follow the same code paths.
 */

var warning = warningWithoutStack$1;

{
  warning = function (condition, format) {
    if (condition) {
      return;
    }
    var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
    var stack = ReactDebugCurrentFrame.getStackAddendum();
    // eslint-disable-next-line react-internal/warning-and-invariant-args

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

    warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack]));
  };
}

var warning$1 = warning;

// A reserved attribute.
// It is handled by React separately and shouldn't be written to the DOM.
var RESERVED = 0;

// A simple string attribute.
// Attributes that aren't in the whitelist are presumed to have this type.
var STRING = 1;

// A string attribute that accepts booleans in React. In HTML, these are called
// "enumerated" attributes with "true" and "false" as possible values.
// When true, it should be set to a "true" string.
// When false, it should be set to a "false" string.
var BOOLEANISH_STRING = 2;

// A real boolean attribute.
// When true, it should be present (set either to an empty string or its name).
// When false, it should be omitted.
var BOOLEAN = 3;

// An attribute that can be used as a flag as well as with a value.
// When true, it should be present (set either to an empty string or its name).
// When false, it should be omitted.
// For any other value, should be present with that value.
var OVERLOADED_BOOLEAN = 4;

// An attribute that must be numeric or parse as a numeric.
// When falsy, it should be removed.
var NUMERIC = 5;

// An attribute that must be positive numeric or parse as a positive numeric.
// When falsy, it should be removed.
var POSITIVE_NUMERIC = 6;

/* eslint-disable max-len */
var ATTRIBUTE_NAME_START_CHAR = ':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';
/* eslint-enable max-len */
var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040';


var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');

var hasOwnProperty = Object.prototype.hasOwnProperty;
var illegalAttributeNameCache = {};
var validatedAttributeNameCache = {};

function isAttributeNameSafe(attributeName) {
  if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
    return true;
  }
  if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
    return false;
  }
  if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
    validatedAttributeNameCache[attributeName] = true;
    return true;
  }
  illegalAttributeNameCache[attributeName] = true;
  {
    warning$1(false, 'Invalid attribute name: `%s`', attributeName);
  }
  return false;
}

function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
  if (propertyInfo !== null) {
    return propertyInfo.type === RESERVED;
  }
  if (isCustomComponentTag) {
    return false;
  }
  if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
    return true;
  }
  return false;
}

function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
  if (propertyInfo !== null && propertyInfo.type === RESERVED) {
    return false;
  }
  switch (typeof value) {
    case 'function':
    // $FlowIssue symbol is perfectly valid here
    case 'symbol':
      // eslint-disable-line
      return true;
    case 'boolean':
      {
        if (isCustomComponentTag) {
          return false;
        }
        if (propertyInfo !== null) {
          return !propertyInfo.acceptsBooleans;
        } else {
          var prefix = name.toLowerCase().slice(0, 5);
          return prefix !== 'data-' && prefix !== 'aria-';
        }
      }
    default:
      return false;
  }
}

function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
  if (value === null || typeof value === 'undefined') {
    return true;
  }
  if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {
    return true;
  }
  if (isCustomComponentTag) {
    return false;
  }
  if (propertyInfo !== null) {
    switch (propertyInfo.type) {
      case BOOLEAN:
        return !value;
      case OVERLOADED_BOOLEAN:
        return value === false;
      case NUMERIC:
        return isNaN(value);
      case POSITIVE_NUMERIC:
        return isNaN(value) || value < 1;
    }
  }
  return false;
}

function getPropertyInfo(name) {
  return properties.hasOwnProperty(name) ? properties[name] : null;
}

function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL) {
  this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
  this.attributeName = attributeName;
  this.attributeNamespace = attributeNamespace;
  this.mustUseProperty = mustUseProperty;
  this.propertyName = name;
  this.type = type;
  this.sanitizeURL = sanitizeURL;
}

// When adding attributes to this list, be sure to also add them to
// the `possibleStandardNames` module to ensure casing and incorrect
// name warnings.
var properties = {};

// These props are reserved by React. They shouldn't be written to the DOM.
['children', 'dangerouslySetInnerHTML',
// TODO: This prevents the assignment of defaultValue to regular
// elements (not just inputs). Now that ReactDOMInput assigns to the
// defaultValue property -- do we need this?
'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'].forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
  name, // attributeName
  null, // attributeNamespace
  false);
} // sanitizeURL
);

// A few React string attributes have a different name.
// This is a mapping from React prop names to the attribute names.
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
  var name = _ref[0],
      attributeName = _ref[1];

  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
  attributeName, // attributeName
  null, // attributeNamespace
  false);
} // sanitizeURL
);

// These are "enumerated" HTML attributes that accept "true" and "false".
// In React, we let users pass `true` and `false` even though technically
// these aren't boolean attributes (they are coerced to strings).
['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
  name.toLowerCase(), // attributeName
  null, // attributeNamespace
  false);
} // sanitizeURL
);

// These are "enumerated" SVG attributes that accept "true" and "false".
// In React, we let users pass `true` and `false` even though technically
// these aren't boolean attributes (they are coerced to strings).
// Since these are SVG attributes, their attribute names are case-sensitive.
['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
  name, // attributeName
  null, // attributeNamespace
  false);
} // sanitizeURL
);

// These are HTML boolean attributes.
['allowFullScreen', 'async',
// Note: there is a special case that prevents it from being written to the DOM
// on the client side because the browsers are inconsistent. Instead we call focus().
'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless',
// Microdata
'itemScope'].forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
  name.toLowerCase(), // attributeName
  null, // attributeNamespace
  false);
} // sanitizeURL
);

// These are the few React props that we set as DOM properties
// rather than attributes. These are all booleans.
['checked',
// Note: `option.selected` is not updated if `select.multiple` is
// disabled with `removeAttribute`. We have special logic for handling this.
'multiple', 'muted', 'selected'].forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
  name, // attributeName
  null, // attributeNamespace
  false);
} // sanitizeURL
);

// These are HTML attributes that are "overloaded booleans": they behave like
// booleans, but can also accept a string value.
['capture', 'download'].forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
  name, // attributeName
  null, // attributeNamespace
  false);
} // sanitizeURL
);

// These are HTML attributes that must be positive numbers.
['cols', 'rows', 'size', 'span'].forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
  name, // attributeName
  null, // attributeNamespace
  false);
} // sanitizeURL
);

// These are HTML attributes that must be numbers.
['rowSpan', 'start'].forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
  name.toLowerCase(), // attributeName
  null, // attributeNamespace
  false);
} // sanitizeURL
);

var CAMELIZE = /[\-\:]([a-z])/g;
var capitalize = function (token) {
  return token[1].toUpperCase();
};

// This is a list of all SVG attributes that need special casing, namespacing,
// or boolean value assignment. Regular attributes that just accept strings
// and have the same names are omitted, just like in the HTML whitelist.
// Some of these attributes can be hard to find. This list was created by
// scrapping the MDN documentation.
['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'].forEach(function (attributeName) {
  var name = attributeName.replace(CAMELIZE, capitalize);
  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
  attributeName, null, // attributeNamespace
  false);
} // sanitizeURL
);

// String SVG attributes with the xlink namespace.
['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type'].forEach(function (attributeName) {
  var name = attributeName.replace(CAMELIZE, capitalize);
  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
  attributeName, 'http://www.w3.org/1999/xlink', false);
} // sanitizeURL
);

// String SVG attributes with the xml namespace.
['xml:base', 'xml:lang', 'xml:space'].forEach(function (attributeName) {
  var name = attributeName.replace(CAMELIZE, capitalize);
  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
  attributeName, 'http://www.w3.org/XML/1998/namespace', false);
} // sanitizeURL
);

// These attribute exists both in HTML and SVG.
// The attribute name is case-sensitive in SVG so we can't just use
// the React name like we do for attributes that exist only in HTML.
['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
  properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
  attributeName.toLowerCase(), // attributeName
  null, // attributeNamespace
  false);
} // sanitizeURL
);

// These attributes accept URLs. These must not allow javascript: URLS.
// These will also need to accept Trusted Types object in the future.
var xlinkHref = 'xlinkHref';
properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
'xlink:href', 'http://www.w3.org/1999/xlink', true);

['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
  properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
  attributeName.toLowerCase(), // attributeName
  null, // attributeNamespace
  true);
} // sanitizeURL
);

var ReactDebugCurrentFrame$1 = null;
{
  ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
}

// A javascript: URL can contain leading C0 control or \u0020 SPACE,
// and any newline or tab are filtered out as if they're not part of the URL.
// https://url.spec.whatwg.org/#url-parsing
// Tab or newline are defined as \r\n\t:
// https://infra.spec.whatwg.org/#ascii-tab-or-newline
// A C0 control is a code point in the range \u0000 NULL to \u001F
// INFORMATION SEPARATOR ONE, inclusive:
// https://infra.spec.whatwg.org/#c0-control-or-space

/* eslint-disable max-len */
var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;

var didWarn = false;

function sanitizeURL(url) {
  if (disableJavaScriptURLs) {
    (function () {
      if (!!isJavaScriptProtocol.test(url)) {
        {
          throw ReactError(Error('React has blocked a javascript: URL as a security precaution.' + (ReactDebugCurrentFrame$1.getStackAddendum())));
        }
      }
    })();
  } else if ( true && !didWarn && isJavaScriptProtocol.test(url)) {
    didWarn = true;
    warning$1(false, 'A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
  }
}

/**
 * Get the value for a property on a node. Only used in DEV for SSR validation.
 * The "expected" argument is used as a hint of what the expected value is.
 * Some properties have multiple equivalent values.
 */
function getValueForProperty(node, name, expected, propertyInfo) {
  {
    if (propertyInfo.mustUseProperty) {
      var propertyName = propertyInfo.propertyName;

      return node[propertyName];
    } else {
      if (!disableJavaScriptURLs && propertyInfo.sanitizeURL) {
        // If we haven't fully disabled javascript: URLs, and if
        // the hydration is successful of a javascript: URL, we
        // still want to warn on the client.
        sanitizeURL('' + expected);
      }

      var attributeName = propertyInfo.attributeName;

      var stringValue = null;

      if (propertyInfo.type === OVERLOADED_BOOLEAN) {
        if (node.hasAttribute(attributeName)) {
          var value = node.getAttribute(attributeName);
          if (value === '') {
            return true;
          }
          if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
            return value;
          }
          if (value === '' + expected) {
            return expected;
          }
          return value;
        }
      } else if (node.hasAttribute(attributeName)) {
        if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
          // We had an attribute but shouldn't have had one, so read it
          // for the error message.
          return node.getAttribute(attributeName);
        }
        if (propertyInfo.type === BOOLEAN) {
          // If this was a boolean, it doesn't matter what the value is
          // the fact that we have it is the same as the expected.
          return expected;
        }
        // Even if this property uses a namespace we use getAttribute
        // because we assume its namespaced name is the same as our config.
        // To use getAttributeNS we need the local name which we don't have
        // in our config atm.
        stringValue = node.getAttribute(attributeName);
      }

      if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
        return stringValue === null ? expected : stringValue;
      } else if (stringValue === '' + expected) {
        return expected;
      } else {
        return stringValue;
      }
    }
  }
}

/**
 * Get the value for a attribute on a node. Only used in DEV for SSR validation.
 * The third argument is used as a hint of what the expected value is. Some
 * attributes have multiple equivalent values.
 */
function getValueForAttribute(node, name, expected) {
  {
    if (!isAttributeNameSafe(name)) {
      return;
    }
    if (!node.hasAttribute(name)) {
      return expected === undefined ? undefined : null;
    }
    var value = node.getAttribute(name);
    if (value === '' + expected) {
      return expected;
    }
    return value;
  }
}

/**
 * Sets the value for a property on a node.
 *
 * @param {DOMElement} node
 * @param {string} name
 * @param {*} value
 */
function setValueForProperty(node, name, value, isCustomComponentTag) {
  var propertyInfo = getPropertyInfo(name);
  if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {
    return;
  }
  if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {
    value = null;
  }
  // If the prop isn't in the special list, treat it as a simple attribute.
  if (isCustomComponentTag || propertyInfo === null) {
    if (isAttributeNameSafe(name)) {
      var _attributeName = name;
      if (value === null) {
        node.removeAttribute(_attributeName);
      } else {
        node.setAttribute(_attributeName, '' + value);
      }
    }
    return;
  }
  var mustUseProperty = propertyInfo.mustUseProperty;

  if (mustUseProperty) {
    var propertyName = propertyInfo.propertyName;

    if (value === null) {
      var type = propertyInfo.type;

      node[propertyName] = type === BOOLEAN ? false : '';
    } else {
      // Contrary to `setAttribute`, object properties are properly
      // `toString`ed by IE8/9.
      node[propertyName] = value;
    }
    return;
  }
  // The rest are treated as attributes with special cases.
  var attributeName = propertyInfo.attributeName,
      attributeNamespace = propertyInfo.attributeNamespace;

  if (value === null) {
    node.removeAttribute(attributeName);
  } else {
    var _type = propertyInfo.type;

    var attributeValue = void 0;
    if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {
      attributeValue = '';
    } else {
      // `setAttribute` with objects becomes only `[object]` in IE8/9,
      // ('' + value) makes it output the correct toString()-value.
      attributeValue = '' + value;
      if (propertyInfo.sanitizeURL) {
        sanitizeURL(attributeValue);
      }
    }
    if (attributeNamespace) {
      node.setAttributeNS(attributeNamespace, attributeName, attributeValue);
    } else {
      node.setAttribute(attributeName, attributeValue);
    }
  }
}

// Flow does not allow string concatenation of most non-string types. To work
// around this limitation, we use an opaque type that can only be obtained by
// passing the value through getToStringValue first.
function toString(value) {
  return '' + value;
}

function getToStringValue(value) {
  switch (typeof value) {
    case 'boolean':
    case 'number':
    case 'object':
    case 'string':
    case 'undefined':
      return value;
    default:
      // function, symbol are assigned as empty strings
      return '';
  }
}

var ReactDebugCurrentFrame$2 = null;

var ReactControlledValuePropTypes = {
  checkPropTypes: null
};

{
  ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;

  var hasReadOnlyValue = {
    button: true,
    checkbox: true,
    image: true,
    hidden: true,
    radio: true,
    reset: true,
    submit: true
  };

  var propTypes = {
    value: function (props, propName, componentName) {
      if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableFlareAPI && props.listeners) {
        return null;
      }
      return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
    },
    checked: function (props, propName, componentName) {
      if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableFlareAPI && props.listeners) {
        return null;
      }
      return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
    }
  };

  /**
   * Provide a linked `value` attribute for controlled forms. You should not use
   * this outside of the ReactDOM controlled form components.
   */
  ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {
    checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum);
  };
}

// TODO: direct imports like some-package/src/* are bad. Fix me.
var didWarnValueDefaultValue = false;
var didWarnCheckedDefaultChecked = false;
var didWarnControlledToUncontrolled = false;
var didWarnUncontrolledToControlled = false;

function isControlled(props) {
  var usesChecked = props.type === 'checkbox' || props.type === 'radio';
  return usesChecked ? props.checked != null : props.value != null;
}

/**
 * Implements an <input> host component that allows setting these optional
 * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
 *
 * If `checked` or `value` are not supplied (or null/undefined), user actions
 * that affect the checked state or value will trigger updates to the element.
 *
 * If they are supplied (and not null/undefined), the rendered element will not
 * trigger updates to the element. Instead, the props must change in order for
 * the rendered element to be updated.
 *
 * The rendered element will be initialized as unchecked (or `defaultChecked`)
 * with an empty value (or `defaultValue`).
 *
 * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
 */

function getHostProps(element, props) {
  var node = element;
  var checked = props.checked;

  var hostProps = _assign({}, props, {
    defaultChecked: undefined,
    defaultValue: undefined,
    value: undefined,
    checked: checked != null ? checked : node._wrapperState.initialChecked
  });

  return hostProps;
}

function initWrapperState(element, props) {
  {
    ReactControlledValuePropTypes.checkPropTypes('input', props);

    if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
      warning$1(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
      didWarnCheckedDefaultChecked = true;
    }
    if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
      warning$1(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
      didWarnValueDefaultValue = true;
    }
  }

  var node = element;
  var defaultValue = props.defaultValue == null ? '' : props.defaultValue;

  node._wrapperState = {
    initialChecked: props.checked != null ? props.checked : props.defaultChecked,
    initialValue: getToStringValue(props.value != null ? props.value : defaultValue),
    controlled: isControlled(props)
  };
}

function updateChecked(element, props) {
  var node = element;
  var checked = props.checked;
  if (checked != null) {
    setValueForProperty(node, 'checked', checked, false);
  }
}

function updateWrapper(element, props) {
  var node = element;
  {
    var _controlled = isControlled(props);

    if (!node._wrapperState.controlled && _controlled && !didWarnUncontrolledToControlled) {
      warning$1(false, 'A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);
      didWarnUncontrolledToControlled = true;
    }
    if (node._wrapperState.controlled && !_controlled && !didWarnControlledToUncontrolled) {
      warning$1(false, 'A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);
      didWarnControlledToUncontrolled = true;
    }
  }

  updateChecked(element, props);

  var value = getToStringValue(props.value);
  var type = props.type;

  if (value != null) {
    if (type === 'number') {
      if (value === 0 && node.value === '' ||
      // We explicitly want to coerce to number here if possible.
      // eslint-disable-next-line
      node.value != value) {
        node.value = toString(value);
      }
    } else if (node.value !== toString(value)) {
      node.value = toString(value);
    }
  } else if (type === 'submit' || type === 'reset') {
    // Submit/reset inputs need the attribute removed completely to avoid
    // blank-text buttons.
    node.removeAttribute('value');
    return;
  }

  if (disableInputAttributeSyncing) {
    // When not syncing the value attribute, React only assigns a new value
    // whenever the defaultValue React prop has changed. When not present,
    // React does nothing
    if (props.hasOwnProperty('defaultValue')) {
      setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
    }
  } else {
    // When syncing the value attribute, the value comes from a cascade of
    // properties:
    //  1. The value React property
    //  2. The defaultValue React property
    //  3. Otherwise there should be no change
    if (props.hasOwnProperty('value')) {
      setDefaultValue(node, props.type, value);
    } else if (props.hasOwnProperty('defaultValue')) {
      setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
    }
  }

  if (disableInputAttributeSyncing) {
    // When not syncing the checked attribute, the attribute is directly
    // controllable from the defaultValue React property. It needs to be
    // updated as new props come in.
    if (props.defaultChecked == null) {
      node.removeAttribute('checked');
    } else {
      node.defaultChecked = !!props.defaultChecked;
    }
  } else {
    // When syncing the checked attribute, it only changes when it needs
    // to be removed, such as transitioning from a checkbox into a text input
    if (props.checked == null && props.defaultChecked != null) {
      node.defaultChecked = !!props.defaultChecked;
    }
  }
}

function postMountWrapper(element, props, isHydrating) {
  var node = element;

  // Do not assign value if it is already set. This prevents user text input
  // from being lost during SSR hydration.
  if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {
    var type = props.type;
    var isButton = type === 'submit' || type === 'reset';

    // Avoid setting value attribute on submit/reset inputs as it overrides the
    // default value provided by the browser. See: #12872
    if (isButton && (props.value === undefined || props.value === null)) {
      return;
    }

    var _initialValue = toString(node._wrapperState.initialValue);

    // Do not assign value if it is already set. This prevents user text input
    // from being lost during SSR hydration.
    if (!isHydrating) {
      if (disableInputAttributeSyncing) {
        var value = getToStringValue(props.value);

        // When not syncing the value attribute, the value property points
        // directly to the React prop. Only assign it if it exists.
        if (value != null) {
          // Always assign on buttons so that it is possible to assign an
          // empty string to clear button text.
          //
          // Otherwise, do not re-assign the value property if is empty. This
          // potentially avoids a DOM write and prevents Firefox (~60.0.1) from
          // prematurely marking required inputs as invalid. Equality is compared
          // to the current value in case the browser provided value is not an
          // empty string.
          if (isButton || value !== node.value) {
            node.value = toString(value);
          }
        }
      } else {
        // When syncing the value attribute, the value property should use
        // the wrapperState._initialValue property. This uses:
        //
        //   1. The value React property when present
        //   2. The defaultValue React property when present
        //   3. An empty string
        if (_initialValue !== node.value) {
          node.value = _initialValue;
        }
      }
    }

    if (disableInputAttributeSyncing) {
      // When not syncing the value attribute, assign the value attribute
      // directly from the defaultValue React property (when present)
      var defaultValue = getToStringValue(props.defaultValue);
      if (defaultValue != null) {
        node.defaultValue = toString(defaultValue);
      }
    } else {
      // Otherwise, the value attribute is synchronized to the property,
      // so we assign defaultValue to the same thing as the value property
      // assignment step above.
      node.defaultValue = _initialValue;
    }
  }

  // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
  // this is needed to work around a chrome bug where setting defaultChecked
  // will sometimes influence the value of checked (even after detachment).
  // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
  // We need to temporarily unset name to avoid disrupting radio button groups.
  var name = node.name;
  if (name !== '') {
    node.name = '';
  }

  if (disableInputAttributeSyncing) {
    // When not syncing the checked attribute, the checked property
    // never gets assigned. It must be manually set. We don't want
    // to do this when hydrating so that existing user input isn't
    // modified
    if (!isHydrating) {
      updateChecked(element, props);
    }

    // Only assign the checked attribute if it is defined. This saves
    // a DOM write when controlling the checked attribute isn't needed
    // (text inputs, submit/reset)
    if (props.hasOwnProperty('defaultChecked')) {
      node.defaultChecked = !node.defaultChecked;
      node.defaultChecked = !!props.defaultChecked;
    }
  } else {
    // When syncing the checked attribute, both the checked property and
    // attribute are assigned at the same time using defaultChecked. This uses:
    //
    //   1. The checked React property when present
    //   2. The defaultChecked React property when present
    //   3. Otherwise, false
    node.defaultChecked = !node.defaultChecked;
    node.defaultChecked = !!node._wrapperState.initialChecked;
  }

  if (name !== '') {
    node.name = name;
  }
}

function restoreControlledState(element, props) {
  var node = element;
  updateWrapper(node, props);
  updateNamedCousins(node, props);
}

function updateNamedCousins(rootNode, props) {
  var name = props.name;
  if (props.type === 'radio' && name != null) {
    var queryRoot = rootNode;

    while (queryRoot.parentNode) {
      queryRoot = queryRoot.parentNode;
    }

    // If `rootNode.form` was non-null, then we could try `form.elements`,
    // but that sometimes behaves strangely in IE8. We could also try using
    // `form.getElementsByName`, but that will only return direct children
    // and won't include inputs that use the HTML5 `form=` attribute. Since
    // the input might not even be in a form. It might not even be in the
    // document. Let's just use the local `querySelectorAll` to ensure we don't
    // miss anything.
    var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');

    for (var i = 0; i < group.length; i++) {
      var otherNode = group[i];
      if (otherNode === rootNode || otherNode.form !== rootNode.form) {
        continue;
      }
      // This will throw if radio buttons rendered by different copies of React
      // and the same name are rendered into the same form (same as #1939).
      // That's probably okay; we don't support it just as we don't support
      // mixing React radio buttons with non-React ones.
      var otherProps = getFiberCurrentPropsFromNode$1(otherNode);
      (function () {
        if (!otherProps) {
          {
            throw ReactError(Error('ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.'));
          }
        }
      })();

      // We need update the tracked value on the named cousin since the value
      // was changed but the input saw no event or value set
      updateValueIfChanged(otherNode);

      // If this is a controlled radio button group, forcing the input that
      // was previously checked to update will cause it to be come re-checked
      // as appropriate.
      updateWrapper(otherNode, otherProps);
    }
  }
}

// In Chrome, assigning defaultValue to certain input types triggers input validation.
// For number inputs, the display value loses trailing decimal points. For email inputs,
// Chrome raises "The specified value <x> is not a valid email address".
//
// Here we check to see if the defaultValue has actually changed, avoiding these problems
// when the user is inputting text
//
// https://github.com/facebook/react/issues/7253
function setDefaultValue(node, type, value) {
  if (
  // Focused number inputs synchronize on blur. See ChangeEventPlugin.js
  type !== 'number' || node.ownerDocument.activeElement !== node) {
    if (value == null) {
      node.defaultValue = toString(node._wrapperState.initialValue);
    } else if (node.defaultValue !== toString(value)) {
      node.defaultValue = toString(value);
    }
  }
}

var eventTypes$1 = {
  change: {
    phasedRegistrationNames: {
      bubbled: 'onChange',
      captured: 'onChangeCapture'
    },
    dependencies: [TOP_BLUR, TOP_CHANGE, TOP_CLICK, TOP_FOCUS, TOP_INPUT, TOP_KEY_DOWN, TOP_KEY_UP, TOP_SELECTION_CHANGE]
  }
};

function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
  var event = SyntheticEvent.getPooled(eventTypes$1.change, inst, nativeEvent, target);
  event.type = 'change';
  // Flag this event loop as needing state restore.
  enqueueStateRestore(target);
  accumulateTwoPhaseDispatches(event);
  return event;
}
/**
 * For IE shims
 */
var activeElement = null;
var activeElementInst = null;

/**
 * SECTION: handle `change` event
 */
function shouldUseChangeEvent(elem) {
  var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
  return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
}

function manualDispatchChangeEvent(nativeEvent) {
  var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent));

  // If change and propertychange bubbled, we'd just bind to it like all the
  // other events and have it go through ReactBrowserEventEmitter. Since it
  // doesn't, we manually listen for the events and so we have to enqueue and
  // process the abstract event manually.
  //
  // Batching is necessary here in order to ensure that all event handlers run
  // before the next rerender (including event handlers attached to ancestor
  // elements instead of directly on the input). Without this, controlled
  // components don't work properly in conjunction with event bubbling because
  // the component is rerendered and the value reverted before all the event
  // handlers can run. See https://github.com/facebook/react/issues/708.
  batchedUpdates(runEventInBatch, event);
}

function runEventInBatch(event) {
  runEventsInBatch(event);
}

function getInstIfValueChanged(targetInst) {
  var targetNode = getNodeFromInstance$1(targetInst);
  if (updateValueIfChanged(targetNode)) {
    return targetInst;
  }
}

function getTargetInstForChangeEvent(topLevelType, targetInst) {
  if (topLevelType === TOP_CHANGE) {
    return targetInst;
  }
}

/**
 * SECTION: handle `input` event
 */
var isInputEventSupported = false;
if (canUseDOM) {
  // IE9 claims to support the input event but fails to trigger it when
  // deleting text, so we ignore its input events.
  isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
}

/**
 * (For IE <=9) Starts tracking propertychange events on the passed-in element
 * and override the value property so that we can distinguish user events from
 * value changes in JS.
 */
function startWatchingForValueChange(target, targetInst) {
  activeElement = target;
  activeElementInst = targetInst;
  activeElement.attachEvent('onpropertychange', handlePropertyChange);
}

/**
 * (For IE <=9) Removes the event listeners from the currently-tracked element,
 * if any exists.
 */
function stopWatchingForValueChange() {
  if (!activeElement) {
    return;
  }
  activeElement.detachEvent('onpropertychange', handlePropertyChange);
  activeElement = null;
  activeElementInst = null;
}

/**
 * (For IE <=9) Handles a propertychange event, sending a `change` event if
 * the value of the active element has changed.
 */
function handlePropertyChange(nativeEvent) {
  if (nativeEvent.propertyName !== 'value') {
    return;
  }
  if (getInstIfValueChanged(activeElementInst)) {
    manualDispatchChangeEvent(nativeEvent);
  }
}

function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
  if (topLevelType === TOP_FOCUS) {
    // In IE9, propertychange fires for most input events but is buggy and
    // doesn't fire when text is deleted, but conveniently, selectionchange
    // appears to fire in all of the remaining cases so we catch those and
    // forward the event if the value has changed
    // In either case, we don't want to call the event handler if the value
    // is changed from JS so we redefine a setter for `.value` that updates
    // our activeElementValue variable, allowing us to ignore those changes
    //
    // stopWatching() should be a noop here but we call it just in case we
    // missed a blur event somehow.
    stopWatchingForValueChange();
    startWatchingForValueChange(target, targetInst);
  } else if (topLevelType === TOP_BLUR) {
    stopWatchingForValueChange();
  }
}

// For IE8 and IE9.
function getTargetInstForInputEventPolyfill(topLevelType, targetInst) {
  if (topLevelType === TOP_SELECTION_CHANGE || topLevelType === TOP_KEY_UP || topLevelType === TOP_KEY_DOWN) {
    // On the selectionchange event, the target is just document which isn't
    // helpful for us so just check activeElement instead.
    //
    // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
    // propertychange on the first input event after setting `value` from a
    // script and fires only keydown, keypress, keyup. Catching keyup usually
    // gets it and catching keydown lets us fire an event for the first
    // keystroke if user does a key repeat (it'll be a little delayed: right
    // before the second keystroke). Other input methods (e.g., paste) seem to
    // fire selectionchange normally.
    return getInstIfValueChanged(activeElementInst);
  }
}

/**
 * SECTION: handle `click` event
 */
function shouldUseClickEvent(elem) {
  // Use the `click` event to detect changes to checkbox and radio inputs.
  // This approach works across all browsers, whereas `change` does not fire
  // until `blur` in IE8.
  var nodeName = elem.nodeName;
  return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
}

function getTargetInstForClickEvent(topLevelType, targetInst) {
  if (topLevelType === TOP_CLICK) {
    return getInstIfValueChanged(targetInst);
  }
}

function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) {
  if (topLevelType === TOP_INPUT || topLevelType === TOP_CHANGE) {
    return getInstIfValueChanged(targetInst);
  }
}

function handleControlledInputBlur(node) {
  var state = node._wrapperState;

  if (!state || !state.controlled || node.type !== 'number') {
    return;
  }

  if (!disableInputAttributeSyncing) {
    // If controlled, assign the value attribute to the current value on blur
    setDefaultValue(node, 'number', node.value);
  }
}

/**
 * This plugin creates an `onChange` event that normalizes change events
 * across form elements. This event fires at a time when it's possible to
 * change the element's value without seeing a flicker.
 *
 * Supported elements are:
 * - input (see `isTextInputElement`)
 * - textarea
 * - select
 */
var ChangeEventPlugin = {
  eventTypes: eventTypes$1,

  _isInputEventSupported: isInputEventSupported,

  extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
    var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;

    var getTargetInstFunc = void 0,
        handleEventFunc = void 0;
    if (shouldUseChangeEvent(targetNode)) {
      getTargetInstFunc = getTargetInstForChangeEvent;
    } else if (isTextInputElement(targetNode)) {
      if (isInputEventSupported) {
        getTargetInstFunc = getTargetInstForInputOrChangeEvent;
      } else {
        getTargetInstFunc = getTargetInstForInputEventPolyfill;
        handleEventFunc = handleEventsForInputEventPolyfill;
      }
    } else if (shouldUseClickEvent(targetNode)) {
      getTargetInstFunc = getTargetInstForClickEvent;
    }

    if (getTargetInstFunc) {
      var inst = getTargetInstFunc(topLevelType, targetInst);
      if (inst) {
        var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
        return event;
      }
    }

    if (handleEventFunc) {
      handleEventFunc(topLevelType, targetNode, targetInst);
    }

    // When blurring, set the value attribute for number inputs
    if (topLevelType === TOP_BLUR) {
      handleControlledInputBlur(targetNode);
    }
  }
};

/**
 * Module that is injectable into `EventPluginHub`, that specifies a
 * deterministic ordering of `EventPlugin`s. A convenient way to reason about
 * plugins, without having to package every one of them. This is better than
 * having plugins be ordered in the same order that they are injected because
 * that ordering would be influenced by the packaging order.
 * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
 * preventing default on events is convenient in `SimpleEventPlugin` handlers.
 */
var DOMEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];

var SyntheticUIEvent = SyntheticEvent.extend({
  view: null,
  detail: null
});

var modifierKeyToProp = {
  Alt: 'altKey',
  Control: 'ctrlKey',
  Meta: 'metaKey',
  Shift: 'shiftKey'
};

// Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
// getModifierState. If getModifierState is not supported, we map it to a set of
// modifier keys exposed by the event. In this case, Lock-keys are not supported.
/**
 * Translation from modifier key to the associated property in the event.
 * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
 */

function modifierStateGetter(keyArg) {
  var syntheticEvent = this;
  var nativeEvent = syntheticEvent.nativeEvent;
  if (nativeEvent.getModifierState) {
    return nativeEvent.getModifierState(keyArg);
  }
  var keyProp = modifierKeyToProp[keyArg];
  return keyProp ? !!nativeEvent[keyProp] : false;
}

function getEventModifierState(nativeEvent) {
  return modifierStateGetter;
}

var previousScreenX = 0;
var previousScreenY = 0;
// Use flags to signal movementX/Y has already been set
var isMovementXSet = false;
var isMovementYSet = false;

/**
 * @interface MouseEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */
var SyntheticMouseEvent = SyntheticUIEvent.extend({
  screenX: null,
  screenY: null,
  clientX: null,
  clientY: null,
  pageX: null,
  pageY: null,
  ctrlKey: null,
  shiftKey: null,
  altKey: null,
  metaKey: null,
  getModifierState: getEventModifierState,
  button: null,
  buttons: null,
  relatedTarget: function (event) {
    return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
  },
  movementX: function (event) {
    if ('movementX' in event) {
      return event.movementX;
    }

    var screenX = previousScreenX;
    previousScreenX = event.screenX;

    if (!isMovementXSet) {
      isMovementXSet = true;
      return 0;
    }

    return event.type === 'mousemove' ? event.screenX - screenX : 0;
  },
  movementY: function (event) {
    if ('movementY' in event) {
      return event.movementY;
    }

    var screenY = previousScreenY;
    previousScreenY = event.screenY;

    if (!isMovementYSet) {
      isMovementYSet = true;
      return 0;
    }

    return event.type === 'mousemove' ? event.screenY - screenY : 0;
  }
});

/**
 * @interface PointerEvent
 * @see http://www.w3.org/TR/pointerevents/
 */
var SyntheticPointerEvent = SyntheticMouseEvent.extend({
  pointerId: null,
  width: null,
  height: null,
  pressure: null,
  tangentialPressure: null,
  tiltX: null,
  tiltY: null,
  twist: null,
  pointerType: null,
  isPrimary: null
});

var eventTypes$2 = {
  mouseEnter: {
    registrationName: 'onMouseEnter',
    dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]
  },
  mouseLeave: {
    registrationName: 'onMouseLeave',
    dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]
  },
  pointerEnter: {
    registrationName: 'onPointerEnter',
    dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]
  },
  pointerLeave: {
    registrationName: 'onPointerLeave',
    dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]
  }
};

var EnterLeaveEventPlugin = {
  eventTypes: eventTypes$2,

  /**
   * For almost every interaction we care about, there will be both a top-level
   * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
   * we do not extract duplicate events. However, moving the mouse into the
   * browser from outside will not fire a `mouseout` event. In this case, we use
   * the `mouseover` top-level event.
   */
  extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
    var isOverEvent = topLevelType === TOP_MOUSE_OVER || topLevelType === TOP_POINTER_OVER;
    var isOutEvent = topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_POINTER_OUT;

    if (isOverEvent && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
      return null;
    }

    if (!isOutEvent && !isOverEvent) {
      // Must not be a mouse or pointer in or out - ignoring.
      return null;
    }

    var win = void 0;
    if (nativeEventTarget.window === nativeEventTarget) {
      // `nativeEventTarget` is probably a window object.
      win = nativeEventTarget;
    } else {
      // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
      var doc = nativeEventTarget.ownerDocument;
      if (doc) {
        win = doc.defaultView || doc.parentWindow;
      } else {
        win = window;
      }
    }

    var from = void 0;
    var to = void 0;
    if (isOutEvent) {
      from = targetInst;
      var related = nativeEvent.relatedTarget || nativeEvent.toElement;
      to = related ? getClosestInstanceFromNode(related) : null;
    } else {
      // Moving to a node from outside the window.
      from = null;
      to = targetInst;
    }

    if (from === to) {
      // Nothing pertains to our managed components.
      return null;
    }

    var eventInterface = void 0,
        leaveEventType = void 0,
        enterEventType = void 0,
        eventTypePrefix = void 0;

    if (topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_MOUSE_OVER) {
      eventInterface = SyntheticMouseEvent;
      leaveEventType = eventTypes$2.mouseLeave;
      enterEventType = eventTypes$2.mouseEnter;
      eventTypePrefix = 'mouse';
    } else if (topLevelType === TOP_POINTER_OUT || topLevelType === TOP_POINTER_OVER) {
      eventInterface = SyntheticPointerEvent;
      leaveEventType = eventTypes$2.pointerLeave;
      enterEventType = eventTypes$2.pointerEnter;
      eventTypePrefix = 'pointer';
    }

    var fromNode = from == null ? win : getNodeFromInstance$1(from);
    var toNode = to == null ? win : getNodeFromInstance$1(to);

    var leave = eventInterface.getPooled(leaveEventType, from, nativeEvent, nativeEventTarget);
    leave.type = eventTypePrefix + 'leave';
    leave.target = fromNode;
    leave.relatedTarget = toNode;

    var enter = eventInterface.getPooled(enterEventType, to, nativeEvent, nativeEventTarget);
    enter.type = eventTypePrefix + 'enter';
    enter.target = toNode;
    enter.relatedTarget = fromNode;

    accumulateEnterLeaveDispatches(leave, enter, from, to);

    return [leave, enter];
  }
};

/**
 * inlined Object.is polyfill to avoid requiring consumers ship their own
 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
 */
function is(x, y) {
  return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
  ;
}

var hasOwnProperty$1 = Object.prototype.hasOwnProperty;

/**
 * Performs equality by iterating through keys on an object and returning false
 * when any key has values which are not strictly equal between the arguments.
 * Returns true when the values of all keys are strictly equal.
 */
function shallowEqual(objA, objB) {
  if (is(objA, objB)) {
    return true;
  }

  if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
    return false;
  }

  var keysA = Object.keys(objA);
  var keysB = Object.keys(objB);

  if (keysA.length !== keysB.length) {
    return false;
  }

  // Test for A's keys different from B.
  for (var i = 0; i < keysA.length; i++) {
    if (!hasOwnProperty$1.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
      return false;
    }
  }

  return true;
}

var PLUGIN_EVENT_SYSTEM = 1;
var RESPONDER_EVENT_SYSTEM = 1 << 1;
var IS_PASSIVE = 1 << 2;
var IS_ACTIVE = 1 << 3;
var PASSIVE_NOT_SUPPORTED = 1 << 4;

function createResponderListener(responder, props) {
  var eventResponderListener = {
    responder: responder,
    props: props
  };
  {
    Object.freeze(eventResponderListener);
  }
  return eventResponderListener;
}

function isFiberSuspenseAndTimedOut(fiber) {
  return fiber.tag === SuspenseComponent && fiber.memoizedState !== null;
}

function getSuspenseFallbackChild(fiber) {
  return fiber.child.sibling.child;
}





function createResponderInstance(responder, responderProps, responderState, target, fiber) {
  return {
    fiber: fiber,
    props: responderProps,
    responder: responder,
    rootEventTypes: null,
    state: responderState,
    target: target
  };
}

var DiscreteEvent = 0;
var UserBlockingEvent = 1;
var ContinuousEvent = 2;

// Intentionally not named imports because Rollup would use dynamic dispatch for
// CommonJS interop named imports.
var UserBlockingPriority$1 = Scheduler.unstable_UserBlockingPriority;
var runWithPriority$1 = Scheduler.unstable_runWithPriority;


var listenToResponderEventTypesImpl = void 0;

function setListenToResponderEventTypes(_listenToResponderEventTypesImpl) {
  listenToResponderEventTypesImpl = _listenToResponderEventTypesImpl;
}

var activeTimeouts = new Map();
var rootEventTypesToEventResponderInstances = new Map();
var ownershipChangeListeners = new Set();

var globalOwner = null;

var currentTimeStamp = 0;
var currentTimers = new Map();
var currentInstance = null;
var currentEventQueue = null;
var currentEventQueuePriority = ContinuousEvent;
var currentTimerIDCounter = 0;
var currentDocument = null;

var eventResponderContext = {
  dispatchEvent: function (eventValue, eventListener, eventPriority) {
    validateResponderContext();
    validateEventValue(eventValue);
    if (eventPriority < currentEventQueuePriority) {
      currentEventQueuePriority = eventPriority;
    }
    currentEventQueue.push(createEventQueueItem(eventValue, eventListener));
  },
  isTargetWithinResponder: function (target) {
    validateResponderContext();
    if (target != null) {
      var fiber = getClosestInstanceFromNode(target);
      var responderFiber = currentInstance.fiber;

      while (fiber !== null) {
        if (fiber === responderFiber || fiber.alternate === responderFiber) {
          return true;
        }
        fiber = fiber.return;
      }
    }
    return false;
  },
  isTargetWithinResponderScope: function (target) {
    validateResponderContext();
    var componentInstance = currentInstance;
    var responder = componentInstance.responder;

    if (target != null) {
      var fiber = getClosestInstanceFromNode(target);
      var responderFiber = currentInstance.fiber;

      while (fiber !== null) {
        if (fiber === responderFiber || fiber.alternate === responderFiber) {
          return true;
        }
        if (doesFiberHaveResponder(fiber, responder)) {
          return false;
        }
        fiber = fiber.return;
      }
    }
    return false;
  },
  isTargetWithinNode: function (childTarget, parentTarget) {
    validateResponderContext();
    var childFiber = getClosestInstanceFromNode(childTarget);
    var parentFiber = getClosestInstanceFromNode(parentTarget);
    var parentAlternateFiber = parentFiber.alternate;

    var node = childFiber;
    while (node !== null) {
      if (node === parentFiber || node === parentAlternateFiber) {
        return true;
      }
      node = node.return;
    }
    return false;
  },
  addRootEventTypes: function (rootEventTypes) {
    validateResponderContext();
    var activeDocument = getActiveDocument();
    listenToResponderEventTypesImpl(rootEventTypes, activeDocument);
    for (var i = 0; i < rootEventTypes.length; i++) {
      var rootEventType = rootEventTypes[i];
      var eventResponderInstance = currentInstance;
      registerRootEventType(rootEventType, eventResponderInstance);
    }
  },
  removeRootEventTypes: function (rootEventTypes) {
    validateResponderContext();
    for (var i = 0; i < rootEventTypes.length; i++) {
      var rootEventType = rootEventTypes[i];
      var rootEventResponders = rootEventTypesToEventResponderInstances.get(rootEventType);
      var rootEventTypesSet = currentInstance.rootEventTypes;
      if (rootEventTypesSet !== null) {
        rootEventTypesSet.delete(rootEventType);
      }
      if (rootEventResponders !== undefined) {
        rootEventResponders.delete(currentInstance);
      }
    }
  },
  hasOwnership: function () {
    validateResponderContext();
    return globalOwner === currentInstance;
  },
  requestGlobalOwnership: function () {
    validateResponderContext();
    if (globalOwner !== null) {
      return false;
    }
    globalOwner = currentInstance;
    triggerOwnershipListeners();
    return true;
  },
  releaseOwnership: function () {
    validateResponderContext();
    return releaseOwnershipForEventResponderInstance(currentInstance);
  },
  setTimeout: function (func, delay) {
    validateResponderContext();
    if (currentTimers === null) {
      currentTimers = new Map();
    }
    var timeout = currentTimers.get(delay);

    var timerId = currentTimerIDCounter++;
    if (timeout === undefined) {
      var _timers = new Map();
      var _id = setTimeout(function () {
        processTimers(_timers, delay);
      }, delay);
      timeout = {
        id: _id,
        timers: _timers
      };
      currentTimers.set(delay, timeout);
    }
    timeout.timers.set(timerId, {
      instance: currentInstance,
      func: func,
      id: timerId,
      timeStamp: currentTimeStamp
    });
    activeTimeouts.set(timerId, timeout);
    return timerId;
  },
  clearTimeout: function (timerId) {
    validateResponderContext();
    var timeout = activeTimeouts.get(timerId);

    if (timeout !== undefined) {
      var _timers2 = timeout.timers;
      _timers2.delete(timerId);
      if (_timers2.size === 0) {
        clearTimeout(timeout.id);
      }
    }
  },
  getFocusableElementsInScope: function (deep) {
    validateResponderContext();
    var focusableElements = [];
    var eventResponderInstance = currentInstance;
    var currentResponder = eventResponderInstance.responder;
    var focusScopeFiber = eventResponderInstance.fiber;
    if (deep) {
      var deepNode = focusScopeFiber.return;
      while (deepNode !== null) {
        if (doesFiberHaveResponder(deepNode, currentResponder)) {
          focusScopeFiber = deepNode;
        }
        deepNode = deepNode.return;
      }
    }
    var child = focusScopeFiber.child;

    if (child !== null) {
      collectFocusableElements(child, focusableElements);
    }
    return focusableElements;
  },

  getActiveDocument: getActiveDocument,
  objectAssign: _assign,
  getTimeStamp: function () {
    validateResponderContext();
    return currentTimeStamp;
  },
  isTargetWithinHostComponent: function (target, elementType) {
    validateResponderContext();
    var fiber = getClosestInstanceFromNode(target);

    while (fiber !== null) {
      if (fiber.tag === HostComponent && fiber.type === elementType) {
        return true;
      }
      fiber = fiber.return;
    }
    return false;
  },

  enqueueStateRestore: enqueueStateRestore
};

function validateEventValue(eventValue) {
  if (typeof eventValue === 'object' && eventValue !== null) {
    var target = eventValue.target,
        type = eventValue.type,
        _timeStamp = eventValue.timeStamp;


    if (target == null || type == null || _timeStamp == null) {
      throw new Error('context.dispatchEvent: "target", "timeStamp", and "type" fields on event object are required.');
    }
    var showWarning = function (name) {
      {
        warning$1(false, '%s is not available on event objects created from event responder modules (React Flare). ' + 'Try wrapping in a conditional, i.e. `if (event.type !== "press") { event.%s }`', name, name);
      }
    };
    eventValue.preventDefault = function () {
      {
        showWarning('preventDefault()');
      }
    };
    eventValue.stopPropagation = function () {
      {
        showWarning('stopPropagation()');
      }
    };
    eventValue.isDefaultPrevented = function () {
      {
        showWarning('isDefaultPrevented()');
      }
    };
    eventValue.isPropagationStopped = function () {
      {
        showWarning('isPropagationStopped()');
      }
    };
    // $FlowFixMe: we don't need value, Flow thinks we do
    Object.defineProperty(eventValue, 'nativeEvent', {
      get: function () {
        {
          showWarning('nativeEvent');
        }
      }
    });
  }
}

function collectFocusableElements(node, focusableElements) {
  if (isFiberSuspenseAndTimedOut(node)) {
    var fallbackChild = getSuspenseFallbackChild(node);
    if (fallbackChild !== null) {
      collectFocusableElements(fallbackChild, focusableElements);
    }
  } else {
    if (isFiberHostComponentFocusable(node)) {
      focusableElements.push(node.stateNode);
    } else {
      var child = node.child;

      if (child !== null) {
        collectFocusableElements(child, focusableElements);
      }
    }
  }
  var sibling = node.sibling;

  if (sibling !== null) {
    collectFocusableElements(sibling, focusableElements);
  }
}

function createEventQueueItem(value, listener) {
  return {
    value: value,
    listener: listener
  };
}

function doesFiberHaveResponder(fiber, responder) {
  if (fiber.tag === HostComponent) {
    var dependencies = fiber.dependencies;
    if (dependencies !== null) {
      var respondersMap = dependencies.responders;
      if (respondersMap !== null && respondersMap.has(responder)) {
        return true;
      }
    }
  }
  return false;
}

function getActiveDocument() {
  return currentDocument;
}

function releaseOwnershipForEventResponderInstance(eventResponderInstance) {
  if (globalOwner === eventResponderInstance) {
    globalOwner = null;
    triggerOwnershipListeners();
    return true;
  }
  return false;
}

function isFiberHostComponentFocusable(fiber) {
  if (fiber.tag !== HostComponent) {
    return false;
  }
  var type = fiber.type,
      memoizedProps = fiber.memoizedProps;

  if (memoizedProps.tabIndex === -1 || memoizedProps.disabled) {
    return false;
  }
  if (memoizedProps.tabIndex === 0 || memoizedProps.contentEditable === true) {
    return true;
  }
  if (type === 'a' || type === 'area') {
    return !!memoizedProps.href && memoizedProps.rel !== 'ignore';
  }
  if (type === 'input') {
    return memoizedProps.type !== 'hidden' && memoizedProps.type !== 'file';
  }
  return type === 'button' || type === 'textarea' || type === 'object' || type === 'select' || type === 'iframe' || type === 'embed';
}

function processTimers(timers, delay) {
  var timersArr = Array.from(timers.values());
  currentEventQueuePriority = ContinuousEvent;
  try {
    for (var i = 0; i < timersArr.length; i++) {
      var _timersArr$i = timersArr[i],
          _instance = _timersArr$i.instance,
          _func = _timersArr$i.func,
          _id2 = _timersArr$i.id,
          _timeStamp2 = _timersArr$i.timeStamp;

      currentInstance = _instance;
      currentEventQueue = [];
      currentTimeStamp = _timeStamp2 + delay;
      try {
        _func();
      } finally {
        activeTimeouts.delete(_id2);
      }
    }
    processEventQueue();
  } finally {
    currentTimers = null;
    currentInstance = null;
    currentEventQueue = null;
    currentTimeStamp = 0;
  }
}

function createDOMResponderEvent(topLevelType, nativeEvent, nativeEventTarget, passive, passiveSupported) {
  var _ref = nativeEvent,
      pointerType = _ref.pointerType;

  var eventPointerType = '';
  var pointerId = null;

  if (pointerType !== undefined) {
    eventPointerType = pointerType;
    pointerId = nativeEvent.pointerId;
  } else if (nativeEvent.key !== undefined) {
    eventPointerType = 'keyboard';
  } else if (nativeEvent.button !== undefined) {
    eventPointerType = 'mouse';
  } else if (nativeEvent.changedTouches !== undefined) {
    eventPointerType = 'touch';
  }

  return {
    nativeEvent: nativeEvent,
    passive: passive,
    passiveSupported: passiveSupported,
    pointerId: pointerId,
    pointerType: eventPointerType,
    responderTarget: null,
    target: nativeEventTarget,
    type: topLevelType
  };
}

function processEvents(eventQueue) {
  for (var i = 0, length = eventQueue.length; i < length; i++) {
    var _eventQueue$i = eventQueue[i],
        _value = _eventQueue$i.value,
        _listener = _eventQueue$i.listener;

    var type = typeof _value === 'object' && _value !== null ? _value.type : '';
    invokeGuardedCallbackAndCatchFirstError(type, _listener, undefined, _value);
  }
}

function processEventQueue() {
  var eventQueue = currentEventQueue;
  if (eventQueue.length === 0) {
    return;
  }
  switch (currentEventQueuePriority) {
    case DiscreteEvent:
      {
        flushDiscreteUpdatesIfNeeded(currentTimeStamp);
        discreteUpdates(function () {
          batchedEventUpdates(processEvents, eventQueue);
        });
        break;
      }
    case UserBlockingEvent:
      {
        if (enableUserBlockingEvents) {
          runWithPriority$1(UserBlockingPriority$1, batchedEventUpdates.bind(null, processEvents, eventQueue));
        } else {
          batchedEventUpdates(processEvents, eventQueue);
        }
        break;
      }
    case ContinuousEvent:
      {
        batchedEventUpdates(processEvents, eventQueue);
        break;
      }
  }
}

function responderEventTypesContainType(eventTypes, type) {
  for (var i = 0, len = eventTypes.length; i < len; i++) {
    if (eventTypes[i] === type) {
      return true;
    }
  }
  return false;
}

function validateResponderTargetEventTypes(eventType, responder) {
  var targetEventTypes = responder.targetEventTypes;
  // Validate the target event type exists on the responder

  if (targetEventTypes !== null) {
    return responderEventTypesContainType(targetEventTypes, eventType);
  }
  return false;
}

function validateOwnership(responderInstance) {
  return globalOwner === null || globalOwner === responderInstance;
}

function traverseAndHandleEventResponderInstances(topLevelType, targetFiber, nativeEvent, nativeEventTarget, eventSystemFlags) {
  var isPassiveEvent = (eventSystemFlags & IS_PASSIVE) !== 0;
  var isPassiveSupported = (eventSystemFlags & PASSIVE_NOT_SUPPORTED) === 0;
  var isPassive = isPassiveEvent || !isPassiveSupported;
  var eventType = isPassive ? topLevelType : topLevelType + '_active';

  // Trigger event responders in this order:
  // - Bubble target responder phase
  // - Root responder phase

  var visitedResponders = new Set();
  var responderEvent = createDOMResponderEvent(topLevelType, nativeEvent, nativeEventTarget, isPassiveEvent, isPassiveSupported);
  var node = targetFiber;
  while (node !== null) {
    var _node = node,
        dependencies = _node.dependencies,
        tag = _node.tag;

    if (tag === HostComponent && dependencies !== null) {
      var respondersMap = dependencies.responders;
      if (respondersMap !== null) {
        var responderInstances = Array.from(respondersMap.values());
        for (var i = 0, length = responderInstances.length; i < length; i++) {
          var responderInstance = responderInstances[i];

          if (validateOwnership(responderInstance)) {
            var props = responderInstance.props,
                responder = responderInstance.responder,
                state = responderInstance.state,
                target = responderInstance.target;

            if (!visitedResponders.has(responder) && validateResponderTargetEventTypes(eventType, responder)) {
              visitedResponders.add(responder);
              var onEvent = responder.onEvent;
              if (onEvent !== null) {
                currentInstance = responderInstance;
                responderEvent.responderTarget = target;
                onEvent(responderEvent, eventResponderContext, props, state);
              }
            }
          }
        }
      }
    }
    node = node.return;
  }
  // Root phase
  var rootEventResponderInstances = rootEventTypesToEventResponderInstances.get(eventType);
  if (rootEventResponderInstances !== undefined) {
    var _responderInstances = Array.from(rootEventResponderInstances);

    for (var _i = 0; _i < _responderInstances.length; _i++) {
      var _responderInstance = _responderInstances[_i];
      if (!validateOwnership(_responderInstance)) {
        continue;
      }
      var _props = _responderInstance.props,
          _responder = _responderInstance.responder,
          _state = _responderInstance.state,
          _target = _responderInstance.target;

      var onRootEvent = _responder.onRootEvent;
      if (onRootEvent !== null) {
        currentInstance = _responderInstance;
        responderEvent.responderTarget = _target;
        onRootEvent(responderEvent, eventResponderContext, _props, _state);
      }
    }
  }
}

function triggerOwnershipListeners() {
  var listeningInstances = Array.from(ownershipChangeListeners);
  var previousInstance = currentInstance;
  var previousEventQueuePriority = currentEventQueuePriority;
  var previousEventQueue = currentEventQueue;
  try {
    for (var i = 0; i < listeningInstances.length; i++) {
      var _instance2 = listeningInstances[i];
      var props = _instance2.props,
          responder = _instance2.responder,
          state = _instance2.state;

      currentInstance = _instance2;
      currentEventQueuePriority = ContinuousEvent;
      currentEventQueue = [];
      var onOwnershipChange = responder.onOwnershipChange;
      if (onOwnershipChange !== null) {
        onOwnershipChange(eventResponderContext, props, state);
      }
    }
    processEventQueue();
  } finally {
    currentInstance = previousInstance;
    currentEventQueue = previousEventQueue;
    currentEventQueuePriority = previousEventQueuePriority;
  }
}

function mountEventResponder(responder, responderInstance, props, state) {
  if (responder.onOwnershipChange !== null) {
    ownershipChangeListeners.add(responderInstance);
  }
  var onMount = responder.onMount;
  if (onMount !== null) {
    currentEventQueuePriority = ContinuousEvent;
    currentInstance = responderInstance;
    currentEventQueue = [];
    try {
      onMount(eventResponderContext, props, state);
      processEventQueue();
    } finally {
      currentEventQueue = null;
      currentInstance = null;
      currentTimers = null;
    }
  }
}

function unmountEventResponder(responderInstance) {
  var responder = responderInstance.responder;
  var onUnmount = responder.onUnmount;
  if (onUnmount !== null) {
    var props = responderInstance.props,
        state = responderInstance.state;

    currentEventQueue = [];
    currentEventQueuePriority = ContinuousEvent;
    currentInstance = responderInstance;
    try {
      onUnmount(eventResponderContext, props, state);
      processEventQueue();
    } finally {
      currentEventQueue = null;
      currentInstance = null;
      currentTimers = null;
    }
  }
  releaseOwnershipForEventResponderInstance(responderInstance);
  if (responder.onOwnershipChange !== null) {
    ownershipChangeListeners.delete(responderInstance);
  }
  var rootEventTypesSet = responderInstance.rootEventTypes;
  if (rootEventTypesSet !== null) {
    var rootEventTypes = Array.from(rootEventTypesSet);

    for (var i = 0; i < rootEventTypes.length; i++) {
      var topLevelEventType = rootEventTypes[i];
      var rootEventResponderInstances = rootEventTypesToEventResponderInstances.get(topLevelEventType);
      if (rootEventResponderInstances !== undefined) {
        rootEventResponderInstances.delete(responderInstance);
      }
    }
  }
}

function validateResponderContext() {
  (function () {
    if (!(currentInstance !== null)) {
      {
        throw ReactError(Error('An event responder context was used outside of an event cycle. Use context.setTimeout() to use asynchronous responder context outside of event cycle .'));
      }
    }
  })();
}

function dispatchEventForResponderEventSystem(topLevelType, targetFiber, nativeEvent, nativeEventTarget, eventSystemFlags) {
  if (enableFlareAPI) {
    var previousEventQueue = currentEventQueue;
    var previousInstance = currentInstance;
    var previousTimers = currentTimers;
    var previousTimeStamp = currentTimeStamp;
    var previousDocument = currentDocument;
    var previousEventQueuePriority = currentEventQueuePriority;
    currentTimers = null;
    currentEventQueue = [];
    currentEventQueuePriority = ContinuousEvent;
    // nodeType 9 is DOCUMENT_NODE
    currentDocument = nativeEventTarget.nodeType === 9 ? nativeEventTarget : nativeEventTarget.ownerDocument;
    // We might want to control timeStamp another way here
    currentTimeStamp = nativeEvent.timeStamp;
    try {
      traverseAndHandleEventResponderInstances(topLevelType, targetFiber, nativeEvent, nativeEventTarget, eventSystemFlags);
      processEventQueue();
    } finally {
      currentTimers = previousTimers;
      currentInstance = previousInstance;
      currentEventQueue = previousEventQueue;
      currentTimeStamp = previousTimeStamp;
      currentDocument = previousDocument;
      currentEventQueuePriority = previousEventQueuePriority;
    }
  }
}

function addRootEventTypesForResponderInstance(responderInstance, rootEventTypes) {
  for (var i = 0; i < rootEventTypes.length; i++) {
    var rootEventType = rootEventTypes[i];
    registerRootEventType(rootEventType, responderInstance);
  }
}

function registerRootEventType(rootEventType, eventResponderInstance) {
  var rootEventResponderInstances = rootEventTypesToEventResponderInstances.get(rootEventType);
  if (rootEventResponderInstances === undefined) {
    rootEventResponderInstances = new Set();
    rootEventTypesToEventResponderInstances.set(rootEventType, rootEventResponderInstances);
  }
  var rootEventTypesSet = eventResponderInstance.rootEventTypes;
  if (rootEventTypesSet === null) {
    rootEventTypesSet = eventResponderInstance.rootEventTypes = new Set();
  }
  (function () {
    if (!!rootEventTypesSet.has(rootEventType)) {
      {
        throw ReactError(Error('addRootEventTypes() found a duplicate root event type of "' + rootEventType + '". This might be because the event type exists in the event responder "rootEventTypes" array or because of a previous addRootEventTypes() using this root event type.'));
      }
    }
  })();
  rootEventTypesSet.add(rootEventType);
  rootEventResponderInstances.add(eventResponderInstance);
}

/**
 * `ReactInstanceMap` maintains a mapping from a public facing stateful
 * instance (key) and the internal representation (value). This allows public
 * methods to accept the user facing instance as an argument and map them back
 * to internal methods.
 *
 * Note that this module is currently shared and assumed to be stateless.
 * If this becomes an actual Map, that will break.
 */

/**
 * This API should be called `delete` but we'd have to make sure to always
 * transform these to strings for IE support. When this transform is fully
 * supported we can rename it.
 */


function get(key) {
  return key._reactInternalFiber;
}

function has(key) {
  return key._reactInternalFiber !== undefined;
}

function set(key, value) {
  key._reactInternalFiber = value;
}

// Don't change these two values. They're used by React Dev Tools.
var NoEffect = /*              */0;
var PerformedWork = /*         */1;

// You can change the rest (and add more).
var Placement = /*             */2;
var Update = /*                */4;
var PlacementAndUpdate = /*    */6;
var Deletion = /*              */8;
var ContentReset = /*          */16;
var Callback = /*              */32;
var DidCapture = /*            */64;
var Ref = /*                   */128;
var Snapshot = /*              */256;
var Passive = /*               */512;

// Passive & Update & Callback & Ref & Snapshot
var LifecycleEffectMask = /*   */932;

// Union of all host effects
var HostEffectMask = /*        */1023;

var Incomplete = /*            */1024;
var ShouldCapture = /*         */2048;

var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;

var MOUNTING = 1;
var MOUNTED = 2;
var UNMOUNTED = 3;

function isFiberMountedImpl(fiber) {
  var node = fiber;
  if (!fiber.alternate) {
    // If there is no alternate, this might be a new tree that isn't inserted
    // yet. If it is, then it will have a pending insertion effect on it.
    if ((node.effectTag & Placement) !== NoEffect) {
      return MOUNTING;
    }
    while (node.return) {
      node = node.return;
      if ((node.effectTag & Placement) !== NoEffect) {
        return MOUNTING;
      }
    }
  } else {
    while (node.return) {
      node = node.return;
    }
  }
  if (node.tag === HostRoot) {
    // TODO: Check if this was a nested HostRoot when used with
    // renderContainerIntoSubtree.
    return MOUNTED;
  }
  // If we didn't hit the root, that means that we're in an disconnected tree
  // that has been unmounted.
  return UNMOUNTED;
}

function isFiberMounted(fiber) {
  return isFiberMountedImpl(fiber) === MOUNTED;
}

function isMounted(component) {
  {
    var owner = ReactCurrentOwner$1.current;
    if (owner !== null && owner.tag === ClassComponent) {
      var ownerFiber = owner;
      var instance = ownerFiber.stateNode;
      !instance._warnedAboutRefsInRender ? warningWithoutStack$1(false, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component') : void 0;
      instance._warnedAboutRefsInRender = true;
    }
  }

  var fiber = get(component);
  if (!fiber) {
    return false;
  }
  return isFiberMountedImpl(fiber) === MOUNTED;
}

function assertIsMounted(fiber) {
  (function () {
    if (!(isFiberMountedImpl(fiber) === MOUNTED)) {
      {
        throw ReactError(Error('Unable to find node on an unmounted component.'));
      }
    }
  })();
}

function findCurrentFiberUsingSlowPath(fiber) {
  var alternate = fiber.alternate;
  if (!alternate) {
    // If there is no alternate, then we only need to check if it is mounted.
    var state = isFiberMountedImpl(fiber);
    (function () {
      if (!(state !== UNMOUNTED)) {
        {
          throw ReactError(Error('Unable to find node on an unmounted component.'));
        }
      }
    })();
    if (state === MOUNTING) {
      return null;
    }
    return fiber;
  }
  // If we have two possible branches, we'll walk backwards up to the root
  // to see what path the root points to. On the way we may hit one of the
  // special cases and we'll deal with them.
  var a = fiber;
  var b = alternate;
  while (true) {
    var parentA = a.return;
    if (parentA === null) {
      // We're at the root.
      break;
    }
    var parentB = parentA.alternate;
    if (parentB === null) {
      // There is no alternate. This is an unusual case. Currently, it only
      // happens when a Suspense component is hidden. An extra fragment fiber
      // is inserted in between the Suspense fiber and its children. Skip
      // over this extra fragment fiber and proceed to the next parent.
      var nextParent = parentA.return;
      if (nextParent !== null) {
        a = b = nextParent;
        continue;
      }
      // If there's no parent, we're at the root.
      break;
    }

    // If both copies of the parent fiber point to the same child, we can
    // assume that the child is current. This happens when we bailout on low
    // priority: the bailed out fiber's child reuses the current child.
    if (parentA.child === parentB.child) {
      var child = parentA.child;
      while (child) {
        if (child === a) {
          // We've determined that A is the current branch.
          assertIsMounted(parentA);
          return fiber;
        }
        if (child === b) {
          // We've determined that B is the current branch.
          assertIsMounted(parentA);
          return alternate;
        }
        child = child.sibling;
      }
      // We should never have an alternate for any mounting node. So the only
      // way this could possibly happen is if this was unmounted, if at all.
      (function () {
        {
          {
            throw ReactError(Error('Unable to find node on an unmounted component.'));
          }
        }
      })();
    }

    if (a.return !== b.return) {
      // The return pointer of A and the return pointer of B point to different
      // fibers. We assume that return pointers never criss-cross, so A must
      // belong to the child set of A.return, and B must belong to the child
      // set of B.return.
      a = parentA;
      b = parentB;
    } else {
      // The return pointers point to the same fiber. We'll have to use the
      // default, slow path: scan the child sets of each parent alternate to see
      // which child belongs to which set.
      //
      // Search parent A's child set
      var didFindChild = false;
      var _child = parentA.child;
      while (_child) {
        if (_child === a) {
          didFindChild = true;
          a = parentA;
          b = parentB;
          break;
        }
        if (_child === b) {
          didFindChild = true;
          b = parentA;
          a = parentB;
          break;
        }
        _child = _child.sibling;
      }
      if (!didFindChild) {
        // Search parent B's child set
        _child = parentB.child;
        while (_child) {
          if (_child === a) {
            didFindChild = true;
            a = parentB;
            b = parentA;
            break;
          }
          if (_child === b) {
            didFindChild = true;
            b = parentB;
            a = parentA;
            break;
          }
          _child = _child.sibling;
        }
        (function () {
          if (!didFindChild) {
            {
              throw ReactError(Error('Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.'));
            }
          }
        })();
      }
    }

    (function () {
      if (!(a.alternate === b)) {
        {
          throw ReactError(Error('Return fibers should always be each others\' alternates. This error is likely caused by a bug in React. Please file an issue.'));
        }
      }
    })();
  }
  // If the root is not a host container, we're in a disconnected tree. I.e.
  // unmounted.
  (function () {
    if (!(a.tag === HostRoot)) {
      {
        throw ReactError(Error('Unable to find node on an unmounted component.'));
      }
    }
  })();
  if (a.stateNode.current === a) {
    // We've determined that A is the current branch.
    return fiber;
  }
  // Otherwise B has to be current branch.
  return alternate;
}

function findCurrentHostFiber(parent) {
  var currentParent = findCurrentFiberUsingSlowPath(parent);
  if (!currentParent) {
    return null;
  }

  // Next we'll drill down this component to find the first HostComponent/Text.
  var node = currentParent;
  while (true) {
    if (node.tag === HostComponent || node.tag === HostText) {
      return node;
    } else if (node.child) {
      node.child.return = node;
      node = node.child;
      continue;
    }
    if (node === currentParent) {
      return null;
    }
    while (!node.sibling) {
      if (!node.return || node.return === currentParent) {
        return null;
      }
      node = node.return;
    }
    node.sibling.return = node.return;
    node = node.sibling;
  }
  // Flow needs the return null here, but ESLint complains about it.
  // eslint-disable-next-line no-unreachable
  return null;
}

function findCurrentHostFiberWithNoPortals(parent) {
  var currentParent = findCurrentFiberUsingSlowPath(parent);
  if (!currentParent) {
    return null;
  }

  // Next we'll drill down this component to find the first HostComponent/Text.
  var node = currentParent;
  while (true) {
    if (node.tag === HostComponent || node.tag === HostText || node.tag === FundamentalComponent) {
      return node;
    } else if (node.child && node.tag !== HostPortal) {
      node.child.return = node;
      node = node.child;
      continue;
    }
    if (node === currentParent) {
      return null;
    }
    while (!node.sibling) {
      if (!node.return || node.return === currentParent) {
        return null;
      }
      node = node.return;
    }
    node.sibling.return = node.return;
    node = node.sibling;
  }
  // Flow needs the return null here, but ESLint complains about it.
  // eslint-disable-next-line no-unreachable
  return null;
}

function addEventBubbleListener(element, eventType, listener) {
  element.addEventListener(eventType, listener, false);
}

function addEventCaptureListener(element, eventType, listener) {
  element.addEventListener(eventType, listener, true);
}

function addEventCaptureListenerWithPassiveFlag(element, eventType, listener, passive) {
  element.addEventListener(eventType, listener, {
    capture: true,
    passive: passive
  });
}

/**
 * @interface Event
 * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
 * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
 */
var SyntheticAnimationEvent = SyntheticEvent.extend({
  animationName: null,
  elapsedTime: null,
  pseudoElement: null
});

/**
 * @interface Event
 * @see http://www.w3.org/TR/clipboard-apis/
 */
var SyntheticClipboardEvent = SyntheticEvent.extend({
  clipboardData: function (event) {
    return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
  }
});

/**
 * @interface FocusEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */
var SyntheticFocusEvent = SyntheticUIEvent.extend({
  relatedTarget: null
});

/**
 * `charCode` represents the actual "character code" and is safe to use with
 * `String.fromCharCode`. As such, only keys that correspond to printable
 * characters produce a valid `charCode`, the only exception to this is Enter.
 * The Tab-key is considered non-printable and does not have a `charCode`,
 * presumably because it does not produce a tab-character in browsers.
 *
 * @param {object} nativeEvent Native browser event.
 * @return {number} Normalized `charCode` property.
 */
function getEventCharCode(nativeEvent) {
  var charCode = void 0;
  var keyCode = nativeEvent.keyCode;

  if ('charCode' in nativeEvent) {
    charCode = nativeEvent.charCode;

    // FF does not set `charCode` for the Enter-key, check against `keyCode`.
    if (charCode === 0 && keyCode === 13) {
      charCode = 13;
    }
  } else {
    // IE8 does not implement `charCode`, but `keyCode` has the correct value.
    charCode = keyCode;
  }

  // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
  // report Enter as charCode 10 when ctrl is pressed.
  if (charCode === 10) {
    charCode = 13;
  }

  // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
  // Must not discard the (non-)printable Enter-key.
  if (charCode >= 32 || charCode === 13) {
    return charCode;
  }

  return 0;
}

/**
 * Normalization of deprecated HTML5 `key` values
 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
 */
var normalizeKey = {
  Esc: 'Escape',
  Spacebar: ' ',
  Left: 'ArrowLeft',
  Up: 'ArrowUp',
  Right: 'ArrowRight',
  Down: 'ArrowDown',
  Del: 'Delete',
  Win: 'OS',
  Menu: 'ContextMenu',
  Apps: 'ContextMenu',
  Scroll: 'ScrollLock',
  MozPrintableKey: 'Unidentified'
};

/**
 * Translation from legacy `keyCode` to HTML5 `key`
 * Only special keys supported, all others depend on keyboard layout or browser
 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
 */
var translateToKey = {
  '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'
};

/**
 * @param {object} nativeEvent Native browser event.
 * @return {string} Normalized `key` property.
 */
function getEventKey(nativeEvent) {
  if (nativeEvent.key) {
    // Normalize inconsistent values reported by browsers due to
    // implementations of a working draft specification.

    // FireFox implements `key` but returns `MozPrintableKey` for all
    // printable characters (normalized to `Unidentified`), ignore it.
    var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
    if (key !== 'Unidentified') {
      return key;
    }
  }

  // Browser does not implement `key`, polyfill as much of it as we can.
  if (nativeEvent.type === 'keypress') {
    var charCode = getEventCharCode(nativeEvent);

    // The enter-key is technically both printable and non-printable and can
    // thus be captured by `keypress`, no other non-printable key should.
    return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
  }
  if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
    // While user keyboard layout determines the actual meaning of each
    // `keyCode` value, almost all function keys have a universal value.
    return translateToKey[nativeEvent.keyCode] || 'Unidentified';
  }
  return '';
}

/**
 * @interface KeyboardEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */
var SyntheticKeyboardEvent = SyntheticUIEvent.extend({
  key: getEventKey,
  location: null,
  ctrlKey: null,
  shiftKey: null,
  altKey: null,
  metaKey: null,
  repeat: null,
  locale: null,
  getModifierState: getEventModifierState,
  // Legacy Interface
  charCode: function (event) {
    // `charCode` is the result of a KeyPress event and represents the value of
    // the actual printable character.

    // KeyPress is deprecated, but its replacement is not yet final and not
    // implemented in any major browser. Only KeyPress has charCode.
    if (event.type === 'keypress') {
      return getEventCharCode(event);
    }
    return 0;
  },
  keyCode: function (event) {
    // `keyCode` is the result of a KeyDown/Up event and represents the value of
    // physical keyboard key.

    // The actual meaning of the value depends on the users' keyboard layout
    // which cannot be detected. Assuming that it is a US keyboard layout
    // provides a surprisingly accurate mapping for US and European users.
    // Due to this, it is left to the user to implement at this time.
    if (event.type === 'keydown' || event.type === 'keyup') {
      return event.keyCode;
    }
    return 0;
  },
  which: function (event) {
    // `which` is an alias for either `keyCode` or `charCode` depending on the
    // type of the event.
    if (event.type === 'keypress') {
      return getEventCharCode(event);
    }
    if (event.type === 'keydown' || event.type === 'keyup') {
      return event.keyCode;
    }
    return 0;
  }
});

/**
 * @interface DragEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */
var SyntheticDragEvent = SyntheticMouseEvent.extend({
  dataTransfer: null
});

/**
 * @interface TouchEvent
 * @see http://www.w3.org/TR/touch-events/
 */
var SyntheticTouchEvent = SyntheticUIEvent.extend({
  touches: null,
  targetTouches: null,
  changedTouches: null,
  altKey: null,
  metaKey: null,
  ctrlKey: null,
  shiftKey: null,
  getModifierState: getEventModifierState
});

/**
 * @interface Event
 * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
 * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
 */
var SyntheticTransitionEvent = SyntheticEvent.extend({
  propertyName: null,
  elapsedTime: null,
  pseudoElement: null
});

/**
 * @interface WheelEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */
var SyntheticWheelEvent = SyntheticMouseEvent.extend({
  deltaX: function (event) {
    return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
    'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
  },
  deltaY: function (event) {
    return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
    'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
    'wheelDelta' in event ? -event.wheelDelta : 0;
  },

  deltaZ: null,

  // Browsers without "deltaMode" is reporting in raw wheel delta where one
  // notch on the scroll is always +/- 120, roughly equivalent to pixels.
  // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
  // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
  deltaMode: null
});

/**
 * Turns
 * ['abort', ...]
 * into
 * eventTypes = {
 *   'abort': {
 *     phasedRegistrationNames: {
 *       bubbled: 'onAbort',
 *       captured: 'onAbortCapture',
 *     },
 *     dependencies: [TOP_ABORT],
 *   },
 *   ...
 * };
 * topLevelEventsToDispatchConfig = new Map([
 *   [TOP_ABORT, { sameConfig }],
 * ]);
 */

var eventTuples = [
// Discrete events
[TOP_BLUR, 'blur', DiscreteEvent], [TOP_CANCEL, 'cancel', DiscreteEvent], [TOP_CLICK, 'click', DiscreteEvent], [TOP_CLOSE, 'close', DiscreteEvent], [TOP_CONTEXT_MENU, 'contextMenu', DiscreteEvent], [TOP_COPY, 'copy', DiscreteEvent], [TOP_CUT, 'cut', DiscreteEvent], [TOP_AUX_CLICK, 'auxClick', DiscreteEvent], [TOP_DOUBLE_CLICK, 'doubleClick', DiscreteEvent], [TOP_DRAG_END, 'dragEnd', DiscreteEvent], [TOP_DRAG_START, 'dragStart', DiscreteEvent], [TOP_DROP, 'drop', DiscreteEvent], [TOP_FOCUS, 'focus', DiscreteEvent], [TOP_INPUT, 'input', DiscreteEvent], [TOP_INVALID, 'invalid', DiscreteEvent], [TOP_KEY_DOWN, 'keyDown', DiscreteEvent], [TOP_KEY_PRESS, 'keyPress', DiscreteEvent], [TOP_KEY_UP, 'keyUp', DiscreteEvent], [TOP_MOUSE_DOWN, 'mouseDown', DiscreteEvent], [TOP_MOUSE_UP, 'mouseUp', DiscreteEvent], [TOP_PASTE, 'paste', DiscreteEvent], [TOP_PAUSE, 'pause', DiscreteEvent], [TOP_PLAY, 'play', DiscreteEvent], [TOP_POINTER_CANCEL, 'pointerCancel', DiscreteEvent], [TOP_POINTER_DOWN, 'pointerDown', DiscreteEvent], [TOP_POINTER_UP, 'pointerUp', DiscreteEvent], [TOP_RATE_CHANGE, 'rateChange', DiscreteEvent], [TOP_RESET, 'reset', DiscreteEvent], [TOP_SEEKED, 'seeked', DiscreteEvent], [TOP_SUBMIT, 'submit', DiscreteEvent], [TOP_TOUCH_CANCEL, 'touchCancel', DiscreteEvent], [TOP_TOUCH_END, 'touchEnd', DiscreteEvent], [TOP_TOUCH_START, 'touchStart', DiscreteEvent], [TOP_VOLUME_CHANGE, 'volumeChange', DiscreteEvent],

// User-blocking events
[TOP_DRAG, 'drag', UserBlockingEvent], [TOP_DRAG_ENTER, 'dragEnter', UserBlockingEvent], [TOP_DRAG_EXIT, 'dragExit', UserBlockingEvent], [TOP_DRAG_LEAVE, 'dragLeave', UserBlockingEvent], [TOP_DRAG_OVER, 'dragOver', UserBlockingEvent], [TOP_MOUSE_MOVE, 'mouseMove', UserBlockingEvent], [TOP_MOUSE_OUT, 'mouseOut', UserBlockingEvent], [TOP_MOUSE_OVER, 'mouseOver', UserBlockingEvent], [TOP_POINTER_MOVE, 'pointerMove', UserBlockingEvent], [TOP_POINTER_OUT, 'pointerOut', UserBlockingEvent], [TOP_POINTER_OVER, 'pointerOver', UserBlockingEvent], [TOP_SCROLL, 'scroll', UserBlockingEvent], [TOP_TOGGLE, 'toggle', UserBlockingEvent], [TOP_TOUCH_MOVE, 'touchMove', UserBlockingEvent], [TOP_WHEEL, 'wheel', UserBlockingEvent],

// Continuous events
[TOP_ABORT, 'abort', ContinuousEvent], [TOP_ANIMATION_END, 'animationEnd', ContinuousEvent], [TOP_ANIMATION_ITERATION, 'animationIteration', ContinuousEvent], [TOP_ANIMATION_START, 'animationStart', ContinuousEvent], [TOP_CAN_PLAY, 'canPlay', ContinuousEvent], [TOP_CAN_PLAY_THROUGH, 'canPlayThrough', ContinuousEvent], [TOP_DURATION_CHANGE, 'durationChange', ContinuousEvent], [TOP_EMPTIED, 'emptied', ContinuousEvent], [TOP_ENCRYPTED, 'encrypted', ContinuousEvent], [TOP_ENDED, 'ended', ContinuousEvent], [TOP_ERROR, 'error', ContinuousEvent], [TOP_GOT_POINTER_CAPTURE, 'gotPointerCapture', ContinuousEvent], [TOP_LOAD, 'load', ContinuousEvent], [TOP_LOADED_DATA, 'loadedData', ContinuousEvent], [TOP_LOADED_METADATA, 'loadedMetadata', ContinuousEvent], [TOP_LOAD_START, 'loadStart', ContinuousEvent], [TOP_LOST_POINTER_CAPTURE, 'lostPointerCapture', ContinuousEvent], [TOP_PLAYING, 'playing', ContinuousEvent], [TOP_PROGRESS, 'progress', ContinuousEvent], [TOP_SEEKING, 'seeking', ContinuousEvent], [TOP_STALLED, 'stalled', ContinuousEvent], [TOP_SUSPEND, 'suspend', ContinuousEvent], [TOP_TIME_UPDATE, 'timeUpdate', ContinuousEvent], [TOP_TRANSITION_END, 'transitionEnd', ContinuousEvent], [TOP_WAITING, 'waiting', ContinuousEvent]];

var eventTypes$4 = {};
var topLevelEventsToDispatchConfig = {};

for (var i = 0; i < eventTuples.length; i++) {
  var eventTuple = eventTuples[i];
  var topEvent = eventTuple[0];
  var event = eventTuple[1];
  var eventPriority = eventTuple[2];

  var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
  var onEvent = 'on' + capitalizedEvent;

  var config = {
    phasedRegistrationNames: {
      bubbled: onEvent,
      captured: onEvent + 'Capture'
    },
    dependencies: [topEvent],
    eventPriority: eventPriority
  };
  eventTypes$4[event] = config;
  topLevelEventsToDispatchConfig[topEvent] = config;
}

// Only used in DEV for exhaustiveness validation.
var knownHTMLTopLevelTypes = [TOP_ABORT, TOP_CANCEL, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_CLOSE, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_INPUT, TOP_INVALID, TOP_LOAD, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_RESET, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUBMIT, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_TOGGLE, TOP_VOLUME_CHANGE, TOP_WAITING];

var SimpleEventPlugin = {
  eventTypes: eventTypes$4,

  getEventPriority: function (topLevelType) {
    var config = topLevelEventsToDispatchConfig[topLevelType];
    return config !== undefined ? config.eventPriority : ContinuousEvent;
  },


  extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
    var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
    if (!dispatchConfig) {
      return null;
    }
    var EventConstructor = void 0;
    switch (topLevelType) {
      case TOP_KEY_PRESS:
        // Firefox creates a keypress event for function keys too. This removes
        // the unwanted keypress events. Enter is however both printable and
        // non-printable. One would expect Tab to be as well (but it isn't).
        if (getEventCharCode(nativeEvent) === 0) {
          return null;
        }
      /* falls through */
      case TOP_KEY_DOWN:
      case TOP_KEY_UP:
        EventConstructor = SyntheticKeyboardEvent;
        break;
      case TOP_BLUR:
      case TOP_FOCUS:
        EventConstructor = SyntheticFocusEvent;
        break;
      case TOP_CLICK:
        // Firefox creates a click event on right mouse clicks. This removes the
        // unwanted click events.
        if (nativeEvent.button === 2) {
          return null;
        }
      /* falls through */
      case TOP_AUX_CLICK:
      case TOP_DOUBLE_CLICK:
      case TOP_MOUSE_DOWN:
      case TOP_MOUSE_MOVE:
      case TOP_MOUSE_UP:
      // TODO: Disabled elements should not respond to mouse events
      /* falls through */
      case TOP_MOUSE_OUT:
      case TOP_MOUSE_OVER:
      case TOP_CONTEXT_MENU:
        EventConstructor = SyntheticMouseEvent;
        break;
      case TOP_DRAG:
      case TOP_DRAG_END:
      case TOP_DRAG_ENTER:
      case TOP_DRAG_EXIT:
      case TOP_DRAG_LEAVE:
      case TOP_DRAG_OVER:
      case TOP_DRAG_START:
      case TOP_DROP:
        EventConstructor = SyntheticDragEvent;
        break;
      case TOP_TOUCH_CANCEL:
      case TOP_TOUCH_END:
      case TOP_TOUCH_MOVE:
      case TOP_TOUCH_START:
        EventConstructor = SyntheticTouchEvent;
        break;
      case TOP_ANIMATION_END:
      case TOP_ANIMATION_ITERATION:
      case TOP_ANIMATION_START:
        EventConstructor = SyntheticAnimationEvent;
        break;
      case TOP_TRANSITION_END:
        EventConstructor = SyntheticTransitionEvent;
        break;
      case TOP_SCROLL:
        EventConstructor = SyntheticUIEvent;
        break;
      case TOP_WHEEL:
        EventConstructor = SyntheticWheelEvent;
        break;
      case TOP_COPY:
      case TOP_CUT:
      case TOP_PASTE:
        EventConstructor = SyntheticClipboardEvent;
        break;
      case TOP_GOT_POINTER_CAPTURE:
      case TOP_LOST_POINTER_CAPTURE:
      case TOP_POINTER_CANCEL:
      case TOP_POINTER_DOWN:
      case TOP_POINTER_MOVE:
      case TOP_POINTER_OUT:
      case TOP_POINTER_OVER:
      case TOP_POINTER_UP:
        EventConstructor = SyntheticPointerEvent;
        break;
      default:
        {
          if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) {
            warningWithoutStack$1(false, 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType);
          }
        }
        // HTML Events
        // @see http://www.w3.org/TR/html5/index.html#events-0
        EventConstructor = SyntheticEvent;
        break;
    }
    var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
    accumulateTwoPhaseDispatches(event);
    return event;
  }
};

var passiveBrowserEventsSupported = false;

// Check if browser support events with passive listeners
// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support
if (enableFlareAPI && canUseDOM) {
  try {
    var options = {};
    // $FlowFixMe: Ignore Flow complaining about needing a value
    Object.defineProperty(options, 'passive', {
      get: function () {
        passiveBrowserEventsSupported = true;
      }
    });
    window.addEventListener('test', options, options);
    window.removeEventListener('test', options, options);
  } catch (e) {
    passiveBrowserEventsSupported = false;
  }
}

// Intentionally not named imports because Rollup would use dynamic dispatch for
// CommonJS interop named imports.
var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;
var runWithPriority = Scheduler.unstable_runWithPriority;
var getEventPriority = SimpleEventPlugin.getEventPriority;


var CALLBACK_BOOKKEEPING_POOL_SIZE = 10;
var callbackBookkeepingPool = [];

/**
 * Find the deepest React component completely containing the root of the
 * passed-in instance (for use when entire React trees are nested within each
 * other). If React trees are not nested, returns null.
 */
function findRootContainerNode(inst) {
  // TODO: It may be a good idea to cache this to prevent unnecessary DOM
  // traversal, but caching is difficult to do correctly without using a
  // mutation observer to listen for all DOM changes.
  while (inst.return) {
    inst = inst.return;
  }
  if (inst.tag !== HostRoot) {
    // This can happen if we're in a detached tree.
    return null;
  }
  return inst.stateNode.containerInfo;
}

// Used to store ancestor hierarchy in top level callback
function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst) {
  if (callbackBookkeepingPool.length) {
    var instance = callbackBookkeepingPool.pop();
    instance.topLevelType = topLevelType;
    instance.nativeEvent = nativeEvent;
    instance.targetInst = targetInst;
    return instance;
  }
  return {
    topLevelType: topLevelType,
    nativeEvent: nativeEvent,
    targetInst: targetInst,
    ancestors: []
  };
}

function releaseTopLevelCallbackBookKeeping(instance) {
  instance.topLevelType = null;
  instance.nativeEvent = null;
  instance.targetInst = null;
  instance.ancestors.length = 0;
  if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) {
    callbackBookkeepingPool.push(instance);
  }
}

function handleTopLevel(bookKeeping) {
  var targetInst = bookKeeping.targetInst;

  // Loop through the hierarchy, in case there's any nested components.
  // It's important that we build the array of ancestors before calling any
  // event handlers, because event handlers can modify the DOM, leading to
  // inconsistencies with ReactMount's node cache. See #1105.
  var ancestor = targetInst;
  do {
    if (!ancestor) {
      var _ancestors = bookKeeping.ancestors;
      _ancestors.push(ancestor);
      break;
    }
    var root = findRootContainerNode(ancestor);
    if (!root) {
      break;
    }
    bookKeeping.ancestors.push(ancestor);
    ancestor = getClosestInstanceFromNode(root);
  } while (ancestor);

  for (var i = 0; i < bookKeeping.ancestors.length; i++) {
    targetInst = bookKeeping.ancestors[i];
    var eventTarget = getEventTarget(bookKeeping.nativeEvent);
    var _topLevelType = bookKeeping.topLevelType;
    var _nativeEvent = bookKeeping.nativeEvent;

    runExtractedPluginEventsInBatch(_topLevelType, targetInst, _nativeEvent, eventTarget);
  }
}

// TODO: can we stop exporting these?
var _enabled = true;

function setEnabled(enabled) {
  _enabled = !!enabled;
}

function isEnabled() {
  return _enabled;
}

function trapBubbledEvent(topLevelType, element) {
  trapEventForPluginEventSystem(element, topLevelType, false);
}

function trapCapturedEvent(topLevelType, element) {
  trapEventForPluginEventSystem(element, topLevelType, true);
}

function trapEventForResponderEventSystem(element, topLevelType, passive) {
  if (enableFlareAPI) {
    var rawEventName = getRawEventName(topLevelType);
    var eventFlags = RESPONDER_EVENT_SYSTEM;

    // If passive option is not supported, then the event will be
    // active and not passive, but we flag it as using not being
    // supported too. This way the responder event plugins know,
    // and can provide polyfills if needed.
    if (passive) {
      if (passiveBrowserEventsSupported) {
        eventFlags |= IS_PASSIVE;
      } else {
        eventFlags |= IS_ACTIVE;
        eventFlags |= PASSIVE_NOT_SUPPORTED;
        passive = false;
      }
    } else {
      eventFlags |= IS_ACTIVE;
    }
    // Check if interactive and wrap in discreteUpdates
    var listener = dispatchEvent.bind(null, topLevelType, eventFlags);
    if (passiveBrowserEventsSupported) {
      addEventCaptureListenerWithPassiveFlag(element, rawEventName, listener, passive);
    } else {
      addEventCaptureListener(element, rawEventName, listener);
    }
  }
}

function trapEventForPluginEventSystem(element, topLevelType, capture) {
  var listener = void 0;
  switch (getEventPriority(topLevelType)) {
    case DiscreteEvent:
      listener = dispatchDiscreteEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM);
      break;
    case UserBlockingEvent:
      listener = dispatchUserBlockingUpdate.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM);
      break;
    case ContinuousEvent:
    default:
      listener = dispatchEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM);
      break;
  }

  var rawEventName = getRawEventName(topLevelType);
  if (capture) {
    addEventCaptureListener(element, rawEventName, listener);
  } else {
    addEventBubbleListener(element, rawEventName, listener);
  }
}

function dispatchDiscreteEvent(topLevelType, eventSystemFlags, nativeEvent) {
  flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);
  discreteUpdates(dispatchEvent, topLevelType, eventSystemFlags, nativeEvent);
}

function dispatchUserBlockingUpdate(topLevelType, eventSystemFlags, nativeEvent) {
  if (enableUserBlockingEvents) {
    runWithPriority(UserBlockingPriority, dispatchEvent.bind(null, topLevelType, eventSystemFlags, nativeEvent));
  } else {
    dispatchEvent(topLevelType, eventSystemFlags, nativeEvent);
  }
}

function dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst) {
  var bookKeeping = getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst);

  try {
    // Event queue being processed in the same cycle allows
    // `preventDefault`.
    batchedEventUpdates(handleTopLevel, bookKeeping);
  } finally {
    releaseTopLevelCallbackBookKeeping(bookKeeping);
  }
}

function dispatchEvent(topLevelType, eventSystemFlags, nativeEvent) {
  if (!_enabled) {
    return;
  }
  var nativeEventTarget = getEventTarget(nativeEvent);
  var targetInst = getClosestInstanceFromNode(nativeEventTarget);

  if (targetInst !== null && typeof targetInst.tag === 'number' && !isFiberMounted(targetInst)) {
    // If we get an event (ex: img onload) before committing that
    // component's mount, ignore it for now (that is, treat it as if it was an
    // event on a non-React tree). We might also consider queueing events and
    // dispatching them after the mount.
    targetInst = null;
  }

  if (enableFlareAPI) {
    if (eventSystemFlags === PLUGIN_EVENT_SYSTEM) {
      dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst);
    } else {
      // React Flare event system
      dispatchEventForResponderEventSystem(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
    }
  } else {
    dispatchEventForPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst);
  }
}

/**
 * Summary of `ReactBrowserEventEmitter` event handling:
 *
 *  - Top-level delegation is used to trap most native browser events. This
 *    may only occur in the main thread and is the responsibility of
 *    ReactDOMEventListener, which is injected and can therefore support
 *    pluggable event sources. This is the only work that occurs in the main
 *    thread.
 *
 *  - We normalize and de-duplicate events to account for browser quirks. This
 *    may be done in the worker thread.
 *
 *  - Forward these native events (with the associated top-level type used to
 *    trap it) to `EventPluginHub`, which in turn will ask plugins if they want
 *    to extract any synthetic events.
 *
 *  - The `EventPluginHub` will then process each event by annotating them with
 *    "dispatches", a sequence of listeners and IDs that care about that event.
 *
 *  - The `EventPluginHub` then dispatches the events.
 *
 * Overview of React and the event system:
 *
 * +------------+    .
 * |    DOM     |    .
 * +------------+    .
 *       |           .
 *       v           .
 * +------------+    .
 * | ReactEvent |    .
 * |  Listener  |    .
 * +------------+    .                         +-----------+
 *       |           .               +--------+|SimpleEvent|
 *       |           .               |         |Plugin     |
 * +-----|------+    .               v         +-----------+
 * |     |      |    .    +--------------+                    +------------+
 * |     +-----------.--->|EventPluginHub|                    |    Event   |
 * |            |    .    |              |     +-----------+  | Propagators|
 * | ReactEvent |    .    |              |     |TapEvent   |  |------------|
 * |  Emitter   |    .    |              |<---+|Plugin     |  |other plugin|
 * |            |    .    |              |     +-----------+  |  utilities |
 * |     +-----------.--->|              |                    +------------+
 * |     |      |    .    +--------------+
 * +-----|------+    .                ^        +-----------+
 *       |           .                |        |Enter/Leave|
 *       +           .                +-------+|Plugin     |
 * +-------------+   .                         +-----------+
 * | application |   .
 * |-------------|   .
 * |             |   .
 * |             |   .
 * +-------------+   .
 *                   .
 *    React Core     .  General Purpose Event Plugin System
 */

var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
var elementListeningSets = new PossiblyWeakMap();

function getListeningSetForElement(element) {
  var listeningSet = elementListeningSets.get(element);
  if (listeningSet === undefined) {
    listeningSet = new Set();
    elementListeningSets.set(element, listeningSet);
  }
  return listeningSet;
}

/**
 * We listen for bubbled touch events on the document object.
 *
 * Firefox v8.01 (and possibly others) exhibited strange behavior when
 * mounting `onmousemove` events at some node that was not the document
 * element. The symptoms were that if your mouse is not moving over something
 * contained within that mount point (for example on the background) the
 * top-level listeners for `onmousemove` won't be called. However, if you
 * register the `mousemove` on the document object, then it will of course
 * catch all `mousemove`s. This along with iOS quirks, justifies restricting
 * top-level listeners to the document object only, at least for these
 * movement types of events and possibly all events.
 *
 * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
 *
 * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
 * they bubble to document.
 *
 * @param {string} registrationName Name of listener (e.g. `onClick`).
 * @param {object} mountAt Container where to mount the listener
 */
function listenTo(registrationName, mountAt) {
  var listeningSet = getListeningSetForElement(mountAt);
  var dependencies = registrationNameDependencies[registrationName];

  for (var i = 0; i < dependencies.length; i++) {
    var dependency = dependencies[i];
    if (!listeningSet.has(dependency)) {
      switch (dependency) {
        case TOP_SCROLL:
          trapCapturedEvent(TOP_SCROLL, mountAt);
          break;
        case TOP_FOCUS:
        case TOP_BLUR:
          trapCapturedEvent(TOP_FOCUS, mountAt);
          trapCapturedEvent(TOP_BLUR, mountAt);
          // We set the flag for a single dependency later in this function,
          // but this ensures we mark both as attached rather than just one.
          listeningSet.add(TOP_BLUR);
          listeningSet.add(TOP_FOCUS);
          break;
        case TOP_CANCEL:
        case TOP_CLOSE:
          if (isEventSupported(getRawEventName(dependency))) {
            trapCapturedEvent(dependency, mountAt);
          }
          break;
        case TOP_INVALID:
        case TOP_SUBMIT:
        case TOP_RESET:
          // We listen to them on the target DOM elements.
          // Some of them bubble so we don't want them to fire twice.
          break;
        default:
          // By default, listen on the top level to all non-media events.
          // Media events don't bubble so adding the listener wouldn't do anything.
          var isMediaEvent = mediaEventTypes.indexOf(dependency) !== -1;
          if (!isMediaEvent) {
            trapBubbledEvent(dependency, mountAt);
          }
          break;
      }
      listeningSet.add(dependency);
    }
  }
}

function isListeningToAllDependencies(registrationName, mountAt) {
  var listeningSet = getListeningSetForElement(mountAt);
  var dependencies = registrationNameDependencies[registrationName];

  for (var i = 0; i < dependencies.length; i++) {
    var dependency = dependencies[i];
    if (!listeningSet.has(dependency)) {
      return false;
    }
  }
  return true;
}

function getActiveElement(doc) {
  doc = doc || (typeof document !== 'undefined' ? document : undefined);
  if (typeof doc === 'undefined') {
    return null;
  }
  try {
    return doc.activeElement || doc.body;
  } catch (e) {
    return doc.body;
  }
}

/**
 * Given any node return the first leaf node without children.
 *
 * @param {DOMElement|DOMTextNode} node
 * @return {DOMElement|DOMTextNode}
 */
function getLeafNode(node) {
  while (node && node.firstChild) {
    node = node.firstChild;
  }
  return node;
}

/**
 * Get the next sibling within a container. This will walk up the
 * DOM if a node's siblings have been exhausted.
 *
 * @param {DOMElement|DOMTextNode} node
 * @return {?DOMElement|DOMTextNode}
 */
function getSiblingNode(node) {
  while (node) {
    if (node.nextSibling) {
      return node.nextSibling;
    }
    node = node.parentNode;
  }
}

/**
 * Get object describing the nodes which contain characters at offset.
 *
 * @param {DOMElement|DOMTextNode} root
 * @param {number} offset
 * @return {?object}
 */
function getNodeForCharacterOffset(root, offset) {
  var node = getLeafNode(root);
  var nodeStart = 0;
  var nodeEnd = 0;

  while (node) {
    if (node.nodeType === TEXT_NODE) {
      nodeEnd = nodeStart + node.textContent.length;

      if (nodeStart <= offset && nodeEnd >= offset) {
        return {
          node: node,
          offset: offset - nodeStart
        };
      }

      nodeStart = nodeEnd;
    }

    node = getLeafNode(getSiblingNode(node));
  }
}

/**
 * @param {DOMElement} outerNode
 * @return {?object}
 */
function getOffsets(outerNode) {
  var ownerDocument = outerNode.ownerDocument;

  var win = ownerDocument && ownerDocument.defaultView || window;
  var selection = win.getSelection && win.getSelection();

  if (!selection || selection.rangeCount === 0) {
    return null;
  }

  var anchorNode = selection.anchorNode,
      anchorOffset = selection.anchorOffset,
      focusNode = selection.focusNode,
      focusOffset = selection.focusOffset;

  // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
  // up/down buttons on an <input type="number">. Anonymous divs do not seem to
  // expose properties, triggering a "Permission denied error" if any of its
  // properties are accessed. The only seemingly possible way to avoid erroring
  // is to access a property that typically works for non-anonymous divs and
  // catch any error that may otherwise arise. See
  // https://bugzilla.mozilla.org/show_bug.cgi?id=208427

  try {
    /* eslint-disable no-unused-expressions */
    anchorNode.nodeType;
    focusNode.nodeType;
    /* eslint-enable no-unused-expressions */
  } catch (e) {
    return null;
  }

  return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);
}

/**
 * Returns {start, end} where `start` is the character/codepoint index of
 * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
 * `end` is the index of (focusNode, focusOffset).
 *
 * Returns null if you pass in garbage input but we should probably just crash.
 *
 * Exported only for testing.
 */
function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {
  var length = 0;
  var start = -1;
  var end = -1;
  var indexWithinAnchor = 0;
  var indexWithinFocus = 0;
  var node = outerNode;
  var parentNode = null;

  outer: while (true) {
    var next = null;

    while (true) {
      if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {
        start = length + anchorOffset;
      }
      if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {
        end = length + focusOffset;
      }

      if (node.nodeType === TEXT_NODE) {
        length += node.nodeValue.length;
      }

      if ((next = node.firstChild) === null) {
        break;
      }
      // Moving from `node` to its first child `next`.
      parentNode = node;
      node = next;
    }

    while (true) {
      if (node === outerNode) {
        // If `outerNode` has children, this is always the second time visiting
        // it. If it has no children, this is still the first loop, and the only
        // valid selection is anchorNode and focusNode both equal to this node
        // and both offsets 0, in which case we will have handled above.
        break outer;
      }
      if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {
        start = length;
      }
      if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {
        end = length;
      }
      if ((next = node.nextSibling) !== null) {
        break;
      }
      node = parentNode;
      parentNode = node.parentNode;
    }

    // Moving from `node` to its next sibling `next`.
    node = next;
  }

  if (start === -1 || end === -1) {
    // This should never happen. (Would happen if the anchor/focus nodes aren't
    // actually inside the passed-in node.)
    return null;
  }

  return {
    start: start,
    end: end
  };
}

/**
 * In modern non-IE browsers, we can support both forward and backward
 * selections.
 *
 * Note: IE10+ supports the Selection object, but it does not support
 * the `extend` method, which means that even in modern IE, it's not possible
 * to programmatically create a backward selection. Thus, for all IE
 * versions, we use the old IE API to create our selections.
 *
 * @param {DOMElement|DOMTextNode} node
 * @param {object} offsets
 */
function setOffsets(node, offsets) {
  var doc = node.ownerDocument || document;
  var win = doc && doc.defaultView || window;

  // Edge fails with "Object expected" in some scenarios.
  // (For instance: TinyMCE editor used in a list component that supports pasting to add more,
  // fails when pasting 100+ items)
  if (!win.getSelection) {
    return;
  }

  var selection = win.getSelection();
  var length = node.textContent.length;
  var start = Math.min(offsets.start, length);
  var end = offsets.end === undefined ? start : Math.min(offsets.end, length);

  // IE 11 uses modern selection, but doesn't support the extend method.
  // Flip backward selections, so we can set with a single range.
  if (!selection.extend && start > end) {
    var temp = end;
    end = start;
    start = temp;
  }

  var startMarker = getNodeForCharacterOffset(node, start);
  var endMarker = getNodeForCharacterOffset(node, end);

  if (startMarker && endMarker) {
    if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {
      return;
    }
    var range = doc.createRange();
    range.setStart(startMarker.node, startMarker.offset);
    selection.removeAllRanges();

    if (start > end) {
      selection.addRange(range);
      selection.extend(endMarker.node, endMarker.offset);
    } else {
      range.setEnd(endMarker.node, endMarker.offset);
      selection.addRange(range);
    }
  }
}

function isTextNode(node) {
  return node && node.nodeType === TEXT_NODE;
}

function containsNode(outerNode, innerNode) {
  if (!outerNode || !innerNode) {
    return false;
  } else if (outerNode === innerNode) {
    return true;
  } else if (isTextNode(outerNode)) {
    return false;
  } else if (isTextNode(innerNode)) {
    return containsNode(outerNode, innerNode.parentNode);
  } else if ('contains' in outerNode) {
    return outerNode.contains(innerNode);
  } else if (outerNode.compareDocumentPosition) {
    return !!(outerNode.compareDocumentPosition(innerNode) & 16);
  } else {
    return false;
  }
}

function isInDocument(node) {
  return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
}

function isSameOriginFrame(iframe) {
  try {
    // Accessing the contentDocument of a HTMLIframeElement can cause the browser
    // to throw, e.g. if it has a cross-origin src attribute.
    // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g:
    // iframe.contentDocument.defaultView;
    // A safety way is to access one of the cross origin properties: Window or Location
    // Which might result in "SecurityError" DOM Exception and it is compatible to Safari.
    // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl

    return typeof iframe.contentWindow.location.href === 'string';
  } catch (err) {
    return false;
  }
}

function getActiveElementDeep() {
  var win = window;
  var element = getActiveElement();
  while (element instanceof win.HTMLIFrameElement) {
    if (isSameOriginFrame(element)) {
      win = element.contentWindow;
    } else {
      return element;
    }
    element = getActiveElement(win.document);
  }
  return element;
}

/**
 * @ReactInputSelection: React input selection module. Based on Selection.js,
 * but modified to be suitable for react and has a couple of bug fixes (doesn't
 * assume buttons have range selections allowed).
 * Input selection module for React.
 */

/**
 * @hasSelectionCapabilities: we get the element types that support selection
 * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
 * and `selectionEnd` rows.
 */
function hasSelectionCapabilities(elem) {
  var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
  return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');
}

function getSelectionInformation() {
  var focusedElem = getActiveElementDeep();
  return {
    focusedElem: focusedElem,
    selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection$1(focusedElem) : null
  };
}

/**
 * @restoreSelection: If any selection information was potentially lost,
 * restore it. This is useful when performing operations that could remove dom
 * nodes and place them back in, resulting in focus being lost.
 */
function restoreSelection(priorSelectionInformation) {
  var curFocusedElem = getActiveElementDeep();
  var priorFocusedElem = priorSelectionInformation.focusedElem;
  var priorSelectionRange = priorSelectionInformation.selectionRange;
  if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
    if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {
      setSelection(priorFocusedElem, priorSelectionRange);
    }

    // Focusing a node can change the scroll position, which is undesirable
    var ancestors = [];
    var ancestor = priorFocusedElem;
    while (ancestor = ancestor.parentNode) {
      if (ancestor.nodeType === ELEMENT_NODE) {
        ancestors.push({
          element: ancestor,
          left: ancestor.scrollLeft,
          top: ancestor.scrollTop
        });
      }
    }

    if (typeof priorFocusedElem.focus === 'function') {
      priorFocusedElem.focus();
    }

    for (var i = 0; i < ancestors.length; i++) {
      var info = ancestors[i];
      info.element.scrollLeft = info.left;
      info.element.scrollTop = info.top;
    }
  }
}

/**
 * @getSelection: Gets the selection bounds of a focused textarea, input or
 * contentEditable node.
 * -@input: Look up selection bounds of this input
 * -@return {start: selectionStart, end: selectionEnd}
 */
function getSelection$1(input) {
  var selection = void 0;

  if ('selectionStart' in input) {
    // Modern browser with input or textarea.
    selection = {
      start: input.selectionStart,
      end: input.selectionEnd
    };
  } else {
    // Content editable or old IE textarea.
    selection = getOffsets(input);
  }

  return selection || { start: 0, end: 0 };
}

/**
 * @setSelection: Sets the selection bounds of a textarea or input and focuses
 * the input.
 * -@input     Set selection bounds of this input or textarea
 * -@offsets   Object of same form that is returned from get*
 */
function setSelection(input, offsets) {
  var start = offsets.start,
      end = offsets.end;

  if (end === undefined) {
    end = start;
  }

  if ('selectionStart' in input) {
    input.selectionStart = start;
    input.selectionEnd = Math.min(end, input.value.length);
  } else {
    setOffsets(input, offsets);
  }
}

var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;

var eventTypes$3 = {
  select: {
    phasedRegistrationNames: {
      bubbled: 'onSelect',
      captured: 'onSelectCapture'
    },
    dependencies: [TOP_BLUR, TOP_CONTEXT_MENU, TOP_DRAG_END, TOP_FOCUS, TOP_KEY_DOWN, TOP_KEY_UP, TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_SELECTION_CHANGE]
  }
};

var activeElement$1 = null;
var activeElementInst$1 = null;
var lastSelection = null;
var mouseDown = false;

/**
 * Get an object which is a unique representation of the current selection.
 *
 * The return value will not be consistent across nodes or browsers, but
 * two identical selections on the same node will return identical objects.
 *
 * @param {DOMElement} node
 * @return {object}
 */
function getSelection(node) {
  if ('selectionStart' in node && hasSelectionCapabilities(node)) {
    return {
      start: node.selectionStart,
      end: node.selectionEnd
    };
  } else {
    var win = node.ownerDocument && node.ownerDocument.defaultView || window;
    var selection = win.getSelection();
    return {
      anchorNode: selection.anchorNode,
      anchorOffset: selection.anchorOffset,
      focusNode: selection.focusNode,
      focusOffset: selection.focusOffset
    };
  }
}

/**
 * Get document associated with the event target.
 *
 * @param {object} nativeEventTarget
 * @return {Document}
 */
function getEventTargetDocument(eventTarget) {
  return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
}

/**
 * Poll selection to see whether it's changed.
 *
 * @param {object} nativeEvent
 * @param {object} nativeEventTarget
 * @return {?SyntheticEvent}
 */
function constructSelectEvent(nativeEvent, nativeEventTarget) {
  // Ensure we have the right element, and that the user is not dragging a
  // selection (this matches native `select` event behavior). In HTML5, select
  // fires only on input and textarea thus if there's no focused element we
  // won't dispatch.
  var doc = getEventTargetDocument(nativeEventTarget);

  if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {
    return null;
  }

  // Only fire when selection has actually changed.
  var currentSelection = getSelection(activeElement$1);
  if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
    lastSelection = currentSelection;

    var syntheticEvent = SyntheticEvent.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget);

    syntheticEvent.type = 'select';
    syntheticEvent.target = activeElement$1;

    accumulateTwoPhaseDispatches(syntheticEvent);

    return syntheticEvent;
  }

  return null;
}

/**
 * This plugin creates an `onSelect` event that normalizes select events
 * across form elements.
 *
 * Supported elements are:
 * - input (see `isTextInputElement`)
 * - textarea
 * - contentEditable
 *
 * This differs from native browser implementations in the following ways:
 * - Fires on contentEditable fields as well as inputs.
 * - Fires for collapsed selection.
 * - Fires after user input.
 */
var SelectEventPlugin = {
  eventTypes: eventTypes$3,

  extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
    var doc = getEventTargetDocument(nativeEventTarget);
    // Track whether all listeners exists for this plugin. If none exist, we do
    // not extract events. See #3639.
    if (!doc || !isListeningToAllDependencies('onSelect', doc)) {
      return null;
    }

    var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;

    switch (topLevelType) {
      // Track the input node that has focus.
      case TOP_FOCUS:
        if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
          activeElement$1 = targetNode;
          activeElementInst$1 = targetInst;
          lastSelection = null;
        }
        break;
      case TOP_BLUR:
        activeElement$1 = null;
        activeElementInst$1 = null;
        lastSelection = null;
        break;
      // Don't fire the event while the user is dragging. This matches the
      // semantics of the native select event.
      case TOP_MOUSE_DOWN:
        mouseDown = true;
        break;
      case TOP_CONTEXT_MENU:
      case TOP_MOUSE_UP:
      case TOP_DRAG_END:
        mouseDown = false;
        return constructSelectEvent(nativeEvent, nativeEventTarget);
      // Chrome and IE fire non-standard event when selection is changed (and
      // sometimes when it hasn't). IE's event fires out of order with respect
      // to key and input events on deletion, so we discard it.
      //
      // Firefox doesn't support selectionchange, so check selection status
      // after each key entry. The selection changes after keydown and before
      // keyup, but we check on keydown as well in the case of holding down a
      // key, when multiple keydown events are fired but only one keyup is.
      // This is also our approach for IE handling, for the reason above.
      case TOP_SELECTION_CHANGE:
        if (skipSelectionChangeEvent) {
          break;
        }
      // falls through
      case TOP_KEY_DOWN:
      case TOP_KEY_UP:
        return constructSelectEvent(nativeEvent, nativeEventTarget);
    }

    return null;
  }
};

/**
 * Inject modules for resolving DOM hierarchy and plugin ordering.
 */
injection.injectEventPluginOrder(DOMEventPluginOrder);
setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1);

/**
 * Some important event plugins included by default (without having to require
 * them).
 */
injection.injectEventPluginsByName({
  SimpleEventPlugin: SimpleEventPlugin,
  EnterLeaveEventPlugin: EnterLeaveEventPlugin,
  ChangeEventPlugin: ChangeEventPlugin,
  SelectEventPlugin: SelectEventPlugin,
  BeforeInputEventPlugin: BeforeInputEventPlugin
});

function endsWith(subject, search) {
  var length = subject.length;
  return subject.substring(length - search.length, length) === search;
}

var didWarnSelectedSetOnOption = false;
var didWarnInvalidChild = false;

function flattenChildren(children) {
  var content = '';

  // Flatten children. We'll warn if they are invalid
  // during validateProps() which runs for hydration too.
  // Note that this would throw on non-element objects.
  // Elements are stringified (which is normally irrelevant
  // but matters for <fbt>).
  React.Children.forEach(children, function (child) {
    if (child == null) {
      return;
    }
    content += child;
    // Note: we don't warn about invalid children here.
    // Instead, this is done separately below so that
    // it happens during the hydration codepath too.
  });

  return content;
}

/**
 * Implements an <option> host component that warns when `selected` is set.
 */

function validateProps(element, props) {
  {
    // This mirrors the codepath above, but runs for hydration too.
    // Warn about invalid children here so that client and hydration are consistent.
    // TODO: this seems like it could cause a DEV-only throw for hydration
    // if children contains a non-element object. We should try to avoid that.
    if (typeof props.children === 'object' && props.children !== null) {
      React.Children.forEach(props.children, function (child) {
        if (child == null) {
          return;
        }
        if (typeof child === 'string' || typeof child === 'number') {
          return;
        }
        if (typeof child.type !== 'string') {
          return;
        }
        if (!didWarnInvalidChild) {
          didWarnInvalidChild = true;
          warning$1(false, 'Only strings and numbers are supported as <option> children.');
        }
      });
    }

    // TODO: Remove support for `selected` in <option>.
    if (props.selected != null && !didWarnSelectedSetOnOption) {
      warning$1(false, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
      didWarnSelectedSetOnOption = true;
    }
  }
}

function postMountWrapper$1(element, props) {
  // value="" should make a value attribute (#6219)
  if (props.value != null) {
    element.setAttribute('value', toString(getToStringValue(props.value)));
  }
}

function getHostProps$1(element, props) {
  var hostProps = _assign({ children: undefined }, props);
  var content = flattenChildren(props.children);

  if (content) {
    hostProps.children = content;
  }

  return hostProps;
}

// TODO: direct imports like some-package/src/* are bad. Fix me.
var didWarnValueDefaultValue$1 = void 0;

{
  didWarnValueDefaultValue$1 = false;
}

function getDeclarationErrorAddendum() {
  var ownerName = getCurrentFiberOwnerNameInDevOrNull();
  if (ownerName) {
    return '\n\nCheck the render method of `' + ownerName + '`.';
  }
  return '';
}

var valuePropNames = ['value', 'defaultValue'];

/**
 * Validation function for `value` and `defaultValue`.
 */
function checkSelectPropTypes(props) {
  ReactControlledValuePropTypes.checkPropTypes('select', props);

  for (var i = 0; i < valuePropNames.length; i++) {
    var propName = valuePropNames[i];
    if (props[propName] == null) {
      continue;
    }
    var isArray = Array.isArray(props[propName]);
    if (props.multiple && !isArray) {
      warning$1(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
    } else if (!props.multiple && isArray) {
      warning$1(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
    }
  }
}

function updateOptions(node, multiple, propValue, setDefaultSelected) {
  var options = node.options;

  if (multiple) {
    var selectedValues = propValue;
    var selectedValue = {};
    for (var i = 0; i < selectedValues.length; i++) {
      // Prefix to avoid chaos with special keys.
      selectedValue['$' + selectedValues[i]] = true;
    }
    for (var _i = 0; _i < options.length; _i++) {
      var selected = selectedValue.hasOwnProperty('$' + options[_i].value);
      if (options[_i].selected !== selected) {
        options[_i].selected = selected;
      }
      if (selected && setDefaultSelected) {
        options[_i].defaultSelected = true;
      }
    }
  } else {
    // Do not set `select.value` as exact behavior isn't consistent across all
    // browsers for all cases.
    var _selectedValue = toString(getToStringValue(propValue));
    var defaultSelected = null;
    for (var _i2 = 0; _i2 < options.length; _i2++) {
      if (options[_i2].value === _selectedValue) {
        options[_i2].selected = true;
        if (setDefaultSelected) {
          options[_i2].defaultSelected = true;
        }
        return;
      }
      if (defaultSelected === null && !options[_i2].disabled) {
        defaultSelected = options[_i2];
      }
    }
    if (defaultSelected !== null) {
      defaultSelected.selected = true;
    }
  }
}

/**
 * Implements a <select> host component that allows optionally setting the
 * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
 * stringable. If `multiple` is true, the prop must be an array of stringables.
 *
 * If `value` is not supplied (or null/undefined), user actions that change the
 * selected option will trigger updates to the rendered options.
 *
 * If it is supplied (and not null/undefined), the rendered options will not
 * update in response to user actions. Instead, the `value` prop must change in
 * order for the rendered options to update.
 *
 * If `defaultValue` is provided, any options with the supplied values will be
 * selected.
 */

function getHostProps$2(element, props) {
  return _assign({}, props, {
    value: undefined
  });
}

function initWrapperState$1(element, props) {
  var node = element;
  {
    checkSelectPropTypes(props);
  }

  node._wrapperState = {
    wasMultiple: !!props.multiple
  };

  {
    if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {
      warning$1(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');
      didWarnValueDefaultValue$1 = true;
    }
  }
}

function postMountWrapper$2(element, props) {
  var node = element;
  node.multiple = !!props.multiple;
  var value = props.value;
  if (value != null) {
    updateOptions(node, !!props.multiple, value, false);
  } else if (props.defaultValue != null) {
    updateOptions(node, !!props.multiple, props.defaultValue, true);
  }
}

function postUpdateWrapper(element, props) {
  var node = element;
  var wasMultiple = node._wrapperState.wasMultiple;
  node._wrapperState.wasMultiple = !!props.multiple;

  var value = props.value;
  if (value != null) {
    updateOptions(node, !!props.multiple, value, false);
  } else if (wasMultiple !== !!props.multiple) {
    // For simplicity, reapply `defaultValue` if `multiple` is toggled.
    if (props.defaultValue != null) {
      updateOptions(node, !!props.multiple, props.defaultValue, true);
    } else {
      // Revert the select back to its default unselected state.
      updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);
    }
  }
}

function restoreControlledState$2(element, props) {
  var node = element;
  var value = props.value;

  if (value != null) {
    updateOptions(node, !!props.multiple, value, false);
  }
}

var didWarnValDefaultVal = false;

/**
 * Implements a <textarea> host component that allows setting `value`, and
 * `defaultValue`. This differs from the traditional DOM API because value is
 * usually set as PCDATA children.
 *
 * If `value` is not supplied (or null/undefined), user actions that affect the
 * value will trigger updates to the element.
 *
 * If `value` is supplied (and not null/undefined), the rendered element will
 * not trigger updates to the element. Instead, the `value` prop must change in
 * order for the rendered element to be updated.
 *
 * The rendered element will be initialized with an empty value, the prop
 * `defaultValue` if specified, or the children content (deprecated).
 */

function getHostProps$3(element, props) {
  var node = element;
  (function () {
    if (!(props.dangerouslySetInnerHTML == null)) {
      {
        throw ReactError(Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.'));
      }
    }
  })();

  // Always set children to the same thing. In IE9, the selection range will
  // get reset if `textContent` is mutated.  We could add a check in setTextContent
  // to only set the value if/when the value differs from the node value (which would
  // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this
  // solution. The value can be a boolean or object so that's why it's forced
  // to be a string.
  var hostProps = _assign({}, props, {
    value: undefined,
    defaultValue: undefined,
    children: toString(node._wrapperState.initialValue)
  });

  return hostProps;
}

function initWrapperState$2(element, props) {
  var node = element;
  {
    ReactControlledValuePropTypes.checkPropTypes('textarea', props);
    if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
      warning$1(false, '%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
      didWarnValDefaultVal = true;
    }
  }

  var initialValue = props.value;

  // Only bother fetching default value if we're going to use it
  if (initialValue == null) {
    var defaultValue = props.defaultValue;
    // TODO (yungsters): Remove support for children content in <textarea>.
    var children = props.children;
    if (children != null) {
      {
        warning$1(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
      }
      (function () {
        if (!(defaultValue == null)) {
          {
            throw ReactError(Error('If you supply `defaultValue` on a <textarea>, do not pass children.'));
          }
        }
      })();
      if (Array.isArray(children)) {
        (function () {
          if (!(children.length <= 1)) {
            {
              throw ReactError(Error('<textarea> can only have at most one child.'));
            }
          }
        })();
        children = children[0];
      }

      defaultValue = children;
    }
    if (defaultValue == null) {
      defaultValue = '';
    }
    initialValue = defaultValue;
  }

  node._wrapperState = {
    initialValue: getToStringValue(initialValue)
  };
}

function updateWrapper$1(element, props) {
  var node = element;
  var value = getToStringValue(props.value);
  var defaultValue = getToStringValue(props.defaultValue);
  if (value != null) {
    // Cast `value` to a string to ensure the value is set correctly. While
    // browsers typically do this as necessary, jsdom doesn't.
    var newValue = toString(value);
    // To avoid side effects (such as losing text selection), only set value if changed
    if (newValue !== node.value) {
      node.value = newValue;
    }
    if (props.defaultValue == null && node.defaultValue !== newValue) {
      node.defaultValue = newValue;
    }
  }
  if (defaultValue != null) {
    node.defaultValue = toString(defaultValue);
  }
}

function postMountWrapper$3(element, props) {
  var node = element;
  // This is in postMount because we need access to the DOM node, which is not
  // available until after the component has mounted.
  var textContent = node.textContent;

  // Only set node.value if textContent is equal to the expected
  // initial value. In IE10/IE11 there is a bug where the placeholder attribute
  // will populate textContent as well.
  // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
  if (textContent === node._wrapperState.initialValue) {
    node.value = textContent;
  }
}

function restoreControlledState$3(element, props) {
  // DOM component is still mounted; update
  updateWrapper$1(element, props);
}

var HTML_NAMESPACE$1 = 'http://www.w3.org/1999/xhtml';
var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';

var Namespaces = {
  html: HTML_NAMESPACE$1,
  mathml: MATH_NAMESPACE,
  svg: SVG_NAMESPACE
};

// Assumes there is no parent namespace.
function getIntrinsicNamespace(type) {
  switch (type) {
    case 'svg':
      return SVG_NAMESPACE;
    case 'math':
      return MATH_NAMESPACE;
    default:
      return HTML_NAMESPACE$1;
  }
}

function getChildNamespace(parentNamespace, type) {
  if (parentNamespace == null || parentNamespace === HTML_NAMESPACE$1) {
    // No (or default) parent namespace: potential entry point.
    return getIntrinsicNamespace(type);
  }
  if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
    // We're leaving SVG.
    return HTML_NAMESPACE$1;
  }
  // By default, pass namespace below.
  return parentNamespace;
}

/* globals MSApp */

/**
 * Create a function which has 'unsafe' privileges (required by windows8 apps)
 */
var createMicrosoftUnsafeLocalFunction = function (func) {
  if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
    return function (arg0, arg1, arg2, arg3) {
      MSApp.execUnsafeLocalFunction(function () {
        return func(arg0, arg1, arg2, arg3);
      });
    };
  } else {
    return func;
  }
};

// SVG temp container for IE lacking innerHTML
var reusableSVGContainer = void 0;

/**
 * Set the innerHTML property of a node
 *
 * @param {DOMElement} node
 * @param {string} html
 * @internal
 */
var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
  // IE does not have innerHTML for SVG nodes, so instead we inject the
  // new markup in a temp node and then move the child nodes across into
  // the target node

  if (node.namespaceURI === Namespaces.svg && !('innerHTML' in node)) {
    reusableSVGContainer = reusableSVGContainer || document.createElement('div');
    reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>';
    var svgNode = reusableSVGContainer.firstChild;
    while (node.firstChild) {
      node.removeChild(node.firstChild);
    }
    while (svgNode.firstChild) {
      node.appendChild(svgNode.firstChild);
    }
  } else {
    node.innerHTML = html;
  }
});

/**
 * Set the textContent property of a node. For text updates, it's faster
 * to set the `nodeValue` of the Text node directly instead of using
 * `.textContent` which will remove the existing node and create a new one.
 *
 * @param {DOMElement} node
 * @param {string} text
 * @internal
 */
var setTextContent = function (node, text) {
  if (text) {
    var firstChild = node.firstChild;

    if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
      firstChild.nodeValue = text;
      return;
    }
  }
  node.textContent = text;
};

// List derived from Gecko source code:
// https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js
var shorthandToLonghand = {
  animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],
  background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],
  backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],
  border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],
  borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],
  borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],
  borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],
  borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],
  borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],
  borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],
  borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],
  borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],
  borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],
  borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],
  borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],
  borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],
  borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],
  columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],
  columns: ['columnCount', 'columnWidth'],
  flex: ['flexBasis', 'flexGrow', 'flexShrink'],
  flexFlow: ['flexDirection', 'flexWrap'],
  font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],
  fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],
  gap: ['columnGap', 'rowGap'],
  grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
  gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],
  gridColumn: ['gridColumnEnd', 'gridColumnStart'],
  gridColumnGap: ['columnGap'],
  gridGap: ['columnGap', 'rowGap'],
  gridRow: ['gridRowEnd', 'gridRowStart'],
  gridRowGap: ['rowGap'],
  gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
  listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],
  margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],
  marker: ['markerEnd', 'markerMid', 'markerStart'],
  mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],
  maskPosition: ['maskPositionX', 'maskPositionY'],
  outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],
  overflow: ['overflowX', 'overflowY'],
  padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],
  placeContent: ['alignContent', 'justifyContent'],
  placeItems: ['alignItems', 'justifyItems'],
  placeSelf: ['alignSelf', 'justifySelf'],
  textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],
  textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],
  transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],
  wordWrap: ['overflowWrap']
};

/**
 * CSS properties which accept numbers but are not in units of "px".
 */
var isUnitlessNumber = {
  animationIterationCount: true,
  borderImageOutset: true,
  borderImageSlice: true,
  borderImageWidth: true,
  boxFlex: true,
  boxFlexGroup: true,
  boxOrdinalGroup: true,
  columnCount: true,
  columns: true,
  flex: true,
  flexGrow: true,
  flexPositive: true,
  flexShrink: true,
  flexNegative: true,
  flexOrder: true,
  gridArea: true,
  gridRow: true,
  gridRowEnd: true,
  gridRowSpan: true,
  gridRowStart: true,
  gridColumn: true,
  gridColumnEnd: true,
  gridColumnSpan: true,
  gridColumnStart: true,
  fontWeight: true,
  lineClamp: true,
  lineHeight: true,
  opacity: true,
  order: true,
  orphans: true,
  tabSize: true,
  widows: true,
  zIndex: true,
  zoom: true,

  // SVG-related properties
  fillOpacity: true,
  floodOpacity: true,
  stopOpacity: true,
  strokeDasharray: true,
  strokeDashoffset: true,
  strokeMiterlimit: true,
  strokeOpacity: true,
  strokeWidth: true
};

/**
 * @param {string} prefix vendor-specific prefix, eg: Webkit
 * @param {string} key style name, eg: transitionDuration
 * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
 * WebkitTransitionDuration
 */
function prefixKey(prefix, key) {
  return prefix + key.charAt(0).toUpperCase() + key.substring(1);
}

/**
 * Support style names that may come passed in prefixed by adding permutations
 * of vendor prefixes.
 */
var prefixes = ['Webkit', 'ms', 'Moz', 'O'];

// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
// infinite loop, because it iterates over the newly added props too.
Object.keys(isUnitlessNumber).forEach(function (prop) {
  prefixes.forEach(function (prefix) {
    isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
  });
});

/**
 * Convert a value into the proper css writable value. The style name `name`
 * should be logical (no hyphens), as specified
 * in `CSSProperty.isUnitlessNumber`.
 *
 * @param {string} name CSS property name such as `topMargin`.
 * @param {*} value CSS property value such as `10px`.
 * @return {string} Normalized style value with dimensions applied.
 */
function dangerousStyleValue(name, value, isCustomProperty) {
  // Note that we've removed escapeTextForBrowser() calls here since the
  // whole string will be escaped when the attribute is injected into
  // the markup. If you provide unsafe user data here they can inject
  // arbitrary CSS which may be problematic (I couldn't repro this):
  // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
  // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
  // This is not an XSS hole but instead a potential CSS injection issue
  // which has lead to a greater discussion about how we're going to
  // trust URLs moving forward. See #2115901

  var isEmpty = value == null || typeof value === 'boolean' || value === '';
  if (isEmpty) {
    return '';
  }

  if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
    return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
  }

  return ('' + value).trim();
}

var uppercasePattern = /([A-Z])/g;
var msPattern = /^ms-/;

/**
 * Hyphenates a camelcased CSS property name, for example:
 *
 *   > hyphenateStyleName('backgroundColor')
 *   < "background-color"
 *   > hyphenateStyleName('MozTransition')
 *   < "-moz-transition"
 *   > hyphenateStyleName('msTransition')
 *   < "-ms-transition"
 *
 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
 * is converted to `-ms-`.
 */
function hyphenateStyleName(name) {
  return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
}

var warnValidStyle = function () {};

{
  // 'msTransform' is correct, but the other prefixes should be capitalized
  var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
  var msPattern$1 = /^-ms-/;
  var hyphenPattern = /-(.)/g;

  // style values shouldn't contain a semicolon
  var badStyleValueWithSemicolonPattern = /;\s*$/;

  var warnedStyleNames = {};
  var warnedStyleValues = {};
  var warnedForNaNValue = false;
  var warnedForInfinityValue = false;

  var camelize = function (string) {
    return string.replace(hyphenPattern, function (_, character) {
      return character.toUpperCase();
    });
  };

  var warnHyphenatedStyleName = function (name) {
    if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
      return;
    }

    warnedStyleNames[name] = true;
    warning$1(false, 'Unsupported style property %s. Did you mean %s?', name,
    // As Andi Smith suggests
    // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
    // is converted to lowercase `ms`.
    camelize(name.replace(msPattern$1, 'ms-')));
  };

  var warnBadVendoredStyleName = function (name) {
    if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
      return;
    }

    warnedStyleNames[name] = true;
    warning$1(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
  };

  var warnStyleValueWithSemicolon = function (name, value) {
    if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
      return;
    }

    warnedStyleValues[value] = true;
    warning$1(false, "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
  };

  var warnStyleValueIsNaN = function (name, value) {
    if (warnedForNaNValue) {
      return;
    }

    warnedForNaNValue = true;
    warning$1(false, '`NaN` is an invalid value for the `%s` css style property.', name);
  };

  var warnStyleValueIsInfinity = function (name, value) {
    if (warnedForInfinityValue) {
      return;
    }

    warnedForInfinityValue = true;
    warning$1(false, '`Infinity` is an invalid value for the `%s` css style property.', name);
  };

  warnValidStyle = function (name, value) {
    if (name.indexOf('-') > -1) {
      warnHyphenatedStyleName(name);
    } else if (badVendoredStyleNamePattern.test(name)) {
      warnBadVendoredStyleName(name);
    } else if (badStyleValueWithSemicolonPattern.test(value)) {
      warnStyleValueWithSemicolon(name, value);
    }

    if (typeof value === 'number') {
      if (isNaN(value)) {
        warnStyleValueIsNaN(name, value);
      } else if (!isFinite(value)) {
        warnStyleValueIsInfinity(name, value);
      }
    }
  };
}

var warnValidStyle$1 = warnValidStyle;

/**
 * Operations for dealing with CSS properties.
 */

/**
 * This creates a string that is expected to be equivalent to the style
 * attribute generated by server-side rendering. It by-passes warnings and
 * security checks so it's not safe to use this value for anything other than
 * comparison. It is only used in DEV for SSR validation.
 */
function createDangerousStringForStyles(styles) {
  {
    var serialized = '';
    var delimiter = '';
    for (var styleName in styles) {
      if (!styles.hasOwnProperty(styleName)) {
        continue;
      }
      var styleValue = styles[styleName];
      if (styleValue != null) {
        var isCustomProperty = styleName.indexOf('--') === 0;
        serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';
        serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);

        delimiter = ';';
      }
    }
    return serialized || null;
  }
}

/**
 * Sets the value for multiple styles on a node.  If a value is specified as
 * '' (empty string), the corresponding style property will be unset.
 *
 * @param {DOMElement} node
 * @param {object} styles
 */
function setValueForStyles(node, styles) {
  var style = node.style;
  for (var styleName in styles) {
    if (!styles.hasOwnProperty(styleName)) {
      continue;
    }
    var isCustomProperty = styleName.indexOf('--') === 0;
    {
      if (!isCustomProperty) {
        warnValidStyle$1(styleName, styles[styleName]);
      }
    }
    var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);
    if (styleName === 'float') {
      styleName = 'cssFloat';
    }
    if (isCustomProperty) {
      style.setProperty(styleName, styleValue);
    } else {
      style[styleName] = styleValue;
    }
  }
}

function isValueEmpty(value) {
  return value == null || typeof value === 'boolean' || value === '';
}

/**
 * Given {color: 'red', overflow: 'hidden'} returns {
 *   color: 'color',
 *   overflowX: 'overflow',
 *   overflowY: 'overflow',
 * }. This can be read as "the overflowY property was set by the overflow
 * shorthand". That is, the values are the property that each was derived from.
 */
function expandShorthandMap(styles) {
  var expanded = {};
  for (var key in styles) {
    var longhands = shorthandToLonghand[key] || [key];
    for (var i = 0; i < longhands.length; i++) {
      expanded[longhands[i]] = key;
    }
  }
  return expanded;
}

/**
 * When mixing shorthand and longhand property names, we warn during updates if
 * we expect an incorrect result to occur. In particular, we warn for:
 *
 * Updating a shorthand property (longhand gets overwritten):
 *   {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
 *   becomes .style.font = 'baz'
 * Removing a shorthand property (longhand gets lost too):
 *   {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}
 *   becomes .style.font = ''
 * Removing a longhand property (should revert to shorthand; doesn't):
 *   {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}
 *   becomes .style.fontVariant = ''
 */
function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {
  if (!warnAboutShorthandPropertyCollision) {
    return;
  }

  if (!nextStyles) {
    return;
  }

  var expandedUpdates = expandShorthandMap(styleUpdates);
  var expandedStyles = expandShorthandMap(nextStyles);
  var warnedAbout = {};
  for (var key in expandedUpdates) {
    var originalKey = expandedUpdates[key];
    var correctOriginalKey = expandedStyles[key];
    if (correctOriginalKey && originalKey !== correctOriginalKey) {
      var warningKey = originalKey + ',' + correctOriginalKey;
      if (warnedAbout[warningKey]) {
        continue;
      }
      warnedAbout[warningKey] = true;
      warning$1(false, '%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + "avoid this, don't mix shorthand and non-shorthand properties " + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);
    }
  }
}

// For HTML, certain tags should omit their close tag. We keep a whitelist for
// those special-case tags.

var omittedCloseTags = {
  area: true,
  base: true,
  br: true,
  col: true,
  embed: true,
  hr: true,
  img: true,
  input: true,
  keygen: true,
  link: true,
  meta: true,
  param: true,
  source: true,
  track: true,
  wbr: true
  // NOTE: menuitem's close tag should be omitted, but that causes problems.
};

// For HTML, certain tags cannot have children. This has the same purpose as
// `omittedCloseTags` except that `menuitem` should still have its closing tag.

var voidElementTags = _assign({
  menuitem: true
}, omittedCloseTags);

// TODO: We can remove this if we add invariantWithStack()
// or add stack by default to invariants where possible.
var HTML$1 = '__html';

var ReactDebugCurrentFrame$3 = null;
{
  ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame;
}

function assertValidProps(tag, props) {
  if (!props) {
    return;
  }
  // Note the use of `==` which checks for null or undefined.
  if (voidElementTags[tag]) {
    (function () {
      if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
        {
          throw ReactError(Error(tag + ' is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.' + (ReactDebugCurrentFrame$3.getStackAddendum())));
        }
      }
    })();
  }
  if (props.dangerouslySetInnerHTML != null) {
    (function () {
      if (!(props.children == null)) {
        {
          throw ReactError(Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'));
        }
      }
    })();
    (function () {
      if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML$1 in props.dangerouslySetInnerHTML)) {
        {
          throw ReactError(Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.'));
        }
      }
    })();
  }
  {
    !(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) ? warning$1(false, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;
  }
  (function () {
    if (!(props.style == null || typeof props.style === 'object')) {
      {
        throw ReactError(Error('The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.' + (ReactDebugCurrentFrame$3.getStackAddendum())));
      }
    }
  })();
}

function isCustomComponent(tagName, props) {
  if (tagName.indexOf('-') === -1) {
    return typeof props.is === 'string';
  }
  switch (tagName) {
    // These are reserved SVG and MathML elements.
    // We don't mind this whitelist too much because we expect it to never grow.
    // The alternative is to track the namespace in a few places which is convoluted.
    // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
    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 false;
    default:
      return true;
  }
}

// When adding attributes to the HTML or SVG whitelist, be sure to
// also add them to this module to ensure casing and incorrect name
// warnings.
var possibleStandardNames = {
  // HTML
  accept: 'accept',
  acceptcharset: 'acceptCharset',
  'accept-charset': 'acceptCharset',
  accesskey: 'accessKey',
  action: 'action',
  allowfullscreen: 'allowFullScreen',
  alt: 'alt',
  as: 'as',
  async: 'async',
  autocapitalize: 'autoCapitalize',
  autocomplete: 'autoComplete',
  autocorrect: 'autoCorrect',
  autofocus: 'autoFocus',
  autoplay: 'autoPlay',
  autosave: 'autoSave',
  capture: 'capture',
  cellpadding: 'cellPadding',
  cellspacing: 'cellSpacing',
  challenge: 'challenge',
  charset: 'charSet',
  checked: 'checked',
  children: 'children',
  cite: 'cite',
  class: 'className',
  classid: 'classID',
  classname: 'className',
  cols: 'cols',
  colspan: 'colSpan',
  content: 'content',
  contenteditable: 'contentEditable',
  contextmenu: 'contextMenu',
  controls: 'controls',
  controlslist: 'controlsList',
  coords: 'coords',
  crossorigin: 'crossOrigin',
  dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
  data: 'data',
  datetime: 'dateTime',
  default: 'default',
  defaultchecked: 'defaultChecked',
  defaultvalue: 'defaultValue',
  defer: 'defer',
  dir: 'dir',
  disabled: 'disabled',
  disablepictureinpicture: 'disablePictureInPicture',
  download: 'download',
  draggable: 'draggable',
  enctype: 'encType',
  for: 'htmlFor',
  form: 'form',
  formmethod: 'formMethod',
  formaction: 'formAction',
  formenctype: 'formEncType',
  formnovalidate: 'formNoValidate',
  formtarget: 'formTarget',
  frameborder: 'frameBorder',
  headers: 'headers',
  height: 'height',
  hidden: 'hidden',
  high: 'high',
  href: 'href',
  hreflang: 'hrefLang',
  htmlfor: 'htmlFor',
  httpequiv: 'httpEquiv',
  'http-equiv': 'httpEquiv',
  icon: 'icon',
  id: 'id',
  innerhtml: 'innerHTML',
  inputmode: 'inputMode',
  integrity: 'integrity',
  is: 'is',
  itemid: 'itemID',
  itemprop: 'itemProp',
  itemref: 'itemRef',
  itemscope: 'itemScope',
  itemtype: 'itemType',
  keyparams: 'keyParams',
  keytype: 'keyType',
  kind: 'kind',
  label: 'label',
  lang: 'lang',
  list: 'list',
  loop: 'loop',
  low: 'low',
  manifest: 'manifest',
  marginwidth: 'marginWidth',
  marginheight: 'marginHeight',
  max: 'max',
  maxlength: 'maxLength',
  media: 'media',
  mediagroup: 'mediaGroup',
  method: 'method',
  min: 'min',
  minlength: 'minLength',
  multiple: 'multiple',
  muted: 'muted',
  name: 'name',
  nomodule: 'noModule',
  nonce: 'nonce',
  novalidate: 'noValidate',
  open: 'open',
  optimum: 'optimum',
  pattern: 'pattern',
  placeholder: 'placeholder',
  playsinline: 'playsInline',
  poster: 'poster',
  preload: 'preload',
  profile: 'profile',
  radiogroup: 'radioGroup',
  readonly: 'readOnly',
  referrerpolicy: 'referrerPolicy',
  rel: 'rel',
  required: 'required',
  reversed: 'reversed',
  role: 'role',
  rows: 'rows',
  rowspan: 'rowSpan',
  sandbox: 'sandbox',
  scope: 'scope',
  scoped: 'scoped',
  scrolling: 'scrolling',
  seamless: 'seamless',
  selected: 'selected',
  shape: 'shape',
  size: 'size',
  sizes: 'sizes',
  span: 'span',
  spellcheck: 'spellCheck',
  src: 'src',
  srcdoc: 'srcDoc',
  srclang: 'srcLang',
  srcset: 'srcSet',
  start: 'start',
  step: 'step',
  style: 'style',
  summary: 'summary',
  tabindex: 'tabIndex',
  target: 'target',
  title: 'title',
  type: 'type',
  usemap: 'useMap',
  value: 'value',
  width: 'width',
  wmode: 'wmode',
  wrap: 'wrap',

  // SVG
  about: 'about',
  accentheight: 'accentHeight',
  'accent-height': 'accentHeight',
  accumulate: 'accumulate',
  additive: 'additive',
  alignmentbaseline: 'alignmentBaseline',
  'alignment-baseline': 'alignmentBaseline',
  allowreorder: 'allowReorder',
  alphabetic: 'alphabetic',
  amplitude: 'amplitude',
  arabicform: 'arabicForm',
  'arabic-form': 'arabicForm',
  ascent: 'ascent',
  attributename: 'attributeName',
  attributetype: 'attributeType',
  autoreverse: 'autoReverse',
  azimuth: 'azimuth',
  basefrequency: 'baseFrequency',
  baselineshift: 'baselineShift',
  'baseline-shift': 'baselineShift',
  baseprofile: 'baseProfile',
  bbox: 'bbox',
  begin: 'begin',
  bias: 'bias',
  by: 'by',
  calcmode: 'calcMode',
  capheight: 'capHeight',
  'cap-height': 'capHeight',
  clip: 'clip',
  clippath: 'clipPath',
  'clip-path': 'clipPath',
  clippathunits: 'clipPathUnits',
  cliprule: 'clipRule',
  'clip-rule': 'clipRule',
  color: 'color',
  colorinterpolation: 'colorInterpolation',
  'color-interpolation': 'colorInterpolation',
  colorinterpolationfilters: 'colorInterpolationFilters',
  'color-interpolation-filters': 'colorInterpolationFilters',
  colorprofile: 'colorProfile',
  'color-profile': 'colorProfile',
  colorrendering: 'colorRendering',
  'color-rendering': 'colorRendering',
  contentscripttype: 'contentScriptType',
  contentstyletype: 'contentStyleType',
  cursor: 'cursor',
  cx: 'cx',
  cy: 'cy',
  d: 'd',
  datatype: 'datatype',
  decelerate: 'decelerate',
  descent: 'descent',
  diffuseconstant: 'diffuseConstant',
  direction: 'direction',
  display: 'display',
  divisor: 'divisor',
  dominantbaseline: 'dominantBaseline',
  'dominant-baseline': 'dominantBaseline',
  dur: 'dur',
  dx: 'dx',
  dy: 'dy',
  edgemode: 'edgeMode',
  elevation: 'elevation',
  enablebackground: 'enableBackground',
  'enable-background': 'enableBackground',
  end: 'end',
  exponent: 'exponent',
  externalresourcesrequired: 'externalResourcesRequired',
  fill: 'fill',
  fillopacity: 'fillOpacity',
  'fill-opacity': 'fillOpacity',
  fillrule: 'fillRule',
  'fill-rule': 'fillRule',
  filter: 'filter',
  filterres: 'filterRes',
  filterunits: 'filterUnits',
  floodopacity: 'floodOpacity',
  'flood-opacity': 'floodOpacity',
  floodcolor: 'floodColor',
  'flood-color': 'floodColor',
  focusable: 'focusable',
  fontfamily: 'fontFamily',
  'font-family': 'fontFamily',
  fontsize: 'fontSize',
  'font-size': 'fontSize',
  fontsizeadjust: 'fontSizeAdjust',
  'font-size-adjust': 'fontSizeAdjust',
  fontstretch: 'fontStretch',
  'font-stretch': 'fontStretch',
  fontstyle: 'fontStyle',
  'font-style': 'fontStyle',
  fontvariant: 'fontVariant',
  'font-variant': 'fontVariant',
  fontweight: 'fontWeight',
  'font-weight': 'fontWeight',
  format: 'format',
  from: 'from',
  fx: 'fx',
  fy: 'fy',
  g1: 'g1',
  g2: 'g2',
  glyphname: 'glyphName',
  'glyph-name': 'glyphName',
  glyphorientationhorizontal: 'glyphOrientationHorizontal',
  'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
  glyphorientationvertical: 'glyphOrientationVertical',
  'glyph-orientation-vertical': 'glyphOrientationVertical',
  glyphref: 'glyphRef',
  gradienttransform: 'gradientTransform',
  gradientunits: 'gradientUnits',
  hanging: 'hanging',
  horizadvx: 'horizAdvX',
  'horiz-adv-x': 'horizAdvX',
  horizoriginx: 'horizOriginX',
  'horiz-origin-x': 'horizOriginX',
  ideographic: 'ideographic',
  imagerendering: 'imageRendering',
  'image-rendering': 'imageRendering',
  in2: 'in2',
  in: 'in',
  inlist: 'inlist',
  intercept: 'intercept',
  k1: 'k1',
  k2: 'k2',
  k3: 'k3',
  k4: 'k4',
  k: 'k',
  kernelmatrix: 'kernelMatrix',
  kernelunitlength: 'kernelUnitLength',
  kerning: 'kerning',
  keypoints: 'keyPoints',
  keysplines: 'keySplines',
  keytimes: 'keyTimes',
  lengthadjust: 'lengthAdjust',
  letterspacing: 'letterSpacing',
  'letter-spacing': 'letterSpacing',
  lightingcolor: 'lightingColor',
  'lighting-color': 'lightingColor',
  limitingconeangle: 'limitingConeAngle',
  local: 'local',
  markerend: 'markerEnd',
  'marker-end': 'markerEnd',
  markerheight: 'markerHeight',
  markermid: 'markerMid',
  'marker-mid': 'markerMid',
  markerstart: 'markerStart',
  'marker-start': 'markerStart',
  markerunits: 'markerUnits',
  markerwidth: 'markerWidth',
  mask: 'mask',
  maskcontentunits: 'maskContentUnits',
  maskunits: 'maskUnits',
  mathematical: 'mathematical',
  mode: 'mode',
  numoctaves: 'numOctaves',
  offset: 'offset',
  opacity: 'opacity',
  operator: 'operator',
  order: 'order',
  orient: 'orient',
  orientation: 'orientation',
  origin: 'origin',
  overflow: 'overflow',
  overlineposition: 'overlinePosition',
  'overline-position': 'overlinePosition',
  overlinethickness: 'overlineThickness',
  'overline-thickness': 'overlineThickness',
  paintorder: 'paintOrder',
  'paint-order': 'paintOrder',
  panose1: 'panose1',
  'panose-1': 'panose1',
  pathlength: 'pathLength',
  patterncontentunits: 'patternContentUnits',
  patterntransform: 'patternTransform',
  patternunits: 'patternUnits',
  pointerevents: 'pointerEvents',
  'pointer-events': 'pointerEvents',
  points: 'points',
  pointsatx: 'pointsAtX',
  pointsaty: 'pointsAtY',
  pointsatz: 'pointsAtZ',
  prefix: 'prefix',
  preservealpha: 'preserveAlpha',
  preserveaspectratio: 'preserveAspectRatio',
  primitiveunits: 'primitiveUnits',
  property: 'property',
  r: 'r',
  radius: 'radius',
  refx: 'refX',
  refy: 'refY',
  renderingintent: 'renderingIntent',
  'rendering-intent': 'renderingIntent',
  repeatcount: 'repeatCount',
  repeatdur: 'repeatDur',
  requiredextensions: 'requiredExtensions',
  requiredfeatures: 'requiredFeatures',
  resource: 'resource',
  restart: 'restart',
  result: 'result',
  results: 'results',
  rotate: 'rotate',
  rx: 'rx',
  ry: 'ry',
  scale: 'scale',
  security: 'security',
  seed: 'seed',
  shaperendering: 'shapeRendering',
  'shape-rendering': 'shapeRendering',
  slope: 'slope',
  spacing: 'spacing',
  specularconstant: 'specularConstant',
  specularexponent: 'specularExponent',
  speed: 'speed',
  spreadmethod: 'spreadMethod',
  startoffset: 'startOffset',
  stddeviation: 'stdDeviation',
  stemh: 'stemh',
  stemv: 'stemv',
  stitchtiles: 'stitchTiles',
  stopcolor: 'stopColor',
  'stop-color': 'stopColor',
  stopopacity: 'stopOpacity',
  'stop-opacity': 'stopOpacity',
  strikethroughposition: 'strikethroughPosition',
  'strikethrough-position': 'strikethroughPosition',
  strikethroughthickness: 'strikethroughThickness',
  'strikethrough-thickness': 'strikethroughThickness',
  string: 'string',
  stroke: 'stroke',
  strokedasharray: 'strokeDasharray',
  'stroke-dasharray': 'strokeDasharray',
  strokedashoffset: 'strokeDashoffset',
  'stroke-dashoffset': 'strokeDashoffset',
  strokelinecap: 'strokeLinecap',
  'stroke-linecap': 'strokeLinecap',
  strokelinejoin: 'strokeLinejoin',
  'stroke-linejoin': 'strokeLinejoin',
  strokemiterlimit: 'strokeMiterlimit',
  'stroke-miterlimit': 'strokeMiterlimit',
  strokewidth: 'strokeWidth',
  'stroke-width': 'strokeWidth',
  strokeopacity: 'strokeOpacity',
  'stroke-opacity': 'strokeOpacity',
  suppresscontenteditablewarning: 'suppressContentEditableWarning',
  suppresshydrationwarning: 'suppressHydrationWarning',
  surfacescale: 'surfaceScale',
  systemlanguage: 'systemLanguage',
  tablevalues: 'tableValues',
  targetx: 'targetX',
  targety: 'targetY',
  textanchor: 'textAnchor',
  'text-anchor': 'textAnchor',
  textdecoration: 'textDecoration',
  'text-decoration': 'textDecoration',
  textlength: 'textLength',
  textrendering: 'textRendering',
  'text-rendering': 'textRendering',
  to: 'to',
  transform: 'transform',
  typeof: 'typeof',
  u1: 'u1',
  u2: 'u2',
  underlineposition: 'underlinePosition',
  'underline-position': 'underlinePosition',
  underlinethickness: 'underlineThickness',
  'underline-thickness': 'underlineThickness',
  unicode: 'unicode',
  unicodebidi: 'unicodeBidi',
  'unicode-bidi': 'unicodeBidi',
  unicoderange: 'unicodeRange',
  'unicode-range': 'unicodeRange',
  unitsperem: 'unitsPerEm',
  'units-per-em': 'unitsPerEm',
  unselectable: 'unselectable',
  valphabetic: 'vAlphabetic',
  'v-alphabetic': 'vAlphabetic',
  values: 'values',
  vectoreffect: 'vectorEffect',
  'vector-effect': 'vectorEffect',
  version: 'version',
  vertadvy: 'vertAdvY',
  'vert-adv-y': 'vertAdvY',
  vertoriginx: 'vertOriginX',
  'vert-origin-x': 'vertOriginX',
  vertoriginy: 'vertOriginY',
  'vert-origin-y': 'vertOriginY',
  vhanging: 'vHanging',
  'v-hanging': 'vHanging',
  videographic: 'vIdeographic',
  'v-ideographic': 'vIdeographic',
  viewbox: 'viewBox',
  viewtarget: 'viewTarget',
  visibility: 'visibility',
  vmathematical: 'vMathematical',
  'v-mathematical': 'vMathematical',
  vocab: 'vocab',
  widths: 'widths',
  wordspacing: 'wordSpacing',
  'word-spacing': 'wordSpacing',
  writingmode: 'writingMode',
  'writing-mode': 'writingMode',
  x1: 'x1',
  x2: 'x2',
  x: 'x',
  xchannelselector: 'xChannelSelector',
  xheight: 'xHeight',
  'x-height': 'xHeight',
  xlinkactuate: 'xlinkActuate',
  'xlink:actuate': 'xlinkActuate',
  xlinkarcrole: 'xlinkArcrole',
  'xlink:arcrole': 'xlinkArcrole',
  xlinkhref: 'xlinkHref',
  'xlink:href': 'xlinkHref',
  xlinkrole: 'xlinkRole',
  'xlink:role': 'xlinkRole',
  xlinkshow: 'xlinkShow',
  'xlink:show': 'xlinkShow',
  xlinktitle: 'xlinkTitle',
  'xlink:title': 'xlinkTitle',
  xlinktype: 'xlinkType',
  'xlink:type': 'xlinkType',
  xmlbase: 'xmlBase',
  'xml:base': 'xmlBase',
  xmllang: 'xmlLang',
  'xml:lang': 'xmlLang',
  xmlns: 'xmlns',
  'xml:space': 'xmlSpace',
  xmlnsxlink: 'xmlnsXlink',
  'xmlns:xlink': 'xmlnsXlink',
  xmlspace: 'xmlSpace',
  y1: 'y1',
  y2: 'y2',
  y: 'y',
  ychannelselector: 'yChannelSelector',
  z: 'z',
  zoomandpan: 'zoomAndPan'
};

var ariaProperties = {
  'aria-current': 0, // state
  'aria-details': 0,
  'aria-disabled': 0, // state
  'aria-hidden': 0, // state
  'aria-invalid': 0, // state
  'aria-keyshortcuts': 0,
  'aria-label': 0,
  'aria-roledescription': 0,
  // Widget Attributes
  'aria-autocomplete': 0,
  'aria-checked': 0,
  'aria-expanded': 0,
  'aria-haspopup': 0,
  'aria-level': 0,
  'aria-modal': 0,
  'aria-multiline': 0,
  'aria-multiselectable': 0,
  'aria-orientation': 0,
  'aria-placeholder': 0,
  'aria-pressed': 0,
  'aria-readonly': 0,
  'aria-required': 0,
  'aria-selected': 0,
  'aria-sort': 0,
  'aria-valuemax': 0,
  'aria-valuemin': 0,
  'aria-valuenow': 0,
  'aria-valuetext': 0,
  // Live Region Attributes
  'aria-atomic': 0,
  'aria-busy': 0,
  'aria-live': 0,
  'aria-relevant': 0,
  // Drag-and-Drop Attributes
  'aria-dropeffect': 0,
  'aria-grabbed': 0,
  // Relationship Attributes
  'aria-activedescendant': 0,
  'aria-colcount': 0,
  'aria-colindex': 0,
  'aria-colspan': 0,
  'aria-controls': 0,
  'aria-describedby': 0,
  'aria-errormessage': 0,
  'aria-flowto': 0,
  'aria-labelledby': 0,
  'aria-owns': 0,
  'aria-posinset': 0,
  'aria-rowcount': 0,
  'aria-rowindex': 0,
  'aria-rowspan': 0,
  'aria-setsize': 0
};

var warnedProperties = {};
var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');

var hasOwnProperty$2 = Object.prototype.hasOwnProperty;

function validateProperty(tagName, name) {
  if (hasOwnProperty$2.call(warnedProperties, name) && warnedProperties[name]) {
    return true;
  }

  if (rARIACamel.test(name)) {
    var ariaName = 'aria-' + name.slice(4).toLowerCase();
    var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null;

    // If this is an aria-* attribute, but is not listed in the known DOM
    // DOM properties, then it is an invalid aria-* attribute.
    if (correctName == null) {
      warning$1(false, 'Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
      warnedProperties[name] = true;
      return true;
    }
    // aria-* attributes should be lowercase; suggest the lowercase version.
    if (name !== correctName) {
      warning$1(false, 'Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
      warnedProperties[name] = true;
      return true;
    }
  }

  if (rARIA.test(name)) {
    var lowerCasedName = name.toLowerCase();
    var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null;

    // If this is an aria-* attribute, but is not listed in the known DOM
    // DOM properties, then it is an invalid aria-* attribute.
    if (standardName == null) {
      warnedProperties[name] = true;
      return false;
    }
    // aria-* attributes should be lowercase; suggest the lowercase version.
    if (name !== standardName) {
      warning$1(false, 'Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
      warnedProperties[name] = true;
      return true;
    }
  }

  return true;
}

function warnInvalidARIAProps(type, props) {
  var invalidProps = [];

  for (var key in props) {
    var isValid = validateProperty(type, key);
    if (!isValid) {
      invalidProps.push(key);
    }
  }

  var unknownPropString = invalidProps.map(function (prop) {
    return '`' + prop + '`';
  }).join(', ');

  if (invalidProps.length === 1) {
    warning$1(false, 'Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
  } else if (invalidProps.length > 1) {
    warning$1(false, 'Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
  }
}

function validateProperties(type, props) {
  if (isCustomComponent(type, props)) {
    return;
  }
  warnInvalidARIAProps(type, props);
}

var didWarnValueNull = false;

function validateProperties$1(type, props) {
  if (type !== 'input' && type !== 'textarea' && type !== 'select') {
    return;
  }

  if (props != null && props.value === null && !didWarnValueNull) {
    didWarnValueNull = true;
    if (type === 'select' && props.multiple) {
      warning$1(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);
    } else {
      warning$1(false, '`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
    }
  }
}

var validateProperty$1 = function () {};

{
  var warnedProperties$1 = {};
  var _hasOwnProperty = Object.prototype.hasOwnProperty;
  var EVENT_NAME_REGEX = /^on./;
  var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
  var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
  var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');

  validateProperty$1 = function (tagName, name, value, canUseEventSystem) {
    if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
      return true;
    }

    var lowerCasedName = name.toLowerCase();
    if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
      warning$1(false, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');
      warnedProperties$1[name] = true;
      return true;
    }

    // We can't rely on the event system being injected on the server.
    if (canUseEventSystem) {
      if (registrationNameModules.hasOwnProperty(name)) {
        return true;
      }
      var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
      if (registrationName != null) {
        warning$1(false, 'Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
        warnedProperties$1[name] = true;
        return true;
      }
      if (EVENT_NAME_REGEX.test(name)) {
        warning$1(false, 'Unknown event handler property `%s`. It will be ignored.', name);
        warnedProperties$1[name] = true;
        return true;
      }
    } else if (EVENT_NAME_REGEX.test(name)) {
      // If no event plugins have been injected, we are in a server environment.
      // So we can't tell if the event name is correct for sure, but we can filter
      // out known bad ones like `onclick`. We can't suggest a specific replacement though.
      if (INVALID_EVENT_NAME_REGEX.test(name)) {
        warning$1(false, 'Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
      }
      warnedProperties$1[name] = true;
      return true;
    }

    // Let the ARIA attribute hook validate ARIA attributes
    if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
      return true;
    }

    if (lowerCasedName === 'innerhtml') {
      warning$1(false, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
      warnedProperties$1[name] = true;
      return true;
    }

    if (lowerCasedName === 'aria') {
      warning$1(false, 'The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
      warnedProperties$1[name] = true;
      return true;
    }

    if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
      warning$1(false, 'Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
      warnedProperties$1[name] = true;
      return true;
    }

    if (typeof value === 'number' && isNaN(value)) {
      warning$1(false, 'Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
      warnedProperties$1[name] = true;
      return true;
    }

    var propertyInfo = getPropertyInfo(name);
    var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED;

    // Known attributes should match the casing specified in the property config.
    if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
      var standardName = possibleStandardNames[lowerCasedName];
      if (standardName !== name) {
        warning$1(false, 'Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
        warnedProperties$1[name] = true;
        return true;
      }
    } else if (!isReserved && name !== lowerCasedName) {
      // Unknown attributes should have lowercase casing since that's how they
      // will be cased anyway with server rendering.
      warning$1(false, 'React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);
      warnedProperties$1[name] = true;
      return true;
    }

    if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
      if (value) {
        warning$1(false, 'Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name);
      } else {
        warning$1(false, 'Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);
      }
      warnedProperties$1[name] = true;
      return true;
    }

    // Now that we've validated casing, do not validate
    // data types for reserved props
    if (isReserved) {
      return true;
    }

    // Warn when a known attribute is a bad type
    if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
      warnedProperties$1[name] = true;
      return false;
    }

    // Warn when passing the strings 'false' or 'true' into a boolean prop
    if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
      warning$1(false, 'Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value);
      warnedProperties$1[name] = true;
      return true;
    }

    return true;
  };
}

var warnUnknownProperties = function (type, props, canUseEventSystem) {
  var unknownProps = [];
  for (var key in props) {
    var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);
    if (!isValid) {
      unknownProps.push(key);
    }
  }

  var unknownPropString = unknownProps.map(function (prop) {
    return '`' + prop + '`';
  }).join(', ');
  if (unknownProps.length === 1) {
    warning$1(false, 'Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
  } else if (unknownProps.length > 1) {
    warning$1(false, 'Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);
  }
};

function validateProperties$2(type, props, canUseEventSystem) {
  if (isCustomComponent(type, props)) {
    return;
  }
  warnUnknownProperties(type, props, canUseEventSystem);
}

// TODO: direct imports like some-package/src/* are bad. Fix me.
var didWarnInvalidHydration = false;
var didWarnShadyDOM = false;

var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';
var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';
var SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';
var AUTOFOCUS = 'autoFocus';
var CHILDREN = 'children';
var STYLE$1 = 'style';
var HTML = '__html';
var LISTENERS = 'listeners';

var HTML_NAMESPACE = Namespaces.html;


var warnedUnknownTags = void 0;
var suppressHydrationWarning = void 0;

var validatePropertiesInDevelopment = void 0;
var warnForTextDifference = void 0;
var warnForPropDifference = void 0;
var warnForExtraAttributes = void 0;
var warnForInvalidEventListener = void 0;
var canDiffStyleForHydrationWarning = void 0;

var normalizeMarkupForTextOrAttribute = void 0;
var normalizeHTML = void 0;

{
  warnedUnknownTags = {
    // Chrome is the only major browser not shipping <time>. But as of July
    // 2017 it intends to ship it due to widespread usage. We intentionally
    // *don't* warn for <time> even if it's unrecognized by Chrome because
    // it soon will be, and many apps have been using it anyway.
    time: true,
    // There are working polyfills for <dialog>. Let people use it.
    dialog: true,
    // Electron ships a custom <webview> tag to display external web content in
    // an isolated frame and process.
    // This tag is not present in non Electron environments such as JSDom which
    // is often used for testing purposes.
    // @see https://electronjs.org/docs/api/webview-tag
    webview: true
  };

  validatePropertiesInDevelopment = function (type, props) {
    validateProperties(type, props);
    validateProperties$1(type, props);
    validateProperties$2(type, props, /* canUseEventSystem */true);
  };

  // IE 11 parses & normalizes the style attribute as opposed to other
  // browsers. It adds spaces and sorts the properties in some
  // non-alphabetical order. Handling that would require sorting CSS
  // properties in the client & server versions or applying
  // `expectedStyle` to a temporary DOM node to read its `style` attribute
  // normalized. Since it only affects IE, we're skipping style warnings
  // in that browser completely in favor of doing all that work.
  // See https://github.com/facebook/react/issues/11807
  canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode;

  // HTML parsing normalizes CR and CRLF to LF.
  // It also can turn \u0000 into \uFFFD inside attributes.
  // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream
  // If we have a mismatch, it might be caused by that.
  // We will still patch up in this case but not fire the warning.
  var NORMALIZE_NEWLINES_REGEX = /\r\n?/g;
  var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;

  normalizeMarkupForTextOrAttribute = function (markup) {
    var markupString = typeof markup === 'string' ? markup : '' + markup;
    return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');
  };

  warnForTextDifference = function (serverText, clientText) {
    if (didWarnInvalidHydration) {
      return;
    }
    var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);
    var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);
    if (normalizedServerText === normalizedClientText) {
      return;
    }
    didWarnInvalidHydration = true;
    warningWithoutStack$1(false, 'Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
  };

  warnForPropDifference = function (propName, serverValue, clientValue) {
    if (didWarnInvalidHydration) {
      return;
    }
    var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);
    var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);
    if (normalizedServerValue === normalizedClientValue) {
      return;
    }
    didWarnInvalidHydration = true;
    warningWithoutStack$1(false, 'Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
  };

  warnForExtraAttributes = function (attributeNames) {
    if (didWarnInvalidHydration) {
      return;
    }
    didWarnInvalidHydration = true;
    var names = [];
    attributeNames.forEach(function (name) {
      names.push(name);
    });
    warningWithoutStack$1(false, 'Extra attributes from the server: %s', names);
  };

  warnForInvalidEventListener = function (registrationName, listener) {
    if (listener === false) {
      warning$1(false, 'Expected `%s` listener to be a function, instead got `false`.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);
    } else {
      warning$1(false, 'Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);
    }
  };

  // Parse the HTML and read it back to normalize the HTML string so that it
  // can be used for comparison.
  normalizeHTML = function (parent, html) {
    // We could have created a separate document here to avoid
    // re-initializing custom elements if they exist. But this breaks
    // how <noscript> is being handled. So we use the same document.
    // See the discussion in https://github.com/facebook/react/pull/11157.
    var testElement = parent.namespaceURI === HTML_NAMESPACE ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);
    testElement.innerHTML = html;
    return testElement.innerHTML;
  };
}

function ensureListeningTo(rootContainerElement, registrationName) {
  var isDocumentOrFragment = rootContainerElement.nodeType === DOCUMENT_NODE || rootContainerElement.nodeType === DOCUMENT_FRAGMENT_NODE;
  var doc = isDocumentOrFragment ? rootContainerElement : rootContainerElement.ownerDocument;
  listenTo(registrationName, doc);
}

function getOwnerDocumentFromRootContainer(rootContainerElement) {
  return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;
}

function noop() {}

function trapClickOnNonInteractiveElement(node) {
  // Mobile Safari does not fire properly bubble click events on
  // non-interactive elements, which means delegated click listeners do not
  // fire. The workaround for this bug involves attaching an empty click
  // listener on the target node.
  // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
  // Just set it using the onclick property so that we don't have to manage any
  // bookkeeping for it. Not sure if we need to clear it when the listener is
  // removed.
  // TODO: Only do this for the relevant Safaris maybe?
  node.onclick = noop;
}

function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {
  for (var propKey in nextProps) {
    if (!nextProps.hasOwnProperty(propKey)) {
      continue;
    }
    var nextProp = nextProps[propKey];
    if (propKey === STYLE$1) {
      {
        if (nextProp) {
          // Freeze the next style object so that we can assume it won't be
          // mutated. We have already warned for this in the past.
          Object.freeze(nextProp);
        }
      }
      // Relies on `updateStylesByID` not mutating `styleUpdates`.
      setValueForStyles(domElement, nextProp);
    } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
      var nextHtml = nextProp ? nextProp[HTML] : undefined;
      if (nextHtml != null) {
        setInnerHTML(domElement, nextHtml);
      }
    } else if (propKey === CHILDREN) {
      if (typeof nextProp === 'string') {
        // Avoid setting initial textContent when the text is empty. In IE11 setting
        // textContent on a <textarea> will cause the placeholder to not
        // show within the <textarea> until it has been focused and blurred again.
        // https://github.com/facebook/react/issues/6731#issuecomment-254874553
        var canSetTextContent = tag !== 'textarea' || nextProp !== '';
        if (canSetTextContent) {
          setTextContent(domElement, nextProp);
        }
      } else if (typeof nextProp === 'number') {
        setTextContent(domElement, '' + nextProp);
      }
    } else if (enableFlareAPI && propKey === LISTENERS || propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {
      // Noop
    } else if (propKey === AUTOFOCUS) {
      // We polyfill it separately on the client during commit.
      // We could have excluded it in the property list instead of
      // adding a special case here, but then it wouldn't be emitted
      // on server rendering (but we *do* want to emit it in SSR).
    } else if (registrationNameModules.hasOwnProperty(propKey)) {
      if (nextProp != null) {
        if ( true && typeof nextProp !== 'function') {
          warnForInvalidEventListener(propKey, nextProp);
        }
        ensureListeningTo(rootContainerElement, propKey);
      }
    } else if (nextProp != null) {
      setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);
    }
  }
}

function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
  // TODO: Handle wasCustomComponentTag
  for (var i = 0; i < updatePayload.length; i += 2) {
    var propKey = updatePayload[i];
    var propValue = updatePayload[i + 1];
    if (propKey === STYLE$1) {
      setValueForStyles(domElement, propValue);
    } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
      setInnerHTML(domElement, propValue);
    } else if (propKey === CHILDREN) {
      setTextContent(domElement, propValue);
    } else {
      setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);
    }
  }
}

function createElement(type, props, rootContainerElement, parentNamespace) {
  var isCustomComponentTag = void 0;

  // We create tags in the namespace of their parent container, except HTML
  // tags get no namespace.
  var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);
  var domElement = void 0;
  var namespaceURI = parentNamespace;
  if (namespaceURI === HTML_NAMESPACE) {
    namespaceURI = getIntrinsicNamespace(type);
  }
  if (namespaceURI === HTML_NAMESPACE) {
    {
      isCustomComponentTag = isCustomComponent(type, props);
      // Should this check be gated by parent namespace? Not sure we want to
      // allow <SVG> or <mATH>.
      !(isCustomComponentTag || type === type.toLowerCase()) ? warning$1(false, '<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type) : void 0;
    }

    if (type === 'script') {
      // Create the script via .innerHTML so its "parser-inserted" flag is
      // set to true and it does not execute
      var div = ownerDocument.createElement('div');
      div.innerHTML = '<script><' + '/script>'; // eslint-disable-line
      // This is guaranteed to yield a script element.
      var firstChild = div.firstChild;
      domElement = div.removeChild(firstChild);
    } else if (typeof props.is === 'string') {
      // $FlowIssue `createElement` should be updated for Web Components
      domElement = ownerDocument.createElement(type, { is: props.is });
    } else {
      // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
      // See discussion in https://github.com/facebook/react/pull/6896
      // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
      domElement = ownerDocument.createElement(type);
      // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`
      // attributes on `select`s needs to be added before `option`s are inserted.
      // This prevents:
      // - a bug where the `select` does not scroll to the correct option because singular
      //  `select` elements automatically pick the first item #13222
      // - a bug where the `select` set the first item as selected despite the `size` attribute #14239
      // See https://github.com/facebook/react/issues/13222
      // and https://github.com/facebook/react/issues/14239
      if (type === 'select') {
        var node = domElement;
        if (props.multiple) {
          node.multiple = true;
        } else if (props.size) {
          // Setting a size greater than 1 causes a select to behave like `multiple=true`, where
          // it is possible that no option is selected.
          //
          // This is only necessary when a select in "single selection mode".
          node.size = props.size;
        }
      }
    }
  } else {
    domElement = ownerDocument.createElementNS(namespaceURI, type);
  }

  {
    if (namespaceURI === HTML_NAMESPACE) {
      if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) {
        warnedUnknownTags[type] = true;
        warning$1(false, 'The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);
      }
    }
  }

  return domElement;
}

function createTextNode(text, rootContainerElement) {
  return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);
}

function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {
  var isCustomComponentTag = isCustomComponent(tag, rawProps);
  {
    validatePropertiesInDevelopment(tag, rawProps);
    if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) {
      warning$1(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
      didWarnShadyDOM = true;
    }
  }

  // TODO: Make sure that we check isMounted before firing any of these events.
  var props = void 0;
  switch (tag) {
    case 'iframe':
    case 'object':
    case 'embed':
      trapBubbledEvent(TOP_LOAD, domElement);
      props = rawProps;
      break;
    case 'video':
    case 'audio':
      // Create listener for each media event
      for (var i = 0; i < mediaEventTypes.length; i++) {
        trapBubbledEvent(mediaEventTypes[i], domElement);
      }
      props = rawProps;
      break;
    case 'source':
      trapBubbledEvent(TOP_ERROR, domElement);
      props = rawProps;
      break;
    case 'img':
    case 'image':
    case 'link':
      trapBubbledEvent(TOP_ERROR, domElement);
      trapBubbledEvent(TOP_LOAD, domElement);
      props = rawProps;
      break;
    case 'form':
      trapBubbledEvent(TOP_RESET, domElement);
      trapBubbledEvent(TOP_SUBMIT, domElement);
      props = rawProps;
      break;
    case 'details':
      trapBubbledEvent(TOP_TOGGLE, domElement);
      props = rawProps;
      break;
    case 'input':
      initWrapperState(domElement, rawProps);
      props = getHostProps(domElement, rawProps);
      trapBubbledEvent(TOP_INVALID, domElement);
      // For controlled components we always need to ensure we're listening
      // to onChange. Even if there is no listener.
      ensureListeningTo(rootContainerElement, 'onChange');
      break;
    case 'option':
      validateProps(domElement, rawProps);
      props = getHostProps$1(domElement, rawProps);
      break;
    case 'select':
      initWrapperState$1(domElement, rawProps);
      props = getHostProps$2(domElement, rawProps);
      trapBubbledEvent(TOP_INVALID, domElement);
      // For controlled components we always need to ensure we're listening
      // to onChange. Even if there is no listener.
      ensureListeningTo(rootContainerElement, 'onChange');
      break;
    case 'textarea':
      initWrapperState$2(domElement, rawProps);
      props = getHostProps$3(domElement, rawProps);
      trapBubbledEvent(TOP_INVALID, domElement);
      // For controlled components we always need to ensure we're listening
      // to onChange. Even if there is no listener.
      ensureListeningTo(rootContainerElement, 'onChange');
      break;
    default:
      props = rawProps;
  }

  assertValidProps(tag, props);

  setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);

  switch (tag) {
    case 'input':
      // TODO: Make sure we check if this is still unmounted or do any clean
      // up necessary since we never stop tracking anymore.
      track(domElement);
      postMountWrapper(domElement, rawProps, false);
      break;
    case 'textarea':
      // TODO: Make sure we check if this is still unmounted or do any clean
      // up necessary since we never stop tracking anymore.
      track(domElement);
      postMountWrapper$3(domElement, rawProps);
      break;
    case 'option':
      postMountWrapper$1(domElement, rawProps);
      break;
    case 'select':
      postMountWrapper$2(domElement, rawProps);
      break;
    default:
      if (typeof props.onClick === 'function') {
        // TODO: This cast may not be sound for SVG, MathML or custom elements.
        trapClickOnNonInteractiveElement(domElement);
      }
      break;
  }
}

// Calculate the diff between the two objects.
function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
  {
    validatePropertiesInDevelopment(tag, nextRawProps);
  }

  var updatePayload = null;

  var lastProps = void 0;
  var nextProps = void 0;
  switch (tag) {
    case 'input':
      lastProps = getHostProps(domElement, lastRawProps);
      nextProps = getHostProps(domElement, nextRawProps);
      updatePayload = [];
      break;
    case 'option':
      lastProps = getHostProps$1(domElement, lastRawProps);
      nextProps = getHostProps$1(domElement, nextRawProps);
      updatePayload = [];
      break;
    case 'select':
      lastProps = getHostProps$2(domElement, lastRawProps);
      nextProps = getHostProps$2(domElement, nextRawProps);
      updatePayload = [];
      break;
    case 'textarea':
      lastProps = getHostProps$3(domElement, lastRawProps);
      nextProps = getHostProps$3(domElement, nextRawProps);
      updatePayload = [];
      break;
    default:
      lastProps = lastRawProps;
      nextProps = nextRawProps;
      if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {
        // TODO: This cast may not be sound for SVG, MathML or custom elements.
        trapClickOnNonInteractiveElement(domElement);
      }
      break;
  }

  assertValidProps(tag, nextProps);

  var propKey = void 0;
  var styleName = void 0;
  var styleUpdates = null;
  for (propKey in lastProps) {
    if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
      continue;
    }
    if (propKey === STYLE$1) {
      var lastStyle = lastProps[propKey];
      for (styleName in lastStyle) {
        if (lastStyle.hasOwnProperty(styleName)) {
          if (!styleUpdates) {
            styleUpdates = {};
          }
          styleUpdates[styleName] = '';
        }
      }
    } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) {
      // Noop. This is handled by the clear text mechanism.
    } else if (enableFlareAPI && propKey === LISTENERS || propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {
      // Noop
    } else if (propKey === AUTOFOCUS) {
      // Noop. It doesn't work on updates anyway.
    } else if (registrationNameModules.hasOwnProperty(propKey)) {
      // This is a special case. If any listener updates we need to ensure
      // that the "current" fiber pointer gets updated so we need a commit
      // to update this element.
      if (!updatePayload) {
        updatePayload = [];
      }
    } else {
      // For all other deleted properties we add it to the queue. We use
      // the whitelist in the commit phase instead.
      (updatePayload = updatePayload || []).push(propKey, null);
    }
  }
  for (propKey in nextProps) {
    var nextProp = nextProps[propKey];
    var lastProp = lastProps != null ? lastProps[propKey] : undefined;
    if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
      continue;
    }
    if (propKey === STYLE$1) {
      {
        if (nextProp) {
          // Freeze the next style object so that we can assume it won't be
          // mutated. We have already warned for this in the past.
          Object.freeze(nextProp);
        }
      }
      if (lastProp) {
        // Unset styles on `lastProp` but not on `nextProp`.
        for (styleName in lastProp) {
          if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
            if (!styleUpdates) {
              styleUpdates = {};
            }
            styleUpdates[styleName] = '';
          }
        }
        // Update styles that changed since `lastProp`.
        for (styleName in nextProp) {
          if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
            if (!styleUpdates) {
              styleUpdates = {};
            }
            styleUpdates[styleName] = nextProp[styleName];
          }
        }
      } else {
        // Relies on `updateStylesByID` not mutating `styleUpdates`.
        if (!styleUpdates) {
          if (!updatePayload) {
            updatePayload = [];
          }
          updatePayload.push(propKey, styleUpdates);
        }
        styleUpdates = nextProp;
      }
    } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
      var nextHtml = nextProp ? nextProp[HTML] : undefined;
      var lastHtml = lastProp ? lastProp[HTML] : undefined;
      if (nextHtml != null) {
        if (lastHtml !== nextHtml) {
          (updatePayload = updatePayload || []).push(propKey, '' + nextHtml);
        }
      } else {
        // TODO: It might be too late to clear this if we have children
        // inserted already.
      }
    } else if (propKey === CHILDREN) {
      if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {
        (updatePayload = updatePayload || []).push(propKey, '' + nextProp);
      }
    } else if (enableFlareAPI && propKey === LISTENERS || propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {
      // Noop
    } else if (registrationNameModules.hasOwnProperty(propKey)) {
      if (nextProp != null) {
        // We eagerly listen to this even though we haven't committed yet.
        if ( true && typeof nextProp !== 'function') {
          warnForInvalidEventListener(propKey, nextProp);
        }
        ensureListeningTo(rootContainerElement, propKey);
      }
      if (!updatePayload && lastProp !== nextProp) {
        // This is a special case. If any listener updates we need to ensure
        // that the "current" props pointer gets updated so we need a commit
        // to update this element.
        updatePayload = [];
      }
    } else {
      // For any other property we always add it to the queue and then we
      // filter it out using the whitelist during the commit.
      (updatePayload = updatePayload || []).push(propKey, nextProp);
    }
  }
  if (styleUpdates) {
    {
      validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE$1]);
    }
    (updatePayload = updatePayload || []).push(STYLE$1, styleUpdates);
  }
  return updatePayload;
}

// Apply the diff.
function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
  // Update checked *before* name.
  // In the middle of an update, it is possible to have multiple checked.
  // When a checked radio tries to change name, browser makes another radio's checked false.
  if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
    updateChecked(domElement, nextRawProps);
  }

  var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
  var isCustomComponentTag = isCustomComponent(tag, nextRawProps);
  // Apply the diff.
  updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag);

  // TODO: Ensure that an update gets scheduled if any of the special props
  // changed.
  switch (tag) {
    case 'input':
      // Update the wrapper around inputs *after* updating props. This has to
      // happen after `updateDOMProperties`. Otherwise HTML5 input validations
      // raise warnings and prevent the new value from being assigned.
      updateWrapper(domElement, nextRawProps);
      break;
    case 'textarea':
      updateWrapper$1(domElement, nextRawProps);
      break;
    case 'select':
      // <select> value update needs to occur after <option> children
      // reconciliation
      postUpdateWrapper(domElement, nextRawProps);
      break;
  }
}

function getPossibleStandardName(propName) {
  {
    var lowerCasedName = propName.toLowerCase();
    if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {
      return null;
    }
    return possibleStandardNames[lowerCasedName] || null;
  }
  return null;
}

function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) {
  var isCustomComponentTag = void 0;
  var extraAttributeNames = void 0;

  {
    suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING$1] === true;
    isCustomComponentTag = isCustomComponent(tag, rawProps);
    validatePropertiesInDevelopment(tag, rawProps);
    if (isCustomComponentTag && !didWarnShadyDOM && domElement.shadyRoot) {
      warning$1(false, '%s is using shady DOM. Using shady DOM with React can ' + 'cause things to break subtly.', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
      didWarnShadyDOM = true;
    }
  }

  // TODO: Make sure that we check isMounted before firing any of these events.
  switch (tag) {
    case 'iframe':
    case 'object':
    case 'embed':
      trapBubbledEvent(TOP_LOAD, domElement);
      break;
    case 'video':
    case 'audio':
      // Create listener for each media event
      for (var i = 0; i < mediaEventTypes.length; i++) {
        trapBubbledEvent(mediaEventTypes[i], domElement);
      }
      break;
    case 'source':
      trapBubbledEvent(TOP_ERROR, domElement);
      break;
    case 'img':
    case 'image':
    case 'link':
      trapBubbledEvent(TOP_ERROR, domElement);
      trapBubbledEvent(TOP_LOAD, domElement);
      break;
    case 'form':
      trapBubbledEvent(TOP_RESET, domElement);
      trapBubbledEvent(TOP_SUBMIT, domElement);
      break;
    case 'details':
      trapBubbledEvent(TOP_TOGGLE, domElement);
      break;
    case 'input':
      initWrapperState(domElement, rawProps);
      trapBubbledEvent(TOP_INVALID, domElement);
      // For controlled components we always need to ensure we're listening
      // to onChange. Even if there is no listener.
      ensureListeningTo(rootContainerElement, 'onChange');
      break;
    case 'option':
      validateProps(domElement, rawProps);
      break;
    case 'select':
      initWrapperState$1(domElement, rawProps);
      trapBubbledEvent(TOP_INVALID, domElement);
      // For controlled components we always need to ensure we're listening
      // to onChange. Even if there is no listener.
      ensureListeningTo(rootContainerElement, 'onChange');
      break;
    case 'textarea':
      initWrapperState$2(domElement, rawProps);
      trapBubbledEvent(TOP_INVALID, domElement);
      // For controlled components we always need to ensure we're listening
      // to onChange. Even if there is no listener.
      ensureListeningTo(rootContainerElement, 'onChange');
      break;
  }

  assertValidProps(tag, rawProps);

  {
    extraAttributeNames = new Set();
    var attributes = domElement.attributes;
    for (var _i = 0; _i < attributes.length; _i++) {
      var name = attributes[_i].name.toLowerCase();
      switch (name) {
        // Built-in SSR attribute is whitelisted
        case 'data-reactroot':
          break;
        // Controlled attributes are not validated
        // TODO: Only ignore them on controlled tags.
        case 'value':
          break;
        case 'checked':
          break;
        case 'selected':
          break;
        default:
          // Intentionally use the original name.
          // See discussion in https://github.com/facebook/react/pull/10676.
          extraAttributeNames.add(attributes[_i].name);
      }
    }
  }

  var updatePayload = null;
  for (var propKey in rawProps) {
    if (!rawProps.hasOwnProperty(propKey)) {
      continue;
    }
    var nextProp = rawProps[propKey];
    if (propKey === CHILDREN) {
      // For text content children we compare against textContent. This
      // might match additional HTML that is hidden when we read it using
      // textContent. E.g. "foo" will match "f<span>oo</span>" but that still
      // satisfies our requirement. Our requirement is not to produce perfect
      // HTML and attributes. Ideally we should preserve structure but it's
      // ok not to if the visible content is still enough to indicate what
      // even listeners these nodes might be wired up to.
      // TODO: Warn if there is more than a single textNode as a child.
      // TODO: Should we use domElement.firstChild.nodeValue to compare?
      if (typeof nextProp === 'string') {
        if (domElement.textContent !== nextProp) {
          if ( true && !suppressHydrationWarning) {
            warnForTextDifference(domElement.textContent, nextProp);
          }
          updatePayload = [CHILDREN, nextProp];
        }
      } else if (typeof nextProp === 'number') {
        if (domElement.textContent !== '' + nextProp) {
          if ( true && !suppressHydrationWarning) {
            warnForTextDifference(domElement.textContent, nextProp);
          }
          updatePayload = [CHILDREN, '' + nextProp];
        }
      }
    } else if (registrationNameModules.hasOwnProperty(propKey)) {
      if (nextProp != null) {
        if ( true && typeof nextProp !== 'function') {
          warnForInvalidEventListener(propKey, nextProp);
        }
        ensureListeningTo(rootContainerElement, propKey);
      }
    } else if ( true &&
    // Convince Flow we've calculated it (it's DEV-only in this method.)
    typeof isCustomComponentTag === 'boolean') {
      // Validate that the properties correspond to their expected values.
      var serverValue = void 0;
      var propertyInfo = getPropertyInfo(propKey);
      if (suppressHydrationWarning) {
        // Don't bother comparing. We're ignoring all these warnings.
      } else if (enableFlareAPI && propKey === LISTENERS || propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1 ||
      // Controlled attributes are not validated
      // TODO: Only ignore them on controlled tags.
      propKey === 'value' || propKey === 'checked' || propKey === 'selected') {
        // Noop
      } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
        var serverHTML = domElement.innerHTML;
        var nextHtml = nextProp ? nextProp[HTML] : undefined;
        var expectedHTML = normalizeHTML(domElement, nextHtml != null ? nextHtml : '');
        if (expectedHTML !== serverHTML) {
          warnForPropDifference(propKey, serverHTML, expectedHTML);
        }
      } else if (propKey === STYLE$1) {
        // $FlowFixMe - Should be inferred as not undefined.
        extraAttributeNames.delete(propKey);

        if (canDiffStyleForHydrationWarning) {
          var expectedStyle = createDangerousStringForStyles(nextProp);
          serverValue = domElement.getAttribute('style');
          if (expectedStyle !== serverValue) {
            warnForPropDifference(propKey, serverValue, expectedStyle);
          }
        }
      } else if (isCustomComponentTag) {
        // $FlowFixMe - Should be inferred as not undefined.
        extraAttributeNames.delete(propKey.toLowerCase());
        serverValue = getValueForAttribute(domElement, propKey, nextProp);

        if (nextProp !== serverValue) {
          warnForPropDifference(propKey, serverValue, nextProp);
        }
      } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {
        var isMismatchDueToBadCasing = false;
        if (propertyInfo !== null) {
          // $FlowFixMe - Should be inferred as not undefined.
          extraAttributeNames.delete(propertyInfo.attributeName);
          serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);
        } else {
          var ownNamespace = parentNamespace;
          if (ownNamespace === HTML_NAMESPACE) {
            ownNamespace = getIntrinsicNamespace(tag);
          }
          if (ownNamespace === HTML_NAMESPACE) {
            // $FlowFixMe - Should be inferred as not undefined.
            extraAttributeNames.delete(propKey.toLowerCase());
          } else {
            var standardName = getPossibleStandardName(propKey);
            if (standardName !== null && standardName !== propKey) {
              // If an SVG prop is supplied with bad casing, it will
              // be successfully parsed from HTML, but will produce a mismatch
              // (and would be incorrectly rendered on the client).
              // However, we already warn about bad casing elsewhere.
              // So we'll skip the misleading extra mismatch warning in this case.
              isMismatchDueToBadCasing = true;
              // $FlowFixMe - Should be inferred as not undefined.
              extraAttributeNames.delete(standardName);
            }
            // $FlowFixMe - Should be inferred as not undefined.
            extraAttributeNames.delete(propKey);
          }
          serverValue = getValueForAttribute(domElement, propKey, nextProp);
        }

        if (nextProp !== serverValue && !isMismatchDueToBadCasing) {
          warnForPropDifference(propKey, serverValue, nextProp);
        }
      }
    }
  }

  {
    // $FlowFixMe - Should be inferred as not undefined.
    if (extraAttributeNames.size > 0 && !suppressHydrationWarning) {
      // $FlowFixMe - Should be inferred as not undefined.
      warnForExtraAttributes(extraAttributeNames);
    }
  }

  switch (tag) {
    case 'input':
      // TODO: Make sure we check if this is still unmounted or do any clean
      // up necessary since we never stop tracking anymore.
      track(domElement);
      postMountWrapper(domElement, rawProps, true);
      break;
    case 'textarea':
      // TODO: Make sure we check if this is still unmounted or do any clean
      // up necessary since we never stop tracking anymore.
      track(domElement);
      postMountWrapper$3(domElement, rawProps);
      break;
    case 'select':
    case 'option':
      // For input and textarea we current always set the value property at
      // post mount to force it to diverge from attributes. However, for
      // option and select we don't quite do the same thing and select
      // is not resilient to the DOM state changing so we don't do that here.
      // TODO: Consider not doing this for input and textarea.
      break;
    default:
      if (typeof rawProps.onClick === 'function') {
        // TODO: This cast may not be sound for SVG, MathML or custom elements.
        trapClickOnNonInteractiveElement(domElement);
      }
      break;
  }

  return updatePayload;
}

function diffHydratedText(textNode, text) {
  var isDifferent = textNode.nodeValue !== text;
  return isDifferent;
}

function warnForUnmatchedText(textNode, text) {
  {
    warnForTextDifference(textNode.nodeValue, text);
  }
}

function warnForDeletedHydratableElement(parentNode, child) {
  {
    if (didWarnInvalidHydration) {
      return;
    }
    didWarnInvalidHydration = true;
    warningWithoutStack$1(false, 'Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
  }
}

function warnForDeletedHydratableText(parentNode, child) {
  {
    if (didWarnInvalidHydration) {
      return;
    }
    didWarnInvalidHydration = true;
    warningWithoutStack$1(false, 'Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
  }
}

function warnForInsertedHydratedElement(parentNode, tag, props) {
  {
    if (didWarnInvalidHydration) {
      return;
    }
    didWarnInvalidHydration = true;
    warningWithoutStack$1(false, 'Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
  }
}

function warnForInsertedHydratedText(parentNode, text) {
  {
    if (text === '') {
      // We expect to insert empty text nodes since they're not represented in
      // the HTML.
      // TODO: Remove this special case if we can just avoid inserting empty
      // text nodes.
      return;
    }
    if (didWarnInvalidHydration) {
      return;
    }
    didWarnInvalidHydration = true;
    warningWithoutStack$1(false, 'Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
  }
}

function restoreControlledState$1(domElement, tag, props) {
  switch (tag) {
    case 'input':
      restoreControlledState(domElement, props);
      return;
    case 'textarea':
      restoreControlledState$3(domElement, props);
      return;
    case 'select':
      restoreControlledState$2(domElement, props);
      return;
  }
}

function listenToEventResponderEventTypes(eventTypes, element) {
  if (enableFlareAPI) {
    // Get the listening Set for this element. We use this to track
    // what events we're listening to.
    var listeningSet = getListeningSetForElement(element);

    // Go through each target event type of the event responder
    for (var i = 0, length = eventTypes.length; i < length; ++i) {
      var eventType = eventTypes[i];
      var isPassive = !endsWith(eventType, '_active');
      var eventKey = isPassive ? eventType + '_passive' : eventType;
      var targetEventType = isPassive ? eventType : eventType.substring(0, eventType.length - 7);
      if (!listeningSet.has(eventKey)) {
        trapEventForResponderEventSystem(element, targetEventType, isPassive);
        listeningSet.add(eventKey);
      }
    }
  }
}

// We can remove this once the event API is stable and out of a flag
if (enableFlareAPI) {
  setListenToResponderEventTypes(listenToEventResponderEventTypes);
}

// TODO: direct imports like some-package/src/* are bad. Fix me.
var validateDOMNesting = function () {};
var updatedAncestorInfo = function () {};

{
  // This validation code was written based on the HTML5 parsing spec:
  // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
  //
  // Note: this does not catch all invalid nesting, nor does it try to (as it's
  // not clear what practical benefit doing so provides); instead, we warn only
  // for cases where the parser will give a parse tree differing from what React
  // intended. For example, <b><div></div></b> is invalid but we don't warn
  // because it still parses correctly; we do warn for other cases like nested
  // <p> tags where the beginning of the second element implicitly closes the
  // first, causing a confusing mess.

  // https://html.spec.whatwg.org/multipage/syntax.html#special
  var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp'];

  // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
  var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template',

  // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
  // TODO: Distinguish by namespace here -- for <title>, including it here
  // errs on the side of fewer warnings
  'foreignObject', 'desc', 'title'];

  // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
  var buttonScopeTags = inScopeTags.concat(['button']);

  // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
  var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];

  var emptyAncestorInfo = {
    current: null,

    formTag: null,
    aTagInScope: null,
    buttonTagInScope: null,
    nobrTagInScope: null,
    pTagInButtonScope: null,

    listItemTagAutoclosing: null,
    dlItemTagAutoclosing: null
  };

  updatedAncestorInfo = function (oldInfo, tag) {
    var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
    var info = { tag: tag };

    if (inScopeTags.indexOf(tag) !== -1) {
      ancestorInfo.aTagInScope = null;
      ancestorInfo.buttonTagInScope = null;
      ancestorInfo.nobrTagInScope = null;
    }
    if (buttonScopeTags.indexOf(tag) !== -1) {
      ancestorInfo.pTagInButtonScope = null;
    }

    // See rules for 'li', 'dd', 'dt' start tags in
    // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
    if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
      ancestorInfo.listItemTagAutoclosing = null;
      ancestorInfo.dlItemTagAutoclosing = null;
    }

    ancestorInfo.current = info;

    if (tag === 'form') {
      ancestorInfo.formTag = info;
    }
    if (tag === 'a') {
      ancestorInfo.aTagInScope = info;
    }
    if (tag === 'button') {
      ancestorInfo.buttonTagInScope = info;
    }
    if (tag === 'nobr') {
      ancestorInfo.nobrTagInScope = info;
    }
    if (tag === 'p') {
      ancestorInfo.pTagInButtonScope = info;
    }
    if (tag === 'li') {
      ancestorInfo.listItemTagAutoclosing = info;
    }
    if (tag === 'dd' || tag === 'dt') {
      ancestorInfo.dlItemTagAutoclosing = info;
    }

    return ancestorInfo;
  };

  /**
   * Returns whether
   */
  var isTagValidWithParent = function (tag, parentTag) {
    // First, let's check if we're in an unusual parsing mode...
    switch (parentTag) {
      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
      case 'select':
        return tag === 'option' || tag === 'optgroup' || tag === '#text';
      case 'optgroup':
        return tag === 'option' || tag === '#text';
      // Strictly speaking, seeing an <option> doesn't mean we're in a <select>
      // but
      case 'option':
        return tag === '#text';
      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
      // No special behavior since these rules fall back to "in body" mode for
      // all except special table nodes which cause bad parsing behavior anyway.

      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
      case 'tr':
        return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
      case 'tbody':
      case 'thead':
      case 'tfoot':
        return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
      case 'colgroup':
        return tag === 'col' || tag === 'template';
      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
      case 'table':
        return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
      case 'head':
        return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
      // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
      case 'html':
        return tag === 'head' || tag === 'body' || tag === 'frameset';
      case 'frameset':
        return tag === 'frame';
      case '#document':
        return tag === 'html';
    }

    // Probably in the "in body" parsing mode, so we outlaw only tag combos
    // where the parsing rules cause implicit opens or closes to be added.
    // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
    switch (tag) {
      case 'h1':
      case 'h2':
      case 'h3':
      case 'h4':
      case 'h5':
      case 'h6':
        return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';

      case 'rp':
      case 'rt':
        return impliedEndTags.indexOf(parentTag) === -1;

      case 'body':
      case 'caption':
      case 'col':
      case 'colgroup':
      case 'frameset':
      case 'frame':
      case 'head':
      case 'html':
      case 'tbody':
      case 'td':
      case 'tfoot':
      case 'th':
      case 'thead':
      case 'tr':
        // These tags are only valid with a few parents that have special child
        // parsing rules -- if we're down here, then none of those matched and
        // so we allow it only if we don't know what the parent is, as all other
        // cases are invalid.
        return parentTag == null;
    }

    return true;
  };

  /**
   * Returns whether
   */
  var findInvalidAncestorForTag = function (tag, ancestorInfo) {
    switch (tag) {
      case 'address':
      case 'article':
      case 'aside':
      case 'blockquote':
      case 'center':
      case 'details':
      case 'dialog':
      case 'dir':
      case 'div':
      case 'dl':
      case 'fieldset':
      case 'figcaption':
      case 'figure':
      case 'footer':
      case 'header':
      case 'hgroup':
      case 'main':
      case 'menu':
      case 'nav':
      case 'ol':
      case 'p':
      case 'section':
      case 'summary':
      case 'ul':
      case 'pre':
      case 'listing':
      case 'table':
      case 'hr':
      case 'xmp':
      case 'h1':
      case 'h2':
      case 'h3':
      case 'h4':
      case 'h5':
      case 'h6':
        return ancestorInfo.pTagInButtonScope;

      case 'form':
        return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;

      case 'li':
        return ancestorInfo.listItemTagAutoclosing;

      case 'dd':
      case 'dt':
        return ancestorInfo.dlItemTagAutoclosing;

      case 'button':
        return ancestorInfo.buttonTagInScope;

      case 'a':
        // Spec says something about storing a list of markers, but it sounds
        // equivalent to this check.
        return ancestorInfo.aTagInScope;

      case 'nobr':
        return ancestorInfo.nobrTagInScope;
    }

    return null;
  };

  var didWarn$1 = {};

  validateDOMNesting = function (childTag, childText, ancestorInfo) {
    ancestorInfo = ancestorInfo || emptyAncestorInfo;
    var parentInfo = ancestorInfo.current;
    var parentTag = parentInfo && parentInfo.tag;

    if (childText != null) {
      !(childTag == null) ? warningWithoutStack$1(false, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
      childTag = '#text';
    }

    var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
    var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
    var invalidParentOrAncestor = invalidParent || invalidAncestor;
    if (!invalidParentOrAncestor) {
      return;
    }

    var ancestorTag = invalidParentOrAncestor.tag;
    var addendum = getCurrentFiberStackInDev();

    var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + addendum;
    if (didWarn$1[warnKey]) {
      return;
    }
    didWarn$1[warnKey] = true;

    var tagDisplayName = childTag;
    var whitespaceInfo = '';
    if (childTag === '#text') {
      if (/\S/.test(childText)) {
        tagDisplayName = 'Text nodes';
      } else {
        tagDisplayName = 'Whitespace text nodes';
        whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
      }
    } else {
      tagDisplayName = '<' + childTag + '>';
    }

    if (invalidParent) {
      var info = '';
      if (ancestorTag === 'table' && childTag === 'tr') {
        info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';
      }
      warningWithoutStack$1(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info, addendum);
    } else {
      warningWithoutStack$1(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.%s', tagDisplayName, ancestorTag, addendum);
    }
  };
}

// Renderers that don't support persistence
// can re-export everything from this module.

function shim() {
  (function () {
    {
      {
        throw ReactError(Error('The current renderer does not support persistence. This error is likely caused by a bug in React. Please file an issue.'));
      }
    }
  })();
}

// Persistence (when unsupported)
var supportsPersistence = false;
var cloneInstance = shim;
var cloneFundamentalInstance = shim;
var createContainerChildSet = shim;
var appendChildToContainerChildSet = shim;
var finalizeContainerChildren = shim;
var replaceContainerChildren = shim;
var cloneHiddenInstance = shim;
var cloneHiddenTextInstance = shim;

var SUPPRESS_HYDRATION_WARNING = void 0;
{
  SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';
}

var SUSPENSE_START_DATA = '$';
var SUSPENSE_END_DATA = '/$';
var SUSPENSE_PENDING_START_DATA = '$?';
var SUSPENSE_FALLBACK_START_DATA = '$!';

var STYLE = 'style';

var eventsEnabled = null;
var selectionInformation = null;

function shouldAutoFocusHostComponent(type, props) {
  switch (type) {
    case 'button':
    case 'input':
    case 'select':
    case 'textarea':
      return !!props.autoFocus;
  }
  return false;
}

function getRootHostContext(rootContainerInstance) {
  var type = void 0;
  var namespace = void 0;
  var nodeType = rootContainerInstance.nodeType;
  switch (nodeType) {
    case DOCUMENT_NODE:
    case DOCUMENT_FRAGMENT_NODE:
      {
        type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';
        var root = rootContainerInstance.documentElement;
        namespace = root ? root.namespaceURI : getChildNamespace(null, '');
        break;
      }
    default:
      {
        var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;
        var ownNamespace = container.namespaceURI || null;
        type = container.tagName;
        namespace = getChildNamespace(ownNamespace, type);
        break;
      }
  }
  {
    var validatedTag = type.toLowerCase();
    var _ancestorInfo = updatedAncestorInfo(null, validatedTag);
    return { namespace: namespace, ancestorInfo: _ancestorInfo };
  }
  return namespace;
}

function getChildHostContext(parentHostContext, type, rootContainerInstance) {
  {
    var parentHostContextDev = parentHostContext;
    var _namespace = getChildNamespace(parentHostContextDev.namespace, type);
    var _ancestorInfo2 = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);
    return { namespace: _namespace, ancestorInfo: _ancestorInfo2 };
  }
  var parentNamespace = parentHostContext;
  return getChildNamespace(parentNamespace, type);
}

function getPublicInstance(instance) {
  return instance;
}

function prepareForCommit(containerInfo) {
  eventsEnabled = isEnabled();
  selectionInformation = getSelectionInformation();
  setEnabled(false);
}

function resetAfterCommit(containerInfo) {
  restoreSelection(selectionInformation);
  selectionInformation = null;
  setEnabled(eventsEnabled);
  eventsEnabled = null;
}

function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
  var parentNamespace = void 0;
  {
    // TODO: take namespace into account when validating.
    var hostContextDev = hostContext;
    validateDOMNesting(type, null, hostContextDev.ancestorInfo);
    if (typeof props.children === 'string' || typeof props.children === 'number') {
      var string = '' + props.children;
      var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
      validateDOMNesting(null, string, ownAncestorInfo);
    }
    parentNamespace = hostContextDev.namespace;
  }
  var domElement = createElement(type, props, rootContainerInstance, parentNamespace);
  precacheFiberNode(internalInstanceHandle, domElement);
  updateFiberProps(domElement, props);
  return domElement;
}

function appendInitialChild(parentInstance, child) {
  parentInstance.appendChild(child);
}

function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {
  setInitialProperties(domElement, type, props, rootContainerInstance);
  return shouldAutoFocusHostComponent(type, props);
}

function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {
  {
    var hostContextDev = hostContext;
    if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {
      var string = '' + newProps.children;
      var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
      validateDOMNesting(null, string, ownAncestorInfo);
    }
  }
  return diffProperties(domElement, type, oldProps, newProps, rootContainerInstance);
}

function shouldSetTextContent(type, props) {
  return type === 'textarea' || type === 'option' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
}

function shouldDeprioritizeSubtree(type, props) {
  return !!props.hidden;
}

function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {
  {
    var hostContextDev = hostContext;
    validateDOMNesting(null, text, hostContextDev.ancestorInfo);
  }
  var textNode = createTextNode(text, rootContainerInstance);
  precacheFiberNode(internalInstanceHandle, textNode);
  return textNode;
}

var isPrimaryRenderer = true;
var warnsIfNotActing = true;
// This initialization code may run even on server environments
// if a component just imports ReactDOM (e.g. for findDOMNode).
// Some environments might not have setTimeout or clearTimeout.
var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;
var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;
var noTimeout = -1;

// -------------------
//     Mutation
// -------------------

var supportsMutation = true;

function commitMount(domElement, type, newProps, internalInstanceHandle) {
  // Despite the naming that might imply otherwise, this method only
  // fires if there is an `Update` effect scheduled during mounting.
  // This happens if `finalizeInitialChildren` returns `true` (which it
  // does to implement the `autoFocus` attribute on the client). But
  // there are also other cases when this might happen (such as patching
  // up text content during hydration mismatch). So we'll check this again.
  if (shouldAutoFocusHostComponent(type, newProps)) {
    domElement.focus();
  }
}

function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {
  // Update the props handle so that we know which props are the ones with
  // with current event handlers.
  updateFiberProps(domElement, newProps);
  // Apply the diff to the DOM node.
  updateProperties(domElement, updatePayload, type, oldProps, newProps);
}

function resetTextContent(domElement) {
  setTextContent(domElement, '');
}

function commitTextUpdate(textInstance, oldText, newText) {
  textInstance.nodeValue = newText;
}

function appendChild(parentInstance, child) {
  parentInstance.appendChild(child);
}

function appendChildToContainer(container, child) {
  var parentNode = void 0;
  if (container.nodeType === COMMENT_NODE) {
    parentNode = container.parentNode;
    parentNode.insertBefore(child, container);
  } else {
    parentNode = container;
    parentNode.appendChild(child);
  }
  // This container might be used for a portal.
  // If something inside a portal is clicked, that click should bubble
  // through the React tree. However, on Mobile Safari the click would
  // never bubble through the *DOM* tree unless an ancestor with onclick
  // event exists. So we wouldn't see it and dispatch it.
  // This is why we ensure that non React root containers have inline onclick
  // defined.
  // https://github.com/facebook/react/issues/11918
  var reactRootContainer = container._reactRootContainer;
  if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {
    // TODO: This cast may not be sound for SVG, MathML or custom elements.
    trapClickOnNonInteractiveElement(parentNode);
  }
}

function insertBefore(parentInstance, child, beforeChild) {
  parentInstance.insertBefore(child, beforeChild);
}

function insertInContainerBefore(container, child, beforeChild) {
  if (container.nodeType === COMMENT_NODE) {
    container.parentNode.insertBefore(child, beforeChild);
  } else {
    container.insertBefore(child, beforeChild);
  }
}

function removeChild(parentInstance, child) {
  parentInstance.removeChild(child);
}

function removeChildFromContainer(container, child) {
  if (container.nodeType === COMMENT_NODE) {
    container.parentNode.removeChild(child);
  } else {
    container.removeChild(child);
  }
}

function clearSuspenseBoundary(parentInstance, suspenseInstance) {
  var node = suspenseInstance;
  // Delete all nodes within this suspense boundary.
  // There might be nested nodes so we need to keep track of how
  // deep we are and only break out when we're back on top.
  var depth = 0;
  do {
    var nextNode = node.nextSibling;
    parentInstance.removeChild(node);
    if (nextNode && nextNode.nodeType === COMMENT_NODE) {
      var data = nextNode.data;
      if (data === SUSPENSE_END_DATA) {
        if (depth === 0) {
          parentInstance.removeChild(nextNode);
          return;
        } else {
          depth--;
        }
      } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_PENDING_START_DATA || data === SUSPENSE_FALLBACK_START_DATA) {
        depth++;
      }
    }
    node = nextNode;
  } while (node);
  // TODO: Warn, we didn't find the end comment boundary.
}

function clearSuspenseBoundaryFromContainer(container, suspenseInstance) {
  if (container.nodeType === COMMENT_NODE) {
    clearSuspenseBoundary(container.parentNode, suspenseInstance);
  } else if (container.nodeType === ELEMENT_NODE) {
    clearSuspenseBoundary(container, suspenseInstance);
  } else {
    // Document nodes should never contain suspense boundaries.
  }
}

function hideInstance(instance) {
  // TODO: Does this work for all element types? What about MathML? Should we
  // pass host context to this method?
  instance = instance;
  var style = instance.style;
  if (typeof style.setProperty === 'function') {
    style.setProperty('display', 'none', 'important');
  } else {
    style.display = 'none';
  }
}

function hideTextInstance(textInstance) {
  textInstance.nodeValue = '';
}

function unhideInstance(instance, props) {
  instance = instance;
  var styleProp = props[STYLE];
  var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;
  instance.style.display = dangerousStyleValue('display', display);
}

function unhideTextInstance(textInstance, text) {
  textInstance.nodeValue = text;
}

// -------------------
//     Hydration
// -------------------

var supportsHydration = true;

function canHydrateInstance(instance, type, props) {
  if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {
    return null;
  }
  // This has now been refined to an element node.
  return instance;
}

function canHydrateTextInstance(instance, text) {
  if (text === '' || instance.nodeType !== TEXT_NODE) {
    // Empty strings are not parsed by HTML so there won't be a correct match here.
    return null;
  }
  // This has now been refined to a text node.
  return instance;
}

function canHydrateSuspenseInstance(instance) {
  if (instance.nodeType !== COMMENT_NODE) {
    // Empty strings are not parsed by HTML so there won't be a correct match here.
    return null;
  }
  // This has now been refined to a suspense node.
  return instance;
}

function isSuspenseInstancePending(instance) {
  return instance.data === SUSPENSE_PENDING_START_DATA;
}

function isSuspenseInstanceFallback(instance) {
  return instance.data === SUSPENSE_FALLBACK_START_DATA;
}

function registerSuspenseInstanceRetry(instance, callback) {
  instance._reactRetry = callback;
}

function getNextHydratable(node) {
  // Skip non-hydratable nodes.
  for (; node != null; node = node.nextSibling) {
    var nodeType = node.nodeType;
    if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {
      break;
    }
    if (enableSuspenseServerRenderer) {
      if (nodeType === COMMENT_NODE) {
        break;
      }
      var nodeData = node.data;
      if (nodeData === SUSPENSE_START_DATA || nodeData === SUSPENSE_FALLBACK_START_DATA || nodeData === SUSPENSE_PENDING_START_DATA) {
        break;
      }
    }
  }
  return node;
}

function getNextHydratableSibling(instance) {
  return getNextHydratable(instance.nextSibling);
}

function getFirstHydratableChild(parentInstance) {
  return getNextHydratable(parentInstance.firstChild);
}

function hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
  precacheFiberNode(internalInstanceHandle, instance);
  // TODO: Possibly defer this until the commit phase where all the events
  // get attached.
  updateFiberProps(instance, props);
  var parentNamespace = void 0;
  {
    var hostContextDev = hostContext;
    parentNamespace = hostContextDev.namespace;
  }
  return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance);
}

function hydrateTextInstance(textInstance, text, internalInstanceHandle) {
  precacheFiberNode(internalInstanceHandle, textInstance);
  return diffHydratedText(textInstance, text);
}

function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {
  var node = suspenseInstance.nextSibling;
  // Skip past all nodes within this suspense boundary.
  // There might be nested nodes so we need to keep track of how
  // deep we are and only break out when we're back on top.
  var depth = 0;
  while (node) {
    if (node.nodeType === COMMENT_NODE) {
      var data = node.data;
      if (data === SUSPENSE_END_DATA) {
        if (depth === 0) {
          return getNextHydratableSibling(node);
        } else {
          depth--;
        }
      } else if (data === SUSPENSE_START_DATA) {
        depth++;
      }
    }
    node = node.nextSibling;
  }
  // TODO: Warn, we didn't find the end comment boundary.
  return null;
}

function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) {
  {
    warnForUnmatchedText(textInstance, text);
  }
}

function didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text) {
  if ( true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {
    warnForUnmatchedText(textInstance, text);
  }
}

function didNotHydrateContainerInstance(parentContainer, instance) {
  {
    if (instance.nodeType === ELEMENT_NODE) {
      warnForDeletedHydratableElement(parentContainer, instance);
    } else if (instance.nodeType === COMMENT_NODE) {
      // TODO: warnForDeletedHydratableSuspenseBoundary
    } else {
      warnForDeletedHydratableText(parentContainer, instance);
    }
  }
}

function didNotHydrateInstance(parentType, parentProps, parentInstance, instance) {
  if ( true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {
    if (instance.nodeType === ELEMENT_NODE) {
      warnForDeletedHydratableElement(parentInstance, instance);
    } else if (instance.nodeType === COMMENT_NODE) {
      // TODO: warnForDeletedHydratableSuspenseBoundary
    } else {
      warnForDeletedHydratableText(parentInstance, instance);
    }
  }
}

function didNotFindHydratableContainerInstance(parentContainer, type, props) {
  {
    warnForInsertedHydratedElement(parentContainer, type, props);
  }
}

function didNotFindHydratableContainerTextInstance(parentContainer, text) {
  {
    warnForInsertedHydratedText(parentContainer, text);
  }
}



function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) {
  if ( true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {
    warnForInsertedHydratedElement(parentInstance, type, props);
  }
}

function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) {
  if ( true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {
    warnForInsertedHydratedText(parentInstance, text);
  }
}

function didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) {
  if ( true && parentProps[SUPPRESS_HYDRATION_WARNING] !== true) {
    // TODO: warnForInsertedHydratedSuspense(parentInstance);
  }
}

function mountResponderInstance(responder, responderInstance, responderProps, responderState, instance, rootContainerInstance) {
  // Listen to events
  var doc = rootContainerInstance.ownerDocument;
  var documentBody = doc.body || doc;
  var _ref = responder,
      rootEventTypes = _ref.rootEventTypes,
      targetEventTypes = _ref.targetEventTypes;

  if (targetEventTypes !== null) {
    listenToEventResponderEventTypes(targetEventTypes, documentBody);
  }
  if (rootEventTypes !== null) {
    addRootEventTypesForResponderInstance(responderInstance, rootEventTypes);
    listenToEventResponderEventTypes(rootEventTypes, documentBody);
  }
  mountEventResponder(responder, responderInstance, responderProps, responderState);
  return responderInstance;
}

function unmountResponderInstance(responderInstance) {
  if (enableFlareAPI) {
    // TODO stop listening to targetEventTypes
    unmountEventResponder(responderInstance);
  }
}

function getFundamentalComponentInstance(fundamentalInstance) {
  if (enableFundamentalAPI) {
    var currentFiber = fundamentalInstance.currentFiber,
        impl = fundamentalInstance.impl,
        _props = fundamentalInstance.props,
        state = fundamentalInstance.state;

    var instance = impl.getInstance(null, _props, state);
    precacheFiberNode(currentFiber, instance);
    return instance;
  }
  // Because of the flag above, this gets around the Flow error;
  return null;
}

function mountFundamentalComponent(fundamentalInstance) {
  if (enableFundamentalAPI) {
    var impl = fundamentalInstance.impl,
        instance = fundamentalInstance.instance,
        _props2 = fundamentalInstance.props,
        state = fundamentalInstance.state;

    var onMount = impl.onMount;
    if (onMount !== undefined) {
      onMount(null, instance, _props2, state);
    }
  }
}

function shouldUpdateFundamentalComponent(fundamentalInstance) {
  if (enableFundamentalAPI) {
    var impl = fundamentalInstance.impl,
        prevProps = fundamentalInstance.prevProps,
        _props3 = fundamentalInstance.props,
        state = fundamentalInstance.state;

    var shouldUpdate = impl.shouldUpdate;
    if (shouldUpdate !== undefined) {
      return shouldUpdate(null, prevProps, _props3, state);
    }
  }
  return true;
}

function updateFundamentalComponent(fundamentalInstance) {
  if (enableFundamentalAPI) {
    var impl = fundamentalInstance.impl,
        instance = fundamentalInstance.instance,
        prevProps = fundamentalInstance.prevProps,
        _props4 = fundamentalInstance.props,
        state = fundamentalInstance.state;

    var onUpdate = impl.onUpdate;
    if (onUpdate !== undefined) {
      onUpdate(null, instance, prevProps, _props4, state);
    }
  }
}

function unmountFundamentalComponent(fundamentalInstance) {
  if (enableFundamentalAPI) {
    var impl = fundamentalInstance.impl,
        instance = fundamentalInstance.instance,
        _props5 = fundamentalInstance.props,
        state = fundamentalInstance.state;

    var onUnmount = impl.onUnmount;
    if (onUnmount !== undefined) {
      onUnmount(null, instance, _props5, state);
    }
  }
}

// Prefix measurements so that it's possible to filter them.
// Longer prefixes are hard to read in DevTools.
var reactEmoji = '\u269B';
var warningEmoji = '\u26D4';
var supportsUserTiming = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';

// Keep track of current fiber so that we know the path to unwind on pause.
// TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them?
var currentFiber = null;
// If we're in the middle of user code, which fiber and method is it?
// Reusing `currentFiber` would be confusing for this because user code fiber
// can change during commit phase too, but we don't need to unwind it (since
// lifecycles in the commit phase don't resemble a tree).
var currentPhase = null;
var currentPhaseFiber = null;
// Did lifecycle hook schedule an update? This is often a performance problem,
// so we will keep track of it, and include it in the report.
// Track commits caused by cascading updates.
var isCommitting = false;
var hasScheduledUpdateInCurrentCommit = false;
var hasScheduledUpdateInCurrentPhase = false;
var commitCountInCurrentWorkLoop = 0;
var effectCountInCurrentCommit = 0;
var isWaitingForCallback = false;
// During commits, we only show a measurement once per method name
// to avoid stretch the commit phase with measurement overhead.
var labelsInCurrentCommit = new Set();

var formatMarkName = function (markName) {
  return reactEmoji + ' ' + markName;
};

var formatLabel = function (label, warning) {
  var prefix = warning ? warningEmoji + ' ' : reactEmoji + ' ';
  var suffix = warning ? ' Warning: ' + warning : '';
  return '' + prefix + label + suffix;
};

var beginMark = function (markName) {
  performance.mark(formatMarkName(markName));
};

var clearMark = function (markName) {
  performance.clearMarks(formatMarkName(markName));
};

var endMark = function (label, markName, warning) {
  var formattedMarkName = formatMarkName(markName);
  var formattedLabel = formatLabel(label, warning);
  try {
    performance.measure(formattedLabel, formattedMarkName);
  } catch (err) {}
  // If previous mark was missing for some reason, this will throw.
  // This could only happen if React crashed in an unexpected place earlier.
  // Don't pile on with more errors.

  // Clear marks immediately to avoid growing buffer.
  performance.clearMarks(formattedMarkName);
  performance.clearMeasures(formattedLabel);
};

var getFiberMarkName = function (label, debugID) {
  return label + ' (#' + debugID + ')';
};

var getFiberLabel = function (componentName, isMounted, phase) {
  if (phase === null) {
    // These are composite component total time measurements.
    return componentName + ' [' + (isMounted ? 'update' : 'mount') + ']';
  } else {
    // Composite component methods.
    return componentName + '.' + phase;
  }
};

var beginFiberMark = function (fiber, phase) {
  var componentName = getComponentName(fiber.type) || 'Unknown';
  var debugID = fiber._debugID;
  var isMounted = fiber.alternate !== null;
  var label = getFiberLabel(componentName, isMounted, phase);

  if (isCommitting && labelsInCurrentCommit.has(label)) {
    // During the commit phase, we don't show duplicate labels because
    // there is a fixed overhead for every measurement, and we don't
    // want to stretch the commit phase beyond necessary.
    return false;
  }
  labelsInCurrentCommit.add(label);

  var markName = getFiberMarkName(label, debugID);
  beginMark(markName);
  return true;
};

var clearFiberMark = function (fiber, phase) {
  var componentName = getComponentName(fiber.type) || 'Unknown';
  var debugID = fiber._debugID;
  var isMounted = fiber.alternate !== null;
  var label = getFiberLabel(componentName, isMounted, phase);
  var markName = getFiberMarkName(label, debugID);
  clearMark(markName);
};

var endFiberMark = function (fiber, phase, warning) {
  var componentName = getComponentName(fiber.type) || 'Unknown';
  var debugID = fiber._debugID;
  var isMounted = fiber.alternate !== null;
  var label = getFiberLabel(componentName, isMounted, phase);
  var markName = getFiberMarkName(label, debugID);
  endMark(label, markName, warning);
};

var shouldIgnoreFiber = function (fiber) {
  // Host components should be skipped in the timeline.
  // We could check typeof fiber.type, but does this work with RN?
  switch (fiber.tag) {
    case HostRoot:
    case HostComponent:
    case HostText:
    case HostPortal:
    case Fragment:
    case ContextProvider:
    case ContextConsumer:
    case Mode:
      return true;
    default:
      return false;
  }
};

var clearPendingPhaseMeasurement = function () {
  if (currentPhase !== null && currentPhaseFiber !== null) {
    clearFiberMark(currentPhaseFiber, currentPhase);
  }
  currentPhaseFiber = null;
  currentPhase = null;
  hasScheduledUpdateInCurrentPhase = false;
};

var pauseTimers = function () {
  // Stops all currently active measurements so that they can be resumed
  // if we continue in a later deferred loop from the same unit of work.
  var fiber = currentFiber;
  while (fiber) {
    if (fiber._debugIsCurrentlyTiming) {
      endFiberMark(fiber, null, null);
    }
    fiber = fiber.return;
  }
};

var resumeTimersRecursively = function (fiber) {
  if (fiber.return !== null) {
    resumeTimersRecursively(fiber.return);
  }
  if (fiber._debugIsCurrentlyTiming) {
    beginFiberMark(fiber, null);
  }
};

var resumeTimers = function () {
  // Resumes all measurements that were active during the last deferred loop.
  if (currentFiber !== null) {
    resumeTimersRecursively(currentFiber);
  }
};

function recordEffect() {
  if (enableUserTimingAPI) {
    effectCountInCurrentCommit++;
  }
}

function recordScheduleUpdate() {
  if (enableUserTimingAPI) {
    if (isCommitting) {
      hasScheduledUpdateInCurrentCommit = true;
    }
    if (currentPhase !== null && currentPhase !== 'componentWillMount' && currentPhase !== 'componentWillReceiveProps') {
      hasScheduledUpdateInCurrentPhase = true;
    }
  }
}

function startRequestCallbackTimer() {
  if (enableUserTimingAPI) {
    if (supportsUserTiming && !isWaitingForCallback) {
      isWaitingForCallback = true;
      beginMark('(Waiting for async callback...)');
    }
  }
}

function stopRequestCallbackTimer(didExpire) {
  if (enableUserTimingAPI) {
    if (supportsUserTiming) {
      isWaitingForCallback = false;
      var warning = didExpire ? 'Update expired; will flush synchronously' : null;
      endMark('(Waiting for async callback...)', '(Waiting for async callback...)', warning);
    }
  }
}

function startWorkTimer(fiber) {
  if (enableUserTimingAPI) {
    if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
      return;
    }
    // If we pause, this is the fiber to unwind from.
    currentFiber = fiber;
    if (!beginFiberMark(fiber, null)) {
      return;
    }
    fiber._debugIsCurrentlyTiming = true;
  }
}

function cancelWorkTimer(fiber) {
  if (enableUserTimingAPI) {
    if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
      return;
    }
    // Remember we shouldn't complete measurement for this fiber.
    // Otherwise flamechart will be deep even for small updates.
    fiber._debugIsCurrentlyTiming = false;
    clearFiberMark(fiber, null);
  }
}

function stopWorkTimer(fiber) {
  if (enableUserTimingAPI) {
    if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
      return;
    }
    // If we pause, its parent is the fiber to unwind from.
    currentFiber = fiber.return;
    if (!fiber._debugIsCurrentlyTiming) {
      return;
    }
    fiber._debugIsCurrentlyTiming = false;
    endFiberMark(fiber, null, null);
  }
}

function stopFailedWorkTimer(fiber) {
  if (enableUserTimingAPI) {
    if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
      return;
    }
    // If we pause, its parent is the fiber to unwind from.
    currentFiber = fiber.return;
    if (!fiber._debugIsCurrentlyTiming) {
      return;
    }
    fiber._debugIsCurrentlyTiming = false;
    var warning = fiber.tag === SuspenseComponent || fiber.tag === DehydratedSuspenseComponent ? 'Rendering was suspended' : 'An error was thrown inside this error boundary';
    endFiberMark(fiber, null, warning);
  }
}

function startPhaseTimer(fiber, phase) {
  if (enableUserTimingAPI) {
    if (!supportsUserTiming) {
      return;
    }
    clearPendingPhaseMeasurement();
    if (!beginFiberMark(fiber, phase)) {
      return;
    }
    currentPhaseFiber = fiber;
    currentPhase = phase;
  }
}

function stopPhaseTimer() {
  if (enableUserTimingAPI) {
    if (!supportsUserTiming) {
      return;
    }
    if (currentPhase !== null && currentPhaseFiber !== null) {
      var warning = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null;
      endFiberMark(currentPhaseFiber, currentPhase, warning);
    }
    currentPhase = null;
    currentPhaseFiber = null;
  }
}

function startWorkLoopTimer(nextUnitOfWork) {
  if (enableUserTimingAPI) {
    currentFiber = nextUnitOfWork;
    if (!supportsUserTiming) {
      return;
    }
    commitCountInCurrentWorkLoop = 0;
    // This is top level call.
    // Any other measurements are performed within.
    beginMark('(React Tree Reconciliation)');
    // Resume any measurements that were in progress during the last loop.
    resumeTimers();
  }
}

function stopWorkLoopTimer(interruptedBy, didCompleteRoot) {
  if (enableUserTimingAPI) {
    if (!supportsUserTiming) {
      return;
    }
    var warning = null;
    if (interruptedBy !== null) {
      if (interruptedBy.tag === HostRoot) {
        warning = 'A top-level update interrupted the previous render';
      } else {
        var componentName = getComponentName(interruptedBy.type) || 'Unknown';
        warning = 'An update to ' + componentName + ' interrupted the previous render';
      }
    } else if (commitCountInCurrentWorkLoop > 1) {
      warning = 'There were cascading updates';
    }
    commitCountInCurrentWorkLoop = 0;
    var label = didCompleteRoot ? '(React Tree Reconciliation: Completed Root)' : '(React Tree Reconciliation: Yielded)';
    // Pause any measurements until the next loop.
    pauseTimers();
    endMark(label, '(React Tree Reconciliation)', warning);
  }
}

function startCommitTimer() {
  if (enableUserTimingAPI) {
    if (!supportsUserTiming) {
      return;
    }
    isCommitting = true;
    hasScheduledUpdateInCurrentCommit = false;
    labelsInCurrentCommit.clear();
    beginMark('(Committing Changes)');
  }
}

function stopCommitTimer() {
  if (enableUserTimingAPI) {
    if (!supportsUserTiming) {
      return;
    }

    var warning = null;
    if (hasScheduledUpdateInCurrentCommit) {
      warning = 'Lifecycle hook scheduled a cascading update';
    } else if (commitCountInCurrentWorkLoop > 0) {
      warning = 'Caused by a cascading update in earlier commit';
    }
    hasScheduledUpdateInCurrentCommit = false;
    commitCountInCurrentWorkLoop++;
    isCommitting = false;
    labelsInCurrentCommit.clear();

    endMark('(Committing Changes)', '(Committing Changes)', warning);
  }
}

function startCommitSnapshotEffectsTimer() {
  if (enableUserTimingAPI) {
    if (!supportsUserTiming) {
      return;
    }
    effectCountInCurrentCommit = 0;
    beginMark('(Committing Snapshot Effects)');
  }
}

function stopCommitSnapshotEffectsTimer() {
  if (enableUserTimingAPI) {
    if (!supportsUserTiming) {
      return;
    }
    var count = effectCountInCurrentCommit;
    effectCountInCurrentCommit = 0;
    endMark('(Committing Snapshot Effects: ' + count + ' Total)', '(Committing Snapshot Effects)', null);
  }
}

function startCommitHostEffectsTimer() {
  if (enableUserTimingAPI) {
    if (!supportsUserTiming) {
      return;
    }
    effectCountInCurrentCommit = 0;
    beginMark('(Committing Host Effects)');
  }
}

function stopCommitHostEffectsTimer() {
  if (enableUserTimingAPI) {
    if (!supportsUserTiming) {
      return;
    }
    var count = effectCountInCurrentCommit;
    effectCountInCurrentCommit = 0;
    endMark('(Committing Host Effects: ' + count + ' Total)', '(Committing Host Effects)', null);
  }
}

function startCommitLifeCyclesTimer() {
  if (enableUserTimingAPI) {
    if (!supportsUserTiming) {
      return;
    }
    effectCountInCurrentCommit = 0;
    beginMark('(Calling Lifecycle Methods)');
  }
}

function stopCommitLifeCyclesTimer() {
  if (enableUserTimingAPI) {
    if (!supportsUserTiming) {
      return;
    }
    var count = effectCountInCurrentCommit;
    effectCountInCurrentCommit = 0;
    endMark('(Calling Lifecycle Methods: ' + count + ' Total)', '(Calling Lifecycle Methods)', null);
  }
}

var valueStack = [];

var fiberStack = void 0;

{
  fiberStack = [];
}

var index = -1;

function createCursor(defaultValue) {
  return {
    current: defaultValue
  };
}

function pop(cursor, fiber) {
  if (index < 0) {
    {
      warningWithoutStack$1(false, 'Unexpected pop.');
    }
    return;
  }

  {
    if (fiber !== fiberStack[index]) {
      warningWithoutStack$1(false, 'Unexpected Fiber popped.');
    }
  }

  cursor.current = valueStack[index];

  valueStack[index] = null;

  {
    fiberStack[index] = null;
  }

  index--;
}

function push(cursor, value, fiber) {
  index++;

  valueStack[index] = cursor.current;

  {
    fiberStack[index] = fiber;
  }

  cursor.current = value;
}

var warnedAboutMissingGetChildContext = void 0;

{
  warnedAboutMissingGetChildContext = {};
}

var emptyContextObject = {};
{
  Object.freeze(emptyContextObject);
}

// A cursor to the current merged context object on the stack.
var contextStackCursor = createCursor(emptyContextObject);
// A cursor to a boolean indicating whether the context has changed.
var didPerformWorkStackCursor = createCursor(false);
// Keep track of the previous context object that was on the stack.
// We use this to get access to the parent context after we have already
// pushed the next context provider, and now need to merge their contexts.
var previousContext = emptyContextObject;

function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {
  if (disableLegacyContext) {
    return emptyContextObject;
  } else {
    if (didPushOwnContextIfProvider && isContextProvider(Component)) {
      // If the fiber is a context provider itself, when we read its context
      // we may have already pushed its own child context on the stack. A context
      // provider should not "see" its own child context. Therefore we read the
      // previous (parent) context instead for a context provider.
      return previousContext;
    }
    return contextStackCursor.current;
  }
}

function cacheContext(workInProgress, unmaskedContext, maskedContext) {
  if (disableLegacyContext) {
    return;
  } else {
    var instance = workInProgress.stateNode;
    instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;
    instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
  }
}

function getMaskedContext(workInProgress, unmaskedContext) {
  if (disableLegacyContext) {
    return emptyContextObject;
  } else {
    var type = workInProgress.type;
    var contextTypes = type.contextTypes;
    if (!contextTypes) {
      return emptyContextObject;
    }

    // Avoid recreating masked context unless unmasked context has changed.
    // Failing to do this will result in unnecessary calls to componentWillReceiveProps.
    // This may trigger infinite loops if componentWillReceiveProps calls setState.
    var instance = workInProgress.stateNode;
    if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {
      return instance.__reactInternalMemoizedMaskedChildContext;
    }

    var context = {};
    for (var key in contextTypes) {
      context[key] = unmaskedContext[key];
    }

    {
      var name = getComponentName(type) || 'Unknown';
      checkPropTypes(contextTypes, context, 'context', name, getCurrentFiberStackInDev);
    }

    // Cache unmasked context so we can avoid recreating masked context unless necessary.
    // Context is created before the class component is instantiated so check for instance.
    if (instance) {
      cacheContext(workInProgress, unmaskedContext, context);
    }

    return context;
  }
}

function hasContextChanged() {
  if (disableLegacyContext) {
    return false;
  } else {
    return didPerformWorkStackCursor.current;
  }
}

function isContextProvider(type) {
  if (disableLegacyContext) {
    return false;
  } else {
    var childContextTypes = type.childContextTypes;
    return childContextTypes !== null && childContextTypes !== undefined;
  }
}

function popContext(fiber) {
  if (disableLegacyContext) {
    return;
  } else {
    pop(didPerformWorkStackCursor, fiber);
    pop(contextStackCursor, fiber);
  }
}

function popTopLevelContextObject(fiber) {
  if (disableLegacyContext) {
    return;
  } else {
    pop(didPerformWorkStackCursor, fiber);
    pop(contextStackCursor, fiber);
  }
}

function pushTopLevelContextObject(fiber, context, didChange) {
  if (disableLegacyContext) {
    return;
  } else {
    (function () {
      if (!(contextStackCursor.current === emptyContextObject)) {
        {
          throw ReactError(Error('Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.'));
        }
      }
    })();

    push(contextStackCursor, context, fiber);
    push(didPerformWorkStackCursor, didChange, fiber);
  }
}

function processChildContext(fiber, type, parentContext) {
  if (disableLegacyContext) {
    return parentContext;
  } else {
    var instance = fiber.stateNode;
    var childContextTypes = type.childContextTypes;

    // TODO (bvaughn) Replace this behavior with an invariant() in the future.
    // It has only been added in Fiber to match the (unintentional) behavior in Stack.
    if (typeof instance.getChildContext !== 'function') {
      {
        var componentName = getComponentName(type) || 'Unknown';

        if (!warnedAboutMissingGetChildContext[componentName]) {
          warnedAboutMissingGetChildContext[componentName] = true;
          warningWithoutStack$1(false, '%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);
        }
      }
      return parentContext;
    }

    var childContext = void 0;
    {
      setCurrentPhase('getChildContext');
    }
    startPhaseTimer(fiber, 'getChildContext');
    childContext = instance.getChildContext();
    stopPhaseTimer();
    {
      setCurrentPhase(null);
    }
    for (var contextKey in childContext) {
      (function () {
        if (!(contextKey in childContextTypes)) {
          {
            throw ReactError(Error((getComponentName(type) || 'Unknown') + '.getChildContext(): key "' + contextKey + '" is not defined in childContextTypes.'));
          }
        }
      })();
    }
    {
      var name = getComponentName(type) || 'Unknown';
      checkPropTypes(childContextTypes, childContext, 'child context', name,
      // In practice, there is one case in which we won't get a stack. It's when
      // somebody calls unstable_renderSubtreeIntoContainer() and we process
      // context from the parent component instance. The stack will be missing
      // because it's outside of the reconciliation, and so the pointer has not
      // been set. This is rare and doesn't matter. We'll also remove that API.
      getCurrentFiberStackInDev);
    }

    return _assign({}, parentContext, childContext);
  }
}

function pushContextProvider(workInProgress) {
  if (disableLegacyContext) {
    return false;
  } else {
    var instance = workInProgress.stateNode;
    // We push the context as early as possible to ensure stack integrity.
    // If the instance does not exist yet, we will push null at first,
    // and replace it on the stack later when invalidating the context.
    var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject;

    // Remember the parent context so we can merge with it later.
    // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.
    previousContext = contextStackCursor.current;
    push(contextStackCursor, memoizedMergedChildContext, workInProgress);
    push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);

    return true;
  }
}

function invalidateContextProvider(workInProgress, type, didChange) {
  if (disableLegacyContext) {
    return;
  } else {
    var instance = workInProgress.stateNode;
    (function () {
      if (!instance) {
        {
          throw ReactError(Error('Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.'));
        }
      }
    })();

    if (didChange) {
      // Merge parent and own context.
      // Skip this if we're not updating due to sCU.
      // This avoids unnecessarily recomputing memoized values.
      var mergedContext = processChildContext(workInProgress, type, previousContext);
      instance.__reactInternalMemoizedMergedChildContext = mergedContext;

      // Replace the old (or empty) context with the new one.
      // It is important to unwind the context in the reverse order.
      pop(didPerformWorkStackCursor, workInProgress);
      pop(contextStackCursor, workInProgress);
      // Now push the new context and mark that it has changed.
      push(contextStackCursor, mergedContext, workInProgress);
      push(didPerformWorkStackCursor, didChange, workInProgress);
    } else {
      pop(didPerformWorkStackCursor, workInProgress);
      push(didPerformWorkStackCursor, didChange, workInProgress);
    }
  }
}

function findCurrentUnmaskedContext(fiber) {
  if (disableLegacyContext) {
    return emptyContextObject;
  } else {
    // Currently this is only used with renderSubtreeIntoContainer; not sure if it
    // makes sense elsewhere
    (function () {
      if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) {
        {
          throw ReactError(Error('Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.'));
        }
      }
    })();

    var node = fiber;
    do {
      switch (node.tag) {
        case HostRoot:
          return node.stateNode.context;
        case ClassComponent:
          {
            var Component = node.type;
            if (isContextProvider(Component)) {
              return node.stateNode.__reactInternalMemoizedMergedChildContext;
            }
            break;
          }
      }
      node = node.return;
    } while (node !== null);
    (function () {
      {
        {
          throw ReactError(Error('Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.'));
        }
      }
    })();
  }
}

var LegacyRoot = 0;
var BatchedRoot = 1;
var ConcurrentRoot = 2;

// Intentionally not named imports because Rollup would use dynamic dispatch for
// CommonJS interop named imports.
var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority;
var Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback;
var Scheduler_cancelCallback = Scheduler.unstable_cancelCallback;
var Scheduler_shouldYield = Scheduler.unstable_shouldYield;
var Scheduler_requestPaint = Scheduler.unstable_requestPaint;
var Scheduler_now = Scheduler.unstable_now;
var Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel;
var Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority;
var Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;
var Scheduler_NormalPriority = Scheduler.unstable_NormalPriority;
var Scheduler_LowPriority = Scheduler.unstable_LowPriority;
var Scheduler_IdlePriority = Scheduler.unstable_IdlePriority;


if (enableSchedulerTracing) {
  // Provide explicit error message when production+profiling bundle of e.g.
  // react-dom is used with production (non-profiling) bundle of
  // scheduler/tracing
  (function () {
    if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {
      {
        throw ReactError(Error('It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling'));
      }
    }
  })();
}

var fakeCallbackNode = {};

// Except for NoPriority, these correspond to Scheduler priorities. We use
// ascending numbers so we can compare them like numbers. They start at 90 to
// avoid clashing with Scheduler's priorities.
var ImmediatePriority = 99;
var UserBlockingPriority$2 = 98;
var NormalPriority = 97;
var LowPriority = 96;
var IdlePriority = 95;
// NoPriority is the absence of priority. Also React-only.
var NoPriority = 90;

var shouldYield = Scheduler_shouldYield;
var requestPaint =
// Fall back gracefully if we're running an older version of Scheduler.
Scheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {};

var syncQueue = null;
var immediateQueueCallbackNode = null;
var isFlushingSyncQueue = false;
var initialTimeMs = Scheduler_now();

// If the initial timestamp is reasonably small, use Scheduler's `now` directly.
// This will be the case for modern browsers that support `performance.now`. In
// older browsers, Scheduler falls back to `Date.now`, which returns a Unix
// timestamp. In that case, subtract the module initialization time to simulate
// the behavior of performance.now and keep our times small enough to fit
// within 32 bits.
// TODO: Consider lifting this into Scheduler.
var now = initialTimeMs < 10000 ? Scheduler_now : function () {
  return Scheduler_now() - initialTimeMs;
};

function getCurrentPriorityLevel() {
  switch (Scheduler_getCurrentPriorityLevel()) {
    case Scheduler_ImmediatePriority:
      return ImmediatePriority;
    case Scheduler_UserBlockingPriority:
      return UserBlockingPriority$2;
    case Scheduler_NormalPriority:
      return NormalPriority;
    case Scheduler_LowPriority:
      return LowPriority;
    case Scheduler_IdlePriority:
      return IdlePriority;
    default:
      (function () {
        {
          {
            throw ReactError(Error('Unknown priority level.'));
          }
        }
      })();
  }
}

function reactPriorityToSchedulerPriority(reactPriorityLevel) {
  switch (reactPriorityLevel) {
    case ImmediatePriority:
      return Scheduler_ImmediatePriority;
    case UserBlockingPriority$2:
      return Scheduler_UserBlockingPriority;
    case NormalPriority:
      return Scheduler_NormalPriority;
    case LowPriority:
      return Scheduler_LowPriority;
    case IdlePriority:
      return Scheduler_IdlePriority;
    default:
      (function () {
        {
          {
            throw ReactError(Error('Unknown priority level.'));
          }
        }
      })();
  }
}

function runWithPriority$2(reactPriorityLevel, fn) {
  var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
  return Scheduler_runWithPriority(priorityLevel, fn);
}

function scheduleCallback(reactPriorityLevel, callback, options) {
  var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
  return Scheduler_scheduleCallback(priorityLevel, callback, options);
}

function scheduleSyncCallback(callback) {
  // Push this callback into an internal queue. We'll flush these either in
  // the next tick, or earlier if something calls `flushSyncCallbackQueue`.
  if (syncQueue === null) {
    syncQueue = [callback];
    // Flush the queue in the next tick, at the earliest.
    immediateQueueCallbackNode = Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueueImpl);
  } else {
    // Push onto existing queue. Don't need to schedule a callback because
    // we already scheduled one when we created the queue.
    syncQueue.push(callback);
  }
  return fakeCallbackNode;
}

function cancelCallback(callbackNode) {
  if (callbackNode !== fakeCallbackNode) {
    Scheduler_cancelCallback(callbackNode);
  }
}

function flushSyncCallbackQueue() {
  if (immediateQueueCallbackNode !== null) {
    Scheduler_cancelCallback(immediateQueueCallbackNode);
  }
  flushSyncCallbackQueueImpl();
}

function flushSyncCallbackQueueImpl() {
  if (!isFlushingSyncQueue && syncQueue !== null) {
    // Prevent re-entrancy.
    isFlushingSyncQueue = true;
    var i = 0;
    try {
      var _isSync = true;
      var queue = syncQueue;
      runWithPriority$2(ImmediatePriority, function () {
        for (; i < queue.length; i++) {
          var callback = queue[i];
          do {
            callback = callback(_isSync);
          } while (callback !== null);
        }
      });
      syncQueue = null;
    } catch (error) {
      // If something throws, leave the remaining callbacks on the queue.
      if (syncQueue !== null) {
        syncQueue = syncQueue.slice(i + 1);
      }
      // Resume flushing in the next tick
      Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue);
      throw error;
    } finally {
      isFlushingSyncQueue = false;
    }
  }
}

var NoMode = 0;
var StrictMode = 1;
// TODO: Remove BatchedMode and ConcurrentMode by reading from the root
// tag instead
var BatchedMode = 2;
var ConcurrentMode = 4;
var ProfileMode = 8;

// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
// Math.pow(2, 30) - 1
// 0b111111111111111111111111111111
var MAX_SIGNED_31_BIT_INT = 1073741823;

var NoWork = 0;
var Never = 1;
var Sync = MAX_SIGNED_31_BIT_INT;
var Batched = Sync - 1;

var UNIT_SIZE = 10;
var MAGIC_NUMBER_OFFSET = Batched - 1;

// 1 unit of expiration time represents 10ms.
function msToExpirationTime(ms) {
  // Always add an offset so that we don't clash with the magic number for NoWork.
  return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);
}

function expirationTimeToMs(expirationTime) {
  return (MAGIC_NUMBER_OFFSET - expirationTime) * UNIT_SIZE;
}

function ceiling(num, precision) {
  return ((num / precision | 0) + 1) * precision;
}

function computeExpirationBucket(currentTime, expirationInMs, bucketSizeMs) {
  return MAGIC_NUMBER_OFFSET - ceiling(MAGIC_NUMBER_OFFSET - currentTime + expirationInMs / UNIT_SIZE, bucketSizeMs / UNIT_SIZE);
}

// TODO: This corresponds to Scheduler's NormalPriority, not LowPriority. Update
// the names to reflect.
var LOW_PRIORITY_EXPIRATION = 5000;
var LOW_PRIORITY_BATCH_SIZE = 250;

function computeAsyncExpiration(currentTime) {
  return computeExpirationBucket(currentTime, LOW_PRIORITY_EXPIRATION, LOW_PRIORITY_BATCH_SIZE);
}

function computeSuspenseExpiration(currentTime, timeoutMs) {
  // TODO: Should we warn if timeoutMs is lower than the normal pri expiration time?
  return computeExpirationBucket(currentTime, timeoutMs, LOW_PRIORITY_BATCH_SIZE);
}

// We intentionally set a higher expiration time for interactive updates in
// dev than in production.
//
// If the main thread is being blocked so long that you hit the expiration,
// it's a problem that could be solved with better scheduling.
//
// People will be more likely to notice this and fix it with the long
// expiration time in development.
//
// In production we opt for better UX at the risk of masking scheduling
// problems, by expiring fast.
var HIGH_PRIORITY_EXPIRATION = 500;
var HIGH_PRIORITY_BATCH_SIZE = 100;

function computeInteractiveExpiration(currentTime) {
  return computeExpirationBucket(currentTime, HIGH_PRIORITY_EXPIRATION, HIGH_PRIORITY_BATCH_SIZE);
}

function inferPriorityFromExpirationTime(currentTime, expirationTime) {
  if (expirationTime === Sync) {
    return ImmediatePriority;
  }
  if (expirationTime === Never) {
    return IdlePriority;
  }
  var msUntil = expirationTimeToMs(expirationTime) - expirationTimeToMs(currentTime);
  if (msUntil <= 0) {
    return ImmediatePriority;
  }
  if (msUntil <= HIGH_PRIORITY_EXPIRATION + HIGH_PRIORITY_BATCH_SIZE) {
    return UserBlockingPriority$2;
  }
  if (msUntil <= LOW_PRIORITY_EXPIRATION + LOW_PRIORITY_BATCH_SIZE) {
    return NormalPriority;
  }

  // TODO: Handle LowPriority

  // Assume anything lower has idle priority
  return IdlePriority;
}

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

var lowPriorityWarning = function () {};

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

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

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

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

var lowPriorityWarning$1 = lowPriorityWarning;

var ReactStrictModeWarnings = {
  recordUnsafeLifecycleWarnings: function (fiber, instance) {},
  flushPendingUnsafeLifecycleWarnings: function () {},
  recordLegacyContextWarning: function (fiber, instance) {},
  flushLegacyContextWarning: function () {},
  discardPendingWarnings: function () {}
};

{
  var findStrictRoot = function (fiber) {
    var maybeStrictRoot = null;

    var node = fiber;
    while (node !== null) {
      if (node.mode & StrictMode) {
        maybeStrictRoot = node;
      }
      node = node.return;
    }

    return maybeStrictRoot;
  };

  var setToSortedString = function (set) {
    var array = [];
    set.forEach(function (value) {
      array.push(value);
    });
    return array.sort().join(', ');
  };

  var pendingComponentWillMountWarnings = [];
  var pendingUNSAFE_ComponentWillMountWarnings = [];
  var pendingComponentWillReceivePropsWarnings = [];
  var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
  var pendingComponentWillUpdateWarnings = [];
  var pendingUNSAFE_ComponentWillUpdateWarnings = [];

  // Tracks components we have already warned about.
  var didWarnAboutUnsafeLifecycles = new Set();

  ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {
    // Dedup strategy: Warn once per component.
    if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {
      return;
    }

    if (typeof instance.componentWillMount === 'function' &&
    // Don't warn about react-lifecycles-compat polyfilled components.
    instance.componentWillMount.__suppressDeprecationWarning !== true) {
      pendingComponentWillMountWarnings.push(fiber);
    }

    if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillMount === 'function') {
      pendingUNSAFE_ComponentWillMountWarnings.push(fiber);
    }

    if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
      pendingComponentWillReceivePropsWarnings.push(fiber);
    }

    if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
      pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);
    }

    if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
      pendingComponentWillUpdateWarnings.push(fiber);
    }

    if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {
      pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);
    }
  };

  ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {
    // We do an initial pass to gather component names
    var componentWillMountUniqueNames = new Set();
    if (pendingComponentWillMountWarnings.length > 0) {
      pendingComponentWillMountWarnings.forEach(function (fiber) {
        componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');
        didWarnAboutUnsafeLifecycles.add(fiber.type);
      });
      pendingComponentWillMountWarnings = [];
    }

    var UNSAFE_componentWillMountUniqueNames = new Set();
    if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {
      pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {
        UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');
        didWarnAboutUnsafeLifecycles.add(fiber.type);
      });
      pendingUNSAFE_ComponentWillMountWarnings = [];
    }

    var componentWillReceivePropsUniqueNames = new Set();
    if (pendingComponentWillReceivePropsWarnings.length > 0) {
      pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {
        componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');
        didWarnAboutUnsafeLifecycles.add(fiber.type);
      });

      pendingComponentWillReceivePropsWarnings = [];
    }

    var UNSAFE_componentWillReceivePropsUniqueNames = new Set();
    if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {
      pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {
        UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');
        didWarnAboutUnsafeLifecycles.add(fiber.type);
      });

      pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
    }

    var componentWillUpdateUniqueNames = new Set();
    if (pendingComponentWillUpdateWarnings.length > 0) {
      pendingComponentWillUpdateWarnings.forEach(function (fiber) {
        componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');
        didWarnAboutUnsafeLifecycles.add(fiber.type);
      });

      pendingComponentWillUpdateWarnings = [];
    }

    var UNSAFE_componentWillUpdateUniqueNames = new Set();
    if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {
      pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {
        UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');
        didWarnAboutUnsafeLifecycles.add(fiber.type);
      });

      pendingUNSAFE_ComponentWillUpdateWarnings = [];
    }

    // Finally, we flush all the warnings
    // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'
    if (UNSAFE_componentWillMountUniqueNames.size > 0) {
      var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);
      warningWithoutStack$1(false, 'Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://fb.me/react-async-component-lifecycle-hooks for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames);
    }

    if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {
      var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);
      warningWithoutStack$1(false, 'Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://fb.me/react-async-component-lifecycle-hooks for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + '\nPlease update the following components: %s', _sortedNames);
    }

    if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {
      var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);
      warningWithoutStack$1(false, 'Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://fb.me/react-async-component-lifecycle-hooks for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', _sortedNames2);
    }

    if (componentWillMountUniqueNames.size > 0) {
      var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);

      lowPriorityWarning$1(false, 'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-async-component-lifecycle-hooks for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames3);
    }

    if (componentWillReceivePropsUniqueNames.size > 0) {
      var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);

      lowPriorityWarning$1(false, 'componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-async-component-lifecycle-hooks for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames4);
    }

    if (componentWillUpdateUniqueNames.size > 0) {
      var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);

      lowPriorityWarning$1(false, 'componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-async-component-lifecycle-hooks for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames5);
    }
  };

  var pendingLegacyContextWarning = new Map();

  // Tracks components we have already warned about.
  var didWarnAboutLegacyContext = new Set();

  ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {
    var strictRoot = findStrictRoot(fiber);
    if (strictRoot === null) {
      warningWithoutStack$1(false, 'Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');
      return;
    }

    // Dedup strategy: Warn once per component.
    if (didWarnAboutLegacyContext.has(fiber.type)) {
      return;
    }

    var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);

    if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {
      if (warningsForRoot === undefined) {
        warningsForRoot = [];
        pendingLegacyContextWarning.set(strictRoot, warningsForRoot);
      }
      warningsForRoot.push(fiber);
    }
  };

  ReactStrictModeWarnings.flushLegacyContextWarning = function () {
    pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {
      var uniqueNames = new Set();
      fiberArray.forEach(function (fiber) {
        uniqueNames.add(getComponentName(fiber.type) || 'Component');
        didWarnAboutLegacyContext.add(fiber.type);
      });

      var sortedNames = setToSortedString(uniqueNames);
      var strictRootComponentStack = getStackByFiberInDevAndProd(strictRoot);

      warningWithoutStack$1(false, 'Legacy context API has been detected within a strict-mode tree: %s' + '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-legacy-context', strictRootComponentStack, sortedNames);
    });
  };

  ReactStrictModeWarnings.discardPendingWarnings = function () {
    pendingComponentWillMountWarnings = [];
    pendingUNSAFE_ComponentWillMountWarnings = [];
    pendingComponentWillReceivePropsWarnings = [];
    pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
    pendingComponentWillUpdateWarnings = [];
    pendingUNSAFE_ComponentWillUpdateWarnings = [];
    pendingLegacyContextWarning = new Map();
  };
}

// Resolves type to a family.


// Used by React Refresh runtime through DevTools Global Hook.


var resolveFamily = null;
// $FlowFixMe Flow gets confused by a WeakSet feature check below.
var failedBoundaries = null;

var setRefreshHandler = function (handler) {
  {
    resolveFamily = handler;
  }
};

function resolveFunctionForHotReloading(type) {
  {
    if (resolveFamily === null) {
      // Hot reloading is disabled.
      return type;
    }
    var family = resolveFamily(type);
    if (family === undefined) {
      return type;
    }
    // Use the latest known implementation.
    return family.current;
  }
}

function resolveClassForHotReloading(type) {
  // No implementation differences.
  return resolveFunctionForHotReloading(type);
}

function resolveForwardRefForHotReloading(type) {
  {
    if (resolveFamily === null) {
      // Hot reloading is disabled.
      return type;
    }
    var family = resolveFamily(type);
    if (family === undefined) {
      // Check if we're dealing with a real forwardRef. Don't want to crash early.
      if (type !== null && type !== undefined && typeof type.render === 'function') {
        // ForwardRef is special because its resolved .type is an object,
        // but it's possible that we only have its inner render function in the map.
        // If that inner render function is different, we'll build a new forwardRef type.
        var currentRender = resolveFunctionForHotReloading(type.render);
        if (type.render !== currentRender) {
          var syntheticType = {
            $$typeof: REACT_FORWARD_REF_TYPE,
            render: currentRender
          };
          if (type.displayName !== undefined) {
            syntheticType.displayName = type.displayName;
          }
          return syntheticType;
        }
      }
      return type;
    }
    // Use the latest known implementation.
    return family.current;
  }
}

function isCompatibleFamilyForHotReloading(fiber, element) {
  {
    if (resolveFamily === null) {
      // Hot reloading is disabled.
      return false;
    }

    var prevType = fiber.elementType;
    var nextType = element.type;

    // If we got here, we know types aren't === equal.
    var needsCompareFamilies = false;

    var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;

    switch (fiber.tag) {
      case ClassComponent:
        {
          if (typeof nextType === 'function') {
            needsCompareFamilies = true;
          }
          break;
        }
      case FunctionComponent:
        {
          if (typeof nextType === 'function') {
            needsCompareFamilies = true;
          } else if ($$typeofNextType === REACT_LAZY_TYPE) {
            // We don't know the inner type yet.
            // We're going to assume that the lazy inner type is stable,
            // and so it is sufficient to avoid reconciling it away.
            // We're not going to unwrap or actually use the new lazy type.
            needsCompareFamilies = true;
          }
          break;
        }
      case ForwardRef:
        {
          if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {
            needsCompareFamilies = true;
          } else if ($$typeofNextType === REACT_LAZY_TYPE) {
            needsCompareFamilies = true;
          }
          break;
        }
      case MemoComponent:
      case SimpleMemoComponent:
        {
          if ($$typeofNextType === REACT_MEMO_TYPE) {
            // TODO: if it was but can no longer be simple,
            // we shouldn't set this.
            needsCompareFamilies = true;
          } else if ($$typeofNextType === REACT_LAZY_TYPE) {
            needsCompareFamilies = true;
          }
          break;
        }
      default:
        return false;
    }

    // Check if both types have a family and it's the same one.
    if (needsCompareFamilies) {
      // Note: memo() and forwardRef() we'll compare outer rather than inner type.
      // This means both of them need to be registered to preserve state.
      // If we unwrapped and compared the inner types for wrappers instead,
      // then we would risk falsely saying two separate memo(Foo)
      // calls are equivalent because they wrap the same Foo function.
      var prevFamily = resolveFamily(prevType);
      if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {
        return true;
      }
    }
    return false;
  }
}

function markFailedErrorBoundaryForHotReloading(fiber) {
  {
    if (resolveFamily === null) {
      // Hot reloading is disabled.
      return;
    }
    if (typeof WeakSet !== 'function') {
      return;
    }
    if (failedBoundaries === null) {
      failedBoundaries = new WeakSet();
    }
    failedBoundaries.add(fiber);
  }
}

var scheduleRefresh = function (root, update) {
  {
    if (resolveFamily === null) {
      // Hot reloading is disabled.
      return;
    }
    var _staleFamilies = update.staleFamilies,
        _updatedFamilies = update.updatedFamilies;

    flushPassiveEffects();
    flushSync(function () {
      scheduleFibersWithFamiliesRecursively(root.current, _updatedFamilies, _staleFamilies);
    });
  }
};

var scheduleRoot = function (root, element) {
  {
    if (root.context !== emptyContextObject) {
      // Super edge case: root has a legacy _renderSubtree context
      // but we don't know the parentComponent so we can't pass it.
      // Just ignore. We'll delete this with _renderSubtree code path later.
      return;
    }
    flushPassiveEffects();
    updateContainerAtExpirationTime(element, root, null, Sync, null);
  }
};

function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
  {
    var alternate = fiber.alternate,
        child = fiber.child,
        sibling = fiber.sibling,
        tag = fiber.tag,
        type = fiber.type;


    var candidateType = null;
    switch (tag) {
      case FunctionComponent:
      case SimpleMemoComponent:
      case ClassComponent:
        candidateType = type;
        break;
      case ForwardRef:
        candidateType = type.render;
        break;
      default:
        break;
    }

    if (resolveFamily === null) {
      throw new Error('Expected resolveFamily to be set during hot reload.');
    }

    var needsRender = false;
    var needsRemount = false;
    if (candidateType !== null) {
      var family = resolveFamily(candidateType);
      if (family !== undefined) {
        if (staleFamilies.has(family)) {
          needsRemount = true;
        } else if (updatedFamilies.has(family)) {
          needsRender = true;
        }
      }
    }
    if (failedBoundaries !== null) {
      if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {
        needsRemount = true;
      }
    }

    if (needsRemount) {
      fiber._debugNeedsRemount = true;
    }
    if (needsRemount || needsRender) {
      scheduleWork(fiber, Sync);
    }
    if (child !== null && !needsRemount) {
      scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);
    }
    if (sibling !== null) {
      scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);
    }
  }
}

var findHostInstancesForRefresh = function (root, families) {
  {
    var hostInstances = new Set();
    var types = new Set(families.map(function (family) {
      return family.current;
    }));
    findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);
    return hostInstances;
  }
};

function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {
  {
    var child = fiber.child,
        sibling = fiber.sibling,
        tag = fiber.tag,
        type = fiber.type;


    var candidateType = null;
    switch (tag) {
      case FunctionComponent:
      case SimpleMemoComponent:
      case ClassComponent:
        candidateType = type;
        break;
      case ForwardRef:
        candidateType = type.render;
        break;
      default:
        break;
    }

    var didMatch = false;
    if (candidateType !== null) {
      if (types.has(candidateType)) {
        didMatch = true;
      }
    }

    if (didMatch) {
      // We have a match. This only drills down to the closest host components.
      // There's no need to search deeper because for the purpose of giving
      // visual feedback, "flashing" outermost parent rectangles is sufficient.
      findHostInstancesForFiberShallowly(fiber, hostInstances);
    } else {
      // If there's no match, maybe there will be one further down in the child tree.
      if (child !== null) {
        findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);
      }
    }

    if (sibling !== null) {
      findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);
    }
  }
}

function findHostInstancesForFiberShallowly(fiber, hostInstances) {
  {
    var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);
    if (foundHostInstances) {
      return;
    }
    // If we didn't find any host children, fallback to closest host parent.
    var node = fiber;
    while (true) {
      switch (node.tag) {
        case HostComponent:
          hostInstances.add(node.stateNode);
          return;
        case HostPortal:
          hostInstances.add(node.stateNode.containerInfo);
          return;
        case HostRoot:
          hostInstances.add(node.stateNode.containerInfo);
          return;
      }
      if (node.return === null) {
        throw new Error('Expected to reach root first.');
      }
      node = node.return;
    }
  }
}

function findChildHostInstancesForFiberShallowly(fiber, hostInstances) {
  {
    var node = fiber;
    var foundHostInstances = false;
    while (true) {
      if (node.tag === HostComponent) {
        // We got a match.
        foundHostInstances = true;
        hostInstances.add(node.stateNode);
        // There may still be more, so keep searching.
      } else if (node.child !== null) {
        node.child.return = node;
        node = node.child;
        continue;
      }
      if (node === fiber) {
        return foundHostInstances;
      }
      while (node.sibling === null) {
        if (node.return === null || node.return === fiber) {
          return foundHostInstances;
        }
        node = node.return;
      }
      node.sibling.return = node.return;
      node = node.sibling;
    }
  }
  return false;
}

function resolveDefaultProps(Component, baseProps) {
  if (Component && Component.defaultProps) {
    // Resolve default props. Taken from ReactElement
    var props = _assign({}, baseProps);
    var defaultProps = Component.defaultProps;
    for (var propName in defaultProps) {
      if (props[propName] === undefined) {
        props[propName] = defaultProps[propName];
      }
    }
    return props;
  }
  return baseProps;
}

function readLazyComponentType(lazyComponent) {
  var status = lazyComponent._status;
  var result = lazyComponent._result;
  switch (status) {
    case Resolved:
      {
        var Component = result;
        return Component;
      }
    case Rejected:
      {
        var error = result;
        throw error;
      }
    case Pending:
      {
        var thenable = result;
        throw thenable;
      }
    default:
      {
        lazyComponent._status = Pending;
        var ctor = lazyComponent._ctor;
        var _thenable = ctor();
        _thenable.then(function (moduleObject) {
          if (lazyComponent._status === Pending) {
            var defaultExport = moduleObject.default;
            {
              if (defaultExport === undefined) {
                warning$1(false, 'lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n  ' + "const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
              }
            }
            lazyComponent._status = Resolved;
            lazyComponent._result = defaultExport;
          }
        }, function (error) {
          if (lazyComponent._status === Pending) {
            lazyComponent._status = Rejected;
            lazyComponent._result = error;
          }
        });
        // Handle synchronous thenables.
        switch (lazyComponent._status) {
          case Resolved:
            return lazyComponent._result;
          case Rejected:
            throw lazyComponent._result;
        }
        lazyComponent._result = _thenable;
        throw _thenable;
      }
  }
}

var valueCursor = createCursor(null);

var rendererSigil = void 0;
{
  // Use this to detect multiple renderers using the same context
  rendererSigil = {};
}

var currentlyRenderingFiber = null;
var lastContextDependency = null;
var lastContextWithAllBitsObserved = null;

var isDisallowedContextReadInDEV = false;

function resetContextDependencies() {
  // This is called right before React yields execution, to ensure `readContext`
  // cannot be called outside the render phase.
  currentlyRenderingFiber = null;
  lastContextDependency = null;
  lastContextWithAllBitsObserved = null;
  {
    isDisallowedContextReadInDEV = false;
  }
}

function enterDisallowedContextReadInDEV() {
  {
    isDisallowedContextReadInDEV = true;
  }
}

function exitDisallowedContextReadInDEV() {
  {
    isDisallowedContextReadInDEV = false;
  }
}

function pushProvider(providerFiber, nextValue) {
  var context = providerFiber.type._context;

  if (isPrimaryRenderer) {
    push(valueCursor, context._currentValue, providerFiber);

    context._currentValue = nextValue;
    {
      !(context._currentRenderer === undefined || context._currentRenderer === null || context._currentRenderer === rendererSigil) ? warningWithoutStack$1(false, 'Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.') : void 0;
      context._currentRenderer = rendererSigil;
    }
  } else {
    push(valueCursor, context._currentValue2, providerFiber);

    context._currentValue2 = nextValue;
    {
      !(context._currentRenderer2 === undefined || context._currentRenderer2 === null || context._currentRenderer2 === rendererSigil) ? warningWithoutStack$1(false, 'Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.') : void 0;
      context._currentRenderer2 = rendererSigil;
    }
  }
}

function popProvider(providerFiber) {
  var currentValue = valueCursor.current;

  pop(valueCursor, providerFiber);

  var context = providerFiber.type._context;
  if (isPrimaryRenderer) {
    context._currentValue = currentValue;
  } else {
    context._currentValue2 = currentValue;
  }
}

function calculateChangedBits(context, newValue, oldValue) {
  if (is(oldValue, newValue)) {
    // No change
    return 0;
  } else {
    var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;

    {
      !((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits) ? warning$1(false, 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits) : void 0;
    }
    return changedBits | 0;
  }
}

function scheduleWorkOnParentPath(parent, renderExpirationTime) {
  // Update the child expiration time of all the ancestors, including
  // the alternates.
  var node = parent;
  while (node !== null) {
    var alternate = node.alternate;
    if (node.childExpirationTime < renderExpirationTime) {
      node.childExpirationTime = renderExpirationTime;
      if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {
        alternate.childExpirationTime = renderExpirationTime;
      }
    } else if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {
      alternate.childExpirationTime = renderExpirationTime;
    } else {
      // Neither alternate was updated, which means the rest of the
      // ancestor path already has sufficient priority.
      break;
    }
    node = node.return;
  }
}

function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) {
  var fiber = workInProgress.child;
  if (fiber !== null) {
    // Set the return pointer of the child to the work-in-progress fiber.
    fiber.return = workInProgress;
  }
  while (fiber !== null) {
    var nextFiber = void 0;

    // Visit this fiber.
    var list = fiber.dependencies;
    if (list !== null) {
      nextFiber = fiber.child;

      var dependency = list.firstContext;
      while (dependency !== null) {
        // Check if the context matches.
        if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) {
          // Match! Schedule an update on this fiber.

          if (fiber.tag === ClassComponent) {
            // Schedule a force update on the work-in-progress.
            var update = createUpdate(renderExpirationTime, null);
            update.tag = ForceUpdate;
            // TODO: Because we don't have a work-in-progress, this will add the
            // update to the current fiber, too, which means it will persist even if
            // this render is thrown away. Since it's a race condition, not sure it's
            // worth fixing.
            enqueueUpdate(fiber, update);
          }

          if (fiber.expirationTime < renderExpirationTime) {
            fiber.expirationTime = renderExpirationTime;
          }
          var alternate = fiber.alternate;
          if (alternate !== null && alternate.expirationTime < renderExpirationTime) {
            alternate.expirationTime = renderExpirationTime;
          }

          scheduleWorkOnParentPath(fiber.return, renderExpirationTime);

          // Mark the expiration time on the list, too.
          if (list.expirationTime < renderExpirationTime) {
            list.expirationTime = renderExpirationTime;
          }

          // Since we already found a match, we can stop traversing the
          // dependency list.
          break;
        }
        dependency = dependency.next;
      }
    } else if (fiber.tag === ContextProvider) {
      // Don't scan deeper if this is a matching provider
      nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
    } else if (enableSuspenseServerRenderer && fiber.tag === DehydratedSuspenseComponent) {
      // If a dehydrated suspense component is in this subtree, we don't know
      // if it will have any context consumers in it. The best we can do is
      // mark it as having updates on its children.
      if (fiber.expirationTime < renderExpirationTime) {
        fiber.expirationTime = renderExpirationTime;
      }
      var _alternate = fiber.alternate;
      if (_alternate !== null && _alternate.expirationTime < renderExpirationTime) {
        _alternate.expirationTime = renderExpirationTime;
      }
      // This is intentionally passing this fiber as the parent
      // because we want to schedule this fiber as having work
      // on its children. We'll use the childExpirationTime on
      // this fiber to indicate that a context has changed.
      scheduleWorkOnParentPath(fiber, renderExpirationTime);
      nextFiber = fiber.sibling;
    } else {
      // Traverse down.
      nextFiber = fiber.child;
    }

    if (nextFiber !== null) {
      // Set the return pointer of the child to the work-in-progress fiber.
      nextFiber.return = fiber;
    } else {
      // No child. Traverse to next sibling.
      nextFiber = fiber;
      while (nextFiber !== null) {
        if (nextFiber === workInProgress) {
          // We're back to the root of this subtree. Exit.
          nextFiber = null;
          break;
        }
        var sibling = nextFiber.sibling;
        if (sibling !== null) {
          // Set the return pointer of the sibling to the work-in-progress fiber.
          sibling.return = nextFiber.return;
          nextFiber = sibling;
          break;
        }
        // No more siblings. Traverse up.
        nextFiber = nextFiber.return;
      }
    }
    fiber = nextFiber;
  }
}

function prepareToReadContext(workInProgress, renderExpirationTime) {
  currentlyRenderingFiber = workInProgress;
  lastContextDependency = null;
  lastContextWithAllBitsObserved = null;

  var dependencies = workInProgress.dependencies;
  if (dependencies !== null) {
    var firstContext = dependencies.firstContext;
    if (firstContext !== null) {
      if (dependencies.expirationTime >= renderExpirationTime) {
        // Context list has a pending update. Mark that this fiber performed work.
        markWorkInProgressReceivedUpdate();
      }
      // Reset the work-in-progress list
      dependencies.firstContext = null;
    }
  }
}

function readContext(context, observedBits) {
  {
    // This warning would fire if you read context inside a Hook like useMemo.
    // Unlike the class check below, it's not enforced in production for perf.
    !!isDisallowedContextReadInDEV ? warning$1(false, 'Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().') : void 0;
  }

  if (lastContextWithAllBitsObserved === context) {
    // Nothing to do. We already observe everything in this context.
  } else if (observedBits === false || observedBits === 0) {
    // Do not observe any updates.
  } else {
    var resolvedObservedBits = void 0; // Avoid deopting on observable arguments or heterogeneous types.
    if (typeof observedBits !== 'number' || observedBits === MAX_SIGNED_31_BIT_INT) {
      // Observe all updates.
      lastContextWithAllBitsObserved = context;
      resolvedObservedBits = MAX_SIGNED_31_BIT_INT;
    } else {
      resolvedObservedBits = observedBits;
    }

    var contextItem = {
      context: context,
      observedBits: resolvedObservedBits,
      next: null
    };

    if (lastContextDependency === null) {
      (function () {
        if (!(currentlyRenderingFiber !== null)) {
          {
            throw ReactError(Error('Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().'));
          }
        }
      })();

      // This is the first dependency for this component. Create a new list.
      lastContextDependency = contextItem;
      currentlyRenderingFiber.dependencies = {
        expirationTime: NoWork,
        firstContext: contextItem,
        responders: null
      };
    } else {
      // Append a new context item.
      lastContextDependency = lastContextDependency.next = contextItem;
    }
  }
  return isPrimaryRenderer ? context._currentValue : context._currentValue2;
}

// UpdateQueue is a linked list of prioritized updates.
//
// Like fibers, update queues come in pairs: a current queue, which represents
// the visible state of the screen, and a work-in-progress queue, which can be
// mutated and processed asynchronously before it is committed — a form of
// double buffering. If a work-in-progress render is discarded before finishing,
// we create a new work-in-progress by cloning the current queue.
//
// Both queues share a persistent, singly-linked list structure. To schedule an
// update, we append it to the end of both queues. Each queue maintains a
// pointer to first update in the persistent list that hasn't been processed.
// The work-in-progress pointer always has a position equal to or greater than
// the current queue, since we always work on that one. The current queue's
// pointer is only updated during the commit phase, when we swap in the
// work-in-progress.
//
// For example:
//
//   Current pointer:           A - B - C - D - E - F
//   Work-in-progress pointer:              D - E - F
//                                          ^
//                                          The work-in-progress queue has
//                                          processed more updates than current.
//
// The reason we append to both queues is because otherwise we might drop
// updates without ever processing them. For example, if we only add updates to
// the work-in-progress queue, some updates could be lost whenever a work-in
// -progress render restarts by cloning from current. Similarly, if we only add
// updates to the current queue, the updates will be lost whenever an already
// in-progress queue commits and swaps with the current queue. However, by
// adding to both queues, we guarantee that the update will be part of the next
// work-in-progress. (And because the work-in-progress queue becomes the
// current queue once it commits, there's no danger of applying the same
// update twice.)
//
// Prioritization
// --------------
//
// Updates are not sorted by priority, but by insertion; new updates are always
// appended to the end of the list.
//
// The priority is still important, though. When processing the update queue
// during the render phase, only the updates with sufficient priority are
// included in the result. If we skip an update because it has insufficient
// priority, it remains in the queue to be processed later, during a lower
// priority render. Crucially, all updates subsequent to a skipped update also
// remain in the queue *regardless of their priority*. That means high priority
// updates are sometimes processed twice, at two separate priorities. We also
// keep track of a base state, that represents the state before the first
// update in the queue is applied.
//
// For example:
//
//   Given a base state of '', and the following queue of updates
//
//     A1 - B2 - C1 - D2
//
//   where the number indicates the priority, and the update is applied to the
//   previous state by appending a letter, React will process these updates as
//   two separate renders, one per distinct priority level:
//
//   First render, at priority 1:
//     Base state: ''
//     Updates: [A1, C1]
//     Result state: 'AC'
//
//   Second render, at priority 2:
//     Base state: 'A'            <-  The base state does not include C1,
//                                    because B2 was skipped.
//     Updates: [B2, C1, D2]      <-  C1 was rebased on top of B2
//     Result state: 'ABCD'
//
// Because we process updates in insertion order, and rebase high priority
// updates when preceding updates are skipped, the final result is deterministic
// regardless of priority. Intermediate state may vary according to system
// resources, but the final state is always the same.

var UpdateState = 0;
var ReplaceState = 1;
var ForceUpdate = 2;
var CaptureUpdate = 3;

// Global state that is reset at the beginning of calling `processUpdateQueue`.
// It should only be read right after calling `processUpdateQueue`, via
// `checkHasForceUpdateAfterProcessing`.
var hasForceUpdate = false;

var didWarnUpdateInsideUpdate = void 0;
var currentlyProcessingQueue = void 0;

{
  didWarnUpdateInsideUpdate = false;
  currentlyProcessingQueue = null;
  
}

function createUpdateQueue(baseState) {
  var queue = {
    baseState: baseState,
    firstUpdate: null,
    lastUpdate: null,
    firstCapturedUpdate: null,
    lastCapturedUpdate: null,
    firstEffect: null,
    lastEffect: null,
    firstCapturedEffect: null,
    lastCapturedEffect: null
  };
  return queue;
}

function cloneUpdateQueue(currentQueue) {
  var queue = {
    baseState: currentQueue.baseState,
    firstUpdate: currentQueue.firstUpdate,
    lastUpdate: currentQueue.lastUpdate,

    // TODO: With resuming, if we bail out and resuse the child tree, we should
    // keep these effects.
    firstCapturedUpdate: null,
    lastCapturedUpdate: null,

    firstEffect: null,
    lastEffect: null,

    firstCapturedEffect: null,
    lastCapturedEffect: null
  };
  return queue;
}

function createUpdate(expirationTime, suspenseConfig) {
  var update = {
    expirationTime: expirationTime,
    suspenseConfig: suspenseConfig,

    tag: UpdateState,
    payload: null,
    callback: null,

    next: null,
    nextEffect: null
  };
  {
    update.priority = getCurrentPriorityLevel();
  }
  return update;
}

function appendUpdateToQueue(queue, update) {
  // Append the update to the end of the list.
  if (queue.lastUpdate === null) {
    // Queue is empty
    queue.firstUpdate = queue.lastUpdate = update;
  } else {
    queue.lastUpdate.next = update;
    queue.lastUpdate = update;
  }
}

function enqueueUpdate(fiber, update) {
  // Update queues are created lazily.
  var alternate = fiber.alternate;
  var queue1 = void 0;
  var queue2 = void 0;
  if (alternate === null) {
    // There's only one fiber.
    queue1 = fiber.updateQueue;
    queue2 = null;
    if (queue1 === null) {
      queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState);
    }
  } else {
    // There are two owners.
    queue1 = fiber.updateQueue;
    queue2 = alternate.updateQueue;
    if (queue1 === null) {
      if (queue2 === null) {
        // Neither fiber has an update queue. Create new ones.
        queue1 = fiber.updateQueue = createUpdateQueue(fiber.memoizedState);
        queue2 = alternate.updateQueue = createUpdateQueue(alternate.memoizedState);
      } else {
        // Only one fiber has an update queue. Clone to create a new one.
        queue1 = fiber.updateQueue = cloneUpdateQueue(queue2);
      }
    } else {
      if (queue2 === null) {
        // Only one fiber has an update queue. Clone to create a new one.
        queue2 = alternate.updateQueue = cloneUpdateQueue(queue1);
      } else {
        // Both owners have an update queue.
      }
    }
  }
  if (queue2 === null || queue1 === queue2) {
    // There's only a single queue.
    appendUpdateToQueue(queue1, update);
  } else {
    // There are two queues. We need to append the update to both queues,
    // while accounting for the persistent structure of the list — we don't
    // want the same update to be added multiple times.
    if (queue1.lastUpdate === null || queue2.lastUpdate === null) {
      // One of the queues is not empty. We must add the update to both queues.
      appendUpdateToQueue(queue1, update);
      appendUpdateToQueue(queue2, update);
    } else {
      // Both queues are non-empty. The last update is the same in both lists,
      // because of structural sharing. So, only append to one of the lists.
      appendUpdateToQueue(queue1, update);
      // But we still need to update the `lastUpdate` pointer of queue2.
      queue2.lastUpdate = update;
    }
  }

  {
    if (fiber.tag === ClassComponent && (currentlyProcessingQueue === queue1 || queue2 !== null && currentlyProcessingQueue === queue2) && !didWarnUpdateInsideUpdate) {
      warningWithoutStack$1(false, 'An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');
      didWarnUpdateInsideUpdate = true;
    }
  }
}

function enqueueCapturedUpdate(workInProgress, update) {
  // Captured updates go into a separate list, and only on the work-in-
  // progress queue.
  var workInProgressQueue = workInProgress.updateQueue;
  if (workInProgressQueue === null) {
    workInProgressQueue = workInProgress.updateQueue = createUpdateQueue(workInProgress.memoizedState);
  } else {
    // TODO: I put this here rather than createWorkInProgress so that we don't
    // clone the queue unnecessarily. There's probably a better way to
    // structure this.
    workInProgressQueue = ensureWorkInProgressQueueIsAClone(workInProgress, workInProgressQueue);
  }

  // Append the update to the end of the list.
  if (workInProgressQueue.lastCapturedUpdate === null) {
    // This is the first render phase update
    workInProgressQueue.firstCapturedUpdate = workInProgressQueue.lastCapturedUpdate = update;
  } else {
    workInProgressQueue.lastCapturedUpdate.next = update;
    workInProgressQueue.lastCapturedUpdate = update;
  }
}

function ensureWorkInProgressQueueIsAClone(workInProgress, queue) {
  var current = workInProgress.alternate;
  if (current !== null) {
    // If the work-in-progress queue is equal to the current queue,
    // we need to clone it first.
    if (queue === current.updateQueue) {
      queue = workInProgress.updateQueue = cloneUpdateQueue(queue);
    }
  }
  return queue;
}

function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
  switch (update.tag) {
    case ReplaceState:
      {
        var _payload = update.payload;
        if (typeof _payload === 'function') {
          // Updater function
          {
            enterDisallowedContextReadInDEV();
            if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
              _payload.call(instance, prevState, nextProps);
            }
          }
          var nextState = _payload.call(instance, prevState, nextProps);
          {
            exitDisallowedContextReadInDEV();
          }
          return nextState;
        }
        // State object
        return _payload;
      }
    case CaptureUpdate:
      {
        workInProgress.effectTag = workInProgress.effectTag & ~ShouldCapture | DidCapture;
      }
    // Intentional fallthrough
    case UpdateState:
      {
        var _payload2 = update.payload;
        var partialState = void 0;
        if (typeof _payload2 === 'function') {
          // Updater function
          {
            enterDisallowedContextReadInDEV();
            if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
              _payload2.call(instance, prevState, nextProps);
            }
          }
          partialState = _payload2.call(instance, prevState, nextProps);
          {
            exitDisallowedContextReadInDEV();
          }
        } else {
          // Partial state object
          partialState = _payload2;
        }
        if (partialState === null || partialState === undefined) {
          // Null and undefined are treated as no-ops.
          return prevState;
        }
        // Merge the partial state and the previous state.
        return _assign({}, prevState, partialState);
      }
    case ForceUpdate:
      {
        hasForceUpdate = true;
        return prevState;
      }
  }
  return prevState;
}

function processUpdateQueue(workInProgress, queue, props, instance, renderExpirationTime) {
  hasForceUpdate = false;

  queue = ensureWorkInProgressQueueIsAClone(workInProgress, queue);

  {
    currentlyProcessingQueue = queue;
  }

  // These values may change as we process the queue.
  var newBaseState = queue.baseState;
  var newFirstUpdate = null;
  var newExpirationTime = NoWork;

  // Iterate through the list of updates to compute the result.
  var update = queue.firstUpdate;
  var resultState = newBaseState;
  while (update !== null) {
    var updateExpirationTime = update.expirationTime;
    if (updateExpirationTime < renderExpirationTime) {
      // This update does not have sufficient priority. Skip it.
      if (newFirstUpdate === null) {
        // This is the first skipped update. It will be the first update in
        // the new list.
        newFirstUpdate = update;
        // Since this is the first update that was skipped, the current result
        // is the new base state.
        newBaseState = resultState;
      }
      // Since this update will remain in the list, update the remaining
      // expiration time.
      if (newExpirationTime < updateExpirationTime) {
        newExpirationTime = updateExpirationTime;
      }
    } else {
      // This update does have sufficient priority.

      // Mark the event time of this update as relevant to this render pass.
      // TODO: This should ideally use the true event time of this update rather than
      // its priority which is a derived and not reverseable value.
      // TODO: We should skip this update if it was already committed but currently
      // we have no way of detecting the difference between a committed and suspended
      // update here.
      markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig);

      // Process it and compute a new result.
      resultState = getStateFromUpdate(workInProgress, queue, update, resultState, props, instance);
      var _callback = update.callback;
      if (_callback !== null) {
        workInProgress.effectTag |= Callback;
        // Set this to null, in case it was mutated during an aborted render.
        update.nextEffect = null;
        if (queue.lastEffect === null) {
          queue.firstEffect = queue.lastEffect = update;
        } else {
          queue.lastEffect.nextEffect = update;
          queue.lastEffect = update;
        }
      }
    }
    // Continue to the next update.
    update = update.next;
  }

  // Separately, iterate though the list of captured updates.
  var newFirstCapturedUpdate = null;
  update = queue.firstCapturedUpdate;
  while (update !== null) {
    var _updateExpirationTime = update.expirationTime;
    if (_updateExpirationTime < renderExpirationTime) {
      // This update does not have sufficient priority. Skip it.
      if (newFirstCapturedUpdate === null) {
        // This is the first skipped captured update. It will be the first
        // update in the new list.
        newFirstCapturedUpdate = update;
        // If this is the first update that was skipped, the current result is
        // the new base state.
        if (newFirstUpdate === null) {
          newBaseState = resultState;
        }
      }
      // Since this update will remain in the list, update the remaining
      // expiration time.
      if (newExpirationTime < _updateExpirationTime) {
        newExpirationTime = _updateExpirationTime;
      }
    } else {
      // This update does have sufficient priority. Process it and compute
      // a new result.
      resultState = getStateFromUpdate(workInProgress, queue, update, resultState, props, instance);
      var _callback2 = update.callback;
      if (_callback2 !== null) {
        workInProgress.effectTag |= Callback;
        // Set this to null, in case it was mutated during an aborted render.
        update.nextEffect = null;
        if (queue.lastCapturedEffect === null) {
          queue.firstCapturedEffect = queue.lastCapturedEffect = update;
        } else {
          queue.lastCapturedEffect.nextEffect = update;
          queue.lastCapturedEffect = update;
        }
      }
    }
    update = update.next;
  }

  if (newFirstUpdate === null) {
    queue.lastUpdate = null;
  }
  if (newFirstCapturedUpdate === null) {
    queue.lastCapturedUpdate = null;
  } else {
    workInProgress.effectTag |= Callback;
  }
  if (newFirstUpdate === null && newFirstCapturedUpdate === null) {
    // We processed every update, without skipping. That means the new base
    // state is the same as the result state.
    newBaseState = resultState;
  }

  queue.baseState = newBaseState;
  queue.firstUpdate = newFirstUpdate;
  queue.firstCapturedUpdate = newFirstCapturedUpdate;

  // Set the remaining expiration time to be whatever is remaining in the queue.
  // This should be fine because the only two other things that contribute to
  // expiration time are props and context. We're already in the middle of the
  // begin phase by the time we start processing the queue, so we've already
  // dealt with the props. Context in components that specify
  // shouldComponentUpdate is tricky; but we'll have to account for
  // that regardless.
  workInProgress.expirationTime = newExpirationTime;
  workInProgress.memoizedState = resultState;

  {
    currentlyProcessingQueue = null;
  }
}

function callCallback(callback, context) {
  (function () {
    if (!(typeof callback === 'function')) {
      {
        throw ReactError(Error('Invalid argument passed as callback. Expected a function. Instead received: ' + callback));
      }
    }
  })();
  callback.call(context);
}

function resetHasForceUpdateBeforeProcessing() {
  hasForceUpdate = false;
}

function checkHasForceUpdateAfterProcessing() {
  return hasForceUpdate;
}

function commitUpdateQueue(finishedWork, finishedQueue, instance, renderExpirationTime) {
  // If the finished render included captured updates, and there are still
  // lower priority updates left over, we need to keep the captured updates
  // in the queue so that they are rebased and not dropped once we process the
  // queue again at the lower priority.
  if (finishedQueue.firstCapturedUpdate !== null) {
    // Join the captured update list to the end of the normal list.
    if (finishedQueue.lastUpdate !== null) {
      finishedQueue.lastUpdate.next = finishedQueue.firstCapturedUpdate;
      finishedQueue.lastUpdate = finishedQueue.lastCapturedUpdate;
    }
    // Clear the list of captured updates.
    finishedQueue.firstCapturedUpdate = finishedQueue.lastCapturedUpdate = null;
  }

  // Commit the effects
  commitUpdateEffects(finishedQueue.firstEffect, instance);
  finishedQueue.firstEffect = finishedQueue.lastEffect = null;

  commitUpdateEffects(finishedQueue.firstCapturedEffect, instance);
  finishedQueue.firstCapturedEffect = finishedQueue.lastCapturedEffect = null;
}

function commitUpdateEffects(effect, instance) {
  while (effect !== null) {
    var _callback3 = effect.callback;
    if (_callback3 !== null) {
      effect.callback = null;
      callCallback(_callback3, instance);
    }
    effect = effect.nextEffect;
  }
}

var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;


function requestCurrentSuspenseConfig() {
  return ReactCurrentBatchConfig.suspense;
}

var fakeInternalInstance = {};
var isArray$1 = Array.isArray;

// React.Component uses a shared frozen object by default.
// We'll use it to determine whether we need to initialize legacy refs.
var emptyRefsObject = new React.Component().refs;

var didWarnAboutStateAssignmentForComponent = void 0;
var didWarnAboutUninitializedState = void 0;
var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = void 0;
var didWarnAboutLegacyLifecyclesAndDerivedState = void 0;
var didWarnAboutUndefinedDerivedState = void 0;
var warnOnUndefinedDerivedState = void 0;
var warnOnInvalidCallback$1 = void 0;
var didWarnAboutDirectlyAssigningPropsToState = void 0;
var didWarnAboutContextTypeAndContextTypes = void 0;
var didWarnAboutInvalidateContextType = void 0;

{
  didWarnAboutStateAssignmentForComponent = new Set();
  didWarnAboutUninitializedState = new Set();
  didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();
  didWarnAboutLegacyLifecyclesAndDerivedState = new Set();
  didWarnAboutDirectlyAssigningPropsToState = new Set();
  didWarnAboutUndefinedDerivedState = new Set();
  didWarnAboutContextTypeAndContextTypes = new Set();
  didWarnAboutInvalidateContextType = new Set();

  var didWarnOnInvalidCallback = new Set();

  warnOnInvalidCallback$1 = function (callback, callerName) {
    if (callback === null || typeof callback === 'function') {
      return;
    }
    var key = callerName + '_' + callback;
    if (!didWarnOnInvalidCallback.has(key)) {
      didWarnOnInvalidCallback.add(key);
      warningWithoutStack$1(false, '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
    }
  };

  warnOnUndefinedDerivedState = function (type, partialState) {
    if (partialState === undefined) {
      var componentName = getComponentName(type) || 'Component';
      if (!didWarnAboutUndefinedDerivedState.has(componentName)) {
        didWarnAboutUndefinedDerivedState.add(componentName);
        warningWithoutStack$1(false, '%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);
      }
    }
  };

  // This is so gross but it's at least non-critical and can be removed if
  // it causes problems. This is meant to give a nicer error message for
  // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,
  // ...)) which otherwise throws a "_processChildContext is not a function"
  // exception.
  Object.defineProperty(fakeInternalInstance, '_processChildContext', {
    enumerable: false,
    value: function () {
      (function () {
        {
          {
            throw ReactError(Error('_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn\'t supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).'));
          }
        }
      })();
    }
  });
  Object.freeze(fakeInternalInstance);
}

function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {
  var prevState = workInProgress.memoizedState;

  {
    if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
      // Invoke the function an extra time to help detect side-effects.
      getDerivedStateFromProps(nextProps, prevState);
    }
  }

  var partialState = getDerivedStateFromProps(nextProps, prevState);

  {
    warnOnUndefinedDerivedState(ctor, partialState);
  }
  // Merge the partial state and the previous state.
  var memoizedState = partialState === null || partialState === undefined ? prevState : _assign({}, prevState, partialState);
  workInProgress.memoizedState = memoizedState;

  // Once the update queue is empty, persist the derived state onto the
  // base state.
  var updateQueue = workInProgress.updateQueue;
  if (updateQueue !== null && workInProgress.expirationTime === NoWork) {
    updateQueue.baseState = memoizedState;
  }
}

var classComponentUpdater = {
  isMounted: isMounted,
  enqueueSetState: function (inst, payload, callback) {
    var fiber = get(inst);
    var currentTime = requestCurrentTime();
    var suspenseConfig = requestCurrentSuspenseConfig();
    var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);

    var update = createUpdate(expirationTime, suspenseConfig);
    update.payload = payload;
    if (callback !== undefined && callback !== null) {
      {
        warnOnInvalidCallback$1(callback, 'setState');
      }
      update.callback = callback;
    }

    if (revertPassiveEffectsChange) {
      flushPassiveEffects();
    }
    enqueueUpdate(fiber, update);
    scheduleWork(fiber, expirationTime);
  },
  enqueueReplaceState: function (inst, payload, callback) {
    var fiber = get(inst);
    var currentTime = requestCurrentTime();
    var suspenseConfig = requestCurrentSuspenseConfig();
    var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);

    var update = createUpdate(expirationTime, suspenseConfig);
    update.tag = ReplaceState;
    update.payload = payload;

    if (callback !== undefined && callback !== null) {
      {
        warnOnInvalidCallback$1(callback, 'replaceState');
      }
      update.callback = callback;
    }

    if (revertPassiveEffectsChange) {
      flushPassiveEffects();
    }
    enqueueUpdate(fiber, update);
    scheduleWork(fiber, expirationTime);
  },
  enqueueForceUpdate: function (inst, callback) {
    var fiber = get(inst);
    var currentTime = requestCurrentTime();
    var suspenseConfig = requestCurrentSuspenseConfig();
    var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);

    var update = createUpdate(expirationTime, suspenseConfig);
    update.tag = ForceUpdate;

    if (callback !== undefined && callback !== null) {
      {
        warnOnInvalidCallback$1(callback, 'forceUpdate');
      }
      update.callback = callback;
    }

    if (revertPassiveEffectsChange) {
      flushPassiveEffects();
    }
    enqueueUpdate(fiber, update);
    scheduleWork(fiber, expirationTime);
  }
};

function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {
  var instance = workInProgress.stateNode;
  if (typeof instance.shouldComponentUpdate === 'function') {
    startPhaseTimer(workInProgress, 'shouldComponentUpdate');
    var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
    stopPhaseTimer();

    {
      !(shouldUpdate !== undefined) ? warningWithoutStack$1(false, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component') : void 0;
    }

    return shouldUpdate;
  }

  if (ctor.prototype && ctor.prototype.isPureReactComponent) {
    return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);
  }

  return true;
}

function checkClassInstance(workInProgress, ctor, newProps) {
  var instance = workInProgress.stateNode;
  {
    var name = getComponentName(ctor) || 'Component';
    var renderPresent = instance.render;

    if (!renderPresent) {
      if (ctor.prototype && typeof ctor.prototype.render === 'function') {
        warningWithoutStack$1(false, '%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
      } else {
        warningWithoutStack$1(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
      }
    }

    var noGetInitialStateOnES6 = !instance.getInitialState || instance.getInitialState.isReactClassApproved || instance.state;
    !noGetInitialStateOnES6 ? warningWithoutStack$1(false, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name) : void 0;
    var noGetDefaultPropsOnES6 = !instance.getDefaultProps || instance.getDefaultProps.isReactClassApproved;
    !noGetDefaultPropsOnES6 ? warningWithoutStack$1(false, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name) : void 0;
    var noInstancePropTypes = !instance.propTypes;
    !noInstancePropTypes ? warningWithoutStack$1(false, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name) : void 0;
    var noInstanceContextType = !instance.contextType;
    !noInstanceContextType ? warningWithoutStack$1(false, 'contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name) : void 0;

    if (disableLegacyContext) {
      if (ctor.childContextTypes) {
        warningWithoutStack$1(false, '%s uses the legacy childContextTypes API which is no longer supported. ' + 'Use React.createContext() instead.', name);
      }
      if (ctor.contextTypes) {
        warningWithoutStack$1(false, '%s uses the legacy contextTypes API which is no longer supported. ' + 'Use React.createContext() with static contextType instead.', name);
      }
    } else {
      var noInstanceContextTypes = !instance.contextTypes;
      !noInstanceContextTypes ? warningWithoutStack$1(false, 'contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name) : void 0;

      if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {
        didWarnAboutContextTypeAndContextTypes.add(ctor);
        warningWithoutStack$1(false, '%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);
      }
    }

    var noComponentShouldUpdate = typeof instance.componentShouldUpdate !== 'function';
    !noComponentShouldUpdate ? warningWithoutStack$1(false, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name) : void 0;
    if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
      warningWithoutStack$1(false, '%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(ctor) || 'A pure component');
    }
    var noComponentDidUnmount = typeof instance.componentDidUnmount !== 'function';
    !noComponentDidUnmount ? warningWithoutStack$1(false, '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name) : void 0;
    var noComponentDidReceiveProps = typeof instance.componentDidReceiveProps !== 'function';
    !noComponentDidReceiveProps ? warningWithoutStack$1(false, '%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name) : void 0;
    var noComponentWillRecieveProps = typeof instance.componentWillRecieveProps !== 'function';
    !noComponentWillRecieveProps ? warningWithoutStack$1(false, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name) : void 0;
    var noUnsafeComponentWillRecieveProps = typeof instance.UNSAFE_componentWillRecieveProps !== 'function';
    !noUnsafeComponentWillRecieveProps ? warningWithoutStack$1(false, '%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name) : void 0;
    var hasMutatedProps = instance.props !== newProps;
    !(instance.props === undefined || !hasMutatedProps) ? warningWithoutStack$1(false, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name) : void 0;
    var noInstanceDefaultProps = !instance.defaultProps;
    !noInstanceDefaultProps ? warningWithoutStack$1(false, 'Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name) : void 0;

    if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {
      didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);
      warningWithoutStack$1(false, '%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor));
    }

    var noInstanceGetDerivedStateFromProps = typeof instance.getDerivedStateFromProps !== 'function';
    !noInstanceGetDerivedStateFromProps ? warningWithoutStack$1(false, '%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name) : void 0;
    var noInstanceGetDerivedStateFromCatch = typeof instance.getDerivedStateFromError !== 'function';
    !noInstanceGetDerivedStateFromCatch ? warningWithoutStack$1(false, '%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name) : void 0;
    var noStaticGetSnapshotBeforeUpdate = typeof ctor.getSnapshotBeforeUpdate !== 'function';
    !noStaticGetSnapshotBeforeUpdate ? warningWithoutStack$1(false, '%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name) : void 0;
    var _state = instance.state;
    if (_state && (typeof _state !== 'object' || isArray$1(_state))) {
      warningWithoutStack$1(false, '%s.state: must be set to an object or null', name);
    }
    if (typeof instance.getChildContext === 'function') {
      !(typeof ctor.childContextTypes === 'object') ? warningWithoutStack$1(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name) : void 0;
    }
  }
}

function adoptClassInstance(workInProgress, instance) {
  instance.updater = classComponentUpdater;
  workInProgress.stateNode = instance;
  // The instance needs access to the fiber so that it can schedule updates
  set(instance, workInProgress);
  {
    instance._reactInternalInstance = fakeInternalInstance;
  }
}

function constructClassInstance(workInProgress, ctor, props, renderExpirationTime) {
  var isLegacyContextConsumer = false;
  var unmaskedContext = emptyContextObject;
  var context = emptyContextObject;
  var contextType = ctor.contextType;

  {
    if ('contextType' in ctor) {
      var isValid =
      // Allow null for conditional declaration
      contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>

      if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
        didWarnAboutInvalidateContextType.add(ctor);

        var addendum = '';
        if (contextType === undefined) {
          addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';
        } else if (typeof contextType !== 'object') {
          addendum = ' However, it is set to a ' + typeof contextType + '.';
        } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
          addendum = ' Did you accidentally pass the Context.Provider instead?';
        } else if (contextType._context !== undefined) {
          // <Context.Consumer>
          addendum = ' Did you accidentally pass the Context.Consumer instead?';
        } else {
          addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
        }
        warningWithoutStack$1(false, '%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(ctor) || 'Component', addendum);
      }
    }
  }

  if (typeof contextType === 'object' && contextType !== null) {
    context = readContext(contextType);
  } else if (!disableLegacyContext) {
    unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
    var contextTypes = ctor.contextTypes;
    isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;
    context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;
  }

  // Instantiate twice to help detect side-effects.
  {
    if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
      new ctor(props, context); // eslint-disable-line no-new
    }
  }

  var instance = new ctor(props, context);
  var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;
  adoptClassInstance(workInProgress, instance);

  {
    if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {
      var componentName = getComponentName(ctor) || 'Component';
      if (!didWarnAboutUninitializedState.has(componentName)) {
        didWarnAboutUninitializedState.add(componentName);
        warningWithoutStack$1(false, '`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);
      }
    }

    // If new component APIs are defined, "unsafe" lifecycles won't be called.
    // Warn about these lifecycles if they are present.
    // Don't warn about react-lifecycles-compat polyfilled methods though.
    if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {
      var foundWillMountName = null;
      var foundWillReceivePropsName = null;
      var foundWillUpdateName = null;
      if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {
        foundWillMountName = 'componentWillMount';
      } else if (typeof instance.UNSAFE_componentWillMount === 'function') {
        foundWillMountName = 'UNSAFE_componentWillMount';
      }
      if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
        foundWillReceivePropsName = 'componentWillReceiveProps';
      } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
        foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
      }
      if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
        foundWillUpdateName = 'componentWillUpdate';
      } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
        foundWillUpdateName = 'UNSAFE_componentWillUpdate';
      }
      if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
        var _componentName = getComponentName(ctor) || 'Component';
        var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';
        if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {
          didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);
          warningWithoutStack$1(false, 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks', _componentName, newApiName, foundWillMountName !== null ? '\n  ' + foundWillMountName : '', foundWillReceivePropsName !== null ? '\n  ' + foundWillReceivePropsName : '', foundWillUpdateName !== null ? '\n  ' + foundWillUpdateName : '');
        }
      }
    }
  }

  // Cache unmasked context so we can avoid recreating masked context unless necessary.
  // ReactFiberContext usually updates this cache but can't for newly-created instances.
  if (isLegacyContextConsumer) {
    cacheContext(workInProgress, unmaskedContext, context);
  }

  return instance;
}

function callComponentWillMount(workInProgress, instance) {
  startPhaseTimer(workInProgress, 'componentWillMount');
  var oldState = instance.state;

  if (typeof instance.componentWillMount === 'function') {
    instance.componentWillMount();
  }
  if (typeof instance.UNSAFE_componentWillMount === 'function') {
    instance.UNSAFE_componentWillMount();
  }

  stopPhaseTimer();

  if (oldState !== instance.state) {
    {
      warningWithoutStack$1(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');
    }
    classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
  }
}

function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {
  var oldState = instance.state;
  startPhaseTimer(workInProgress, 'componentWillReceiveProps');
  if (typeof instance.componentWillReceiveProps === 'function') {
    instance.componentWillReceiveProps(newProps, nextContext);
  }
  if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
    instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
  }
  stopPhaseTimer();

  if (instance.state !== oldState) {
    {
      var componentName = getComponentName(workInProgress.type) || 'Component';
      if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {
        didWarnAboutStateAssignmentForComponent.add(componentName);
        warningWithoutStack$1(false, '%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
      }
    }
    classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
  }
}

// Invokes the mount life-cycles on a previously never rendered instance.
function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
  {
    checkClassInstance(workInProgress, ctor, newProps);
  }

  var instance = workInProgress.stateNode;
  instance.props = newProps;
  instance.state = workInProgress.memoizedState;
  instance.refs = emptyRefsObject;

  var contextType = ctor.contextType;
  if (typeof contextType === 'object' && contextType !== null) {
    instance.context = readContext(contextType);
  } else if (disableLegacyContext) {
    instance.context = emptyContextObject;
  } else {
    var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
    instance.context = getMaskedContext(workInProgress, unmaskedContext);
  }

  {
    if (instance.state === newProps) {
      var componentName = getComponentName(ctor) || 'Component';
      if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {
        didWarnAboutDirectlyAssigningPropsToState.add(componentName);
        warningWithoutStack$1(false, '%s: It is not recommended to assign props directly to state ' + "because updates to props won't be reflected in state. " + 'In most cases, it is better to use props directly.', componentName);
      }
    }

    if (workInProgress.mode & StrictMode) {
      ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);
    }

    if (warnAboutDeprecatedLifecycles) {
      ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);
    }
  }

  var updateQueue = workInProgress.updateQueue;
  if (updateQueue !== null) {
    processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);
    instance.state = workInProgress.memoizedState;
  }

  var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
  if (typeof getDerivedStateFromProps === 'function') {
    applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
    instance.state = workInProgress.memoizedState;
  }

  // In order to support react-lifecycles-compat polyfilled components,
  // Unsafe lifecycles should not be invoked for components using the new APIs.
  if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
    callComponentWillMount(workInProgress, instance);
    // If we had additional state updates during this life-cycle, let's
    // process them now.
    updateQueue = workInProgress.updateQueue;
    if (updateQueue !== null) {
      processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);
      instance.state = workInProgress.memoizedState;
    }
  }

  if (typeof instance.componentDidMount === 'function') {
    workInProgress.effectTag |= Update;
  }
}

function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
  var instance = workInProgress.stateNode;

  var oldProps = workInProgress.memoizedProps;
  instance.props = oldProps;

  var oldContext = instance.context;
  var contextType = ctor.contextType;
  var nextContext = emptyContextObject;
  if (typeof contextType === 'object' && contextType !== null) {
    nextContext = readContext(contextType);
  } else if (!disableLegacyContext) {
    var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
    nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);
  }

  var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
  var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function';

  // Note: During these life-cycles, instance.props/instance.state are what
  // ever the previously attempted to render - not the "current". However,
  // during componentDidUpdate we pass the "current" props.

  // In order to support react-lifecycles-compat polyfilled components,
  // Unsafe lifecycles should not be invoked for components using the new APIs.
  if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
    if (oldProps !== newProps || oldContext !== nextContext) {
      callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
    }
  }

  resetHasForceUpdateBeforeProcessing();

  var oldState = workInProgress.memoizedState;
  var newState = instance.state = oldState;
  var updateQueue = workInProgress.updateQueue;
  if (updateQueue !== null) {
    processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);
    newState = workInProgress.memoizedState;
  }
  if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
    // If an update was already in progress, we should schedule an Update
    // effect even though we're bailing out, so that cWU/cDU are called.
    if (typeof instance.componentDidMount === 'function') {
      workInProgress.effectTag |= Update;
    }
    return false;
  }

  if (typeof getDerivedStateFromProps === 'function') {
    applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
    newState = workInProgress.memoizedState;
  }

  var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);

  if (shouldUpdate) {
    // In order to support react-lifecycles-compat polyfilled components,
    // Unsafe lifecycles should not be invoked for components using the new APIs.
    if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
      startPhaseTimer(workInProgress, 'componentWillMount');
      if (typeof instance.componentWillMount === 'function') {
        instance.componentWillMount();
      }
      if (typeof instance.UNSAFE_componentWillMount === 'function') {
        instance.UNSAFE_componentWillMount();
      }
      stopPhaseTimer();
    }
    if (typeof instance.componentDidMount === 'function') {
      workInProgress.effectTag |= Update;
    }
  } else {
    // If an update was already in progress, we should schedule an Update
    // effect even though we're bailing out, so that cWU/cDU are called.
    if (typeof instance.componentDidMount === 'function') {
      workInProgress.effectTag |= Update;
    }

    // If shouldComponentUpdate returned false, we should still update the
    // memoized state to indicate that this work can be reused.
    workInProgress.memoizedProps = newProps;
    workInProgress.memoizedState = newState;
  }

  // Update the existing instance's state, props, and context pointers even
  // if shouldComponentUpdate returns false.
  instance.props = newProps;
  instance.state = newState;
  instance.context = nextContext;

  return shouldUpdate;
}

// Invokes the update life-cycles and returns false if it shouldn't rerender.
function updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) {
  var instance = workInProgress.stateNode;

  var oldProps = workInProgress.memoizedProps;
  instance.props = workInProgress.type === workInProgress.elementType ? oldProps : resolveDefaultProps(workInProgress.type, oldProps);

  var oldContext = instance.context;
  var contextType = ctor.contextType;
  var nextContext = emptyContextObject;
  if (typeof contextType === 'object' && contextType !== null) {
    nextContext = readContext(contextType);
  } else if (!disableLegacyContext) {
    var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
    nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);
  }

  var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
  var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function';

  // Note: During these life-cycles, instance.props/instance.state are what
  // ever the previously attempted to render - not the "current". However,
  // during componentDidUpdate we pass the "current" props.

  // In order to support react-lifecycles-compat polyfilled components,
  // Unsafe lifecycles should not be invoked for components using the new APIs.
  if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
    if (oldProps !== newProps || oldContext !== nextContext) {
      callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
    }
  }

  resetHasForceUpdateBeforeProcessing();

  var oldState = workInProgress.memoizedState;
  var newState = instance.state = oldState;
  var updateQueue = workInProgress.updateQueue;
  if (updateQueue !== null) {
    processUpdateQueue(workInProgress, updateQueue, newProps, instance, renderExpirationTime);
    newState = workInProgress.memoizedState;
  }

  if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
    // If an update was already in progress, we should schedule an Update
    // effect even though we're bailing out, so that cWU/cDU are called.
    if (typeof instance.componentDidUpdate === 'function') {
      if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
        workInProgress.effectTag |= Update;
      }
    }
    if (typeof instance.getSnapshotBeforeUpdate === 'function') {
      if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
        workInProgress.effectTag |= Snapshot;
      }
    }
    return false;
  }

  if (typeof getDerivedStateFromProps === 'function') {
    applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
    newState = workInProgress.memoizedState;
  }

  var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);

  if (shouldUpdate) {
    // In order to support react-lifecycles-compat polyfilled components,
    // Unsafe lifecycles should not be invoked for components using the new APIs.
    if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {
      startPhaseTimer(workInProgress, 'componentWillUpdate');
      if (typeof instance.componentWillUpdate === 'function') {
        instance.componentWillUpdate(newProps, newState, nextContext);
      }
      if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
        instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);
      }
      stopPhaseTimer();
    }
    if (typeof instance.componentDidUpdate === 'function') {
      workInProgress.effectTag |= Update;
    }
    if (typeof instance.getSnapshotBeforeUpdate === 'function') {
      workInProgress.effectTag |= Snapshot;
    }
  } else {
    // If an update was already in progress, we should schedule an Update
    // effect even though we're bailing out, so that cWU/cDU are called.
    if (typeof instance.componentDidUpdate === 'function') {
      if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
        workInProgress.effectTag |= Update;
      }
    }
    if (typeof instance.getSnapshotBeforeUpdate === 'function') {
      if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
        workInProgress.effectTag |= Snapshot;
      }
    }

    // If shouldComponentUpdate returned false, we should still update the
    // memoized props/state to indicate that this work can be reused.
    workInProgress.memoizedProps = newProps;
    workInProgress.memoizedState = newState;
  }

  // Update the existing instance's state, props, and context pointers even
  // if shouldComponentUpdate returns false.
  instance.props = newProps;
  instance.state = newState;
  instance.context = nextContext;

  return shouldUpdate;
}

var didWarnAboutMaps = void 0;
var didWarnAboutGenerators = void 0;
var didWarnAboutStringRefInStrictMode = void 0;
var ownerHasKeyUseWarning = void 0;
var ownerHasFunctionTypeWarning = void 0;
var warnForMissingKey = function (child) {};

{
  didWarnAboutMaps = false;
  didWarnAboutGenerators = false;
  didWarnAboutStringRefInStrictMode = {};

  /**
   * Warn if there's no key explicitly set on dynamic arrays of children or
   * object keys are not valid. This allows us to keep track of children between
   * updates.
   */
  ownerHasKeyUseWarning = {};
  ownerHasFunctionTypeWarning = {};

  warnForMissingKey = function (child) {
    if (child === null || typeof child !== 'object') {
      return;
    }
    if (!child._store || child._store.validated || child.key != null) {
      return;
    }
    (function () {
      if (!(typeof child._store === 'object')) {
        {
          throw ReactError(Error('React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.'));
        }
      }
    })();
    child._store.validated = true;

    var currentComponentErrorInfo = 'Each child in a list should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.' + getCurrentFiberStackInDev();
    if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
      return;
    }
    ownerHasKeyUseWarning[currentComponentErrorInfo] = true;

    warning$1(false, 'Each child in a list should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.');
  };
}

var isArray = Array.isArray;

function coerceRef(returnFiber, current$$1, element) {
  var mixedRef = element.ref;
  if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {
    {
      if (returnFiber.mode & StrictMode) {
        var componentName = getComponentName(returnFiber.type) || 'Component';
        if (!didWarnAboutStringRefInStrictMode[componentName]) {
          warningWithoutStack$1(false, 'A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using createRef() instead.' + '\n%s' + '\n\nLearn more about using refs safely here:' + '\nhttps://fb.me/react-strict-mode-string-ref', mixedRef, getStackByFiberInDevAndProd(returnFiber));
          didWarnAboutStringRefInStrictMode[componentName] = true;
        }
      }
    }

    if (element._owner) {
      var owner = element._owner;
      var inst = void 0;
      if (owner) {
        var ownerFiber = owner;
        (function () {
          if (!(ownerFiber.tag === ClassComponent)) {
            {
              throw ReactError(Error('Function components cannot have refs. Did you mean to use React.forwardRef()?'));
            }
          }
        })();
        inst = ownerFiber.stateNode;
      }
      (function () {
        if (!inst) {
          {
            throw ReactError(Error('Missing owner for string ref ' + mixedRef + '. This error is likely caused by a bug in React. Please file an issue.'));
          }
        }
      })();
      var stringRef = '' + mixedRef;
      // Check if previous string ref matches new string ref
      if (current$$1 !== null && current$$1.ref !== null && typeof current$$1.ref === 'function' && current$$1.ref._stringRef === stringRef) {
        return current$$1.ref;
      }
      var ref = function (value) {
        var refs = inst.refs;
        if (refs === emptyRefsObject) {
          // This is a lazy pooled frozen object, so we need to initialize.
          refs = inst.refs = {};
        }
        if (value === null) {
          delete refs[stringRef];
        } else {
          refs[stringRef] = value;
        }
      };
      ref._stringRef = stringRef;
      return ref;
    } else {
      (function () {
        if (!(typeof mixedRef === 'string')) {
          {
            throw ReactError(Error('Expected ref to be a function, a string, an object returned by React.createRef(), or null.'));
          }
        }
      })();
      (function () {
        if (!element._owner) {
          {
            throw ReactError(Error('Element ref was specified as a string (' + mixedRef + ') but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component\'s render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information.'));
          }
        }
      })();
    }
  }
  return mixedRef;
}

function throwOnInvalidObjectType(returnFiber, newChild) {
  if (returnFiber.type !== 'textarea') {
    var addendum = '';
    {
      addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + getCurrentFiberStackInDev();
    }
    (function () {
      {
        {
          throw ReactError(Error('Objects are not valid as a React child (found: ' + (Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild) + ').' + addendum));
        }
      }
    })();
  }
}

function warnOnFunctionType() {
  var currentComponentErrorInfo = 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.' + getCurrentFiberStackInDev();

  if (ownerHasFunctionTypeWarning[currentComponentErrorInfo]) {
    return;
  }
  ownerHasFunctionTypeWarning[currentComponentErrorInfo] = true;

  warning$1(false, 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');
}

// This wrapper function exists because I expect to clone the code in each path
// to be able to optimize each path individually by branching early. This needs
// a compiler or we can do it manually. Helpers that don't need this branching
// live outside of this function.
function ChildReconciler(shouldTrackSideEffects) {
  function deleteChild(returnFiber, childToDelete) {
    if (!shouldTrackSideEffects) {
      // Noop.
      return;
    }
    // Deletions are added in reversed order so we add it to the front.
    // At this point, the return fiber's effect list is empty except for
    // deletions, so we can just append the deletion to the list. The remaining
    // effects aren't added until the complete phase. Once we implement
    // resuming, this may not be true.
    var last = returnFiber.lastEffect;
    if (last !== null) {
      last.nextEffect = childToDelete;
      returnFiber.lastEffect = childToDelete;
    } else {
      returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
    }
    childToDelete.nextEffect = null;
    childToDelete.effectTag = Deletion;
  }

  function deleteRemainingChildren(returnFiber, currentFirstChild) {
    if (!shouldTrackSideEffects) {
      // Noop.
      return null;
    }

    // TODO: For the shouldClone case, this could be micro-optimized a bit by
    // assuming that after the first child we've already added everything.
    var childToDelete = currentFirstChild;
    while (childToDelete !== null) {
      deleteChild(returnFiber, childToDelete);
      childToDelete = childToDelete.sibling;
    }
    return null;
  }

  function mapRemainingChildren(returnFiber, currentFirstChild) {
    // Add the remaining children to a temporary map so that we can find them by
    // keys quickly. Implicit (null) keys get added to this set with their index
    var existingChildren = new Map();

    var existingChild = currentFirstChild;
    while (existingChild !== null) {
      if (existingChild.key !== null) {
        existingChildren.set(existingChild.key, existingChild);
      } else {
        existingChildren.set(existingChild.index, existingChild);
      }
      existingChild = existingChild.sibling;
    }
    return existingChildren;
  }

  function useFiber(fiber, pendingProps, expirationTime) {
    // We currently set sibling to null and index to 0 here because it is easy
    // to forget to do before returning it. E.g. for the single child case.
    var clone = createWorkInProgress(fiber, pendingProps, expirationTime);
    clone.index = 0;
    clone.sibling = null;
    return clone;
  }

  function placeChild(newFiber, lastPlacedIndex, newIndex) {
    newFiber.index = newIndex;
    if (!shouldTrackSideEffects) {
      // Noop.
      return lastPlacedIndex;
    }
    var current$$1 = newFiber.alternate;
    if (current$$1 !== null) {
      var oldIndex = current$$1.index;
      if (oldIndex < lastPlacedIndex) {
        // This is a move.
        newFiber.effectTag = Placement;
        return lastPlacedIndex;
      } else {
        // This item can stay in place.
        return oldIndex;
      }
    } else {
      // This is an insertion.
      newFiber.effectTag = Placement;
      return lastPlacedIndex;
    }
  }

  function placeSingleChild(newFiber) {
    // This is simpler for the single child case. We only need to do a
    // placement for inserting new children.
    if (shouldTrackSideEffects && newFiber.alternate === null) {
      newFiber.effectTag = Placement;
    }
    return newFiber;
  }

  function updateTextNode(returnFiber, current$$1, textContent, expirationTime) {
    if (current$$1 === null || current$$1.tag !== HostText) {
      // Insert
      var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
      created.return = returnFiber;
      return created;
    } else {
      // Update
      var existing = useFiber(current$$1, textContent, expirationTime);
      existing.return = returnFiber;
      return existing;
    }
  }

  function updateElement(returnFiber, current$$1, element, expirationTime) {
    if (current$$1 !== null && (current$$1.elementType === element.type || (
    // Keep this check inline so it only runs on the false path:
    isCompatibleFamilyForHotReloading(current$$1, element)))) {
      // Move based on index
      var existing = useFiber(current$$1, element.props, expirationTime);
      existing.ref = coerceRef(returnFiber, current$$1, element);
      existing.return = returnFiber;
      {
        existing._debugSource = element._source;
        existing._debugOwner = element._owner;
      }
      return existing;
    } else {
      // Insert
      var created = createFiberFromElement(element, returnFiber.mode, expirationTime);
      created.ref = coerceRef(returnFiber, current$$1, element);
      created.return = returnFiber;
      return created;
    }
  }

  function updatePortal(returnFiber, current$$1, portal, expirationTime) {
    if (current$$1 === null || current$$1.tag !== HostPortal || current$$1.stateNode.containerInfo !== portal.containerInfo || current$$1.stateNode.implementation !== portal.implementation) {
      // Insert
      var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
      created.return = returnFiber;
      return created;
    } else {
      // Update
      var existing = useFiber(current$$1, portal.children || [], expirationTime);
      existing.return = returnFiber;
      return existing;
    }
  }

  function updateFragment(returnFiber, current$$1, fragment, expirationTime, key) {
    if (current$$1 === null || current$$1.tag !== Fragment) {
      // Insert
      var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);
      created.return = returnFiber;
      return created;
    } else {
      // Update
      var existing = useFiber(current$$1, fragment, expirationTime);
      existing.return = returnFiber;
      return existing;
    }
  }

  function createChild(returnFiber, newChild, expirationTime) {
    if (typeof newChild === 'string' || typeof newChild === 'number') {
      // Text nodes don't have keys. If the previous node is implicitly keyed
      // we can continue to replace it without aborting even if it is not a text
      // node.
      var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);
      created.return = returnFiber;
      return created;
    }

    if (typeof newChild === 'object' && newChild !== null) {
      switch (newChild.$$typeof) {
        case REACT_ELEMENT_TYPE:
          {
            var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);
            _created.ref = coerceRef(returnFiber, null, newChild);
            _created.return = returnFiber;
            return _created;
          }
        case REACT_PORTAL_TYPE:
          {
            var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);
            _created2.return = returnFiber;
            return _created2;
          }
      }

      if (isArray(newChild) || getIteratorFn(newChild)) {
        var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);
        _created3.return = returnFiber;
        return _created3;
      }

      throwOnInvalidObjectType(returnFiber, newChild);
    }

    {
      if (typeof newChild === 'function') {
        warnOnFunctionType();
      }
    }

    return null;
  }

  function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {
    // Update the fiber if the keys match, otherwise return null.

    var key = oldFiber !== null ? oldFiber.key : null;

    if (typeof newChild === 'string' || typeof newChild === 'number') {
      // Text nodes don't have keys. If the previous node is implicitly keyed
      // we can continue to replace it without aborting even if it is not a text
      // node.
      if (key !== null) {
        return null;
      }
      return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);
    }

    if (typeof newChild === 'object' && newChild !== null) {
      switch (newChild.$$typeof) {
        case REACT_ELEMENT_TYPE:
          {
            if (newChild.key === key) {
              if (newChild.type === REACT_FRAGMENT_TYPE) {
                return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);
              }
              return updateElement(returnFiber, oldFiber, newChild, expirationTime);
            } else {
              return null;
            }
          }
        case REACT_PORTAL_TYPE:
          {
            if (newChild.key === key) {
              return updatePortal(returnFiber, oldFiber, newChild, expirationTime);
            } else {
              return null;
            }
          }
      }

      if (isArray(newChild) || getIteratorFn(newChild)) {
        if (key !== null) {
          return null;
        }

        return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);
      }

      throwOnInvalidObjectType(returnFiber, newChild);
    }

    {
      if (typeof newChild === 'function') {
        warnOnFunctionType();
      }
    }

    return null;
  }

  function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {
    if (typeof newChild === 'string' || typeof newChild === 'number') {
      // Text nodes don't have keys, so we neither have to check the old nor
      // new node for the key. If both are text nodes, they match.
      var matchedFiber = existingChildren.get(newIdx) || null;
      return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);
    }

    if (typeof newChild === 'object' && newChild !== null) {
      switch (newChild.$$typeof) {
        case REACT_ELEMENT_TYPE:
          {
            var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
            if (newChild.type === REACT_FRAGMENT_TYPE) {
              return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);
            }
            return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);
          }
        case REACT_PORTAL_TYPE:
          {
            var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
            return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);
          }
      }

      if (isArray(newChild) || getIteratorFn(newChild)) {
        var _matchedFiber3 = existingChildren.get(newIdx) || null;
        return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);
      }

      throwOnInvalidObjectType(returnFiber, newChild);
    }

    {
      if (typeof newChild === 'function') {
        warnOnFunctionType();
      }
    }

    return null;
  }

  /**
   * Warns if there is a duplicate or missing key
   */
  function warnOnInvalidKey(child, knownKeys) {
    {
      if (typeof child !== 'object' || child === null) {
        return knownKeys;
      }
      switch (child.$$typeof) {
        case REACT_ELEMENT_TYPE:
        case REACT_PORTAL_TYPE:
          warnForMissingKey(child);
          var key = child.key;
          if (typeof key !== 'string') {
            break;
          }
          if (knownKeys === null) {
            knownKeys = new Set();
            knownKeys.add(key);
            break;
          }
          if (!knownKeys.has(key)) {
            knownKeys.add(key);
            break;
          }
          warning$1(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);
          break;
        default:
          break;
      }
    }
    return knownKeys;
  }

  function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {
    // This algorithm can't optimize by searching from both ends since we
    // don't have backpointers on fibers. I'm trying to see how far we can get
    // with that model. If it ends up not being worth the tradeoffs, we can
    // add it later.

    // Even with a two ended optimization, we'd want to optimize for the case
    // where there are few changes and brute force the comparison instead of
    // going for the Map. It'd like to explore hitting that path first in
    // forward-only mode and only go for the Map once we notice that we need
    // lots of look ahead. This doesn't handle reversal as well as two ended
    // search but that's unusual. Besides, for the two ended optimization to
    // work on Iterables, we'd need to copy the whole set.

    // In this first iteration, we'll just live with hitting the bad case
    // (adding everything to a Map) in for every insert/move.

    // If you change this code, also update reconcileChildrenIterator() which
    // uses the same algorithm.

    {
      // First, validate keys.
      var knownKeys = null;
      for (var i = 0; i < newChildren.length; i++) {
        var child = newChildren[i];
        knownKeys = warnOnInvalidKey(child, knownKeys);
      }
    }

    var resultingFirstChild = null;
    var previousNewFiber = null;

    var oldFiber = currentFirstChild;
    var lastPlacedIndex = 0;
    var newIdx = 0;
    var nextOldFiber = null;
    for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {
      if (oldFiber.index > newIdx) {
        nextOldFiber = oldFiber;
        oldFiber = null;
      } else {
        nextOldFiber = oldFiber.sibling;
      }
      var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);
      if (newFiber === null) {
        // TODO: This breaks on empty slots like null children. That's
        // unfortunate because it triggers the slow path all the time. We need
        // a better way to communicate whether this was a miss or null,
        // boolean, undefined, etc.
        if (oldFiber === null) {
          oldFiber = nextOldFiber;
        }
        break;
      }
      if (shouldTrackSideEffects) {
        if (oldFiber && newFiber.alternate === null) {
          // We matched the slot, but we didn't reuse the existing fiber, so we
          // need to delete the existing child.
          deleteChild(returnFiber, oldFiber);
        }
      }
      lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
      if (previousNewFiber === null) {
        // TODO: Move out of the loop. This only happens for the first run.
        resultingFirstChild = newFiber;
      } else {
        // TODO: Defer siblings if we're not at the right index for this slot.
        // I.e. if we had null values before, then we want to defer this
        // for each null value. However, we also don't want to call updateSlot
        // with the previous one.
        previousNewFiber.sibling = newFiber;
      }
      previousNewFiber = newFiber;
      oldFiber = nextOldFiber;
    }

    if (newIdx === newChildren.length) {
      // We've reached the end of the new children. We can delete the rest.
      deleteRemainingChildren(returnFiber, oldFiber);
      return resultingFirstChild;
    }

    if (oldFiber === null) {
      // If we don't have any more existing children we can choose a fast path
      // since the rest will all be insertions.
      for (; newIdx < newChildren.length; newIdx++) {
        var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);
        if (_newFiber === null) {
          continue;
        }
        lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);
        if (previousNewFiber === null) {
          // TODO: Move out of the loop. This only happens for the first run.
          resultingFirstChild = _newFiber;
        } else {
          previousNewFiber.sibling = _newFiber;
        }
        previousNewFiber = _newFiber;
      }
      return resultingFirstChild;
    }

    // Add all children to a key map for quick lookups.
    var existingChildren = mapRemainingChildren(returnFiber, oldFiber);

    // Keep scanning and use the map to restore deleted items as moves.
    for (; newIdx < newChildren.length; newIdx++) {
      var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);
      if (_newFiber2 !== null) {
        if (shouldTrackSideEffects) {
          if (_newFiber2.alternate !== null) {
            // The new fiber is a work in progress, but if there exists a
            // current, that means that we reused the fiber. We need to delete
            // it from the child list so that we don't add it to the deletion
            // list.
            existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);
          }
        }
        lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);
        if (previousNewFiber === null) {
          resultingFirstChild = _newFiber2;
        } else {
          previousNewFiber.sibling = _newFiber2;
        }
        previousNewFiber = _newFiber2;
      }
    }

    if (shouldTrackSideEffects) {
      // Any existing children that weren't consumed above were deleted. We need
      // to add them to the deletion list.
      existingChildren.forEach(function (child) {
        return deleteChild(returnFiber, child);
      });
    }

    return resultingFirstChild;
  }

  function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {
    // This is the same implementation as reconcileChildrenArray(),
    // but using the iterator instead.

    var iteratorFn = getIteratorFn(newChildrenIterable);
    (function () {
      if (!(typeof iteratorFn === 'function')) {
        {
          throw ReactError(Error('An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.'));
        }
      }
    })();

    {
      // We don't support rendering Generators because it's a mutation.
      // See https://github.com/facebook/react/issues/12995
      if (typeof Symbol === 'function' &&
      // $FlowFixMe Flow doesn't know about toStringTag
      newChildrenIterable[Symbol.toStringTag] === 'Generator') {
        !didWarnAboutGenerators ? warning$1(false, 'Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.') : void 0;
        didWarnAboutGenerators = true;
      }

      // Warn about using Maps as children
      if (newChildrenIterable.entries === iteratorFn) {
        !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;
        didWarnAboutMaps = true;
      }

      // First, validate keys.
      // We'll get a different iterator later for the main pass.
      var _newChildren = iteratorFn.call(newChildrenIterable);
      if (_newChildren) {
        var knownKeys = null;
        var _step = _newChildren.next();
        for (; !_step.done; _step = _newChildren.next()) {
          var child = _step.value;
          knownKeys = warnOnInvalidKey(child, knownKeys);
        }
      }
    }

    var newChildren = iteratorFn.call(newChildrenIterable);
    (function () {
      if (!(newChildren != null)) {
        {
          throw ReactError(Error('An iterable object provided no iterator.'));
        }
      }
    })();

    var resultingFirstChild = null;
    var previousNewFiber = null;

    var oldFiber = currentFirstChild;
    var lastPlacedIndex = 0;
    var newIdx = 0;
    var nextOldFiber = null;

    var step = newChildren.next();
    for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {
      if (oldFiber.index > newIdx) {
        nextOldFiber = oldFiber;
        oldFiber = null;
      } else {
        nextOldFiber = oldFiber.sibling;
      }
      var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);
      if (newFiber === null) {
        // TODO: This breaks on empty slots like null children. That's
        // unfortunate because it triggers the slow path all the time. We need
        // a better way to communicate whether this was a miss or null,
        // boolean, undefined, etc.
        if (oldFiber === null) {
          oldFiber = nextOldFiber;
        }
        break;
      }
      if (shouldTrackSideEffects) {
        if (oldFiber && newFiber.alternate === null) {
          // We matched the slot, but we didn't reuse the existing fiber, so we
          // need to delete the existing child.
          deleteChild(returnFiber, oldFiber);
        }
      }
      lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
      if (previousNewFiber === null) {
        // TODO: Move out of the loop. This only happens for the first run.
        resultingFirstChild = newFiber;
      } else {
        // TODO: Defer siblings if we're not at the right index for this slot.
        // I.e. if we had null values before, then we want to defer this
        // for each null value. However, we also don't want to call updateSlot
        // with the previous one.
        previousNewFiber.sibling = newFiber;
      }
      previousNewFiber = newFiber;
      oldFiber = nextOldFiber;
    }

    if (step.done) {
      // We've reached the end of the new children. We can delete the rest.
      deleteRemainingChildren(returnFiber, oldFiber);
      return resultingFirstChild;
    }

    if (oldFiber === null) {
      // If we don't have any more existing children we can choose a fast path
      // since the rest will all be insertions.
      for (; !step.done; newIdx++, step = newChildren.next()) {
        var _newFiber3 = createChild(returnFiber, step.value, expirationTime);
        if (_newFiber3 === null) {
          continue;
        }
        lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);
        if (previousNewFiber === null) {
          // TODO: Move out of the loop. This only happens for the first run.
          resultingFirstChild = _newFiber3;
        } else {
          previousNewFiber.sibling = _newFiber3;
        }
        previousNewFiber = _newFiber3;
      }
      return resultingFirstChild;
    }

    // Add all children to a key map for quick lookups.
    var existingChildren = mapRemainingChildren(returnFiber, oldFiber);

    // Keep scanning and use the map to restore deleted items as moves.
    for (; !step.done; newIdx++, step = newChildren.next()) {
      var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);
      if (_newFiber4 !== null) {
        if (shouldTrackSideEffects) {
          if (_newFiber4.alternate !== null) {
            // The new fiber is a work in progress, but if there exists a
            // current, that means that we reused the fiber. We need to delete
            // it from the child list so that we don't add it to the deletion
            // list.
            existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);
          }
        }
        lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);
        if (previousNewFiber === null) {
          resultingFirstChild = _newFiber4;
        } else {
          previousNewFiber.sibling = _newFiber4;
        }
        previousNewFiber = _newFiber4;
      }
    }

    if (shouldTrackSideEffects) {
      // Any existing children that weren't consumed above were deleted. We need
      // to add them to the deletion list.
      existingChildren.forEach(function (child) {
        return deleteChild(returnFiber, child);
      });
    }

    return resultingFirstChild;
  }

  function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {
    // There's no need to check for keys on text nodes since we don't have a
    // way to define them.
    if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
      // We already have an existing node so let's just update it and delete
      // the rest.
      deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
      var existing = useFiber(currentFirstChild, textContent, expirationTime);
      existing.return = returnFiber;
      return existing;
    }
    // The existing first child is not a text node so we need to create one
    // and delete the existing ones.
    deleteRemainingChildren(returnFiber, currentFirstChild);
    var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
    created.return = returnFiber;
    return created;
  }

  function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {
    var key = element.key;
    var child = currentFirstChild;
    while (child !== null) {
      // TODO: If key === null and child.key === null, then this only applies to
      // the first item in the list.
      if (child.key === key) {
        if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.elementType === element.type || (
        // Keep this check inline so it only runs on the false path:
        isCompatibleFamilyForHotReloading(child, element))) {
          deleteRemainingChildren(returnFiber, child.sibling);
          var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);
          existing.ref = coerceRef(returnFiber, child, element);
          existing.return = returnFiber;
          {
            existing._debugSource = element._source;
            existing._debugOwner = element._owner;
          }
          return existing;
        } else {
          deleteRemainingChildren(returnFiber, child);
          break;
        }
      } else {
        deleteChild(returnFiber, child);
      }
      child = child.sibling;
    }

    if (element.type === REACT_FRAGMENT_TYPE) {
      var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);
      created.return = returnFiber;
      return created;
    } else {
      var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);
      _created4.ref = coerceRef(returnFiber, currentFirstChild, element);
      _created4.return = returnFiber;
      return _created4;
    }
  }

  function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {
    var key = portal.key;
    var child = currentFirstChild;
    while (child !== null) {
      // TODO: If key === null and child.key === null, then this only applies to
      // the first item in the list.
      if (child.key === key) {
        if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {
          deleteRemainingChildren(returnFiber, child.sibling);
          var existing = useFiber(child, portal.children || [], expirationTime);
          existing.return = returnFiber;
          return existing;
        } else {
          deleteRemainingChildren(returnFiber, child);
          break;
        }
      } else {
        deleteChild(returnFiber, child);
      }
      child = child.sibling;
    }

    var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
    created.return = returnFiber;
    return created;
  }

  // This API will tag the children with the side-effect of the reconciliation
  // itself. They will be added to the side-effect list as we pass through the
  // children and the parent.
  function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {
    // This function is not recursive.
    // If the top level item is an array, we treat it as a set of children,
    // not as a fragment. Nested arrays on the other hand will be treated as
    // fragment nodes. Recursion happens at the normal flow.

    // Handle top level unkeyed fragments as if they were arrays.
    // This leads to an ambiguity between <>{[...]}</> and <>...</>.
    // We treat the ambiguous cases above the same.
    var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;
    if (isUnkeyedTopLevelFragment) {
      newChild = newChild.props.children;
    }

    // Handle object types
    var isObject = typeof newChild === 'object' && newChild !== null;

    if (isObject) {
      switch (newChild.$$typeof) {
        case REACT_ELEMENT_TYPE:
          return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));
        case REACT_PORTAL_TYPE:
          return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));
      }
    }

    if (typeof newChild === 'string' || typeof newChild === 'number') {
      return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));
    }

    if (isArray(newChild)) {
      return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);
    }

    if (getIteratorFn(newChild)) {
      return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);
    }

    if (isObject) {
      throwOnInvalidObjectType(returnFiber, newChild);
    }

    {
      if (typeof newChild === 'function') {
        warnOnFunctionType();
      }
    }
    if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {
      // If the new child is undefined, and the return fiber is a composite
      // component, throw an error. If Fiber return types are disabled,
      // we already threw above.
      switch (returnFiber.tag) {
        case ClassComponent:
          {
            {
              var instance = returnFiber.stateNode;
              if (instance.render._isMockFunction) {
                // We allow auto-mocks to proceed as if they're returning null.
                break;
              }
            }
          }
        // Intentionally fall through to the next case, which handles both
        // functions and classes
        // eslint-disable-next-lined no-fallthrough
        case FunctionComponent:
          {
            var Component = returnFiber.type;
            (function () {
              {
                {
                  throw ReactError(Error((Component.displayName || Component.name || 'Component') + '(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.'));
                }
              }
            })();
          }
      }
    }

    // Remaining cases are all treated as empty.
    return deleteRemainingChildren(returnFiber, currentFirstChild);
  }

  return reconcileChildFibers;
}

var reconcileChildFibers = ChildReconciler(true);
var mountChildFibers = ChildReconciler(false);

function cloneChildFibers(current$$1, workInProgress) {
  (function () {
    if (!(current$$1 === null || workInProgress.child === current$$1.child)) {
      {
        throw ReactError(Error('Resuming work not yet implemented.'));
      }
    }
  })();

  if (workInProgress.child === null) {
    return;
  }

  var currentChild = workInProgress.child;
  var newChild = createWorkInProgress(currentChild, currentChild.pendingProps, currentChild.expirationTime);
  workInProgress.child = newChild;

  newChild.return = workInProgress;
  while (currentChild.sibling !== null) {
    currentChild = currentChild.sibling;
    newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps, currentChild.expirationTime);
    newChild.return = workInProgress;
  }
  newChild.sibling = null;
}

// Reset a workInProgress child set to prepare it for a second pass.
function resetChildFibers(workInProgress, renderExpirationTime) {
  var child = workInProgress.child;
  while (child !== null) {
    resetWorkInProgress(child, renderExpirationTime);
    child = child.sibling;
  }
}

var NO_CONTEXT = {};

var contextStackCursor$1 = createCursor(NO_CONTEXT);
var contextFiberStackCursor = createCursor(NO_CONTEXT);
var rootInstanceStackCursor = createCursor(NO_CONTEXT);

function requiredContext(c) {
  (function () {
    if (!(c !== NO_CONTEXT)) {
      {
        throw ReactError(Error('Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.'));
      }
    }
  })();
  return c;
}

function getRootHostContainer() {
  var rootInstance = requiredContext(rootInstanceStackCursor.current);
  return rootInstance;
}

function pushHostContainer(fiber, nextRootInstance) {
  // Push current root instance onto the stack;
  // This allows us to reset root when portals are popped.
  push(rootInstanceStackCursor, nextRootInstance, fiber);
  // Track the context and the Fiber that provided it.
  // This enables us to pop only Fibers that provide unique contexts.
  push(contextFiberStackCursor, fiber, fiber);

  // Finally, we need to push the host context to the stack.
  // However, we can't just call getRootHostContext() and push it because
  // we'd have a different number of entries on the stack depending on
  // whether getRootHostContext() throws somewhere in renderer code or not.
  // So we push an empty value first. This lets us safely unwind on errors.
  push(contextStackCursor$1, NO_CONTEXT, fiber);
  var nextRootContext = getRootHostContext(nextRootInstance);
  // Now that we know this function doesn't throw, replace it.
  pop(contextStackCursor$1, fiber);
  push(contextStackCursor$1, nextRootContext, fiber);
}

function popHostContainer(fiber) {
  pop(contextStackCursor$1, fiber);
  pop(contextFiberStackCursor, fiber);
  pop(rootInstanceStackCursor, fiber);
}

function getHostContext() {
  var context = requiredContext(contextStackCursor$1.current);
  return context;
}

function pushHostContext(fiber) {
  var rootInstance = requiredContext(rootInstanceStackCursor.current);
  var context = requiredContext(contextStackCursor$1.current);
  var nextContext = getChildHostContext(context, fiber.type, rootInstance);

  // Don't push this Fiber's context unless it's unique.
  if (context === nextContext) {
    return;
  }

  // Track the context and the Fiber that provided it.
  // This enables us to pop only Fibers that provide unique contexts.
  push(contextFiberStackCursor, fiber, fiber);
  push(contextStackCursor$1, nextContext, fiber);
}

function popHostContext(fiber) {
  // Do not pop unless this Fiber provided the current context.
  // pushHostContext() only pushes Fibers that provide unique contexts.
  if (contextFiberStackCursor.current !== fiber) {
    return;
  }

  pop(contextStackCursor$1, fiber);
  pop(contextFiberStackCursor, fiber);
}

var DefaultSuspenseContext = 0;

// The Suspense Context is split into two parts. The lower bits is
// inherited deeply down the subtree. The upper bits only affect
// this immediate suspense boundary and gets reset each new
// boundary or suspense list.
var SubtreeSuspenseContextMask = 1;

// Subtree Flags:

// InvisibleParentSuspenseContext indicates that one of our parent Suspense
// boundaries is not currently showing visible main content.
// Either because it is already showing a fallback or is not mounted at all.
// We can use this to determine if it is desirable to trigger a fallback at
// the parent. If not, then we might need to trigger undesirable boundaries
// and/or suspend the commit to avoid hiding the parent content.
var InvisibleParentSuspenseContext = 1;

// Shallow Flags:

// ForceSuspenseFallback can be used by SuspenseList to force newly added
// items into their fallback state during one of the render passes.
var ForceSuspenseFallback = 2;

var suspenseStackCursor = createCursor(DefaultSuspenseContext);

function hasSuspenseContext(parentContext, flag) {
  return (parentContext & flag) !== 0;
}

function setDefaultShallowSuspenseContext(parentContext) {
  return parentContext & SubtreeSuspenseContextMask;
}

function setShallowSuspenseContext(parentContext, shallowContext) {
  return parentContext & SubtreeSuspenseContextMask | shallowContext;
}

function addSubtreeSuspenseContext(parentContext, subtreeContext) {
  return parentContext | subtreeContext;
}

function pushSuspenseContext(fiber, newContext) {
  push(suspenseStackCursor, newContext, fiber);
}

function popSuspenseContext(fiber) {
  pop(suspenseStackCursor, fiber);
}

// TODO: This is now an empty object. Should we switch this to a boolean?
// Alternatively we can make this use an effect tag similar to SuspenseList.


function shouldCaptureSuspense(workInProgress, hasInvisibleParent) {
  // If it was the primary children that just suspended, capture and render the
  var nextState = workInProgress.memoizedState;
  if (nextState !== null) {
    return false;
  }
  var props = workInProgress.memoizedProps;
  // In order to capture, the Suspense component must have a fallback prop.
  if (props.fallback === undefined) {
    return false;
  }
  // Regular boundaries always capture.
  if (props.unstable_avoidThisFallback !== true) {
    return true;
  }
  // If it's a boundary we should avoid, then we prefer to bubble up to the
  // parent boundary if it is currently invisible.
  if (hasInvisibleParent) {
    return false;
  }
  // If the parent is not able to handle it, we must handle it.
  return true;
}

function findFirstSuspended(row) {
  var node = row;
  while (node !== null) {
    if (node.tag === SuspenseComponent) {
      var state = node.memoizedState;
      if (state !== null) {
        return node;
      }
    } else if (node.tag === SuspenseListComponent &&
    // revealOrder undefined can't be trusted because it don't
    // keep track of whether it suspended or not.
    node.memoizedProps.revealOrder !== undefined) {
      var didSuspend = (node.effectTag & DidCapture) !== NoEffect;
      if (didSuspend) {
        return node;
      }
    } else if (node.child !== null) {
      node.child.return = node;
      node = node.child;
      continue;
    }
    if (node === row) {
      return null;
    }
    while (node.sibling === null) {
      if (node.return === null || node.return === row) {
        return null;
      }
      node = node.return;
    }
    node.sibling.return = node.return;
    node = node.sibling;
  }
  return null;
}

var NoEffect$1 = /*             */0;
var UnmountSnapshot = /*      */2;
var UnmountMutation = /*      */4;
var MountMutation = /*        */8;
var UnmountLayout = /*        */16;
var MountLayout = /*          */32;
var MountPassive = /*         */64;
var UnmountPassive = /*       */128;

var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;


var didWarnAboutMismatchedHooksForComponent = void 0;
{
  didWarnAboutMismatchedHooksForComponent = new Set();
}

// These are set right before calling the component.
var renderExpirationTime$1 = NoWork;
// The work-in-progress fiber. I've named it differently to distinguish it from
// the work-in-progress hook.
var currentlyRenderingFiber$1 = null;

// Hooks are stored as a linked list on the fiber's memoizedState field. The
// current hook list is the list that belongs to the current fiber. The
// work-in-progress hook list is a new list that will be added to the
// work-in-progress fiber.
var currentHook = null;
var nextCurrentHook = null;
var firstWorkInProgressHook = null;
var workInProgressHook = null;
var nextWorkInProgressHook = null;

var remainingExpirationTime = NoWork;
var componentUpdateQueue = null;
var sideEffectTag = 0;

// Updates scheduled during render will trigger an immediate re-render at the
// end of the current pass. We can't store these updates on the normal queue,
// because if the work is aborted, they should be discarded. Because this is
// a relatively rare case, we also don't want to add an additional field to
// either the hook or queue object types. So we store them in a lazily create
// map of queue -> render-phase updates, which are discarded once the component
// completes without re-rendering.

// Whether an update was scheduled during the currently executing render pass.
var didScheduleRenderPhaseUpdate = false;
// Lazily created map of render-phase updates
var renderPhaseUpdates = null;
// Counter to prevent infinite loops.
var numberOfReRenders = 0;
var RE_RENDER_LIMIT = 25;

// In DEV, this is the name of the currently executing primitive hook
var currentHookNameInDev = null;

// In DEV, this list ensures that hooks are called in the same order between renders.
// The list stores the order of hooks used during the initial render (mount).
// Subsequent renders (updates) reference this list.
var hookTypesDev = null;
var hookTypesUpdateIndexDev = -1;

// In DEV, this tracks whether currently rendering component needs to ignore
// the dependencies for Hooks that need them (e.g. useEffect or useMemo).
// When true, such Hooks will always be "remounted". Only used during hot reload.
var ignorePreviousDependencies = false;

function mountHookTypesDev() {
  {
    var hookName = currentHookNameInDev;

    if (hookTypesDev === null) {
      hookTypesDev = [hookName];
    } else {
      hookTypesDev.push(hookName);
    }
  }
}

function updateHookTypesDev() {
  {
    var hookName = currentHookNameInDev;

    if (hookTypesDev !== null) {
      hookTypesUpdateIndexDev++;
      if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {
        warnOnHookMismatchInDev(hookName);
      }
    }
  }
}

function checkDepsAreArrayDev(deps) {
  {
    if (deps !== undefined && deps !== null && !Array.isArray(deps)) {
      // Verify deps, but only on mount to avoid extra checks.
      // It's unlikely their type would change as usually you define them inline.
      warning$1(false, '%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);
    }
  }
}

function warnOnHookMismatchInDev(currentHookName) {
  {
    var componentName = getComponentName(currentlyRenderingFiber$1.type);
    if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {
      didWarnAboutMismatchedHooksForComponent.add(componentName);

      if (hookTypesDev !== null) {
        var table = '';

        var secondColumnStart = 30;

        for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {
          var oldHookName = hookTypesDev[i];
          var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;

          var row = i + 1 + '. ' + oldHookName;

          // Extra space so second column lines up
          // lol @ IE not supporting String#repeat
          while (row.length < secondColumnStart) {
            row += ' ';
          }

          row += newHookName + '\n';

          table += row;
        }

        warning$1(false, 'React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + '   Previous render            Next render\n' + '   ------------------------------------------------------\n' + '%s' + '   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', componentName, table);
      }
    }
  }
}

function throwInvalidHookError() {
  (function () {
    {
      {
        throw ReactError(Error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.'));
      }
    }
  })();
}

function areHookInputsEqual(nextDeps, prevDeps) {
  {
    if (ignorePreviousDependencies) {
      // Only true when this component is being hot reloaded.
      return false;
    }
  }

  if (prevDeps === null) {
    {
      warning$1(false, '%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);
    }
    return false;
  }

  {
    // Don't bother comparing lengths in prod because these arrays should be
    // passed inline.
    if (nextDeps.length !== prevDeps.length) {
      warning$1(false, 'The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, '[' + prevDeps.join(', ') + ']', '[' + nextDeps.join(', ') + ']');
    }
  }
  for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
    if (is(nextDeps[i], prevDeps[i])) {
      continue;
    }
    return false;
  }
  return true;
}

function renderWithHooks(current, workInProgress, Component, props, refOrContext, nextRenderExpirationTime) {
  renderExpirationTime$1 = nextRenderExpirationTime;
  currentlyRenderingFiber$1 = workInProgress;
  nextCurrentHook = current !== null ? current.memoizedState : null;

  {
    hookTypesDev = current !== null ? current._debugHookTypes : null;
    hookTypesUpdateIndexDev = -1;
    // Used for hot reloading:
    ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;
  }

  // The following should have already been reset
  // currentHook = null;
  // workInProgressHook = null;

  // remainingExpirationTime = NoWork;
  // componentUpdateQueue = null;

  // didScheduleRenderPhaseUpdate = false;
  // renderPhaseUpdates = null;
  // numberOfReRenders = 0;
  // sideEffectTag = 0;

  // TODO Warn if no hooks are used at all during mount, then some are used during update.
  // Currently we will identify the update render as a mount because nextCurrentHook === null.
  // This is tricky because it's valid for certain types of components (e.g. React.lazy)

  // Using nextCurrentHook to differentiate between mount/update only works if at least one stateful hook is used.
  // Non-stateful hooks (e.g. context) don't get added to memoizedState,
  // so nextCurrentHook would be null during updates and mounts.
  {
    if (nextCurrentHook !== null) {
      ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;
    } else if (hookTypesDev !== null) {
      // This dispatcher handles an edge case where a component is updating,
      // but no stateful hooks have been used.
      // We want to match the production code behavior (which will use HooksDispatcherOnMount),
      // but with the extra DEV validation to ensure hooks ordering hasn't changed.
      // This dispatcher does that.
      ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV;
    } else {
      ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;
    }
  }

  var children = Component(props, refOrContext);

  if (didScheduleRenderPhaseUpdate) {
    do {
      didScheduleRenderPhaseUpdate = false;
      numberOfReRenders += 1;

      // Start over from the beginning of the list
      nextCurrentHook = current !== null ? current.memoizedState : null;
      nextWorkInProgressHook = firstWorkInProgressHook;

      currentHook = null;
      workInProgressHook = null;
      componentUpdateQueue = null;

      {
        // Also validate hook order for cascading updates.
        hookTypesUpdateIndexDev = -1;
      }

      ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;

      children = Component(props, refOrContext);
    } while (didScheduleRenderPhaseUpdate);

    renderPhaseUpdates = null;
    numberOfReRenders = 0;
  }

  // We can assume the previous dispatcher is always this one, since we set it
  // at the beginning of the render phase and there's no re-entrancy.
  ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;

  var renderedWork = currentlyRenderingFiber$1;

  renderedWork.memoizedState = firstWorkInProgressHook;
  renderedWork.expirationTime = remainingExpirationTime;
  renderedWork.updateQueue = componentUpdateQueue;
  renderedWork.effectTag |= sideEffectTag;

  {
    renderedWork._debugHookTypes = hookTypesDev;
  }

  // This check uses currentHook so that it works the same in DEV and prod bundles.
  // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.
  var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;

  renderExpirationTime$1 = NoWork;
  currentlyRenderingFiber$1 = null;

  currentHook = null;
  nextCurrentHook = null;
  firstWorkInProgressHook = null;
  workInProgressHook = null;
  nextWorkInProgressHook = null;

  {
    currentHookNameInDev = null;
    hookTypesDev = null;
    hookTypesUpdateIndexDev = -1;
  }

  remainingExpirationTime = NoWork;
  componentUpdateQueue = null;
  sideEffectTag = 0;

  // These were reset above
  // didScheduleRenderPhaseUpdate = false;
  // renderPhaseUpdates = null;
  // numberOfReRenders = 0;

  (function () {
    if (!!didRenderTooFewHooks) {
      {
        throw ReactError(Error('Rendered fewer hooks than expected. This may be caused by an accidental early return statement.'));
      }
    }
  })();

  return children;
}

function bailoutHooks(current, workInProgress, expirationTime) {
  workInProgress.updateQueue = current.updateQueue;
  workInProgress.effectTag &= ~(Passive | Update);
  if (current.expirationTime <= expirationTime) {
    current.expirationTime = NoWork;
  }
}

function resetHooks() {
  // We can assume the previous dispatcher is always this one, since we set it
  // at the beginning of the render phase and there's no re-entrancy.
  ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;

  // This is used to reset the state of this module when a component throws.
  // It's also called inside mountIndeterminateComponent if we determine the
  // component is a module-style component.
  renderExpirationTime$1 = NoWork;
  currentlyRenderingFiber$1 = null;

  currentHook = null;
  nextCurrentHook = null;
  firstWorkInProgressHook = null;
  workInProgressHook = null;
  nextWorkInProgressHook = null;

  {
    hookTypesDev = null;
    hookTypesUpdateIndexDev = -1;

    currentHookNameInDev = null;
  }

  remainingExpirationTime = NoWork;
  componentUpdateQueue = null;
  sideEffectTag = 0;

  didScheduleRenderPhaseUpdate = false;
  renderPhaseUpdates = null;
  numberOfReRenders = 0;
}

function mountWorkInProgressHook() {
  var hook = {
    memoizedState: null,

    baseState: null,
    queue: null,
    baseUpdate: null,

    next: null
  };

  if (workInProgressHook === null) {
    // This is the first hook in the list
    firstWorkInProgressHook = workInProgressHook = hook;
  } else {
    // Append to the end of the list
    workInProgressHook = workInProgressHook.next = hook;
  }
  return workInProgressHook;
}

function updateWorkInProgressHook() {
  // This function is used both for updates and for re-renders triggered by a
  // render phase update. It assumes there is either a current hook we can
  // clone, or a work-in-progress hook from a previous render pass that we can
  // use as a base. When we reach the end of the base list, we must switch to
  // the dispatcher used for mounts.
  if (nextWorkInProgressHook !== null) {
    // There's already a work-in-progress. Reuse it.
    workInProgressHook = nextWorkInProgressHook;
    nextWorkInProgressHook = workInProgressHook.next;

    currentHook = nextCurrentHook;
    nextCurrentHook = currentHook !== null ? currentHook.next : null;
  } else {
    // Clone from the current hook.
    (function () {
      if (!(nextCurrentHook !== null)) {
        {
          throw ReactError(Error('Rendered more hooks than during the previous render.'));
        }
      }
    })();
    currentHook = nextCurrentHook;

    var newHook = {
      memoizedState: currentHook.memoizedState,

      baseState: currentHook.baseState,
      queue: currentHook.queue,
      baseUpdate: currentHook.baseUpdate,

      next: null
    };

    if (workInProgressHook === null) {
      // This is the first hook in the list.
      workInProgressHook = firstWorkInProgressHook = newHook;
    } else {
      // Append to the end of the list.
      workInProgressHook = workInProgressHook.next = newHook;
    }
    nextCurrentHook = currentHook.next;
  }
  return workInProgressHook;
}

function createFunctionComponentUpdateQueue() {
  return {
    lastEffect: null
  };
}

function basicStateReducer(state, action) {
  return typeof action === 'function' ? action(state) : action;
}

function mountReducer(reducer, initialArg, init) {
  var hook = mountWorkInProgressHook();
  var initialState = void 0;
  if (init !== undefined) {
    initialState = init(initialArg);
  } else {
    initialState = initialArg;
  }
  hook.memoizedState = hook.baseState = initialState;
  var queue = hook.queue = {
    last: null,
    dispatch: null,
    lastRenderedReducer: reducer,
    lastRenderedState: initialState
  };
  var dispatch = queue.dispatch = dispatchAction.bind(null,
  // Flow doesn't know this is non-null, but we do.
  currentlyRenderingFiber$1, queue);
  return [hook.memoizedState, dispatch];
}

function updateReducer(reducer, initialArg, init) {
  var hook = updateWorkInProgressHook();
  var queue = hook.queue;
  (function () {
    if (!(queue !== null)) {
      {
        throw ReactError(Error('Should have a queue. This is likely a bug in React. Please file an issue.'));
      }
    }
  })();

  queue.lastRenderedReducer = reducer;

  if (numberOfReRenders > 0) {
    // This is a re-render. Apply the new render phase updates to the previous
    var _dispatch = queue.dispatch;
    if (renderPhaseUpdates !== null) {
      // Render phase updates are stored in a map of queue -> linked list
      var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
      if (firstRenderPhaseUpdate !== undefined) {
        renderPhaseUpdates.delete(queue);
        var newState = hook.memoizedState;
        var update = firstRenderPhaseUpdate;
        do {
          // Process this render phase update. We don't have to check the
          // priority because it will always be the same as the current
          // render's.
          var _action = update.action;
          newState = reducer(newState, _action);
          update = update.next;
        } while (update !== null);

        // Mark that the fiber performed work, but only if the new state is
        // different from the current state.
        if (!is(newState, hook.memoizedState)) {
          markWorkInProgressReceivedUpdate();
        }

        hook.memoizedState = newState;
        // Don't persist the state accumulated from the render phase updates to
        // the base state unless the queue is empty.
        // TODO: Not sure if this is the desired semantics, but it's what we
        // do for gDSFP. I can't remember why.
        if (hook.baseUpdate === queue.last) {
          hook.baseState = newState;
        }

        queue.lastRenderedState = newState;

        return [newState, _dispatch];
      }
    }
    return [hook.memoizedState, _dispatch];
  }

  // The last update in the entire queue
  var last = queue.last;
  // The last update that is part of the base state.
  var baseUpdate = hook.baseUpdate;
  var baseState = hook.baseState;

  // Find the first unprocessed update.
  var first = void 0;
  if (baseUpdate !== null) {
    if (last !== null) {
      // For the first update, the queue is a circular linked list where
      // `queue.last.next = queue.first`. Once the first update commits, and
      // the `baseUpdate` is no longer empty, we can unravel the list.
      last.next = null;
    }
    first = baseUpdate.next;
  } else {
    first = last !== null ? last.next : null;
  }
  if (first !== null) {
    var _newState = baseState;
    var newBaseState = null;
    var newBaseUpdate = null;
    var prevUpdate = baseUpdate;
    var _update = first;
    var didSkip = false;
    do {
      var updateExpirationTime = _update.expirationTime;
      if (updateExpirationTime < renderExpirationTime$1) {
        // Priority is insufficient. Skip this update. If this is the first
        // skipped update, the previous update/state is the new base
        // update/state.
        if (!didSkip) {
          didSkip = true;
          newBaseUpdate = prevUpdate;
          newBaseState = _newState;
        }
        // Update the remaining priority in the queue.
        if (updateExpirationTime > remainingExpirationTime) {
          remainingExpirationTime = updateExpirationTime;
        }
      } else {
        // This update does have sufficient priority.

        // Mark the event time of this update as relevant to this render pass.
        // TODO: This should ideally use the true event time of this update rather than
        // its priority which is a derived and not reverseable value.
        // TODO: We should skip this update if it was already committed but currently
        // we have no way of detecting the difference between a committed and suspended
        // update here.
        markRenderEventTimeAndConfig(updateExpirationTime, _update.suspenseConfig);

        // Process this update.
        if (_update.eagerReducer === reducer) {
          // If this update was processed eagerly, and its reducer matches the
          // current reducer, we can use the eagerly computed state.
          _newState = _update.eagerState;
        } else {
          var _action2 = _update.action;
          _newState = reducer(_newState, _action2);
        }
      }
      prevUpdate = _update;
      _update = _update.next;
    } while (_update !== null && _update !== first);

    if (!didSkip) {
      newBaseUpdate = prevUpdate;
      newBaseState = _newState;
    }

    // Mark that the fiber performed work, but only if the new state is
    // different from the current state.
    if (!is(_newState, hook.memoizedState)) {
      markWorkInProgressReceivedUpdate();
    }

    hook.memoizedState = _newState;
    hook.baseUpdate = newBaseUpdate;
    hook.baseState = newBaseState;

    queue.lastRenderedState = _newState;
  }

  var dispatch = queue.dispatch;
  return [hook.memoizedState, dispatch];
}

function mountState(initialState) {
  var hook = mountWorkInProgressHook();
  if (typeof initialState === 'function') {
    initialState = initialState();
  }
  hook.memoizedState = hook.baseState = initialState;
  var queue = hook.queue = {
    last: null,
    dispatch: null,
    lastRenderedReducer: basicStateReducer,
    lastRenderedState: initialState
  };
  var dispatch = queue.dispatch = dispatchAction.bind(null,
  // Flow doesn't know this is non-null, but we do.
  currentlyRenderingFiber$1, queue);
  return [hook.memoizedState, dispatch];
}

function updateState(initialState) {
  return updateReducer(basicStateReducer, initialState);
}

function pushEffect(tag, create, destroy, deps) {
  var effect = {
    tag: tag,
    create: create,
    destroy: destroy,
    deps: deps,
    // Circular
    next: null
  };
  if (componentUpdateQueue === null) {
    componentUpdateQueue = createFunctionComponentUpdateQueue();
    componentUpdateQueue.lastEffect = effect.next = effect;
  } else {
    var _lastEffect = componentUpdateQueue.lastEffect;
    if (_lastEffect === null) {
      componentUpdateQueue.lastEffect = effect.next = effect;
    } else {
      var firstEffect = _lastEffect.next;
      _lastEffect.next = effect;
      effect.next = firstEffect;
      componentUpdateQueue.lastEffect = effect;
    }
  }
  return effect;
}

function mountRef(initialValue) {
  var hook = mountWorkInProgressHook();
  var ref = { current: initialValue };
  {
    Object.seal(ref);
  }
  hook.memoizedState = ref;
  return ref;
}

function updateRef(initialValue) {
  var hook = updateWorkInProgressHook();
  return hook.memoizedState;
}

function mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
  var hook = mountWorkInProgressHook();
  var nextDeps = deps === undefined ? null : deps;
  sideEffectTag |= fiberEffectTag;
  hook.memoizedState = pushEffect(hookEffectTag, create, undefined, nextDeps);
}

function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
  var hook = updateWorkInProgressHook();
  var nextDeps = deps === undefined ? null : deps;
  var destroy = undefined;

  if (currentHook !== null) {
    var prevEffect = currentHook.memoizedState;
    destroy = prevEffect.destroy;
    if (nextDeps !== null) {
      var prevDeps = prevEffect.deps;
      if (areHookInputsEqual(nextDeps, prevDeps)) {
        pushEffect(NoEffect$1, create, destroy, nextDeps);
        return;
      }
    }
  }

  sideEffectTag |= fiberEffectTag;
  hook.memoizedState = pushEffect(hookEffectTag, create, destroy, nextDeps);
}

function mountEffect(create, deps) {
  {
    // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
    if ('undefined' !== typeof jest) {
      warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);
    }
  }
  return mountEffectImpl(Update | Passive, UnmountPassive | MountPassive, create, deps);
}

function updateEffect(create, deps) {
  {
    // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
    if ('undefined' !== typeof jest) {
      warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);
    }
  }
  return updateEffectImpl(Update | Passive, UnmountPassive | MountPassive, create, deps);
}

function mountLayoutEffect(create, deps) {
  return mountEffectImpl(Update, UnmountMutation | MountLayout, create, deps);
}

function updateLayoutEffect(create, deps) {
  return updateEffectImpl(Update, UnmountMutation | MountLayout, create, deps);
}

function imperativeHandleEffect(create, ref) {
  if (typeof ref === 'function') {
    var refCallback = ref;
    var _inst = create();
    refCallback(_inst);
    return function () {
      refCallback(null);
    };
  } else if (ref !== null && ref !== undefined) {
    var refObject = ref;
    {
      !refObject.hasOwnProperty('current') ? warning$1(false, 'Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}') : void 0;
    }
    var _inst2 = create();
    refObject.current = _inst2;
    return function () {
      refObject.current = null;
    };
  }
}

function mountImperativeHandle(ref, create, deps) {
  {
    !(typeof create === 'function') ? warning$1(false, 'Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null') : void 0;
  }

  // TODO: If deps are provided, should we skip comparing the ref itself?
  var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;

  return mountEffectImpl(Update, UnmountMutation | MountLayout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
}

function updateImperativeHandle(ref, create, deps) {
  {
    !(typeof create === 'function') ? warning$1(false, 'Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null') : void 0;
  }

  // TODO: If deps are provided, should we skip comparing the ref itself?
  var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;

  return updateEffectImpl(Update, UnmountMutation | MountLayout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
}

function mountDebugValue(value, formatterFn) {
  // This hook is normally a no-op.
  // The react-debug-hooks package injects its own implementation
  // so that e.g. DevTools can display custom hook values.
}

var updateDebugValue = mountDebugValue;

function mountCallback(callback, deps) {
  var hook = mountWorkInProgressHook();
  var nextDeps = deps === undefined ? null : deps;
  hook.memoizedState = [callback, nextDeps];
  return callback;
}

function updateCallback(callback, deps) {
  var hook = updateWorkInProgressHook();
  var nextDeps = deps === undefined ? null : deps;
  var prevState = hook.memoizedState;
  if (prevState !== null) {
    if (nextDeps !== null) {
      var prevDeps = prevState[1];
      if (areHookInputsEqual(nextDeps, prevDeps)) {
        return prevState[0];
      }
    }
  }
  hook.memoizedState = [callback, nextDeps];
  return callback;
}

function mountMemo(nextCreate, deps) {
  var hook = mountWorkInProgressHook();
  var nextDeps = deps === undefined ? null : deps;
  var nextValue = nextCreate();
  hook.memoizedState = [nextValue, nextDeps];
  return nextValue;
}

function updateMemo(nextCreate, deps) {
  var hook = updateWorkInProgressHook();
  var nextDeps = deps === undefined ? null : deps;
  var prevState = hook.memoizedState;
  if (prevState !== null) {
    // Assume these are defined. If they're not, areHookInputsEqual will warn.
    if (nextDeps !== null) {
      var prevDeps = prevState[1];
      if (areHookInputsEqual(nextDeps, prevDeps)) {
        return prevState[0];
      }
    }
  }
  var nextValue = nextCreate();
  hook.memoizedState = [nextValue, nextDeps];
  return nextValue;
}

function dispatchAction(fiber, queue, action) {
  (function () {
    if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
      {
        throw ReactError(Error('Too many re-renders. React limits the number of renders to prevent an infinite loop.'));
      }
    }
  })();

  {
    !(arguments.length <= 3) ? warning$1(false, "State updates from the useState() and useReducer() Hooks don't support the " + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().') : void 0;
  }

  var alternate = fiber.alternate;
  if (fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1) {
    // This is a render phase update. Stash it in a lazily-created map of
    // queue -> linked list of updates. After this render pass, we'll restart
    // and apply the stashed updates on top of the work-in-progress hook.
    didScheduleRenderPhaseUpdate = true;
    var update = {
      expirationTime: renderExpirationTime$1,
      suspenseConfig: null,
      action: action,
      eagerReducer: null,
      eagerState: null,
      next: null
    };
    {
      update.priority = getCurrentPriorityLevel();
    }
    if (renderPhaseUpdates === null) {
      renderPhaseUpdates = new Map();
    }
    var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
    if (firstRenderPhaseUpdate === undefined) {
      renderPhaseUpdates.set(queue, update);
    } else {
      // Append the update to the end of the list.
      var lastRenderPhaseUpdate = firstRenderPhaseUpdate;
      while (lastRenderPhaseUpdate.next !== null) {
        lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
      }
      lastRenderPhaseUpdate.next = update;
    }
  } else {
    if (revertPassiveEffectsChange) {
      flushPassiveEffects();
    }

    var currentTime = requestCurrentTime();
    var _suspenseConfig = requestCurrentSuspenseConfig();
    var _expirationTime = computeExpirationForFiber(currentTime, fiber, _suspenseConfig);

    var _update2 = {
      expirationTime: _expirationTime,
      suspenseConfig: _suspenseConfig,
      action: action,
      eagerReducer: null,
      eagerState: null,
      next: null
    };

    {
      _update2.priority = getCurrentPriorityLevel();
    }

    // Append the update to the end of the list.
    var _last = queue.last;
    if (_last === null) {
      // This is the first update. Create a circular list.
      _update2.next = _update2;
    } else {
      var first = _last.next;
      if (first !== null) {
        // Still circular.
        _update2.next = first;
      }
      _last.next = _update2;
    }
    queue.last = _update2;

    if (fiber.expirationTime === NoWork && (alternate === null || alternate.expirationTime === NoWork)) {
      // The queue is currently empty, which means we can eagerly compute the
      // next state before entering the render phase. If the new state is the
      // same as the current state, we may be able to bail out entirely.
      var _lastRenderedReducer = queue.lastRenderedReducer;
      if (_lastRenderedReducer !== null) {
        var prevDispatcher = void 0;
        {
          prevDispatcher = ReactCurrentDispatcher$1.current;
          ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
        }
        try {
          var currentState = queue.lastRenderedState;
          var _eagerState = _lastRenderedReducer(currentState, action);
          // Stash the eagerly computed state, and the reducer used to compute
          // it, on the update object. If the reducer hasn't changed by the
          // time we enter the render phase, then the eager state can be used
          // without calling the reducer again.
          _update2.eagerReducer = _lastRenderedReducer;
          _update2.eagerState = _eagerState;
          if (is(_eagerState, currentState)) {
            // Fast path. We can bail out without scheduling React to re-render.
            // It's still possible that we'll need to rebase this update later,
            // if the component re-renders for a different reason and by that
            // time the reducer has changed.
            return;
          }
        } catch (error) {
          // Suppress the error. It will throw again in the render phase.
        } finally {
          {
            ReactCurrentDispatcher$1.current = prevDispatcher;
          }
        }
      }
    }
    {
      // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
      if ('undefined' !== typeof jest) {
        warnIfNotScopedWithMatchingAct(fiber);
        warnIfNotCurrentlyActingUpdatesInDev(fiber);
      }
    }
    scheduleWork(fiber, _expirationTime);
  }
}

var ContextOnlyDispatcher = {
  readContext: readContext,

  useCallback: throwInvalidHookError,
  useContext: throwInvalidHookError,
  useEffect: throwInvalidHookError,
  useImperativeHandle: throwInvalidHookError,
  useLayoutEffect: throwInvalidHookError,
  useMemo: throwInvalidHookError,
  useReducer: throwInvalidHookError,
  useRef: throwInvalidHookError,
  useState: throwInvalidHookError,
  useDebugValue: throwInvalidHookError,
  useResponder: throwInvalidHookError
};

var HooksDispatcherOnMountInDEV = null;
var HooksDispatcherOnMountWithHookTypesInDEV = null;
var HooksDispatcherOnUpdateInDEV = null;
var InvalidNestedHooksDispatcherOnMountInDEV = null;
var InvalidNestedHooksDispatcherOnUpdateInDEV = null;

{
  var warnInvalidContextAccess = function () {
    warning$1(false, 'Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
  };

  var warnInvalidHookAccess = function () {
    warning$1(false, 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks');
  };

  HooksDispatcherOnMountInDEV = {
    readContext: function (context, observedBits) {
      return readContext(context, observedBits);
    },
    useCallback: function (callback, deps) {
      currentHookNameInDev = 'useCallback';
      mountHookTypesDev();
      checkDepsAreArrayDev(deps);
      return mountCallback(callback, deps);
    },
    useContext: function (context, observedBits) {
      currentHookNameInDev = 'useContext';
      mountHookTypesDev();
      return readContext(context, observedBits);
    },
    useEffect: function (create, deps) {
      currentHookNameInDev = 'useEffect';
      mountHookTypesDev();
      checkDepsAreArrayDev(deps);
      return mountEffect(create, deps);
    },
    useImperativeHandle: function (ref, create, deps) {
      currentHookNameInDev = 'useImperativeHandle';
      mountHookTypesDev();
      checkDepsAreArrayDev(deps);
      return mountImperativeHandle(ref, create, deps);
    },
    useLayoutEffect: function (create, deps) {
      currentHookNameInDev = 'useLayoutEffect';
      mountHookTypesDev();
      checkDepsAreArrayDev(deps);
      return mountLayoutEffect(create, deps);
    },
    useMemo: function (create, deps) {
      currentHookNameInDev = 'useMemo';
      mountHookTypesDev();
      checkDepsAreArrayDev(deps);
      var prevDispatcher = ReactCurrentDispatcher$1.current;
      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
      try {
        return mountMemo(create, deps);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useReducer: function (reducer, initialArg, init) {
      currentHookNameInDev = 'useReducer';
      mountHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher$1.current;
      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
      try {
        return mountReducer(reducer, initialArg, init);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useRef: function (initialValue) {
      currentHookNameInDev = 'useRef';
      mountHookTypesDev();
      return mountRef(initialValue);
    },
    useState: function (initialState) {
      currentHookNameInDev = 'useState';
      mountHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher$1.current;
      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
      try {
        return mountState(initialState);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useDebugValue: function (value, formatterFn) {
      currentHookNameInDev = 'useDebugValue';
      mountHookTypesDev();
      return mountDebugValue(value, formatterFn);
    },
    useResponder: function (responder, props) {
      currentHookNameInDev = 'useResponder';
      mountHookTypesDev();
      return createResponderListener(responder, props);
    }
  };

  HooksDispatcherOnMountWithHookTypesInDEV = {
    readContext: function (context, observedBits) {
      return readContext(context, observedBits);
    },
    useCallback: function (callback, deps) {
      currentHookNameInDev = 'useCallback';
      updateHookTypesDev();
      return mountCallback(callback, deps);
    },
    useContext: function (context, observedBits) {
      currentHookNameInDev = 'useContext';
      updateHookTypesDev();
      return readContext(context, observedBits);
    },
    useEffect: function (create, deps) {
      currentHookNameInDev = 'useEffect';
      updateHookTypesDev();
      return mountEffect(create, deps);
    },
    useImperativeHandle: function (ref, create, deps) {
      currentHookNameInDev = 'useImperativeHandle';
      updateHookTypesDev();
      return mountImperativeHandle(ref, create, deps);
    },
    useLayoutEffect: function (create, deps) {
      currentHookNameInDev = 'useLayoutEffect';
      updateHookTypesDev();
      return mountLayoutEffect(create, deps);
    },
    useMemo: function (create, deps) {
      currentHookNameInDev = 'useMemo';
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher$1.current;
      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
      try {
        return mountMemo(create, deps);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useReducer: function (reducer, initialArg, init) {
      currentHookNameInDev = 'useReducer';
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher$1.current;
      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
      try {
        return mountReducer(reducer, initialArg, init);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useRef: function (initialValue) {
      currentHookNameInDev = 'useRef';
      updateHookTypesDev();
      return mountRef(initialValue);
    },
    useState: function (initialState) {
      currentHookNameInDev = 'useState';
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher$1.current;
      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
      try {
        return mountState(initialState);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useDebugValue: function (value, formatterFn) {
      currentHookNameInDev = 'useDebugValue';
      updateHookTypesDev();
      return mountDebugValue(value, formatterFn);
    },
    useResponder: function (responder, props) {
      currentHookNameInDev = 'useResponder';
      updateHookTypesDev();
      return createResponderListener(responder, props);
    }
  };

  HooksDispatcherOnUpdateInDEV = {
    readContext: function (context, observedBits) {
      return readContext(context, observedBits);
    },
    useCallback: function (callback, deps) {
      currentHookNameInDev = 'useCallback';
      updateHookTypesDev();
      return updateCallback(callback, deps);
    },
    useContext: function (context, observedBits) {
      currentHookNameInDev = 'useContext';
      updateHookTypesDev();
      return readContext(context, observedBits);
    },
    useEffect: function (create, deps) {
      currentHookNameInDev = 'useEffect';
      updateHookTypesDev();
      return updateEffect(create, deps);
    },
    useImperativeHandle: function (ref, create, deps) {
      currentHookNameInDev = 'useImperativeHandle';
      updateHookTypesDev();
      return updateImperativeHandle(ref, create, deps);
    },
    useLayoutEffect: function (create, deps) {
      currentHookNameInDev = 'useLayoutEffect';
      updateHookTypesDev();
      return updateLayoutEffect(create, deps);
    },
    useMemo: function (create, deps) {
      currentHookNameInDev = 'useMemo';
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher$1.current;
      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
      try {
        return updateMemo(create, deps);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useReducer: function (reducer, initialArg, init) {
      currentHookNameInDev = 'useReducer';
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher$1.current;
      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
      try {
        return updateReducer(reducer, initialArg, init);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useRef: function (initialValue) {
      currentHookNameInDev = 'useRef';
      updateHookTypesDev();
      return updateRef(initialValue);
    },
    useState: function (initialState) {
      currentHookNameInDev = 'useState';
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher$1.current;
      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
      try {
        return updateState(initialState);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useDebugValue: function (value, formatterFn) {
      currentHookNameInDev = 'useDebugValue';
      updateHookTypesDev();
      return updateDebugValue(value, formatterFn);
    },
    useResponder: function (responder, props) {
      currentHookNameInDev = 'useResponder';
      updateHookTypesDev();
      return createResponderListener(responder, props);
    }
  };

  InvalidNestedHooksDispatcherOnMountInDEV = {
    readContext: function (context, observedBits) {
      warnInvalidContextAccess();
      return readContext(context, observedBits);
    },
    useCallback: function (callback, deps) {
      currentHookNameInDev = 'useCallback';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return mountCallback(callback, deps);
    },
    useContext: function (context, observedBits) {
      currentHookNameInDev = 'useContext';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return readContext(context, observedBits);
    },
    useEffect: function (create, deps) {
      currentHookNameInDev = 'useEffect';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return mountEffect(create, deps);
    },
    useImperativeHandle: function (ref, create, deps) {
      currentHookNameInDev = 'useImperativeHandle';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return mountImperativeHandle(ref, create, deps);
    },
    useLayoutEffect: function (create, deps) {
      currentHookNameInDev = 'useLayoutEffect';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return mountLayoutEffect(create, deps);
    },
    useMemo: function (create, deps) {
      currentHookNameInDev = 'useMemo';
      warnInvalidHookAccess();
      mountHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher$1.current;
      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
      try {
        return mountMemo(create, deps);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useReducer: function (reducer, initialArg, init) {
      currentHookNameInDev = 'useReducer';
      warnInvalidHookAccess();
      mountHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher$1.current;
      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
      try {
        return mountReducer(reducer, initialArg, init);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useRef: function (initialValue) {
      currentHookNameInDev = 'useRef';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return mountRef(initialValue);
    },
    useState: function (initialState) {
      currentHookNameInDev = 'useState';
      warnInvalidHookAccess();
      mountHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher$1.current;
      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
      try {
        return mountState(initialState);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useDebugValue: function (value, formatterFn) {
      currentHookNameInDev = 'useDebugValue';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return mountDebugValue(value, formatterFn);
    },
    useResponder: function (responder, props) {
      currentHookNameInDev = 'useResponder';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return createResponderListener(responder, props);
    }
  };

  InvalidNestedHooksDispatcherOnUpdateInDEV = {
    readContext: function (context, observedBits) {
      warnInvalidContextAccess();
      return readContext(context, observedBits);
    },
    useCallback: function (callback, deps) {
      currentHookNameInDev = 'useCallback';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateCallback(callback, deps);
    },
    useContext: function (context, observedBits) {
      currentHookNameInDev = 'useContext';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return readContext(context, observedBits);
    },
    useEffect: function (create, deps) {
      currentHookNameInDev = 'useEffect';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateEffect(create, deps);
    },
    useImperativeHandle: function (ref, create, deps) {
      currentHookNameInDev = 'useImperativeHandle';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateImperativeHandle(ref, create, deps);
    },
    useLayoutEffect: function (create, deps) {
      currentHookNameInDev = 'useLayoutEffect';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateLayoutEffect(create, deps);
    },
    useMemo: function (create, deps) {
      currentHookNameInDev = 'useMemo';
      warnInvalidHookAccess();
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher$1.current;
      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
      try {
        return updateMemo(create, deps);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useReducer: function (reducer, initialArg, init) {
      currentHookNameInDev = 'useReducer';
      warnInvalidHookAccess();
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher$1.current;
      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
      try {
        return updateReducer(reducer, initialArg, init);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useRef: function (initialValue) {
      currentHookNameInDev = 'useRef';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateRef(initialValue);
    },
    useState: function (initialState) {
      currentHookNameInDev = 'useState';
      warnInvalidHookAccess();
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher$1.current;
      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
      try {
        return updateState(initialState);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useDebugValue: function (value, formatterFn) {
      currentHookNameInDev = 'useDebugValue';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateDebugValue(value, formatterFn);
    },
    useResponder: function (responder, props) {
      currentHookNameInDev = 'useResponder';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return createResponderListener(responder, props);
    }
  };
}

// Intentionally not named imports because Rollup would use dynamic dispatch for
// CommonJS interop named imports.
var now$1 = Scheduler.unstable_now;


var commitTime = 0;
var profilerStartTime = -1;

function getCommitTime() {
  return commitTime;
}

function recordCommitTime() {
  if (!enableProfilerTimer) {
    return;
  }
  commitTime = now$1();
}

function startProfilerTimer(fiber) {
  if (!enableProfilerTimer) {
    return;
  }

  profilerStartTime = now$1();

  if (fiber.actualStartTime < 0) {
    fiber.actualStartTime = now$1();
  }
}

function stopProfilerTimerIfRunning(fiber) {
  if (!enableProfilerTimer) {
    return;
  }
  profilerStartTime = -1;
}

function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
  if (!enableProfilerTimer) {
    return;
  }

  if (profilerStartTime >= 0) {
    var elapsedTime = now$1() - profilerStartTime;
    fiber.actualDuration += elapsedTime;
    if (overrideBaseTime) {
      fiber.selfBaseDuration = elapsedTime;
    }
    profilerStartTime = -1;
  }
}

// The deepest Fiber on the stack involved in a hydration context.
// This may have been an insertion or a hydration.
var hydrationParentFiber = null;
var nextHydratableInstance = null;
var isHydrating = false;

function enterHydrationState(fiber) {
  if (!supportsHydration) {
    return false;
  }

  var parentInstance = fiber.stateNode.containerInfo;
  nextHydratableInstance = getFirstHydratableChild(parentInstance);
  hydrationParentFiber = fiber;
  isHydrating = true;
  return true;
}

function reenterHydrationStateFromDehydratedSuspenseInstance(fiber) {
  if (!supportsHydration) {
    return false;
  }

  var suspenseInstance = fiber.stateNode;
  nextHydratableInstance = getNextHydratableSibling(suspenseInstance);
  popToNextHostParent(fiber);
  isHydrating = true;
  return true;
}

function deleteHydratableInstance(returnFiber, instance) {
  {
    switch (returnFiber.tag) {
      case HostRoot:
        didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);
        break;
      case HostComponent:
        didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);
        break;
    }
  }

  var childToDelete = createFiberFromHostInstanceForDeletion();
  childToDelete.stateNode = instance;
  childToDelete.return = returnFiber;
  childToDelete.effectTag = Deletion;

  // This might seem like it belongs on progressedFirstDeletion. However,
  // these children are not part of the reconciliation list of children.
  // Even if we abort and rereconcile the children, that will try to hydrate
  // again and the nodes are still in the host tree so these will be
  // recreated.
  if (returnFiber.lastEffect !== null) {
    returnFiber.lastEffect.nextEffect = childToDelete;
    returnFiber.lastEffect = childToDelete;
  } else {
    returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
  }
}

function insertNonHydratedInstance(returnFiber, fiber) {
  fiber.effectTag |= Placement;
  {
    switch (returnFiber.tag) {
      case HostRoot:
        {
          var parentContainer = returnFiber.stateNode.containerInfo;
          switch (fiber.tag) {
            case HostComponent:
              var type = fiber.type;
              var props = fiber.pendingProps;
              didNotFindHydratableContainerInstance(parentContainer, type, props);
              break;
            case HostText:
              var text = fiber.pendingProps;
              didNotFindHydratableContainerTextInstance(parentContainer, text);
              break;
            case SuspenseComponent:
              
              break;
          }
          break;
        }
      case HostComponent:
        {
          var parentType = returnFiber.type;
          var parentProps = returnFiber.memoizedProps;
          var parentInstance = returnFiber.stateNode;
          switch (fiber.tag) {
            case HostComponent:
              var _type = fiber.type;
              var _props = fiber.pendingProps;
              didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props);
              break;
            case HostText:
              var _text = fiber.pendingProps;
              didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);
              break;
            case SuspenseComponent:
              didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance);
              break;
          }
          break;
        }
      default:
        return;
    }
  }
}

function tryHydrate(fiber, nextInstance) {
  switch (fiber.tag) {
    case HostComponent:
      {
        var type = fiber.type;
        var props = fiber.pendingProps;
        var instance = canHydrateInstance(nextInstance, type, props);
        if (instance !== null) {
          fiber.stateNode = instance;
          return true;
        }
        return false;
      }
    case HostText:
      {
        var text = fiber.pendingProps;
        var textInstance = canHydrateTextInstance(nextInstance, text);
        if (textInstance !== null) {
          fiber.stateNode = textInstance;
          return true;
        }
        return false;
      }
    case SuspenseComponent:
      {
        if (enableSuspenseServerRenderer) {
          var suspenseInstance = canHydrateSuspenseInstance(nextInstance);
          if (suspenseInstance !== null) {
            // Downgrade the tag to a dehydrated component until we've hydrated it.
            fiber.tag = DehydratedSuspenseComponent;
            fiber.stateNode = suspenseInstance;
            return true;
          }
        }
        return false;
      }
    default:
      return false;
  }
}

function tryToClaimNextHydratableInstance(fiber) {
  if (!isHydrating) {
    return;
  }
  var nextInstance = nextHydratableInstance;
  if (!nextInstance) {
    // Nothing to hydrate. Make it an insertion.
    insertNonHydratedInstance(hydrationParentFiber, fiber);
    isHydrating = false;
    hydrationParentFiber = fiber;
    return;
  }
  var firstAttemptedInstance = nextInstance;
  if (!tryHydrate(fiber, nextInstance)) {
    // If we can't hydrate this instance let's try the next one.
    // We use this as a heuristic. It's based on intuition and not data so it
    // might be flawed or unnecessary.
    nextInstance = getNextHydratableSibling(firstAttemptedInstance);
    if (!nextInstance || !tryHydrate(fiber, nextInstance)) {
      // Nothing to hydrate. Make it an insertion.
      insertNonHydratedInstance(hydrationParentFiber, fiber);
      isHydrating = false;
      hydrationParentFiber = fiber;
      return;
    }
    // We matched the next one, we'll now assume that the first one was
    // superfluous and we'll delete it. Since we can't eagerly delete it
    // we'll have to schedule a deletion. To do that, this node needs a dummy
    // fiber associated with it.
    deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);
  }
  hydrationParentFiber = fiber;
  nextHydratableInstance = getFirstHydratableChild(nextInstance);
}

function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
  if (!supportsHydration) {
    (function () {
      {
        {
          throw ReactError(Error('Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.'));
        }
      }
    })();
  }

  var instance = fiber.stateNode;
  var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber);
  // TODO: Type this specific to this type of component.
  fiber.updateQueue = updatePayload;
  // If the update payload indicates that there is a change or if there
  // is a new ref we mark this as an update.
  if (updatePayload !== null) {
    return true;
  }
  return false;
}

function prepareToHydrateHostTextInstance(fiber) {
  if (!supportsHydration) {
    (function () {
      {
        {
          throw ReactError(Error('Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.'));
        }
      }
    })();
  }

  var textInstance = fiber.stateNode;
  var textContent = fiber.memoizedProps;
  var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
  {
    if (shouldUpdate) {
      // We assume that prepareToHydrateHostTextInstance is called in a context where the
      // hydration parent is the parent host component of this host text.
      var returnFiber = hydrationParentFiber;
      if (returnFiber !== null) {
        switch (returnFiber.tag) {
          case HostRoot:
            {
              var parentContainer = returnFiber.stateNode.containerInfo;
              didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);
              break;
            }
          case HostComponent:
            {
              var parentType = returnFiber.type;
              var parentProps = returnFiber.memoizedProps;
              var parentInstance = returnFiber.stateNode;
              didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);
              break;
            }
        }
      }
    }
  }
  return shouldUpdate;
}

function skipPastDehydratedSuspenseInstance(fiber) {
  if (!supportsHydration) {
    (function () {
      {
        {
          throw ReactError(Error('Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.'));
        }
      }
    })();
  }
  var suspenseInstance = fiber.stateNode;
  (function () {
    if (!suspenseInstance) {
      {
        throw ReactError(Error('Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.'));
      }
    }
  })();
  nextHydratableInstance = getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
}

function popToNextHostParent(fiber) {
  var parent = fiber.return;
  while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== DehydratedSuspenseComponent) {
    parent = parent.return;
  }
  hydrationParentFiber = parent;
}

function popHydrationState(fiber) {
  if (!supportsHydration) {
    return false;
  }
  if (fiber !== hydrationParentFiber) {
    // We're deeper than the current hydration context, inside an inserted
    // tree.
    return false;
  }
  if (!isHydrating) {
    // If we're not currently hydrating but we're in a hydration context, then
    // we were an insertion and now need to pop up reenter hydration of our
    // siblings.
    popToNextHostParent(fiber);
    isHydrating = true;
    return false;
  }

  var type = fiber.type;

  // If we have any remaining hydratable nodes, we need to delete them now.
  // We only do this deeper than head and body since they tend to have random
  // other nodes in them. We also ignore components with pure text content in
  // side of them.
  // TODO: Better heuristic.
  if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {
    var nextInstance = nextHydratableInstance;
    while (nextInstance) {
      deleteHydratableInstance(fiber, nextInstance);
      nextInstance = getNextHydratableSibling(nextInstance);
    }
  }

  popToNextHostParent(fiber);
  nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
  return true;
}

function resetHydrationState() {
  if (!supportsHydration) {
    return;
  }

  hydrationParentFiber = null;
  nextHydratableInstance = null;
  isHydrating = false;
}

var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;

var didReceiveUpdate = false;

var didWarnAboutBadClass = void 0;
var didWarnAboutModulePatternComponent = void 0;
var didWarnAboutContextTypeOnFunctionComponent = void 0;
var didWarnAboutGetDerivedStateOnFunctionComponent = void 0;
var didWarnAboutFunctionRefs = void 0;
var didWarnAboutReassigningProps = void 0;
var didWarnAboutMaxDuration = void 0;
var didWarnAboutRevealOrder = void 0;
var didWarnAboutTailOptions = void 0;
var didWarnAboutDefaultPropsOnFunctionComponent = void 0;

{
  didWarnAboutBadClass = {};
  didWarnAboutModulePatternComponent = {};
  didWarnAboutContextTypeOnFunctionComponent = {};
  didWarnAboutGetDerivedStateOnFunctionComponent = {};
  didWarnAboutFunctionRefs = {};
  didWarnAboutReassigningProps = false;
  didWarnAboutMaxDuration = false;
  didWarnAboutRevealOrder = {};
  didWarnAboutTailOptions = {};
  didWarnAboutDefaultPropsOnFunctionComponent = {};
}

function reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime) {
  if (current$$1 === null) {
    // If this is a fresh new component that hasn't been rendered yet, we
    // won't update its child set by applying minimal side-effects. Instead,
    // we will add them all to the child before it gets rendered. That means
    // we can optimize this reconciliation pass by not tracking side-effects.
    workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
  } else {
    // If the current child is the same as the work in progress, it means that
    // we haven't yet started any work on these children. Therefore, we use
    // the clone algorithm to create a copy of all the current children.

    // If we had any progressed work already, that is invalid at this point so
    // let's throw it out.
    workInProgress.child = reconcileChildFibers(workInProgress, current$$1.child, nextChildren, renderExpirationTime);
  }
}

function forceUnmountCurrentAndReconcile(current$$1, workInProgress, nextChildren, renderExpirationTime) {
  // This function is fork of reconcileChildren. It's used in cases where we
  // want to reconcile without matching against the existing set. This has the
  // effect of all current children being unmounted; even if the type and key
  // are the same, the old child is unmounted and a new child is created.
  //
  // To do this, we're going to go through the reconcile algorithm twice. In
  // the first pass, we schedule a deletion for all the current children by
  // passing null.
  workInProgress.child = reconcileChildFibers(workInProgress, current$$1.child, null, renderExpirationTime);
  // In the second pass, we mount the new children. The trick here is that we
  // pass null in place of where we usually pass the current child set. This has
  // the effect of remounting all children regardless of whether their their
  // identity matches.
  workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
}

function updateForwardRef(current$$1, workInProgress, Component, nextProps, renderExpirationTime) {
  // TODO: current can be non-null here even if the component
  // hasn't yet mounted. This happens after the first render suspends.
  // We'll need to figure out if this is fine or can cause issues.

  {
    if (workInProgress.type !== workInProgress.elementType) {
      // Lazy component props can't be validated in createElement
      // because they're only guaranteed to be resolved here.
      var innerPropTypes = Component.propTypes;
      if (innerPropTypes) {
        checkPropTypes(innerPropTypes, nextProps, // Resolved props
        'prop', getComponentName(Component), getCurrentFiberStackInDev);
      }
    }
  }

  var render = Component.render;
  var ref = workInProgress.ref;

  // The rest is a fork of updateFunctionComponent
  var nextChildren = void 0;
  prepareToReadContext(workInProgress, renderExpirationTime);
  {
    ReactCurrentOwner$3.current = workInProgress;
    setCurrentPhase('render');
    nextChildren = renderWithHooks(current$$1, workInProgress, render, nextProps, ref, renderExpirationTime);
    if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
      // Only double-render components with Hooks
      if (workInProgress.memoizedState !== null) {
        nextChildren = renderWithHooks(current$$1, workInProgress, render, nextProps, ref, renderExpirationTime);
      }
    }
    setCurrentPhase(null);
  }

  if (current$$1 !== null && !didReceiveUpdate) {
    bailoutHooks(current$$1, workInProgress, renderExpirationTime);
    return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
  }

  // React DevTools reads this flag.
  workInProgress.effectTag |= PerformedWork;
  reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
  return workInProgress.child;
}

function updateMemoComponent(current$$1, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {
  if (current$$1 === null) {
    var type = Component.type;
    if (isSimpleFunctionComponent(type) && Component.compare === null &&
    // SimpleMemoComponent codepath doesn't resolve outer props either.
    Component.defaultProps === undefined) {
      var resolvedType = type;
      {
        resolvedType = resolveFunctionForHotReloading(type);
      }
      // If this is a plain function component without default props,
      // and with only the default shallow comparison, we upgrade it
      // to a SimpleMemoComponent to allow fast path updates.
      workInProgress.tag = SimpleMemoComponent;
      workInProgress.type = resolvedType;
      {
        validateFunctionComponentInDev(workInProgress, type);
      }
      return updateSimpleMemoComponent(current$$1, workInProgress, resolvedType, nextProps, updateExpirationTime, renderExpirationTime);
    }
    {
      var innerPropTypes = type.propTypes;
      if (innerPropTypes) {
        // Inner memo component props aren't currently validated in createElement.
        // We could move it there, but we'd still need this for lazy code path.
        checkPropTypes(innerPropTypes, nextProps, // Resolved props
        'prop', getComponentName(type), getCurrentFiberStackInDev);
      }
    }
    var child = createFiberFromTypeAndProps(Component.type, null, nextProps, null, workInProgress.mode, renderExpirationTime);
    child.ref = workInProgress.ref;
    child.return = workInProgress;
    workInProgress.child = child;
    return child;
  }
  {
    var _type = Component.type;
    var _innerPropTypes = _type.propTypes;
    if (_innerPropTypes) {
      // Inner memo component props aren't currently validated in createElement.
      // We could move it there, but we'd still need this for lazy code path.
      checkPropTypes(_innerPropTypes, nextProps, // Resolved props
      'prop', getComponentName(_type), getCurrentFiberStackInDev);
    }
  }
  var currentChild = current$$1.child; // This is always exactly one child
  if (updateExpirationTime < renderExpirationTime) {
    // This will be the props with resolved defaultProps,
    // unlike current.memoizedProps which will be the unresolved ones.
    var prevProps = currentChild.memoizedProps;
    // Default to shallow comparison
    var compare = Component.compare;
    compare = compare !== null ? compare : shallowEqual;
    if (compare(prevProps, nextProps) && current$$1.ref === workInProgress.ref) {
      return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
    }
  }
  // React DevTools reads this flag.
  workInProgress.effectTag |= PerformedWork;
  var newChild = createWorkInProgress(currentChild, nextProps, renderExpirationTime);
  newChild.ref = workInProgress.ref;
  newChild.return = workInProgress;
  workInProgress.child = newChild;
  return newChild;
}

function updateSimpleMemoComponent(current$$1, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {
  // TODO: current can be non-null here even if the component
  // hasn't yet mounted. This happens when the inner render suspends.
  // We'll need to figure out if this is fine or can cause issues.

  {
    if (workInProgress.type !== workInProgress.elementType) {
      // Lazy component props can't be validated in createElement
      // because they're only guaranteed to be resolved here.
      var outerMemoType = workInProgress.elementType;
      if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {
        // We warn when you define propTypes on lazy()
        // so let's just skip over it to find memo() outer wrapper.
        // Inner props for memo are validated later.
        outerMemoType = refineResolvedLazyComponent(outerMemoType);
      }
      var outerPropTypes = outerMemoType && outerMemoType.propTypes;
      if (outerPropTypes) {
        checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)
        'prop', getComponentName(outerMemoType), getCurrentFiberStackInDev);
      }
      // Inner propTypes will be validated in the function component path.
    }
  }
  if (current$$1 !== null) {
    var prevProps = current$$1.memoizedProps;
    if (shallowEqual(prevProps, nextProps) && current$$1.ref === workInProgress.ref && (
    // Prevent bailout if the implementation changed due to hot reload:
    workInProgress.type === current$$1.type)) {
      didReceiveUpdate = false;
      if (updateExpirationTime < renderExpirationTime) {
        return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
      }
    }
  }
  return updateFunctionComponent(current$$1, workInProgress, Component, nextProps, renderExpirationTime);
}

function updateFragment(current$$1, workInProgress, renderExpirationTime) {
  var nextChildren = workInProgress.pendingProps;
  reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
  return workInProgress.child;
}

function updateMode(current$$1, workInProgress, renderExpirationTime) {
  var nextChildren = workInProgress.pendingProps.children;
  reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
  return workInProgress.child;
}

function updateProfiler(current$$1, workInProgress, renderExpirationTime) {
  if (enableProfilerTimer) {
    workInProgress.effectTag |= Update;
  }
  var nextProps = workInProgress.pendingProps;
  var nextChildren = nextProps.children;
  reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
  return workInProgress.child;
}

function markRef(current$$1, workInProgress) {
  var ref = workInProgress.ref;
  if (current$$1 === null && ref !== null || current$$1 !== null && current$$1.ref !== ref) {
    // Schedule a Ref effect
    workInProgress.effectTag |= Ref;
  }
}

function updateFunctionComponent(current$$1, workInProgress, Component, nextProps, renderExpirationTime) {
  {
    if (workInProgress.type !== workInProgress.elementType) {
      // Lazy component props can't be validated in createElement
      // because they're only guaranteed to be resolved here.
      var innerPropTypes = Component.propTypes;
      if (innerPropTypes) {
        checkPropTypes(innerPropTypes, nextProps, // Resolved props
        'prop', getComponentName(Component), getCurrentFiberStackInDev);
      }
    }
  }

  var context = void 0;
  if (!disableLegacyContext) {
    var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);
    context = getMaskedContext(workInProgress, unmaskedContext);
  }

  var nextChildren = void 0;
  prepareToReadContext(workInProgress, renderExpirationTime);
  {
    ReactCurrentOwner$3.current = workInProgress;
    setCurrentPhase('render');
    nextChildren = renderWithHooks(current$$1, workInProgress, Component, nextProps, context, renderExpirationTime);
    if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
      // Only double-render components with Hooks
      if (workInProgress.memoizedState !== null) {
        nextChildren = renderWithHooks(current$$1, workInProgress, Component, nextProps, context, renderExpirationTime);
      }
    }
    setCurrentPhase(null);
  }

  if (current$$1 !== null && !didReceiveUpdate) {
    bailoutHooks(current$$1, workInProgress, renderExpirationTime);
    return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
  }

  // React DevTools reads this flag.
  workInProgress.effectTag |= PerformedWork;
  reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
  return workInProgress.child;
}

function updateClassComponent(current$$1, workInProgress, Component, nextProps, renderExpirationTime) {
  {
    if (workInProgress.type !== workInProgress.elementType) {
      // Lazy component props can't be validated in createElement
      // because they're only guaranteed to be resolved here.
      var innerPropTypes = Component.propTypes;
      if (innerPropTypes) {
        checkPropTypes(innerPropTypes, nextProps, // Resolved props
        'prop', getComponentName(Component), getCurrentFiberStackInDev);
      }
    }
  }

  // Push context providers early to prevent context stack mismatches.
  // During mounting we don't know the child context yet as the instance doesn't exist.
  // We will invalidate the child context in finishClassComponent() right after rendering.
  var hasContext = void 0;
  if (isContextProvider(Component)) {
    hasContext = true;
    pushContextProvider(workInProgress);
  } else {
    hasContext = false;
  }
  prepareToReadContext(workInProgress, renderExpirationTime);

  var instance = workInProgress.stateNode;
  var shouldUpdate = void 0;
  if (instance === null) {
    if (current$$1 !== null) {
      // An class component without an instance only mounts if it suspended
      // inside a non- concurrent tree, in an inconsistent state. We want to
      // tree it like a new mount, even though an empty version of it already
      // committed. Disconnect the alternate pointers.
      current$$1.alternate = null;
      workInProgress.alternate = null;
      // Since this is conceptually a new fiber, schedule a Placement effect
      workInProgress.effectTag |= Placement;
    }
    // In the initial pass we might need to construct the instance.
    constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
    mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
    shouldUpdate = true;
  } else if (current$$1 === null) {
    // In a resume, we'll already have an instance we can reuse.
    shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
  } else {
    shouldUpdate = updateClassInstance(current$$1, workInProgress, Component, nextProps, renderExpirationTime);
  }
  var nextUnitOfWork = finishClassComponent(current$$1, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime);
  {
    var inst = workInProgress.stateNode;
    if (inst.props !== nextProps) {
      !didWarnAboutReassigningProps ? warning$1(false, 'It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentName(workInProgress.type) || 'a component') : void 0;
      didWarnAboutReassigningProps = true;
    }
  }
  return nextUnitOfWork;
}

function finishClassComponent(current$$1, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime) {
  // Refs should update even if shouldComponentUpdate returns false
  markRef(current$$1, workInProgress);

  var didCaptureError = (workInProgress.effectTag & DidCapture) !== NoEffect;

  if (!shouldUpdate && !didCaptureError) {
    // Context providers should defer to sCU for rendering
    if (hasContext) {
      invalidateContextProvider(workInProgress, Component, false);
    }

    return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
  }

  var instance = workInProgress.stateNode;

  // Rerender
  ReactCurrentOwner$3.current = workInProgress;
  var nextChildren = void 0;
  if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {
    // If we captured an error, but getDerivedStateFrom catch is not defined,
    // unmount all the children. componentDidCatch will schedule an update to
    // re-render a fallback. This is temporary until we migrate everyone to
    // the new API.
    // TODO: Warn in a future release.
    nextChildren = null;

    if (enableProfilerTimer) {
      stopProfilerTimerIfRunning(workInProgress);
    }
  } else {
    {
      setCurrentPhase('render');
      nextChildren = instance.render();
      if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
        instance.render();
      }
      setCurrentPhase(null);
    }
  }

  // React DevTools reads this flag.
  workInProgress.effectTag |= PerformedWork;
  if (current$$1 !== null && didCaptureError) {
    // If we're recovering from an error, reconcile without reusing any of
    // the existing children. Conceptually, the normal children and the children
    // that are shown on error are two different sets, so we shouldn't reuse
    // normal children even if their identities match.
    forceUnmountCurrentAndReconcile(current$$1, workInProgress, nextChildren, renderExpirationTime);
  } else {
    reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
  }

  // Memoize state using the values we just used to render.
  // TODO: Restructure so we never read values from the instance.
  workInProgress.memoizedState = instance.state;

  // The context might have changed so we need to recalculate it.
  if (hasContext) {
    invalidateContextProvider(workInProgress, Component, true);
  }

  return workInProgress.child;
}

function pushHostRootContext(workInProgress) {
  var root = workInProgress.stateNode;
  if (root.pendingContext) {
    pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);
  } else if (root.context) {
    // Should always be set
    pushTopLevelContextObject(workInProgress, root.context, false);
  }
  pushHostContainer(workInProgress, root.containerInfo);
}

function updateHostRoot(current$$1, workInProgress, renderExpirationTime) {
  pushHostRootContext(workInProgress);
  var updateQueue = workInProgress.updateQueue;
  (function () {
    if (!(updateQueue !== null)) {
      {
        throw ReactError(Error('If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.'));
      }
    }
  })();
  var nextProps = workInProgress.pendingProps;
  var prevState = workInProgress.memoizedState;
  var prevChildren = prevState !== null ? prevState.element : null;
  processUpdateQueue(workInProgress, updateQueue, nextProps, null, renderExpirationTime);
  var nextState = workInProgress.memoizedState;
  // Caution: React DevTools currently depends on this property
  // being called "element".
  var nextChildren = nextState.element;
  if (nextChildren === prevChildren) {
    // If the state is the same as before, that's a bailout because we had
    // no work that expires at this time.
    resetHydrationState();
    return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
  }
  var root = workInProgress.stateNode;
  if ((current$$1 === null || current$$1.child === null) && root.hydrate && enterHydrationState(workInProgress)) {
    // If we don't have any current children this might be the first pass.
    // We always try to hydrate. If this isn't a hydration pass there won't
    // be any children to hydrate which is effectively the same thing as
    // not hydrating.

    // This is a bit of a hack. We track the host root as a placement to
    // know that we're currently in a mounting state. That way isMounted
    // works as expected. We must reset this before committing.
    // TODO: Delete this when we delete isMounted and findDOMNode.
    workInProgress.effectTag |= Placement;

    // Ensure that children mount into this root without tracking
    // side-effects. This ensures that we don't store Placement effects on
    // nodes that will be hydrated.
    workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
  } else {
    // Otherwise reset hydration state in case we aborted and resumed another
    // root.
    reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
    resetHydrationState();
  }
  return workInProgress.child;
}

function updateHostComponent(current$$1, workInProgress, renderExpirationTime) {
  pushHostContext(workInProgress);

  if (current$$1 === null) {
    tryToClaimNextHydratableInstance(workInProgress);
  }

  var type = workInProgress.type;
  var nextProps = workInProgress.pendingProps;
  var prevProps = current$$1 !== null ? current$$1.memoizedProps : null;

  var nextChildren = nextProps.children;
  var isDirectTextChild = shouldSetTextContent(type, nextProps);

  if (isDirectTextChild) {
    // We special case a direct text child of a host node. This is a common
    // case. We won't handle it as a reified child. We will instead handle
    // this in the host environment that also have access to this prop. That
    // avoids allocating another HostText fiber and traversing it.
    nextChildren = null;
  } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {
    // If we're switching from a direct text child to a normal child, or to
    // empty, we need to schedule the text content to be reset.
    workInProgress.effectTag |= ContentReset;
  }

  markRef(current$$1, workInProgress);

  // Check the host config to see if the children are offscreen/hidden.
  if (workInProgress.mode & ConcurrentMode && renderExpirationTime !== Never && shouldDeprioritizeSubtree(type, nextProps)) {
    if (enableSchedulerTracing) {
      markSpawnedWork(Never);
    }
    // Schedule this fiber to re-render at offscreen priority. Then bailout.
    workInProgress.expirationTime = workInProgress.childExpirationTime = Never;
    return null;
  }

  reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
  return workInProgress.child;
}

function updateHostText(current$$1, workInProgress) {
  if (current$$1 === null) {
    tryToClaimNextHydratableInstance(workInProgress);
  }
  // Nothing to do here. This is terminal. We'll do the completion step
  // immediately after.
  return null;
}

function mountLazyComponent(_current, workInProgress, elementType, updateExpirationTime, renderExpirationTime) {
  if (_current !== null) {
    // An lazy component only mounts if it suspended inside a non-
    // concurrent tree, in an inconsistent state. We want to treat it like
    // a new mount, even though an empty version of it already committed.
    // Disconnect the alternate pointers.
    _current.alternate = null;
    workInProgress.alternate = null;
    // Since this is conceptually a new fiber, schedule a Placement effect
    workInProgress.effectTag |= Placement;
  }

  var props = workInProgress.pendingProps;
  // We can't start a User Timing measurement with correct label yet.
  // Cancel and resume right after we know the tag.
  cancelWorkTimer(workInProgress);
  var Component = readLazyComponentType(elementType);
  // Store the unwrapped component in the type.
  workInProgress.type = Component;
  var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);
  startWorkTimer(workInProgress);
  var resolvedProps = resolveDefaultProps(Component, props);
  var child = void 0;
  switch (resolvedTag) {
    case FunctionComponent:
      {
        {
          validateFunctionComponentInDev(workInProgress, Component);
          workInProgress.type = Component = resolveFunctionForHotReloading(Component);
        }
        child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);
        break;
      }
    case ClassComponent:
      {
        {
          workInProgress.type = Component = resolveClassForHotReloading(Component);
        }
        child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);
        break;
      }
    case ForwardRef:
      {
        {
          workInProgress.type = Component = resolveForwardRefForHotReloading(Component);
        }
        child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderExpirationTime);
        break;
      }
    case MemoComponent:
      {
        {
          if (workInProgress.type !== workInProgress.elementType) {
            var outerPropTypes = Component.propTypes;
            if (outerPropTypes) {
              checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only
              'prop', getComponentName(Component), getCurrentFiberStackInDev);
            }
          }
        }
        child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
        updateExpirationTime, renderExpirationTime);
        break;
      }
    default:
      {
        var hint = '';
        {
          if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {
            hint = ' Did you wrap a component in React.lazy() more than once?';
          }
        }
        // This message intentionally doesn't mention ForwardRef or MemoComponent
        // because the fact that it's a separate type of work is an
        // implementation detail.
        (function () {
          {
            {
              throw ReactError(Error('Element type is invalid. Received a promise that resolves to: ' + Component + '. Lazy element type must resolve to a class or function.' + hint));
            }
          }
        })();
      }
  }
  return child;
}

function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderExpirationTime) {
  if (_current !== null) {
    // An incomplete component only mounts if it suspended inside a non-
    // concurrent tree, in an inconsistent state. We want to treat it like
    // a new mount, even though an empty version of it already committed.
    // Disconnect the alternate pointers.
    _current.alternate = null;
    workInProgress.alternate = null;
    // Since this is conceptually a new fiber, schedule a Placement effect
    workInProgress.effectTag |= Placement;
  }

  // Promote the fiber to a class and try rendering again.
  workInProgress.tag = ClassComponent;

  // The rest of this function is a fork of `updateClassComponent`

  // Push context providers early to prevent context stack mismatches.
  // During mounting we don't know the child context yet as the instance doesn't exist.
  // We will invalidate the child context in finishClassComponent() right after rendering.
  var hasContext = void 0;
  if (isContextProvider(Component)) {
    hasContext = true;
    pushContextProvider(workInProgress);
  } else {
    hasContext = false;
  }
  prepareToReadContext(workInProgress, renderExpirationTime);

  constructClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
  mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);

  return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);
}

function mountIndeterminateComponent(_current, workInProgress, Component, renderExpirationTime) {
  if (_current !== null) {
    // An indeterminate component only mounts if it suspended inside a non-
    // concurrent tree, in an inconsistent state. We want to treat it like
    // a new mount, even though an empty version of it already committed.
    // Disconnect the alternate pointers.
    _current.alternate = null;
    workInProgress.alternate = null;
    // Since this is conceptually a new fiber, schedule a Placement effect
    workInProgress.effectTag |= Placement;
  }

  var props = workInProgress.pendingProps;
  var context = void 0;
  if (!disableLegacyContext) {
    var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);
    context = getMaskedContext(workInProgress, unmaskedContext);
  }

  prepareToReadContext(workInProgress, renderExpirationTime);
  var value = void 0;

  {
    if (Component.prototype && typeof Component.prototype.render === 'function') {
      var componentName = getComponentName(Component) || 'Unknown';

      if (!didWarnAboutBadClass[componentName]) {
        warningWithoutStack$1(false, "The <%s /> component appears to have a render method, but doesn't extend React.Component. " + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);
        didWarnAboutBadClass[componentName] = true;
      }
    }

    if (workInProgress.mode & StrictMode) {
      ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);
    }

    ReactCurrentOwner$3.current = workInProgress;
    value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);
  }
  // React DevTools reads this flag.
  workInProgress.effectTag |= PerformedWork;

  if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
    {
      var _componentName = getComponentName(Component) || 'Unknown';
      if (!didWarnAboutModulePatternComponent[_componentName]) {
        warningWithoutStack$1(false, 'The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);
        didWarnAboutModulePatternComponent[_componentName] = true;
      }
    }

    // Proceed under the assumption that this is a class instance
    workInProgress.tag = ClassComponent;

    // Throw out any hooks that were used.
    resetHooks();

    // Push context providers early to prevent context stack mismatches.
    // During mounting we don't know the child context yet as the instance doesn't exist.
    // We will invalidate the child context in finishClassComponent() right after rendering.
    var hasContext = false;
    if (isContextProvider(Component)) {
      hasContext = true;
      pushContextProvider(workInProgress);
    } else {
      hasContext = false;
    }

    workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;

    var getDerivedStateFromProps = Component.getDerivedStateFromProps;
    if (typeof getDerivedStateFromProps === 'function') {
      applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props);
    }

    adoptClassInstance(workInProgress, value);
    mountClassInstance(workInProgress, Component, props, renderExpirationTime);
    return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);
  } else {
    // Proceed under the assumption that this is a function component
    workInProgress.tag = FunctionComponent;
    {
      if (disableLegacyContext && Component.contextTypes) {
        warningWithoutStack$1(false, '%s uses the legacy contextTypes API which is no longer supported. ' + 'Use React.createContext() with React.useContext() instead.', getComponentName(Component) || 'Unknown');
      }

      if (debugRenderPhaseSideEffects || debugRenderPhaseSideEffectsForStrictMode && workInProgress.mode & StrictMode) {
        // Only double-render components with Hooks
        if (workInProgress.memoizedState !== null) {
          value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);
        }
      }
    }
    reconcileChildren(null, workInProgress, value, renderExpirationTime);
    {
      validateFunctionComponentInDev(workInProgress, Component);
    }
    return workInProgress.child;
  }
}

function validateFunctionComponentInDev(workInProgress, Component) {
  if (Component) {
    !!Component.childContextTypes ? warningWithoutStack$1(false, '%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component') : void 0;
  }
  if (workInProgress.ref !== null) {
    var info = '';
    var ownerName = getCurrentFiberOwnerNameInDevOrNull();
    if (ownerName) {
      info += '\n\nCheck the render method of `' + ownerName + '`.';
    }

    var warningKey = ownerName || workInProgress._debugID || '';
    var debugSource = workInProgress._debugSource;
    if (debugSource) {
      warningKey = debugSource.fileName + ':' + debugSource.lineNumber;
    }
    if (!didWarnAboutFunctionRefs[warningKey]) {
      didWarnAboutFunctionRefs[warningKey] = true;
      warning$1(false, 'Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);
    }
  }

  if (warnAboutDefaultPropsOnFunctionComponents && Component.defaultProps !== undefined) {
    var componentName = getComponentName(Component) || 'Unknown';

    if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {
      warningWithoutStack$1(false, '%s: Support for defaultProps will be removed from function components ' + 'in a future major release. Use JavaScript default parameters instead.', componentName);
      didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;
    }
  }

  if (typeof Component.getDerivedStateFromProps === 'function') {
    var _componentName2 = getComponentName(Component) || 'Unknown';

    if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]) {
      warningWithoutStack$1(false, '%s: Function components do not support getDerivedStateFromProps.', _componentName2);
      didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true;
    }
  }

  if (typeof Component.contextType === 'object' && Component.contextType !== null) {
    var _componentName3 = getComponentName(Component) || 'Unknown';

    if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
      warningWithoutStack$1(false, '%s: Function components do not support contextType.', _componentName3);
      didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
    }
  }
}

// TODO: This is now an empty object. Should we just make it a boolean?
var SUSPENDED_MARKER = {};

function shouldRemainOnFallback(suspenseContext, current$$1, workInProgress) {
  // If the context is telling us that we should show a fallback, and we're not
  // already showing content, then we should show the fallback instead.
  return hasSuspenseContext(suspenseContext, ForceSuspenseFallback) && (current$$1 === null || current$$1.memoizedState !== null);
}

function updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime) {
  var mode = workInProgress.mode;
  var nextProps = workInProgress.pendingProps;

  // This is used by DevTools to force a boundary to suspend.
  {
    if (shouldSuspend(workInProgress)) {
      workInProgress.effectTag |= DidCapture;
    }
  }

  var suspenseContext = suspenseStackCursor.current;

  var nextState = null;
  var nextDidTimeout = false;

  if ((workInProgress.effectTag & DidCapture) !== NoEffect || shouldRemainOnFallback(suspenseContext, current$$1, workInProgress)) {
    // Something in this boundary's subtree already suspended. Switch to
    // rendering the fallback children.
    nextState = SUSPENDED_MARKER;
    nextDidTimeout = true;
    workInProgress.effectTag &= ~DidCapture;
  } else {
    // Attempting the main content
    if (current$$1 === null || current$$1.memoizedState !== null) {
      // This is a new mount or this boundary is already showing a fallback state.
      // Mark this subtree context as having at least one invisible parent that could
      // handle the fallback state.
      // Boundaries without fallbacks or should be avoided are not considered since
      // they cannot handle preferred fallback states.
      if (nextProps.fallback !== undefined && nextProps.unstable_avoidThisFallback !== true) {
        suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);
      }
    }
  }

  suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);

  pushSuspenseContext(workInProgress, suspenseContext);

  {
    if ('maxDuration' in nextProps) {
      if (!didWarnAboutMaxDuration) {
        didWarnAboutMaxDuration = true;
        warning$1(false, 'maxDuration has been removed from React. ' + 'Remove the maxDuration prop.');
      }
    }
  }

  // This next part is a bit confusing. If the children timeout, we switch to
  // showing the fallback children in place of the "primary" children.
  // However, we don't want to delete the primary children because then their
  // state will be lost (both the React state and the host state, e.g.
  // uncontrolled form inputs). Instead we keep them mounted and hide them.
  // Both the fallback children AND the primary children are rendered at the
  // same time. Once the primary children are un-suspended, we can delete
  // the fallback children — don't need to preserve their state.
  //
  // The two sets of children are siblings in the host environment, but
  // semantically, for purposes of reconciliation, they are two separate sets.
  // So we store them using two fragment fibers.
  //
  // However, we want to avoid allocating extra fibers for every placeholder.
  // They're only necessary when the children time out, because that's the
  // only time when both sets are mounted.
  //
  // So, the extra fragment fibers are only used if the children time out.
  // Otherwise, we render the primary children directly. This requires some
  // custom reconciliation logic to preserve the state of the primary
  // children. It's essentially a very basic form of re-parenting.

  // `child` points to the child fiber. In the normal case, this is the first
  // fiber of the primary children set. In the timed-out case, it's a
  // a fragment fiber containing the primary children.
  var child = void 0;
  // `next` points to the next fiber React should render. In the normal case,
  // it's the same as `child`: the first fiber of the primary children set.
  // In the timed-out case, it's a fragment fiber containing the *fallback*
  // children -- we skip over the primary children entirely.
  var next = void 0;
  if (current$$1 === null) {
    if (enableSuspenseServerRenderer) {
      // If we're currently hydrating, try to hydrate this boundary.
      // But only if this has a fallback.
      if (nextProps.fallback !== undefined) {
        tryToClaimNextHydratableInstance(workInProgress);
        // This could've changed the tag if this was a dehydrated suspense component.
        if (workInProgress.tag === DehydratedSuspenseComponent) {
          popSuspenseContext(workInProgress);
          return updateDehydratedSuspenseComponent(null, workInProgress, renderExpirationTime);
        }
      }
    }

    // This is the initial mount. This branch is pretty simple because there's
    // no previous state that needs to be preserved.
    if (nextDidTimeout) {
      // Mount separate fragments for primary and fallback children.
      var nextFallbackChildren = nextProps.fallback;
      var primaryChildFragment = createFiberFromFragment(null, mode, NoWork, null);
      primaryChildFragment.return = workInProgress;

      if ((workInProgress.mode & BatchedMode) === NoMode) {
        // Outside of batched mode, we commit the effects from the
        var progressedState = workInProgress.memoizedState;
        var progressedPrimaryChild = progressedState !== null ? workInProgress.child.child : workInProgress.child;
        primaryChildFragment.child = progressedPrimaryChild;
        var progressedChild = progressedPrimaryChild;
        while (progressedChild !== null) {
          progressedChild.return = primaryChildFragment;
          progressedChild = progressedChild.sibling;
        }
      }

      var fallbackChildFragment = createFiberFromFragment(nextFallbackChildren, mode, renderExpirationTime, null);
      fallbackChildFragment.return = workInProgress;
      primaryChildFragment.sibling = fallbackChildFragment;
      child = primaryChildFragment;
      // Skip the primary children, and continue working on the
      // fallback children.
      next = fallbackChildFragment;
    } else {
      // Mount the primary children without an intermediate fragment fiber.
      var nextPrimaryChildren = nextProps.children;
      child = next = mountChildFibers(workInProgress, null, nextPrimaryChildren, renderExpirationTime);
    }
  } else {
    // This is an update. This branch is more complicated because we need to
    // ensure the state of the primary children is preserved.
    var prevState = current$$1.memoizedState;
    var prevDidTimeout = prevState !== null;
    if (prevDidTimeout) {
      // The current tree already timed out. That means each child set is
      var currentPrimaryChildFragment = current$$1.child;
      var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
      if (nextDidTimeout) {
        // Still timed out. Reuse the current primary children by cloning
        // its fragment. We're going to skip over these entirely.
        var _nextFallbackChildren = nextProps.fallback;
        var _primaryChildFragment = createWorkInProgress(currentPrimaryChildFragment, currentPrimaryChildFragment.pendingProps, NoWork);
        _primaryChildFragment.return = workInProgress;

        if ((workInProgress.mode & BatchedMode) === NoMode) {
          // Outside of batched mode, we commit the effects from the
          var _progressedState = workInProgress.memoizedState;
          var _progressedPrimaryChild = _progressedState !== null ? workInProgress.child.child : workInProgress.child;
          if (_progressedPrimaryChild !== currentPrimaryChildFragment.child) {
            _primaryChildFragment.child = _progressedPrimaryChild;
            var _progressedChild = _progressedPrimaryChild;
            while (_progressedChild !== null) {
              _progressedChild.return = _primaryChildFragment;
              _progressedChild = _progressedChild.sibling;
            }
          }
        }

        // Because primaryChildFragment is a new fiber that we're inserting as the
        // parent of a new tree, we need to set its treeBaseDuration.
        if (enableProfilerTimer && workInProgress.mode & ProfileMode) {
          // treeBaseDuration is the sum of all the child tree base durations.
          var treeBaseDuration = 0;
          var hiddenChild = _primaryChildFragment.child;
          while (hiddenChild !== null) {
            treeBaseDuration += hiddenChild.treeBaseDuration;
            hiddenChild = hiddenChild.sibling;
          }
          _primaryChildFragment.treeBaseDuration = treeBaseDuration;
        }

        // Clone the fallback child fragment, too. These we'll continue
        // working on.
        var _fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, _nextFallbackChildren, currentFallbackChildFragment.expirationTime);
        _fallbackChildFragment.return = workInProgress;
        _primaryChildFragment.sibling = _fallbackChildFragment;
        child = _primaryChildFragment;
        _primaryChildFragment.childExpirationTime = NoWork;
        // Skip the primary children, and continue working on the
        // fallback children.
        next = _fallbackChildFragment;
      } else {
        // No longer suspended. Switch back to showing the primary children,
        // and remove the intermediate fragment fiber.
        var _nextPrimaryChildren = nextProps.children;
        var currentPrimaryChild = currentPrimaryChildFragment.child;
        var primaryChild = reconcileChildFibers(workInProgress, currentPrimaryChild, _nextPrimaryChildren, renderExpirationTime);

        // If this render doesn't suspend, we need to delete the fallback
        // children. Wait until the complete phase, after we've confirmed the
        // fallback is no longer needed.
        // TODO: Would it be better to store the fallback fragment on
        // the stateNode?

        // Continue rendering the children, like we normally do.
        child = next = primaryChild;
      }
    } else {
      // The current tree has not already timed out. That means the primary
      // children are not wrapped in a fragment fiber.
      var _currentPrimaryChild = current$$1.child;
      if (nextDidTimeout) {
        // Timed out. Wrap the children in a fragment fiber to keep them
        // separate from the fallback children.
        var _nextFallbackChildren2 = nextProps.fallback;
        var _primaryChildFragment2 = createFiberFromFragment(
        // It shouldn't matter what the pending props are because we aren't
        // going to render this fragment.
        null, mode, NoWork, null);
        _primaryChildFragment2.return = workInProgress;
        _primaryChildFragment2.child = _currentPrimaryChild;
        if (_currentPrimaryChild !== null) {
          _currentPrimaryChild.return = _primaryChildFragment2;
        }

        // Even though we're creating a new fiber, there are no new children,
        // because we're reusing an already mounted tree. So we don't need to
        // schedule a placement.
        // primaryChildFragment.effectTag |= Placement;

        if ((workInProgress.mode & BatchedMode) === NoMode) {
          // Outside of batched mode, we commit the effects from the
          var _progressedState2 = workInProgress.memoizedState;
          var _progressedPrimaryChild2 = _progressedState2 !== null ? workInProgress.child.child : workInProgress.child;
          _primaryChildFragment2.child = _progressedPrimaryChild2;
          var _progressedChild2 = _progressedPrimaryChild2;
          while (_progressedChild2 !== null) {
            _progressedChild2.return = _primaryChildFragment2;
            _progressedChild2 = _progressedChild2.sibling;
          }
        }

        // Because primaryChildFragment is a new fiber that we're inserting as the
        // parent of a new tree, we need to set its treeBaseDuration.
        if (enableProfilerTimer && workInProgress.mode & ProfileMode) {
          // treeBaseDuration is the sum of all the child tree base durations.
          var _treeBaseDuration = 0;
          var _hiddenChild = _primaryChildFragment2.child;
          while (_hiddenChild !== null) {
            _treeBaseDuration += _hiddenChild.treeBaseDuration;
            _hiddenChild = _hiddenChild.sibling;
          }
          _primaryChildFragment2.treeBaseDuration = _treeBaseDuration;
        }

        // Create a fragment from the fallback children, too.
        var _fallbackChildFragment2 = createFiberFromFragment(_nextFallbackChildren2, mode, renderExpirationTime, null);
        _fallbackChildFragment2.return = workInProgress;
        _primaryChildFragment2.sibling = _fallbackChildFragment2;
        _fallbackChildFragment2.effectTag |= Placement;
        child = _primaryChildFragment2;
        _primaryChildFragment2.childExpirationTime = NoWork;
        // Skip the primary children, and continue working on the
        // fallback children.
        next = _fallbackChildFragment2;
      } else {
        // Still haven't timed out.  Continue rendering the children, like we
        // normally do.
        var _nextPrimaryChildren2 = nextProps.children;
        next = child = reconcileChildFibers(workInProgress, _currentPrimaryChild, _nextPrimaryChildren2, renderExpirationTime);
      }
    }
    workInProgress.stateNode = current$$1.stateNode;
  }

  workInProgress.memoizedState = nextState;
  workInProgress.child = child;
  return next;
}

function retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime) {
  // Detach from the current dehydrated boundary.
  current$$1.alternate = null;
  workInProgress.alternate = null;

  // Insert a deletion in the effect list.
  var returnFiber = workInProgress.return;
  (function () {
    if (!(returnFiber !== null)) {
      {
        throw ReactError(Error('Suspense boundaries are never on the root. This is probably a bug in React.'));
      }
    }
  })();
  var last = returnFiber.lastEffect;
  if (last !== null) {
    last.nextEffect = current$$1;
    returnFiber.lastEffect = current$$1;
  } else {
    returnFiber.firstEffect = returnFiber.lastEffect = current$$1;
  }
  current$$1.nextEffect = null;
  current$$1.effectTag = Deletion;

  popSuspenseContext(workInProgress);

  // Upgrade this work in progress to a real Suspense component.
  workInProgress.tag = SuspenseComponent;
  workInProgress.stateNode = null;
  workInProgress.memoizedState = null;
  // This is now an insertion.
  workInProgress.effectTag |= Placement;
  // Retry as a real Suspense component.
  return updateSuspenseComponent(null, workInProgress, renderExpirationTime);
}

function updateDehydratedSuspenseComponent(current$$1, workInProgress, renderExpirationTime) {
  pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));
  var suspenseInstance = workInProgress.stateNode;
  if (current$$1 === null) {
    // During the first pass, we'll bail out and not drill into the children.
    // Instead, we'll leave the content in place and try to hydrate it later.
    if (isSuspenseInstanceFallback(suspenseInstance)) {
      // This is a client-only boundary. Since we won't get any content from the server
      // for this, we need to schedule that at a higher priority based on when it would
      // have timed out. In theory we could render it in this pass but it would have the
      // wrong priority associated with it and will prevent hydration of parent path.
      // Instead, we'll leave work left on it to render it in a separate commit.

      // TODO This time should be the time at which the server rendered response that is
      // a parent to this boundary was displayed. However, since we currently don't have
      // a protocol to transfer that time, we'll just estimate it by using the current
      // time. This will mean that Suspense timeouts are slightly shifted to later than
      // they should be.
      var serverDisplayTime = requestCurrentTime();
      // Schedule a normal pri update to render this content.
      workInProgress.expirationTime = computeAsyncExpiration(serverDisplayTime);
    } else {
      // We'll continue hydrating the rest at offscreen priority since we'll already
      // be showing the right content coming from the server, it is no rush.
      workInProgress.expirationTime = Never;
    }
    return null;
  }
  if ((workInProgress.effectTag & DidCapture) !== NoEffect) {
    // Something suspended. Leave the existing children in place.
    // TODO: In non-concurrent mode, should we commit the nodes we have hydrated so far?
    workInProgress.child = null;
    return null;
  }
  if (isSuspenseInstanceFallback(suspenseInstance)) {
    // This boundary is in a permanent fallback state. In this case, we'll never
    // get an update and we'll never be able to hydrate the final content. Let's just try the
    // client side render instead.
    return retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime);
  }
  // We use childExpirationTime to indicate that a child might depend on context, so if
  // any context has changed, we need to treat is as if the input might have changed.
  var hasContextChanged$$1 = current$$1.childExpirationTime >= renderExpirationTime;
  if (didReceiveUpdate || hasContextChanged$$1) {
    // This boundary has changed since the first render. This means that we are now unable to
    // hydrate it. We might still be able to hydrate it using an earlier expiration time but
    // during this render we can't. Instead, we're going to delete the whole subtree and
    // instead inject a new real Suspense boundary to take its place, which may render content
    // or fallback. The real Suspense boundary will suspend for a while so we have some time
    // to ensure it can produce real content, but all state and pending events will be lost.
    return retrySuspenseComponentWithoutHydrating(current$$1, workInProgress, renderExpirationTime);
  } else if (isSuspenseInstancePending(suspenseInstance)) {
    // This component is still pending more data from the server, so we can't hydrate its
    // content. We treat it as if this component suspended itself. It might seem as if
    // we could just try to render it client-side instead. However, this will perform a
    // lot of unnecessary work and is unlikely to complete since it often will suspend
    // on missing data anyway. Additionally, the server might be able to render more
    // than we can on the client yet. In that case we'd end up with more fallback states
    // on the client than if we just leave it alone. If the server times out or errors
    // these should update this boundary to the permanent Fallback state instead.
    // Mark it as having captured (i.e. suspended).
    workInProgress.effectTag |= DidCapture;
    // Leave the children in place. I.e. empty.
    workInProgress.child = null;
    // Register a callback to retry this boundary once the server has sent the result.
    registerSuspenseInstanceRetry(suspenseInstance, retryTimedOutBoundary.bind(null, current$$1));
    return null;
  } else {
    // This is the first attempt.
    reenterHydrationStateFromDehydratedSuspenseInstance(workInProgress);
    var nextProps = workInProgress.pendingProps;
    var nextChildren = nextProps.children;
    workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
    return workInProgress.child;
  }
}

function propagateSuspenseContextChange(workInProgress, firstChild, renderExpirationTime) {
  // Mark any Suspense boundaries with fallbacks as having work to do.
  // If they were previously forced into fallbacks, they may now be able
  // to unblock.
  var node = firstChild;
  while (node !== null) {
    if (node.tag === SuspenseComponent) {
      var state = node.memoizedState;
      if (state !== null) {
        if (node.expirationTime < renderExpirationTime) {
          node.expirationTime = renderExpirationTime;
        }
        var alternate = node.alternate;
        if (alternate !== null && alternate.expirationTime < renderExpirationTime) {
          alternate.expirationTime = renderExpirationTime;
        }
        scheduleWorkOnParentPath(node.return, renderExpirationTime);
      }
    } else if (node.child !== null) {
      node.child.return = node;
      node = node.child;
      continue;
    }
    if (node === workInProgress) {
      return;
    }
    while (node.sibling === null) {
      if (node.return === null || node.return === workInProgress) {
        return;
      }
      node = node.return;
    }
    node.sibling.return = node.return;
    node = node.sibling;
  }
}

function findLastContentRow(firstChild) {
  // This is going to find the last row among these children that is already
  // showing content on the screen, as opposed to being in fallback state or
  // new. If a row has multiple Suspense boundaries, any of them being in the
  // fallback state, counts as the whole row being in a fallback state.
  // Note that the "rows" will be workInProgress, but any nested children
  // will still be current since we haven't rendered them yet. The mounted
  // order may not be the same as the new order. We use the new order.
  var row = firstChild;
  var lastContentRow = null;
  while (row !== null) {
    var currentRow = row.alternate;
    // New rows can't be content rows.
    if (currentRow !== null && findFirstSuspended(currentRow) === null) {
      lastContentRow = row;
    }
    row = row.sibling;
  }
  return lastContentRow;
}

function validateRevealOrder(revealOrder) {
  {
    if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {
      didWarnAboutRevealOrder[revealOrder] = true;
      if (typeof revealOrder === 'string') {
        switch (revealOrder.toLowerCase()) {
          case 'together':
          case 'forwards':
          case 'backwards':
            {
              warning$1(false, '"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase "%s" instead.', revealOrder, revealOrder.toLowerCase());
              break;
            }
          case 'forward':
          case 'backward':
            {
              warning$1(false, '"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use "%ss" instead.', revealOrder, revealOrder.toLowerCase());
              break;
            }
          default:
            warning$1(false, '"%s" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);
            break;
        }
      } else {
        warning$1(false, '%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);
      }
    }
  }
}

function validateTailOptions(tailMode, revealOrder) {
  {
    if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {
      if (tailMode !== 'collapsed' && tailMode !== 'hidden') {
        didWarnAboutTailOptions[tailMode] = true;
        warning$1(false, '"%s" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean "collapsed" or "hidden"?', tailMode);
      } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {
        didWarnAboutTailOptions[tailMode] = true;
        warning$1(false, '<SuspenseList tail="%s" /> is only valid if revealOrder is ' + '"forwards" or "backwards". ' + 'Did you mean to specify revealOrder="forwards"?', tailMode);
      }
    }
  }
}

function validateSuspenseListNestedChild(childSlot, index) {
  {
    var isArray = Array.isArray(childSlot);
    var isIterable = !isArray && typeof getIteratorFn(childSlot) === 'function';
    if (isArray || isIterable) {
      var type = isArray ? 'array' : 'iterable';
      warning$1(false, 'A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);
      return false;
    }
  }
  return true;
}

function validateSuspenseListChildren(children, revealOrder) {
  {
    if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {
      if (Array.isArray(children)) {
        for (var i = 0; i < children.length; i++) {
          if (!validateSuspenseListNestedChild(children[i], i)) {
            return;
          }
        }
      } else {
        var iteratorFn = getIteratorFn(children);
        if (typeof iteratorFn === 'function') {
          var childrenIterator = iteratorFn.call(children);
          if (childrenIterator) {
            var step = childrenIterator.next();
            var _i = 0;
            for (; !step.done; step = childrenIterator.next()) {
              if (!validateSuspenseListNestedChild(step.value, _i)) {
                return;
              }
              _i++;
            }
          }
        } else {
          warning$1(false, 'A single row was passed to a <SuspenseList revealOrder="%s" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);
        }
      }
    }
  }
}

function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode) {
  var renderState = workInProgress.memoizedState;
  if (renderState === null) {
    workInProgress.memoizedState = {
      isBackwards: isBackwards,
      rendering: null,
      last: lastContentRow,
      tail: tail,
      tailExpiration: 0,
      tailMode: tailMode
    };
  } else {
    // We can reuse the existing object from previous renders.
    renderState.isBackwards = isBackwards;
    renderState.rendering = null;
    renderState.last = lastContentRow;
    renderState.tail = tail;
    renderState.tailExpiration = 0;
    renderState.tailMode = tailMode;
  }
}

// This can end up rendering this component multiple passes.
// The first pass splits the children fibers into two sets. A head and tail.
// We first render the head. If anything is in fallback state, we do another
// pass through beginWork to rerender all children (including the tail) with
// the force suspend context. If the first render didn't have anything in
// in fallback state. Then we render each row in the tail one-by-one.
// That happens in the completeWork phase without going back to beginWork.
function updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime) {
  var nextProps = workInProgress.pendingProps;
  var revealOrder = nextProps.revealOrder;
  var tailMode = nextProps.tail;
  var newChildren = nextProps.children;

  validateRevealOrder(revealOrder);
  validateTailOptions(tailMode, revealOrder);
  validateSuspenseListChildren(newChildren, revealOrder);

  reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);

  var suspenseContext = suspenseStackCursor.current;

  var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
  if (shouldForceFallback) {
    suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
    workInProgress.effectTag |= DidCapture;
  } else {
    var didSuspendBefore = current$$1 !== null && (current$$1.effectTag & DidCapture) !== NoEffect;
    if (didSuspendBefore) {
      // If we previously forced a fallback, we need to schedule work
      // on any nested boundaries to let them know to try to render
      // again. This is the same as context updating.
      propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);
    }
    suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
  }
  pushSuspenseContext(workInProgress, suspenseContext);

  if ((workInProgress.mode & BatchedMode) === NoMode) {
    // Outside of batched mode, SuspenseList doesn't work so we just
    // use make it a noop by treating it as the default revealOrder.
    workInProgress.memoizedState = null;
  } else {
    switch (revealOrder) {
      case 'forwards':
        {
          var lastContentRow = findLastContentRow(workInProgress.child);
          var tail = void 0;
          if (lastContentRow === null) {
            // The whole list is part of the tail.
            // TODO: We could fast path by just rendering the tail now.
            tail = workInProgress.child;
            workInProgress.child = null;
          } else {
            // Disconnect the tail rows after the content row.
            // We're going to render them separately later.
            tail = lastContentRow.sibling;
            lastContentRow.sibling = null;
          }
          initSuspenseListRenderState(workInProgress, false, // isBackwards
          tail, lastContentRow, tailMode);
          break;
        }
      case 'backwards':
        {
          // We're going to find the first row that has existing content.
          // At the same time we're going to reverse the list of everything
          // we pass in the meantime. That's going to be our tail in reverse
          // order.
          var _tail = null;
          var row = workInProgress.child;
          workInProgress.child = null;
          while (row !== null) {
            var currentRow = row.alternate;
            // New rows can't be content rows.
            if (currentRow !== null && findFirstSuspended(currentRow) === null) {
              // This is the beginning of the main content.
              workInProgress.child = row;
              break;
            }
            var nextRow = row.sibling;
            row.sibling = _tail;
            _tail = row;
            row = nextRow;
          }
          // TODO: If workInProgress.child is null, we can continue on the tail immediately.
          initSuspenseListRenderState(workInProgress, true, // isBackwards
          _tail, null, // last
          tailMode);
          break;
        }
      case 'together':
        {
          initSuspenseListRenderState(workInProgress, false, // isBackwards
          null, // tail
          null, // last
          undefined);
          break;
        }
      default:
        {
          // The default reveal order is the same as not having
          // a boundary.
          workInProgress.memoizedState = null;
        }
    }
  }
  return workInProgress.child;
}

function updatePortalComponent(current$$1, workInProgress, renderExpirationTime) {
  pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
  var nextChildren = workInProgress.pendingProps;
  if (current$$1 === null) {
    // Portals are special because we don't append the children during mount
    // but at commit. Therefore we need to track insertions which the normal
    // flow doesn't do during mount. This doesn't happen at the root because
    // the root always starts with a "current" with a null child.
    // TODO: Consider unifying this with how the root works.
    workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
  } else {
    reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
  }
  return workInProgress.child;
}

function updateContextProvider(current$$1, workInProgress, renderExpirationTime) {
  var providerType = workInProgress.type;
  var context = providerType._context;

  var newProps = workInProgress.pendingProps;
  var oldProps = workInProgress.memoizedProps;

  var newValue = newProps.value;

  {
    var providerPropTypes = workInProgress.type.propTypes;

    if (providerPropTypes) {
      checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider', getCurrentFiberStackInDev);
    }
  }

  pushProvider(workInProgress, newValue);

  if (oldProps !== null) {
    var oldValue = oldProps.value;
    var changedBits = calculateChangedBits(context, newValue, oldValue);
    if (changedBits === 0) {
      // No change. Bailout early if children are the same.
      if (oldProps.children === newProps.children && !hasContextChanged()) {
        return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
      }
    } else {
      // The context value changed. Search for matching consumers and schedule
      // them to update.
      propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);
    }
  }

  var newChildren = newProps.children;
  reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);
  return workInProgress.child;
}

var hasWarnedAboutUsingContextAsConsumer = false;

function updateContextConsumer(current$$1, workInProgress, renderExpirationTime) {
  var context = workInProgress.type;
  // The logic below for Context differs depending on PROD or DEV mode. In
  // DEV mode, we create a separate object for Context.Consumer that acts
  // like a proxy to Context. This proxy object adds unnecessary code in PROD
  // so we use the old behaviour (Context.Consumer references Context) to
  // reduce size and overhead. The separate object references context via
  // a property called "_context", which also gives us the ability to check
  // in DEV mode if this property exists or not and warn if it does not.
  {
    if (context._context === undefined) {
      // This may be because it's a Context (rather than a Consumer).
      // Or it may be because it's older React where they're the same thing.
      // We only want to warn if we're sure it's a new React.
      if (context !== context.Consumer) {
        if (!hasWarnedAboutUsingContextAsConsumer) {
          hasWarnedAboutUsingContextAsConsumer = true;
          warning$1(false, 'Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
        }
      }
    } else {
      context = context._context;
    }
  }
  var newProps = workInProgress.pendingProps;
  var render = newProps.children;

  {
    !(typeof render === 'function') ? warningWithoutStack$1(false, 'A context consumer was rendered with multiple children, or a child ' + "that isn't a function. A context consumer expects a single child " + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.') : void 0;
  }

  prepareToReadContext(workInProgress, renderExpirationTime);
  var newValue = readContext(context, newProps.unstable_observedBits);
  var newChildren = void 0;
  {
    ReactCurrentOwner$3.current = workInProgress;
    setCurrentPhase('render');
    newChildren = render(newValue);
    setCurrentPhase(null);
  }

  // React DevTools reads this flag.
  workInProgress.effectTag |= PerformedWork;
  reconcileChildren(current$$1, workInProgress, newChildren, renderExpirationTime);
  return workInProgress.child;
}

function updateFundamentalComponent$1(current$$1, workInProgress, renderExpirationTime) {
  var fundamentalImpl = workInProgress.type.impl;
  if (fundamentalImpl.reconcileChildren === false) {
    return null;
  }
  var nextProps = workInProgress.pendingProps;
  var nextChildren = nextProps.children;

  reconcileChildren(current$$1, workInProgress, nextChildren, renderExpirationTime);
  return workInProgress.child;
}

function markWorkInProgressReceivedUpdate() {
  didReceiveUpdate = true;
}

function bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime) {
  cancelWorkTimer(workInProgress);

  if (current$$1 !== null) {
    // Reuse previous dependencies
    workInProgress.dependencies = current$$1.dependencies;
  }

  if (enableProfilerTimer) {
    // Don't update "base" render times for bailouts.
    stopProfilerTimerIfRunning(workInProgress);
  }

  // Check if the children have any pending work.
  var childExpirationTime = workInProgress.childExpirationTime;
  if (childExpirationTime < renderExpirationTime) {
    // The children don't have any work either. We can skip them.
    // TODO: Once we add back resuming, we should check if the children are
    // a work-in-progress set. If so, we need to transfer their effects.
    return null;
  } else {
    // This fiber doesn't have work, but its subtree does. Clone the child
    // fibers and continue.
    cloneChildFibers(current$$1, workInProgress);
    return workInProgress.child;
  }
}

function remountFiber(current$$1, oldWorkInProgress, newWorkInProgress) {
  {
    var returnFiber = oldWorkInProgress.return;
    if (returnFiber === null) {
      throw new Error('Cannot swap the root fiber.');
    }

    // Disconnect from the old current.
    // It will get deleted.
    current$$1.alternate = null;
    oldWorkInProgress.alternate = null;

    // Connect to the new tree.
    newWorkInProgress.index = oldWorkInProgress.index;
    newWorkInProgress.sibling = oldWorkInProgress.sibling;
    newWorkInProgress.return = oldWorkInProgress.return;
    newWorkInProgress.ref = oldWorkInProgress.ref;

    // Replace the child/sibling pointers above it.
    if (oldWorkInProgress === returnFiber.child) {
      returnFiber.child = newWorkInProgress;
    } else {
      var prevSibling = returnFiber.child;
      if (prevSibling === null) {
        throw new Error('Expected parent to have a child.');
      }
      while (prevSibling.sibling !== oldWorkInProgress) {
        prevSibling = prevSibling.sibling;
        if (prevSibling === null) {
          throw new Error('Expected to find the previous sibling.');
        }
      }
      prevSibling.sibling = newWorkInProgress;
    }

    // Delete the old fiber and place the new one.
    // Since the old fiber is disconnected, we have to schedule it manually.
    var last = returnFiber.lastEffect;
    if (last !== null) {
      last.nextEffect = current$$1;
      returnFiber.lastEffect = current$$1;
    } else {
      returnFiber.firstEffect = returnFiber.lastEffect = current$$1;
    }
    current$$1.nextEffect = null;
    current$$1.effectTag = Deletion;

    newWorkInProgress.effectTag |= Placement;

    // Restart work from the new fiber.
    return newWorkInProgress;
  }
}

function beginWork$1(current$$1, workInProgress, renderExpirationTime) {
  var updateExpirationTime = workInProgress.expirationTime;

  {
    if (workInProgress._debugNeedsRemount && current$$1 !== null) {
      // This will restart the begin phase with a new fiber.
      return remountFiber(current$$1, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.expirationTime));
    }
  }

  if (current$$1 !== null) {
    var oldProps = current$$1.memoizedProps;
    var newProps = workInProgress.pendingProps;

    if (oldProps !== newProps || hasContextChanged() || (
    // Force a re-render if the implementation changed due to hot reload:
    workInProgress.type !== current$$1.type)) {
      // If props or context changed, mark the fiber as having performed work.
      // This may be unset if the props are determined to be equal later (memo).
      didReceiveUpdate = true;
    } else if (updateExpirationTime < renderExpirationTime) {
      didReceiveUpdate = false;
      // This fiber does not have any pending work. Bailout without entering
      // the begin phase. There's still some bookkeeping we that needs to be done
      // in this optimized path, mostly pushing stuff onto the stack.
      switch (workInProgress.tag) {
        case HostRoot:
          pushHostRootContext(workInProgress);
          resetHydrationState();
          break;
        case HostComponent:
          pushHostContext(workInProgress);
          if (workInProgress.mode & ConcurrentMode && renderExpirationTime !== Never && shouldDeprioritizeSubtree(workInProgress.type, newProps)) {
            if (enableSchedulerTracing) {
              markSpawnedWork(Never);
            }
            // Schedule this fiber to re-render at offscreen priority. Then bailout.
            workInProgress.expirationTime = workInProgress.childExpirationTime = Never;
            return null;
          }
          break;
        case ClassComponent:
          {
            var Component = workInProgress.type;
            if (isContextProvider(Component)) {
              pushContextProvider(workInProgress);
            }
            break;
          }
        case HostPortal:
          pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
          break;
        case ContextProvider:
          {
            var newValue = workInProgress.memoizedProps.value;
            pushProvider(workInProgress, newValue);
            break;
          }
        case Profiler:
          if (enableProfilerTimer) {
            workInProgress.effectTag |= Update;
          }
          break;
        case SuspenseComponent:
          {
            var state = workInProgress.memoizedState;
            var didTimeout = state !== null;
            if (didTimeout) {
              // If this boundary is currently timed out, we need to decide
              // whether to retry the primary children, or to skip over it and
              // go straight to the fallback. Check the priority of the primary
              var primaryChildFragment = workInProgress.child;
              var primaryChildExpirationTime = primaryChildFragment.childExpirationTime;
              if (primaryChildExpirationTime !== NoWork && primaryChildExpirationTime >= renderExpirationTime) {
                // The primary children have pending work. Use the normal path
                // to attempt to render the primary children again.
                return updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime);
              } else {
                pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));
                // The primary children do not have pending work with sufficient
                // priority. Bailout.
                var child = bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
                if (child !== null) {
                  // The fallback children have pending work. Skip over the
                  // primary children and work on the fallback.
                  return child.sibling;
                } else {
                  return null;
                }
              }
            } else {
              pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));
            }
            break;
          }
        case DehydratedSuspenseComponent:
          {
            if (enableSuspenseServerRenderer) {
              pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));
              // We know that this component will suspend again because if it has
              // been unsuspended it has committed as a regular Suspense component.
              // If it needs to be retried, it should have work scheduled on it.
              workInProgress.effectTag |= DidCapture;
            }
            break;
          }
        case SuspenseListComponent:
          {
            var didSuspendBefore = (current$$1.effectTag & DidCapture) !== NoEffect;

            var hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime;

            if (didSuspendBefore) {
              if (hasChildWork) {
                // If something was in fallback state last time, and we have all the
                // same children then we're still in progressive loading state.
                // Something might get unblocked by state updates or retries in the
                // tree which will affect the tail. So we need to use the normal
                // path to compute the correct tail.
                return updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime);
              }
              // If none of the children had any work, that means that none of
              // them got retried so they'll still be blocked in the same way
              // as before. We can fast bail out.
              workInProgress.effectTag |= DidCapture;
            }

            // If nothing suspended before and we're rendering the same children,
            // then the tail doesn't matter. Anything new that suspends will work
            // in the "together" mode, so we can continue from the state we had.
            var renderState = workInProgress.memoizedState;
            if (renderState !== null) {
              // Reset to the "together" mode in case we've started a different
              // update in the past but didn't complete it.
              renderState.rendering = null;
              renderState.tail = null;
            }
            pushSuspenseContext(workInProgress, suspenseStackCursor.current);

            if (hasChildWork) {
              break;
            } else {
              // If none of the children had any work, that means that none of
              // them got retried so they'll still be blocked in the same way
              // as before. We can fast bail out.
              return null;
            }
          }
      }
      return bailoutOnAlreadyFinishedWork(current$$1, workInProgress, renderExpirationTime);
    }
  } else {
    didReceiveUpdate = false;
  }

  // Before entering the begin phase, clear the expiration time.
  workInProgress.expirationTime = NoWork;

  switch (workInProgress.tag) {
    case IndeterminateComponent:
      {
        return mountIndeterminateComponent(current$$1, workInProgress, workInProgress.type, renderExpirationTime);
      }
    case LazyComponent:
      {
        var elementType = workInProgress.elementType;
        return mountLazyComponent(current$$1, workInProgress, elementType, updateExpirationTime, renderExpirationTime);
      }
    case FunctionComponent:
      {
        var _Component = workInProgress.type;
        var unresolvedProps = workInProgress.pendingProps;
        var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);
        return updateFunctionComponent(current$$1, workInProgress, _Component, resolvedProps, renderExpirationTime);
      }
    case ClassComponent:
      {
        var _Component2 = workInProgress.type;
        var _unresolvedProps = workInProgress.pendingProps;
        var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);
        return updateClassComponent(current$$1, workInProgress, _Component2, _resolvedProps, renderExpirationTime);
      }
    case HostRoot:
      return updateHostRoot(current$$1, workInProgress, renderExpirationTime);
    case HostComponent:
      return updateHostComponent(current$$1, workInProgress, renderExpirationTime);
    case HostText:
      return updateHostText(current$$1, workInProgress);
    case SuspenseComponent:
      return updateSuspenseComponent(current$$1, workInProgress, renderExpirationTime);
    case HostPortal:
      return updatePortalComponent(current$$1, workInProgress, renderExpirationTime);
    case ForwardRef:
      {
        var type = workInProgress.type;
        var _unresolvedProps2 = workInProgress.pendingProps;
        var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
        return updateForwardRef(current$$1, workInProgress, type, _resolvedProps2, renderExpirationTime);
      }
    case Fragment:
      return updateFragment(current$$1, workInProgress, renderExpirationTime);
    case Mode:
      return updateMode(current$$1, workInProgress, renderExpirationTime);
    case Profiler:
      return updateProfiler(current$$1, workInProgress, renderExpirationTime);
    case ContextProvider:
      return updateContextProvider(current$$1, workInProgress, renderExpirationTime);
    case ContextConsumer:
      return updateContextConsumer(current$$1, workInProgress, renderExpirationTime);
    case MemoComponent:
      {
        var _type2 = workInProgress.type;
        var _unresolvedProps3 = workInProgress.pendingProps;
        // Resolve outer props first, then resolve inner props.
        var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);
        {
          if (workInProgress.type !== workInProgress.elementType) {
            var outerPropTypes = _type2.propTypes;
            if (outerPropTypes) {
              checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only
              'prop', getComponentName(_type2), getCurrentFiberStackInDev);
            }
          }
        }
        _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);
        return updateMemoComponent(current$$1, workInProgress, _type2, _resolvedProps3, updateExpirationTime, renderExpirationTime);
      }
    case SimpleMemoComponent:
      {
        return updateSimpleMemoComponent(current$$1, workInProgress, workInProgress.type, workInProgress.pendingProps, updateExpirationTime, renderExpirationTime);
      }
    case IncompleteClassComponent:
      {
        var _Component3 = workInProgress.type;
        var _unresolvedProps4 = workInProgress.pendingProps;
        var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);
        return mountIncompleteClassComponent(current$$1, workInProgress, _Component3, _resolvedProps4, renderExpirationTime);
      }
    case DehydratedSuspenseComponent:
      {
        if (enableSuspenseServerRenderer) {
          return updateDehydratedSuspenseComponent(current$$1, workInProgress, renderExpirationTime);
        }
        break;
      }
    case SuspenseListComponent:
      {
        return updateSuspenseListComponent(current$$1, workInProgress, renderExpirationTime);
      }
    case FundamentalComponent:
      {
        if (enableFundamentalAPI) {
          return updateFundamentalComponent$1(current$$1, workInProgress, renderExpirationTime);
        }
        break;
      }
  }
  (function () {
    {
      {
        throw ReactError(Error('Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.'));
      }
    }
  })();
}

function createFundamentalStateInstance(currentFiber, props, impl, state) {
  return {
    currentFiber: currentFiber,
    impl: impl,
    instance: null,
    prevProps: null,
    props: props,
    state: state
  };
}

var emptyObject = {};
var isArray$2 = Array.isArray;

function markUpdate(workInProgress) {
  // Tag the fiber with an update effect. This turns a Placement into
  // a PlacementAndUpdate.
  workInProgress.effectTag |= Update;
}

function markRef$1(workInProgress) {
  workInProgress.effectTag |= Ref;
}

var appendAllChildren = void 0;
var updateHostContainer = void 0;
var updateHostComponent$1 = void 0;
var updateHostText$1 = void 0;
if (supportsMutation) {
  // Mutation mode

  appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {
    // We only have the top Fiber that was created but we need recurse down its
    // children to find all the terminal nodes.
    var node = workInProgress.child;
    while (node !== null) {
      if (node.tag === HostComponent || node.tag === HostText) {
        appendInitialChild(parent, node.stateNode);
      } else if (node.tag === FundamentalComponent) {
        appendInitialChild(parent, node.stateNode.instance);
      } else if (node.tag === HostPortal) {
        // If we have a portal child, then we don't want to traverse
        // down its children. Instead, we'll get insertions from each child in
        // the portal directly.
      } else if (node.child !== null) {
        node.child.return = node;
        node = node.child;
        continue;
      }
      if (node === workInProgress) {
        return;
      }
      while (node.sibling === null) {
        if (node.return === null || node.return === workInProgress) {
          return;
        }
        node = node.return;
      }
      node.sibling.return = node.return;
      node = node.sibling;
    }
  };

  updateHostContainer = function (workInProgress) {
    // Noop
  };
  updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {
    // If we have an alternate, that means this is an update and we need to
    // schedule a side-effect to do the updates.
    var oldProps = current.memoizedProps;
    if (oldProps === newProps) {
      // In mutation mode, this is sufficient for a bailout because
      // we won't touch this node even if children changed.
      return;
    }

    // If we get updated because one of our children updated, we don't
    // have newProps so we'll have to reuse them.
    // TODO: Split the update API as separate for the props vs. children.
    // Even better would be if children weren't special cased at all tho.
    var instance = workInProgress.stateNode;
    var currentHostContext = getHostContext();
    // TODO: Experiencing an error where oldProps is null. Suggests a host
    // component is hitting the resume path. Figure out why. Possibly
    // related to `hidden`.
    var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext);
    // TODO: Type this specific to this type of component.
    workInProgress.updateQueue = updatePayload;
    // If the update payload indicates that there is a change or if there
    // is a new ref we mark this as an update. All the work is done in commitWork.
    if (updatePayload) {
      markUpdate(workInProgress);
    }
  };
  updateHostText$1 = function (current, workInProgress, oldText, newText) {
    // If the text differs, mark it as an update. All the work in done in commitWork.
    if (oldText !== newText) {
      markUpdate(workInProgress);
    }
  };
} else if (supportsPersistence) {
  // Persistent host tree mode

  appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {
    // We only have the top Fiber that was created but we need recurse down its
    // children to find all the terminal nodes.
    var node = workInProgress.child;
    while (node !== null) {
      // eslint-disable-next-line no-labels
      branches: if (node.tag === HostComponent) {
        var instance = node.stateNode;
        if (needsVisibilityToggle && isHidden) {
          // This child is inside a timed out tree. Hide it.
          var props = node.memoizedProps;
          var type = node.type;
          instance = cloneHiddenInstance(instance, type, props, node);
        }
        appendInitialChild(parent, instance);
      } else if (node.tag === HostText) {
        var _instance = node.stateNode;
        if (needsVisibilityToggle && isHidden) {
          // This child is inside a timed out tree. Hide it.
          var text = node.memoizedProps;
          _instance = cloneHiddenTextInstance(_instance, text, node);
        }
        appendInitialChild(parent, _instance);
      } else if (enableFundamentalAPI && node.tag === FundamentalComponent) {
        var _instance2 = node.stateNode.instance;
        if (needsVisibilityToggle && isHidden) {
          // This child is inside a timed out tree. Hide it.
          var _props = node.memoizedProps;
          var _type = node.type;
          _instance2 = cloneHiddenInstance(_instance2, _type, _props, node);
        }
        appendInitialChild(parent, _instance2);
      } else if (node.tag === HostPortal) {
        // If we have a portal child, then we don't want to traverse
        // down its children. Instead, we'll get insertions from each child in
        // the portal directly.
      } else if (node.tag === SuspenseComponent) {
        if ((node.effectTag & Update) !== NoEffect) {
          // Need to toggle the visibility of the primary children.
          var newIsHidden = node.memoizedState !== null;
          if (newIsHidden) {
            var primaryChildParent = node.child;
            if (primaryChildParent !== null) {
              if (primaryChildParent.child !== null) {
                primaryChildParent.child.return = primaryChildParent;
                appendAllChildren(parent, primaryChildParent, true, newIsHidden);
              }
              var fallbackChildParent = primaryChildParent.sibling;
              if (fallbackChildParent !== null) {
                fallbackChildParent.return = node;
                node = fallbackChildParent;
                continue;
              }
            }
          }
        }
        if (node.child !== null) {
          // Continue traversing like normal
          node.child.return = node;
          node = node.child;
          continue;
        }
      } else if (node.child !== null) {
        node.child.return = node;
        node = node.child;
        continue;
      }
      // $FlowFixMe This is correct but Flow is confused by the labeled break.
      node = node;
      if (node === workInProgress) {
        return;
      }
      while (node.sibling === null) {
        if (node.return === null || node.return === workInProgress) {
          return;
        }
        node = node.return;
      }
      node.sibling.return = node.return;
      node = node.sibling;
    }
  };

  // An unfortunate fork of appendAllChildren because we have two different parent types.
  var appendAllChildrenToContainer = function (containerChildSet, workInProgress, needsVisibilityToggle, isHidden) {
    // We only have the top Fiber that was created but we need recurse down its
    // children to find all the terminal nodes.
    var node = workInProgress.child;
    while (node !== null) {
      // eslint-disable-next-line no-labels
      branches: if (node.tag === HostComponent) {
        var instance = node.stateNode;
        if (needsVisibilityToggle && isHidden) {
          // This child is inside a timed out tree. Hide it.
          var props = node.memoizedProps;
          var type = node.type;
          instance = cloneHiddenInstance(instance, type, props, node);
        }
        appendChildToContainerChildSet(containerChildSet, instance);
      } else if (node.tag === HostText) {
        var _instance3 = node.stateNode;
        if (needsVisibilityToggle && isHidden) {
          // This child is inside a timed out tree. Hide it.
          var text = node.memoizedProps;
          _instance3 = cloneHiddenTextInstance(_instance3, text, node);
        }
        appendChildToContainerChildSet(containerChildSet, _instance3);
      } else if (enableFundamentalAPI && node.tag === FundamentalComponent) {
        var _instance4 = node.stateNode.instance;
        if (needsVisibilityToggle && isHidden) {
          // This child is inside a timed out tree. Hide it.
          var _props2 = node.memoizedProps;
          var _type2 = node.type;
          _instance4 = cloneHiddenInstance(_instance4, _type2, _props2, node);
        }
        appendChildToContainerChildSet(containerChildSet, _instance4);
      } else if (node.tag === HostPortal) {
        // If we have a portal child, then we don't want to traverse
        // down its children. Instead, we'll get insertions from each child in
        // the portal directly.
      } else if (node.tag === SuspenseComponent) {
        if ((node.effectTag & Update) !== NoEffect) {
          // Need to toggle the visibility of the primary children.
          var newIsHidden = node.memoizedState !== null;
          if (newIsHidden) {
            var primaryChildParent = node.child;
            if (primaryChildParent !== null) {
              if (primaryChildParent.child !== null) {
                primaryChildParent.child.return = primaryChildParent;
                appendAllChildrenToContainer(containerChildSet, primaryChildParent, true, newIsHidden);
              }
              var fallbackChildParent = primaryChildParent.sibling;
              if (fallbackChildParent !== null) {
                fallbackChildParent.return = node;
                node = fallbackChildParent;
                continue;
              }
            }
          }
        }
        if (node.child !== null) {
          // Continue traversing like normal
          node.child.return = node;
          node = node.child;
          continue;
        }
      } else if (node.child !== null) {
        node.child.return = node;
        node = node.child;
        continue;
      }
      // $FlowFixMe This is correct but Flow is confused by the labeled break.
      node = node;
      if (node === workInProgress) {
        return;
      }
      while (node.sibling === null) {
        if (node.return === null || node.return === workInProgress) {
          return;
        }
        node = node.return;
      }
      node.sibling.return = node.return;
      node = node.sibling;
    }
  };
  updateHostContainer = function (workInProgress) {
    var portalOrRoot = workInProgress.stateNode;
    var childrenUnchanged = workInProgress.firstEffect === null;
    if (childrenUnchanged) {
      // No changes, just reuse the existing instance.
    } else {
      var container = portalOrRoot.containerInfo;
      var newChildSet = createContainerChildSet(container);
      // If children might have changed, we have to add them all to the set.
      appendAllChildrenToContainer(newChildSet, workInProgress, false, false);
      portalOrRoot.pendingChildren = newChildSet;
      // Schedule an update on the container to swap out the container.
      markUpdate(workInProgress);
      finalizeContainerChildren(container, newChildSet);
    }
  };
  updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {
    var currentInstance = current.stateNode;
    var oldProps = current.memoizedProps;
    // If there are no effects associated with this node, then none of our children had any updates.
    // This guarantees that we can reuse all of them.
    var childrenUnchanged = workInProgress.firstEffect === null;
    if (childrenUnchanged && oldProps === newProps) {
      // No changes, just reuse the existing instance.
      // Note that this might release a previous clone.
      workInProgress.stateNode = currentInstance;
      return;
    }
    var recyclableInstance = workInProgress.stateNode;
    var currentHostContext = getHostContext();
    var updatePayload = null;
    if (oldProps !== newProps) {
      updatePayload = prepareUpdate(recyclableInstance, type, oldProps, newProps, rootContainerInstance, currentHostContext);
    }
    if (childrenUnchanged && updatePayload === null) {
      // No changes, just reuse the existing instance.
      // Note that this might release a previous clone.
      workInProgress.stateNode = currentInstance;
      return;
    }
    var newInstance = cloneInstance(currentInstance, updatePayload, type, oldProps, newProps, workInProgress, childrenUnchanged, recyclableInstance);
    if (finalizeInitialChildren(newInstance, type, newProps, rootContainerInstance, currentHostContext)) {
      markUpdate(workInProgress);
    }
    workInProgress.stateNode = newInstance;
    if (childrenUnchanged) {
      // If there are no other effects in this tree, we need to flag this node as having one.
      // Even though we're not going to use it for anything.
      // Otherwise parents won't know that there are new children to propagate upwards.
      markUpdate(workInProgress);
    } else {
      // If children might have changed, we have to add them all to the set.
      appendAllChildren(newInstance, workInProgress, false, false);
    }
  };
  updateHostText$1 = function (current, workInProgress, oldText, newText) {
    if (oldText !== newText) {
      // If the text content differs, we'll create a new text instance for it.
      var rootContainerInstance = getRootHostContainer();
      var currentHostContext = getHostContext();
      workInProgress.stateNode = createTextInstance(newText, rootContainerInstance, currentHostContext, workInProgress);
      // We'll have to mark it as having an effect, even though we won't use the effect for anything.
      // This lets the parents know that at least one of their children has changed.
      markUpdate(workInProgress);
    }
  };
} else {
  // No host operations
  updateHostContainer = function (workInProgress) {
    // Noop
  };
  updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {
    // Noop
  };
  updateHostText$1 = function (current, workInProgress, oldText, newText) {
    // Noop
  };
}

function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
  switch (renderState.tailMode) {
    case 'hidden':
      {
        // Any insertions at the end of the tail list after this point
        // should be invisible. If there are already mounted boundaries
        // anything before them are not considered for collapsing.
        // Therefore we need to go through the whole tail to find if
        // there are any.
        var tailNode = renderState.tail;
        var lastTailNode = null;
        while (tailNode !== null) {
          if (tailNode.alternate !== null) {
            lastTailNode = tailNode;
          }
          tailNode = tailNode.sibling;
        }
        // Next we're simply going to delete all insertions after the
        // last rendered item.
        if (lastTailNode === null) {
          // All remaining items in the tail are insertions.
          renderState.tail = null;
        } else {
          // Detach the insertion after the last node that was already
          // inserted.
          lastTailNode.sibling = null;
        }
        break;
      }
    case 'collapsed':
      {
        // Any insertions at the end of the tail list after this point
        // should be invisible. If there are already mounted boundaries
        // anything before them are not considered for collapsing.
        // Therefore we need to go through the whole tail to find if
        // there are any.
        var _tailNode = renderState.tail;
        var _lastTailNode = null;
        while (_tailNode !== null) {
          if (_tailNode.alternate !== null) {
            _lastTailNode = _tailNode;
          }
          _tailNode = _tailNode.sibling;
        }
        // Next we're simply going to delete all insertions after the
        // last rendered item.
        if (_lastTailNode === null) {
          // All remaining items in the tail are insertions.
          if (!hasRenderedATailFallback && renderState.tail !== null) {
            // We suspended during the head. We want to show at least one
            // row at the tail. So we'll keep on and cut off the rest.
            renderState.tail.sibling = null;
          } else {
            renderState.tail = null;
          }
        } else {
          // Detach the insertion after the last node that was already
          // inserted.
          _lastTailNode.sibling = null;
        }
        break;
      }
  }
}

function completeWork(current, workInProgress, renderExpirationTime) {
  var newProps = workInProgress.pendingProps;

  switch (workInProgress.tag) {
    case IndeterminateComponent:
      break;
    case LazyComponent:
      break;
    case SimpleMemoComponent:
    case FunctionComponent:
      break;
    case ClassComponent:
      {
        var Component = workInProgress.type;
        if (isContextProvider(Component)) {
          popContext(workInProgress);
        }
        break;
      }
    case HostRoot:
      {
        popHostContainer(workInProgress);
        popTopLevelContextObject(workInProgress);
        var fiberRoot = workInProgress.stateNode;
        if (fiberRoot.pendingContext) {
          fiberRoot.context = fiberRoot.pendingContext;
          fiberRoot.pendingContext = null;
        }
        if (current === null || current.child === null) {
          // If we hydrated, pop so that we can delete any remaining children
          // that weren't hydrated.
          popHydrationState(workInProgress);
          // This resets the hacky state to fix isMounted before committing.
          // TODO: Delete this when we delete isMounted and findDOMNode.
          workInProgress.effectTag &= ~Placement;
        }
        updateHostContainer(workInProgress);
        break;
      }
    case HostComponent:
      {
        popHostContext(workInProgress);
        var rootContainerInstance = getRootHostContainer();
        var type = workInProgress.type;
        if (current !== null && workInProgress.stateNode != null) {
          updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);

          if (enableFlareAPI) {
            var prevListeners = current.memoizedProps.listeners;
            var nextListeners = newProps.listeners;
            var instance = workInProgress.stateNode;
            if (prevListeners !== nextListeners) {
              updateEventListeners(nextListeners, instance, rootContainerInstance, workInProgress);
            }
          }

          if (current.ref !== workInProgress.ref) {
            markRef$1(workInProgress);
          }
        } else {
          if (!newProps) {
            (function () {
              if (!(workInProgress.stateNode !== null)) {
                {
                  throw ReactError(Error('We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.'));
                }
              }
            })();
            // This can happen when we abort work.
            break;
          }

          var currentHostContext = getHostContext();
          // TODO: Move createInstance to beginWork and keep it on a context
          // "stack" as the parent. Then append children as we go in beginWork
          // or completeWork depending on we want to add then top->down or
          // bottom->up. Top->down is faster in IE11.
          var wasHydrated = popHydrationState(workInProgress);
          if (wasHydrated) {
            // TODO: Move this and createInstance step into the beginPhase
            // to consolidate.
            if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {
              // If changes to the hydrated node needs to be applied at the
              // commit-phase we mark this as such.
              markUpdate(workInProgress);
            }
          } else {
            var _instance5 = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);

            appendAllChildren(_instance5, workInProgress, false, false);

            if (enableFlareAPI) {
              var listeners = newProps.listeners;
              if (listeners != null) {
                updateEventListeners(listeners, _instance5, rootContainerInstance, workInProgress);
              }
            }

            // Certain renderers require commit-time effects for initial mount.
            // (eg DOM renderer supports auto-focus for certain elements).
            // Make sure such renderers get scheduled for later work.
            if (finalizeInitialChildren(_instance5, type, newProps, rootContainerInstance, currentHostContext)) {
              markUpdate(workInProgress);
            }
            workInProgress.stateNode = _instance5;
          }

          if (workInProgress.ref !== null) {
            // If there is a ref on a host node we need to schedule a callback
            markRef$1(workInProgress);
          }
        }
        break;
      }
    case HostText:
      {
        var newText = newProps;
        if (current && workInProgress.stateNode != null) {
          var oldText = current.memoizedProps;
          // If we have an alternate, that means this is an update and we need
          // to schedule a side-effect to do the updates.
          updateHostText$1(current, workInProgress, oldText, newText);
        } else {
          if (typeof newText !== 'string') {
            (function () {
              if (!(workInProgress.stateNode !== null)) {
                {
                  throw ReactError(Error('We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.'));
                }
              }
            })();
            // This can happen when we abort work.
          }
          var _rootContainerInstance = getRootHostContainer();
          var _currentHostContext = getHostContext();
          var _wasHydrated = popHydrationState(workInProgress);
          if (_wasHydrated) {
            if (prepareToHydrateHostTextInstance(workInProgress)) {
              markUpdate(workInProgress);
            }
          } else {
            workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);
          }
        }
        break;
      }
    case ForwardRef:
      break;
    case SuspenseComponent:
      {
        popSuspenseContext(workInProgress);
        var nextState = workInProgress.memoizedState;
        if ((workInProgress.effectTag & DidCapture) !== NoEffect) {
          // Something suspended. Re-render with the fallback children.
          workInProgress.expirationTime = renderExpirationTime;
          // Do not reset the effect list.
          return workInProgress;
        }

        var nextDidTimeout = nextState !== null;
        var prevDidTimeout = false;
        if (current === null) {
          // In cases where we didn't find a suitable hydration boundary we never
          // downgraded this to a DehydratedSuspenseComponent, but we still need to
          // pop the hydration state since we might be inside the insertion tree.
          popHydrationState(workInProgress);
        } else {
          var prevState = current.memoizedState;
          prevDidTimeout = prevState !== null;
          if (!nextDidTimeout && prevState !== null) {
            // We just switched from the fallback to the normal children.
            // Delete the fallback.
            // TODO: Would it be better to store the fallback fragment on
            var currentFallbackChild = current.child.sibling;
            if (currentFallbackChild !== null) {
              // Deletions go at the beginning of the return fiber's effect list
              var first = workInProgress.firstEffect;
              if (first !== null) {
                workInProgress.firstEffect = currentFallbackChild;
                currentFallbackChild.nextEffect = first;
              } else {
                workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChild;
                currentFallbackChild.nextEffect = null;
              }
              currentFallbackChild.effectTag = Deletion;
            }
          }
        }

        if (nextDidTimeout && !prevDidTimeout) {
          // If this subtreee is running in batched mode we can suspend,
          // otherwise we won't suspend.
          // TODO: This will still suspend a synchronous tree if anything
          // in the concurrent tree already suspended during this render.
          // This is a known bug.
          if ((workInProgress.mode & BatchedMode) !== NoMode) {
            // TODO: Move this back to throwException because this is too late
            // if this is a large tree which is common for initial loads. We
            // don't know if we should restart a render or not until we get
            // this marker, and this is too late.
            // If this render already had a ping or lower pri updates,
            // and this is the first time we know we're going to suspend we
            // should be able to immediately restart from within throwException.
            var hasInvisibleChildContext = current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true;
            if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {
              // If this was in an invisible tree or a new render, then showing
              // this boundary is ok.
              renderDidSuspend();
            } else {
              // Otherwise, we're going to have to hide content so we should
              // suspend for longer if possible.
              renderDidSuspendDelayIfPossible();
            }
          }
        }

        if (supportsPersistence) {
          // TODO: Only schedule updates if not prevDidTimeout.
          if (nextDidTimeout) {
            // If this boundary just timed out, schedule an effect to attach a
            // retry listener to the proimse. This flag is also used to hide the
            // primary children.
            workInProgress.effectTag |= Update;
          }
        }
        if (supportsMutation) {
          // TODO: Only schedule updates if these values are non equal, i.e. it changed.
          if (nextDidTimeout || prevDidTimeout) {
            // If this boundary just timed out, schedule an effect to attach a
            // retry listener to the proimse. This flag is also used to hide the
            // primary children. In mutation mode, we also need the flag to
            // *unhide* children that were previously hidden, so check if the
            // is currently timed out, too.
            workInProgress.effectTag |= Update;
          }
        }
        if (enableSuspenseCallback && workInProgress.updateQueue !== null && workInProgress.memoizedProps.suspenseCallback != null) {
          // Always notify the callback
          workInProgress.effectTag |= Update;
        }
        break;
      }
    case Fragment:
      break;
    case Mode:
      break;
    case Profiler:
      break;
    case HostPortal:
      popHostContainer(workInProgress);
      updateHostContainer(workInProgress);
      break;
    case ContextProvider:
      // Pop provider fiber
      popProvider(workInProgress);
      break;
    case ContextConsumer:
      break;
    case MemoComponent:
      break;
    case IncompleteClassComponent:
      {
        // Same as class component case. I put it down here so that the tags are
        // sequential to ensure this switch is compiled to a jump table.
        var _Component = workInProgress.type;
        if (isContextProvider(_Component)) {
          popContext(workInProgress);
        }
        break;
      }
    case DehydratedSuspenseComponent:
      {
        if (enableSuspenseServerRenderer) {
          popSuspenseContext(workInProgress);
          if (current === null) {
            var _wasHydrated2 = popHydrationState(workInProgress);
            (function () {
              if (!_wasHydrated2) {
                {
                  throw ReactError(Error('A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.'));
                }
              }
            })();
            if (enableSchedulerTracing) {
              markSpawnedWork(Never);
            }
            skipPastDehydratedSuspenseInstance(workInProgress);
          } else if ((workInProgress.effectTag & DidCapture) === NoEffect) {
            // This boundary did not suspend so it's now hydrated.
            // To handle any future suspense cases, we're going to now upgrade it
            // to a Suspense component. We detach it from the existing current fiber.
            current.alternate = null;
            workInProgress.alternate = null;
            workInProgress.tag = SuspenseComponent;
            workInProgress.memoizedState = null;
            workInProgress.stateNode = null;
          }
        }
        break;
      }
    case SuspenseListComponent:
      {
        popSuspenseContext(workInProgress);

        var renderState = workInProgress.memoizedState;

        if (renderState === null) {
          // We're running in the default, "independent" mode. We don't do anything
          // in this mode.
          break;
        }

        var didSuspendAlready = (workInProgress.effectTag & DidCapture) !== NoEffect;

        var renderedTail = renderState.rendering;
        if (renderedTail === null) {
          // We just rendered the head.
          if (!didSuspendAlready) {
            // This is the first pass. We need to figure out if anything is still
            // suspended in the rendered set.

            // If new content unsuspended, but there's still some content that
            // didn't. Then we need to do a second pass that forces everything
            // to keep showing their fallbacks.

            // We might be suspended if something in this render pass suspended, or
            // something in the previous committed pass suspended. Otherwise,
            // there's no chance so we can skip the expensive call to
            // findFirstSuspended.
            var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.effectTag & DidCapture) === NoEffect);
            if (!cannotBeSuspended) {
              var row = workInProgress.child;
              while (row !== null) {
                var suspended = findFirstSuspended(row);
                if (suspended !== null) {
                  didSuspendAlready = true;
                  workInProgress.effectTag |= DidCapture;
                  cutOffTailIfNeeded(renderState, false);

                  // If this is a newly suspended tree, it might not get committed as
                  // part of the second pass. In that case nothing will subscribe to
                  // its thennables. Instead, we'll transfer its thennables to the
                  // SuspenseList so that it can retry if they resolve.
                  // There might be multiple of these in the list but since we're
                  // going to wait for all of them anyway, it doesn't really matter
                  // which ones gets to ping. In theory we could get clever and keep
                  // track of how many dependencies remain but it gets tricky because
                  // in the meantime, we can add/remove/change items and dependencies.
                  // We might bail out of the loop before finding any but that
                  // doesn't matter since that means that the other boundaries that
                  // we did find already has their listeners attached.
                  var newThennables = suspended.updateQueue;
                  if (newThennables !== null) {
                    workInProgress.updateQueue = newThennables;
                    workInProgress.effectTag |= Update;
                  }

                  // Rerender the whole list, but this time, we'll force fallbacks
                  // to stay in place.
                  // Reset the effect list before doing the second pass since that's now invalid.
                  workInProgress.firstEffect = workInProgress.lastEffect = null;
                  // Reset the child fibers to their original state.
                  resetChildFibers(workInProgress, renderExpirationTime);

                  // Set up the Suspense Context to force suspense and immediately
                  // rerender the children.
                  pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback));
                  return workInProgress.child;
                }
                row = row.sibling;
              }
            }
          } else {
            cutOffTailIfNeeded(renderState, false);
          }
          // Next we're going to render the tail.
        } else {
          // Append the rendered row to the child list.
          if (!didSuspendAlready) {
            var _suspended = findFirstSuspended(renderedTail);
            if (_suspended !== null) {
              workInProgress.effectTag |= DidCapture;
              didSuspendAlready = true;
              cutOffTailIfNeeded(renderState, true);
              // This might have been modified.
              if (renderState.tail === null && renderState.tailMode === 'hidden') {
                // We need to delete the row we just rendered.
                // Ensure we transfer the update queue to the parent.
                var _newThennables = _suspended.updateQueue;
                if (_newThennables !== null) {
                  workInProgress.updateQueue = _newThennables;
                  workInProgress.effectTag |= Update;
                }
                // Reset the effect list to what it w as before we rendered this
                // child. The nested children have already appended themselves.
                var lastEffect = workInProgress.lastEffect = renderState.lastEffect;
                // Remove any effects that were appended after this point.
                if (lastEffect !== null) {
                  lastEffect.nextEffect = null;
                }
                // We're done.
                return null;
              }
            } else if (now() > renderState.tailExpiration && renderExpirationTime > Never) {
              // We have now passed our CPU deadline and we'll just give up further
              // attempts to render the main content and only render fallbacks.
              // The assumption is that this is usually faster.
              workInProgress.effectTag |= DidCapture;
              didSuspendAlready = true;

              cutOffTailIfNeeded(renderState, false);

              // Since nothing actually suspended, there will nothing to ping this
              // to get it started back up to attempt the next item. If we can show
              // them, then they really have the same priority as this render.
              // So we'll pick it back up the very next render pass once we've had
              // an opportunity to yield for paint.

              var nextPriority = renderExpirationTime - 1;
              workInProgress.expirationTime = workInProgress.childExpirationTime = nextPriority;
              if (enableSchedulerTracing) {
                markSpawnedWork(nextPriority);
              }
            }
          }
          if (renderState.isBackwards) {
            // The effect list of the backwards tail will have been added
            // to the end. This breaks the guarantee that life-cycles fire in
            // sibling order but that isn't a strong guarantee promised by React.
            // Especially since these might also just pop in during future commits.
            // Append to the beginning of the list.
            renderedTail.sibling = workInProgress.child;
            workInProgress.child = renderedTail;
          } else {
            var previousSibling = renderState.last;
            if (previousSibling !== null) {
              previousSibling.sibling = renderedTail;
            } else {
              workInProgress.child = renderedTail;
            }
            renderState.last = renderedTail;
          }
        }

        if (renderState.tail !== null) {
          // We still have tail rows to render.
          if (renderState.tailExpiration === 0) {
            // Heuristic for how long we're willing to spend rendering rows
            // until we just give up and show what we have so far.
            var TAIL_EXPIRATION_TIMEOUT_MS = 500;
            renderState.tailExpiration = now() + TAIL_EXPIRATION_TIMEOUT_MS;
          }
          // Pop a row.
          var next = renderState.tail;
          renderState.rendering = next;
          renderState.tail = next.sibling;
          renderState.lastEffect = workInProgress.lastEffect;
          next.sibling = null;

          // Restore the context.
          // TODO: We can probably just avoid popping it instead and only
          // setting it the first time we go from not suspended to suspended.
          var suspenseContext = suspenseStackCursor.current;
          if (didSuspendAlready) {
            suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
          } else {
            suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
          }
          pushSuspenseContext(workInProgress, suspenseContext);
          // Do a pass over the next row.
          return next;
        }
        break;
      }
    case FundamentalComponent:
      {
        if (enableFundamentalAPI) {
          var fundamentalImpl = workInProgress.type.impl;
          var fundamentalInstance = workInProgress.stateNode;

          if (fundamentalInstance === null) {
            var getInitialState = fundamentalImpl.getInitialState;
            var fundamentalState = void 0;
            if (getInitialState !== undefined) {
              fundamentalState = getInitialState(newProps);
            }
            fundamentalInstance = workInProgress.stateNode = createFundamentalStateInstance(workInProgress, newProps, fundamentalImpl, fundamentalState || {});
            var _instance6 = getFundamentalComponentInstance(fundamentalInstance);
            fundamentalInstance.instance = _instance6;
            if (fundamentalImpl.reconcileChildren === false) {
              return null;
            }
            appendAllChildren(_instance6, workInProgress, false, false);
            mountFundamentalComponent(fundamentalInstance);
          } else {
            // We fire update in commit phase
            var prevProps = fundamentalInstance.props;
            fundamentalInstance.prevProps = prevProps;
            fundamentalInstance.props = newProps;
            fundamentalInstance.currentFiber = workInProgress;
            if (supportsPersistence) {
              var _instance7 = cloneFundamentalInstance(fundamentalInstance);
              fundamentalInstance.instance = _instance7;
              appendAllChildren(_instance7, workInProgress, false, false);
            }
            var shouldUpdate = shouldUpdateFundamentalComponent(fundamentalInstance);
            if (shouldUpdate) {
              markUpdate(workInProgress);
            }
          }
        }
        break;
      }
    default:
      (function () {
        {
          {
            throw ReactError(Error('Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.'));
          }
        }
      })();
  }

  return null;
}

function mountEventResponder$1(responder, responderProps, instance, rootContainerInstance, fiber, respondersMap) {
  var responderState = emptyObject;
  var getInitialState = responder.getInitialState;
  if (getInitialState !== null) {
    responderState = getInitialState(responderProps);
  }
  var responderInstance = createResponderInstance(responder, responderProps, responderState, instance, fiber);
  mountResponderInstance(responder, responderInstance, responderProps, responderState, instance, rootContainerInstance);
  respondersMap.set(responder, responderInstance);
}

function updateEventListener(listener, fiber, visistedResponders, respondersMap, instance, rootContainerInstance) {
  var responder = void 0;
  var props = void 0;

  if (listener) {
    responder = listener.responder;
    props = listener.props;
  }
  (function () {
    if (!(responder && responder.$$typeof === REACT_RESPONDER_TYPE)) {
      {
        throw ReactError(Error('An invalid value was used as an event listener. Expect one or many event listeners created via React.unstable_useResponer().'));
      }
    }
  })();
  var listenerProps = props;
  if (visistedResponders.has(responder)) {
    // show warning
    {
      warning$1(false, 'Duplicate event responder "%s" found in event listeners. ' + 'Event listeners passed to elements cannot use the same event responder more than once.', responder.displayName);
    }
    return;
  }
  visistedResponders.add(responder);
  var responderInstance = respondersMap.get(responder);

  if (responderInstance === undefined) {
    // Mount
    mountEventResponder$1(responder, listenerProps, instance, rootContainerInstance, fiber, respondersMap);
  } else {
    // Update
    responderInstance.props = listenerProps;
    responderInstance.fiber = fiber;
  }
}

function updateEventListeners(listeners, instance, rootContainerInstance, fiber) {
  var visistedResponders = new Set();
  var dependencies = fiber.dependencies;
  if (listeners != null) {
    if (dependencies === null) {
      dependencies = fiber.dependencies = {
        expirationTime: NoWork,
        firstContext: null,
        responders: new Map()
      };
    }
    var respondersMap = dependencies.responders;
    if (respondersMap === null) {
      respondersMap = new Map();
    }
    if (isArray$2(listeners)) {
      for (var i = 0, length = listeners.length; i < length; i++) {
        var listener = listeners[i];
        updateEventListener(listener, fiber, visistedResponders, respondersMap, instance, rootContainerInstance);
      }
    } else {
      updateEventListener(listeners, fiber, visistedResponders, respondersMap, instance, rootContainerInstance);
    }
  }
  if (dependencies !== null) {
    var _respondersMap = dependencies.responders;
    if (_respondersMap !== null) {
      // Unmount
      var mountedResponders = Array.from(_respondersMap.keys());
      for (var _i = 0, _length = mountedResponders.length; _i < _length; _i++) {
        var mountedResponder = mountedResponders[_i];
        if (!visistedResponders.has(mountedResponder)) {
          var responderInstance = _respondersMap.get(mountedResponder);
          unmountResponderInstance(responderInstance);
          _respondersMap.delete(mountedResponder);
        }
      }
    }
  }
}

function unwindWork(workInProgress, renderExpirationTime) {
  switch (workInProgress.tag) {
    case ClassComponent:
      {
        var Component = workInProgress.type;
        if (isContextProvider(Component)) {
          popContext(workInProgress);
        }
        var effectTag = workInProgress.effectTag;
        if (effectTag & ShouldCapture) {
          workInProgress.effectTag = effectTag & ~ShouldCapture | DidCapture;
          return workInProgress;
        }
        return null;
      }
    case HostRoot:
      {
        popHostContainer(workInProgress);
        popTopLevelContextObject(workInProgress);
        var _effectTag = workInProgress.effectTag;
        (function () {
          if (!((_effectTag & DidCapture) === NoEffect)) {
            {
              throw ReactError(Error('The root failed to unmount after an error. This is likely a bug in React. Please file an issue.'));
            }
          }
        })();
        workInProgress.effectTag = _effectTag & ~ShouldCapture | DidCapture;
        return workInProgress;
      }
    case HostComponent:
      {
        // TODO: popHydrationState
        popHostContext(workInProgress);
        return null;
      }
    case SuspenseComponent:
      {
        popSuspenseContext(workInProgress);
        var _effectTag2 = workInProgress.effectTag;
        if (_effectTag2 & ShouldCapture) {
          workInProgress.effectTag = _effectTag2 & ~ShouldCapture | DidCapture;
          // Captured a suspense effect. Re-render the boundary.
          return workInProgress;
        }
        return null;
      }
    case DehydratedSuspenseComponent:
      {
        if (enableSuspenseServerRenderer) {
          // TODO: popHydrationState
          popSuspenseContext(workInProgress);
          var _effectTag3 = workInProgress.effectTag;
          if (_effectTag3 & ShouldCapture) {
            workInProgress.effectTag = _effectTag3 & ~ShouldCapture | DidCapture;
            // Captured a suspense effect. Re-render the boundary.
            return workInProgress;
          }
        }
        return null;
      }
    case SuspenseListComponent:
      {
        popSuspenseContext(workInProgress);
        // SuspenseList doesn't actually catch anything. It should've been
        // caught by a nested boundary. If not, it should bubble through.
        return null;
      }
    case HostPortal:
      popHostContainer(workInProgress);
      return null;
    case ContextProvider:
      popProvider(workInProgress);
      return null;
    default:
      return null;
  }
}

function unwindInterruptedWork(interruptedWork) {
  switch (interruptedWork.tag) {
    case ClassComponent:
      {
        var childContextTypes = interruptedWork.type.childContextTypes;
        if (childContextTypes !== null && childContextTypes !== undefined) {
          popContext(interruptedWork);
        }
        break;
      }
    case HostRoot:
      {
        popHostContainer(interruptedWork);
        popTopLevelContextObject(interruptedWork);
        break;
      }
    case HostComponent:
      {
        popHostContext(interruptedWork);
        break;
      }
    case HostPortal:
      popHostContainer(interruptedWork);
      break;
    case SuspenseComponent:
      popSuspenseContext(interruptedWork);
      break;
    case DehydratedSuspenseComponent:
      if (enableSuspenseServerRenderer) {
        // TODO: popHydrationState
        popSuspenseContext(interruptedWork);
      }
      break;
    case SuspenseListComponent:
      popSuspenseContext(interruptedWork);
      break;
    case ContextProvider:
      popProvider(interruptedWork);
      break;
    default:
      break;
  }
}

function createCapturedValue(value, source) {
  // If the value is an error, call this function immediately after it is thrown
  // so the stack is accurate.
  return {
    value: value,
    source: source,
    stack: getStackByFiberInDevAndProd(source)
  };
}

// This module is forked in different environments.
// By default, return `true` to log errors to the console.
// Forks can return `false` if this isn't desirable.
function showErrorDialog(capturedError) {
  return true;
}

function logCapturedError(capturedError) {
  var logError = showErrorDialog(capturedError);

  // Allow injected showErrorDialog() to prevent default console.error logging.
  // This enables renderers like ReactNative to better manage redbox behavior.
  if (logError === false) {
    return;
  }

  var error = capturedError.error;
  {
    var componentName = capturedError.componentName,
        componentStack = capturedError.componentStack,
        errorBoundaryName = capturedError.errorBoundaryName,
        errorBoundaryFound = capturedError.errorBoundaryFound,
        willRetry = capturedError.willRetry;

    // Browsers support silencing uncaught errors by calling
    // `preventDefault()` in window `error` handler.
    // We record this information as an expando on the error.

    if (error != null && error._suppressLogging) {
      if (errorBoundaryFound && willRetry) {
        // The error is recoverable and was silenced.
        // Ignore it and don't print the stack addendum.
        // This is handy for testing error boundaries without noise.
        return;
      }
      // The error is fatal. Since the silencing might have
      // been accidental, we'll surface it anyway.
      // However, the browser would have silenced the original error
      // so we'll print it first, and then print the stack addendum.
      console.error(error);
      // For a more detailed description of this block, see:
      // https://github.com/facebook/react/pull/13384
    }

    var componentNameMessage = componentName ? 'The above error occurred in the <' + componentName + '> component:' : 'The above error occurred in one of your React components:';

    var errorBoundaryMessage = void 0;
    // errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow.
    if (errorBoundaryFound && errorBoundaryName) {
      if (willRetry) {
        errorBoundaryMessage = 'React will try to recreate this component tree from scratch ' + ('using the error boundary you provided, ' + errorBoundaryName + '.');
      } else {
        errorBoundaryMessage = 'This error was initially handled by the error boundary ' + errorBoundaryName + '.\n' + 'Recreating the tree from scratch failed so React will unmount the tree.';
      }
    } else {
      errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.';
    }
    var combinedMessage = '' + componentNameMessage + componentStack + '\n\n' + ('' + errorBoundaryMessage);

    // In development, we provide our own message with just the component stack.
    // We don't include the original error message and JS stack because the browser
    // has already printed it. Even if the application swallows the error, it is still
    // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.
    console.error(combinedMessage);
  }
}

var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
{
  didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
}

var PossiblyWeakSet$1 = typeof WeakSet === 'function' ? WeakSet : Set;

function logError(boundary, errorInfo) {
  var source = errorInfo.source;
  var stack = errorInfo.stack;
  if (stack === null && source !== null) {
    stack = getStackByFiberInDevAndProd(source);
  }

  var capturedError = {
    componentName: source !== null ? getComponentName(source.type) : null,
    componentStack: stack !== null ? stack : '',
    error: errorInfo.value,
    errorBoundary: null,
    errorBoundaryName: null,
    errorBoundaryFound: false,
    willRetry: false
  };

  if (boundary !== null && boundary.tag === ClassComponent) {
    capturedError.errorBoundary = boundary.stateNode;
    capturedError.errorBoundaryName = getComponentName(boundary.type);
    capturedError.errorBoundaryFound = true;
    capturedError.willRetry = true;
  }

  try {
    logCapturedError(capturedError);
  } catch (e) {
    // This method must not throw, or React internal state will get messed up.
    // If console.error is overridden, or logCapturedError() shows a dialog that throws,
    // we want to report this error outside of the normal stack as a last resort.
    // https://github.com/facebook/react/issues/13188
    setTimeout(function () {
      throw e;
    });
  }
}

var callComponentWillUnmountWithTimer = function (current$$1, instance) {
  startPhaseTimer(current$$1, 'componentWillUnmount');
  instance.props = current$$1.memoizedProps;
  instance.state = current$$1.memoizedState;
  instance.componentWillUnmount();
  stopPhaseTimer();
};

// Capture errors so they don't interrupt unmounting.
function safelyCallComponentWillUnmount(current$$1, instance) {
  {
    invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current$$1, instance);
    if (hasCaughtError()) {
      var unmountError = clearCaughtError();
      captureCommitPhaseError(current$$1, unmountError);
    }
  }
}

function safelyDetachRef(current$$1) {
  var ref = current$$1.ref;
  if (ref !== null) {
    if (typeof ref === 'function') {
      {
        invokeGuardedCallback(null, ref, null, null);
        if (hasCaughtError()) {
          var refError = clearCaughtError();
          captureCommitPhaseError(current$$1, refError);
        }
      }
    } else {
      ref.current = null;
    }
  }
}

function safelyCallDestroy(current$$1, destroy) {
  {
    invokeGuardedCallback(null, destroy, null);
    if (hasCaughtError()) {
      var error = clearCaughtError();
      captureCommitPhaseError(current$$1, error);
    }
  }
}

function commitBeforeMutationLifeCycles(current$$1, finishedWork) {
  switch (finishedWork.tag) {
    case FunctionComponent:
    case ForwardRef:
    case SimpleMemoComponent:
      {
        commitHookEffectList(UnmountSnapshot, NoEffect$1, finishedWork);
        return;
      }
    case ClassComponent:
      {
        if (finishedWork.effectTag & Snapshot) {
          if (current$$1 !== null) {
            var prevProps = current$$1.memoizedProps;
            var prevState = current$$1.memoizedState;
            startPhaseTimer(finishedWork, 'getSnapshotBeforeUpdate');
            var instance = finishedWork.stateNode;
            // We could update instance props and state here,
            // but instead we rely on them being set during last render.
            // TODO: revisit this when we implement resuming.
            {
              if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
                !(instance.props === finishedWork.memoizedProps) ? warning$1(false, 'Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
                !(instance.state === finishedWork.memoizedState) ? warning$1(false, 'Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
              }
            }
            var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);
            {
              var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;
              if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {
                didWarnSet.add(finishedWork.type);
                warningWithoutStack$1(false, '%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type));
              }
            }
            instance.__reactInternalSnapshotBeforeUpdate = snapshot;
            stopPhaseTimer();
          }
        }
        return;
      }
    case HostRoot:
    case HostComponent:
    case HostText:
    case HostPortal:
    case IncompleteClassComponent:
      // Nothing to do for these component types
      return;
    default:
      {
        (function () {
          {
            {
              throw ReactError(Error('This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.'));
            }
          }
        })();
      }
  }
}

function commitHookEffectList(unmountTag, mountTag, finishedWork) {
  var updateQueue = finishedWork.updateQueue;
  var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
  if (lastEffect !== null) {
    var firstEffect = lastEffect.next;
    var effect = firstEffect;
    do {
      if ((effect.tag & unmountTag) !== NoEffect$1) {
        // Unmount
        var destroy = effect.destroy;
        effect.destroy = undefined;
        if (destroy !== undefined) {
          destroy();
        }
      }
      if ((effect.tag & mountTag) !== NoEffect$1) {
        // Mount
        var create = effect.create;
        effect.destroy = create();

        {
          var _destroy = effect.destroy;
          if (_destroy !== undefined && typeof _destroy !== 'function') {
            var addendum = void 0;
            if (_destroy === null) {
              addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';
            } else if (typeof _destroy.then === 'function') {
              addendum = '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + 'useEffect(() => {\n' + '  async function fetchData() {\n' + '    // You can await here\n' + '    const response = await MyAPI.getData(someId);\n' + '    // ...\n' + '  }\n' + '  fetchData();\n' + '}, [someId]); // Or [] if effect doesn\'t need props or state\n\n' + 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching';
            } else {
              addendum = ' You returned: ' + _destroy;
            }
            warningWithoutStack$1(false, 'An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s%s', addendum, getStackByFiberInDevAndProd(finishedWork));
          }
        }
      }
      effect = effect.next;
    } while (effect !== firstEffect);
  }
}

function commitPassiveHookEffects(finishedWork) {
  if ((finishedWork.effectTag & Passive) !== NoEffect) {
    switch (finishedWork.tag) {
      case FunctionComponent:
      case ForwardRef:
      case SimpleMemoComponent:
        {
          commitHookEffectList(UnmountPassive, NoEffect$1, finishedWork);
          commitHookEffectList(NoEffect$1, MountPassive, finishedWork);
          break;
        }
      default:
        break;
    }
  }
}

function commitLifeCycles(finishedRoot, current$$1, finishedWork, committedExpirationTime) {
  switch (finishedWork.tag) {
    case FunctionComponent:
    case ForwardRef:
    case SimpleMemoComponent:
      {
        commitHookEffectList(UnmountLayout, MountLayout, finishedWork);
        break;
      }
    case ClassComponent:
      {
        var instance = finishedWork.stateNode;
        if (finishedWork.effectTag & Update) {
          if (current$$1 === null) {
            startPhaseTimer(finishedWork, 'componentDidMount');
            // We could update instance props and state here,
            // but instead we rely on them being set during last render.
            // TODO: revisit this when we implement resuming.
            {
              if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
                !(instance.props === finishedWork.memoizedProps) ? warning$1(false, 'Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
                !(instance.state === finishedWork.memoizedState) ? warning$1(false, 'Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
              }
            }
            instance.componentDidMount();
            stopPhaseTimer();
          } else {
            var prevProps = finishedWork.elementType === finishedWork.type ? current$$1.memoizedProps : resolveDefaultProps(finishedWork.type, current$$1.memoizedProps);
            var prevState = current$$1.memoizedState;
            startPhaseTimer(finishedWork, 'componentDidUpdate');
            // We could update instance props and state here,
            // but instead we rely on them being set during last render.
            // TODO: revisit this when we implement resuming.
            {
              if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
                !(instance.props === finishedWork.memoizedProps) ? warning$1(false, 'Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
                !(instance.state === finishedWork.memoizedState) ? warning$1(false, 'Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
              }
            }
            instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
            stopPhaseTimer();
          }
        }
        var updateQueue = finishedWork.updateQueue;
        if (updateQueue !== null) {
          {
            if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
              !(instance.props === finishedWork.memoizedProps) ? warning$1(false, 'Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
              !(instance.state === finishedWork.memoizedState) ? warning$1(false, 'Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance') : void 0;
            }
          }
          // We could update instance props and state here,
          // but instead we rely on them being set during last render.
          // TODO: revisit this when we implement resuming.
          commitUpdateQueue(finishedWork, updateQueue, instance, committedExpirationTime);
        }
        return;
      }
    case HostRoot:
      {
        var _updateQueue = finishedWork.updateQueue;
        if (_updateQueue !== null) {
          var _instance = null;
          if (finishedWork.child !== null) {
            switch (finishedWork.child.tag) {
              case HostComponent:
                _instance = getPublicInstance(finishedWork.child.stateNode);
                break;
              case ClassComponent:
                _instance = finishedWork.child.stateNode;
                break;
            }
          }
          commitUpdateQueue(finishedWork, _updateQueue, _instance, committedExpirationTime);
        }
        return;
      }
    case HostComponent:
      {
        var _instance2 = finishedWork.stateNode;

        // Renderers may schedule work to be done after host components are mounted
        // (eg DOM renderer may schedule auto-focus for inputs and form controls).
        // These effects should only be committed when components are first mounted,
        // aka when there is no current/alternate.
        if (current$$1 === null && finishedWork.effectTag & Update) {
          var type = finishedWork.type;
          var props = finishedWork.memoizedProps;
          commitMount(_instance2, type, props, finishedWork);
        }

        return;
      }
    case HostText:
      {
        // We have no life-cycles associated with text.
        return;
      }
    case HostPortal:
      {
        // We have no life-cycles associated with portals.
        return;
      }
    case Profiler:
      {
        if (enableProfilerTimer) {
          var onRender = finishedWork.memoizedProps.onRender;

          if (typeof onRender === 'function') {
            if (enableSchedulerTracing) {
              onRender(finishedWork.memoizedProps.id, current$$1 === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, getCommitTime(), finishedRoot.memoizedInteractions);
            } else {
              onRender(finishedWork.memoizedProps.id, current$$1 === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, getCommitTime());
            }
          }
        }
        return;
      }
    case SuspenseComponent:
    case SuspenseListComponent:
    case IncompleteClassComponent:
    case FundamentalComponent:
      return;
    default:
      {
        (function () {
          {
            {
              throw ReactError(Error('This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.'));
            }
          }
        })();
      }
  }
}

function hideOrUnhideAllChildren(finishedWork, isHidden) {
  if (supportsMutation) {
    // We only have the top Fiber that was inserted but we need to recurse down its
    var node = finishedWork;
    while (true) {
      if (node.tag === HostComponent) {
        var instance = node.stateNode;
        if (isHidden) {
          hideInstance(instance);
        } else {
          unhideInstance(node.stateNode, node.memoizedProps);
        }
      } else if (node.tag === HostText) {
        var _instance3 = node.stateNode;
        if (isHidden) {
          hideTextInstance(_instance3);
        } else {
          unhideTextInstance(_instance3, node.memoizedProps);
        }
      } else if (node.tag === SuspenseComponent && node.memoizedState !== null) {
        // Found a nested Suspense component that timed out. Skip over the
        var fallbackChildFragment = node.child.sibling;
        fallbackChildFragment.return = node;
        node = fallbackChildFragment;
        continue;
      } else if (node.child !== null) {
        node.child.return = node;
        node = node.child;
        continue;
      }
      if (node === finishedWork) {
        return;
      }
      while (node.sibling === null) {
        if (node.return === null || node.return === finishedWork) {
          return;
        }
        node = node.return;
      }
      node.sibling.return = node.return;
      node = node.sibling;
    }
  }
}

function commitAttachRef(finishedWork) {
  var ref = finishedWork.ref;
  if (ref !== null) {
    var instance = finishedWork.stateNode;
    var instanceToUse = void 0;
    switch (finishedWork.tag) {
      case HostComponent:
        instanceToUse = getPublicInstance(instance);
        break;
      default:
        instanceToUse = instance;
    }
    if (typeof ref === 'function') {
      ref(instanceToUse);
    } else {
      {
        if (!ref.hasOwnProperty('current')) {
          warningWithoutStack$1(false, 'Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().%s', getComponentName(finishedWork.type), getStackByFiberInDevAndProd(finishedWork));
        }
      }

      ref.current = instanceToUse;
    }
  }
}

function commitDetachRef(current$$1) {
  var currentRef = current$$1.ref;
  if (currentRef !== null) {
    if (typeof currentRef === 'function') {
      currentRef(null);
    } else {
      currentRef.current = null;
    }
  }
}

// User-originating errors (lifecycles and refs) should not interrupt
// deletion, so don't let them throw. Host-originating errors should
// interrupt deletion, so it's okay
function commitUnmount(current$$1, renderPriorityLevel) {
  onCommitUnmount(current$$1);

  switch (current$$1.tag) {
    case FunctionComponent:
    case ForwardRef:
    case MemoComponent:
    case SimpleMemoComponent:
      {
        var updateQueue = current$$1.updateQueue;
        if (updateQueue !== null) {
          var lastEffect = updateQueue.lastEffect;
          if (lastEffect !== null) {
            var firstEffect = lastEffect.next;

            // When the owner fiber is deleted, the destroy function of a passive
            // effect hook is called during the synchronous commit phase. This is
            // a concession to implementation complexity. Calling it in the
            // passive effect phase (like they usually are, when dependencies
            // change during an update) would require either traversing the
            // children of the deleted fiber again, or including unmount effects
            // as part of the fiber effect list.
            //
            // Because this is during the sync commit phase, we need to change
            // the priority.
            //
            // TODO: Reconsider this implementation trade off.
            var priorityLevel = renderPriorityLevel > NormalPriority ? NormalPriority : renderPriorityLevel;
            runWithPriority$2(priorityLevel, function () {
              var effect = firstEffect;
              do {
                var destroy = effect.destroy;
                if (destroy !== undefined) {
                  safelyCallDestroy(current$$1, destroy);
                }
                effect = effect.next;
              } while (effect !== firstEffect);
            });
          }
        }
        break;
      }
    case ClassComponent:
      {
        safelyDetachRef(current$$1);
        var instance = current$$1.stateNode;
        if (typeof instance.componentWillUnmount === 'function') {
          safelyCallComponentWillUnmount(current$$1, instance);
        }
        return;
      }
    case HostComponent:
      {
        if (enableFlareAPI) {
          var dependencies = current$$1.dependencies;

          if (dependencies !== null) {
            var respondersMap = dependencies.responders;
            if (respondersMap !== null) {
              var responderInstances = Array.from(respondersMap.values());
              for (var i = 0, length = responderInstances.length; i < length; i++) {
                var responderInstance = responderInstances[i];
                unmountResponderInstance(responderInstance);
              }
              dependencies.responders = null;
            }
          }
        }
        safelyDetachRef(current$$1);
        return;
      }
    case HostPortal:
      {
        // TODO: this is recursive.
        // We are also not using this parent because
        // the portal will get pushed immediately.
        if (supportsMutation) {
          unmountHostComponents(current$$1, renderPriorityLevel);
        } else if (supportsPersistence) {
          emptyPortalContainer(current$$1);
        }
        return;
      }
    case FundamentalComponent:
      {
        if (enableFundamentalAPI) {
          var fundamentalInstance = current$$1.stateNode;
          if (fundamentalInstance !== null) {
            unmountFundamentalComponent(fundamentalInstance);
            current$$1.stateNode = null;
          }
        }
      }
  }
}

function commitNestedUnmounts(root, renderPriorityLevel) {
  // While we're inside a removed host node we don't want to call
  // removeChild on the inner nodes because they're removed by the top
  // call anyway. We also want to call componentWillUnmount on all
  // composites before this host node is removed from the tree. Therefore
  var node = root;
  while (true) {
    commitUnmount(node, renderPriorityLevel);
    // Visit children because they may contain more composite or host nodes.
    // Skip portals because commitUnmount() currently visits them recursively.
    if (node.child !== null && (
    // If we use mutation we drill down into portals using commitUnmount above.
    // If we don't use mutation we drill down into portals here instead.
    !supportsMutation || node.tag !== HostPortal)) {
      node.child.return = node;
      node = node.child;
      continue;
    }
    if (node === root) {
      return;
    }
    while (node.sibling === null) {
      if (node.return === null || node.return === root) {
        return;
      }
      node = node.return;
    }
    node.sibling.return = node.return;
    node = node.sibling;
  }
}

function detachFiber(current$$1) {
  // Cut off the return pointers to disconnect it from the tree. Ideally, we
  // should clear the child pointer of the parent alternate to let this
  // get GC:ed but we don't know which for sure which parent is the current
  // one so we'll settle for GC:ing the subtree of this child. This child
  // itself will be GC:ed when the parent updates the next time.
  current$$1.return = null;
  current$$1.child = null;
  current$$1.memoizedState = null;
  current$$1.updateQueue = null;
  current$$1.dependencies = null;
  var alternate = current$$1.alternate;
  if (alternate !== null) {
    alternate.return = null;
    alternate.child = null;
    alternate.memoizedState = null;
    alternate.updateQueue = null;
    alternate.dependencies = null;
  }
}

function emptyPortalContainer(current$$1) {
  if (!supportsPersistence) {
    return;
  }

  var portal = current$$1.stateNode;
  var containerInfo = portal.containerInfo;

  var emptyChildSet = createContainerChildSet(containerInfo);
  replaceContainerChildren(containerInfo, emptyChildSet);
}

function commitContainer(finishedWork) {
  if (!supportsPersistence) {
    return;
  }

  switch (finishedWork.tag) {
    case ClassComponent:
    case HostComponent:
    case HostText:
    case FundamentalComponent:
      {
        return;
      }
    case HostRoot:
    case HostPortal:
      {
        var portalOrRoot = finishedWork.stateNode;
        var containerInfo = portalOrRoot.containerInfo,
            _pendingChildren = portalOrRoot.pendingChildren;

        replaceContainerChildren(containerInfo, _pendingChildren);
        return;
      }
    default:
      {
        (function () {
          {
            {
              throw ReactError(Error('This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.'));
            }
          }
        })();
      }
  }
}

function getHostParentFiber(fiber) {
  var parent = fiber.return;
  while (parent !== null) {
    if (isHostParent(parent)) {
      return parent;
    }
    parent = parent.return;
  }
  (function () {
    {
      {
        throw ReactError(Error('Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.'));
      }
    }
  })();
}

function isHostParent(fiber) {
  return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;
}

function getHostSibling(fiber) {
  // We're going to search forward into the tree until we find a sibling host
  // node. Unfortunately, if multiple insertions are done in a row we have to
  // search past them. This leads to exponential search for the next sibling.
  var node = fiber;
  siblings: while (true) {
    // If we didn't find anything, let's try the next sibling.
    while (node.sibling === null) {
      if (node.return === null || isHostParent(node.return)) {
        // If we pop out of the root or hit the parent the fiber we are the
        // last sibling.
        return null;
      }
      node = node.return;
    }
    node.sibling.return = node.return;
    node = node.sibling;
    while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedSuspenseComponent) {
      // If it is not host node and, we might have a host node inside it.
      // Try to search down until we find one.
      if (node.effectTag & Placement) {
        // If we don't have a child, try the siblings instead.
        continue siblings;
      }
      // If we don't have a child, try the siblings instead.
      // We also skip portals because they are not part of this host tree.
      if (node.child === null || node.tag === HostPortal) {
        continue siblings;
      } else {
        node.child.return = node;
        node = node.child;
      }
    }
    // Check if this host node is stable or about to be placed.
    if (!(node.effectTag & Placement)) {
      // Found it!
      return node.stateNode;
    }
  }
}

function commitPlacement(finishedWork) {
  if (!supportsMutation) {
    return;
  }

  // Recursively insert all host nodes into the parent.
  var parentFiber = getHostParentFiber(finishedWork);

  // Note: these two variables *must* always be updated together.
  var parent = void 0;
  var isContainer = void 0;
  var parentStateNode = parentFiber.stateNode;
  switch (parentFiber.tag) {
    case HostComponent:
      parent = parentStateNode;
      isContainer = false;
      break;
    case HostRoot:
      parent = parentStateNode.containerInfo;
      isContainer = true;
      break;
    case HostPortal:
      parent = parentStateNode.containerInfo;
      isContainer = true;
      break;
    case FundamentalComponent:
      if (enableFundamentalAPI) {
        parent = parentStateNode.instance;
        isContainer = false;
      }
    // eslint-disable-next-line-no-fallthrough
    default:
      (function () {
        {
          {
            throw ReactError(Error('Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.'));
          }
        }
      })();
  }
  if (parentFiber.effectTag & ContentReset) {
    // Reset the text content of the parent before doing any insertions
    resetTextContent(parent);
    // Clear ContentReset from the effect tag
    parentFiber.effectTag &= ~ContentReset;
  }

  var before = getHostSibling(finishedWork);
  // We only have the top Fiber that was inserted but we need to recurse down its
  // children to find all the terminal nodes.
  var node = finishedWork;
  while (true) {
    var isHost = node.tag === HostComponent || node.tag === HostText;
    if (isHost || node.tag === FundamentalComponent) {
      var stateNode = isHost ? node.stateNode : node.stateNode.instance;
      if (before) {
        if (isContainer) {
          insertInContainerBefore(parent, stateNode, before);
        } else {
          insertBefore(parent, stateNode, before);
        }
      } else {
        if (isContainer) {
          appendChildToContainer(parent, stateNode);
        } else {
          appendChild(parent, stateNode);
        }
      }
    } else if (node.tag === HostPortal) {
      // If the insertion itself is a portal, then we don't want to traverse
      // down its children. Instead, we'll get insertions from each child in
      // the portal directly.
    } else if (node.child !== null) {
      node.child.return = node;
      node = node.child;
      continue;
    }
    if (node === finishedWork) {
      return;
    }
    while (node.sibling === null) {
      if (node.return === null || node.return === finishedWork) {
        return;
      }
      node = node.return;
    }
    node.sibling.return = node.return;
    node = node.sibling;
  }
}

function unmountHostComponents(current$$1, renderPriorityLevel) {
  // We only have the top Fiber that was deleted but we need to recurse down its
  var node = current$$1;

  // Each iteration, currentParent is populated with node's host parent if not
  // currentParentIsValid.
  var currentParentIsValid = false;

  // Note: these two variables *must* always be updated together.
  var currentParent = void 0;
  var currentParentIsContainer = void 0;

  while (true) {
    if (!currentParentIsValid) {
      var parent = node.return;
      findParent: while (true) {
        (function () {
          if (!(parent !== null)) {
            {
              throw ReactError(Error('Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.'));
            }
          }
        })();
        var parentStateNode = parent.stateNode;
        switch (parent.tag) {
          case HostComponent:
            currentParent = parentStateNode;
            currentParentIsContainer = false;
            break findParent;
          case HostRoot:
            currentParent = parentStateNode.containerInfo;
            currentParentIsContainer = true;
            break findParent;
          case HostPortal:
            currentParent = parentStateNode.containerInfo;
            currentParentIsContainer = true;
            break findParent;
          case FundamentalComponent:
            if (enableFundamentalAPI) {
              currentParent = parentStateNode.instance;
              currentParentIsContainer = false;
            }
        }
        parent = parent.return;
      }
      currentParentIsValid = true;
    }

    if (node.tag === HostComponent || node.tag === HostText) {
      commitNestedUnmounts(node, renderPriorityLevel);
      // After all the children have unmounted, it is now safe to remove the
      // node from the tree.
      if (currentParentIsContainer) {
        removeChildFromContainer(currentParent, node.stateNode);
      } else {
        removeChild(currentParent, node.stateNode);
      }
      // Don't visit children because we already visited them.
    } else if (node.tag === FundamentalComponent) {
      var fundamentalNode = node.stateNode.instance;
      commitNestedUnmounts(node, renderPriorityLevel);
      // After all the children have unmounted, it is now safe to remove the
      // node from the tree.
      if (currentParentIsContainer) {
        removeChildFromContainer(currentParent, fundamentalNode);
      } else {
        removeChild(currentParent, fundamentalNode);
      }
    } else if (enableSuspenseServerRenderer && node.tag === DehydratedSuspenseComponent) {
      // Delete the dehydrated suspense boundary and all of its content.
      if (currentParentIsContainer) {
        clearSuspenseBoundaryFromContainer(currentParent, node.stateNode);
      } else {
        clearSuspenseBoundary(currentParent, node.stateNode);
      }
    } else if (node.tag === HostPortal) {
      if (node.child !== null) {
        // When we go into a portal, it becomes the parent to remove from.
        // We will reassign it back when we pop the portal on the way up.
        currentParent = node.stateNode.containerInfo;
        currentParentIsContainer = true;
        // Visit children because portals might contain host components.
        node.child.return = node;
        node = node.child;
        continue;
      }
    } else {
      commitUnmount(node, renderPriorityLevel);
      // Visit children because we may find more host components below.
      if (node.child !== null) {
        node.child.return = node;
        node = node.child;
        continue;
      }
    }
    if (node === current$$1) {
      return;
    }
    while (node.sibling === null) {
      if (node.return === null || node.return === current$$1) {
        return;
      }
      node = node.return;
      if (node.tag === HostPortal) {
        // When we go out of the portal, we need to restore the parent.
        // Since we don't keep a stack of them, we will search for it.
        currentParentIsValid = false;
      }
    }
    node.sibling.return = node.return;
    node = node.sibling;
  }
}

function commitDeletion(current$$1, renderPriorityLevel) {
  if (supportsMutation) {
    // Recursively delete all host nodes from the parent.
    // Detach refs and call componentWillUnmount() on the whole subtree.
    unmountHostComponents(current$$1, renderPriorityLevel);
  } else {
    // Detach refs and call componentWillUnmount() on the whole subtree.
    commitNestedUnmounts(current$$1, renderPriorityLevel);
  }
  detachFiber(current$$1);
}

function commitWork(current$$1, finishedWork) {
  if (!supportsMutation) {
    switch (finishedWork.tag) {
      case FunctionComponent:
      case ForwardRef:
      case MemoComponent:
      case SimpleMemoComponent:
        {
          // Note: We currently never use MountMutation, but useLayout uses
          // UnmountMutation.
          commitHookEffectList(UnmountMutation, MountMutation, finishedWork);
          return;
        }
      case Profiler:
        {
          return;
        }
      case SuspenseComponent:
        {
          commitSuspenseComponent(finishedWork);
          attachSuspenseRetryListeners(finishedWork);
          return;
        }
      case SuspenseListComponent:
        {
          attachSuspenseRetryListeners(finishedWork);
          return;
        }
    }

    commitContainer(finishedWork);
    return;
  }

  switch (finishedWork.tag) {
    case FunctionComponent:
    case ForwardRef:
    case MemoComponent:
    case SimpleMemoComponent:
      {
        // Note: We currently never use MountMutation, but useLayout uses
        // UnmountMutation.
        commitHookEffectList(UnmountMutation, MountMutation, finishedWork);
        return;
      }
    case ClassComponent:
      {
        return;
      }
    case HostComponent:
      {
        var instance = finishedWork.stateNode;
        if (instance != null) {
          // Commit the work prepared earlier.
          var newProps = finishedWork.memoizedProps;
          // For hydration we reuse the update path but we treat the oldProps
          // as the newProps. The updatePayload will contain the real change in
          // this case.
          var oldProps = current$$1 !== null ? current$$1.memoizedProps : newProps;
          var type = finishedWork.type;
          // TODO: Type the updateQueue to be specific to host components.
          var updatePayload = finishedWork.updateQueue;
          finishedWork.updateQueue = null;
          if (updatePayload !== null) {
            commitUpdate(instance, updatePayload, type, oldProps, newProps, finishedWork);
          }
        }
        return;
      }
    case HostText:
      {
        (function () {
          if (!(finishedWork.stateNode !== null)) {
            {
              throw ReactError(Error('This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.'));
            }
          }
        })();
        var textInstance = finishedWork.stateNode;
        var newText = finishedWork.memoizedProps;
        // For hydration we reuse the update path but we treat the oldProps
        // as the newProps. The updatePayload will contain the real change in
        // this case.
        var oldText = current$$1 !== null ? current$$1.memoizedProps : newText;
        commitTextUpdate(textInstance, oldText, newText);
        return;
      }
    case HostRoot:
      {
        return;
      }
    case Profiler:
      {
        return;
      }
    case SuspenseComponent:
      {
        commitSuspenseComponent(finishedWork);
        attachSuspenseRetryListeners(finishedWork);
        return;
      }
    case SuspenseListComponent:
      {
        attachSuspenseRetryListeners(finishedWork);
        return;
      }
    case IncompleteClassComponent:
      {
        return;
      }
    case FundamentalComponent:
      {
        if (enableFundamentalAPI) {
          var fundamentalInstance = finishedWork.stateNode;
          updateFundamentalComponent(fundamentalInstance);
        }
        return;
      }
    default:
      {
        (function () {
          {
            {
              throw ReactError(Error('This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.'));
            }
          }
        })();
      }
  }
}

function commitSuspenseComponent(finishedWork) {
  var newState = finishedWork.memoizedState;

  var newDidTimeout = void 0;
  var primaryChildParent = finishedWork;
  if (newState === null) {
    newDidTimeout = false;
  } else {
    newDidTimeout = true;
    primaryChildParent = finishedWork.child;
    markCommitTimeOfFallback();
  }

  if (supportsMutation && primaryChildParent !== null) {
    hideOrUnhideAllChildren(primaryChildParent, newDidTimeout);
  }

  if (enableSuspenseCallback && newState !== null) {
    var suspenseCallback = finishedWork.memoizedProps.suspenseCallback;
    if (typeof suspenseCallback === 'function') {
      var thenables = finishedWork.updateQueue;
      if (thenables !== null) {
        suspenseCallback(new Set(thenables));
      }
    } else {
      if (suspenseCallback !== undefined) {
        warning$1(false, 'Unexpected type for suspenseCallback.');
      }
    }
  }
}

function attachSuspenseRetryListeners(finishedWork) {
  // If this boundary just timed out, then it will have a set of thenables.
  // For each thenable, attach a listener so that when it resolves, React
  var thenables = finishedWork.updateQueue;
  if (thenables !== null) {
    finishedWork.updateQueue = null;
    var retryCache = finishedWork.stateNode;
    if (retryCache === null) {
      retryCache = finishedWork.stateNode = new PossiblyWeakSet$1();
    }
    thenables.forEach(function (thenable) {
      // Memoize using the boundary fiber to prevent redundant listeners.
      var retry = resolveRetryThenable.bind(null, finishedWork, thenable);
      if (!retryCache.has(thenable)) {
        if (enableSchedulerTracing) {
          retry = tracing.unstable_wrap(retry);
        }
        retryCache.add(thenable);
        thenable.then(retry, retry);
      }
    });
  }
}

function commitResetTextContent(current$$1) {
  if (!supportsMutation) {
    return;
  }
  resetTextContent(current$$1.stateNode);
}

var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;
var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;

function createRootErrorUpdate(fiber, errorInfo, expirationTime) {
  var update = createUpdate(expirationTime, null);
  // Unmount the root by rendering null.
  update.tag = CaptureUpdate;
  // Caution: React DevTools currently depends on this property
  // being called "element".
  update.payload = { element: null };
  var error = errorInfo.value;
  update.callback = function () {
    onUncaughtError(error);
    logError(fiber, errorInfo);
  };
  return update;
}

function createClassErrorUpdate(fiber, errorInfo, expirationTime) {
  var update = createUpdate(expirationTime, null);
  update.tag = CaptureUpdate;
  var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
  if (typeof getDerivedStateFromError === 'function') {
    var error = errorInfo.value;
    update.payload = function () {
      logError(fiber, errorInfo);
      return getDerivedStateFromError(error);
    };
  }

  var inst = fiber.stateNode;
  if (inst !== null && typeof inst.componentDidCatch === 'function') {
    update.callback = function callback() {
      {
        markFailedErrorBoundaryForHotReloading(fiber);
      }
      if (typeof getDerivedStateFromError !== 'function') {
        // To preserve the preexisting retry behavior of error boundaries,
        // we keep track of which ones already failed during this batch.
        // This gets reset before we yield back to the browser.
        // TODO: Warn in strict mode if getDerivedStateFromError is
        // not defined.
        markLegacyErrorBoundaryAsFailed(this);

        // Only log here if componentDidCatch is the only error boundary method defined
        logError(fiber, errorInfo);
      }
      var error = errorInfo.value;
      var stack = errorInfo.stack;
      this.componentDidCatch(error, {
        componentStack: stack !== null ? stack : ''
      });
      {
        if (typeof getDerivedStateFromError !== 'function') {
          // If componentDidCatch is the only error boundary method defined,
          // then it needs to call setState to recover from errors.
          // If no state update is scheduled then the boundary will swallow the error.
          !(fiber.expirationTime === Sync) ? warningWithoutStack$1(false, '%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentName(fiber.type) || 'Unknown') : void 0;
        }
      }
    };
  } else {
    update.callback = function () {
      markFailedErrorBoundaryForHotReloading(fiber);
    };
  }
  return update;
}

function attachPingListener(root, renderExpirationTime, thenable) {
  // Attach a listener to the promise to "ping" the root and retry. But
  // only if one does not already exist for the current render expiration
  // time (which acts like a "thread ID" here).
  var pingCache = root.pingCache;
  var threadIDs = void 0;
  if (pingCache === null) {
    pingCache = root.pingCache = new PossiblyWeakMap$1();
    threadIDs = new Set();
    pingCache.set(thenable, threadIDs);
  } else {
    threadIDs = pingCache.get(thenable);
    if (threadIDs === undefined) {
      threadIDs = new Set();
      pingCache.set(thenable, threadIDs);
    }
  }
  if (!threadIDs.has(renderExpirationTime)) {
    // Memoize using the thread ID to prevent redundant listeners.
    threadIDs.add(renderExpirationTime);
    var ping = pingSuspendedRoot.bind(null, root, thenable, renderExpirationTime);
    if (enableSchedulerTracing) {
      ping = tracing.unstable_wrap(ping);
    }
    thenable.then(ping, ping);
  }
}

function throwException(root, returnFiber, sourceFiber, value, renderExpirationTime) {
  // The source fiber did not complete.
  sourceFiber.effectTag |= Incomplete;
  // Its effect list is no longer valid.
  sourceFiber.firstEffect = sourceFiber.lastEffect = null;

  if (value !== null && typeof value === 'object' && typeof value.then === 'function') {
    // This is a thenable.
    var thenable = value;

    checkForWrongSuspensePriorityInDEV(sourceFiber);

    var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext);

    // Schedule the nearest Suspense to re-render the timed out view.
    var _workInProgress = returnFiber;
    do {
      if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) {
        // Found the nearest boundary.

        // Stash the promise on the boundary fiber. If the boundary times out, we'll
        var thenables = _workInProgress.updateQueue;
        if (thenables === null) {
          var updateQueue = new Set();
          updateQueue.add(thenable);
          _workInProgress.updateQueue = updateQueue;
        } else {
          thenables.add(thenable);
        }

        // If the boundary is outside of batched mode, we should *not*
        // suspend the commit. Pretend as if the suspended component rendered
        // null and keep rendering. In the commit phase, we'll schedule a
        // subsequent synchronous update to re-render the Suspense.
        //
        // Note: It doesn't matter whether the component that suspended was
        // inside a batched mode tree. If the Suspense is outside of it, we
        // should *not* suspend the commit.
        if ((_workInProgress.mode & BatchedMode) === NoMode) {
          _workInProgress.effectTag |= DidCapture;

          // We're going to commit this fiber even though it didn't complete.
          // But we shouldn't call any lifecycle methods or callbacks. Remove
          // all lifecycle effect tags.
          sourceFiber.effectTag &= ~(LifecycleEffectMask | Incomplete);

          if (sourceFiber.tag === ClassComponent) {
            var currentSourceFiber = sourceFiber.alternate;
            if (currentSourceFiber === null) {
              // This is a new mount. Change the tag so it's not mistaken for a
              // completed class component. For example, we should not call
              // componentWillUnmount if it is deleted.
              sourceFiber.tag = IncompleteClassComponent;
            } else {
              // When we try rendering again, we should not reuse the current fiber,
              // since it's known to be in an inconsistent state. Use a force update to
              // prevent a bail out.
              var update = createUpdate(Sync, null);
              update.tag = ForceUpdate;
              enqueueUpdate(sourceFiber, update);
            }
          }

          // The source fiber did not complete. Mark it with Sync priority to
          // indicate that it still has pending work.
          sourceFiber.expirationTime = Sync;

          // Exit without suspending.
          return;
        }

        // Confirmed that the boundary is in a concurrent mode tree. Continue
        // with the normal suspend path.
        //
        // After this we'll use a set of heuristics to determine whether this
        // render pass will run to completion or restart or "suspend" the commit.
        // The actual logic for this is spread out in different places.
        //
        // This first principle is that if we're going to suspend when we complete
        // a root, then we should also restart if we get an update or ping that
        // might unsuspend it, and vice versa. The only reason to suspend is
        // because you think you might want to restart before committing. However,
        // it doesn't make sense to restart only while in the period we're suspended.
        //
        // Restarting too aggressively is also not good because it starves out any
        // intermediate loading state. So we use heuristics to determine when.

        // Suspense Heuristics
        //
        // If nothing threw a Promise or all the same fallbacks are already showing,
        // then don't suspend/restart.
        //
        // If this is an initial render of a new tree of Suspense boundaries and
        // those trigger a fallback, then don't suspend/restart. We want to ensure
        // that we can show the initial loading state as quickly as possible.
        //
        // If we hit a "Delayed" case, such as when we'd switch from content back into
        // a fallback, then we should always suspend/restart. SuspenseConfig applies to
        // this case. If none is defined, JND is used instead.
        //
        // If we're already showing a fallback and it gets "retried", allowing us to show
        // another level, but there's still an inner boundary that would show a fallback,
        // then we suspend/restart for 500ms since the last time we showed a fallback
        // anywhere in the tree. This effectively throttles progressive loading into a
        // consistent train of commits. This also gives us an opportunity to restart to
        // get to the completed state slightly earlier.
        //
        // If there's ambiguity due to batching it's resolved in preference of:
        // 1) "delayed", 2) "initial render", 3) "retry".
        //
        // We want to ensure that a "busy" state doesn't get force committed. We want to
        // ensure that new initial loading states can commit as soon as possible.

        attachPingListener(root, renderExpirationTime, thenable);

        _workInProgress.effectTag |= ShouldCapture;
        _workInProgress.expirationTime = renderExpirationTime;

        return;
      } else if (enableSuspenseServerRenderer && _workInProgress.tag === DehydratedSuspenseComponent) {
        attachPingListener(root, renderExpirationTime, thenable);

        // Since we already have a current fiber, we can eagerly add a retry listener.
        var retryCache = _workInProgress.memoizedState;
        if (retryCache === null) {
          retryCache = _workInProgress.memoizedState = new PossiblyWeakSet();
          var current$$1 = _workInProgress.alternate;
          (function () {
            if (!current$$1) {
              {
                throw ReactError(Error('A dehydrated suspense boundary must commit before trying to render. This is probably a bug in React.'));
              }
            }
          })();
          current$$1.memoizedState = retryCache;
        }
        // Memoize using the boundary fiber to prevent redundant listeners.
        if (!retryCache.has(thenable)) {
          retryCache.add(thenable);
          var retry = resolveRetryThenable.bind(null, _workInProgress, thenable);
          if (enableSchedulerTracing) {
            retry = tracing.unstable_wrap(retry);
          }
          thenable.then(retry, retry);
        }
        _workInProgress.effectTag |= ShouldCapture;
        _workInProgress.expirationTime = renderExpirationTime;
        return;
      }
      // This boundary already captured during this render. Continue to the next
      // boundary.
      _workInProgress = _workInProgress.return;
    } while (_workInProgress !== null);
    // No boundary was found. Fallthrough to error mode.
    // TODO: Use invariant so the message is stripped in prod?
    value = new Error((getComponentName(sourceFiber.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\n' + '\n' + 'Add a <Suspense fallback=...> component higher in the tree to ' + 'provide a loading indicator or placeholder to display.' + getStackByFiberInDevAndProd(sourceFiber));
  }

  // We didn't find a boundary that could handle this type of exception. Start
  // over and traverse parent path again, this time treating the exception
  // as an error.
  renderDidError();
  value = createCapturedValue(value, sourceFiber);
  var workInProgress = returnFiber;
  do {
    switch (workInProgress.tag) {
      case HostRoot:
        {
          var _errorInfo = value;
          workInProgress.effectTag |= ShouldCapture;
          workInProgress.expirationTime = renderExpirationTime;
          var _update = createRootErrorUpdate(workInProgress, _errorInfo, renderExpirationTime);
          enqueueCapturedUpdate(workInProgress, _update);
          return;
        }
      case ClassComponent:
        // Capture and retry
        var errorInfo = value;
        var ctor = workInProgress.type;
        var instance = workInProgress.stateNode;
        if ((workInProgress.effectTag & DidCapture) === NoEffect && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {
          workInProgress.effectTag |= ShouldCapture;
          workInProgress.expirationTime = renderExpirationTime;
          // Schedule the error boundary to re-render using updated state
          var _update2 = createClassErrorUpdate(workInProgress, errorInfo, renderExpirationTime);
          enqueueCapturedUpdate(workInProgress, _update2);
          return;
        }
        break;
      default:
        break;
    }
    workInProgress = workInProgress.return;
  } while (workInProgress !== null);
}

// The scheduler is imported here *only* to detect whether it's been mocked
// DEV stuff
var ceil = Math.ceil;

var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
var ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner;
var IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing;


var NoContext = /*                    */0;
var BatchedContext = /*               */1;
var EventContext = /*                 */2;
var DiscreteEventContext = /*         */4;
var LegacyUnbatchedContext = /*       */8;
var RenderContext = /*                */16;
var CommitContext = /*                */32;

var RootIncomplete = 0;
var RootErrored = 1;
var RootSuspended = 2;
var RootSuspendedWithDelay = 3;
var RootCompleted = 4;

// Describes where we are in the React execution stack
var executionContext = NoContext;
// The root we're working on
var workInProgressRoot = null;
// The fiber we're working on
var workInProgress = null;
// The expiration time we're rendering
var renderExpirationTime = NoWork;
// Whether to root completed, errored, suspended, etc.
var workInProgressRootExitStatus = RootIncomplete;
// Most recent event time among processed updates during this render.
// This is conceptually a time stamp but expressed in terms of an ExpirationTime
// because we deal mostly with expiration times in the hot path, so this avoids
// the conversion happening in the hot path.
var workInProgressRootLatestProcessedExpirationTime = Sync;
var workInProgressRootLatestSuspenseTimeout = Sync;
var workInProgressRootCanSuspendUsingConfig = null;
// If we're pinged while rendering we don't always restart immediately.
// This flag determines if it might be worthwhile to restart if an opportunity
// happens latere.
var workInProgressRootHasPendingPing = false;
// The most recent time we committed a fallback. This lets us ensure a train
// model where we don't commit new loading states in too quick succession.
var globalMostRecentFallbackTime = 0;
var FALLBACK_THROTTLE_MS = 500;

var nextEffect = null;
var hasUncaughtError = false;
var firstUncaughtError = null;
var legacyErrorBoundariesThatAlreadyFailed = null;

var rootDoesHavePassiveEffects = false;
var rootWithPendingPassiveEffects = null;
var pendingPassiveEffectsRenderPriority = NoPriority;
var pendingPassiveEffectsExpirationTime = NoWork;

var rootsWithPendingDiscreteUpdates = null;

// Use these to prevent an infinite loop of nested updates
var NESTED_UPDATE_LIMIT = 50;
var nestedUpdateCount = 0;
var rootWithNestedUpdates = null;

var NESTED_PASSIVE_UPDATE_LIMIT = 50;
var nestedPassiveUpdateCount = 0;

var interruptedBy = null;

// Marks the need to reschedule pending interactions at these expiration times
// during the commit phase. This enables them to be traced across components
// that spawn new work during render. E.g. hidden boundaries, suspended SSR
// hydration or SuspenseList.
var spawnedWorkDuringRender = null;

// Expiration times are computed by adding to the current time (the start
// time). However, if two updates are scheduled within the same event, we
// should treat their start times as simultaneous, even if the actual clock
// time has advanced between the first and second call.

// In other words, because expiration times determine how updates are batched,
// we want all updates of like priority that occur within the same event to
// receive the same expiration time. Otherwise we get tearing.
var currentEventTime = NoWork;

function requestCurrentTime() {
  if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
    // We're inside React, so it's fine to read the actual time.
    return msToExpirationTime(now());
  }
  // We're not inside React, so we may be in the middle of a browser event.
  if (currentEventTime !== NoWork) {
    // Use the same start time for all updates until we enter React again.
    return currentEventTime;
  }
  // This is the first update since React yielded. Compute a new start time.
  currentEventTime = msToExpirationTime(now());
  return currentEventTime;
}

function computeExpirationForFiber(currentTime, fiber, suspenseConfig) {
  var mode = fiber.mode;
  if ((mode & BatchedMode) === NoMode) {
    return Sync;
  }

  var priorityLevel = getCurrentPriorityLevel();
  if ((mode & ConcurrentMode) === NoMode) {
    return priorityLevel === ImmediatePriority ? Sync : Batched;
  }

  if ((executionContext & RenderContext) !== NoContext) {
    // Use whatever time we're already rendering
    return renderExpirationTime;
  }

  var expirationTime = void 0;
  if (suspenseConfig !== null) {
    // Compute an expiration time based on the Suspense timeout.
    expirationTime = computeSuspenseExpiration(currentTime, suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION);
  } else {
    // Compute an expiration time based on the Scheduler priority.
    switch (priorityLevel) {
      case ImmediatePriority:
        expirationTime = Sync;
        break;
      case UserBlockingPriority$2:
        // TODO: Rename this to computeUserBlockingExpiration
        expirationTime = computeInteractiveExpiration(currentTime);
        break;
      case NormalPriority:
      case LowPriority:
        // TODO: Handle LowPriority
        // TODO: Rename this to... something better.
        expirationTime = computeAsyncExpiration(currentTime);
        break;
      case IdlePriority:
        expirationTime = Never;
        break;
      default:
        (function () {
          {
            {
              throw ReactError(Error('Expected a valid priority level'));
            }
          }
        })();
    }
  }

  // If we're in the middle of rendering a tree, do not update at the same
  // expiration time that is already rendering.
  // TODO: We shouldn't have to do this if the update is on a different root.
  // Refactor computeExpirationForFiber + scheduleUpdate so we have access to
  // the root when we check for this condition.
  if (workInProgressRoot !== null && expirationTime === renderExpirationTime) {
    // This is a trick to move this update into a separate batch
    expirationTime -= 1;
  }

  return expirationTime;
}

var lastUniqueAsyncExpiration = NoWork;
function computeUniqueAsyncExpiration() {
  var currentTime = requestCurrentTime();
  var result = computeAsyncExpiration(currentTime);
  if (result <= lastUniqueAsyncExpiration) {
    // Since we assume the current time monotonically increases, we only hit
    // this branch when computeUniqueAsyncExpiration is fired multiple times
    // within a 200ms window (or whatever the async bucket size is).
    result -= 1;
  }
  lastUniqueAsyncExpiration = result;
  return result;
}

function scheduleUpdateOnFiber(fiber, expirationTime) {
  checkForNestedUpdates();
  warnAboutInvalidUpdatesOnClassComponentsInDEV(fiber);

  var root = markUpdateTimeFromFiberToRoot(fiber, expirationTime);
  if (root === null) {
    warnAboutUpdateOnUnmountedFiberInDEV(fiber);
    return;
  }

  root.pingTime = NoWork;

  checkForInterruption(fiber, expirationTime);
  recordScheduleUpdate();

  // TODO: computeExpirationForFiber also reads the priority. Pass the
  // priority as an argument to that function and this one.
  var priorityLevel = getCurrentPriorityLevel();

  if (expirationTime === Sync) {
    if (
    // Check if we're inside unbatchedUpdates
    (executionContext & LegacyUnbatchedContext) !== NoContext &&
    // Check if we're not already rendering
    (executionContext & (RenderContext | CommitContext)) === NoContext) {
      // Register pending interactions on the root to avoid losing traced interaction data.
      schedulePendingInteractions(root, expirationTime);

      // This is a legacy edge case. The initial mount of a ReactDOM.render-ed
      // root inside of batchedUpdates should be synchronous, but layout updates
      // should be deferred until the end of the batch.
      var callback = renderRoot(root, Sync, true);
      while (callback !== null) {
        callback = callback(true);
      }
    } else {
      scheduleCallbackForRoot(root, ImmediatePriority, Sync);
      if (executionContext === NoContext) {
        // Flush the synchronous work now, wnless we're already working or inside
        // a batch. This is intentionally inside scheduleUpdateOnFiber instead of
        // scheduleCallbackForFiber to preserve the ability to schedule a callback
        // without immediately flushing it. We only do this for user-initiated
        // updates, to preserve historical behavior of sync mode.
        flushSyncCallbackQueue();
      }
    }
  } else {
    scheduleCallbackForRoot(root, priorityLevel, expirationTime);
  }

  if ((executionContext & DiscreteEventContext) !== NoContext && (
  // Only updates at user-blocking priority or greater are considered
  // discrete, even inside a discrete event.
  priorityLevel === UserBlockingPriority$2 || priorityLevel === ImmediatePriority)) {
    // This is the result of a discrete event. Track the lowest priority
    // discrete update per root so we can flush them early, if needed.
    if (rootsWithPendingDiscreteUpdates === null) {
      rootsWithPendingDiscreteUpdates = new Map([[root, expirationTime]]);
    } else {
      var lastDiscreteTime = rootsWithPendingDiscreteUpdates.get(root);
      if (lastDiscreteTime === undefined || lastDiscreteTime > expirationTime) {
        rootsWithPendingDiscreteUpdates.set(root, expirationTime);
      }
    }
  }
}
var scheduleWork = scheduleUpdateOnFiber;

// This is split into a separate function so we can mark a fiber with pending
// work without treating it as a typical update that originates from an event;
// e.g. retrying a Suspense boundary isn't an update, but it does schedule work
// on a fiber.
function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {
  // Update the source fiber's expiration time
  if (fiber.expirationTime < expirationTime) {
    fiber.expirationTime = expirationTime;
  }
  var alternate = fiber.alternate;
  if (alternate !== null && alternate.expirationTime < expirationTime) {
    alternate.expirationTime = expirationTime;
  }
  // Walk the parent path to the root and update the child expiration time.
  var node = fiber.return;
  var root = null;
  if (node === null && fiber.tag === HostRoot) {
    root = fiber.stateNode;
  } else {
    while (node !== null) {
      alternate = node.alternate;
      if (node.childExpirationTime < expirationTime) {
        node.childExpirationTime = expirationTime;
        if (alternate !== null && alternate.childExpirationTime < expirationTime) {
          alternate.childExpirationTime = expirationTime;
        }
      } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {
        alternate.childExpirationTime = expirationTime;
      }
      if (node.return === null && node.tag === HostRoot) {
        root = node.stateNode;
        break;
      }
      node = node.return;
    }
  }

  if (root !== null) {
    // Update the first and last pending expiration times in this root
    var firstPendingTime = root.firstPendingTime;
    if (expirationTime > firstPendingTime) {
      root.firstPendingTime = expirationTime;
    }
    var lastPendingTime = root.lastPendingTime;
    if (lastPendingTime === NoWork || expirationTime < lastPendingTime) {
      root.lastPendingTime = expirationTime;
    }
  }

  return root;
}

// Use this function, along with runRootCallback, to ensure that only a single
// callback per root is scheduled. It's still possible to call renderRoot
// directly, but scheduling via this function helps avoid excessive callbacks.
// It works by storing the callback node and expiration time on the root. When a
// new callback comes in, it compares the expiration time to determine if it
// should cancel the previous one. It also relies on commitRoot scheduling a
// callback to render the next level, because that means we don't need a
// separate callback per expiration time.
function scheduleCallbackForRoot(root, priorityLevel, expirationTime) {
  var existingCallbackExpirationTime = root.callbackExpirationTime;
  if (existingCallbackExpirationTime < expirationTime) {
    // New callback has higher priority than the existing one.
    var existingCallbackNode = root.callbackNode;
    if (existingCallbackNode !== null) {
      cancelCallback(existingCallbackNode);
    }
    root.callbackExpirationTime = expirationTime;

    if (expirationTime === Sync) {
      // Sync React callbacks are scheduled on a special internal queue
      root.callbackNode = scheduleSyncCallback(runRootCallback.bind(null, root, renderRoot.bind(null, root, expirationTime)));
    } else {
      var options = null;
      if (!disableSchedulerTimeoutBasedOnReactExpirationTime && expirationTime !== Never) {
        var timeout = expirationTimeToMs(expirationTime) - now();
        options = { timeout: timeout };
      }

      root.callbackNode = scheduleCallback(priorityLevel, runRootCallback.bind(null, root, renderRoot.bind(null, root, expirationTime)), options);
      if (enableUserTimingAPI && expirationTime !== Sync && (executionContext & (RenderContext | CommitContext)) === NoContext) {
        // Scheduled an async callback, and we're not already working. Add an
        // entry to the flamegraph that shows we're waiting for a callback
        // to fire.
        startRequestCallbackTimer();
      }
    }
  }

  // Associate the current interactions with this new root+priority.
  schedulePendingInteractions(root, expirationTime);
}

function runRootCallback(root, callback, isSync) {
  var prevCallbackNode = root.callbackNode;
  var continuation = null;
  try {
    continuation = callback(isSync);
    if (continuation !== null) {
      return runRootCallback.bind(null, root, continuation);
    } else {
      return null;
    }
  } finally {
    // If the callback exits without returning a continuation, remove the
    // corresponding callback node from the root. Unless the callback node
    // has changed, which implies that it was already cancelled by a high
    // priority update.
    if (continuation === null && prevCallbackNode === root.callbackNode) {
      root.callbackNode = null;
      root.callbackExpirationTime = NoWork;
    }
  }
}

function flushRoot(root, expirationTime) {
  if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
    (function () {
      {
        {
          throw ReactError(Error('work.commit(): Cannot commit while already rendering. This likely means you attempted to commit from inside a lifecycle method.'));
        }
      }
    })();
  }
  scheduleSyncCallback(renderRoot.bind(null, root, expirationTime));
  flushSyncCallbackQueue();
}

function flushDiscreteUpdates() {
  // TODO: Should be able to flush inside batchedUpdates, but not inside `act`.
  // However, `act` uses `batchedUpdates`, so there's no way to distinguish
  // those two cases. Need to fix this before exposing flushDiscreteUpdates
  // as a public API.
  if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) {
    if ( true && (executionContext & RenderContext) !== NoContext) {
      warning$1(false, 'unstable_flushDiscreteUpdates: Cannot flush updates when React is ' + 'already rendering.');
    }
    // We're already rendering, so we can't synchronously flush pending work.
    // This is probably a nested event dispatch triggered by a lifecycle/effect,
    // like `el.focus()`. Exit.
    return;
  }
  flushPendingDiscreteUpdates();
  if (!revertPassiveEffectsChange) {
    // If the discrete updates scheduled passive effects, flush them now so that
    // they fire before the next serial event.
    flushPassiveEffects();
  }
}

function resolveLocksOnRoot(root, expirationTime) {
  var firstBatch = root.firstBatch;
  if (firstBatch !== null && firstBatch._defer && firstBatch._expirationTime >= expirationTime) {
    scheduleCallback(NormalPriority, function () {
      firstBatch._onComplete();
      return null;
    });
    return true;
  } else {
    return false;
  }
}





function flushPendingDiscreteUpdates() {
  if (rootsWithPendingDiscreteUpdates !== null) {
    // For each root with pending discrete updates, schedule a callback to
    // immediately flush them.
    var roots = rootsWithPendingDiscreteUpdates;
    rootsWithPendingDiscreteUpdates = null;
    roots.forEach(function (expirationTime, root) {
      scheduleSyncCallback(renderRoot.bind(null, root, expirationTime));
    });
    // Now flush the immediate queue.
    flushSyncCallbackQueue();
  }
}

function batchedUpdates$1(fn, a) {
  var prevExecutionContext = executionContext;
  executionContext |= BatchedContext;
  try {
    return fn(a);
  } finally {
    executionContext = prevExecutionContext;
    if (executionContext === NoContext) {
      // Flush the immediate callbacks that were scheduled during this batch
      flushSyncCallbackQueue();
    }
  }
}

function batchedEventUpdates$1(fn, a) {
  var prevExecutionContext = executionContext;
  executionContext |= EventContext;
  try {
    return fn(a);
  } finally {
    executionContext = prevExecutionContext;
    if (executionContext === NoContext) {
      // Flush the immediate callbacks that were scheduled during this batch
      flushSyncCallbackQueue();
    }
  }
}

function discreteUpdates$1(fn, a, b, c) {
  var prevExecutionContext = executionContext;
  executionContext |= DiscreteEventContext;
  try {
    // Should this
    return runWithPriority$2(UserBlockingPriority$2, fn.bind(null, a, b, c));
  } finally {
    executionContext = prevExecutionContext;
    if (executionContext === NoContext) {
      // Flush the immediate callbacks that were scheduled during this batch
      flushSyncCallbackQueue();
    }
  }
}

function unbatchedUpdates(fn, a) {
  var prevExecutionContext = executionContext;
  executionContext &= ~BatchedContext;
  executionContext |= LegacyUnbatchedContext;
  try {
    return fn(a);
  } finally {
    executionContext = prevExecutionContext;
    if (executionContext === NoContext) {
      // Flush the immediate callbacks that were scheduled during this batch
      flushSyncCallbackQueue();
    }
  }
}

function flushSync(fn, a) {
  if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
    (function () {
      {
        {
          throw ReactError(Error('flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.'));
        }
      }
    })();
  }
  var prevExecutionContext = executionContext;
  executionContext |= BatchedContext;
  try {
    return runWithPriority$2(ImmediatePriority, fn.bind(null, a));
  } finally {
    executionContext = prevExecutionContext;
    // Flush the immediate callbacks that were scheduled during this batch.
    // Note that this will happen even if batchedUpdates is higher up
    // the stack.
    flushSyncCallbackQueue();
  }
}

function flushControlled(fn) {
  var prevExecutionContext = executionContext;
  executionContext |= BatchedContext;
  try {
    runWithPriority$2(ImmediatePriority, fn);
  } finally {
    executionContext = prevExecutionContext;
    if (executionContext === NoContext) {
      // Flush the immediate callbacks that were scheduled during this batch
      flushSyncCallbackQueue();
    }
  }
}

function prepareFreshStack(root, expirationTime) {
  root.finishedWork = null;
  root.finishedExpirationTime = NoWork;

  var timeoutHandle = root.timeoutHandle;
  if (timeoutHandle !== noTimeout) {
    // The root previous suspended and scheduled a timeout to commit a fallback
    // state. Now that we have additional work, cancel the timeout.
    root.timeoutHandle = noTimeout;
    // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
    cancelTimeout(timeoutHandle);
  }

  if (workInProgress !== null) {
    var interruptedWork = workInProgress.return;
    while (interruptedWork !== null) {
      unwindInterruptedWork(interruptedWork);
      interruptedWork = interruptedWork.return;
    }
  }
  workInProgressRoot = root;
  workInProgress = createWorkInProgress(root.current, null, expirationTime);
  renderExpirationTime = expirationTime;
  workInProgressRootExitStatus = RootIncomplete;
  workInProgressRootLatestProcessedExpirationTime = Sync;
  workInProgressRootLatestSuspenseTimeout = Sync;
  workInProgressRootCanSuspendUsingConfig = null;
  workInProgressRootHasPendingPing = false;

  if (enableSchedulerTracing) {
    spawnedWorkDuringRender = null;
  }

  {
    ReactStrictModeWarnings.discardPendingWarnings();
    componentsThatTriggeredHighPriSuspend = null;
  }
}

function renderRoot(root, expirationTime, isSync) {
  (function () {
    if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
      {
        throw ReactError(Error('Should not already be working.'));
      }
    }
  })();

  if (enableUserTimingAPI && expirationTime !== Sync) {
    var didExpire = isSync;
    stopRequestCallbackTimer(didExpire);
  }

  if (root.firstPendingTime < expirationTime) {
    // If there's no work left at this expiration time, exit immediately. This
    // happens when multiple callbacks are scheduled for a single root, but an
    // earlier callback flushes the work of a later one.
    return null;
  }

  if (isSync && root.finishedExpirationTime === expirationTime) {
    // There's already a pending commit at this expiration time.
    // TODO: This is poorly factored. This case only exists for the
    // batch.commit() API.
    return commitRoot.bind(null, root);
  }

  flushPassiveEffects();

  // If the root or expiration time have changed, throw out the existing stack
  // and prepare a fresh one. Otherwise we'll continue where we left off.
  if (root !== workInProgressRoot || expirationTime !== renderExpirationTime) {
    prepareFreshStack(root, expirationTime);
    startWorkOnPendingInteractions(root, expirationTime);
  } else if (workInProgressRootExitStatus === RootSuspendedWithDelay) {
    // We could've received an update at a lower priority while we yielded.
    // We're suspended in a delayed state. Once we complete this render we're
    // just going to try to recover at the last pending time anyway so we might
    // as well start doing that eagerly.
    // Ideally we should be able to do this even for retries but we don't yet
    // know if we're going to process an update which wants to commit earlier,
    // and this path happens very early so it would happen too often. Instead,
    // for that case, we'll wait until we complete.
    if (workInProgressRootHasPendingPing) {
      // We have a ping at this expiration. Let's restart to see if we get unblocked.
      prepareFreshStack(root, expirationTime);
    } else {
      var lastPendingTime = root.lastPendingTime;
      if (lastPendingTime < expirationTime) {
        // There's lower priority work. It might be unsuspended. Try rendering
        // at that level immediately, while preserving the position in the queue.
        return renderRoot.bind(null, root, lastPendingTime);
      }
    }
  }

  // If we have a work-in-progress fiber, it means there's still work to do
  // in this root.
  if (workInProgress !== null) {
    var prevExecutionContext = executionContext;
    executionContext |= RenderContext;
    var prevDispatcher = ReactCurrentDispatcher.current;
    if (prevDispatcher === null) {
      // The React isomorphic package does not include a default dispatcher.
      // Instead the first renderer will lazily attach one, in order to give
      // nicer error messages.
      prevDispatcher = ContextOnlyDispatcher;
    }
    ReactCurrentDispatcher.current = ContextOnlyDispatcher;
    var prevInteractions = null;
    if (enableSchedulerTracing) {
      prevInteractions = tracing.__interactionsRef.current;
      tracing.__interactionsRef.current = root.memoizedInteractions;
    }

    startWorkLoopTimer(workInProgress);

    // TODO: Fork renderRoot into renderRootSync and renderRootAsync
    if (isSync) {
      if (expirationTime !== Sync) {
        // An async update expired. There may be other expired updates on
        // this root. We should render all the expired work in a
        // single batch.
        var currentTime = requestCurrentTime();
        if (currentTime < expirationTime) {
          // Restart at the current time.
          executionContext = prevExecutionContext;
          resetContextDependencies();
          ReactCurrentDispatcher.current = prevDispatcher;
          if (enableSchedulerTracing) {
            tracing.__interactionsRef.current = prevInteractions;
          }
          return renderRoot.bind(null, root, currentTime);
        }
      }
    } else {
      // Since we know we're in a React event, we can clear the current
      // event time. The next update will compute a new event time.
      currentEventTime = NoWork;
    }

    do {
      try {
        if (isSync) {
          workLoopSync();
        } else {
          workLoop();
        }
        break;
      } catch (thrownValue) {
        // Reset module-level state that was set during the render phase.
        resetContextDependencies();
        resetHooks();

        var sourceFiber = workInProgress;
        if (sourceFiber === null || sourceFiber.return === null) {
          // Expected to be working on a non-root fiber. This is a fatal error
          // because there's no ancestor that can handle it; the root is
          // supposed to capture all errors that weren't caught by an error
          // boundary.
          prepareFreshStack(root, expirationTime);
          executionContext = prevExecutionContext;
          throw thrownValue;
        }

        if (enableProfilerTimer && sourceFiber.mode & ProfileMode) {
          // Record the time spent rendering before an error was thrown. This
          // avoids inaccurate Profiler durations in the case of a
          // suspended render.
          stopProfilerTimerIfRunningAndRecordDelta(sourceFiber, true);
        }

        var returnFiber = sourceFiber.return;
        throwException(root, returnFiber, sourceFiber, thrownValue, renderExpirationTime);
        workInProgress = completeUnitOfWork(sourceFiber);
      }
    } while (true);

    executionContext = prevExecutionContext;
    resetContextDependencies();
    ReactCurrentDispatcher.current = prevDispatcher;
    if (enableSchedulerTracing) {
      tracing.__interactionsRef.current = prevInteractions;
    }

    if (workInProgress !== null) {
      // There's still work left over. Return a continuation.
      stopInterruptedWorkLoopTimer();
      if (expirationTime !== Sync) {
        startRequestCallbackTimer();
      }
      return renderRoot.bind(null, root, expirationTime);
    }
  }

  // We now have a consistent tree. The next step is either to commit it, or, if
  // something suspended, wait to commit it after a timeout.
  stopFinishedWorkLoopTimer();

  root.finishedWork = root.current.alternate;
  root.finishedExpirationTime = expirationTime;

  var isLocked = resolveLocksOnRoot(root, expirationTime);
  if (isLocked) {
    // This root has a lock that prevents it from committing. Exit. If we begin
    // work on the root again, without any intervening updates, it will finish
    // without doing additional work.
    return null;
  }

  // Set this to null to indicate there's no in-progress render.
  workInProgressRoot = null;

  switch (workInProgressRootExitStatus) {
    case RootIncomplete:
      {
        (function () {
          {
            {
              throw ReactError(Error('Should have a work-in-progress.'));
            }
          }
        })();
      }
    // Flow knows about invariant, so it complains if I add a break statement,
    // but eslint doesn't know about invariant, so it complains if I do.
    // eslint-disable-next-line no-fallthrough
    case RootErrored:
      {
        // An error was thrown. First check if there is lower priority work
        // scheduled on this root.
        var _lastPendingTime = root.lastPendingTime;
        if (_lastPendingTime < expirationTime) {
          // There's lower priority work. Before raising the error, try rendering
          // at the lower priority to see if it fixes it. Use a continuation to
          // maintain the existing priority and position in the queue.
          return renderRoot.bind(null, root, _lastPendingTime);
        }
        if (!isSync) {
          // If we're rendering asynchronously, it's possible the error was
          // caused by tearing due to a mutation during an event. Try rendering
          // one more time without yiedling to events.
          prepareFreshStack(root, expirationTime);
          scheduleSyncCallback(renderRoot.bind(null, root, expirationTime));
          return null;
        }
        // If we're already rendering synchronously, commit the root in its
        // errored state.
        return commitRoot.bind(null, root);
      }
    case RootSuspended:
      {
        flushSuspensePriorityWarningInDEV();

        // We have an acceptable loading state. We need to figure out if we should
        // immediately commit it or wait a bit.

        // If we have processed new updates during this render, we may now have a
        // new loading state ready. We want to ensure that we commit that as soon as
        // possible.
        var hasNotProcessedNewUpdates = workInProgressRootLatestProcessedExpirationTime === Sync;
        if (hasNotProcessedNewUpdates && !isSync &&
        // do not delay if we're inside an act() scope
        !( true && flushSuspenseFallbacksInTests && IsThisRendererActing.current)) {
          // If we have not processed any new updates during this pass, then this is
          // either a retry of an existing fallback state or a hidden tree.
          // Hidden trees shouldn't be batched with other work and after that's
          // fixed it can only be a retry.
          // We're going to throttle committing retries so that we don't show too
          // many loading states too quickly.
          var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now();
          // Don't bother with a very short suspense time.
          if (msUntilTimeout > 10) {
            if (workInProgressRootHasPendingPing) {
              // This render was pinged but we didn't get to restart earlier so try
              // restarting now instead.
              prepareFreshStack(root, expirationTime);
              return renderRoot.bind(null, root, expirationTime);
            }
            var _lastPendingTime2 = root.lastPendingTime;
            if (_lastPendingTime2 < expirationTime) {
              // There's lower priority work. It might be unsuspended. Try rendering
              // at that level.
              return renderRoot.bind(null, root, _lastPendingTime2);
            }
            // The render is suspended, it hasn't timed out, and there's no lower
            // priority work to do. Instead of committing the fallback
            // immediately, wait for more data to arrive.
            root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout);
            return null;
          }
        }
        // The work expired. Commit immediately.
        return commitRoot.bind(null, root);
      }
    case RootSuspendedWithDelay:
      {
        flushSuspensePriorityWarningInDEV();

        if (!isSync &&
        // do not delay if we're inside an act() scope
        !( true && flushSuspenseFallbacksInTests && IsThisRendererActing.current)) {
          // We're suspended in a state that should be avoided. We'll try to avoid committing
          // it for as long as the timeouts let us.
          if (workInProgressRootHasPendingPing) {
            // This render was pinged but we didn't get to restart earlier so try
            // restarting now instead.
            prepareFreshStack(root, expirationTime);
            return renderRoot.bind(null, root, expirationTime);
          }
          var _lastPendingTime3 = root.lastPendingTime;
          if (_lastPendingTime3 < expirationTime) {
            // There's lower priority work. It might be unsuspended. Try rendering
            // at that level immediately.
            return renderRoot.bind(null, root, _lastPendingTime3);
          }

          var _msUntilTimeout = void 0;
          if (workInProgressRootLatestSuspenseTimeout !== Sync) {
            // We have processed a suspense config whose expiration time we can use as
            // the timeout.
            _msUntilTimeout = expirationTimeToMs(workInProgressRootLatestSuspenseTimeout) - now();
          } else if (workInProgressRootLatestProcessedExpirationTime === Sync) {
            // This should never normally happen because only new updates cause
            // delayed states, so we should have processed something. However,
            // this could also happen in an offscreen tree.
            _msUntilTimeout = 0;
          } else {
            // If we don't have a suspense config, we're going to use a heuristic to
            var eventTimeMs = inferTimeFromExpirationTime(workInProgressRootLatestProcessedExpirationTime);
            var currentTimeMs = now();
            var timeUntilExpirationMs = expirationTimeToMs(expirationTime) - currentTimeMs;
            var timeElapsed = currentTimeMs - eventTimeMs;
            if (timeElapsed < 0) {
              // We get this wrong some time since we estimate the time.
              timeElapsed = 0;
            }

            _msUntilTimeout = jnd(timeElapsed) - timeElapsed;

            // Clamp the timeout to the expiration time.
            // TODO: Once the event time is exact instead of inferred from expiration time
            // we don't need this.
            if (timeUntilExpirationMs < _msUntilTimeout) {
              _msUntilTimeout = timeUntilExpirationMs;
            }
          }

          // Don't bother with a very short suspense time.
          if (_msUntilTimeout > 10) {
            // The render is suspended, it hasn't timed out, and there's no lower
            // priority work to do. Instead of committing the fallback
            // immediately, wait for more data to arrive.
            root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout);
            return null;
          }
        }
        // The work expired. Commit immediately.
        return commitRoot.bind(null, root);
      }
    case RootCompleted:
      {
        // The work completed. Ready to commit.
        if (!isSync &&
        // do not delay if we're inside an act() scope
        !( true && flushSuspenseFallbacksInTests && IsThisRendererActing.current) && workInProgressRootLatestProcessedExpirationTime !== Sync && workInProgressRootCanSuspendUsingConfig !== null) {
          // If we have exceeded the minimum loading delay, which probably
          // means we have shown a spinner already, we might have to suspend
          // a bit longer to ensure that the spinner is shown for enough time.
          var _msUntilTimeout2 = computeMsUntilSuspenseLoadingDelay(workInProgressRootLatestProcessedExpirationTime, expirationTime, workInProgressRootCanSuspendUsingConfig);
          if (_msUntilTimeout2 > 10) {
            root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout2);
            return null;
          }
        }
        return commitRoot.bind(null, root);
      }
    default:
      {
        (function () {
          {
            {
              throw ReactError(Error('Unknown root exit status.'));
            }
          }
        })();
      }
  }
}

function markCommitTimeOfFallback() {
  globalMostRecentFallbackTime = now();
}

function markRenderEventTimeAndConfig(expirationTime, suspenseConfig) {
  if (expirationTime < workInProgressRootLatestProcessedExpirationTime && expirationTime > Never) {
    workInProgressRootLatestProcessedExpirationTime = expirationTime;
  }
  if (suspenseConfig !== null) {
    if (expirationTime < workInProgressRootLatestSuspenseTimeout && expirationTime > Never) {
      workInProgressRootLatestSuspenseTimeout = expirationTime;
      // Most of the time we only have one config and getting wrong is not bad.
      workInProgressRootCanSuspendUsingConfig = suspenseConfig;
    }
  }
}

function renderDidSuspend() {
  if (workInProgressRootExitStatus === RootIncomplete) {
    workInProgressRootExitStatus = RootSuspended;
  }
}

function renderDidSuspendDelayIfPossible() {
  if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) {
    workInProgressRootExitStatus = RootSuspendedWithDelay;
  }
}

function renderDidError() {
  if (workInProgressRootExitStatus !== RootCompleted) {
    workInProgressRootExitStatus = RootErrored;
  }
}

// Called during render to determine if anything has suspended.
// Returns false if we're not sure.
function renderHasNotSuspendedYet() {
  // If something errored or completed, we can't really be sure,
  // so those are false.
  return workInProgressRootExitStatus === RootIncomplete;
}

function inferTimeFromExpirationTime(expirationTime) {
  // We don't know exactly when the update was scheduled, but we can infer an
  // approximate start time from the expiration time.
  var earliestExpirationTimeMs = expirationTimeToMs(expirationTime);
  return earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION;
}

function inferTimeFromExpirationTimeWithSuspenseConfig(expirationTime, suspenseConfig) {
  // We don't know exactly when the update was scheduled, but we can infer an
  // approximate start time from the expiration time by subtracting the timeout
  // that was added to the event time.
  var earliestExpirationTimeMs = expirationTimeToMs(expirationTime);
  return earliestExpirationTimeMs - (suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION);
}

function workLoopSync() {
  // Already timed out, so perform work without checking if we need to yield.
  while (workInProgress !== null) {
    workInProgress = performUnitOfWork(workInProgress);
  }
}

function workLoop() {
  // Perform work until Scheduler asks us to yield
  while (workInProgress !== null && !shouldYield()) {
    workInProgress = performUnitOfWork(workInProgress);
  }
}

function performUnitOfWork(unitOfWork) {
  // The current, flushed, state of this fiber is the alternate. Ideally
  // nothing should rely on this, but relying on it here means that we don't
  // need an additional field on the work in progress.
  var current$$1 = unitOfWork.alternate;

  startWorkTimer(unitOfWork);
  setCurrentFiber(unitOfWork);

  var next = void 0;
  if (enableProfilerTimer && (unitOfWork.mode & ProfileMode) !== NoMode) {
    startProfilerTimer(unitOfWork);
    next = beginWork$$1(current$$1, unitOfWork, renderExpirationTime);
    stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);
  } else {
    next = beginWork$$1(current$$1, unitOfWork, renderExpirationTime);
  }

  resetCurrentFiber();
  unitOfWork.memoizedProps = unitOfWork.pendingProps;
  if (next === null) {
    // If this doesn't spawn new work, complete the current work.
    next = completeUnitOfWork(unitOfWork);
  }

  ReactCurrentOwner$2.current = null;
  return next;
}

function completeUnitOfWork(unitOfWork) {
  // Attempt to complete the current unit of work, then move to the next
  // sibling. If there are no more siblings, return to the parent fiber.
  workInProgress = unitOfWork;
  do {
    // The current, flushed, state of this fiber is the alternate. Ideally
    // nothing should rely on this, but relying on it here means that we don't
    // need an additional field on the work in progress.
    var current$$1 = workInProgress.alternate;
    var returnFiber = workInProgress.return;

    // Check if the work completed or if something threw.
    if ((workInProgress.effectTag & Incomplete) === NoEffect) {
      setCurrentFiber(workInProgress);
      var next = void 0;
      if (!enableProfilerTimer || (workInProgress.mode & ProfileMode) === NoMode) {
        next = completeWork(current$$1, workInProgress, renderExpirationTime);
      } else {
        startProfilerTimer(workInProgress);
        next = completeWork(current$$1, workInProgress, renderExpirationTime);
        // Update render duration assuming we didn't error.
        stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false);
      }
      stopWorkTimer(workInProgress);
      resetCurrentFiber();
      resetChildExpirationTime(workInProgress);

      if (next !== null) {
        // Completing this fiber spawned new work. Work on that next.
        return next;
      }

      if (returnFiber !== null &&
      // Do not append effects to parents if a sibling failed to complete
      (returnFiber.effectTag & Incomplete) === NoEffect) {
        // Append all the effects of the subtree and this fiber onto the effect
        // list of the parent. The completion order of the children affects the
        // side-effect order.
        if (returnFiber.firstEffect === null) {
          returnFiber.firstEffect = workInProgress.firstEffect;
        }
        if (workInProgress.lastEffect !== null) {
          if (returnFiber.lastEffect !== null) {
            returnFiber.lastEffect.nextEffect = workInProgress.firstEffect;
          }
          returnFiber.lastEffect = workInProgress.lastEffect;
        }

        // If this fiber had side-effects, we append it AFTER the children's
        // side-effects. We can perform certain side-effects earlier if needed,
        // by doing multiple passes over the effect list. We don't want to
        // schedule our own side-effect on our own list because if end up
        // reusing children we'll schedule this effect onto itself since we're
        // at the end.
        var effectTag = workInProgress.effectTag;

        // Skip both NoWork and PerformedWork tags when creating the effect
        // list. PerformedWork effect is read by React DevTools but shouldn't be
        // committed.
        if (effectTag > PerformedWork) {
          if (returnFiber.lastEffect !== null) {
            returnFiber.lastEffect.nextEffect = workInProgress;
          } else {
            returnFiber.firstEffect = workInProgress;
          }
          returnFiber.lastEffect = workInProgress;
        }
      }
    } else {
      // This fiber did not complete because something threw. Pop values off
      // the stack without entering the complete phase. If this is a boundary,
      // capture values if possible.
      var _next = unwindWork(workInProgress, renderExpirationTime);

      // Because this fiber did not complete, don't reset its expiration time.

      if (enableProfilerTimer && (workInProgress.mode & ProfileMode) !== NoMode) {
        // Record the render duration for the fiber that errored.
        stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false);

        // Include the time spent working on failed children before continuing.
        var actualDuration = workInProgress.actualDuration;
        var child = workInProgress.child;
        while (child !== null) {
          actualDuration += child.actualDuration;
          child = child.sibling;
        }
        workInProgress.actualDuration = actualDuration;
      }

      if (_next !== null) {
        // If completing this work spawned new work, do that next. We'll come
        // back here again.
        // Since we're restarting, remove anything that is not a host effect
        // from the effect tag.
        // TODO: The name stopFailedWorkTimer is misleading because Suspense
        // also captures and restarts.
        stopFailedWorkTimer(workInProgress);
        _next.effectTag &= HostEffectMask;
        return _next;
      }
      stopWorkTimer(workInProgress);

      if (returnFiber !== null) {
        // Mark the parent fiber as incomplete and clear its effect list.
        returnFiber.firstEffect = returnFiber.lastEffect = null;
        returnFiber.effectTag |= Incomplete;
      }
    }

    var siblingFiber = workInProgress.sibling;
    if (siblingFiber !== null) {
      // If there is more work to do in this returnFiber, do that next.
      return siblingFiber;
    }
    // Otherwise, return to the parent
    workInProgress = returnFiber;
  } while (workInProgress !== null);

  // We've reached the root.
  if (workInProgressRootExitStatus === RootIncomplete) {
    workInProgressRootExitStatus = RootCompleted;
  }
  return null;
}

function resetChildExpirationTime(completedWork) {
  if (renderExpirationTime !== Never && completedWork.childExpirationTime === Never) {
    // The children of this component are hidden. Don't bubble their
    // expiration times.
    return;
  }

  var newChildExpirationTime = NoWork;

  // Bubble up the earliest expiration time.
  if (enableProfilerTimer && (completedWork.mode & ProfileMode) !== NoMode) {
    // In profiling mode, resetChildExpirationTime is also used to reset
    // profiler durations.
    var actualDuration = completedWork.actualDuration;
    var treeBaseDuration = completedWork.selfBaseDuration;

    // When a fiber is cloned, its actualDuration is reset to 0. This value will
    // only be updated if work is done on the fiber (i.e. it doesn't bailout).
    // When work is done, it should bubble to the parent's actualDuration. If
    // the fiber has not been cloned though, (meaning no work was done), then
    // this value will reflect the amount of time spent working on a previous
    // render. In that case it should not bubble. We determine whether it was
    // cloned by comparing the child pointer.
    var shouldBubbleActualDurations = completedWork.alternate === null || completedWork.child !== completedWork.alternate.child;

    var child = completedWork.child;
    while (child !== null) {
      var childUpdateExpirationTime = child.expirationTime;
      var childChildExpirationTime = child.childExpirationTime;
      if (childUpdateExpirationTime > newChildExpirationTime) {
        newChildExpirationTime = childUpdateExpirationTime;
      }
      if (childChildExpirationTime > newChildExpirationTime) {
        newChildExpirationTime = childChildExpirationTime;
      }
      if (shouldBubbleActualDurations) {
        actualDuration += child.actualDuration;
      }
      treeBaseDuration += child.treeBaseDuration;
      child = child.sibling;
    }
    completedWork.actualDuration = actualDuration;
    completedWork.treeBaseDuration = treeBaseDuration;
  } else {
    var _child = completedWork.child;
    while (_child !== null) {
      var _childUpdateExpirationTime = _child.expirationTime;
      var _childChildExpirationTime = _child.childExpirationTime;
      if (_childUpdateExpirationTime > newChildExpirationTime) {
        newChildExpirationTime = _childUpdateExpirationTime;
      }
      if (_childChildExpirationTime > newChildExpirationTime) {
        newChildExpirationTime = _childChildExpirationTime;
      }
      _child = _child.sibling;
    }
  }

  completedWork.childExpirationTime = newChildExpirationTime;
}

function commitRoot(root) {
  var renderPriorityLevel = getCurrentPriorityLevel();
  runWithPriority$2(ImmediatePriority, commitRootImpl.bind(null, root, renderPriorityLevel));
  // If there are passive effects, schedule a callback to flush them. This goes
  // outside commitRootImpl so that it inherits the priority of the render.
  if (rootWithPendingPassiveEffects !== null) {
    scheduleCallback(NormalPriority, function () {
      flushPassiveEffects();
      return null;
    });
  }
  return null;
}

function commitRootImpl(root, renderPriorityLevel) {
  flushPassiveEffects();
  flushRenderPhaseStrictModeWarningsInDEV();

  (function () {
    if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
      {
        throw ReactError(Error('Should not already be working.'));
      }
    }
  })();

  var finishedWork = root.finishedWork;
  var expirationTime = root.finishedExpirationTime;
  if (finishedWork === null) {
    return null;
  }
  root.finishedWork = null;
  root.finishedExpirationTime = NoWork;

  (function () {
    if (!(finishedWork !== root.current)) {
      {
        throw ReactError(Error('Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.'));
      }
    }
  })();

  // commitRoot never returns a continuation; it always finishes synchronously.
  // So we can clear these now to allow a new callback to be scheduled.
  root.callbackNode = null;
  root.callbackExpirationTime = NoWork;

  startCommitTimer();

  // Update the first and last pending times on this root. The new first
  // pending time is whatever is left on the root fiber.
  var updateExpirationTimeBeforeCommit = finishedWork.expirationTime;
  var childExpirationTimeBeforeCommit = finishedWork.childExpirationTime;
  var firstPendingTimeBeforeCommit = childExpirationTimeBeforeCommit > updateExpirationTimeBeforeCommit ? childExpirationTimeBeforeCommit : updateExpirationTimeBeforeCommit;
  root.firstPendingTime = firstPendingTimeBeforeCommit;
  if (firstPendingTimeBeforeCommit < root.lastPendingTime) {
    // This usually means we've finished all the work, but it can also happen
    // when something gets downprioritized during render, like a hidden tree.
    root.lastPendingTime = firstPendingTimeBeforeCommit;
  }

  if (root === workInProgressRoot) {
    // We can reset these now that they are finished.
    workInProgressRoot = null;
    workInProgress = null;
    renderExpirationTime = NoWork;
  } else {}
  // This indicates that the last root we worked on is not the same one that
  // we're committing now. This most commonly happens when a suspended root
  // times out.


  // Get the list of effects.
  var firstEffect = void 0;
  if (finishedWork.effectTag > PerformedWork) {
    // A fiber's effect list consists only of its children, not itself. So if
    // the root has an effect, we need to add it to the end of the list. The
    // resulting list is the set that would belong to the root's parent, if it
    // had one; that is, all the effects in the tree including the root.
    if (finishedWork.lastEffect !== null) {
      finishedWork.lastEffect.nextEffect = finishedWork;
      firstEffect = finishedWork.firstEffect;
    } else {
      firstEffect = finishedWork;
    }
  } else {
    // There is no effect on the root.
    firstEffect = finishedWork.firstEffect;
  }

  if (firstEffect !== null) {
    var prevExecutionContext = executionContext;
    executionContext |= CommitContext;
    var prevInteractions = null;
    if (enableSchedulerTracing) {
      prevInteractions = tracing.__interactionsRef.current;
      tracing.__interactionsRef.current = root.memoizedInteractions;
    }

    // Reset this to null before calling lifecycles
    ReactCurrentOwner$2.current = null;

    // The commit phase is broken into several sub-phases. We do a separate pass
    // of the effect list for each phase: all mutation effects come before all
    // layout effects, and so on.

    // The first phase a "before mutation" phase. We use this phase to read the
    // state of the host tree right before we mutate it. This is where
    // getSnapshotBeforeUpdate is called.
    startCommitSnapshotEffectsTimer();
    prepareForCommit(root.containerInfo);
    nextEffect = firstEffect;
    do {
      {
        invokeGuardedCallback(null, commitBeforeMutationEffects, null);
        if (hasCaughtError()) {
          (function () {
            if (!(nextEffect !== null)) {
              {
                throw ReactError(Error('Should be working on an effect.'));
              }
            }
          })();
          var error = clearCaughtError();
          captureCommitPhaseError(nextEffect, error);
          nextEffect = nextEffect.nextEffect;
        }
      }
    } while (nextEffect !== null);
    stopCommitSnapshotEffectsTimer();

    if (enableProfilerTimer) {
      // Mark the current commit time to be shared by all Profilers in this
      // batch. This enables them to be grouped later.
      recordCommitTime();
    }

    // The next phase is the mutation phase, where we mutate the host tree.
    startCommitHostEffectsTimer();
    nextEffect = firstEffect;
    do {
      {
        invokeGuardedCallback(null, commitMutationEffects, null, renderPriorityLevel);
        if (hasCaughtError()) {
          (function () {
            if (!(nextEffect !== null)) {
              {
                throw ReactError(Error('Should be working on an effect.'));
              }
            }
          })();
          var _error = clearCaughtError();
          captureCommitPhaseError(nextEffect, _error);
          nextEffect = nextEffect.nextEffect;
        }
      }
    } while (nextEffect !== null);
    stopCommitHostEffectsTimer();
    resetAfterCommit(root.containerInfo);

    // The work-in-progress tree is now the current tree. This must come after
    // the mutation phase, so that the previous tree is still current during
    // componentWillUnmount, but before the layout phase, so that the finished
    // work is current during componentDidMount/Update.
    root.current = finishedWork;

    // The next phase is the layout phase, where we call effects that read
    // the host tree after it's been mutated. The idiomatic use case for this is
    // layout, but class component lifecycles also fire here for legacy reasons.
    startCommitLifeCyclesTimer();
    nextEffect = firstEffect;
    do {
      {
        invokeGuardedCallback(null, commitLayoutEffects, null, root, expirationTime);
        if (hasCaughtError()) {
          (function () {
            if (!(nextEffect !== null)) {
              {
                throw ReactError(Error('Should be working on an effect.'));
              }
            }
          })();
          var _error2 = clearCaughtError();
          captureCommitPhaseError(nextEffect, _error2);
          nextEffect = nextEffect.nextEffect;
        }
      }
    } while (nextEffect !== null);
    stopCommitLifeCyclesTimer();

    nextEffect = null;

    // Tell Scheduler to yield at the end of the frame, so the browser has an
    // opportunity to paint.
    requestPaint();

    if (enableSchedulerTracing) {
      tracing.__interactionsRef.current = prevInteractions;
    }
    executionContext = prevExecutionContext;
  } else {
    // No effects.
    root.current = finishedWork;
    // Measure these anyway so the flamegraph explicitly shows that there were
    // no effects.
    // TODO: Maybe there's a better way to report this.
    startCommitSnapshotEffectsTimer();
    stopCommitSnapshotEffectsTimer();
    if (enableProfilerTimer) {
      recordCommitTime();
    }
    startCommitHostEffectsTimer();
    stopCommitHostEffectsTimer();
    startCommitLifeCyclesTimer();
    stopCommitLifeCyclesTimer();
  }

  stopCommitTimer();

  var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;

  if (rootDoesHavePassiveEffects) {
    // This commit has passive effects. Stash a reference to them. But don't
    // schedule a callback until after flushing layout work.
    rootDoesHavePassiveEffects = false;
    rootWithPendingPassiveEffects = root;
    pendingPassiveEffectsExpirationTime = expirationTime;
    pendingPassiveEffectsRenderPriority = renderPriorityLevel;
  } else {
    // We are done with the effect chain at this point so let's clear the
    // nextEffect pointers to assist with GC. If we have passive effects, we'll
    // clear this in flushPassiveEffects.
    nextEffect = firstEffect;
    while (nextEffect !== null) {
      var nextNextEffect = nextEffect.nextEffect;
      nextEffect.nextEffect = null;
      nextEffect = nextNextEffect;
    }
  }

  // Check if there's remaining work on this root
  var remainingExpirationTime = root.firstPendingTime;
  if (remainingExpirationTime !== NoWork) {
    var currentTime = requestCurrentTime();
    var priorityLevel = inferPriorityFromExpirationTime(currentTime, remainingExpirationTime);

    if (enableSchedulerTracing) {
      if (spawnedWorkDuringRender !== null) {
        var expirationTimes = spawnedWorkDuringRender;
        spawnedWorkDuringRender = null;
        for (var i = 0; i < expirationTimes.length; i++) {
          scheduleInteractions(root, expirationTimes[i], root.memoizedInteractions);
        }
      }
    }

    scheduleCallbackForRoot(root, priorityLevel, remainingExpirationTime);
  } else {
    // If there's no remaining work, we can clear the set of already failed
    // error boundaries.
    legacyErrorBoundariesThatAlreadyFailed = null;
  }

  if (enableSchedulerTracing) {
    if (!rootDidHavePassiveEffects) {
      // If there are no passive effects, then we can complete the pending interactions.
      // Otherwise, we'll wait until after the passive effects are flushed.
      // Wait to do this until after remaining work has been scheduled,
      // so that we don't prematurely signal complete for interactions when there's e.g. hidden work.
      finishPendingInteractions(root, expirationTime);
    }
  }

  onCommitRoot(finishedWork.stateNode, expirationTime);

  if (remainingExpirationTime === Sync) {
    // Count the number of times the root synchronously re-renders without
    // finishing. If there are too many, it indicates an infinite update loop.
    if (root === rootWithNestedUpdates) {
      nestedUpdateCount++;
    } else {
      nestedUpdateCount = 0;
      rootWithNestedUpdates = root;
    }
  } else {
    nestedUpdateCount = 0;
  }

  if (hasUncaughtError) {
    hasUncaughtError = false;
    var _error3 = firstUncaughtError;
    firstUncaughtError = null;
    throw _error3;
  }

  if ((executionContext & LegacyUnbatchedContext) !== NoContext) {
    // This is a legacy edge case. We just committed the initial mount of
    // a ReactDOM.render-ed root inside of batchedUpdates. The commit fired
    // synchronously, but layout updates should be deferred until the end
    // of the batch.
    return null;
  }

  // If layout work was scheduled, flush it now.
  flushSyncCallbackQueue();
  return null;
}

function commitBeforeMutationEffects() {
  while (nextEffect !== null) {
    if ((nextEffect.effectTag & Snapshot) !== NoEffect) {
      setCurrentFiber(nextEffect);
      recordEffect();

      var current$$1 = nextEffect.alternate;
      commitBeforeMutationLifeCycles(current$$1, nextEffect);

      resetCurrentFiber();
    }
    nextEffect = nextEffect.nextEffect;
  }
}

function commitMutationEffects(renderPriorityLevel) {
  // TODO: Should probably move the bulk of this function to commitWork.
  while (nextEffect !== null) {
    setCurrentFiber(nextEffect);

    var effectTag = nextEffect.effectTag;

    if (effectTag & ContentReset) {
      commitResetTextContent(nextEffect);
    }

    if (effectTag & Ref) {
      var current$$1 = nextEffect.alternate;
      if (current$$1 !== null) {
        commitDetachRef(current$$1);
      }
    }

    // The following switch statement is only concerned about placement,
    // updates, and deletions. To avoid needing to add a case for every possible
    // bitmap value, we remove the secondary effects from the effect tag and
    // switch on that value.
    var primaryEffectTag = effectTag & (Placement | Update | Deletion);
    switch (primaryEffectTag) {
      case Placement:
        {
          commitPlacement(nextEffect);
          // Clear the "placement" from effect tag so that we know that this is
          // inserted, before any life-cycles like componentDidMount gets called.
          // TODO: findDOMNode doesn't rely on this any more but isMounted does
          // and isMounted is deprecated anyway so we should be able to kill this.
          nextEffect.effectTag &= ~Placement;
          break;
        }
      case PlacementAndUpdate:
        {
          // Placement
          commitPlacement(nextEffect);
          // Clear the "placement" from effect tag so that we know that this is
          // inserted, before any life-cycles like componentDidMount gets called.
          nextEffect.effectTag &= ~Placement;

          // Update
          var _current = nextEffect.alternate;
          commitWork(_current, nextEffect);
          break;
        }
      case Update:
        {
          var _current2 = nextEffect.alternate;
          commitWork(_current2, nextEffect);
          break;
        }
      case Deletion:
        {
          commitDeletion(nextEffect, renderPriorityLevel);
          break;
        }
    }

    // TODO: Only record a mutation effect if primaryEffectTag is non-zero.
    recordEffect();

    resetCurrentFiber();
    nextEffect = nextEffect.nextEffect;
  }
}

function commitLayoutEffects(root, committedExpirationTime) {
  // TODO: Should probably move the bulk of this function to commitWork.
  while (nextEffect !== null) {
    setCurrentFiber(nextEffect);

    var effectTag = nextEffect.effectTag;

    if (effectTag & (Update | Callback)) {
      recordEffect();
      var current$$1 = nextEffect.alternate;
      commitLifeCycles(root, current$$1, nextEffect, committedExpirationTime);
    }

    if (effectTag & Ref) {
      recordEffect();
      commitAttachRef(nextEffect);
    }

    if (effectTag & Passive) {
      rootDoesHavePassiveEffects = true;
    }

    resetCurrentFiber();
    nextEffect = nextEffect.nextEffect;
  }
}

function flushPassiveEffects() {
  if (rootWithPendingPassiveEffects === null) {
    return false;
  }
  var root = rootWithPendingPassiveEffects;
  var expirationTime = pendingPassiveEffectsExpirationTime;
  var renderPriorityLevel = pendingPassiveEffectsRenderPriority;
  rootWithPendingPassiveEffects = null;
  pendingPassiveEffectsExpirationTime = NoWork;
  pendingPassiveEffectsRenderPriority = NoPriority;
  var priorityLevel = renderPriorityLevel > NormalPriority ? NormalPriority : renderPriorityLevel;
  return runWithPriority$2(priorityLevel, flushPassiveEffectsImpl.bind(null, root, expirationTime));
}

function flushPassiveEffectsImpl(root, expirationTime) {
  var prevInteractions = null;
  if (enableSchedulerTracing) {
    prevInteractions = tracing.__interactionsRef.current;
    tracing.__interactionsRef.current = root.memoizedInteractions;
  }

  (function () {
    if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
      {
        throw ReactError(Error('Cannot flush passive effects while already rendering.'));
      }
    }
  })();
  var prevExecutionContext = executionContext;
  executionContext |= CommitContext;

  // Note: This currently assumes there are no passive effects on the root
  // fiber, because the root is not part of its own effect list. This could
  // change in the future.
  var effect = root.current.firstEffect;
  while (effect !== null) {
    {
      setCurrentFiber(effect);
      invokeGuardedCallback(null, commitPassiveHookEffects, null, effect);
      if (hasCaughtError()) {
        (function () {
          if (!(effect !== null)) {
            {
              throw ReactError(Error('Should be working on an effect.'));
            }
          }
        })();
        var error = clearCaughtError();
        captureCommitPhaseError(effect, error);
      }
      resetCurrentFiber();
    }
    var nextNextEffect = effect.nextEffect;
    // Remove nextEffect pointer to assist GC
    effect.nextEffect = null;
    effect = nextNextEffect;
  }

  if (enableSchedulerTracing) {
    tracing.__interactionsRef.current = prevInteractions;
    finishPendingInteractions(root, expirationTime);
  }

  executionContext = prevExecutionContext;
  flushSyncCallbackQueue();

  // If additional passive effects were scheduled, increment a counter. If this
  // exceeds the limit, we'll fire a warning.
  nestedPassiveUpdateCount = rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1;

  return true;
}

function isAlreadyFailedLegacyErrorBoundary(instance) {
  return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);
}

function markLegacyErrorBoundaryAsFailed(instance) {
  if (legacyErrorBoundariesThatAlreadyFailed === null) {
    legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);
  } else {
    legacyErrorBoundariesThatAlreadyFailed.add(instance);
  }
}

function prepareToThrowUncaughtError(error) {
  if (!hasUncaughtError) {
    hasUncaughtError = true;
    firstUncaughtError = error;
  }
}
var onUncaughtError = prepareToThrowUncaughtError;

function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
  var errorInfo = createCapturedValue(error, sourceFiber);
  var update = createRootErrorUpdate(rootFiber, errorInfo, Sync);
  enqueueUpdate(rootFiber, update);
  var root = markUpdateTimeFromFiberToRoot(rootFiber, Sync);
  if (root !== null) {
    scheduleCallbackForRoot(root, ImmediatePriority, Sync);
  }
}

function captureCommitPhaseError(sourceFiber, error) {
  if (sourceFiber.tag === HostRoot) {
    // Error was thrown at the root. There is no parent, so the root
    // itself should capture it.
    captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
    return;
  }

  var fiber = sourceFiber.return;
  while (fiber !== null) {
    if (fiber.tag === HostRoot) {
      captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error);
      return;
    } else if (fiber.tag === ClassComponent) {
      var ctor = fiber.type;
      var instance = fiber.stateNode;
      if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
        var errorInfo = createCapturedValue(error, sourceFiber);
        var update = createClassErrorUpdate(fiber, errorInfo,
        // TODO: This is always sync
        Sync);
        enqueueUpdate(fiber, update);
        var root = markUpdateTimeFromFiberToRoot(fiber, Sync);
        if (root !== null) {
          scheduleCallbackForRoot(root, ImmediatePriority, Sync);
        }
        return;
      }
    }
    fiber = fiber.return;
  }
}

function pingSuspendedRoot(root, thenable, suspendedTime) {
  var pingCache = root.pingCache;
  if (pingCache !== null) {
    // The thenable resolved, so we no longer need to memoize, because it will
    // never be thrown again.
    pingCache.delete(thenable);
  }

  if (workInProgressRoot === root && renderExpirationTime === suspendedTime) {
    // Received a ping at the same priority level at which we're currently
    // rendering. We might want to restart this render. This should mirror
    // the logic of whether or not a root suspends once it completes.

    // TODO: If we're rendering sync either due to Sync, Batched or expired,
    // we should probably never restart.

    // If we're suspended with delay, we'll always suspend so we can always
    // restart. If we're suspended without any updates, it might be a retry.
    // If it's early in the retry we can restart. We can't know for sure
    // whether we'll eventually process an update during this render pass,
    // but it's somewhat unlikely that we get to a ping before that, since
    // getting to the root most update is usually very fast.
    if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && workInProgressRootLatestProcessedExpirationTime === Sync && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {
      // Restart from the root. Don't need to schedule a ping because
      // we're already working on this tree.
      prepareFreshStack(root, renderExpirationTime);
    } else {
      // Even though we can't restart right now, we might get an
      // opportunity later. So we mark this render as having a ping.
      workInProgressRootHasPendingPing = true;
    }
    return;
  }

  var lastPendingTime = root.lastPendingTime;
  if (lastPendingTime < suspendedTime) {
    // The root is no longer suspended at this time.
    return;
  }

  var pingTime = root.pingTime;
  if (pingTime !== NoWork && pingTime < suspendedTime) {
    // There's already a lower priority ping scheduled.
    return;
  }

  // Mark the time at which this ping was scheduled.
  root.pingTime = suspendedTime;

  if (root.finishedExpirationTime === suspendedTime) {
    // If there's a pending fallback waiting to commit, throw it away.
    root.finishedExpirationTime = NoWork;
    root.finishedWork = null;
  }

  var currentTime = requestCurrentTime();
  var priorityLevel = inferPriorityFromExpirationTime(currentTime, suspendedTime);
  scheduleCallbackForRoot(root, priorityLevel, suspendedTime);
}

function retryTimedOutBoundary(boundaryFiber) {
  // The boundary fiber (a Suspense component or SuspenseList component)
  // previously was rendered in its fallback state. One of the promises that
  // suspended it has resolved, which means at least part of the tree was
  // likely unblocked. Try rendering again, at a new expiration time.
  var currentTime = requestCurrentTime();
  var suspenseConfig = null; // Retries don't carry over the already committed update.
  var retryTime = computeExpirationForFiber(currentTime, boundaryFiber, suspenseConfig);
  // TODO: Special case idle priority?
  var priorityLevel = inferPriorityFromExpirationTime(currentTime, retryTime);
  var root = markUpdateTimeFromFiberToRoot(boundaryFiber, retryTime);
  if (root !== null) {
    scheduleCallbackForRoot(root, priorityLevel, retryTime);
  }
}

function resolveRetryThenable(boundaryFiber, thenable) {
  var retryCache = void 0;
  if (enableSuspenseServerRenderer) {
    switch (boundaryFiber.tag) {
      case SuspenseComponent:
        retryCache = boundaryFiber.stateNode;
        break;
      case DehydratedSuspenseComponent:
        retryCache = boundaryFiber.memoizedState;
        break;
      default:
        (function () {
          {
            {
              throw ReactError(Error('Pinged unknown suspense boundary type. This is probably a bug in React.'));
            }
          }
        })();
    }
  } else {
    retryCache = boundaryFiber.stateNode;
  }

  if (retryCache !== null) {
    // The thenable resolved, so we no longer need to memoize, because it will
    // never be thrown again.
    retryCache.delete(thenable);
  }

  retryTimedOutBoundary(boundaryFiber);
}

// Computes the next Just Noticeable Difference (JND) boundary.
// The theory is that a person can't tell the difference between small differences in time.
// Therefore, if we wait a bit longer than necessary that won't translate to a noticeable
// difference in the experience. However, waiting for longer might mean that we can avoid
// showing an intermediate loading state. The longer we have already waited, the harder it
// is to tell small differences in time. Therefore, the longer we've already waited,
// the longer we can wait additionally. At some point we have to give up though.
// We pick a train model where the next boundary commits at a consistent schedule.
// These particular numbers are vague estimates. We expect to adjust them based on research.
function jnd(timeElapsed) {
  return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;
}

function computeMsUntilSuspenseLoadingDelay(mostRecentEventTime, committedExpirationTime, suspenseConfig) {
  var busyMinDurationMs = suspenseConfig.busyMinDurationMs | 0;
  if (busyMinDurationMs <= 0) {
    return 0;
  }
  var busyDelayMs = suspenseConfig.busyDelayMs | 0;

  // Compute the time until this render pass would expire.
  var currentTimeMs = now();
  var eventTimeMs = inferTimeFromExpirationTimeWithSuspenseConfig(mostRecentEventTime, suspenseConfig);
  var timeElapsed = currentTimeMs - eventTimeMs;
  if (timeElapsed <= busyDelayMs) {
    // If we haven't yet waited longer than the initial delay, we don't
    // have to wait any additional time.
    return 0;
  }
  var msUntilTimeout = busyDelayMs + busyMinDurationMs - timeElapsed;
  // This is the value that is passed to `setTimeout`.
  return msUntilTimeout;
}

function checkForNestedUpdates() {
  if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
    nestedUpdateCount = 0;
    rootWithNestedUpdates = null;
    (function () {
      {
        {
          throw ReactError(Error('Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.'));
        }
      }
    })();
  }

  {
    if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {
      nestedPassiveUpdateCount = 0;
      warning$1(false, 'Maximum update depth exceeded. This can happen when a component ' + "calls setState inside useEffect, but useEffect either doesn't " + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');
    }
  }
}

function flushRenderPhaseStrictModeWarningsInDEV() {
  {
    ReactStrictModeWarnings.flushLegacyContextWarning();

    if (warnAboutDeprecatedLifecycles) {
      ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
    }
  }
}

function stopFinishedWorkLoopTimer() {
  var didCompleteRoot = true;
  stopWorkLoopTimer(interruptedBy, didCompleteRoot);
  interruptedBy = null;
}

function stopInterruptedWorkLoopTimer() {
  // TODO: Track which fiber caused the interruption.
  var didCompleteRoot = false;
  stopWorkLoopTimer(interruptedBy, didCompleteRoot);
  interruptedBy = null;
}

function checkForInterruption(fiberThatReceivedUpdate, updateExpirationTime) {
  if (enableUserTimingAPI && workInProgressRoot !== null && updateExpirationTime > renderExpirationTime) {
    interruptedBy = fiberThatReceivedUpdate;
  }
}

var didWarnStateUpdateForUnmountedComponent = null;
function warnAboutUpdateOnUnmountedFiberInDEV(fiber) {
  {
    var tag = fiber.tag;
    if (tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent) {
      // Only warn for user-defined components, not internal ones like Suspense.
      return;
    }
    // We show the whole stack but dedupe on the top component's name because
    // the problematic code almost always lies inside that component.
    var componentName = getComponentName(fiber.type) || 'ReactComponent';
    if (didWarnStateUpdateForUnmountedComponent !== null) {
      if (didWarnStateUpdateForUnmountedComponent.has(componentName)) {
        return;
      }
      didWarnStateUpdateForUnmountedComponent.add(componentName);
    } else {
      didWarnStateUpdateForUnmountedComponent = new Set([componentName]);
    }
    warningWithoutStack$1(false, "Can't perform a React state update on an unmounted component. This " + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in %s.%s', tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function', getStackByFiberInDevAndProd(fiber));
  }
}

var beginWork$$1 = void 0;
if ( true && replayFailedUnitOfWorkWithInvokeGuardedCallback) {
  var dummyFiber = null;
  beginWork$$1 = function (current$$1, unitOfWork, expirationTime) {
    // If a component throws an error, we replay it again in a synchronously
    // dispatched event, so that the debugger will treat it as an uncaught
    // error See ReactErrorUtils for more information.

    // Before entering the begin phase, copy the work-in-progress onto a dummy
    // fiber. If beginWork throws, we'll use this to reset the state.
    var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);
    try {
      return beginWork$1(current$$1, unitOfWork, expirationTime);
    } catch (originalError) {
      if (originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {
        // Don't replay promises. Treat everything else like an error.
        throw originalError;
      }

      // Keep this code in sync with renderRoot; any changes here must have
      // corresponding changes there.
      resetContextDependencies();
      resetHooks();

      // Unwind the failed stack frame
      unwindInterruptedWork(unitOfWork);

      // Restore the original properties of the fiber.
      assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);

      if (enableProfilerTimer && unitOfWork.mode & ProfileMode) {
        // Reset the profiler timer.
        startProfilerTimer(unitOfWork);
      }

      // Run beginWork again.
      invokeGuardedCallback(null, beginWork$1, null, current$$1, unitOfWork, expirationTime);

      if (hasCaughtError()) {
        var replayError = clearCaughtError();
        // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`.
        // Rethrow this error instead of the original one.
        throw replayError;
      } else {
        // This branch is reachable if the render phase is impure.
        throw originalError;
      }
    }
  };
} else {
  beginWork$$1 = beginWork$1;
}

var didWarnAboutUpdateInRender = false;
var didWarnAboutUpdateInGetChildContext = false;
function warnAboutInvalidUpdatesOnClassComponentsInDEV(fiber) {
  {
    if (fiber.tag === ClassComponent) {
      switch (phase) {
        case 'getChildContext':
          if (didWarnAboutUpdateInGetChildContext) {
            return;
          }
          warningWithoutStack$1(false, 'setState(...): Cannot call setState() inside getChildContext()');
          didWarnAboutUpdateInGetChildContext = true;
          break;
        case 'render':
          if (didWarnAboutUpdateInRender) {
            return;
          }
          warningWithoutStack$1(false, 'Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure function of ' + 'props and state.');
          didWarnAboutUpdateInRender = true;
          break;
      }
    }
  }
}

// a 'shared' variable that changes when act() opens/closes in tests.
var IsThisRendererActing = { current: false };

function warnIfNotScopedWithMatchingAct(fiber) {
  {
    if (warnsIfNotActing === true && IsSomeRendererActing.current === true && IsThisRendererActing.current !== true) {
      warningWithoutStack$1(false, "It looks like you're using the wrong act() around your test interactions.\n" + 'Be sure to use the matching version of act() corresponding to your renderer:\n\n' + '// for react-dom:\n' + "import {act} from 'react-dom/test-utils';\n" + '//...\n' + 'act(() => ...);\n\n' + '// for react-test-renderer:\n' + "import TestRenderer from 'react-test-renderer';\n" + 'const {act} = TestRenderer;\n' + '//...\n' + 'act(() => ...);' + '%s', getStackByFiberInDevAndProd(fiber));
    }
  }
}

function warnIfNotCurrentlyActingEffectsInDEV(fiber) {
  {
    if (warnsIfNotActing === true && (fiber.mode & StrictMode) !== NoMode && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
      warningWithoutStack$1(false, 'An update to %s ran an effect, but was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + '  /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://fb.me/react-wrap-tests-with-act' + '%s', getComponentName(fiber.type), getStackByFiberInDevAndProd(fiber));
    }
  }
}

function warnIfNotCurrentlyActingUpdatesInDEV(fiber) {
  {
    if (warnsIfNotActing === true && executionContext === NoContext && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
      warningWithoutStack$1(false, 'An update to %s inside a test was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + '  /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://fb.me/react-wrap-tests-with-act' + '%s', getComponentName(fiber.type), getStackByFiberInDevAndProd(fiber));
    }
  }
}

var warnIfNotCurrentlyActingUpdatesInDev = warnIfNotCurrentlyActingUpdatesInDEV;

// In tests, we want to enforce a mocked scheduler.
var didWarnAboutUnmockedScheduler = false;
// TODO Before we release concurrent mode, revisit this and decide whether a mocked
// scheduler is the actual recommendation. The alternative could be a testing build,
// a new lib, or whatever; we dunno just yet. This message is for early adopters
// to get their tests right.

function warnIfUnmockedScheduler(fiber) {
  {
    if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {
      if (fiber.mode & BatchedMode || fiber.mode & ConcurrentMode) {
        didWarnAboutUnmockedScheduler = true;
        warningWithoutStack$1(false, 'In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \n' + "jest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\n" + 'For more info, visit https://fb.me/react-mock-scheduler');
      } else if (warnAboutUnmockedScheduler === true) {
        didWarnAboutUnmockedScheduler = true;
        warningWithoutStack$1(false, 'Starting from React v17, the "scheduler" module will need to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \n' + "jest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\n" + 'For more info, visit https://fb.me/react-mock-scheduler');
      }
    }
  }
}

var componentsThatTriggeredHighPriSuspend = null;
function checkForWrongSuspensePriorityInDEV(sourceFiber) {
  {
    var currentPriorityLevel = getCurrentPriorityLevel();
    if ((sourceFiber.mode & ConcurrentMode) !== NoEffect && (currentPriorityLevel === UserBlockingPriority$2 || currentPriorityLevel === ImmediatePriority)) {
      var workInProgressNode = sourceFiber;
      while (workInProgressNode !== null) {
        // Add the component that triggered the suspense
        var current$$1 = workInProgressNode.alternate;
        if (current$$1 !== null) {
          // TODO: warn component that triggers the high priority
          // suspend is the HostRoot
          switch (workInProgressNode.tag) {
            case ClassComponent:
              // Loop through the component's update queue and see whether the component
              // has triggered any high priority updates
              var updateQueue = current$$1.updateQueue;
              if (updateQueue !== null) {
                var update = updateQueue.firstUpdate;
                while (update !== null) {
                  var priorityLevel = update.priority;
                  if (priorityLevel === UserBlockingPriority$2 || priorityLevel === ImmediatePriority) {
                    if (componentsThatTriggeredHighPriSuspend === null) {
                      componentsThatTriggeredHighPriSuspend = new Set([getComponentName(workInProgressNode.type)]);
                    } else {
                      componentsThatTriggeredHighPriSuspend.add(getComponentName(workInProgressNode.type));
                    }
                    break;
                  }
                  update = update.next;
                }
              }
              break;
            case FunctionComponent:
            case ForwardRef:
            case SimpleMemoComponent:
              if (workInProgressNode.memoizedState !== null && workInProgressNode.memoizedState.baseUpdate !== null) {
                var _update = workInProgressNode.memoizedState.baseUpdate;
                // Loop through the functional component's memoized state to see whether
                // the component has triggered any high pri updates
                while (_update !== null) {
                  var priority = _update.priority;
                  if (priority === UserBlockingPriority$2 || priority === ImmediatePriority) {
                    if (componentsThatTriggeredHighPriSuspend === null) {
                      componentsThatTriggeredHighPriSuspend = new Set([getComponentName(workInProgressNode.type)]);
                    } else {
                      componentsThatTriggeredHighPriSuspend.add(getComponentName(workInProgressNode.type));
                    }
                    break;
                  }
                  if (_update.next === workInProgressNode.memoizedState.baseUpdate) {
                    break;
                  }
                  _update = _update.next;
                }
              }
              break;
            default:
              break;
          }
        }
        workInProgressNode = workInProgressNode.return;
      }
    }
  }
}

function flushSuspensePriorityWarningInDEV() {
  {
    if (componentsThatTriggeredHighPriSuspend !== null) {
      var componentNames = [];
      componentsThatTriggeredHighPriSuspend.forEach(function (name) {
        return componentNames.push(name);
      });
      componentsThatTriggeredHighPriSuspend = null;

      if (componentNames.length > 0) {
        warningWithoutStack$1(false, '%s triggered a user-blocking update that suspended.' + '\n\n' + 'The fix is to split the update into multiple parts: a user-blocking ' + 'update to provide immediate feedback, and another update that ' + 'triggers the bulk of the changes.' + '\n\n' + 'Refer to the documentation for useSuspenseTransition to learn how ' + 'to implement this pattern.',
        // TODO: Add link to React docs with more information, once it exists
        componentNames.sort().join(', '));
      }
    }
  }
}

function computeThreadID(root, expirationTime) {
  // Interaction threads are unique per root and expiration time.
  return expirationTime * 1000 + root.interactionThreadID;
}

function markSpawnedWork(expirationTime) {
  if (!enableSchedulerTracing) {
    return;
  }
  if (spawnedWorkDuringRender === null) {
    spawnedWorkDuringRender = [expirationTime];
  } else {
    spawnedWorkDuringRender.push(expirationTime);
  }
}

function scheduleInteractions(root, expirationTime, interactions) {
  if (!enableSchedulerTracing) {
    return;
  }

  if (interactions.size > 0) {
    var pendingInteractionMap = root.pendingInteractionMap;
    var pendingInteractions = pendingInteractionMap.get(expirationTime);
    if (pendingInteractions != null) {
      interactions.forEach(function (interaction) {
        if (!pendingInteractions.has(interaction)) {
          // Update the pending async work count for previously unscheduled interaction.
          interaction.__count++;
        }

        pendingInteractions.add(interaction);
      });
    } else {
      pendingInteractionMap.set(expirationTime, new Set(interactions));

      // Update the pending async work count for the current interactions.
      interactions.forEach(function (interaction) {
        interaction.__count++;
      });
    }

    var subscriber = tracing.__subscriberRef.current;
    if (subscriber !== null) {
      var threadID = computeThreadID(root, expirationTime);
      subscriber.onWorkScheduled(interactions, threadID);
    }
  }
}

function schedulePendingInteractions(root, expirationTime) {
  // This is called when work is scheduled on a root.
  // It associates the current interactions with the newly-scheduled expiration.
  // They will be restored when that expiration is later committed.
  if (!enableSchedulerTracing) {
    return;
  }

  scheduleInteractions(root, expirationTime, tracing.__interactionsRef.current);
}

function startWorkOnPendingInteractions(root, expirationTime) {
  // This is called when new work is started on a root.
  if (!enableSchedulerTracing) {
    return;
  }

  // Determine which interactions this batch of work currently includes, So that
  // we can accurately attribute time spent working on it, And so that cascading
  // work triggered during the render phase will be associated with it.
  var interactions = new Set();
  root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
    if (scheduledExpirationTime >= expirationTime) {
      scheduledInteractions.forEach(function (interaction) {
        return interactions.add(interaction);
      });
    }
  });

  // Store the current set of interactions on the FiberRoot for a few reasons:
  // We can re-use it in hot functions like renderRoot() without having to
  // recalculate it. We will also use it in commitWork() to pass to any Profiler
  // onRender() hooks. This also provides DevTools with a way to access it when
  // the onCommitRoot() hook is called.
  root.memoizedInteractions = interactions;

  if (interactions.size > 0) {
    var subscriber = tracing.__subscriberRef.current;
    if (subscriber !== null) {
      var threadID = computeThreadID(root, expirationTime);
      try {
        subscriber.onWorkStarted(interactions, threadID);
      } catch (error) {
        // If the subscriber throws, rethrow it in a separate task
        scheduleCallback(ImmediatePriority, function () {
          throw error;
        });
      }
    }
  }
}

function finishPendingInteractions(root, committedExpirationTime) {
  if (!enableSchedulerTracing) {
    return;
  }

  var earliestRemainingTimeAfterCommit = root.firstPendingTime;

  var subscriber = void 0;

  try {
    subscriber = tracing.__subscriberRef.current;
    if (subscriber !== null && root.memoizedInteractions.size > 0) {
      var threadID = computeThreadID(root, committedExpirationTime);
      subscriber.onWorkStopped(root.memoizedInteractions, threadID);
    }
  } catch (error) {
    // If the subscriber throws, rethrow it in a separate task
    scheduleCallback(ImmediatePriority, function () {
      throw error;
    });
  } finally {
    // Clear completed interactions from the pending Map.
    // Unless the render was suspended or cascading work was scheduled,
    // In which case– leave pending interactions until the subsequent render.
    var pendingInteractionMap = root.pendingInteractionMap;
    pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
      // Only decrement the pending interaction count if we're done.
      // If there's still work at the current priority,
      // That indicates that we are waiting for suspense data.
      if (scheduledExpirationTime > earliestRemainingTimeAfterCommit) {
        pendingInteractionMap.delete(scheduledExpirationTime);

        scheduledInteractions.forEach(function (interaction) {
          interaction.__count--;

          if (subscriber !== null && interaction.__count === 0) {
            try {
              subscriber.onInteractionScheduledWorkCompleted(interaction);
            } catch (error) {
              // If the subscriber throws, rethrow it in a separate task
              scheduleCallback(ImmediatePriority, function () {
                throw error;
              });
            }
          }
        });
      }
    });
  }
}

var onCommitFiberRoot = null;
var onCommitFiberUnmount = null;
var hasLoggedError = false;

var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';

function injectInternals(internals) {
  if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
    // No DevTools
    return false;
  }
  var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
  if (hook.isDisabled) {
    // This isn't a real property on the hook, but it can be set to opt out
    // of DevTools integration and associated warnings and logs.
    // https://github.com/facebook/react/issues/3877
    return true;
  }
  if (!hook.supportsFiber) {
    {
      warningWithoutStack$1(false, 'The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://fb.me/react-devtools');
    }
    // DevTools exists, even though it doesn't support Fiber.
    return true;
  }
  try {
    var rendererID = hook.inject(internals);
    // We have successfully injected, so now it is safe to set up hooks.
    onCommitFiberRoot = function (root, expirationTime) {
      try {
        var didError = (root.current.effectTag & DidCapture) === DidCapture;
        if (enableProfilerTimer) {
          var currentTime = requestCurrentTime();
          var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime);
          hook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);
        } else {
          hook.onCommitFiberRoot(rendererID, root, undefined, didError);
        }
      } catch (err) {
        if ( true && !hasLoggedError) {
          hasLoggedError = true;
          warningWithoutStack$1(false, 'React DevTools encountered an error: %s', err);
        }
      }
    };
    onCommitFiberUnmount = function (fiber) {
      try {
        hook.onCommitFiberUnmount(rendererID, fiber);
      } catch (err) {
        if ( true && !hasLoggedError) {
          hasLoggedError = true;
          warningWithoutStack$1(false, 'React DevTools encountered an error: %s', err);
        }
      }
    };
  } catch (err) {
    // Catch all errors because it is unsafe to throw during initialization.
    {
      warningWithoutStack$1(false, 'React DevTools encountered an error: %s.', err);
    }
  }
  // DevTools exists
  return true;
}

function onCommitRoot(root, expirationTime) {
  if (typeof onCommitFiberRoot === 'function') {
    onCommitFiberRoot(root, expirationTime);
  }
}

function onCommitUnmount(fiber) {
  if (typeof onCommitFiberUnmount === 'function') {
    onCommitFiberUnmount(fiber);
  }
}

var hasBadMapPolyfill = void 0;

{
  hasBadMapPolyfill = false;
  try {
    var nonExtensibleObject = Object.preventExtensions({});
    var testMap = new Map([[nonExtensibleObject, null]]);
    var testSet = new Set([nonExtensibleObject]);
    // This is necessary for Rollup to not consider these unused.
    // https://github.com/rollup/rollup/issues/1771
    // TODO: we can remove these if Rollup fixes the bug.
    testMap.set(0, 0);
    testSet.add(0);
  } catch (e) {
    // TODO: Consider warning about bad polyfills
    hasBadMapPolyfill = true;
  }
}

// A Fiber is work on a Component that needs to be done or was done. There can
// be more than one per component.


var debugCounter = void 0;

{
  debugCounter = 1;
}

function FiberNode(tag, pendingProps, key, mode) {
  // Instance
  this.tag = tag;
  this.key = key;
  this.elementType = null;
  this.type = null;
  this.stateNode = null;

  // Fiber
  this.return = null;
  this.child = null;
  this.sibling = null;
  this.index = 0;

  this.ref = null;

  this.pendingProps = pendingProps;
  this.memoizedProps = null;
  this.updateQueue = null;
  this.memoizedState = null;
  this.dependencies = null;

  this.mode = mode;

  // Effects
  this.effectTag = NoEffect;
  this.nextEffect = null;

  this.firstEffect = null;
  this.lastEffect = null;

  this.expirationTime = NoWork;
  this.childExpirationTime = NoWork;

  this.alternate = null;

  if (enableProfilerTimer) {
    // Note: The following is done to avoid a v8 performance cliff.
    //
    // Initializing the fields below to smis and later updating them with
    // double values will cause Fibers to end up having separate shapes.
    // This behavior/bug has something to do with Object.preventExtension().
    // Fortunately this only impacts DEV builds.
    // Unfortunately it makes React unusably slow for some applications.
    // To work around this, initialize the fields below with doubles.
    //
    // Learn more about this here:
    // https://github.com/facebook/react/issues/14365
    // https://bugs.chromium.org/p/v8/issues/detail?id=8538
    this.actualDuration = Number.NaN;
    this.actualStartTime = Number.NaN;
    this.selfBaseDuration = Number.NaN;
    this.treeBaseDuration = Number.NaN;

    // It's okay to replace the initial doubles with smis after initialization.
    // This won't trigger the performance cliff mentioned above,
    // and it simplifies other profiler code (including DevTools).
    this.actualDuration = 0;
    this.actualStartTime = -1;
    this.selfBaseDuration = 0;
    this.treeBaseDuration = 0;
  }

  {
    this._debugID = debugCounter++;
    this._debugSource = null;
    this._debugOwner = null;
    this._debugIsCurrentlyTiming = false;
    this._debugNeedsRemount = false;
    this._debugHookTypes = null;
    if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {
      Object.preventExtensions(this);
    }
  }
}

// This is a constructor function, rather than a POJO constructor, still
// please ensure we do the following:
// 1) Nobody should add any instance methods on this. Instance methods can be
//    more difficult to predict when they get optimized and they are almost
//    never inlined properly in static compilers.
// 2) Nobody should rely on `instanceof Fiber` for type testing. We should
//    always know when it is a fiber.
// 3) We might want to experiment with using numeric keys since they are easier
//    to optimize in a non-JIT environment.
// 4) We can easily go from a constructor to a createFiber object literal if that
//    is faster.
// 5) It should be easy to port this to a C struct and keep a C implementation
//    compatible.
var createFiber = function (tag, pendingProps, key, mode) {
  // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors
  return new FiberNode(tag, pendingProps, key, mode);
};

function shouldConstruct(Component) {
  var prototype = Component.prototype;
  return !!(prototype && prototype.isReactComponent);
}

function isSimpleFunctionComponent(type) {
  return typeof type === 'function' && !shouldConstruct(type) && type.defaultProps === undefined;
}

function resolveLazyComponentTag(Component) {
  if (typeof Component === 'function') {
    return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
  } else if (Component !== undefined && Component !== null) {
    var $$typeof = Component.$$typeof;
    if ($$typeof === REACT_FORWARD_REF_TYPE) {
      return ForwardRef;
    }
    if ($$typeof === REACT_MEMO_TYPE) {
      return MemoComponent;
    }
  }
  return IndeterminateComponent;
}

// This is used to create an alternate fiber to do work on.
function createWorkInProgress(current, pendingProps, expirationTime) {
  var workInProgress = current.alternate;
  if (workInProgress === null) {
    // We use a double buffering pooling technique because we know that we'll
    // only ever need at most two versions of a tree. We pool the "other" unused
    // node that we're free to reuse. This is lazily created to avoid allocating
    // extra objects for things that are never updated. It also allow us to
    // reclaim the extra memory if needed.
    workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);
    workInProgress.elementType = current.elementType;
    workInProgress.type = current.type;
    workInProgress.stateNode = current.stateNode;

    {
      // DEV-only fields
      workInProgress._debugID = current._debugID;
      workInProgress._debugSource = current._debugSource;
      workInProgress._debugOwner = current._debugOwner;
      workInProgress._debugHookTypes = current._debugHookTypes;
    }

    workInProgress.alternate = current;
    current.alternate = workInProgress;
  } else {
    workInProgress.pendingProps = pendingProps;

    // We already have an alternate.
    // Reset the effect tag.
    workInProgress.effectTag = NoEffect;

    // The effect list is no longer valid.
    workInProgress.nextEffect = null;
    workInProgress.firstEffect = null;
    workInProgress.lastEffect = null;

    if (enableProfilerTimer) {
      // We intentionally reset, rather than copy, actualDuration & actualStartTime.
      // This prevents time from endlessly accumulating in new commits.
      // This has the downside of resetting values for different priority renders,
      // But works for yielding (the common case) and should support resuming.
      workInProgress.actualDuration = 0;
      workInProgress.actualStartTime = -1;
    }
  }

  workInProgress.childExpirationTime = current.childExpirationTime;
  workInProgress.expirationTime = current.expirationTime;

  workInProgress.child = current.child;
  workInProgress.memoizedProps = current.memoizedProps;
  workInProgress.memoizedState = current.memoizedState;
  workInProgress.updateQueue = current.updateQueue;

  // Clone the dependencies object. This is mutated during the render phase, so
  // it cannot be shared with the current fiber.
  var currentDependencies = current.dependencies;
  workInProgress.dependencies = currentDependencies === null ? null : {
    expirationTime: currentDependencies.expirationTime,
    firstContext: currentDependencies.firstContext,
    responders: currentDependencies.responders
  };

  // These will be overridden during the parent's reconciliation
  workInProgress.sibling = current.sibling;
  workInProgress.index = current.index;
  workInProgress.ref = current.ref;

  if (enableProfilerTimer) {
    workInProgress.selfBaseDuration = current.selfBaseDuration;
    workInProgress.treeBaseDuration = current.treeBaseDuration;
  }

  {
    workInProgress._debugNeedsRemount = current._debugNeedsRemount;
    switch (workInProgress.tag) {
      case IndeterminateComponent:
      case FunctionComponent:
      case SimpleMemoComponent:
        workInProgress.type = resolveFunctionForHotReloading(current.type);
        break;
      case ClassComponent:
        workInProgress.type = resolveClassForHotReloading(current.type);
        break;
      case ForwardRef:
        workInProgress.type = resolveForwardRefForHotReloading(current.type);
        break;
      default:
        break;
    }
  }

  return workInProgress;
}

// Used to reuse a Fiber for a second pass.
function resetWorkInProgress(workInProgress, renderExpirationTime) {
  // This resets the Fiber to what createFiber or createWorkInProgress would
  // have set the values to before during the first pass. Ideally this wouldn't
  // be necessary but unfortunately many code paths reads from the workInProgress
  // when they should be reading from current and writing to workInProgress.

  // We assume pendingProps, index, key, ref, return are still untouched to
  // avoid doing another reconciliation.

  // Reset the effect tag but keep any Placement tags, since that's something
  // that child fiber is setting, not the reconciliation.
  workInProgress.effectTag &= Placement;

  // The effect list is no longer valid.
  workInProgress.nextEffect = null;
  workInProgress.firstEffect = null;
  workInProgress.lastEffect = null;

  var current = workInProgress.alternate;
  if (current === null) {
    // Reset to createFiber's initial values.
    workInProgress.childExpirationTime = NoWork;
    workInProgress.expirationTime = renderExpirationTime;

    workInProgress.child = null;
    workInProgress.memoizedProps = null;
    workInProgress.memoizedState = null;
    workInProgress.updateQueue = null;

    workInProgress.dependencies = null;

    if (enableProfilerTimer) {
      // Note: We don't reset the actualTime counts. It's useful to accumulate
      // actual time across multiple render passes.
      workInProgress.selfBaseDuration = 0;
      workInProgress.treeBaseDuration = 0;
    }
  } else {
    // Reset to the cloned values that createWorkInProgress would've.
    workInProgress.childExpirationTime = current.childExpirationTime;
    workInProgress.expirationTime = current.expirationTime;

    workInProgress.child = current.child;
    workInProgress.memoizedProps = current.memoizedProps;
    workInProgress.memoizedState = current.memoizedState;
    workInProgress.updateQueue = current.updateQueue;

    // Clone the dependencies object. This is mutated during the render phase, so
    // it cannot be shared with the current fiber.
    var currentDependencies = current.dependencies;
    workInProgress.dependencies = currentDependencies === null ? null : {
      expirationTime: currentDependencies.expirationTime,
      firstContext: currentDependencies.firstContext,
      responders: currentDependencies.responders
    };

    if (enableProfilerTimer) {
      // Note: We don't reset the actualTime counts. It's useful to accumulate
      // actual time across multiple render passes.
      workInProgress.selfBaseDuration = current.selfBaseDuration;
      workInProgress.treeBaseDuration = current.treeBaseDuration;
    }
  }

  return workInProgress;
}

function createHostRootFiber(tag) {
  var mode = void 0;
  if (tag === ConcurrentRoot) {
    mode = ConcurrentMode | BatchedMode | StrictMode;
  } else if (tag === BatchedRoot) {
    mode = BatchedMode | StrictMode;
  } else {
    mode = NoMode;
  }

  if (enableProfilerTimer && isDevToolsPresent) {
    // Always collect profile timings when DevTools are present.
    // This enables DevTools to start capturing timing at any point–
    // Without some nodes in the tree having empty base times.
    mode |= ProfileMode;
  }

  return createFiber(HostRoot, null, null, mode);
}

function createFiberFromTypeAndProps(type, // React$ElementType
key, pendingProps, owner, mode, expirationTime) {
  var fiber = void 0;

  var fiberTag = IndeterminateComponent;
  // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
  var resolvedType = type;
  if (typeof type === 'function') {
    if (shouldConstruct(type)) {
      fiberTag = ClassComponent;
      {
        resolvedType = resolveClassForHotReloading(resolvedType);
      }
    } else {
      {
        resolvedType = resolveFunctionForHotReloading(resolvedType);
      }
    }
  } else if (typeof type === 'string') {
    fiberTag = HostComponent;
  } else {
    getTag: switch (type) {
      case REACT_FRAGMENT_TYPE:
        return createFiberFromFragment(pendingProps.children, mode, expirationTime, key);
      case REACT_CONCURRENT_MODE_TYPE:
        fiberTag = Mode;
        mode |= ConcurrentMode | BatchedMode | StrictMode;
        break;
      case REACT_STRICT_MODE_TYPE:
        fiberTag = Mode;
        mode |= StrictMode;
        break;
      case REACT_PROFILER_TYPE:
        return createFiberFromProfiler(pendingProps, mode, expirationTime, key);
      case REACT_SUSPENSE_TYPE:
        return createFiberFromSuspense(pendingProps, mode, expirationTime, key);
      case REACT_SUSPENSE_LIST_TYPE:
        return createFiberFromSuspenseList(pendingProps, mode, expirationTime, key);
      default:
        {
          if (typeof type === 'object' && type !== null) {
            switch (type.$$typeof) {
              case REACT_PROVIDER_TYPE:
                fiberTag = ContextProvider;
                break getTag;
              case REACT_CONTEXT_TYPE:
                // This is a consumer
                fiberTag = ContextConsumer;
                break getTag;
              case REACT_FORWARD_REF_TYPE:
                fiberTag = ForwardRef;
                {
                  resolvedType = resolveForwardRefForHotReloading(resolvedType);
                }
                break getTag;
              case REACT_MEMO_TYPE:
                fiberTag = MemoComponent;
                break getTag;
              case REACT_LAZY_TYPE:
                fiberTag = LazyComponent;
                resolvedType = null;
                break getTag;
              case REACT_FUNDAMENTAL_TYPE:
                if (enableFundamentalAPI) {
                  return createFiberFromFundamental(type, pendingProps, mode, expirationTime, key);
                }
                break;
            }
          }
          var info = '';
          {
            if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
              info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.';
            }
            var ownerName = owner ? getComponentName(owner.type) : null;
            if (ownerName) {
              info += '\n\nCheck the render method of `' + ownerName + '`.';
            }
          }
          (function () {
            {
              {
                throw ReactError(Error('Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: ' + (type == null ? type : typeof type) + '.' + info));
              }
            }
          })();
        }
    }
  }

  fiber = createFiber(fiberTag, pendingProps, key, mode);
  fiber.elementType = type;
  fiber.type = resolvedType;
  fiber.expirationTime = expirationTime;

  return fiber;
}

function createFiberFromElement(element, mode, expirationTime) {
  var owner = null;
  {
    owner = element._owner;
  }
  var type = element.type;
  var key = element.key;
  var pendingProps = element.props;
  var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, expirationTime);
  {
    fiber._debugSource = element._source;
    fiber._debugOwner = element._owner;
  }
  return fiber;
}

function createFiberFromFragment(elements, mode, expirationTime, key) {
  var fiber = createFiber(Fragment, elements, key, mode);
  fiber.expirationTime = expirationTime;
  return fiber;
}

function createFiberFromFundamental(fundamentalComponent, pendingProps, mode, expirationTime, key) {
  var fiber = createFiber(FundamentalComponent, pendingProps, key, mode);
  fiber.elementType = fundamentalComponent;
  fiber.type = fundamentalComponent;
  fiber.expirationTime = expirationTime;
  return fiber;
}

function createFiberFromProfiler(pendingProps, mode, expirationTime, key) {
  {
    if (typeof pendingProps.id !== 'string' || typeof pendingProps.onRender !== 'function') {
      warningWithoutStack$1(false, 'Profiler must specify an "id" string and "onRender" function as props');
    }
  }

  var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode);
  // TODO: The Profiler fiber shouldn't have a type. It has a tag.
  fiber.elementType = REACT_PROFILER_TYPE;
  fiber.type = REACT_PROFILER_TYPE;
  fiber.expirationTime = expirationTime;

  return fiber;
}

function createFiberFromSuspense(pendingProps, mode, expirationTime, key) {
  var fiber = createFiber(SuspenseComponent, pendingProps, key, mode);

  // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag.
  // This needs to be fixed in getComponentName so that it relies on the tag
  // instead.
  fiber.type = REACT_SUSPENSE_TYPE;
  fiber.elementType = REACT_SUSPENSE_TYPE;

  fiber.expirationTime = expirationTime;
  return fiber;
}

function createFiberFromSuspenseList(pendingProps, mode, expirationTime, key) {
  var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);
  {
    // TODO: The SuspenseListComponent fiber shouldn't have a type. It has a tag.
    // This needs to be fixed in getComponentName so that it relies on the tag
    // instead.
    fiber.type = REACT_SUSPENSE_LIST_TYPE;
  }
  fiber.elementType = REACT_SUSPENSE_LIST_TYPE;
  fiber.expirationTime = expirationTime;
  return fiber;
}

function createFiberFromText(content, mode, expirationTime) {
  var fiber = createFiber(HostText, content, null, mode);
  fiber.expirationTime = expirationTime;
  return fiber;
}

function createFiberFromHostInstanceForDeletion() {
  var fiber = createFiber(HostComponent, null, null, NoMode);
  // TODO: These should not need a type.
  fiber.elementType = 'DELETED';
  fiber.type = 'DELETED';
  return fiber;
}

function createFiberFromPortal(portal, mode, expirationTime) {
  var pendingProps = portal.children !== null ? portal.children : [];
  var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);
  fiber.expirationTime = expirationTime;
  fiber.stateNode = {
    containerInfo: portal.containerInfo,
    pendingChildren: null, // Used by persistent updates
    implementation: portal.implementation
  };
  return fiber;
}

// Used for stashing WIP properties to replay failed work in DEV.
function assignFiberPropertiesInDEV(target, source) {
  if (target === null) {
    // This Fiber's initial properties will always be overwritten.
    // We only use a Fiber to ensure the same hidden class so DEV isn't slow.
    target = createFiber(IndeterminateComponent, null, null, NoMode);
  }

  // This is intentionally written as a list of all properties.
  // We tried to use Object.assign() instead but this is called in
  // the hottest path, and Object.assign() was too slow:
  // https://github.com/facebook/react/issues/12502
  // This code is DEV-only so size is not a concern.

  target.tag = source.tag;
  target.key = source.key;
  target.elementType = source.elementType;
  target.type = source.type;
  target.stateNode = source.stateNode;
  target.return = source.return;
  target.child = source.child;
  target.sibling = source.sibling;
  target.index = source.index;
  target.ref = source.ref;
  target.pendingProps = source.pendingProps;
  target.memoizedProps = source.memoizedProps;
  target.updateQueue = source.updateQueue;
  target.memoizedState = source.memoizedState;
  target.dependencies = source.dependencies;
  target.mode = source.mode;
  target.effectTag = source.effectTag;
  target.nextEffect = source.nextEffect;
  target.firstEffect = source.firstEffect;
  target.lastEffect = source.lastEffect;
  target.expirationTime = source.expirationTime;
  target.childExpirationTime = source.childExpirationTime;
  target.alternate = source.alternate;
  if (enableProfilerTimer) {
    target.actualDuration = source.actualDuration;
    target.actualStartTime = source.actualStartTime;
    target.selfBaseDuration = source.selfBaseDuration;
    target.treeBaseDuration = source.treeBaseDuration;
  }
  target._debugID = source._debugID;
  target._debugSource = source._debugSource;
  target._debugOwner = source._debugOwner;
  target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;
  target._debugNeedsRemount = source._debugNeedsRemount;
  target._debugHookTypes = source._debugHookTypes;
  return target;
}

// TODO: This should be lifted into the renderer.


// The following attributes are only used by interaction tracing builds.
// They enable interactions to be associated with their async work,
// And expose interaction metadata to the React DevTools Profiler plugin.
// Note that these attributes are only defined when the enableSchedulerTracing flag is enabled.


// Exported FiberRoot type includes all properties,
// To avoid requiring potentially error-prone :any casts throughout the project.
// Profiling properties are only safe to access in profiling builds (when enableSchedulerTracing is true).
// The types are defined separately within this file to ensure they stay in sync.
// (We don't have to use an inline :any cast when enableSchedulerTracing is disabled.)


function FiberRootNode(containerInfo, tag, hydrate) {
  this.tag = tag;
  this.current = null;
  this.containerInfo = containerInfo;
  this.pendingChildren = null;
  this.pingCache = null;
  this.finishedExpirationTime = NoWork;
  this.finishedWork = null;
  this.timeoutHandle = noTimeout;
  this.context = null;
  this.pendingContext = null;
  this.hydrate = hydrate;
  this.firstBatch = null;
  this.callbackNode = null;
  this.callbackExpirationTime = NoWork;
  this.firstPendingTime = NoWork;
  this.lastPendingTime = NoWork;
  this.pingTime = NoWork;

  if (enableSchedulerTracing) {
    this.interactionThreadID = tracing.unstable_getThreadID();
    this.memoizedInteractions = new Set();
    this.pendingInteractionMap = new Map();
  }
}

function createFiberRoot(containerInfo, tag, hydrate) {
  var root = new FiberRootNode(containerInfo, tag, hydrate);

  // Cyclic construction. This cheats the type system right now because
  // stateNode is any.
  var uninitializedFiber = createHostRootFiber(tag);
  root.current = uninitializedFiber;
  uninitializedFiber.stateNode = root;

  return root;
}

// This lets us hook into Fiber to debug what it's doing.
// See https://github.com/facebook/react/pull/8033.
// This is not part of the public API, not even for React DevTools.
// You may only inject a debugTool if you work on React Fiber itself.
var ReactFiberInstrumentation = {
  debugTool: null
};

var ReactFiberInstrumentation_1 = ReactFiberInstrumentation;

// 0 is PROD, 1 is DEV.
// Might add PROFILE later.


var didWarnAboutNestedUpdates = void 0;
var didWarnAboutFindNodeInStrictMode = void 0;

{
  didWarnAboutNestedUpdates = false;
  didWarnAboutFindNodeInStrictMode = {};
}

function getContextForSubtree(parentComponent) {
  if (!parentComponent) {
    return emptyContextObject;
  }

  var fiber = get(parentComponent);
  var parentContext = findCurrentUnmaskedContext(fiber);

  if (fiber.tag === ClassComponent) {
    var Component = fiber.type;
    if (isContextProvider(Component)) {
      return processChildContext(fiber, Component, parentContext);
    }
  }

  return parentContext;
}

function scheduleRootUpdate(current$$1, element, expirationTime, suspenseConfig, callback) {
  {
    if (phase === 'render' && current !== null && !didWarnAboutNestedUpdates) {
      didWarnAboutNestedUpdates = true;
      warningWithoutStack$1(false, 'Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown');
    }
  }

  var update = createUpdate(expirationTime, suspenseConfig);
  // Caution: React DevTools currently depends on this property
  // being called "element".
  update.payload = { element: element };

  callback = callback === undefined ? null : callback;
  if (callback !== null) {
    !(typeof callback === 'function') ? warningWithoutStack$1(false, 'render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback) : void 0;
    update.callback = callback;
  }

  if (revertPassiveEffectsChange) {
    flushPassiveEffects();
  }
  enqueueUpdate(current$$1, update);
  scheduleWork(current$$1, expirationTime);

  return expirationTime;
}

function updateContainerAtExpirationTime(element, container, parentComponent, expirationTime, suspenseConfig, callback) {
  // TODO: If this is a nested container, this won't be the root.
  var current$$1 = container.current;

  {
    if (ReactFiberInstrumentation_1.debugTool) {
      if (current$$1.alternate === null) {
        ReactFiberInstrumentation_1.debugTool.onMountContainer(container);
      } else if (element === null) {
        ReactFiberInstrumentation_1.debugTool.onUnmountContainer(container);
      } else {
        ReactFiberInstrumentation_1.debugTool.onUpdateContainer(container);
      }
    }
  }

  var context = getContextForSubtree(parentComponent);
  if (container.context === null) {
    container.context = context;
  } else {
    container.pendingContext = context;
  }

  return scheduleRootUpdate(current$$1, element, expirationTime, suspenseConfig, callback);
}

function findHostInstance(component) {
  var fiber = get(component);
  if (fiber === undefined) {
    if (typeof component.render === 'function') {
      (function () {
        {
          {
            throw ReactError(Error('Unable to find node on an unmounted component.'));
          }
        }
      })();
    } else {
      (function () {
        {
          {
            throw ReactError(Error('Argument appears to not be a ReactComponent. Keys: ' + Object.keys(component)));
          }
        }
      })();
    }
  }
  var hostFiber = findCurrentHostFiber(fiber);
  if (hostFiber === null) {
    return null;
  }
  return hostFiber.stateNode;
}

function findHostInstanceWithWarning(component, methodName) {
  {
    var fiber = get(component);
    if (fiber === undefined) {
      if (typeof component.render === 'function') {
        (function () {
          {
            {
              throw ReactError(Error('Unable to find node on an unmounted component.'));
            }
          }
        })();
      } else {
        (function () {
          {
            {
              throw ReactError(Error('Argument appears to not be a ReactComponent. Keys: ' + Object.keys(component)));
            }
          }
        })();
      }
    }
    var hostFiber = findCurrentHostFiber(fiber);
    if (hostFiber === null) {
      return null;
    }
    if (hostFiber.mode & StrictMode) {
      var componentName = getComponentName(fiber.type) || 'Component';
      if (!didWarnAboutFindNodeInStrictMode[componentName]) {
        didWarnAboutFindNodeInStrictMode[componentName] = true;
        if (fiber.mode & StrictMode) {
          warningWithoutStack$1(false, '%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference.' + '\n%s' + '\n\nLearn more about using refs safely here:' + '\nhttps://fb.me/react-strict-mode-find-node', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));
        } else {
          warningWithoutStack$1(false, '%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference.' + '\n%s' + '\n\nLearn more about using refs safely here:' + '\nhttps://fb.me/react-strict-mode-find-node', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));
        }
      }
    }
    return hostFiber.stateNode;
  }
  return findHostInstance(component);
}

function createContainer(containerInfo, tag, hydrate) {
  return createFiberRoot(containerInfo, tag, hydrate);
}

function updateContainer(element, container, parentComponent, callback) {
  var current$$1 = container.current;
  var currentTime = requestCurrentTime();
  {
    // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
    if ('undefined' !== typeof jest) {
      warnIfUnmockedScheduler(current$$1);
      warnIfNotScopedWithMatchingAct(current$$1);
    }
  }
  var suspenseConfig = requestCurrentSuspenseConfig();
  var expirationTime = computeExpirationForFiber(currentTime, current$$1, suspenseConfig);
  return updateContainerAtExpirationTime(element, container, parentComponent, expirationTime, suspenseConfig, callback);
}

function getPublicRootInstance(container) {
  var containerFiber = container.current;
  if (!containerFiber.child) {
    return null;
  }
  switch (containerFiber.child.tag) {
    case HostComponent:
      return getPublicInstance(containerFiber.child.stateNode);
    default:
      return containerFiber.child.stateNode;
  }
}

function findHostInstanceWithNoPortals(fiber) {
  var hostFiber = findCurrentHostFiberWithNoPortals(fiber);
  if (hostFiber === null) {
    return null;
  }
  if (hostFiber.tag === FundamentalComponent) {
    return hostFiber.stateNode.instance;
  }
  return hostFiber.stateNode;
}

var shouldSuspendImpl = function (fiber) {
  return false;
};

function shouldSuspend(fiber) {
  return shouldSuspendImpl(fiber);
}

var overrideHookState = null;
var overrideProps = null;
var scheduleUpdate = null;
var setSuspenseHandler = null;

{
  var copyWithSetImpl = function (obj, path, idx, value) {
    if (idx >= path.length) {
      return value;
    }
    var key = path[idx];
    var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);
    // $FlowFixMe number or string is fine here
    updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value);
    return updated;
  };

  var copyWithSet = function (obj, path, value) {
    return copyWithSetImpl(obj, path, 0, value);
  };

  // Support DevTools editable values for useState and useReducer.
  overrideHookState = function (fiber, id, path, value) {
    // For now, the "id" of stateful hooks is just the stateful hook index.
    // This may change in the future with e.g. nested hooks.
    var currentHook = fiber.memoizedState;
    while (currentHook !== null && id > 0) {
      currentHook = currentHook.next;
      id--;
    }
    if (currentHook !== null) {
      if (revertPassiveEffectsChange) {
        flushPassiveEffects();
      }

      var newState = copyWithSet(currentHook.memoizedState, path, value);
      currentHook.memoizedState = newState;
      currentHook.baseState = newState;

      // We aren't actually adding an update to the queue,
      // because there is no update we can add for useReducer hooks that won't trigger an error.
      // (There's no appropriate action type for DevTools overrides.)
      // As a result though, React will see the scheduled update as a noop and bailout.
      // Shallow cloning props works as a workaround for now to bypass the bailout check.
      fiber.memoizedProps = _assign({}, fiber.memoizedProps);

      scheduleWork(fiber, Sync);
    }
  };

  // Support DevTools props for function components, forwardRef, memo, host components, etc.
  overrideProps = function (fiber, path, value) {
    if (revertPassiveEffectsChange) {
      flushPassiveEffects();
    }
    fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);
    if (fiber.alternate) {
      fiber.alternate.pendingProps = fiber.pendingProps;
    }
    scheduleWork(fiber, Sync);
  };

  scheduleUpdate = function (fiber) {
    if (revertPassiveEffectsChange) {
      flushPassiveEffects();
    }
    scheduleWork(fiber, Sync);
  };

  setSuspenseHandler = function (newShouldSuspendImpl) {
    shouldSuspendImpl = newShouldSuspendImpl;
  };
}

function injectIntoDevTools(devToolsConfig) {
  var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
  var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;


  return injectInternals(_assign({}, devToolsConfig, {
    overrideHookState: overrideHookState,
    overrideProps: overrideProps,
    setSuspenseHandler: setSuspenseHandler,
    scheduleUpdate: scheduleUpdate,
    currentDispatcherRef: ReactCurrentDispatcher,
    findHostInstanceByFiber: function (fiber) {
      var hostFiber = findCurrentHostFiber(fiber);
      if (hostFiber === null) {
        return null;
      }
      return hostFiber.stateNode;
    },
    findFiberByHostInstance: function (instance) {
      if (!findFiberByHostInstance) {
        // Might not be implemented by the renderer.
        return null;
      }
      return findFiberByHostInstance(instance);
    },

    // React Refresh
    findHostInstancesForRefresh: findHostInstancesForRefresh,
    scheduleRefresh: scheduleRefresh,
    scheduleRoot: scheduleRoot,
    setRefreshHandler: setRefreshHandler,
    // Enables DevTools to append owner stacks to error messages in DEV mode.
    getCurrentFiber: function () {
      return current;
    }
  }));
}

// This file intentionally does *not* have the Flow annotation.
// Don't add it. See `./inline-typed.js` for an explanation.

function createPortal$1(children, containerInfo,
// TODO: figure out the API for cross-renderer implementation.
implementation) {
  var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;

  return {
    // This tag allow us to uniquely identify this as a React Portal
    $$typeof: REACT_PORTAL_TYPE,
    key: key == null ? null : '' + key,
    children: children,
    containerInfo: containerInfo,
    implementation: implementation
  };
}

// TODO: this is special because it gets imported during build.

var ReactVersion = '16.9.0';

// TODO: This type is shared between the reconciler and ReactDOM, but will
// eventually be lifted out to the renderer.

var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;

var topLevelUpdateWarnings = void 0;
var warnOnInvalidCallback = void 0;
var didWarnAboutUnstableCreatePortal = false;

{
  if (typeof Map !== 'function' ||
  // $FlowIssue Flow incorrectly thinks Map has no prototype
  Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' ||
  // $FlowIssue Flow incorrectly thinks Set has no prototype
  Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {
    warningWithoutStack$1(false, 'React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
  }

  topLevelUpdateWarnings = function (container) {
    if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {
      var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer._internalRoot.current);
      if (hostInstance) {
        !(hostInstance.parentNode === container) ? warningWithoutStack$1(false, 'render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.') : void 0;
      }
    }

    var isRootRenderedBySomeReact = !!container._reactRootContainer;
    var rootEl = getReactRootElementInContainer(container);
    var hasNonRootReactChild = !!(rootEl && getInstanceFromNode$1(rootEl));

    !(!hasNonRootReactChild || isRootRenderedBySomeReact) ? warningWithoutStack$1(false, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0;

    !(container.nodeType !== ELEMENT_NODE || !container.tagName || container.tagName.toUpperCase() !== 'BODY') ? warningWithoutStack$1(false, 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0;
  };

  warnOnInvalidCallback = function (callback, callerName) {
    !(callback === null || typeof callback === 'function') ? warningWithoutStack$1(false, '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback) : void 0;
  };
}

setRestoreImplementation(restoreControlledState$1);

function ReactBatch(root) {
  var expirationTime = computeUniqueAsyncExpiration();
  this._expirationTime = expirationTime;
  this._root = root;
  this._next = null;
  this._callbacks = null;
  this._didComplete = false;
  this._hasChildren = false;
  this._children = null;
  this._defer = true;
}
ReactBatch.prototype.render = function (children) {
  var _this = this;

  (function () {
    if (!_this._defer) {
      {
        throw ReactError(Error('batch.render: Cannot render a batch that already committed.'));
      }
    }
  })();
  this._hasChildren = true;
  this._children = children;
  var internalRoot = this._root._internalRoot;
  var expirationTime = this._expirationTime;
  var work = new ReactWork();
  updateContainerAtExpirationTime(children, internalRoot, null, expirationTime, null, work._onCommit);
  return work;
};
ReactBatch.prototype.then = function (onComplete) {
  if (this._didComplete) {
    onComplete();
    return;
  }
  var callbacks = this._callbacks;
  if (callbacks === null) {
    callbacks = this._callbacks = [];
  }
  callbacks.push(onComplete);
};
ReactBatch.prototype.commit = function () {
  var _this2 = this;

  var internalRoot = this._root._internalRoot;
  var firstBatch = internalRoot.firstBatch;
  (function () {
    if (!(_this2._defer && firstBatch !== null)) {
      {
        throw ReactError(Error('batch.commit: Cannot commit a batch multiple times.'));
      }
    }
  })();

  if (!this._hasChildren) {
    // This batch is empty. Return.
    this._next = null;
    this._defer = false;
    return;
  }

  var expirationTime = this._expirationTime;

  // Ensure this is the first batch in the list.
  if (firstBatch !== this) {
    // This batch is not the earliest batch. We need to move it to the front.
    // Update its expiration time to be the expiration time of the earliest
    // batch, so that we can flush it without flushing the other batches.
    if (this._hasChildren) {
      expirationTime = this._expirationTime = firstBatch._expirationTime;
      // Rendering this batch again ensures its children will be the final state
      // when we flush (updates are processed in insertion order: last
      // update wins).
      // TODO: This forces a restart. Should we print a warning?
      this.render(this._children);
    }

    // Remove the batch from the list.
    var previous = null;
    var batch = firstBatch;
    while (batch !== this) {
      previous = batch;
      batch = batch._next;
    }
    (function () {
      if (!(previous !== null)) {
        {
          throw ReactError(Error('batch.commit: Cannot commit a batch multiple times.'));
        }
      }
    })();
    previous._next = batch._next;

    // Add it to the front.
    this._next = firstBatch;
    firstBatch = internalRoot.firstBatch = this;
  }

  // Synchronously flush all the work up to this batch's expiration time.
  this._defer = false;
  flushRoot(internalRoot, expirationTime);

  // Pop the batch from the list.
  var next = this._next;
  this._next = null;
  firstBatch = internalRoot.firstBatch = next;

  // Append the next earliest batch's children to the update queue.
  if (firstBatch !== null && firstBatch._hasChildren) {
    firstBatch.render(firstBatch._children);
  }
};
ReactBatch.prototype._onComplete = function () {
  if (this._didComplete) {
    return;
  }
  this._didComplete = true;
  var callbacks = this._callbacks;
  if (callbacks === null) {
    return;
  }
  // TODO: Error handling.
  for (var i = 0; i < callbacks.length; i++) {
    var _callback = callbacks[i];
    _callback();
  }
};

function ReactWork() {
  this._callbacks = null;
  this._didCommit = false;
  // TODO: Avoid need to bind by replacing callbacks in the update queue with
  // list of Work objects.
  this._onCommit = this._onCommit.bind(this);
}
ReactWork.prototype.then = function (onCommit) {
  if (this._didCommit) {
    onCommit();
    return;
  }
  var callbacks = this._callbacks;
  if (callbacks === null) {
    callbacks = this._callbacks = [];
  }
  callbacks.push(onCommit);
};
ReactWork.prototype._onCommit = function () {
  if (this._didCommit) {
    return;
  }
  this._didCommit = true;
  var callbacks = this._callbacks;
  if (callbacks === null) {
    return;
  }
  // TODO: Error handling.
  for (var i = 0; i < callbacks.length; i++) {
    var _callback2 = callbacks[i];
    (function () {
      if (!(typeof _callback2 === 'function')) {
        {
          throw ReactError(Error('Invalid argument passed as callback. Expected a function. Instead received: ' + _callback2));
        }
      }
    })();
    _callback2();
  }
};

function ReactSyncRoot(container, tag, hydrate) {
  // Tag is either LegacyRoot or Concurrent Root
  var root = createContainer(container, tag, hydrate);
  this._internalRoot = root;
}

function ReactRoot(container, hydrate) {
  var root = createContainer(container, ConcurrentRoot, hydrate);
  this._internalRoot = root;
}

ReactRoot.prototype.render = ReactSyncRoot.prototype.render = function (children, callback) {
  var root = this._internalRoot;
  var work = new ReactWork();
  callback = callback === undefined ? null : callback;
  {
    warnOnInvalidCallback(callback, 'render');
  }
  if (callback !== null) {
    work.then(callback);
  }
  updateContainer(children, root, null, work._onCommit);
  return work;
};

ReactRoot.prototype.unmount = ReactSyncRoot.prototype.unmount = function (callback) {
  var root = this._internalRoot;
  var work = new ReactWork();
  callback = callback === undefined ? null : callback;
  {
    warnOnInvalidCallback(callback, 'render');
  }
  if (callback !== null) {
    work.then(callback);
  }
  updateContainer(null, root, null, work._onCommit);
  return work;
};

// Sync roots cannot create batches. Only concurrent ones.
ReactRoot.prototype.createBatch = function () {
  var batch = new ReactBatch(this);
  var expirationTime = batch._expirationTime;

  var internalRoot = this._internalRoot;
  var firstBatch = internalRoot.firstBatch;
  if (firstBatch === null) {
    internalRoot.firstBatch = batch;
    batch._next = null;
  } else {
    // Insert sorted by expiration time then insertion order
    var insertAfter = null;
    var insertBefore = firstBatch;
    while (insertBefore !== null && insertBefore._expirationTime >= expirationTime) {
      insertAfter = insertBefore;
      insertBefore = insertBefore._next;
    }
    batch._next = insertBefore;
    if (insertAfter !== null) {
      insertAfter._next = batch;
    }
  }

  return batch;
};

/**
 * True if the supplied DOM node is a valid node element.
 *
 * @param {?DOMElement} node The candidate DOM node.
 * @return {boolean} True if the DOM is a valid DOM node.
 * @internal
 */
function isValidContainer(node) {
  return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));
}

function getReactRootElementInContainer(container) {
  if (!container) {
    return null;
  }

  if (container.nodeType === DOCUMENT_NODE) {
    return container.documentElement;
  } else {
    return container.firstChild;
  }
}

function shouldHydrateDueToLegacyHeuristic(container) {
  var rootElement = getReactRootElementInContainer(container);
  return !!(rootElement && rootElement.nodeType === ELEMENT_NODE && rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME));
}

setBatchingImplementation(batchedUpdates$1, discreteUpdates$1, flushDiscreteUpdates, batchedEventUpdates$1);

var warnedAboutHydrateAPI = false;

function legacyCreateRootFromDOMContainer(container, forceHydrate) {
  var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container);
  // First clear any existing content.
  if (!shouldHydrate) {
    var warned = false;
    var rootSibling = void 0;
    while (rootSibling = container.lastChild) {
      {
        if (!warned && rootSibling.nodeType === ELEMENT_NODE && rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME)) {
          warned = true;
          warningWithoutStack$1(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.');
        }
      }
      container.removeChild(rootSibling);
    }
  }
  {
    if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) {
      warnedAboutHydrateAPI = true;
      lowPriorityWarning$1(false, 'render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + 'will stop working in React v17. Replace the ReactDOM.render() call ' + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.');
    }
  }

  // Legacy roots are not batched.
  return new ReactSyncRoot(container, LegacyRoot, shouldHydrate);
}

function legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {
  {
    topLevelUpdateWarnings(container);
    warnOnInvalidCallback(callback === undefined ? null : callback, 'render');
  }

  // TODO: Without `any` type, Flow says "Property cannot be accessed on any
  // member of intersection type." Whyyyyyy.
  var root = container._reactRootContainer;
  var fiberRoot = void 0;
  if (!root) {
    // Initial mount
    root = container._reactRootContainer = legacyCreateRootFromDOMContainer(container, forceHydrate);
    fiberRoot = root._internalRoot;
    if (typeof callback === 'function') {
      var originalCallback = callback;
      callback = function () {
        var instance = getPublicRootInstance(fiberRoot);
        originalCallback.call(instance);
      };
    }
    // Initial mount should not be batched.
    unbatchedUpdates(function () {
      updateContainer(children, fiberRoot, parentComponent, callback);
    });
  } else {
    fiberRoot = root._internalRoot;
    if (typeof callback === 'function') {
      var _originalCallback = callback;
      callback = function () {
        var instance = getPublicRootInstance(fiberRoot);
        _originalCallback.call(instance);
      };
    }
    // Update
    updateContainer(children, fiberRoot, parentComponent, callback);
  }
  return getPublicRootInstance(fiberRoot);
}

function createPortal$$1(children, container) {
  var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;

  (function () {
    if (!isValidContainer(container)) {
      {
        throw ReactError(Error('Target container is not a DOM element.'));
      }
    }
  })();
  // TODO: pass ReactDOM portal implementation as third argument
  return createPortal$1(children, container, null, key);
}

var ReactDOM = {
  createPortal: createPortal$$1,

  findDOMNode: function (componentOrElement) {
    {
      var owner = ReactCurrentOwner.current;
      if (owner !== null && owner.stateNode !== null) {
        var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;
        !warnedAboutRefsInRender ? warningWithoutStack$1(false, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(owner.type) || 'A component') : void 0;
        owner.stateNode._warnedAboutRefsInRender = true;
      }
    }
    if (componentOrElement == null) {
      return null;
    }
    if (componentOrElement.nodeType === ELEMENT_NODE) {
      return componentOrElement;
    }
    {
      return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');
    }
    return findHostInstance(componentOrElement);
  },
  hydrate: function (element, container, callback) {
    (function () {
      if (!isValidContainer(container)) {
        {
          throw ReactError(Error('Target container is not a DOM element.'));
        }
      }
    })();
    {
      !!container._reactHasBeenPassedToCreateRootDEV ? warningWithoutStack$1(false, 'You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOM.%s(). This is not supported. ' + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?', enableStableConcurrentModeAPIs ? 'createRoot' : 'unstable_createRoot') : void 0;
    }
    // TODO: throw or warn if we couldn't hydrate?
    return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);
  },
  render: function (element, container, callback) {
    (function () {
      if (!isValidContainer(container)) {
        {
          throw ReactError(Error('Target container is not a DOM element.'));
        }
      }
    })();
    {
      !!container._reactHasBeenPassedToCreateRootDEV ? warningWithoutStack$1(false, 'You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOM.%s(). This is not supported. ' + 'Did you mean to call root.render(element)?', enableStableConcurrentModeAPIs ? 'createRoot' : 'unstable_createRoot') : void 0;
    }
    return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);
  },
  unstable_renderSubtreeIntoContainer: function (parentComponent, element, containerNode, callback) {
    (function () {
      if (!isValidContainer(containerNode)) {
        {
          throw ReactError(Error('Target container is not a DOM element.'));
        }
      }
    })();
    (function () {
      if (!(parentComponent != null && has(parentComponent))) {
        {
          throw ReactError(Error('parentComponent must be a valid React Component'));
        }
      }
    })();
    return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);
  },
  unmountComponentAtNode: function (container) {
    (function () {
      if (!isValidContainer(container)) {
        {
          throw ReactError(Error('unmountComponentAtNode(...): Target container is not a DOM element.'));
        }
      }
    })();

    {
      !!container._reactHasBeenPassedToCreateRootDEV ? warningWithoutStack$1(false, 'You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOM.%s(). This is not supported. Did you mean to call root.unmount()?', enableStableConcurrentModeAPIs ? 'createRoot' : 'unstable_createRoot') : void 0;
    }

    if (container._reactRootContainer) {
      {
        var rootEl = getReactRootElementInContainer(container);
        var renderedByDifferentReact = rootEl && !getInstanceFromNode$1(rootEl);
        !!renderedByDifferentReact ? warningWithoutStack$1(false, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.') : void 0;
      }

      // Unmount should not be batched.
      unbatchedUpdates(function () {
        legacyRenderSubtreeIntoContainer(null, null, container, false, function () {
          container._reactRootContainer = null;
        });
      });
      // If you call unmountComponentAtNode twice in quick succession, you'll
      // get `true` twice. That's probably fine?
      return true;
    } else {
      {
        var _rootEl = getReactRootElementInContainer(container);
        var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode$1(_rootEl));

        // Check if the container itself is a React root node.
        var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;

        !!hasNonRootReactChild ? warningWithoutStack$1(false, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0;
      }

      return false;
    }
  },


  // Temporary alias since we already shipped React 16 RC with it.
  // TODO: remove in React 17.
  unstable_createPortal: function () {
    if (!didWarnAboutUnstableCreatePortal) {
      didWarnAboutUnstableCreatePortal = true;
      lowPriorityWarning$1(false, 'The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the "unstable_" prefix.');
    }
    return createPortal$$1.apply(undefined, arguments);
  },


  unstable_batchedUpdates: batchedUpdates$1,

  // TODO remove this legacy method, unstable_discreteUpdates replaces it
  unstable_interactiveUpdates: function (fn, a, b, c) {
    flushDiscreteUpdates();
    return discreteUpdates$1(fn, a, b, c);
  },

  unstable_discreteUpdates: discreteUpdates$1,
  unstable_flushDiscreteUpdates: flushDiscreteUpdates,

  flushSync: flushSync,

  unstable_createRoot: createRoot,
  unstable_createSyncRoot: createSyncRoot,
  unstable_flushControlled: flushControlled,

  __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
    // Keep in sync with ReactDOMUnstableNativeDependencies.js
    // ReactTestUtils.js, and ReactTestUtilsAct.js. This is an array for better minification.
    Events: [getInstanceFromNode$1, getNodeFromInstance$1, getFiberCurrentPropsFromNode$1, injection.injectEventPluginsByName, eventNameDispatchConfigs, accumulateTwoPhaseDispatches, accumulateDirectDispatches, enqueueStateRestore, restoreStateIfNeeded, dispatchEvent, runEventsInBatch, flushPassiveEffects, IsThisRendererActing]
  }
};

function createRoot(container, options) {
  var functionName = enableStableConcurrentModeAPIs ? 'createRoot' : 'unstable_createRoot';
  (function () {
    if (!isValidContainer(container)) {
      {
        throw ReactError(Error(functionName + '(...): Target container is not a DOM element.'));
      }
    }
  })();
  warnIfReactDOMContainerInDEV(container);
  var hydrate = options != null && options.hydrate === true;
  return new ReactRoot(container, hydrate);
}

function createSyncRoot(container, options) {
  var functionName = enableStableConcurrentModeAPIs ? 'createRoot' : 'unstable_createRoot';
  (function () {
    if (!isValidContainer(container)) {
      {
        throw ReactError(Error(functionName + '(...): Target container is not a DOM element.'));
      }
    }
  })();
  warnIfReactDOMContainerInDEV(container);
  var hydrate = options != null && options.hydrate === true;
  return new ReactSyncRoot(container, BatchedRoot, hydrate);
}

function warnIfReactDOMContainerInDEV(container) {
  {
    !!container._reactRootContainer ? warningWithoutStack$1(false, 'You are calling ReactDOM.%s() on a container that was previously ' + 'passed to ReactDOM.render(). This is not supported.', enableStableConcurrentModeAPIs ? 'createRoot' : 'unstable_createRoot') : void 0;
    container._reactHasBeenPassedToCreateRootDEV = true;
  }
}

if (enableStableConcurrentModeAPIs) {
  ReactDOM.createRoot = createRoot;
  ReactDOM.createSyncRoot = createSyncRoot;
}

var foundDevTools = injectIntoDevTools({
  findFiberByHostInstance: getClosestInstanceFromNode,
  bundleType: 1,
  version: ReactVersion,
  rendererPackageName: 'react-dom'
});

{
  if (!foundDevTools && canUseDOM && window.top === window.self) {
    // If we're in Chrome or Firefox, provide a download link if not installed.
    if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
      var protocol = window.location.protocol;
      // Don't warn in exotic cases like chrome-extension://.
      if (/^(https?|file):$/.test(protocol)) {
        console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://fb.me/react-devtools' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + 'https://fb.me/react-devtools-faq' : ''), 'font-weight:bold');
      }
    }
  }
}



var ReactDOM$2 = Object.freeze({
	default: ReactDOM
});

var ReactDOM$3 = ( ReactDOM$2 && ReactDOM ) || ReactDOM$2;

// TODO: decide on the top-level export form.
// This is hacky but makes it work with both Rollup and Jest.
var reactDom = ReactDOM$3.default || ReactDOM$3;

module.exports = reactDom;
  })();
}


/***/ }),

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

"use strict";


function checkDCE() {
  /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
  if (
    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
  ) {
    return;
  }
  if (true) {
    // This branch is unreachable because this function is only called
    // in production, but the condition is true only in development.
    // Therefore if the branch is still here, dead code elimination wasn't
    // properly applied.
    // Don't change the message. React DevTools relies on it. Also make sure
    // this message doesn't occur elsewhere in this function, or it will cause
    // a false positive.
    throw new Error('^_^');
  }
  try {
    // Verify that the code above has been dead code eliminated (DCE'd).
    __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
  } catch (err) {
    // DevTools shouldn't crash React, no matter what.
    // We should still report in case we break this code.
    console.error(err);
  }
}

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


/***/ }),

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

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





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

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

// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:


// In some cases, StrictMode should also double-render lifecycles.
// This can be confusing for tests though,
// And it can be bad for performance in production.
// This feature flag can be used to control the behavior:


// To preserve the "Pause on caught exceptions" behavior of the debugger, we
// replay the begin phase of a failed component inside invokeGuardedCallback.


// Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:


// Gather advanced timing metrics for Profiler subtrees.


// Trace which interactions trigger each commit.
var enableSchedulerTracing = true;

// Only used in www builds.
 // TODO: true? Here it might just be false.

// Only used in www builds.


// Only used in www builds.


// Disable javascript: URL strings in href for XSS protection.


// React Fire: prevent the value and checked attributes from syncing
// with their related DOM properties


// These APIs will no longer be "unstable" in the upcoming 16.7 release,
// Control this behavior with a flag to support 16.6 minor releases in the meanwhile.




// See https://github.com/react-native-community/discussions-and-proposals/issues/72 for more information
// This is a flag so we can fix warnings in RN core before turning it on


// Experimental React Flare event system and event components support.


// Experimental Host Component support.


// New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107


// We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?)
// Till then, we warn about the missing mock, but still fallback to a sync mode compatible version

// Temporary flag to revert the fix in #15650


// For tests, we flush suspense fallbacks in an act scope;
// *except* in some of our own tests, where we test incremental loading states.


// Changes priority of some events like mousemove to user-blocking priority,
// but without making them discrete. The flag exists in case it causes
// starvation problems.


// Add a callback property to suspense to notify which promises are currently
// in the update queue. This allows reporting and tracing of what is causing
// the user to see a loading state.


// Part of the simplification of React.createElement so we can eventually move
// from React.createElement to React.jsx
// https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md

var DEFAULT_THREAD_ID = 0;

// Counters used to generate unique IDs.
var interactionIDCounter = 0;
var threadIDCounter = 0;

// Set of currently traced interactions.
// Interactions "stack"–
// Meaning that newly traced interactions are appended to the previously active set.
// When an interaction goes out of scope, the previous set (if any) is restored.
exports.__interactionsRef = null;

// Listener(s) to notify when interactions begin and end.
exports.__subscriberRef = null;

if (enableSchedulerTracing) {
  exports.__interactionsRef = {
    current: new Set()
  };
  exports.__subscriberRef = {
    current: null
  };
}

function unstable_clear(callback) {
  if (!enableSchedulerTracing) {
    return callback();
  }

  var prevInteractions = exports.__interactionsRef.current;
  exports.__interactionsRef.current = new Set();

  try {
    return callback();
  } finally {
    exports.__interactionsRef.current = prevInteractions;
  }
}

function unstable_getCurrent() {
  if (!enableSchedulerTracing) {
    return null;
  } else {
    return exports.__interactionsRef.current;
  }
}

function unstable_getThreadID() {
  return ++threadIDCounter;
}

function unstable_trace(name, timestamp, callback) {
  var threadID = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID;

  if (!enableSchedulerTracing) {
    return callback();
  }

  var interaction = {
    __count: 1,
    id: interactionIDCounter++,
    name: name,
    timestamp: timestamp
  };

  var prevInteractions = exports.__interactionsRef.current;

  // Traced interactions should stack/accumulate.
  // To do that, clone the current interactions.
  // The previous set will be restored upon completion.
  var interactions = new Set(prevInteractions);
  interactions.add(interaction);
  exports.__interactionsRef.current = interactions;

  var subscriber = exports.__subscriberRef.current;
  var returnValue = void 0;

  try {
    if (subscriber !== null) {
      subscriber.onInteractionTraced(interaction);
    }
  } finally {
    try {
      if (subscriber !== null) {
        subscriber.onWorkStarted(interactions, threadID);
      }
    } finally {
      try {
        returnValue = callback();
      } finally {
        exports.__interactionsRef.current = prevInteractions;

        try {
          if (subscriber !== null) {
            subscriber.onWorkStopped(interactions, threadID);
          }
        } finally {
          interaction.__count--;

          // If no async work was scheduled for this interaction,
          // Notify subscribers that it's completed.
          if (subscriber !== null && interaction.__count === 0) {
            subscriber.onInteractionScheduledWorkCompleted(interaction);
          }
        }
      }
    }
  }

  return returnValue;
}

function unstable_wrap(callback) {
  var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID;

  if (!enableSchedulerTracing) {
    return callback;
  }

  var wrappedInteractions = exports.__interactionsRef.current;

  var subscriber = exports.__subscriberRef.current;
  if (subscriber !== null) {
    subscriber.onWorkScheduled(wrappedInteractions, threadID);
  }

  // Update the pending async work count for the current interactions.
  // Update after calling subscribers in case of error.
  wrappedInteractions.forEach(function (interaction) {
    interaction.__count++;
  });

  var hasRun = false;

  function wrapped() {
    var prevInteractions = exports.__interactionsRef.current;
    exports.__interactionsRef.current = wrappedInteractions;

    subscriber = exports.__subscriberRef.current;

    try {
      var returnValue = void 0;

      try {
        if (subscriber !== null) {
          subscriber.onWorkStarted(wrappedInteractions, threadID);
        }
      } finally {
        try {
          returnValue = callback.apply(undefined, arguments);
        } finally {
          exports.__interactionsRef.current = prevInteractions;

          if (subscriber !== null) {
            subscriber.onWorkStopped(wrappedInteractions, threadID);
          }
        }
      }

      return returnValue;
    } finally {
      if (!hasRun) {
        // We only expect a wrapped function to be executed once,
        // But in the event that it's executed more than once–
        // Only decrement the outstanding interaction counts once.
        hasRun = true;

        // Update pending async counts for all wrapped interactions.
        // If this was the last scheduled async work for any of them,
        // Mark them as completed.
        wrappedInteractions.forEach(function (interaction) {
          interaction.__count--;

          if (subscriber !== null && interaction.__count === 0) {
            subscriber.onInteractionScheduledWorkCompleted(interaction);
          }
        });
      }
    }
  }

  wrapped.cancel = function cancel() {
    subscriber = exports.__subscriberRef.current;

    try {
      if (subscriber !== null) {
        subscriber.onWorkCanceled(wrappedInteractions, threadID);
      }
    } finally {
      // Update pending async counts for all wrapped interactions.
      // If this was the last scheduled async work for any of them,
      // Mark them as completed.
      wrappedInteractions.forEach(function (interaction) {
        interaction.__count--;

        if (subscriber && interaction.__count === 0) {
          subscriber.onInteractionScheduledWorkCompleted(interaction);
        }
      });
    }
  };

  return wrapped;
}

var subscribers = null;
if (enableSchedulerTracing) {
  subscribers = new Set();
}

function unstable_subscribe(subscriber) {
  if (enableSchedulerTracing) {
    subscribers.add(subscriber);

    if (subscribers.size === 1) {
      exports.__subscriberRef.current = {
        onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted,
        onInteractionTraced: onInteractionTraced,
        onWorkCanceled: onWorkCanceled,
        onWorkScheduled: onWorkScheduled,
        onWorkStarted: onWorkStarted,
        onWorkStopped: onWorkStopped
      };
    }
  }
}

function unstable_unsubscribe(subscriber) {
  if (enableSchedulerTracing) {
    subscribers.delete(subscriber);

    if (subscribers.size === 0) {
      exports.__subscriberRef.current = null;
    }
  }
}

function onInteractionTraced(interaction) {
  var didCatchError = false;
  var caughtError = null;

  subscribers.forEach(function (subscriber) {
    try {
      subscriber.onInteractionTraced(interaction);
    } catch (error) {
      if (!didCatchError) {
        didCatchError = true;
        caughtError = error;
      }
    }
  });

  if (didCatchError) {
    throw caughtError;
  }
}

function onInteractionScheduledWorkCompleted(interaction) {
  var didCatchError = false;
  var caughtError = null;

  subscribers.forEach(function (subscriber) {
    try {
      subscriber.onInteractionScheduledWorkCompleted(interaction);
    } catch (error) {
      if (!didCatchError) {
        didCatchError = true;
        caughtError = error;
      }
    }
  });

  if (didCatchError) {
    throw caughtError;
  }
}

function onWorkScheduled(interactions, threadID) {
  var didCatchError = false;
  var caughtError = null;

  subscribers.forEach(function (subscriber) {
    try {
      subscriber.onWorkScheduled(interactions, threadID);
    } catch (error) {
      if (!didCatchError) {
        didCatchError = true;
        caughtError = error;
      }
    }
  });

  if (didCatchError) {
    throw caughtError;
  }
}

function onWorkStarted(interactions, threadID) {
  var didCatchError = false;
  var caughtError = null;

  subscribers.forEach(function (subscriber) {
    try {
      subscriber.onWorkStarted(interactions, threadID);
    } catch (error) {
      if (!didCatchError) {
        didCatchError = true;
        caughtError = error;
      }
    }
  });

  if (didCatchError) {
    throw caughtError;
  }
}

function onWorkStopped(interactions, threadID) {
  var didCatchError = false;
  var caughtError = null;

  subscribers.forEach(function (subscriber) {
    try {
      subscriber.onWorkStopped(interactions, threadID);
    } catch (error) {
      if (!didCatchError) {
        didCatchError = true;
        caughtError = error;
      }
    }
  });

  if (didCatchError) {
    throw caughtError;
  }
}

function onWorkCanceled(interactions, threadID) {
  var didCatchError = false;
  var caughtError = null;

  subscribers.forEach(function (subscriber) {
    try {
      subscriber.onWorkCanceled(interactions, threadID);
    } catch (error) {
      if (!didCatchError) {
        didCatchError = true;
        caughtError = error;
      }
    }
  });

  if (didCatchError) {
    throw caughtError;
  }
}

exports.unstable_clear = unstable_clear;
exports.unstable_getCurrent = unstable_getCurrent;
exports.unstable_getThreadID = unstable_getThreadID;
exports.unstable_trace = unstable_trace;
exports.unstable_wrap = unstable_wrap;
exports.unstable_subscribe = unstable_subscribe;
exports.unstable_unsubscribe = unstable_unsubscribe;
  })();
}


/***/ }),

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

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





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

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

var enableSchedulerDebugging = false;
var enableIsInputPending = false;
var requestIdleCallbackBeforeFirstFrame = false;
var requestTimerEventBeforeFirstFrame = false;
var enableMessageLoopImplementation = false;

// The DOM Scheduler implementation is similar to requestIdleCallback. It
// works by scheduling a requestAnimationFrame, storing the time for the start
// of the frame, then scheduling a postMessage which gets scheduled after paint.
// Within the postMessage handler do as much work as possible until time + frame
// rate. By separating the idle call into a separate event tick we ensure that
// layout, paint and other browser work is counted against the available time.
// The frame rate is dynamically adjusted.

var requestHostCallback = void 0;

var requestHostTimeout = void 0;
var cancelHostTimeout = void 0;
var shouldYieldToHost = void 0;
var requestPaint = void 0;
exports.unstable_now = void 0;
exports.unstable_forceFrameRate = void 0;

if (
// If Scheduler runs in a non-DOM environment, it falls back to a naive
// implementation using setTimeout.
typeof window === 'undefined' ||
// Check if MessageChannel is supported, too.
typeof MessageChannel !== 'function') {
  // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore,
  // fallback to a naive implementation.
  var _callback = null;
  var _timeoutID = null;
  var _flushCallback = function () {
    if (_callback !== null) {
      try {
        var currentTime = exports.unstable_now();
        var hasRemainingTime = true;
        _callback(hasRemainingTime, currentTime);
        _callback = null;
      } catch (e) {
        setTimeout(_flushCallback, 0);
        throw e;
      }
    }
  };
  exports.unstable_now = function () {
    return Date.now();
  };
  requestHostCallback = function (cb) {
    if (_callback !== null) {
      // Protect against re-entrancy.
      setTimeout(requestHostCallback, 0, cb);
    } else {
      _callback = cb;
      setTimeout(_flushCallback, 0);
    }
  };
  requestHostTimeout = function (cb, ms) {
    _timeoutID = setTimeout(cb, ms);
  };
  cancelHostTimeout = function () {
    clearTimeout(_timeoutID);
  };
  shouldYieldToHost = function () {
    return false;
  };
  requestPaint = exports.unstable_forceFrameRate = function () {};
} else {
  // Capture local references to native APIs, in case a polyfill overrides them.
  var performance = window.performance;
  var _Date = window.Date;
  var _setTimeout = window.setTimeout;
  var _clearTimeout = window.clearTimeout;
  var requestAnimationFrame = window.requestAnimationFrame;
  var cancelAnimationFrame = window.cancelAnimationFrame;
  var requestIdleCallback = window.requestIdleCallback;

  if (typeof console !== 'undefined') {
    // TODO: Remove fb.me link
    if (typeof requestAnimationFrame !== 'function') {
      console.error("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
    }
    if (typeof cancelAnimationFrame !== 'function') {
      console.error("This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
    }
  }

  var requestIdleCallbackBeforeFirstFrame$1 = requestIdleCallbackBeforeFirstFrame && typeof requestIdleCallback === 'function' && typeof cancelIdleCallback === 'function';

  exports.unstable_now = typeof performance === 'object' && typeof performance.now === 'function' ? function () {
    return performance.now();
  } : function () {
    return _Date.now();
  };

  var isRAFLoopRunning = false;
  var isMessageLoopRunning = false;
  var scheduledHostCallback = null;
  var rAFTimeoutID = -1;
  var taskTimeoutID = -1;

  var frameLength = enableMessageLoopImplementation ? // We won't attempt to align with the vsync. Instead we'll yield multiple
  // times per frame, often enough to keep it responsive even at really
  // high frame rates > 120.
  5 : // Use a heuristic to measure the frame rate and yield at the end of the
  // frame. We start out assuming that we run at 30fps but then the
  // heuristic tracking will adjust this value to a faster fps if we get
  // more frequent animation frames.
  33.33;

  var prevRAFTime = -1;
  var prevRAFInterval = -1;
  var frameDeadline = 0;

  var fpsLocked = false;

  // TODO: Make this configurable
  // TODO: Adjust this based on priority?
  var maxFrameLength = 300;
  var needsPaint = false;

  if (enableIsInputPending && navigator !== undefined && navigator.scheduling !== undefined && navigator.scheduling.isInputPending !== undefined) {
    var scheduling = navigator.scheduling;
    shouldYieldToHost = function () {
      var currentTime = exports.unstable_now();
      if (currentTime >= frameDeadline) {
        // There's no time left in the frame. We may want to yield control of
        // the main thread, so the browser can perform high priority tasks. The
        // main ones are painting and user input. If there's a pending paint or
        // a pending input, then we should yield. But if there's neither, then
        // we can yield less often while remaining responsive. We'll eventually
        // yield regardless, since there could be a pending paint that wasn't
        // accompanied by a call to `requestPaint`, or other main thread tasks
        // like network events.
        if (needsPaint || scheduling.isInputPending()) {
          // There is either a pending paint or a pending input.
          return true;
        }
        // There's no pending input. Only yield if we've reached the max
        // frame length.
        return currentTime >= frameDeadline + maxFrameLength;
      } else {
        // There's still time left in the frame.
        return false;
      }
    };

    requestPaint = function () {
      needsPaint = true;
    };
  } else {
    // `isInputPending` is not available. Since we have no way of knowing if
    // there's pending input, always yield at the end of the frame.
    shouldYieldToHost = function () {
      return exports.unstable_now() >= frameDeadline;
    };

    // Since we yield every frame regardless, `requestPaint` has no effect.
    requestPaint = function () {};
  }

  exports.unstable_forceFrameRate = function (fps) {
    if (fps < 0 || fps > 125) {
      console.error('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing framerates higher than 125 fps is not unsupported');
      return;
    }
    if (fps > 0) {
      frameLength = Math.floor(1000 / fps);
      fpsLocked = true;
    } else {
      // reset the framerate
      frameLength = 33.33;
      fpsLocked = false;
    }
  };

  var performWorkUntilDeadline = function () {
    if (enableMessageLoopImplementation) {
      if (scheduledHostCallback !== null) {
        var currentTime = exports.unstable_now();
        // Yield after `frameLength` ms, regardless of where we are in the vsync
        // cycle. This means there's always time remaining at the beginning of
        // the message event.
        frameDeadline = currentTime + frameLength;
        var hasTimeRemaining = true;
        try {
          var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
          if (!hasMoreWork) {
            isMessageLoopRunning = false;
            scheduledHostCallback = null;
          } else {
            // If there's more work, schedule the next message event at the end
            // of the preceding one.
            port.postMessage(null);
          }
        } catch (error) {
          // If a scheduler task throws, exit the current browser task so the
          // error can be observed.
          port.postMessage(null);
          throw error;
        }
      }
      // Yielding to the browser will give it a chance to paint, so we can
      // reset this.
      needsPaint = false;
    } else {
      if (scheduledHostCallback !== null) {
        var _currentTime = exports.unstable_now();
        var _hasTimeRemaining = frameDeadline - _currentTime > 0;
        try {
          var _hasMoreWork = scheduledHostCallback(_hasTimeRemaining, _currentTime);
          if (!_hasMoreWork) {
            scheduledHostCallback = null;
          }
        } catch (error) {
          // If a scheduler task throws, exit the current browser task so the
          // error can be observed, and post a new task as soon as possible
          // so we can continue where we left off.
          port.postMessage(null);
          throw error;
        }
      }
      // Yielding to the browser will give it a chance to paint, so we can
      // reset this.
      needsPaint = false;
    }
  };

  var channel = new MessageChannel();
  var port = channel.port2;
  channel.port1.onmessage = performWorkUntilDeadline;

  var onAnimationFrame = function (rAFTime) {
    if (scheduledHostCallback === null) {
      // No scheduled work. Exit.
      prevRAFTime = -1;
      prevRAFInterval = -1;
      isRAFLoopRunning = false;
      return;
    }

    // Eagerly schedule the next animation callback at the beginning of the
    // frame. If the scheduler queue is not empty at the end of the frame, it
    // will continue flushing inside that callback. If the queue *is* empty,
    // then it will exit immediately. Posting the callback at the start of the
    // frame ensures it's fired within the earliest possible frame. If we
    // waited until the end of the frame to post the callback, we risk the
    // browser skipping a frame and not firing the callback until the frame
    // after that.
    isRAFLoopRunning = true;
    requestAnimationFrame(function (nextRAFTime) {
      _clearTimeout(rAFTimeoutID);
      onAnimationFrame(nextRAFTime);
    });

    // requestAnimationFrame is throttled when the tab is backgrounded. We
    // don't want to stop working entirely. So we'll fallback to a timeout loop.
    // TODO: Need a better heuristic for backgrounded work.
    var onTimeout = function () {
      frameDeadline = exports.unstable_now() + frameLength / 2;
      performWorkUntilDeadline();
      rAFTimeoutID = _setTimeout(onTimeout, frameLength * 3);
    };
    rAFTimeoutID = _setTimeout(onTimeout, frameLength * 3);

    if (prevRAFTime !== -1 &&
    // Make sure this rAF time is different from the previous one. This check
    // could fail if two rAFs fire in the same frame.
    rAFTime - prevRAFTime > 0.1) {
      var rAFInterval = rAFTime - prevRAFTime;
      if (!fpsLocked && prevRAFInterval !== -1) {
        // We've observed two consecutive frame intervals. We'll use this to
        // dynamically adjust the frame rate.
        //
        // If one frame goes long, then the next one can be short to catch up.
        // If two frames are short in a row, then that's an indication that we
        // actually have a higher frame rate than what we're currently
        // optimizing. For example, if we're running on 120hz display or 90hz VR
        // display. Take the max of the two in case one of them was an anomaly
        // due to missed frame deadlines.
        if (rAFInterval < frameLength && prevRAFInterval < frameLength) {
          frameLength = rAFInterval < prevRAFInterval ? prevRAFInterval : rAFInterval;
          if (frameLength < 8.33) {
            // Defensive coding. We don't support higher frame rates than 120hz.
            // If the calculated frame length gets lower than 8, it is probably
            // a bug.
            frameLength = 8.33;
          }
        }
      }
      prevRAFInterval = rAFInterval;
    }
    prevRAFTime = rAFTime;
    frameDeadline = rAFTime + frameLength;

    // We use the postMessage trick to defer idle work until after the repaint.
    port.postMessage(null);
  };

  requestHostCallback = function (callback) {
    scheduledHostCallback = callback;
    if (enableMessageLoopImplementation) {
      if (!isMessageLoopRunning) {
        isMessageLoopRunning = true;
        port.postMessage(null);
      }
    } else {
      if (!isRAFLoopRunning) {
        // Start a rAF loop.
        isRAFLoopRunning = true;
        requestAnimationFrame(function (rAFTime) {
          if (requestIdleCallbackBeforeFirstFrame$1) {
            cancelIdleCallback(idleCallbackID);
          }
          if (requestTimerEventBeforeFirstFrame) {
            _clearTimeout(idleTimeoutID);
          }
          onAnimationFrame(rAFTime);
        });

        // If we just missed the last vsync, the next rAF might not happen for
        // another frame. To claim as much idle time as possible, post a
        // callback with `requestIdleCallback`, which should fire if there's
        // idle time left in the frame.
        //
        // This should only be an issue for the first rAF in the loop;
        // subsequent rAFs are scheduled at the beginning of the
        // preceding frame.
        var idleCallbackID = void 0;
        if (requestIdleCallbackBeforeFirstFrame$1) {
          idleCallbackID = requestIdleCallback(function onIdleCallbackBeforeFirstFrame() {
            if (requestTimerEventBeforeFirstFrame) {
              _clearTimeout(idleTimeoutID);
            }
            frameDeadline = exports.unstable_now() + frameLength;
            performWorkUntilDeadline();
          });
        }
        // Alternate strategy to address the same problem. Scheduler a timer
        // with no delay. If this fires before the rAF, that likely indicates
        // that there's idle time before the next vsync. This isn't always the
        // case, but we'll be aggressive and assume it is, as a trade off to
        // prevent idle periods.
        var idleTimeoutID = void 0;
        if (requestTimerEventBeforeFirstFrame) {
          idleTimeoutID = _setTimeout(function onTimerEventBeforeFirstFrame() {
            if (requestIdleCallbackBeforeFirstFrame$1) {
              cancelIdleCallback(idleCallbackID);
            }
            frameDeadline = exports.unstable_now() + frameLength;
            performWorkUntilDeadline();
          }, 0);
        }
      }
    }
  };

  requestHostTimeout = function (callback, ms) {
    taskTimeoutID = _setTimeout(function () {
      callback(exports.unstable_now());
    }, ms);
  };

  cancelHostTimeout = function () {
    _clearTimeout(taskTimeoutID);
    taskTimeoutID = -1;
  };
}

/* eslint-disable no-var */

// TODO: Use symbols?
var ImmediatePriority = 1;
var UserBlockingPriority = 2;
var NormalPriority = 3;
var LowPriority = 4;
var IdlePriority = 5;

// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
// Math.pow(2, 30) - 1
// 0b111111111111111111111111111111
var maxSigned31BitInt = 1073741823;

// Times out immediately
var IMMEDIATE_PRIORITY_TIMEOUT = -1;
// Eventually times out
var USER_BLOCKING_PRIORITY = 250;
var NORMAL_PRIORITY_TIMEOUT = 5000;
var LOW_PRIORITY_TIMEOUT = 10000;
// Never times out
var IDLE_PRIORITY = maxSigned31BitInt;

// Tasks are stored as a circular, doubly linked list.
var firstTask = null;
var firstDelayedTask = null;

// Pausing the scheduler is useful for debugging.
var isSchedulerPaused = false;

var currentTask = null;
var currentPriorityLevel = NormalPriority;

// This is set while performing work, to prevent re-entrancy.
var isPerformingWork = false;

var isHostCallbackScheduled = false;
var isHostTimeoutScheduled = false;

function scheduler_flushTaskAtPriority_Immediate(callback, didTimeout) {
  return callback(didTimeout);
}
function scheduler_flushTaskAtPriority_UserBlocking(callback, didTimeout) {
  return callback(didTimeout);
}
function scheduler_flushTaskAtPriority_Normal(callback, didTimeout) {
  return callback(didTimeout);
}
function scheduler_flushTaskAtPriority_Low(callback, didTimeout) {
  return callback(didTimeout);
}
function scheduler_flushTaskAtPriority_Idle(callback, didTimeout) {
  return callback(didTimeout);
}

function flushTask(task, currentTime) {
  // Remove the task from the list before calling the callback. That way the
  // list is in a consistent state even if the callback throws.
  var next = task.next;
  if (next === task) {
    // This is the only scheduled task. Clear the list.
    firstTask = null;
  } else {
    // Remove the task from its position in the list.
    if (task === firstTask) {
      firstTask = next;
    }
    var previous = task.previous;
    previous.next = next;
    next.previous = previous;
  }
  task.next = task.previous = null;

  // Now it's safe to execute the task.
  var callback = task.callback;
  var previousPriorityLevel = currentPriorityLevel;
  var previousTask = currentTask;
  currentPriorityLevel = task.priorityLevel;
  currentTask = task;
  var continuationCallback;
  try {
    var didUserCallbackTimeout = task.expirationTime <= currentTime;
    // Add an extra function to the callstack. Profiling tools can use this
    // to infer the priority of work that appears higher in the stack.
    switch (currentPriorityLevel) {
      case ImmediatePriority:
        continuationCallback = scheduler_flushTaskAtPriority_Immediate(callback, didUserCallbackTimeout);
        break;
      case UserBlockingPriority:
        continuationCallback = scheduler_flushTaskAtPriority_UserBlocking(callback, didUserCallbackTimeout);
        break;
      case NormalPriority:
        continuationCallback = scheduler_flushTaskAtPriority_Normal(callback, didUserCallbackTimeout);
        break;
      case LowPriority:
        continuationCallback = scheduler_flushTaskAtPriority_Low(callback, didUserCallbackTimeout);
        break;
      case IdlePriority:
        continuationCallback = scheduler_flushTaskAtPriority_Idle(callback, didUserCallbackTimeout);
        break;
    }
  } catch (error) {
    throw error;
  } finally {
    currentPriorityLevel = previousPriorityLevel;
    currentTask = previousTask;
  }

  // A callback may return a continuation. The continuation should be scheduled
  // with the same priority and expiration as the just-finished callback.
  if (typeof continuationCallback === 'function') {
    var expirationTime = task.expirationTime;
    var continuationTask = task;
    continuationTask.callback = continuationCallback;

    // Insert the new callback into the list, sorted by its timeout. This is
    // almost the same as the code in `scheduleCallback`, except the callback
    // is inserted into the list *before* callbacks of equal timeout instead
    // of after.
    if (firstTask === null) {
      // This is the first callback in the list.
      firstTask = continuationTask.next = continuationTask.previous = continuationTask;
    } else {
      var nextAfterContinuation = null;
      var t = firstTask;
      do {
        if (expirationTime <= t.expirationTime) {
          // This task times out at or after the continuation. We will insert
          // the continuation *before* this task.
          nextAfterContinuation = t;
          break;
        }
        t = t.next;
      } while (t !== firstTask);
      if (nextAfterContinuation === null) {
        // No equal or lower priority task was found, which means the new task
        // is the lowest priority task in the list.
        nextAfterContinuation = firstTask;
      } else if (nextAfterContinuation === firstTask) {
        // The new task is the highest priority task in the list.
        firstTask = continuationTask;
      }

      var _previous = nextAfterContinuation.previous;
      _previous.next = nextAfterContinuation.previous = continuationTask;
      continuationTask.next = nextAfterContinuation;
      continuationTask.previous = _previous;
    }
  }
}

function advanceTimers(currentTime) {
  // Check for tasks that are no longer delayed and add them to the queue.
  if (firstDelayedTask !== null && firstDelayedTask.startTime <= currentTime) {
    do {
      var task = firstDelayedTask;
      var next = task.next;
      if (task === next) {
        firstDelayedTask = null;
      } else {
        firstDelayedTask = next;
        var previous = task.previous;
        previous.next = next;
        next.previous = previous;
      }
      task.next = task.previous = null;
      insertScheduledTask(task, task.expirationTime);
    } while (firstDelayedTask !== null && firstDelayedTask.startTime <= currentTime);
  }
}

function handleTimeout(currentTime) {
  isHostTimeoutScheduled = false;
  advanceTimers(currentTime);

  if (!isHostCallbackScheduled) {
    if (firstTask !== null) {
      isHostCallbackScheduled = true;
      requestHostCallback(flushWork);
    } else if (firstDelayedTask !== null) {
      requestHostTimeout(handleTimeout, firstDelayedTask.startTime - currentTime);
    }
  }
}

function flushWork(hasTimeRemaining, initialTime) {
  // Exit right away if we're currently paused
  if (enableSchedulerDebugging && isSchedulerPaused) {
    return;
  }

  // We'll need a host callback the next time work is scheduled.
  isHostCallbackScheduled = false;
  if (isHostTimeoutScheduled) {
    // We scheduled a timeout but it's no longer needed. Cancel it.
    isHostTimeoutScheduled = false;
    cancelHostTimeout();
  }

  var currentTime = initialTime;
  advanceTimers(currentTime);

  isPerformingWork = true;
  try {
    if (!hasTimeRemaining) {
      // Flush all the expired callbacks without yielding.
      // TODO: Split flushWork into two separate functions instead of using
      // a boolean argument?
      while (firstTask !== null && firstTask.expirationTime <= currentTime && !(enableSchedulerDebugging && isSchedulerPaused)) {
        flushTask(firstTask, currentTime);
        currentTime = exports.unstable_now();
        advanceTimers(currentTime);
      }
    } else {
      // Keep flushing callbacks until we run out of time in the frame.
      if (firstTask !== null) {
        do {
          flushTask(firstTask, currentTime);
          currentTime = exports.unstable_now();
          advanceTimers(currentTime);
        } while (firstTask !== null && !shouldYieldToHost() && !(enableSchedulerDebugging && isSchedulerPaused));
      }
    }
    // Return whether there's additional work
    if (firstTask !== null) {
      return true;
    } else {
      if (firstDelayedTask !== null) {
        requestHostTimeout(handleTimeout, firstDelayedTask.startTime - currentTime);
      }
      return false;
    }
  } finally {
    isPerformingWork = false;
  }
}

function unstable_runWithPriority(priorityLevel, eventHandler) {
  switch (priorityLevel) {
    case ImmediatePriority:
    case UserBlockingPriority:
    case NormalPriority:
    case LowPriority:
    case IdlePriority:
      break;
    default:
      priorityLevel = NormalPriority;
  }

  var previousPriorityLevel = currentPriorityLevel;
  currentPriorityLevel = priorityLevel;

  try {
    return eventHandler();
  } finally {
    currentPriorityLevel = previousPriorityLevel;
  }
}

function unstable_next(eventHandler) {
  var priorityLevel;
  switch (currentPriorityLevel) {
    case ImmediatePriority:
    case UserBlockingPriority:
    case NormalPriority:
      // Shift down to normal priority
      priorityLevel = NormalPriority;
      break;
    default:
      // Anything lower than normal priority should remain at the current level.
      priorityLevel = currentPriorityLevel;
      break;
  }

  var previousPriorityLevel = currentPriorityLevel;
  currentPriorityLevel = priorityLevel;

  try {
    return eventHandler();
  } finally {
    currentPriorityLevel = previousPriorityLevel;
  }
}

function unstable_wrapCallback(callback) {
  var parentPriorityLevel = currentPriorityLevel;
  return function () {
    // This is a fork of runWithPriority, inlined for performance.
    var previousPriorityLevel = currentPriorityLevel;
    currentPriorityLevel = parentPriorityLevel;

    try {
      return callback.apply(this, arguments);
    } finally {
      currentPriorityLevel = previousPriorityLevel;
    }
  };
}

function timeoutForPriorityLevel(priorityLevel) {
  switch (priorityLevel) {
    case ImmediatePriority:
      return IMMEDIATE_PRIORITY_TIMEOUT;
    case UserBlockingPriority:
      return USER_BLOCKING_PRIORITY;
    case IdlePriority:
      return IDLE_PRIORITY;
    case LowPriority:
      return LOW_PRIORITY_TIMEOUT;
    case NormalPriority:
    default:
      return NORMAL_PRIORITY_TIMEOUT;
  }
}

function unstable_scheduleCallback(priorityLevel, callback, options) {
  var currentTime = exports.unstable_now();

  var startTime;
  var timeout;
  if (typeof options === 'object' && options !== null) {
    var delay = options.delay;
    if (typeof delay === 'number' && delay > 0) {
      startTime = currentTime + delay;
    } else {
      startTime = currentTime;
    }
    timeout = typeof options.timeout === 'number' ? options.timeout : timeoutForPriorityLevel(priorityLevel);
  } else {
    timeout = timeoutForPriorityLevel(priorityLevel);
    startTime = currentTime;
  }

  var expirationTime = startTime + timeout;

  var newTask = {
    callback: callback,
    priorityLevel: priorityLevel,
    startTime: startTime,
    expirationTime: expirationTime,
    next: null,
    previous: null
  };

  if (startTime > currentTime) {
    // This is a delayed task.
    insertDelayedTask(newTask, startTime);
    if (firstTask === null && firstDelayedTask === newTask) {
      // All tasks are delayed, and this is the task with the earliest delay.
      if (isHostTimeoutScheduled) {
        // Cancel an existing timeout.
        cancelHostTimeout();
      } else {
        isHostTimeoutScheduled = true;
      }
      // Schedule a timeout.
      requestHostTimeout(handleTimeout, startTime - currentTime);
    }
  } else {
    insertScheduledTask(newTask, expirationTime);
    // Schedule a host callback, if needed. If we're already performing work,
    // wait until the next time we yield.
    if (!isHostCallbackScheduled && !isPerformingWork) {
      isHostCallbackScheduled = true;
      requestHostCallback(flushWork);
    }
  }

  return newTask;
}

function insertScheduledTask(newTask, expirationTime) {
  // Insert the new task into the list, ordered first by its timeout, then by
  // insertion. So the new task is inserted after any other task the
  // same timeout
  if (firstTask === null) {
    // This is the first task in the list.
    firstTask = newTask.next = newTask.previous = newTask;
  } else {
    var next = null;
    var task = firstTask;
    do {
      if (expirationTime < task.expirationTime) {
        // The new task times out before this one.
        next = task;
        break;
      }
      task = task.next;
    } while (task !== firstTask);

    if (next === null) {
      // No task with a later timeout was found, which means the new task has
      // the latest timeout in the list.
      next = firstTask;
    } else if (next === firstTask) {
      // The new task has the earliest expiration in the entire list.
      firstTask = newTask;
    }

    var previous = next.previous;
    previous.next = next.previous = newTask;
    newTask.next = next;
    newTask.previous = previous;
  }
}

function insertDelayedTask(newTask, startTime) {
  // Insert the new task into the list, ordered by its start time.
  if (firstDelayedTask === null) {
    // This is the first task in the list.
    firstDelayedTask = newTask.next = newTask.previous = newTask;
  } else {
    var next = null;
    var task = firstDelayedTask;
    do {
      if (startTime < task.startTime) {
        // The new task times out before this one.
        next = task;
        break;
      }
      task = task.next;
    } while (task !== firstDelayedTask);

    if (next === null) {
      // No task with a later timeout was found, which means the new task has
      // the latest timeout in the list.
      next = firstDelayedTask;
    } else if (next === firstDelayedTask) {
      // The new task has the earliest expiration in the entire list.
      firstDelayedTask = newTask;
    }

    var previous = next.previous;
    previous.next = next.previous = newTask;
    newTask.next = next;
    newTask.previous = previous;
  }
}

function unstable_pauseExecution() {
  isSchedulerPaused = true;
}

function unstable_continueExecution() {
  isSchedulerPaused = false;
  if (!isHostCallbackScheduled && !isPerformingWork) {
    isHostCallbackScheduled = true;
    requestHostCallback(flushWork);
  }
}

function unstable_getFirstCallbackNode() {
  return firstTask;
}

function unstable_cancelCallback(task) {
  var next = task.next;
  if (next === null) {
    // Already cancelled.
    return;
  }

  if (task === next) {
    if (task === firstTask) {
      firstTask = null;
    } else if (task === firstDelayedTask) {
      firstDelayedTask = null;
    }
  } else {
    if (task === firstTask) {
      firstTask = next;
    } else if (task === firstDelayedTask) {
      firstDelayedTask = next;
    }
    var previous = task.previous;
    previous.next = next;
    next.previous = previous;
  }

  task.next = task.previous = null;
}

function unstable_getCurrentPriorityLevel() {
  return currentPriorityLevel;
}

function unstable_shouldYield() {
  var currentTime = exports.unstable_now();
  advanceTimers(currentTime);
  return currentTask !== null && firstTask !== null && firstTask.startTime <= currentTime && firstTask.expirationTime < currentTask.expirationTime || shouldYieldToHost();
}

var unstable_requestPaint = requestPaint;

exports.unstable_ImmediatePriority = ImmediatePriority;
exports.unstable_UserBlockingPriority = UserBlockingPriority;
exports.unstable_NormalPriority = NormalPriority;
exports.unstable_IdlePriority = IdlePriority;
exports.unstable_LowPriority = LowPriority;
exports.unstable_runWithPriority = unstable_runWithPriority;
exports.unstable_next = unstable_next;
exports.unstable_scheduleCallback = unstable_scheduleCallback;
exports.unstable_cancelCallback = unstable_cancelCallback;
exports.unstable_wrapCallback = unstable_wrapCallback;
exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
exports.unstable_shouldYield = unstable_shouldYield;
exports.unstable_requestPaint = unstable_requestPaint;
exports.unstable_continueExecution = unstable_continueExecution;
exports.unstable_pauseExecution = unstable_pauseExecution;
exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;
  })();
}


/***/ }),

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

"use strict";


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


/***/ }),

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

"use strict";


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


/***/ }),

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

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





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

var _assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
var checkPropTypes = __webpack_require__(/*! prop-types/checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");

// TODO: this is special because it gets imported during build.

var ReactVersion = '16.9.0';

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

var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
// TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
// (unstable) APIs that have been removed. Can we remove the symbols?

var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;

var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = '@@iterator';

function getIteratorFn(maybeIterable) {
  if (maybeIterable === null || typeof maybeIterable !== 'object') {
    return null;
  }
  var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
  if (typeof maybeIterator === 'function') {
    return maybeIterator;
  }
  return null;
}

// Do not require this module directly! Use normal `invariant` calls with
// template literal strings. The messages will be converted to ReactError during
// build, and in production they will be minified.

// Do not require this module directly! Use normal `invariant` calls with
// template literal strings. The messages will be converted to ReactError during
// build, and in production they will be minified.

function ReactError(error) {
  error.name = 'Invariant Violation';
  return error;
}

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

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

var lowPriorityWarning = function () {};

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

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

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

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

var lowPriorityWarning$1 = lowPriorityWarning;

/**
 * Similar to invariant but only logs a warning if the condition is not met.
 * This can be used to log issues in development environments in critical
 * paths. Removing the logging code for production environments will keep the
 * same logic and follow the same code paths.
 */

var warningWithoutStack = function () {};

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

    if (format === undefined) {
      throw new Error('`warningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
    }
    if (args.length > 8) {
      // Check before the condition to catch violations early.
      throw new Error('warningWithoutStack() currently supports at most 8 arguments.');
    }
    if (condition) {
      return;
    }
    if (typeof console !== 'undefined') {
      var argsWithFormat = args.map(function (item) {
        return '' + item;
      });
      argsWithFormat.unshift('Warning: ' + format);

      // We intentionally don't use spread (or .apply) directly because it
      // breaks IE9: https://github.com/facebook/react/issues/13610
      Function.prototype.apply.call(console.error, console, argsWithFormat);
    }
    try {
      // --- Welcome to debugging React ---
      // This error was thrown as a convenience so that you can use this stack
      // to find the callsite that caused this warning to fire.
      var argIndex = 0;
      var message = 'Warning: ' + format.replace(/%s/g, function () {
        return args[argIndex++];
      });
      throw new Error(message);
    } catch (x) {}
  };
}

var warningWithoutStack$1 = warningWithoutStack;

var didWarnStateUpdateForUnmountedComponent = {};

function warnNoop(publicInstance, callerName) {
  {
    var _constructor = publicInstance.constructor;
    var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
    var warningKey = componentName + '.' + callerName;
    if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
      return;
    }
    warningWithoutStack$1(false, "Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
    didWarnStateUpdateForUnmountedComponent[warningKey] = true;
  }
}

/**
 * This is the abstract API for an update queue.
 */
var ReactNoopUpdateQueue = {
  /**
   * Checks whether or not this composite component is mounted.
   * @param {ReactClass} publicInstance The instance we want to test.
   * @return {boolean} True if mounted, false otherwise.
   * @protected
   * @final
   */
  isMounted: function (publicInstance) {
    return false;
  },

  /**
   * Forces an update. This should only be invoked when it is known with
   * certainty that we are **not** in a DOM transaction.
   *
   * You may want to call this when you know that some deeper aspect of the
   * component's state has changed but `setState` was not called.
   *
   * This will not invoke `shouldComponentUpdate`, but it will invoke
   * `componentWillUpdate` and `componentDidUpdate`.
   *
   * @param {ReactClass} publicInstance The instance that should rerender.
   * @param {?function} callback Called after component is updated.
   * @param {?string} callerName name of the calling function in the public API.
   * @internal
   */
  enqueueForceUpdate: function (publicInstance, callback, callerName) {
    warnNoop(publicInstance, 'forceUpdate');
  },

  /**
   * Replaces all of the state. Always use this or `setState` to mutate state.
   * You should treat `this.state` as immutable.
   *
   * There is no guarantee that `this.state` will be immediately updated, so
   * accessing `this.state` after calling this method may return the old value.
   *
   * @param {ReactClass} publicInstance The instance that should rerender.
   * @param {object} completeState Next state.
   * @param {?function} callback Called after component is updated.
   * @param {?string} callerName name of the calling function in the public API.
   * @internal
   */
  enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
    warnNoop(publicInstance, 'replaceState');
  },

  /**
   * Sets a subset of the state. This only exists because _pendingState is
   * internal. This provides a merging strategy that is not available to deep
   * properties which is confusing. TODO: Expose pendingState or don't use it
   * during the merge.
   *
   * @param {ReactClass} publicInstance The instance that should rerender.
   * @param {object} partialState Next partial state to be merged with state.
   * @param {?function} callback Called after component is updated.
   * @param {?string} Name of the calling function in the public API.
   * @internal
   */
  enqueueSetState: function (publicInstance, partialState, callback, callerName) {
    warnNoop(publicInstance, 'setState');
  }
};

var emptyObject = {};
{
  Object.freeze(emptyObject);
}

/**
 * Base class helpers for the updating state of a component.
 */
function Component(props, context, updater) {
  this.props = props;
  this.context = context;
  // If a component has string refs, we will assign a different object later.
  this.refs = emptyObject;
  // We initialize the default updater but the real one gets injected by the
  // renderer.
  this.updater = updater || ReactNoopUpdateQueue;
}

Component.prototype.isReactComponent = {};

/**
 * Sets a subset of the state. Always use this to mutate
 * state. You should treat `this.state` as immutable.
 *
 * There is no guarantee that `this.state` will be immediately updated, so
 * accessing `this.state` after calling this method may return the old value.
 *
 * There is no guarantee that calls to `setState` will run synchronously,
 * as they may eventually be batched together.  You can provide an optional
 * callback that will be executed when the call to setState is actually
 * completed.
 *
 * When a function is provided to setState, it will be called at some point in
 * the future (not synchronously). It will be called with the up to date
 * component arguments (state, props, context). These values can be different
 * from this.* because your function may be called after receiveProps but before
 * shouldComponentUpdate, and this new state, props, and context will not yet be
 * assigned to this.
 *
 * @param {object|function} partialState Next partial state or function to
 *        produce next partial state to be merged with current state.
 * @param {?function} callback Called after state is updated.
 * @final
 * @protected
 */
Component.prototype.setState = function (partialState, callback) {
  (function () {
    if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {
      {
        throw ReactError(Error('setState(...): takes an object of state variables to update or a function which returns an object of state variables.'));
      }
    }
  })();
  this.updater.enqueueSetState(this, partialState, callback, 'setState');
};

/**
 * Forces an update. This should only be invoked when it is known with
 * certainty that we are **not** in a DOM transaction.
 *
 * You may want to call this when you know that some deeper aspect of the
 * component's state has changed but `setState` was not called.
 *
 * This will not invoke `shouldComponentUpdate`, but it will invoke
 * `componentWillUpdate` and `componentDidUpdate`.
 *
 * @param {?function} callback Called after update is complete.
 * @final
 * @protected
 */
Component.prototype.forceUpdate = function (callback) {
  this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
};

/**
 * Deprecated APIs. These APIs used to exist on classic React classes but since
 * we would like to deprecate them, we're not going to move them over to this
 * modern base class. Instead, we define a getter that warns if it's accessed.
 */
{
  var deprecatedAPIs = {
    isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
    replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
  };
  var defineDeprecationWarning = function (methodName, info) {
    Object.defineProperty(Component.prototype, methodName, {
      get: function () {
        lowPriorityWarning$1(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
        return undefined;
      }
    });
  };
  for (var fnName in deprecatedAPIs) {
    if (deprecatedAPIs.hasOwnProperty(fnName)) {
      defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
    }
  }
}

function ComponentDummy() {}
ComponentDummy.prototype = Component.prototype;

/**
 * Convenience component with default shallow equality check for sCU.
 */
function PureComponent(props, context, updater) {
  this.props = props;
  this.context = context;
  // If a component has string refs, we will assign a different object later.
  this.refs = emptyObject;
  this.updater = updater || ReactNoopUpdateQueue;
}

var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
pureComponentPrototype.constructor = PureComponent;
// Avoid an extra prototype jump for these methods.
_assign(pureComponentPrototype, Component.prototype);
pureComponentPrototype.isPureReactComponent = true;

// an immutable object with a single mutable value
function createRef() {
  var refObject = {
    current: null
  };
  {
    Object.seal(refObject);
  }
  return refObject;
}

/**
 * Keeps track of the current dispatcher.
 */
var ReactCurrentDispatcher = {
  /**
   * @internal
   * @type {ReactComponent}
   */
  current: null
};

/**
 * Keeps track of the current batch's configuration such as how long an update
 * should suspend for if it needs to.
 */
var ReactCurrentBatchConfig = {
  suspense: null
};

/**
 * Keeps track of the current owner.
 *
 * The current owner is the component who should own any components that are
 * currently being constructed.
 */
var ReactCurrentOwner = {
  /**
   * @internal
   * @type {ReactComponent}
   */
  current: null
};

var BEFORE_SLASH_RE = /^(.*)[\\\/]/;

var describeComponentFrame = function (name, source, ownerName) {
  var sourceInfo = '';
  if (source) {
    var path = source.fileName;
    var fileName = path.replace(BEFORE_SLASH_RE, '');
    {
      // In DEV, include code for a common special case:
      // prefer "folder/index.js" instead of just "index.js".
      if (/^index\./.test(fileName)) {
        var match = path.match(BEFORE_SLASH_RE);
        if (match) {
          var pathBeforeSlash = match[1];
          if (pathBeforeSlash) {
            var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
            fileName = folderName + '/' + fileName;
          }
        }
      }
    }
    sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
  } else if (ownerName) {
    sourceInfo = ' (created by ' + ownerName + ')';
  }
  return '\n    in ' + (name || 'Unknown') + sourceInfo;
};

var Resolved = 1;


function refineResolvedLazyComponent(lazyComponent) {
  return lazyComponent._status === Resolved ? lazyComponent._result : null;
}

function getWrappedName(outerType, innerType, wrapperName) {
  var functionName = innerType.displayName || innerType.name || '';
  return outerType.displayName || (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName);
}

function getComponentName(type) {
  if (type == null) {
    // Host root, text node or just invalid type.
    return null;
  }
  {
    if (typeof type.tag === 'number') {
      warningWithoutStack$1(false, 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
    }
  }
  if (typeof type === 'function') {
    return type.displayName || type.name || null;
  }
  if (typeof type === 'string') {
    return type;
  }
  switch (type) {
    case REACT_FRAGMENT_TYPE:
      return 'Fragment';
    case REACT_PORTAL_TYPE:
      return 'Portal';
    case REACT_PROFILER_TYPE:
      return 'Profiler';
    case REACT_STRICT_MODE_TYPE:
      return 'StrictMode';
    case REACT_SUSPENSE_TYPE:
      return 'Suspense';
    case REACT_SUSPENSE_LIST_TYPE:
      return 'SuspenseList';
  }
  if (typeof type === 'object') {
    switch (type.$$typeof) {
      case REACT_CONTEXT_TYPE:
        return 'Context.Consumer';
      case REACT_PROVIDER_TYPE:
        return 'Context.Provider';
      case REACT_FORWARD_REF_TYPE:
        return getWrappedName(type, type.render, 'ForwardRef');
      case REACT_MEMO_TYPE:
        return getComponentName(type.type);
      case REACT_LAZY_TYPE:
        {
          var thenable = type;
          var resolvedThenable = refineResolvedLazyComponent(thenable);
          if (resolvedThenable) {
            return getComponentName(resolvedThenable);
          }
          break;
        }
    }
  }
  return null;
}

var ReactDebugCurrentFrame = {};

var currentlyValidatingElement = null;

function setCurrentlyValidatingElement(element) {
  {
    currentlyValidatingElement = element;
  }
}

{
  // Stack implementation injected by the current renderer.
  ReactDebugCurrentFrame.getCurrentStack = null;

  ReactDebugCurrentFrame.getStackAddendum = function () {
    var stack = '';

    // Add an extra top frame while an element is being validated
    if (currentlyValidatingElement) {
      var name = getComponentName(currentlyValidatingElement.type);
      var owner = currentlyValidatingElement._owner;
      stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
    }

    // Delegate to the injected renderer-specific implementation
    var impl = ReactDebugCurrentFrame.getCurrentStack;
    if (impl) {
      stack += impl() || '';
    }

    return stack;
  };
}

/**
 * Used by act() to track whether you're inside an act() scope.
 */

var IsSomeRendererActing = {
  current: false
};

var ReactSharedInternals = {
  ReactCurrentDispatcher: ReactCurrentDispatcher,
  ReactCurrentBatchConfig: ReactCurrentBatchConfig,
  ReactCurrentOwner: ReactCurrentOwner,
  IsSomeRendererActing: IsSomeRendererActing,
  // Used by renderers to avoid bundling object-assign twice in UMD bundles:
  assign: _assign
};

{
  _assign(ReactSharedInternals, {
    // These should not be included in production.
    ReactDebugCurrentFrame: ReactDebugCurrentFrame,
    // Shim for React DOM 16.0.0 which still destructured (but not used) this.
    // TODO: remove in React 17.0.
    ReactComponentTreeHook: {}
  });
}

/**
 * Similar to invariant but only logs a warning if the condition is not met.
 * This can be used to log issues in development environments in critical
 * paths. Removing the logging code for production environments will keep the
 * same logic and follow the same code paths.
 */

var warning = warningWithoutStack$1;

{
  warning = function (condition, format) {
    if (condition) {
      return;
    }
    var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
    var stack = ReactDebugCurrentFrame.getStackAddendum();
    // eslint-disable-next-line react-internal/warning-and-invariant-args

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

    warningWithoutStack$1.apply(undefined, [false, format + '%s'].concat(args, [stack]));
  };
}

var warning$1 = warning;

var hasOwnProperty = Object.prototype.hasOwnProperty;

var RESERVED_PROPS = {
  key: true,
  ref: true,
  __self: true,
  __source: true
};

var specialPropKeyWarningShown = void 0;
var specialPropRefWarningShown = void 0;

function hasValidRef(config) {
  {
    if (hasOwnProperty.call(config, 'ref')) {
      var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
      if (getter && getter.isReactWarning) {
        return false;
      }
    }
  }
  return config.ref !== undefined;
}

function hasValidKey(config) {
  {
    if (hasOwnProperty.call(config, 'key')) {
      var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
      if (getter && getter.isReactWarning) {
        return false;
      }
    }
  }
  return config.key !== undefined;
}

function defineKeyPropWarningGetter(props, displayName) {
  var warnAboutAccessingKey = function () {
    if (!specialPropKeyWarningShown) {
      specialPropKeyWarningShown = true;
      warningWithoutStack$1(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
    }
  };
  warnAboutAccessingKey.isReactWarning = true;
  Object.defineProperty(props, 'key', {
    get: warnAboutAccessingKey,
    configurable: true
  });
}

function defineRefPropWarningGetter(props, displayName) {
  var warnAboutAccessingRef = function () {
    if (!specialPropRefWarningShown) {
      specialPropRefWarningShown = true;
      warningWithoutStack$1(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
    }
  };
  warnAboutAccessingRef.isReactWarning = true;
  Object.defineProperty(props, 'ref', {
    get: warnAboutAccessingRef,
    configurable: true
  });
}

/**
 * Factory method to create a new React element. This no longer adheres to
 * the class pattern, so do not use new to call it. Also, no instanceof check
 * will work. Instead test $$typeof field against Symbol.for('react.element') to check
 * if something is a React Element.
 *
 * @param {*} type
 * @param {*} props
 * @param {*} key
 * @param {string|object} ref
 * @param {*} owner
 * @param {*} self A *temporary* helper to detect places where `this` is
 * different from the `owner` when React.createElement is called, so that we
 * can warn. We want to get rid of owner and replace string `ref`s with arrow
 * functions, and as long as `this` and owner are the same, there will be no
 * change in behavior.
 * @param {*} source An annotation object (added by a transpiler or otherwise)
 * indicating filename, line number, and/or other information.
 * @internal
 */
var ReactElement = function (type, key, ref, self, source, owner, props) {
  var element = {
    // This tag allows us to uniquely identify this as a React Element
    $$typeof: REACT_ELEMENT_TYPE,

    // Built-in properties that belong on the element
    type: type,
    key: key,
    ref: ref,
    props: props,

    // Record the component responsible for creating this element.
    _owner: owner
  };

  {
    // The validation flag is currently mutative. We put it on
    // an external backing store so that we can freeze the whole object.
    // This can be replaced with a WeakMap once they are implemented in
    // commonly used development environments.
    element._store = {};

    // To make comparing ReactElements easier for testing purposes, we make
    // the validation flag non-enumerable (where possible, which should
    // include every environment we run tests in), so the test framework
    // ignores it.
    Object.defineProperty(element._store, 'validated', {
      configurable: false,
      enumerable: false,
      writable: true,
      value: false
    });
    // self and source are DEV only properties.
    Object.defineProperty(element, '_self', {
      configurable: false,
      enumerable: false,
      writable: false,
      value: self
    });
    // Two elements created in two different places should be considered
    // equal for testing purposes and therefore we hide it from enumeration.
    Object.defineProperty(element, '_source', {
      configurable: false,
      enumerable: false,
      writable: false,
      value: source
    });
    if (Object.freeze) {
      Object.freeze(element.props);
      Object.freeze(element);
    }
  }

  return element;
};

/**
 * https://github.com/reactjs/rfcs/pull/107
 * @param {*} type
 * @param {object} props
 * @param {string} key
 */


/**
 * https://github.com/reactjs/rfcs/pull/107
 * @param {*} type
 * @param {object} props
 * @param {string} key
 */
function jsxDEV(type, config, maybeKey, source, self) {
  var propName = void 0;

  // Reserved names are extracted
  var props = {};

  var key = null;
  var ref = null;

  if (hasValidRef(config)) {
    ref = config.ref;
  }

  if (hasValidKey(config)) {
    key = '' + config.key;
  }

  // Remaining properties are added to a new props object
  for (propName in config) {
    if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
      props[propName] = config[propName];
    }
  }

  // intentionally not checking if key was set above
  // this key is higher priority as it's static
  if (maybeKey !== undefined) {
    key = '' + maybeKey;
  }

  // Resolve default props
  if (type && type.defaultProps) {
    var defaultProps = type.defaultProps;
    for (propName in defaultProps) {
      if (props[propName] === undefined) {
        props[propName] = defaultProps[propName];
      }
    }
  }

  if (key || ref) {
    var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
    if (key) {
      defineKeyPropWarningGetter(props, displayName);
    }
    if (ref) {
      defineRefPropWarningGetter(props, displayName);
    }
  }

  return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
}

/**
 * Create and return a new ReactElement of the given type.
 * See https://reactjs.org/docs/react-api.html#createelement
 */
function createElement(type, config, children) {
  var propName = void 0;

  // Reserved names are extracted
  var props = {};

  var key = null;
  var ref = null;
  var self = null;
  var source = null;

  if (config != null) {
    if (hasValidRef(config)) {
      ref = config.ref;
    }
    if (hasValidKey(config)) {
      key = '' + config.key;
    }

    self = config.__self === undefined ? null : config.__self;
    source = config.__source === undefined ? null : config.__source;
    // Remaining properties are added to a new props object
    for (propName in config) {
      if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
        props[propName] = config[propName];
      }
    }
  }

  // Children can be more than one argument, and those are transferred onto
  // the newly allocated props object.
  var childrenLength = arguments.length - 2;
  if (childrenLength === 1) {
    props.children = children;
  } else if (childrenLength > 1) {
    var childArray = Array(childrenLength);
    for (var i = 0; i < childrenLength; i++) {
      childArray[i] = arguments[i + 2];
    }
    {
      if (Object.freeze) {
        Object.freeze(childArray);
      }
    }
    props.children = childArray;
  }

  // Resolve default props
  if (type && type.defaultProps) {
    var defaultProps = type.defaultProps;
    for (propName in defaultProps) {
      if (props[propName] === undefined) {
        props[propName] = defaultProps[propName];
      }
    }
  }
  {
    if (key || ref) {
      var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
      if (key) {
        defineKeyPropWarningGetter(props, displayName);
      }
      if (ref) {
        defineRefPropWarningGetter(props, displayName);
      }
    }
  }
  return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
}

/**
 * Return a function that produces ReactElements of a given type.
 * See https://reactjs.org/docs/react-api.html#createfactory
 */


function cloneAndReplaceKey(oldElement, newKey) {
  var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);

  return newElement;
}

/**
 * Clone and return a new ReactElement using element as the starting point.
 * See https://reactjs.org/docs/react-api.html#cloneelement
 */
function cloneElement(element, config, children) {
  (function () {
    if (!!(element === null || element === undefined)) {
      {
        throw ReactError(Error('React.cloneElement(...): The argument must be a React element, but you passed ' + element + '.'));
      }
    }
  })();

  var propName = void 0;

  // Original props are copied
  var props = _assign({}, element.props);

  // Reserved names are extracted
  var key = element.key;
  var ref = element.ref;
  // Self is preserved since the owner is preserved.
  var self = element._self;
  // Source is preserved since cloneElement is unlikely to be targeted by a
  // transpiler, and the original source is probably a better indicator of the
  // true owner.
  var source = element._source;

  // Owner will be preserved, unless ref is overridden
  var owner = element._owner;

  if (config != null) {
    if (hasValidRef(config)) {
      // Silently steal the ref from the parent.
      ref = config.ref;
      owner = ReactCurrentOwner.current;
    }
    if (hasValidKey(config)) {
      key = '' + config.key;
    }

    // Remaining properties override existing props
    var defaultProps = void 0;
    if (element.type && element.type.defaultProps) {
      defaultProps = element.type.defaultProps;
    }
    for (propName in config) {
      if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
        if (config[propName] === undefined && defaultProps !== undefined) {
          // Resolve default props
          props[propName] = defaultProps[propName];
        } else {
          props[propName] = config[propName];
        }
      }
    }
  }

  // Children can be more than one argument, and those are transferred onto
  // the newly allocated props object.
  var childrenLength = arguments.length - 2;
  if (childrenLength === 1) {
    props.children = children;
  } else if (childrenLength > 1) {
    var childArray = Array(childrenLength);
    for (var i = 0; i < childrenLength; i++) {
      childArray[i] = arguments[i + 2];
    }
    props.children = childArray;
  }

  return ReactElement(element.type, key, ref, self, source, owner, props);
}

/**
 * Verifies the object is a ReactElement.
 * See https://reactjs.org/docs/react-api.html#isvalidelement
 * @param {?object} object
 * @return {boolean} True if `object` is a ReactElement.
 * @final
 */
function isValidElement(object) {
  return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}

var SEPARATOR = '.';
var SUBSEPARATOR = ':';

/**
 * Escape and wrap key so it is safe to use as a reactid
 *
 * @param {string} key to be escaped.
 * @return {string} the escaped key.
 */
function escape(key) {
  var escapeRegex = /[=:]/g;
  var escaperLookup = {
    '=': '=0',
    ':': '=2'
  };
  var escapedString = ('' + key).replace(escapeRegex, function (match) {
    return escaperLookup[match];
  });

  return '$' + escapedString;
}

/**
 * TODO: Test that a single child and an array with one item have the same key
 * pattern.
 */

var didWarnAboutMaps = false;

var userProvidedKeyEscapeRegex = /\/+/g;
function escapeUserProvidedKey(text) {
  return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
}

var POOL_SIZE = 10;
var traverseContextPool = [];
function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {
  if (traverseContextPool.length) {
    var traverseContext = traverseContextPool.pop();
    traverseContext.result = mapResult;
    traverseContext.keyPrefix = keyPrefix;
    traverseContext.func = mapFunction;
    traverseContext.context = mapContext;
    traverseContext.count = 0;
    return traverseContext;
  } else {
    return {
      result: mapResult,
      keyPrefix: keyPrefix,
      func: mapFunction,
      context: mapContext,
      count: 0
    };
  }
}

function releaseTraverseContext(traverseContext) {
  traverseContext.result = null;
  traverseContext.keyPrefix = null;
  traverseContext.func = null;
  traverseContext.context = null;
  traverseContext.count = 0;
  if (traverseContextPool.length < POOL_SIZE) {
    traverseContextPool.push(traverseContext);
  }
}

/**
 * @param {?*} children Children tree container.
 * @param {!string} nameSoFar Name of the key path so far.
 * @param {!function} callback Callback to invoke with each child found.
 * @param {?*} traverseContext Used to pass information throughout the traversal
 * process.
 * @return {!number} The number of children in this subtree.
 */
function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
  var type = typeof children;

  if (type === 'undefined' || type === 'boolean') {
    // All of the above are perceived as null.
    children = null;
  }

  var invokeCallback = false;

  if (children === null) {
    invokeCallback = true;
  } else {
    switch (type) {
      case 'string':
      case 'number':
        invokeCallback = true;
        break;
      case 'object':
        switch (children.$$typeof) {
          case REACT_ELEMENT_TYPE:
          case REACT_PORTAL_TYPE:
            invokeCallback = true;
        }
    }
  }

  if (invokeCallback) {
    callback(traverseContext, children,
    // If it's the only child, treat the name as if it was wrapped in an array
    // so that it's consistent if the number of children grows.
    nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
    return 1;
  }

  var child = void 0;
  var nextName = void 0;
  var subtreeCount = 0; // Count of children found in the current subtree.
  var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;

  if (Array.isArray(children)) {
    for (var i = 0; i < children.length; i++) {
      child = children[i];
      nextName = nextNamePrefix + getComponentKey(child, i);
      subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
    }
  } else {
    var iteratorFn = getIteratorFn(children);
    if (typeof iteratorFn === 'function') {
      {
        // Warn about using Maps as children
        if (iteratorFn === children.entries) {
          !didWarnAboutMaps ? warning$1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.') : void 0;
          didWarnAboutMaps = true;
        }
      }

      var iterator = iteratorFn.call(children);
      var step = void 0;
      var ii = 0;
      while (!(step = iterator.next()).done) {
        child = step.value;
        nextName = nextNamePrefix + getComponentKey(child, ii++);
        subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
      }
    } else if (type === 'object') {
      var addendum = '';
      {
        addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
      }
      var childrenString = '' + children;
      (function () {
        {
          {
            throw ReactError(Error('Objects are not valid as a React child (found: ' + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + ').' + addendum));
          }
        }
      })();
    }
  }

  return subtreeCount;
}

/**
 * Traverses children that are typically specified as `props.children`, but
 * might also be specified through attributes:
 *
 * - `traverseAllChildren(this.props.children, ...)`
 * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
 *
 * The `traverseContext` is an optional argument that is passed through the
 * entire traversal. It can be used to store accumulations or anything else that
 * the callback might find relevant.
 *
 * @param {?*} children Children tree object.
 * @param {!function} callback To invoke upon traversing each child.
 * @param {?*} traverseContext Context for traversal.
 * @return {!number} The number of children in this subtree.
 */
function traverseAllChildren(children, callback, traverseContext) {
  if (children == null) {
    return 0;
  }

  return traverseAllChildrenImpl(children, '', callback, traverseContext);
}

/**
 * Generate a key string that identifies a component within a set.
 *
 * @param {*} component A component that could contain a manual key.
 * @param {number} index Index that is used if a manual key is not provided.
 * @return {string}
 */
function getComponentKey(component, index) {
  // Do some typechecking here since we call this blindly. We want to ensure
  // that we don't block potential future ES APIs.
  if (typeof component === 'object' && component !== null && component.key != null) {
    // Explicit key
    return escape(component.key);
  }
  // Implicit key determined by the index in the set
  return index.toString(36);
}

function forEachSingleChild(bookKeeping, child, name) {
  var func = bookKeeping.func,
      context = bookKeeping.context;

  func.call(context, child, bookKeeping.count++);
}

/**
 * Iterates through children that are typically specified as `props.children`.
 *
 * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
 *
 * The provided forEachFunc(child, index) will be called for each
 * leaf child.
 *
 * @param {?*} children Children tree container.
 * @param {function(*, int)} forEachFunc
 * @param {*} forEachContext Context for forEachContext.
 */
function forEachChildren(children, forEachFunc, forEachContext) {
  if (children == null) {
    return children;
  }
  var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
  traverseAllChildren(children, forEachSingleChild, traverseContext);
  releaseTraverseContext(traverseContext);
}

function mapSingleChildIntoContext(bookKeeping, child, childKey) {
  var result = bookKeeping.result,
      keyPrefix = bookKeeping.keyPrefix,
      func = bookKeeping.func,
      context = bookKeeping.context;


  var mappedChild = func.call(context, child, bookKeeping.count++);
  if (Array.isArray(mappedChild)) {
    mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {
      return c;
    });
  } else if (mappedChild != null) {
    if (isValidElement(mappedChild)) {
      mappedChild = cloneAndReplaceKey(mappedChild,
      // Keep both the (mapped) and old keys if they differ, just as
      // traverseAllChildren used to do for objects as children
      keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
    }
    result.push(mappedChild);
  }
}

function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
  var escapedPrefix = '';
  if (prefix != null) {
    escapedPrefix = escapeUserProvidedKey(prefix) + '/';
  }
  var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);
  traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
  releaseTraverseContext(traverseContext);
}

/**
 * Maps children that are typically specified as `props.children`.
 *
 * See https://reactjs.org/docs/react-api.html#reactchildrenmap
 *
 * The provided mapFunction(child, key, index) will be called for each
 * leaf child.
 *
 * @param {?*} children Children tree container.
 * @param {function(*, int)} func The map function.
 * @param {*} context Context for mapFunction.
 * @return {object} Object containing the ordered map of results.
 */
function mapChildren(children, func, context) {
  if (children == null) {
    return children;
  }
  var result = [];
  mapIntoWithKeyPrefixInternal(children, result, null, func, context);
  return result;
}

/**
 * Count the number of children that are typically specified as
 * `props.children`.
 *
 * See https://reactjs.org/docs/react-api.html#reactchildrencount
 *
 * @param {?*} children Children tree container.
 * @return {number} The number of children.
 */
function countChildren(children) {
  return traverseAllChildren(children, function () {
    return null;
  }, null);
}

/**
 * Flatten a children object (typically specified as `props.children`) and
 * return an array with appropriately re-keyed children.
 *
 * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
 */
function toArray(children) {
  var result = [];
  mapIntoWithKeyPrefixInternal(children, result, null, function (child) {
    return child;
  });
  return result;
}

/**
 * Returns the first child in a collection of children and verifies that there
 * is only one child in the collection.
 *
 * See https://reactjs.org/docs/react-api.html#reactchildrenonly
 *
 * The current implementation of this function assumes that a single child gets
 * passed without a wrapper, but the purpose of this helper function is to
 * abstract away the particular structure of children.
 *
 * @param {?object} children Child collection structure.
 * @return {ReactElement} The first and only `ReactElement` contained in the
 * structure.
 */
function onlyChild(children) {
  (function () {
    if (!isValidElement(children)) {
      {
        throw ReactError(Error('React.Children.only expected to receive a single React element child.'));
      }
    }
  })();
  return children;
}

function createContext(defaultValue, calculateChangedBits) {
  if (calculateChangedBits === undefined) {
    calculateChangedBits = null;
  } else {
    {
      !(calculateChangedBits === null || typeof calculateChangedBits === 'function') ? warningWithoutStack$1(false, 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits) : void 0;
    }
  }

  var context = {
    $$typeof: REACT_CONTEXT_TYPE,
    _calculateChangedBits: calculateChangedBits,
    // As a workaround to support multiple concurrent renderers, we categorize
    // some renderers as primary and others as secondary. We only expect
    // there to be two concurrent renderers at most: React Native (primary) and
    // Fabric (secondary); React DOM (primary) and React ART (secondary).
    // Secondary renderers store their context values on separate fields.
    _currentValue: defaultValue,
    _currentValue2: defaultValue,
    // Used to track how many concurrent renderers this context currently
    // supports within in a single renderer. Such as parallel server rendering.
    _threadCount: 0,
    // These are circular
    Provider: null,
    Consumer: null
  };

  context.Provider = {
    $$typeof: REACT_PROVIDER_TYPE,
    _context: context
  };

  var hasWarnedAboutUsingNestedContextConsumers = false;
  var hasWarnedAboutUsingConsumerProvider = false;

  {
    // A separate object, but proxies back to the original context object for
    // backwards compatibility. It has a different $$typeof, so we can properly
    // warn for the incorrect usage of Context as a Consumer.
    var Consumer = {
      $$typeof: REACT_CONTEXT_TYPE,
      _context: context,
      _calculateChangedBits: context._calculateChangedBits
    };
    // $FlowFixMe: Flow complains about not setting a value, which is intentional here
    Object.defineProperties(Consumer, {
      Provider: {
        get: function () {
          if (!hasWarnedAboutUsingConsumerProvider) {
            hasWarnedAboutUsingConsumerProvider = true;
            warning$1(false, 'Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
          }
          return context.Provider;
        },
        set: function (_Provider) {
          context.Provider = _Provider;
        }
      },
      _currentValue: {
        get: function () {
          return context._currentValue;
        },
        set: function (_currentValue) {
          context._currentValue = _currentValue;
        }
      },
      _currentValue2: {
        get: function () {
          return context._currentValue2;
        },
        set: function (_currentValue2) {
          context._currentValue2 = _currentValue2;
        }
      },
      _threadCount: {
        get: function () {
          return context._threadCount;
        },
        set: function (_threadCount) {
          context._threadCount = _threadCount;
        }
      },
      Consumer: {
        get: function () {
          if (!hasWarnedAboutUsingNestedContextConsumers) {
            hasWarnedAboutUsingNestedContextConsumers = true;
            warning$1(false, 'Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
          }
          return context.Consumer;
        }
      }
    });
    // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
    context.Consumer = Consumer;
  }

  {
    context._currentRenderer = null;
    context._currentRenderer2 = null;
  }

  return context;
}

function lazy(ctor) {
  var lazyType = {
    $$typeof: REACT_LAZY_TYPE,
    _ctor: ctor,
    // React uses these fields to store the result.
    _status: -1,
    _result: null
  };

  {
    // In production, this would just set it on the object.
    var defaultProps = void 0;
    var propTypes = void 0;
    Object.defineProperties(lazyType, {
      defaultProps: {
        configurable: true,
        get: function () {
          return defaultProps;
        },
        set: function (newDefaultProps) {
          warning$1(false, 'React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
          defaultProps = newDefaultProps;
          // Match production behavior more closely:
          Object.defineProperty(lazyType, 'defaultProps', {
            enumerable: true
          });
        }
      },
      propTypes: {
        configurable: true,
        get: function () {
          return propTypes;
        },
        set: function (newPropTypes) {
          warning$1(false, 'React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
          propTypes = newPropTypes;
          // Match production behavior more closely:
          Object.defineProperty(lazyType, 'propTypes', {
            enumerable: true
          });
        }
      }
    });
  }

  return lazyType;
}

function forwardRef(render) {
  {
    if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
      warningWithoutStack$1(false, 'forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
    } else if (typeof render !== 'function') {
      warningWithoutStack$1(false, 'forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
    } else {
      !(
      // Do not warn for 0 arguments because it could be due to usage of the 'arguments' object
      render.length === 0 || render.length === 2) ? warningWithoutStack$1(false, 'forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.') : void 0;
    }

    if (render != null) {
      !(render.defaultProps == null && render.propTypes == null) ? warningWithoutStack$1(false, 'forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?') : void 0;
    }
  }

  return {
    $$typeof: REACT_FORWARD_REF_TYPE,
    render: render
  };
}

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

function memo(type, compare) {
  {
    if (!isValidElementType(type)) {
      warningWithoutStack$1(false, 'memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
    }
  }
  return {
    $$typeof: REACT_MEMO_TYPE,
    type: type,
    compare: compare === undefined ? null : compare
  };
}

function resolveDispatcher() {
  var dispatcher = ReactCurrentDispatcher.current;
  (function () {
    if (!(dispatcher !== null)) {
      {
        throw ReactError(Error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.'));
      }
    }
  })();
  return dispatcher;
}

function useContext(Context, unstable_observedBits) {
  var dispatcher = resolveDispatcher();
  {
    !(unstable_observedBits === undefined) ? warning$1(false, 'useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://fb.me/rules-of-hooks' : '') : void 0;

    // TODO: add a more generic warning for invalid values.
    if (Context._context !== undefined) {
      var realContext = Context._context;
      // Don't deduplicate because this legitimately causes bugs
      // and nobody should be using this in existing code.
      if (realContext.Consumer === Context) {
        warning$1(false, 'Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
      } else if (realContext.Provider === Context) {
        warning$1(false, 'Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
      }
    }
  }
  return dispatcher.useContext(Context, unstable_observedBits);
}

function useState(initialState) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useState(initialState);
}

function useReducer(reducer, initialArg, init) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useReducer(reducer, initialArg, init);
}

function useRef(initialValue) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useRef(initialValue);
}

function useEffect(create, inputs) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useEffect(create, inputs);
}

function useLayoutEffect(create, inputs) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useLayoutEffect(create, inputs);
}

function useCallback(callback, inputs) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useCallback(callback, inputs);
}

function useMemo(create, inputs) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useMemo(create, inputs);
}

function useImperativeHandle(ref, create, inputs) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useImperativeHandle(ref, create, inputs);
}

function useDebugValue(value, formatterFn) {
  {
    var dispatcher = resolveDispatcher();
    return dispatcher.useDebugValue(value, formatterFn);
  }
}

var emptyObject$1 = {};

function useResponder(responder, listenerProps) {
  var dispatcher = resolveDispatcher();
  {
    if (responder == null || responder.$$typeof !== REACT_RESPONDER_TYPE) {
      warning$1(false, 'useResponder: invalid first argument. Expected an event responder, but instead got %s', responder);
      return;
    }
  }
  return dispatcher.useResponder(responder, listenerProps || emptyObject$1);
}

// Within the scope of the callback, mark all updates as being allowed to suspend.
function withSuspenseConfig(scope, config) {
  var previousConfig = ReactCurrentBatchConfig.suspense;
  ReactCurrentBatchConfig.suspense = config === undefined ? null : config;
  try {
    scope();
  } finally {
    ReactCurrentBatchConfig.suspense = previousConfig;
  }
}

/**
 * ReactElementValidator provides a wrapper around a element factory
 * which validates the props passed to the element. This is intended to be
 * used only in DEV and could be replaced by a static type checker for languages
 * that support it.
 */

var propTypesMisspellWarningShown = void 0;

{
  propTypesMisspellWarningShown = false;
}

function getDeclarationErrorAddendum() {
  if (ReactCurrentOwner.current) {
    var name = getComponentName(ReactCurrentOwner.current.type);
    if (name) {
      return '\n\nCheck the render method of `' + name + '`.';
    }
  }
  return '';
}

function getSourceInfoErrorAddendum(source) {
  if (source !== undefined) {
    var fileName = source.fileName.replace(/^.*[\\\/]/, '');
    var lineNumber = source.lineNumber;
    return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
  }
  return '';
}

function getSourceInfoErrorAddendumForProps(elementProps) {
  if (elementProps !== null && elementProps !== undefined) {
    return getSourceInfoErrorAddendum(elementProps.__source);
  }
  return '';
}

/**
 * Warn if there's no key explicitly set on dynamic arrays of children or
 * object keys are not valid. This allows us to keep track of children between
 * updates.
 */
var ownerHasKeyUseWarning = {};

function getCurrentComponentErrorInfo(parentType) {
  var info = getDeclarationErrorAddendum();

  if (!info) {
    var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
    if (parentName) {
      info = '\n\nCheck the top-level render call using <' + parentName + '>.';
    }
  }
  return info;
}

/**
 * Warn if the element doesn't have an explicit key assigned to it.
 * This element is in an array. The array could grow and shrink or be
 * reordered. All children that haven't already been validated are required to
 * have a "key" property assigned to it. Error statuses are cached so a warning
 * will only be shown once.
 *
 * @internal
 * @param {ReactElement} element Element that requires a key.
 * @param {*} parentType element's parent's type.
 */
function validateExplicitKey(element, parentType) {
  if (!element._store || element._store.validated || element.key != null) {
    return;
  }
  element._store.validated = true;

  var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
  if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
    return;
  }
  ownerHasKeyUseWarning[currentComponentErrorInfo] = true;

  // Usually the current owner is the offender, but if it accepts children as a
  // property, it may be the creator of the child that's responsible for
  // assigning it a key.
  var childOwner = '';
  if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
    // Give the component that originally created this child.
    childOwner = ' It was passed a child from ' + getComponentName(element._owner.type) + '.';
  }

  setCurrentlyValidatingElement(element);
  {
    warning$1(false, 'Each child in a list should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);
  }
  setCurrentlyValidatingElement(null);
}

/**
 * Ensure that every element either is passed in a static location, in an
 * array with an explicit keys property defined, or in an object literal
 * with valid key property.
 *
 * @internal
 * @param {ReactNode} node Statically passed child of any type.
 * @param {*} parentType node's parent's type.
 */
function validateChildKeys(node, parentType) {
  if (typeof node !== 'object') {
    return;
  }
  if (Array.isArray(node)) {
    for (var i = 0; i < node.length; i++) {
      var child = node[i];
      if (isValidElement(child)) {
        validateExplicitKey(child, parentType);
      }
    }
  } else if (isValidElement(node)) {
    // This element was passed in a valid location.
    if (node._store) {
      node._store.validated = true;
    }
  } else if (node) {
    var iteratorFn = getIteratorFn(node);
    if (typeof iteratorFn === 'function') {
      // Entry iterators used to provide implicit keys,
      // but now we print a separate warning for them later.
      if (iteratorFn !== node.entries) {
        var iterator = iteratorFn.call(node);
        var step = void 0;
        while (!(step = iterator.next()).done) {
          if (isValidElement(step.value)) {
            validateExplicitKey(step.value, parentType);
          }
        }
      }
    }
  }
}

/**
 * Given an element, validate that its props follow the propTypes definition,
 * provided by the type.
 *
 * @param {ReactElement} element
 */
function validatePropTypes(element) {
  var type = element.type;
  if (type === null || type === undefined || typeof type === 'string') {
    return;
  }
  var name = getComponentName(type);
  var propTypes = void 0;
  if (typeof type === 'function') {
    propTypes = type.propTypes;
  } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE ||
  // Note: Memo only checks outer props here.
  // Inner props are checked in the reconciler.
  type.$$typeof === REACT_MEMO_TYPE)) {
    propTypes = type.propTypes;
  } else {
    return;
  }
  if (propTypes) {
    setCurrentlyValidatingElement(element);
    checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);
    setCurrentlyValidatingElement(null);
  } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
    propTypesMisspellWarningShown = true;
    warningWithoutStack$1(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
  }
  if (typeof type.getDefaultProps === 'function') {
    !type.getDefaultProps.isReactClassApproved ? warningWithoutStack$1(false, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
  }
}

/**
 * Given a fragment, validate that it can only be provided with fragment props
 * @param {ReactElement} fragment
 */
function validateFragmentProps(fragment) {
  setCurrentlyValidatingElement(fragment);

  var keys = Object.keys(fragment.props);
  for (var i = 0; i < keys.length; i++) {
    var key = keys[i];
    if (key !== 'children' && key !== 'key') {
      warning$1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
      break;
    }
  }

  if (fragment.ref !== null) {
    warning$1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.');
  }

  setCurrentlyValidatingElement(null);
}

function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
  var validType = isValidElementType(type);

  // We warn in this case but don't throw. We expect the element creation to
  // succeed and there will likely be errors in render.
  if (!validType) {
    var info = '';
    if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
      info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
    }

    var sourceInfo = getSourceInfoErrorAddendum(source);
    if (sourceInfo) {
      info += sourceInfo;
    } else {
      info += getDeclarationErrorAddendum();
    }

    var typeString = void 0;
    if (type === null) {
      typeString = 'null';
    } else if (Array.isArray(type)) {
      typeString = 'array';
    } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
      typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />';
      info = ' Did you accidentally export a JSX literal instead of a component?';
    } else {
      typeString = typeof type;
    }

    warning$1(false, 'React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
  }

  var element = jsxDEV(type, props, key, source, self);

  // The result can be nullish if a mock or a custom function is used.
  // TODO: Drop this when these are no longer allowed as the type argument.
  if (element == null) {
    return element;
  }

  // Skip key warning if the type isn't valid since our key validation logic
  // doesn't expect a non-string/function type and can throw confusing errors.
  // We don't want exception behavior to differ between dev and prod.
  // (Rendering will throw with a helpful message and as soon as the type is
  // fixed, the key warnings will appear.)
  if (validType) {
    var children = props.children;
    if (children !== undefined) {
      if (isStaticChildren) {
        for (var i = 0; i < children.length; i++) {
          validateChildKeys(children[i], type);
        }
      } else {
        validateChildKeys(children, type);
      }
    }
  }

  if (props.key !== undefined) {
    warning$1(false, 'React.jsx: Spreading a key to JSX is a deprecated pattern. ' + 'Explicitly pass a key after spreading props in your JSX call. ' + 'E.g. <ComponentName {...props} key={key} />');
  }

  if (type === REACT_FRAGMENT_TYPE) {
    validateFragmentProps(element);
  } else {
    validatePropTypes(element);
  }

  return element;
}

// These two functions exist to still get child warnings in dev
// even with the prod transform. This means that jsxDEV is purely
// opt-in behavior for better messages but that we won't stop
// giving you warnings if you use production apis.
function jsxWithValidationStatic(type, props, key) {
  return jsxWithValidation(type, props, key, true);
}

function jsxWithValidationDynamic(type, props, key) {
  return jsxWithValidation(type, props, key, false);
}

function createElementWithValidation(type, props, children) {
  var validType = isValidElementType(type);

  // We warn in this case but don't throw. We expect the element creation to
  // succeed and there will likely be errors in render.
  if (!validType) {
    var info = '';
    if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
      info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
    }

    var sourceInfo = getSourceInfoErrorAddendumForProps(props);
    if (sourceInfo) {
      info += sourceInfo;
    } else {
      info += getDeclarationErrorAddendum();
    }

    var typeString = void 0;
    if (type === null) {
      typeString = 'null';
    } else if (Array.isArray(type)) {
      typeString = 'array';
    } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
      typeString = '<' + (getComponentName(type.type) || 'Unknown') + ' />';
      info = ' Did you accidentally export a JSX literal instead of a component?';
    } else {
      typeString = typeof type;
    }

    warning$1(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
  }

  var element = createElement.apply(this, arguments);

  // The result can be nullish if a mock or a custom function is used.
  // TODO: Drop this when these are no longer allowed as the type argument.
  if (element == null) {
    return element;
  }

  // Skip key warning if the type isn't valid since our key validation logic
  // doesn't expect a non-string/function type and can throw confusing errors.
  // We don't want exception behavior to differ between dev and prod.
  // (Rendering will throw with a helpful message and as soon as the type is
  // fixed, the key warnings will appear.)
  if (validType) {
    for (var i = 2; i < arguments.length; i++) {
      validateChildKeys(arguments[i], type);
    }
  }

  if (type === REACT_FRAGMENT_TYPE) {
    validateFragmentProps(element);
  } else {
    validatePropTypes(element);
  }

  return element;
}

function createFactoryWithValidation(type) {
  var validatedFactory = createElementWithValidation.bind(null, type);
  validatedFactory.type = type;
  // Legacy hook: remove it
  {
    Object.defineProperty(validatedFactory, 'type', {
      enumerable: false,
      get: function () {
        lowPriorityWarning$1(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
        Object.defineProperty(this, 'type', {
          value: type
        });
        return type;
      }
    });
  }

  return validatedFactory;
}

function cloneElementWithValidation(element, props, children) {
  var newElement = cloneElement.apply(this, arguments);
  for (var i = 2; i < arguments.length; i++) {
    validateChildKeys(arguments[i], newElement.type);
  }
  validatePropTypes(newElement);
  return newElement;
}

var hasBadMapPolyfill = void 0;

{
  hasBadMapPolyfill = false;
  try {
    var frozenObject = Object.freeze({});
    var testMap = new Map([[frozenObject, null]]);
    var testSet = new Set([frozenObject]);
    // This is necessary for Rollup to not consider these unused.
    // https://github.com/rollup/rollup/issues/1771
    // TODO: we can remove these if Rollup fixes the bug.
    testMap.set(0, 0);
    testSet.add(0);
  } catch (e) {
    // TODO: Consider warning about bad polyfills
    hasBadMapPolyfill = true;
  }
}

function createFundamentalComponent(impl) {
  // We use responder as a Map key later on. When we have a bad
  // polyfill, then we can't use it as a key as the polyfill tries
  // to add a property to the object.
  if ( true && !hasBadMapPolyfill) {
    Object.freeze(impl);
  }
  var fundamantalComponent = {
    $$typeof: REACT_FUNDAMENTAL_TYPE,
    impl: impl
  };
  {
    Object.freeze(fundamantalComponent);
  }
  return fundamantalComponent;
}

function createEventResponder(displayName, responderConfig) {
  var getInitialState = responderConfig.getInitialState,
      onEvent = responderConfig.onEvent,
      onMount = responderConfig.onMount,
      onUnmount = responderConfig.onUnmount,
      onOwnershipChange = responderConfig.onOwnershipChange,
      onRootEvent = responderConfig.onRootEvent,
      rootEventTypes = responderConfig.rootEventTypes,
      targetEventTypes = responderConfig.targetEventTypes;

  var eventResponder = {
    $$typeof: REACT_RESPONDER_TYPE,
    displayName: displayName,
    getInitialState: getInitialState || null,
    onEvent: onEvent || null,
    onMount: onMount || null,
    onOwnershipChange: onOwnershipChange || null,
    onRootEvent: onRootEvent || null,
    onUnmount: onUnmount || null,
    rootEventTypes: rootEventTypes || null,
    targetEventTypes: targetEventTypes || null
  };
  // We use responder as a Map key later on. When we have a bad
  // polyfill, then we can't use it as a key as the polyfill tries
  // to add a property to the object.
  if ( true && !hasBadMapPolyfill) {
    Object.freeze(eventResponder);
  }
  return eventResponder;
}

// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:


// In some cases, StrictMode should also double-render lifecycles.
// This can be confusing for tests though,
// And it can be bad for performance in production.
// This feature flag can be used to control the behavior:


// To preserve the "Pause on caught exceptions" behavior of the debugger, we
// replay the begin phase of a failed component inside invokeGuardedCallback.


// Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:


// Gather advanced timing metrics for Profiler subtrees.


// Trace which interactions trigger each commit.


// Only used in www builds.
 // TODO: true? Here it might just be false.

// Only used in www builds.


// Only used in www builds.


// Disable javascript: URL strings in href for XSS protection.


// React Fire: prevent the value and checked attributes from syncing
// with their related DOM properties


// These APIs will no longer be "unstable" in the upcoming 16.7 release,
// Control this behavior with a flag to support 16.6 minor releases in the meanwhile.




// See https://github.com/react-native-community/discussions-and-proposals/issues/72 for more information
// This is a flag so we can fix warnings in RN core before turning it on


// Experimental React Flare event system and event components support.
var enableFlareAPI = false;

// Experimental Host Component support.
var enableFundamentalAPI = false;

// New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107
var enableJSXTransformAPI = false;

// We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?)
// Till then, we warn about the missing mock, but still fallback to a sync mode compatible version

// Temporary flag to revert the fix in #15650


// For tests, we flush suspense fallbacks in an act scope;
// *except* in some of our own tests, where we test incremental loading states.


// Changes priority of some events like mousemove to user-blocking priority,
// but without making them discrete. The flag exists in case it causes
// starvation problems.


// Add a callback property to suspense to notify which promises are currently
// in the update queue. This allows reporting and tracing of what is causing
// the user to see a loading state.


// Part of the simplification of React.createElement so we can eventually move
// from React.createElement to React.jsx
// https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md

var React = {
  Children: {
    map: mapChildren,
    forEach: forEachChildren,
    count: countChildren,
    toArray: toArray,
    only: onlyChild
  },

  createRef: createRef,
  Component: Component,
  PureComponent: PureComponent,

  createContext: createContext,
  forwardRef: forwardRef,
  lazy: lazy,
  memo: memo,

  useCallback: useCallback,
  useContext: useContext,
  useEffect: useEffect,
  useImperativeHandle: useImperativeHandle,
  useDebugValue: useDebugValue,
  useLayoutEffect: useLayoutEffect,
  useMemo: useMemo,
  useReducer: useReducer,
  useRef: useRef,
  useState: useState,

  Fragment: REACT_FRAGMENT_TYPE,
  Profiler: REACT_PROFILER_TYPE,
  StrictMode: REACT_STRICT_MODE_TYPE,
  Suspense: REACT_SUSPENSE_TYPE,
  unstable_SuspenseList: REACT_SUSPENSE_LIST_TYPE,

  createElement: createElementWithValidation,
  cloneElement: cloneElementWithValidation,
  createFactory: createFactoryWithValidation,
  isValidElement: isValidElement,

  version: ReactVersion,

  unstable_withSuspenseConfig: withSuspenseConfig,

  __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactSharedInternals
};

if (enableFlareAPI) {
  React.unstable_useResponder = useResponder;
  React.unstable_createResponder = createEventResponder;
}

if (enableFundamentalAPI) {
  React.unstable_createFundamental = createFundamentalComponent;
}

// Note: some APIs are added with feature flags.
// Make sure that stable builds for open source
// don't modify the React object to avoid deopts.
// Also let's not expose their names in stable builds.

if (enableJSXTransformAPI) {
  {
    React.jsxDEV = jsxWithValidation;
    React.jsx = jsxWithValidationDynamic;
    React.jsxs = jsxWithValidationStatic;
  }
}



var React$2 = Object.freeze({
	default: React
});

var React$3 = ( React$2 && React ) || React$2;

// TODO: decide on the top-level export form.
// This is hacky but makes it work with both Rollup and Jest.
var react = React$3.default || React$3;

module.exports = react;
  })();
}


/***/ }),

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

"use strict";


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


/***/ }),

/***/ "./node_modules/style-loader/lib/addStyles.js":
/*!****************************************************!*\
  !*** ./node_modules/style-loader/lib/addStyles.js ***!
  \****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/

var stylesInDom = {};

var	memoize = function (fn) {
	var memo;

	return function () {
		if (typeof memo === "undefined") memo = fn.apply(this, arguments);
		return memo;
	};
};

var isOldIE = memoize(function () {
	// Test for IE <= 9 as proposed by Browserhacks
	// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
	// Tests for existence of standard globals is to allow style-loader
	// to operate correctly into non-standard environments
	// @see https://github.com/webpack-contrib/style-loader/issues/177
	return window && document && document.all && !window.atob;
});

var getTarget = function (target, parent) {
  if (parent){
    return parent.querySelector(target);
  }
  return document.querySelector(target);
};

var getElement = (function (fn) {
	var memo = {};

	return function(target, parent) {
                // If passing function in options, then use it for resolve "head" element.
                // Useful for Shadow Root style i.e
                // {
                //   insertInto: function () { return document.querySelector("#foo").shadowRoot }
                // }
                if (typeof target === 'function') {
                        return target();
                }
                if (typeof memo[target] === "undefined") {
			var styleTarget = getTarget.call(this, target, parent);
			// Special case to return head of iframe instead of iframe itself
			if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
				try {
					// This will throw an exception if access to iframe is blocked
					// due to cross-origin restrictions
					styleTarget = styleTarget.contentDocument.head;
				} catch(e) {
					styleTarget = null;
				}
			}
			memo[target] = styleTarget;
		}
		return memo[target]
	};
})();

var singleton = null;
var	singletonCounter = 0;
var	stylesInsertedAtTop = [];

var	fixUrls = __webpack_require__(/*! ./urls */ "./node_modules/style-loader/lib/urls.js");

module.exports = function(list, options) {
	if (typeof DEBUG !== "undefined" && DEBUG) {
		if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
	}

	options = options || {};

	options.attrs = typeof options.attrs === "object" ? options.attrs : {};

	// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
	// tags it will allow on a page
	if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();

	// By default, add <style> tags to the <head> element
        if (!options.insertInto) options.insertInto = "head";

	// By default, add <style> tags to the bottom of the target
	if (!options.insertAt) options.insertAt = "bottom";

	var styles = listToStyles(list, options);

	addStylesToDom(styles, options);

	return function update (newList) {
		var mayRemove = [];

		for (var i = 0; i < styles.length; i++) {
			var item = styles[i];
			var domStyle = stylesInDom[item.id];

			domStyle.refs--;
			mayRemove.push(domStyle);
		}

		if(newList) {
			var newStyles = listToStyles(newList, options);
			addStylesToDom(newStyles, options);
		}

		for (var i = 0; i < mayRemove.length; i++) {
			var domStyle = mayRemove[i];

			if(domStyle.refs === 0) {
				for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();

				delete stylesInDom[domStyle.id];
			}
		}
	};
};

function addStylesToDom (styles, options) {
	for (var i = 0; i < styles.length; i++) {
		var item = styles[i];
		var domStyle = stylesInDom[item.id];

		if(domStyle) {
			domStyle.refs++;

			for(var j = 0; j < domStyle.parts.length; j++) {
				domStyle.parts[j](item.parts[j]);
			}

			for(; j < item.parts.length; j++) {
				domStyle.parts.push(addStyle(item.parts[j], options));
			}
		} else {
			var parts = [];

			for(var j = 0; j < item.parts.length; j++) {
				parts.push(addStyle(item.parts[j], options));
			}

			stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
		}
	}
}

function listToStyles (list, options) {
	var styles = [];
	var newStyles = {};

	for (var i = 0; i < list.length; i++) {
		var item = list[i];
		var id = options.base ? item[0] + options.base : item[0];
		var css = item[1];
		var media = item[2];
		var sourceMap = item[3];
		var part = {css: css, media: media, sourceMap: sourceMap};

		if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
		else newStyles[id].parts.push(part);
	}

	return styles;
}

function insertStyleElement (options, style) {
	var target = getElement(options.insertInto)

	if (!target) {
		throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
	}

	var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];

	if (options.insertAt === "top") {
		if (!lastStyleElementInsertedAtTop) {
			target.insertBefore(style, target.firstChild);
		} else if (lastStyleElementInsertedAtTop.nextSibling) {
			target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
		} else {
			target.appendChild(style);
		}
		stylesInsertedAtTop.push(style);
	} else if (options.insertAt === "bottom") {
		target.appendChild(style);
	} else if (typeof options.insertAt === "object" && options.insertAt.before) {
		var nextSibling = getElement(options.insertAt.before, target);
		target.insertBefore(style, nextSibling);
	} else {
		throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
	}
}

function removeStyleElement (style) {
	if (style.parentNode === null) return false;
	style.parentNode.removeChild(style);

	var idx = stylesInsertedAtTop.indexOf(style);
	if(idx >= 0) {
		stylesInsertedAtTop.splice(idx, 1);
	}
}

function createStyleElement (options) {
	var style = document.createElement("style");

	if(options.attrs.type === undefined) {
		options.attrs.type = "text/css";
	}

	if(options.attrs.nonce === undefined) {
		var nonce = getNonce();
		if (nonce) {
			options.attrs.nonce = nonce;
		}
	}

	addAttrs(style, options.attrs);
	insertStyleElement(options, style);

	return style;
}

function createLinkElement (options) {
	var link = document.createElement("link");

	if(options.attrs.type === undefined) {
		options.attrs.type = "text/css";
	}
	options.attrs.rel = "stylesheet";

	addAttrs(link, options.attrs);
	insertStyleElement(options, link);

	return link;
}

function addAttrs (el, attrs) {
	Object.keys(attrs).forEach(function (key) {
		el.setAttribute(key, attrs[key]);
	});
}

function getNonce() {
	if (false) {}

	return __webpack_require__.nc;
}

function addStyle (obj, options) {
	var style, update, remove, result;

	// If a transform function was defined, run it on the css
	if (options.transform && obj.css) {
	    result = typeof options.transform === 'function'
		 ? options.transform(obj.css) 
		 : options.transform.default(obj.css);

	    if (result) {
	    	// If transform returns a value, use that instead of the original css.
	    	// This allows running runtime transformations on the css.
	    	obj.css = result;
	    } else {
	    	// If the transform function returns a falsy value, don't add this css.
	    	// This allows conditional loading of css
	    	return function() {
	    		// noop
	    	};
	    }
	}

	if (options.singleton) {
		var styleIndex = singletonCounter++;

		style = singleton || (singleton = createStyleElement(options));

		update = applyToSingletonTag.bind(null, style, styleIndex, false);
		remove = applyToSingletonTag.bind(null, style, styleIndex, true);

	} else if (
		obj.sourceMap &&
		typeof URL === "function" &&
		typeof URL.createObjectURL === "function" &&
		typeof URL.revokeObjectURL === "function" &&
		typeof Blob === "function" &&
		typeof btoa === "function"
	) {
		style = createLinkElement(options);
		update = updateLink.bind(null, style, options);
		remove = function () {
			removeStyleElement(style);

			if(style.href) URL.revokeObjectURL(style.href);
		};
	} else {
		style = createStyleElement(options);
		update = applyToTag.bind(null, style);
		remove = function () {
			removeStyleElement(style);
		};
	}

	update(obj);

	return function updateStyle (newObj) {
		if (newObj) {
			if (
				newObj.css === obj.css &&
				newObj.media === obj.media &&
				newObj.sourceMap === obj.sourceMap
			) {
				return;
			}

			update(obj = newObj);
		} else {
			remove();
		}
	};
}

var replaceText = (function () {
	var textStore = [];

	return function (index, replacement) {
		textStore[index] = replacement;

		return textStore.filter(Boolean).join('\n');
	};
})();

function applyToSingletonTag (style, index, remove, obj) {
	var css = remove ? "" : obj.css;

	if (style.styleSheet) {
		style.styleSheet.cssText = replaceText(index, css);
	} else {
		var cssNode = document.createTextNode(css);
		var childNodes = style.childNodes;

		if (childNodes[index]) style.removeChild(childNodes[index]);

		if (childNodes.length) {
			style.insertBefore(cssNode, childNodes[index]);
		} else {
			style.appendChild(cssNode);
		}
	}
}

function applyToTag (style, obj) {
	var css = obj.css;
	var media = obj.media;

	if(media) {
		style.setAttribute("media", media)
	}

	if(style.styleSheet) {
		style.styleSheet.cssText = css;
	} else {
		while(style.firstChild) {
			style.removeChild(style.firstChild);
		}

		style.appendChild(document.createTextNode(css));
	}
}

function updateLink (link, options, obj) {
	var css = obj.css;
	var sourceMap = obj.sourceMap;

	/*
		If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
		and there is no publicPath defined then lets turn convertToAbsoluteUrls
		on by default.  Otherwise default to the convertToAbsoluteUrls option
		directly
	*/
	var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;

	if (options.convertToAbsoluteUrls || autoFixUrls) {
		css = fixUrls(css);
	}

	if (sourceMap) {
		// http://stackoverflow.com/a/26603875
		css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
	}

	var blob = new Blob([css], { type: "text/css" });

	var oldSrc = link.href;

	link.href = URL.createObjectURL(blob);

	if(oldSrc) URL.revokeObjectURL(oldSrc);
}


/***/ }),

/***/ "./node_modules/style-loader/lib/urls.js":
/*!***********************************************!*\
  !*** ./node_modules/style-loader/lib/urls.js ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports) {


/**
 * When source maps are enabled, `style-loader` uses a link element with a data-uri to
 * embed the css on the page. This breaks all relative urls because now they are relative to a
 * bundle instead of the current page.
 *
 * One solution is to only use full urls, but that may be impossible.
 *
 * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
 *
 * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
 *
 */

module.exports = function (css) {
  // get current location
  var location = typeof window !== "undefined" && window.location;

  if (!location) {
    throw new Error("fixUrls requires window.location");
  }

	// blank or null?
	if (!css || typeof css !== "string") {
	  return css;
  }

  var baseUrl = location.protocol + "//" + location.host;
  var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");

	// convert each url(...)
	/*
	This regular expression is just a way to recursively match brackets within
	a string.

	 /url\s*\(  = Match on the word "url" with any whitespace after it and then a parens
	   (  = Start a capturing group
	     (?:  = Start a non-capturing group
	         [^)(]  = Match anything that isn't a parentheses
	         |  = OR
	         \(  = Match a start parentheses
	             (?:  = Start another non-capturing groups
	                 [^)(]+  = Match anything that isn't a parentheses
	                 |  = OR
	                 \(  = Match a start parentheses
	                     [^)(]*  = Match anything that isn't a parentheses
	                 \)  = Match a end parentheses
	             )  = End Group
              *\) = Match anything and then a close parens
          )  = Close non-capturing group
          *  = Match anything
       )  = Close capturing group
	 \)  = Match a close parens

	 /gi  = Get all matches, not the first.  Be case insensitive.
	 */
	var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
		// strip quotes (if they exist)
		var unquotedOrigUrl = origUrl
			.trim()
			.replace(/^"(.*)"$/, function(o, $1){ return $1; })
			.replace(/^'(.*)'$/, function(o, $1){ return $1; });

		// already a full url? no change
		if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
		  return fullMatch;
		}

		// convert the url to a full url
		var newUrl;

		if (unquotedOrigUrl.indexOf("//") === 0) {
		  	//TODO: should we add protocol?
			newUrl = unquotedOrigUrl;
		} else if (unquotedOrigUrl.indexOf("/") === 0) {
			// path should be relative to the base url
			newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
		} else {
			// path should be relative to current directory
			newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
		}

		// send back the fixed url(...)
		return "url(" + JSON.stringify(newUrl) + ")";
	});

	// send back the fixed css
	return fixedCss;
};


/***/ }),

/***/ "./node_modules/vitessce/dist/es/production/static/css/index.css":
/*!***********************************************************************!*\
  !*** ./node_modules/vitessce/dist/es/production/static/css/index.css ***!
  \***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {


var content = __webpack_require__(/*! !../../../../../../css-loader!./index.css */ "./node_modules/css-loader/index.js!./node_modules/vitessce/dist/es/production/static/css/index.css");

if(typeof content === 'string') content = [[module.i, content, '']];

var transform;
var insertInto;



var options = {"hmr":true}

options.transform = transform
options.insertInto = undefined;

var update = __webpack_require__(/*! ../../../../../../style-loader/lib/addStyles.js */ "./node_modules/style-loader/lib/addStyles.js")(content, options);

if(content.locals) module.exports = content.locals;

if(false) {}

/***/ }),

/***/ "./node_modules/vitessce/dist/umd/production/index.min.js":
/*!****************************************************************!*\
  !*** ./node_modules/vitessce/dist/umd/production/index.min.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

/*! For license information please see index.min.js.LICENSE.txt */
!function(e,t){ true?module.exports=t(__webpack_require__(/*! react */ "./node_modules/react/index.js"),__webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js")):undefined}(this,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="./",n(n.s=1380)}([function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(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 i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=function(e,t,n){return e.fields=t||[],e.fname=n,e};function i(e){return null==e?null:e.fname}function a(e){return null==e?null:e.fields}var o=function(e){return 1===e.length?s(e[0]):u(e)},s=function(e){return function(t){return t[e]}},u=function(e){var t=e.length;return function(n){for(var r=0;r<t;++r)n=n[e[r]];return n}},A=function(e){throw Error(e)},c=function(e){var t,n,r,i=[],a=null,o=0,s=e.length,u="";function c(){i.push(u+e.substring(t,n)),u="",t=n+1}for(e+="",t=n=0;n<s;++n)if("\\"===(r=e[n]))u+=e.substring(t,n),u+=e.substring(++n,++n),t=n;else if(r===a)c(),a=null,o=-1;else{if(a)continue;t===o&&'"'===r||t===o&&"'"===r?(t=n+1,a=r):"."!==r||o?"["===r?(n>t&&c(),o=t=n+1):"]"===r&&(o||A("Access path missing open bracket: "+e),o>0&&c(),o=0,t=n+1):n>t?c():t=n+1}return o&&A("Access path missing closing bracket: "+e),a&&A("Access path missing closing quote: "+e),n>t&&(n++,c()),i},l=function(e,t,n){var i=c(e);return e=1===i.length?i[0]:e,r((n&&n.get||o)(i),[e],t||e)},f=[],h=l("id"),g=r((function(e){return e}),f,"identity"),d=r((function(){return 0}),f,"zero"),p=r((function(){return 1}),f,"one"),v=r((function(){return!0}),f,"true"),y=r((function(){return!1}),f,"false");function m(e,t,n){var r=[t].concat([].slice.call(n));console[e].apply(console,r)}var I=function(e,t){var n=e||0;return{level:function(e){return arguments.length?(n=+e,this):n},error:function(){return n>=1&&m(t||"error","ERROR",arguments),this},warn:function(){return n>=2&&m(t||"warn","WARN",arguments),this},info:function(){return n>=3&&m(t||"log","INFO",arguments),this},debug:function(){return n>=4&&m(t||"log","DEBUG",arguments),this}}},b=Array.isArray,E=function(e){return e===Object(e)},C=function(e){return"__proto__"!==e};function B(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){for(var n in t)if("signals"===n)e.signals=Q(e.signals,t.signals);else{var r="legend"===n?{layout:1}:"style"===n||null;w(e,n,t[n],r)}return e}),{})}function w(e,t,n,r){var i,a;if(C(t))if(E(n)&&!b(n))for(i in a=E(e[t])?e[t]:e[t]={},n)r&&(!0===r||r[i])?w(a,i,n[i]):C(i)&&(a[i]=n[i]);else e[t]=n}function Q(e,t){if(null==e)return t;var n={},r=[];function i(e){n[e.name]||(n[e.name]=1,r.push(e))}return t.forEach(i),e.forEach(i),r}var k=function(e){return e[e.length-1]},_=function(e){return null==e||""===e?null:+e};function x(e){return function(t){return e*Math.exp(t)}}function S(e){return function(t){return Math.log(e*t)}}function O(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function D(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function R(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function j(e,t,n,r){var i=n(e[0]),a=n(k(e)),o=(a-i)*t;return[r(i-o),r(a-o)]}function M(e,t){return j(e,t,_,g)}function N(e,t){var n=Math.sign(e[0]);return j(e,t,S(n),x(n))}function F(e,t,n){return j(e,t,R(n),R(1/n))}function T(e,t,n){return j(e,t,O(n),D(n))}function L(e,t,n,r,i){var a=r(e[0]),o=r(k(e)),s=null!=t?r(t):(a+o)/2;return[i(s+(a-s)*n),i(s+(o-s)*n)]}function P(e,t,n){return L(e,t,n,_,g)}function U(e,t,n){var r=Math.sign(e[0]);return L(e,t,n,S(r),x(r))}function G(e,t,n,r){return L(e,t,n,R(r),R(1/r))}function q(e,t,n,r){return L(e,t,n,O(r),D(r))}function H(e){return 1+~~(new Date(e).getMonth()/3)}function Y(e){return 1+~~(new Date(e).getUTCMonth()/3)}var J=function(e){return null!=e?b(e)?e:[e]:[]},z=function(e,t,n){var r,i=e[0],a=e[1];return a<i&&(r=a,a=i,i=r),(r=a-i)>=n-t?[t,n]:[i=Math.min(Math.max(i,t),n-r),i+r]},K=function(e){return"function"===typeof e},W=function(e,t,n){n=n||{},t=J(t)||[];var i=[],o=[],s={},u=n.comparator||X;return J(e).forEach((function(e,r){null!=e&&(i.push("descending"===t[r]?-1:1),o.push(e=K(e)?e:l(e,null,n)),(a(e)||[]).forEach((function(e){return s[e]=1})))})),0===o.length?null:r(u(o,i),Object.keys(s))},V=function(e,t){return(e<t||null==e)&&null!=t?-1:(e>t||null==t)&&null!=e?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0)},X=function(e,t){return 1===e.length?Z(e[0],t[0]):$(e,t,e.length)},Z=function(e,t){return function(n,r){return V(e(n),e(r))*t}},$=function(e,t,n){return t.push(0),function(r,i){for(var a,o=0,s=-1;0===o&&++s<n;)a=e[s],o=V(a(r),a(i));return o*t[s]}},ee=function(e){return K(e)?e:function(){return e}},te=function(e,t){var n,r;function i(){t(r),n=r=null}return function(t){r=t,n&&clearTimeout(n),n=setTimeout(i,e)}},ne=function(e){for(var t,n,r=1,i=arguments.length;r<i;++r)for(n in t=arguments[r])e[n]=t[n];return e},re=function(e,t){var n,r,i,a,o=0;if(e&&(n=e.length))if(null==t){for(r=e[o];o<n&&(null==r||r!==r);r=e[++o]);for(i=a=r;o<n;++o)null!=(r=e[o])&&(r<i&&(i=r),r>a&&(a=r))}else{for(r=t(e[o]);o<n&&(null==r||r!==r);r=t(e[++o]));for(i=a=r;o<n;++o)null!=(r=t(e[o]))&&(r<i&&(i=r),r>a&&(a=r))}return[i,a]},ie=function(e,t){var n,r,i,a,o,s=-1,u=e.length;if(null==t){for(;++s<u;)if(null!=(r=e[s])&&r>=r){n=i=r;break}if(s===u)return[-1,-1];for(a=o=s;++s<u;)null!=(r=e[s])&&(n>r&&(n=r,a=s),i<r&&(i=r,o=s))}else{for(;++s<u;)if(null!=(r=t(e[s],s,e))&&r>=r){n=i=r;break}if(s===u)return[-1,-1];for(a=o=s;++s<u;)null!=(r=t(e[s],s,e))&&(n>r&&(n=r,a=s),i<r&&(i=r,o=s))}return[a,o]},ae=Object.prototype.hasOwnProperty,oe=function(e,t){return ae.call(e,t)},se={},ue=function(e){var t,n,r={};function i(e){return oe(r,e)&&r[e]!==se}return t={size:0,empty:0,object:r,has:i,get:function(e){return i(e)?r[e]:void 0},set:function(e,n){return i(e)||(++t.size,r[e]===se&&--t.empty),r[e]=n,this},delete:function(e){return i(e)&&(--t.size,++t.empty,r[e]=se),this},clear:function(){t.size=t.empty=0,t.object=r={}},test:function(e){return arguments.length?(n=e,t):n},clean:function(){var e,i,a={},o=0;for(e in r)(i=r[e])===se||n&&n(i)||(a[e]=i,++o);t.size=o,t.empty=0,t.object=r=a}},e&&Object.keys(e).forEach((function(n){t.set(n,e[n])})),t},Ae=function(e,t,n,r,i,a){if(!n&&0!==n)return a;var o,s,u=e[0],A=k(e),c=+n;return A<u&&(o=u,u=A,A=o),(o=Math.abs(t-u))<(s=Math.abs(A-t))&&o<=c?r:s<=c?i:a},ce=function(e,t){var n=e.prototype=Object.create(t.prototype);return n.constructor=e,n},le=function(e,t,n,r){var i,a=t[0],o=t[t.length-1];return a>o&&(i=a,a=o,o=i),r=void 0===r||r,((n=void 0===n||n)?a<=e:a<e)&&(r?e<=o:e<o)},fe=function(e){return"boolean"===typeof e},he=function(e){return"[object Date]"===Object.prototype.toString.call(e)},ge=function(e){return"number"===typeof e},de=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},pe=function(e){return"string"===typeof e},ve=function(e,t,n){e&&(e=t?J(e).map((function(e){return e.replace(/\\(.)/g,"$1")})):J(e));var i,a=e&&e.length,s=n&&n.get||o,u=function(e){return s(t?[e]:c(e))};if(a)if(1===a){var A=u(e[0]);i=function(e){return""+A(e)}}else{var l=e.map(u);i=function(e){for(var t=""+l[0](e),n=0;++n<a;)t+="|"+l[n](e);return t}}else i=function(){return""};return r(i,e,"key")},ye=function(e,t){var n=e[0],r=k(e),i=+t;return i?1===i?r:n+i*(r-n):n},me=function(e){var t,n,r;e=+e||1e4;var i=function(){t={},n={},r=0},a=function(i,a){return++r>e&&(n=t,t={},r=1),t[i]=a};return i(),{clear:i,has:function(e){return oe(t,e)||oe(n,e)},get:function(e){return oe(t,e)?t[e]:oe(n,e)?a(e,n[e]):void 0},set:function(e,n){return oe(t,e)?t[e]=n:a(e,n)}}},Ie=function(e,t,n,r){var i=t.length,a=n.length;if(!a)return t;if(!i)return n;for(var o=r||new t.constructor(i+a),s=0,u=0,A=0;s<i&&u<a;++A)o[A]=e(t[s],n[u])>0?n[u++]:t[s++];for(;s<i;++s,++A)o[A]=t[s];for(;u<a;++u,++A)o[A]=n[u];return o},be=function(e,t){for(var n="";--t>=0;)n+=e;return n},Ee=function(e,t,n,r){var i=n||" ",a=e+"",o=t-a.length;return o<=0?a:"left"===r?be(i,o)+a:"center"===r?be(i,~~(o/2))+a+be(i,Math.ceil(o/2)):a+be(i,o)},Ce=function(e){return e&&k(e)-e[0]||0};function Be(e){return b(e)?"["+e.map(Be)+"]":E(e)||pe(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}var we=function(e){return null==e||""===e?null:!(!e||"false"===e||"0"===e)&&!!e};function Qe(e){return ge(e)||he(e)?e:Date.parse(e)}var ke=function(e,t){return t=t||Qe,null==e||""===e?null:t(e)},_e=function(e){return null==e||""===e?null:e+""},xe=function(e){for(var t={},n=0,r=e.length;n<r;++n)t[e[n]]=!0;return t},Se=function(e,t,n,r){var i=null!=r?r:"\u2026",a=e+"",o=a.length,s=Math.max(0,t-i.length);return o<=t?a:"left"===n?i+a.slice(o-s):"center"===n?a.slice(0,Math.ceil(s/2))+i+a.slice(o-~~(s/2)):a.slice(0,s)+i},Oe=function(e,t,n){if(e)if(t)for(var r,i=0,a=e.length;i<a;++i)(r=t(e[i]))&&n(r,i,e);else e.forEach(n)};n.d(t,"f",(function(){return r})),n.d(t,"h",(function(){return i})),n.d(t,"g",(function(){return a})),n.d(t,"w",(function(){return h})),n.d(t,"x",(function(){return g})),n.d(t,"kb",(function(){return d})),n.d(t,"O",(function(){return p})),n.d(t,"gb",(function(){return v})),n.d(t,"r",(function(){return y})),n.d(t,"K",(function(){return I})),n.d(t,"d",(function(){return 0})),n.d(t,"b",(function(){return 1})),n.d(t,"e",(function(){return 2})),n.d(t,"c",(function(){return 3})),n.d(t,"a",(function(){return 4})),n.d(t,"N",(function(){return B})),n.d(t,"jb",(function(){return w})),n.d(t,"Q",(function(){return M})),n.d(t,"R",(function(){return N})),n.d(t,"S",(function(){return F})),n.d(t,"T",(function(){return T})),n.d(t,"lb",(function(){return P})),n.d(t,"mb",(function(){return U})),n.d(t,"nb",(function(){return G})),n.d(t,"ob",(function(){return q})),n.d(t,"V",(function(){return H})),n.d(t,"hb",(function(){return Y})),n.d(t,"i",(function(){return J})),n.d(t,"j",(function(){return z})),n.d(t,"k",(function(){return W})),n.d(t,"l",(function(){return ee})),n.d(t,"m",(function(){return te})),n.d(t,"n",(function(){return A})),n.d(t,"o",(function(){return ne})),n.d(t,"p",(function(){return re})),n.d(t,"q",(function(){return ie})),n.d(t,"s",(function(){return ue})),n.d(t,"t",(function(){return l})),n.d(t,"u",(function(){return Ae})),n.d(t,"v",(function(){return oe})),n.d(t,"y",(function(){return ce})),n.d(t,"z",(function(){return le})),n.d(t,"A",(function(){return b})),n.d(t,"B",(function(){return fe})),n.d(t,"C",(function(){return he})),n.d(t,"D",(function(){return K})),n.d(t,"E",(function(){return ge})),n.d(t,"F",(function(){return E})),n.d(t,"G",(function(){return de})),n.d(t,"H",(function(){return pe})),n.d(t,"I",(function(){return ve})),n.d(t,"J",(function(){return ye})),n.d(t,"L",(function(){return me})),n.d(t,"M",(function(){return Ie})),n.d(t,"P",(function(){return Ee})),n.d(t,"U",(function(){return k})),n.d(t,"W",(function(){return be})),n.d(t,"X",(function(){return Ce})),n.d(t,"Y",(function(){return c})),n.d(t,"Z",(function(){return Be})),n.d(t,"ab",(function(){return we})),n.d(t,"bb",(function(){return ke})),n.d(t,"cb",(function(){return _})),n.d(t,"eb",(function(){return _e})),n.d(t,"db",(function(){return xe})),n.d(t,"fb",(function(){return Se})),n.d(t,"ib",(function(){return Oe}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(220);function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Object(r.a)(e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(25),i=n(58);function a(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!==typeof t?Object(i.a)(e):t}},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports=n(388)},function(e,t,n){"use strict";n.d(t,"q",(function(){return i})),n.d(t,"f",(function(){return a})),n.d(t,"a",(function(){return o})),n.d(t,"h",(function(){return s})),n.d(t,"p",(function(){return u})),n.d(t,"o",(function(){return A})),n.d(t,"k",(function(){return c})),n.d(t,"l",(function(){return l})),n.d(t,"m",(function(){return f})),n.d(t,"n",(function(){return h})),n.d(t,"e",(function(){return g})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return p})),n.d(t,"j",(function(){return v})),n.d(t,"i",(function(){return y})),n.d(t,"g",(function(){return m})),n.d(t,"b",(function(){return I}));var r=n(30);function i(e,t){if(e===t){var n=t[1],r=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]=n,e[6]=t[9],e[7]=t[13],e[8]=r,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}function a(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],A=t[7],c=t[8],l=t[9],f=t[10],h=t[11],g=t[12],d=t[13],p=t[14],v=t[15],y=n*s-r*o,m=n*u-i*o,I=n*A-a*o,b=r*u-i*s,E=r*A-a*s,C=i*A-a*u,B=c*d-l*g,w=c*p-f*g,Q=c*v-h*g,k=l*p-f*d,_=l*v-h*d,x=f*v-h*p,S=y*x-m*_+I*k+b*Q-E*w+C*B;return S?(S=1/S,e[0]=(s*x-u*_+A*k)*S,e[1]=(i*_-r*x-a*k)*S,e[2]=(d*C-p*E+v*b)*S,e[3]=(f*E-l*C-h*b)*S,e[4]=(u*Q-o*x-A*w)*S,e[5]=(n*x-i*Q+a*w)*S,e[6]=(p*I-g*C-v*m)*S,e[7]=(c*C-f*I+h*m)*S,e[8]=(o*_-s*Q+A*B)*S,e[9]=(r*Q-n*_-a*B)*S,e[10]=(g*E-d*I+v*y)*S,e[11]=(l*I-c*E-h*y)*S,e[12]=(s*w-o*k-u*B)*S,e[13]=(n*k-r*w+i*B)*S,e[14]=(d*m-g*b-p*y)*S,e[15]=(c*b-l*m+f*y)*S,e):null}function o(e){var t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],A=e[8],c=e[9],l=e[10],f=e[11],h=e[12],g=e[13],d=e[14],p=e[15];return(t*o-n*a)*(l*p-f*d)-(t*s-r*a)*(c*p-f*g)+(t*u-i*a)*(c*d-l*g)+(n*s-r*o)*(A*p-f*h)-(n*u-i*o)*(A*d-l*h)+(r*u-i*s)*(A*g-c*h)}function s(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],A=t[6],c=t[7],l=t[8],f=t[9],h=t[10],g=t[11],d=t[12],p=t[13],v=t[14],y=t[15],m=n[0],I=n[1],b=n[2],E=n[3];return e[0]=m*r+I*s+b*l+E*d,e[1]=m*i+I*u+b*f+E*p,e[2]=m*a+I*A+b*h+E*v,e[3]=m*o+I*c+b*g+E*y,m=n[4],I=n[5],b=n[6],E=n[7],e[4]=m*r+I*s+b*l+E*d,e[5]=m*i+I*u+b*f+E*p,e[6]=m*a+I*A+b*h+E*v,e[7]=m*o+I*c+b*g+E*y,m=n[8],I=n[9],b=n[10],E=n[11],e[8]=m*r+I*s+b*l+E*d,e[9]=m*i+I*u+b*f+E*p,e[10]=m*a+I*A+b*h+E*v,e[11]=m*o+I*c+b*g+E*y,m=n[12],I=n[13],b=n[14],E=n[15],e[12]=m*r+I*s+b*l+E*d,e[13]=m*i+I*u+b*f+E*p,e[14]=m*a+I*A+b*h+E*v,e[15]=m*o+I*c+b*g+E*y,e}function u(e,t,n){var r,i,a,o,s,u,A,c,l,f,h,g,d=n[0],p=n[1],v=n[2];return t===e?(e[12]=t[0]*d+t[4]*p+t[8]*v+t[12],e[13]=t[1]*d+t[5]*p+t[9]*v+t[13],e[14]=t[2]*d+t[6]*p+t[10]*v+t[14],e[15]=t[3]*d+t[7]*p+t[11]*v+t[15]):(r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],A=t[6],c=t[7],l=t[8],f=t[9],h=t[10],g=t[11],e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=u,e[6]=A,e[7]=c,e[8]=l,e[9]=f,e[10]=h,e[11]=g,e[12]=r*d+s*p+l*v+t[12],e[13]=i*d+u*p+f*v+t[13],e[14]=a*d+A*p+h*v+t[14],e[15]=o*d+c*p+g*v+t[15]),e}function A(e,t,n){var r=n[0],i=n[1],a=n[2];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]*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}function c(e,t,n,i){var a,o,s,u,A,c,l,f,h,g,d,p,v,y,m,I,b,E,C,B,w,Q,k,_,x=i[0],S=i[1],O=i[2],D=Math.hypot(x,S,O);return D<r.b?null:(x*=D=1/D,S*=D,O*=D,a=Math.sin(n),s=1-(o=Math.cos(n)),u=t[0],A=t[1],c=t[2],l=t[3],f=t[4],h=t[5],g=t[6],d=t[7],p=t[8],v=t[9],y=t[10],m=t[11],I=x*x*s+o,b=S*x*s+O*a,E=O*x*s-S*a,C=x*S*s-O*a,B=S*S*s+o,w=O*S*s+x*a,Q=x*O*s+S*a,k=S*O*s-x*a,_=O*O*s+o,e[0]=u*I+f*b+p*E,e[1]=A*I+h*b+v*E,e[2]=c*I+g*b+y*E,e[3]=l*I+d*b+m*E,e[4]=u*C+f*B+p*w,e[5]=A*C+h*B+v*w,e[6]=c*C+g*B+y*w,e[7]=l*C+d*B+m*w,e[8]=u*Q+f*k+p*_,e[9]=A*Q+h*k+v*_,e[10]=c*Q+g*k+y*_,e[11]=l*Q+d*k+m*_,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function l(e,t,n){var r=Math.sin(n),i=Math.cos(n),a=t[4],o=t[5],s=t[6],u=t[7],A=t[8],c=t[9],l=t[10],f=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+A*r,e[5]=o*i+c*r,e[6]=s*i+l*r,e[7]=u*i+f*r,e[8]=A*i-a*r,e[9]=c*i-o*r,e[10]=l*i-s*r,e[11]=f*i-u*r,e}function f(e,t,n){var r=Math.sin(n),i=Math.cos(n),a=t[0],o=t[1],s=t[2],u=t[3],A=t[8],c=t[9],l=t[10],f=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-A*r,e[1]=o*i-c*r,e[2]=s*i-l*r,e[3]=u*i-f*r,e[8]=a*r+A*i,e[9]=o*r+c*i,e[10]=s*r+l*i,e[11]=u*r+f*i,e}function h(e,t,n){var r=Math.sin(n),i=Math.cos(n),a=t[0],o=t[1],s=t[2],u=t[3],A=t[4],c=t[5],l=t[6],f=t[7];return t!==e&&(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[0]=a*i+A*r,e[1]=o*i+c*r,e[2]=s*i+l*r,e[3]=u*i+f*r,e[4]=A*i-a*r,e[5]=c*i-o*r,e[6]=l*i-s*r,e[7]=f*i-u*r,e}function g(e,t){var n=t[0],r=t[1],i=t[2],a=t[4],o=t[5],s=t[6],u=t[8],A=t[9],c=t[10];return e[0]=Math.hypot(n,r,i),e[1]=Math.hypot(a,o,s),e[2]=Math.hypot(u,A,c),e}function d(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=n+n,s=r+r,u=i+i,A=n*o,c=r*o,l=r*s,f=i*o,h=i*s,g=i*u,d=a*o,p=a*s,v=a*u;return e[0]=1-l-g,e[1]=c+v,e[2]=f-p,e[3]=0,e[4]=c-v,e[5]=1-A-g,e[6]=h+d,e[7]=0,e[8]=f+p,e[9]=h-d,e[10]=1-A-l,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function p(e,t,n,r,i,a,o){var s=1/(n-t),u=1/(i-r),A=1/(a-o);return e[0]=2*a*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*a*u,e[6]=0,e[7]=0,e[8]=(n+t)*s,e[9]=(i+r)*u,e[10]=(o+a)*A,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*A,e[15]=0,e}function v(e,t,n,r,i){var a,o=1/Math.tan(t/2);return e[0]=o/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(a=1/(r-i),e[10]=(i+r)*a,e[14]=2*i*r*a):(e[10]=-1,e[14]=-2*r),e}function y(e,t,n,r,i,a,o){var s=1/(t-n),u=1/(r-i),A=1/(a-o);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*A,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*u,e[14]=(o+a)*A,e[15]=1,e}function m(e,t,n,i){var a,o,s,u,A,c,l,f,h,g,d=t[0],p=t[1],v=t[2],y=i[0],m=i[1],I=i[2],b=n[0],E=n[1],C=n[2];return Math.abs(d-b)<r.b&&Math.abs(p-E)<r.b&&Math.abs(v-C)<r.b?function(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}(e):(l=d-b,f=p-E,h=v-C,a=m*(h*=g=1/Math.hypot(l,f,h))-I*(f*=g),o=I*(l*=g)-y*h,s=y*f-m*l,(g=Math.hypot(a,o,s))?(a*=g=1/g,o*=g,s*=g):(a=0,o=0,s=0),u=f*s-h*o,A=h*a-l*s,c=l*o-f*a,(g=Math.hypot(u,A,c))?(u*=g=1/g,A*=g,c*=g):(u=0,A=0,c=0),e[0]=a,e[1]=u,e[2]=l,e[3]=0,e[4]=o,e[5]=A,e[6]=f,e[7]=0,e[8]=s,e[9]=c,e[10]=h,e[11]=0,e[12]=-(a*d+o*p+s*v),e[13]=-(u*d+A*p+c*v),e[14]=-(l*d+f*p+h*v),e[15]=1,e)}function I(e,t){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],A=e[6],c=e[7],l=e[8],f=e[9],h=e[10],g=e[11],d=e[12],p=e[13],v=e[14],y=e[15],m=t[0],I=t[1],b=t[2],E=t[3],C=t[4],B=t[5],w=t[6],Q=t[7],k=t[8],_=t[9],x=t[10],S=t[11],O=t[12],D=t[13],R=t[14],j=t[15];return Math.abs(n-m)<=r.b*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(i-I)<=r.b*Math.max(1,Math.abs(i),Math.abs(I))&&Math.abs(a-b)<=r.b*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(o-E)<=r.b*Math.max(1,Math.abs(o),Math.abs(E))&&Math.abs(s-C)<=r.b*Math.max(1,Math.abs(s),Math.abs(C))&&Math.abs(u-B)<=r.b*Math.max(1,Math.abs(u),Math.abs(B))&&Math.abs(A-w)<=r.b*Math.max(1,Math.abs(A),Math.abs(w))&&Math.abs(c-Q)<=r.b*Math.max(1,Math.abs(c),Math.abs(Q))&&Math.abs(l-k)<=r.b*Math.max(1,Math.abs(l),Math.abs(k))&&Math.abs(f-_)<=r.b*Math.max(1,Math.abs(f),Math.abs(_))&&Math.abs(h-x)<=r.b*Math.max(1,Math.abs(h),Math.abs(x))&&Math.abs(g-S)<=r.b*Math.max(1,Math.abs(g),Math.abs(S))&&Math.abs(d-O)<=r.b*Math.max(1,Math.abs(d),Math.abs(O))&&Math.abs(p-D)<=r.b*Math.max(1,Math.abs(p),Math.abs(D))&&Math.abs(v-R)<=r.b*Math.max(1,Math.abs(v),Math.abs(R))&&Math.abs(y-j)<=r.b*Math.max(1,Math.abs(y),Math.abs(j))}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports=n(388)},function(e,t,n){"use strict";function r(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 i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(219);function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Object(r.a)(e,t)}},function(e,t,n){"use strict";var r=n(42),i=n(303);function a(e){return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(8);function s(e,t){return!t||"object"!==a(t)&&"function"!==typeof t?Object(o.a)(e):t}function u(e){return function(){var t,n=Object(r.a)(e);if(Object(i.a)()){var a=Object(r.a)(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return s(this,t)}}n.d(t,"a",(function(){return u}))},function(e,t,n){"use strict";var r=n(353);var i=n(354);function a(e,t){return Object(r.a)(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}(e,t)||Object(i.a)()}n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"g",(function(){return a})),n.d(t,"e",(function(){return o})),n.d(t,"i",(function(){return s})),n.d(t,"j",(function(){return u})),n.d(t,"d",(function(){return A})),n.d(t,"c",(function(){return c})),n.d(t,"h",(function(){return l})),n.d(t,"q",(function(){return f})),n.d(t,"p",(function(){return h})),n.d(t,"r",(function(){return g})),n.d(t,"k",(function(){return d})),n.d(t,"l",(function(){return p})),n.d(t,"m",(function(){return v})),n.d(t,"a",(function(){return y})),n.d(t,"o",(function(){return m})),n.d(t,"f",(function(){return I})),n.d(t,"n",(function(){return b}));var r=n(30);function i(){var e=new r.a(3);return r.a!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function a(e){var t=e[0],n=e[1],r=e[2];return Math.hypot(t,n,r)}function o(e,t,n){var i=new r.a(3);return i[0]=e,i[1]=t,i[2]=n,i}function s(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function u(e,t){var n=t[0],r=t[1],i=t[2],a=n*n+r*r+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 A(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function c(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[0],s=n[1],u=n[2];return e[0]=i*u-a*s,e[1]=a*o-r*u,e[2]=r*s-i*o,e}function l(e,t,n,r){var i=t[0],a=t[1],o=t[2];return e[0]=i+r*(n[0]-i),e[1]=a+r*(n[1]-a),e[2]=o+r*(n[2]-o),e}function f(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[3]*r+n[7]*i+n[11]*a+n[15];return o=o||1,e[0]=(n[0]*r+n[4]*i+n[8]*a+n[12])/o,e[1]=(n[1]*r+n[5]*i+n[9]*a+n[13])/o,e[2]=(n[2]*r+n[6]*i+n[10]*a+n[14])/o,e}function h(e,t,n){var r=t[0],i=t[1],a=t[2];return e[0]=r*n[0]+i*n[3]+a*n[6],e[1]=r*n[1]+i*n[4]+a*n[7],e[2]=r*n[2]+i*n[5]+a*n[8],e}function g(e,t,n){var r=n[0],i=n[1],a=n[2],o=n[3],s=t[0],u=t[1],A=t[2],c=i*A-a*u,l=a*s-r*A,f=r*u-i*s,h=i*f-a*l,g=a*c-r*f,d=r*l-i*c,p=2*o;return c*=p,l*=p,f*=p,h*=2,g*=2,d*=2,e[0]=s+c+h,e[1]=u+l+g,e[2]=A+f+d,e}function d(e,t,n,r){var i=[],a=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],a[0]=i[0],a[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),a[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),e[0]=a[0]+n[0],e[1]=a[1]+n[1],e[2]=a[2]+n[2],e}function p(e,t,n,r){var i=[],a=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],a[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),a[1]=i[1],a[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),e[0]=a[0]+n[0],e[1]=a[1]+n[1],e[2]=a[2]+n[2],e}function v(e,t,n,r){var i=[],a=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],a[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),a[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),a[2]=i[2],e[0]=a[0]+n[0],e[1]=a[1]+n[1],e[2]=a[2]+n[2],e}function y(e,t){var n=e[0],r=e[1],i=e[2],a=t[0],o=t[1],s=t[2],u=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(a*a+o*o+s*s),c=u&&A(e,t)/u;return Math.acos(Math.min(Math.max(c,-1),1))}var m=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e},I=a,b=function(e){var t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r};!function(){var e=i()}()},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(150);function i(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=Object(r.a)(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 i,a,o=!0,s=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==i.return||i.return()}finally{if(s)throw a}}}}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n(406);var r=n(164),i=n(139),a=n(61),o=n(43),s=Object(a.isBrowser)(),u=s&&"undefined"!==typeof document,A={webgl2:!0,webgl1:!0,throwOnError:!0,manageState:!0,canvas:null,debug:!1,width:800,height:600};function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(o.a)(s,"createGLContext on available in the browser.\nCreate your own headless context or use 'createHeadlessContext' from @luma.gl/test-utils");var t,n=e=Object.assign({},A,e),r=n.width,i=n.height;function a(t){if(e.throwOnError)throw new Error(t);return console.error(t),null}e.onError=a;var u=e,c=u.canvas,f=g({canvas:c,width:r,height:i,onError:a});return(t=h(f,e))?(d(t=l(t,e)),t):null}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||e._instrumented)return e;e._version=e._version||p(e),e.luma=e.luma||{},e.luma.canvasSizeInfo=e.luma.canvasSizeInfo||{};var n=t=Object.assign({},A,t),r=n.manageState,u=n.debug;return r&&Object(i.a)(e,{copyState:!1,log:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o.i.log.apply(o.i,[1].concat(t))()}}),s&&u&&(a.global.makeDebugContext?(e=a.global.makeDebugContext(e,t),o.i.level=Math.max(o.i.level,1)):o.i.warn('WebGL debug mode not activated. import "@luma.gl/debug" to enable.')()),e._instrumented=!0,e}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.canvas){var n=Object(o.e)(t.useDevicePixels);v(e,n,t)}else{var r=e.getExtension("STACKGL_resize_drawingbuffer");r&&"width"in t&&"height"in t&&r.resize(t.width,t.height)}}function h(e,t){var n=t.onError,r=function(e){return n("WebGL context: ".concat(e.statusMessage||"error"))};e.addEventListener("webglcontextcreationerror",r,!1);var i=t.webgl1,a=void 0===i||i,o=t.webgl2,s=void 0===o||o,u=null;return s&&(u=(u=u||e.getContext("webgl2",t))||e.getContext("experimental-webgl2",t)),a&&(u=(u=u||e.getContext("webgl",t))||e.getContext("experimental-webgl",t)),e.removeEventListener("webglcontextcreationerror",r,!1),u||n("Failed to create ".concat(s&&!a?"WebGL2":"WebGL"," context"))}function g(e){var t,n=e.canvas,r=e.width,i=void 0===r?800:r,a=e.height,o=void 0===a?600:a,s=e.onError;"string"===typeof n?(u&&"complete"===document.readyState||s("createGLContext called on canvas '".concat(n,"' before page was loaded")),t=document.getElementById(n)):n?t=n:((t=document.createElement("canvas")).id="lumagl-canvas",t.style.width=Number.isFinite(i)?"".concat(i,"px"):"100%",t.style.height=Number.isFinite(o)?"".concat(o,"px"):"100%",document.body.insertBefore(t,document.body.firstChild));return t}function d(e){var t=Object(o.h)(e)?"WebGL2":"WebGL1",n=function(e){var t=e.getParameter(7936),n=e.getParameter(7937),r=e.getExtension("WEBGL_debug_renderer_info");return{vendor:r&&e.getParameter(r.UNMASKED_VENDOR_WEBGL||7936)||t,renderer:r&&e.getParameter(r.UNMASKED_RENDERER_WEBGL||7937)||n,vendorMasked:t,rendererMasked:n,version:e.getParameter(7938),shadingLanguageVersion:e.getParameter(35724)}}(e),r=n?"(".concat(n.vendor,",").concat(n.renderer,")"):"",i=e.debug?" debug":"";o.i.info(1,"".concat(t).concat(i," context ").concat(r))()}function p(e){return"undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext?2:1}function v(e,t,n){var r="width"in n?n.width:e.canvas.clientWidth,i="height"in n?n.height:e.canvas.clientHeight;r&&i||(o.i.log(1,"Canvas clientWidth/clientHeight is 0")(),t=1,r=e.canvas.width||1,i=e.canvas.height||1),e.luma=e.luma||{},e.luma.canvasSizeInfo=e.luma.canvasSizeInfo||{};var a=e.luma.canvasSizeInfo;if(a.clientWidth!==r||a.clientHeight!==i||a.devicePixelRatio!==t){var s=t,u=Math.floor(r*s),A=Math.floor(i*s);e.canvas.width=u,e.canvas.height=A,e.drawingBufferWidth===u&&e.drawingBufferHeight===A||(o.i.warn("Device pixel ratio clamped")(),s=Math.min(e.drawingBufferWidth/r,e.drawingBufferHeight/i),e.canvas.width=Math.floor(r*s),e.canvas.height=Math.floor(i*s)),Object.assign(e.luma.canvasSizeInfo,{clientWidth:r,clientHeight:i,devicePixelRatio:t})}}n.d(t,"d",(function(){return r.a})),n.d(t,"k",(function(){return r.c})),n.d(t,"i",(function(){return r.b})),n.d(t,"l",(function(){return r.d})),n.d(t,"a",(function(){return c})),n.d(t,"j",(function(){return f})),n.d(t,"e",(function(){return l})),n.d(t,"h",(function(){return o.i})),n.d(t,"c",(function(){return o.c})),n.d(t,"b",(function(){return o.b})),n.d(t,"f",(function(){return o.g})),n.d(t,"g",(function(){return o.h}))},function(e,t,n){"use strict";var r=n(201);var i=n(265),a=n(150);function o(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(i.a)(e)||Object(a.a)(e)||function(){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.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";var r=n(352);function i(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||Object(r.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";var r=n(261);var i=n(150),a=n(262);function o(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}(e,t)||Object(i.a)(e,t)||Object(a.a)()}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(A){return void n(A)}s.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,a){var o=e.apply(t,n);function s(e){r(o,i,a,s,u,"next",e)}function u(e){r(o,i,a,s,u,"throw",e)}s(void 0)}))}}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(219),i=n(303);function a(e,t,n){return(a=Object(i.a)()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var a=new(Function.bind.apply(e,i));return n&&Object(r.a)(a,n.prototype),a}).apply(null,arguments)}},function(e,t,n){e.exports=n(514)()},function(e,t,n){"use strict";var r=n(4);function i(e,t,n){return(i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(r.a)(e)););return e}(e,t);if(i){var a=Object.getOwnPropertyDescriptor(i,t);return a.get?a.get.call(n):a.value}})(e,t,n||e)}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return a}));var r=1e-6,i="undefined"!==typeof Float32Array?Float32Array:Array,a=Math.random;Math.PI;Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)})},function(e,t,n){"use strict";n.d(t,"f",(function(){return u})),n.d(t,"p",(function(){return A})),n.d(t,"j",(function(){return c})),n.d(t,"k",(function(){return l})),n.d(t,"l",(function(){return f})),n.d(t,"m",(function(){return h})),n.d(t,"b",(function(){return g})),n.d(t,"q",(function(){return d})),n.d(t,"g",(function(){return p})),n.d(t,"c",(function(){return v})),n.d(t,"e",(function(){return y})),n.d(t,"a",(function(){return m})),n.d(t,"o",(function(){return I})),n.d(t,"d",(function(){return b})),n.d(t,"i",(function(){return E})),n.d(t,"h",(function(){return C})),n.d(t,"r",(function(){return B})),n.d(t,"n",(function(){return Q}));var r=n(30),i=n(45),a=n(17),o=n(40);function s(){var e=new r.a(4);return r.a!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function u(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function A(e,t,n){n*=.5;var r=Math.sin(n);return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=Math.cos(n),e}function c(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=n[0],u=n[1],A=n[2],c=n[3];return e[0]=r*c+o*s+i*A-a*u,e[1]=i*c+o*u+a*s-r*A,e[2]=a*c+o*A+r*u-i*s,e[3]=o*c-r*s-i*u-a*A,e}function l(e,t,n){n*=.5;var r=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(n),u=Math.cos(n);return e[0]=r*u+o*s,e[1]=i*u+a*s,e[2]=a*u-i*s,e[3]=o*u-r*s,e}function f(e,t,n){n*=.5;var r=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(n),u=Math.cos(n);return e[0]=r*u-a*s,e[1]=i*u+o*s,e[2]=a*u+r*s,e[3]=o*u-i*s,e}function h(e,t,n){n*=.5;var r=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(n),u=Math.cos(n);return e[0]=r*u+i*s,e[1]=i*u-r*s,e[2]=a*u+o*s,e[3]=o*u-a*s,e}function g(e,t){var n=t[0],r=t[1],i=t[2];return e[0]=n,e[1]=r,e[2]=i,e[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),e}function d(e,t,n,i){var a,o,s,u,A,c=t[0],l=t[1],f=t[2],h=t[3],g=n[0],d=n[1],p=n[2],v=n[3];return(o=c*g+l*d+f*p+h*v)<0&&(o=-o,g=-g,d=-d,p=-p,v=-v),1-o>r.b?(a=Math.acos(o),s=Math.sin(a),u=Math.sin((1-i)*a)/s,A=Math.sin(i*a)/s):(u=1-i,A=i),e[0]=u*c+A*g,e[1]=u*l+A*d,e[2]=u*f+A*p,e[3]=u*h+A*v,e}function p(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=n*n+r*r+i*i+a*a,s=o?1/o:0;return e[0]=-n*s,e[1]=-r*s,e[2]=-i*s,e[3]=a*s,e}function v(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){var n,r=t[0]+t[4]+t[8];if(r>0)n=Math.sqrt(r+1),e[3]=.5*n,n=.5/n,e[0]=(t[5]-t[7])*n,e[1]=(t[6]-t[2])*n,e[2]=(t[1]-t[3])*n;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;n=Math.sqrt(t[3*i+i]-t[3*a+a]-t[3*o+o]+1),e[i]=.5*n,n=.5/n,e[3]=(t[3*a+o]-t[3*o+a])*n,e[a]=(t[3*a+i]+t[3*i+a])*n,e[o]=(t[3*o+i]+t[3*i+o])*n}return e}o.b,o.g,o.c,o.l;var m=o.a,I=o.k,b=o.d,E=o.i,C=o.h,B=o.m,w=o.j,Q=(o.f,o.e,function(){var e=a.b(),t=a.e(1,0,0),n=a.e(0,1,0);return function(r,i,o){var s=a.d(i,o);return s<-.999999?(a.c(e,t,i),a.f(e)<1e-6&&a.c(e,n,i),a.j(e,e),A(r,e,Math.PI),r):s>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(a.c(e,i,o),r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=1+s,w(r,r))}}());(function(){var e=s(),t=s()})(),function(){var e=i.a()}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"e",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"d",(function(){return s})),n.d(t,"c",(function(){return u})),n.d(t,"g",(function(){return A})),n.d(t,"h",(function(){return c})),n.d(t,"i",(function(){return l})),n.d(t,"j",(function(){return f})),n.d(t,"f",(function(){return h}));var r=n(30);function i(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function a(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function o(e){var t=e[0],n=e[1];return Math.hypot(t,n)}function s(e,t){return e[0]=-t[0],e[1]=-t[1],e}function u(e,t,n,r){var i=t[0],a=t[1];return e[0]=i+r*(n[0]-i),e[1]=a+r*(n[1]-a),e}function A(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e}function c(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function l(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[3]*i+n[6],e[1]=n[1]*r+n[4]*i+n[7],e}function f(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[4]*i+n[12],e[1]=n[1]*r+n[5]*i+n[13],e}var h=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e};!function(){var e=function(){var e=new r.a(2);return r.a!=Float32Array&&(e[0]=0,e[1]=0),e}()}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(175);function i(e,t){if(null==e)return{};var n,i,a=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";n.d(t,"f",(function(){return A})),n.d(t,"g",(function(){return c})),n.d(t,"l",(function(){return f})),n.d(t,"m",(function(){return h})),n.d(t,"e",(function(){return g})),n.d(t,"s",(function(){return p})),n.d(t,"r",(function(){return v})),n.d(t,"o",(function(){return y})),n.d(t,"i",(function(){return m})),n.d(t,"p",(function(){return I})),n.d(t,"h",(function(){return b})),n.d(t,"q",(function(){return E})),n.d(t,"b",(function(){return C})),n.d(t,"a",(function(){return B})),n.d(t,"c",(function(){return w})),n.d(t,"d",(function(){return Q})),n.d(t,"n",(function(){return k})),n.d(t,"j",(function(){return _})),n.d(t,"k",(function(){return x})),n.d(t,"t",(function(){return S}));var r=n(25),i=n(65),a=n(23),o=n(143),s=1/Math.PI*180,u=1/180*Math.PI,A={};function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e)Object(o.a)(t in A),A[t]=e[t];return A}function l(e){return Math.round(e/A.EPSILON)*A.EPSILON}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.precision,r=void 0===n?A.precision||4:n;return e=l(e),"".concat(parseFloat(e.toPrecision(r)))}function h(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&void 0!==e.length}function g(e){return e.clone?e.clone():Object(i.a)(Array,Object(a.a)(e))}function d(e,t,n){if(h(e)){n=n||((i=e).clone?i.clone():new Array(i.length));for(var r=0;r<n.length&&r<e.length;++r)n[r]=t(e[r],r,n);return n}var i;return t(e)}function p(e){return y(e)}function v(e){return m(e)}function y(e,t){return d(e,(function(e){return e*u}),t)}function m(e,t){return d(e,(function(e){return e*s}),t)}function I(e){return d(e,(function(e){return Math.sin(e)}))}function b(e){return d(e,(function(e){return Math.cos(e)}))}function E(e){return d(e,(function(e){return Math.tan(e)}))}function C(e){return d(e,(function(e){return Math.asin(e)}))}function B(e){return d(e,(function(e){return Math.acos(e)}))}function w(e){return d(e,(function(e){return Math.atan(e)}))}function Q(e,t,n){return d(e,(function(e){return Math.max(t,Math.min(n,e))}))}function k(e,t,n){return h(e)?e.map((function(e,r){return k(e,t[r],n)})):n*t+(1-n)*e}function _(e,t,n){var r=A.EPSILON;n&&(A.EPSILON=n);try{if(e===t)return!0;if(h(e)&&h(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;++i)if(!_(e[i],t[i]))return!1;return!0}return e&&e.equals?e.equals(t):t&&t.equals?t.equals(e):!(!Number.isFinite(e)||!Number.isFinite(t))&&Math.abs(e-t)<=A.EPSILON*Math.max(1,Math.abs(e),Math.abs(t))}finally{A.EPSILON=r}}function x(e,t){if(e===t)return!0;if(e&&"object"===Object(r.a)(e)&&t&&"object"===Object(r.a)(t)){if(e.constructor!==t.constructor)return!1;if(e.exactEquals)return e.exactEquals(t)}if(h(e)&&h(t)){if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!x(e[n],t[n]))return!1;return!0}return!1}function S(e,t){var n,r=A.EPSILON;A.EPSILON=e;try{n=t()}finally{A.EPSILON=r}return n}A.EPSILON=1e-12,A.debug=!1,A.precision=4,A.printTypes=!1,A.printDegrees=!1,A.printRowMajor=!0},function(e,t,n){"use strict";var r=n(403);n.d(t,"a",(function(){return r.a})),n.d(t,"b",(function(){return r.b})),n.d(t,"c",(function(){return r.c})),n.d(t,"d",(function(){return r.d})),n.d(t,"e",(function(){return r.e})),n.d(t,"f",(function(){return r.f})),n.d(t,"g",(function(){return r.g}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s}));var r=n(34);function i(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}function a(e,t,n){if(r.f.debug&&!function(e,t){if(e.length!==t)return!1;for(var n=0;n<e.length;++n)if(!Number.isFinite(e[n]))return!1;return!0}(e,t))throw new Error("math.gl: ".concat(""|n," some fields set to invalid numbers'"));return e}var o={};function s(e,t){o[e]||(o[e]=!0,console.warn("".concat(e," has been removed in version ").concat(t,", see upgrade guide for more information")))}},function(e,t,n){"use strict";function r(e){var t,n,i="";if(e)if("object"===typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(n=r(t))&&(i&&(i+=" "),i+=n);else"boolean"===typeof e||e.call||(i&&(i+=" "),i+=e);return i}t.a=function(){for(var e,t=0,n="";t<arguments.length;)(e=r(arguments[t++]))&&(n&&(n+=" "),n+=e);return n}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return u})),n.d(t,"h",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"a",(function(){return f})),n.d(t,"g",(function(){return h})),n.d(t,"d",(function(){return g}));n(25),n(65),n(23),n(127);var r=1/Math.PI*180,i=1/180*Math.PI,a={};function o(e){return Math.round(e/a.EPSILON)*a.EPSILON}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.precision,r=void 0===n?a.precision||4:n;return e=o(e),"".concat(parseFloat(e.toPrecision(r)))}function u(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function A(e,t,n){if(u(e)){n=n||((i=e).clone?i.clone():new Array(i.length));for(var r=0;r<n.length&&r<e.length;++r)n[r]=t(e[r],r,n);return n}var i;return t(e)}function c(e,t){return A(e,(function(e){return e*i}),t)}function l(e,t){return A(e,(function(e){return e*r}),t)}function f(e,t,n){return A(e,(function(e){return Math.max(t,Math.min(n,e))}))}function h(e,t,n){return u(e)?e.map((function(e,r){return h(e,t[r],n)})):n*t+(1-n)*e}function g(e,t,n){var r=a.EPSILON;n&&(a.EPSILON=n);try{if(e===t)return!0;if(u(e)&&u(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;++i)if(!g(e[i],t[i]))return!1;return!0}return e&&e.equals?e.equals(t):t&&t.equals?t.equals(e):!(!Number.isFinite(e)||!Number.isFinite(t))&&Math.abs(e-t)<=a.EPSILON*Math.max(1,Math.abs(e),Math.abs(t))}finally{a.EPSILON=r}}a.EPSILON=1e-12,a.debug=!1,a.precision=4,a.printTypes=!1,a.printDegrees=!1,a.printRowMajor=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return o}));var r=n(44),i={DEFAULT:-1,LNGLAT:1,METER_OFFSETS:2,LNGLAT_OFFSETS:3,CARTESIAN:0};Object.defineProperty(i,"IDENTITY",{get:function(){return r.a.deprecated("COORDINATE_SYSTEM.IDENTITY","COORDINATE_SYSTEM.CARTESIAN")()||0}});var a={WEB_MERCATOR:1,GLOBE:2,WEB_MERCATOR_AUTO_OFFSET:4,IDENTITY:0},o={click:{handler:"onClick"},panstart:{handler:"onDragStart"},panmove:{handler:"onDrag"},panend:{handler:"onDragEnd"}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"g",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"l",(function(){return s})),n.d(t,"a",(function(){return u})),n.d(t,"k",(function(){return A})),n.d(t,"h",(function(){return c})),n.d(t,"m",(function(){return l})),n.d(t,"j",(function(){return f})),n.d(t,"d",(function(){return h})),n.d(t,"i",(function(){return g})),n.d(t,"n",(function(){return d})),n.d(t,"o",(function(){return p})),n.d(t,"f",(function(){return v})),n.d(t,"e",(function(){return y}));var r=n(30);function i(e){var t=new r.a(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function a(e,t,n,i){var a=new r.a(4);return a[0]=e,a[1]=t,a[2]=n,a[3]=i,a}function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function s(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function u(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}function A(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function c(e){var t=e[0],n=e[1],r=e[2],i=e[3];return Math.hypot(t,n,r,i)}function l(e){var t=e[0],n=e[1],r=e[2],i=e[3];return t*t+n*n+r*r+i*i}function f(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=n*n+r*r+i*i+a*a;return o>0&&(o=1/Math.sqrt(o)),e[0]=n*o,e[1]=r*o,e[2]=i*o,e[3]=a*o,e}function h(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function g(e,t,n,r){var i=t[0],a=t[1],o=t[2],s=t[3];return e[0]=i+r*(n[0]-i),e[1]=a+r*(n[1]-a),e[2]=o+r*(n[2]-o),e[3]=s+r*(n[3]-s),e}function d(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*o,e[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*o,e[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*o,e[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*o,e}function p(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[0],s=n[1],u=n[2],A=n[3],c=A*r+s*a-u*i,l=A*i+u*r-o*a,f=A*a+o*i-s*r,h=-o*r-s*i-u*a;return e[0]=c*A+h*-o+l*-u-f*-s,e[1]=l*A+h*-s+f*-o-c*-u,e[2]=f*A+h*-u+c*-s-l*-o,e[3]=t[3],e}function v(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function y(e,t){var n=e[0],i=e[1],a=e[2],o=e[3],s=t[0],u=t[1],A=t[2],c=t[3];return Math.abs(n-s)<=r.b*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-u)<=r.b*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(a-A)<=r.b*Math.max(1,Math.abs(a),Math.abs(A))&&Math.abs(o-c)<=r.b*Math.max(1,Math.abs(o),Math.abs(c))}!function(){var e=function(){var e=new r.a(4);return r.a!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}()}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(736);function i(e,t){if(!e)throw new Error(t||"luma.gl: assertion failed.")}function a(e){for(var t in e)return!1;return!0}function o(e,t){if(e===t)return!0;var n=Array.isArray(e)||ArrayBuffer.isView(e),r=Array.isArray(t)||ArrayBuffer.isView(t);if(n&&r&&e.length===t.length){for(var i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0}return!1}function s(e){if(e.canvas&&e.luma){var t=e.luma.canvasSizeInfo.clientWidth;return t?e.drawingBufferWidth/t:1}return 1}function u(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=s(e),i=e.drawingBufferWidth,a=e.drawingBufferHeight;return c(t,r,i,a,n)}function A(e){var t="undefined"===typeof window?1:window.devicePixelRatio||1;return Number.isFinite(e)?e<=0?1:e:e?t:1}function c(e,t,n,r,i){var a,o=l(e[0],t,n),s=f(e[1],t,r,i),u=l(e[0]+1,t,n),A=u===n-1?u:u-1;return u=f(e[1]+1,t,r,i),i?(a=s,s=u=0===u?u:u+1):a=u===r-1?u:u-1,{x:o,y:s,width:Math.max(A-o+1,1),height:Math.max(a-s+1,1)}}function l(e,t,n){return Math.min(Math.round(e*t),n-1)}function f(e,t,n,r){return r?Math.max(0,n-1-Math.round(e*t)):Math.min(Math.round(e*t),n-1)}function h(e){return Boolean(e&&Number.isFinite(e._version))}function g(e){return Boolean(e&&2===e._version)}n.d(t,"i",(function(){return d})),n.d(t,"a",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"f",(function(){return a})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return A})),n.d(t,"g",(function(){return h})),n.d(t,"h",(function(){return g}));var d=new r.a({id:"luma.gl"})},function(e,t,n){"use strict";var r=n(736);t.a=new r.a({id:"deck"})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"i",(function(){return a})),n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"e",(function(){return u})),n.d(t,"h",(function(){return A})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return l})),n.d(t,"c",(function(){return f}));var r=n(30);function i(){var e=new r.a(9);return r.a!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function a(e,t){if(e===t){var n=t[1],r=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,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}function o(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],A=t[7],c=t[8],l=c*o-s*A,f=-c*a+s*u,h=A*a-o*u,g=n*l+r*f+i*h;return g?(g=1/g,e[0]=l*g,e[1]=(-c*r+i*A)*g,e[2]=(s*r-i*o)*g,e[3]=f*g,e[4]=(c*n-i*u)*g,e[5]=(-s*n+i*a)*g,e[6]=h*g,e[7]=(-A*n+r*u)*g,e[8]=(o*n-r*a)*g,e):null}function s(e){var t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],A=e[8];return t*(A*a-o*u)+n*(-A*i+o*s)+r*(u*i-a*s)}function u(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],A=t[6],c=t[7],l=t[8],f=n[0],h=n[1],g=n[2],d=n[3],p=n[4],v=n[5],y=n[6],m=n[7],I=n[8];return e[0]=f*r+h*o+g*A,e[1]=f*i+h*s+g*c,e[2]=f*a+h*u+g*l,e[3]=d*r+p*o+v*A,e[4]=d*i+p*s+v*c,e[5]=d*a+p*u+v*l,e[6]=y*r+m*o+I*A,e[7]=y*i+m*s+I*c,e[8]=y*a+m*u+I*l,e}function A(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],A=t[6],c=t[7],l=t[8],f=n[0],h=n[1];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=u,e[6]=f*r+h*o+A,e[7]=f*i+h*s+c,e[8]=f*a+h*u+l,e}function c(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],A=t[6],c=t[7],l=t[8],f=Math.sin(n),h=Math.cos(n);return e[0]=h*r+f*o,e[1]=h*i+f*s,e[2]=h*a+f*u,e[3]=h*o-f*r,e[4]=h*s-f*i,e[5]=h*u-f*a,e[6]=A,e[7]=c,e[8]=l,e}function l(e,t,n){var r=n[0],i=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function f(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=n+n,s=r+r,u=i+i,A=n*o,c=r*o,l=r*s,f=i*o,h=i*s,g=i*u,d=a*o,p=a*s,v=a*u;return e[0]=1-l-g,e[3]=c-v,e[6]=f+p,e[1]=c+v,e[4]=1-A-g,e[7]=h-d,e[2]=f-p,e[5]=h+d,e[8]=1-A-l,e}},function(e,t,n){"use strict";var r=n(42);function i(e,t,n){return(i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(r.a)(e)););return e}(e,t);if(i){var a=Object.getOwnPropertyDescriptor(i,t);return a.get?a.get.call(n):a.value}})(e,t,n||e)}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(20);function i(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 a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t,n){"use strict";var r=n(18),i=n(33),a=n(0),o=n.n(a),s=(n(28),n(328)),u=n.n(s),A=n(531),c=n(860),l=n(765),f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var a=t.defaultTheme,s=t.withTheme,f=void 0!==s&&s,h=t.name,g=Object(i.a)(t,["defaultTheme","withTheme","name"]);var d=h,p=Object(A.a)(e,Object(r.a)({defaultTheme:a,Component:n,name:h||n.displayName,classNamePrefix:d},g)),v=o.a.forwardRef((function(e,t){e.classes;var s,u=e.innerRef,A=Object(i.a)(e,["classes","innerRef"]),g=p(Object(r.a)({},n.defaultProps,{},e)),d=A;return("string"===typeof h||f)&&(s=Object(l.a)()||a,h&&(d=Object(c.a)({theme:s,name:h,props:A})),f&&!d.theme&&(d.theme=s)),o.a.createElement(n,Object(r.a)({ref:u||t,classes:g},d))}));return u()(v,n),v}},h=n(196);t.a=function(e,t){return f(e,Object(r.a)({defaultTheme:h.a},t))}},function(e,t,n){"use strict";n.r(t);var r=n(39),i=n(249),a=n(286),o=n(183),s=n(3),u=n(2),A=n(250),c=[255,255,255],l=[0,0,1],f=[0,0,1],h=0,g=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(s.a)(this,e);var n=t.color,r=void 0===n?c:n,i=t.intensity,a=void 0===i?1:i,o=t.position,u=void 0===o?f:o;this.id=t.id||"point-".concat(h++),this.color=r,this.intensity=a,this.type="point",this.position=u,this.attenuation=d(t),this.projectedLight=Object.assign({},this)}return Object(u.a)(e,[{key:"getProjectedLight",value:function(e){var t=e.layer,n=this.projectedLight,i=t.context.viewport,a=t.props,o=a.coordinateSystem,s=a.coordinateOrigin,u=Object(A.b)(this.position,{viewport:i,coordinateSystem:o,coordinateOrigin:s,fromCoordinateSystem:i.isGeospatial?r.a.LNGLAT:r.a.CARTESIAN,fromCoordinateOrigin:[0,0,0]});return n.color=this.color,n.intensity=this.intensity,n.position=u,n}}]),e}();function d(e){return"attenuation"in e?e.attenuation:"intensity"in e?[0,0,e.intensity]:l}var p=n(6),v=n(7),y=n(4),m=n(222);function I(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(B){return!1}}();return function(){var n,r=Object(y.a)(e);if(t){var i=Object(y.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(v.a)(this,n)}}var b=function(e){Object(p.a)(n,e);var t=I(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(u.a)(n,[{key:"getProjectedLight",value:function(e){var t=e.layer,n=this.projectedLight,r=t.context.viewport,i=t.props,a=i.coordinateSystem,o=i.coordinateOrigin,s=i.modelMatrix,u=Object(m.b)({viewport:r,modelMatrix:s,coordinateSystem:a,coordinateOrigin:o}).project_uCameraPosition;return n.color=this.color,n.intensity=this.intensity,n.position=u,n}}]),n}(g),E=n(33),C=Math.PI/180,B=23.4397*C;function w(e,t,n){var r=C*-n,i=C*t,a=function(e){return function(e){return e/864e5-.5+2440588}(e)-2451545}(e),o=function(e){var t=function(e){var t=e,n=C*(1.9148*Math.sin(t)+.02*Math.sin(2*t)+3e-4*Math.sin(3*t));return t+n+102.9372*C+Math.PI}((n=e,C*(357.5291+.98560028*n)));var n;return{declination:k(t,0),rightAscension:Q(t,0)}}(a),s=function(e,t){return C*(280.147+360.9856235*e)-t}(a,r)-o.rightAscension;return{azimuth:_(s,i,o.declination),altitude:x(s,i,o.declination)}}function Q(e,t){var n=e;return Math.atan2(Math.sin(n)*Math.cos(B)-Math.tan(t)*Math.sin(B),Math.cos(n))}function k(e,t){var n=e;return Math.asin(Math.sin(t)*Math.cos(B)+Math.cos(t)*Math.sin(B)*Math.sin(n))}function _(e,t,n){var r=e,i=t,a=n;return Math.atan2(Math.sin(r),Math.cos(r)*Math.sin(i)-Math.tan(a)*Math.cos(i))}function x(e,t,n){var r=e,i=t,a=n;return Math.asin(Math.sin(i)*Math.sin(a)+Math.cos(i)*Math.cos(a)*Math.cos(r))}function S(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(B){return!1}}();return function(){var n,r=Object(y.a)(e);if(t){var i=Object(y.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(v.a)(this,n)}}var O=function(e){Object(p.a)(n,e);var t=S(n);function n(e){var r,i=e.timestamp,a=Object(E.a)(e,["timestamp"]);return Object(s.a)(this,n),(r=t.call(this,a)).timestamp=i,r}return Object(u.a)(n,[{key:"getProjectedLight",value:function(e){var t=e.layer.context.viewport,n=t.latitude,r=t.longitude;return this.direction=function(e,t,n){var r=w(e,t,n),i=r.azimuth,a=r.altitude,o=i+Math.PI;return[-Math.sin(o),-Math.cos(o),-Math.sin(a)]}(this.timestamp,n,r),this}}]),n}(o.a),D=n(167),R=n(920),j=n(21),M=n(314);function N(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(B){return!1}}();return function(){var n,r=Object(y.a)(e);if(t){var i=Object(y.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(v.a)(this,n)}}var F=function(e){Object(p.a)(n,e);var t=N(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(s.a)(this,n),r=t.call(this,e,i);var a=i.module,o=i.fs,u=i.id;return r.model=new R.a(e,{id:u,fs:o,modules:[a]}),r}return Object(u.a)(n,[{key:"render",value:function(e){var t=this,n=this.gl;Object(j.l)(n,{framebuffer:e.outputBuffer,clearColor:[0,0,0,0]},(function(){return t._renderPass(n,e)}))}},{key:"delete",value:function(){this.model.delete(),this.model=null}},{key:"_renderPass",value:function(e,t){var n=t.inputBuffer;t.outputBuffer;Object(M.a)(e,{color:!0}),this.model.draw({moduleSettings:this.props.moduleSettings,uniforms:{texture:n,texSize:[n.width,n.height]},parameters:{depthWrite:!1,depthTest:!1}})}}]),n}(n(306).a),T=n(361);function L(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function U(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(B){return!1}}();return function(){var n,r=Object(y.a)(e);if(t){var i=Object(y.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(v.a)(this,n)}}var G=function(e){Object(p.a)(n,e);var t=U(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(s.a)(this,n),(r=t.call(this,i)).id="".concat(e.name,"-pass"),Object(T.b)(e),r.module=e,r}return Object(u.a)(n,[{key:"postRender",value:function(e,t){this.passes||(this.passes=function(e,t,n,r){if(t.filter||t.sampler){var i=Y(t);return[new F(e,{id:n,module:t,fs:i,moduleSettings:r})]}return(t.passes||[]).map((function(i,a){var o=Y(t,i),s="".concat(n,"-").concat(a);return new F(e,{id:s,module:t,fs:o,moduleSettings:r})}))}(e,this.module,this.id,this.props));for(var n=t.target,r=t.inputBuffer,i=t.swapBuffer,a=0;a<this.passes.length;a++){n&&a===this.passes.length-1&&(i=n),this.passes[a].render({inputBuffer:r,outputBuffer:i});var o=i;i=r,r=o}return r}},{key:"cleanup",value:function(){if(this.passes){var e,t=L(this.passes);try{for(t.s();!(e=t.n()).done;){e.value.delete()}}catch(n){t.e(n)}finally{t.f()}this.passes=null}}}]),n}(D.a);var q=function(e){return"uniform sampler2D texture;\nuniform vec2 texSize;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main() {\n  vec2 texCoord = coordinate;\n\n  gl_FragColor = texture2D(texture, texCoord);\n  gl_FragColor = ".concat(e,"(gl_FragColor, texSize, texCoord);\n}\n")},H=function(e){return"uniform sampler2D texture;\nuniform vec2 texSize;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main() {\n  vec2 texCoord = coordinate;\n\n  gl_FragColor = ".concat(e,"(texture, texSize, texCoord);\n}\n")};function Y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(t.filter){var n="string"===typeof t.filter?t.filter:"".concat(e.name,"_filterColor");return q(n)}if(t.sampler){var r="string"===typeof t.sampler?t.sampler:"".concat(e.name,"_sampleColor");return H(r)}return null}var J=n(166),z=n(445),K=n(296),W=n(293),V=n(217),X=n(322),Z=n(298),$=n(90),ee=n(213),te=n(16),ne=n(35),re=n(17),ie=n(40);function ae(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(B){return!1}}();return function(){var n,r=Object(y.a)(e);if(t){var i=Object(y.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(v.a)(this,n)}}var oe=Math.PI/180,se=180/Math.PI;function ue(){var e=Math.PI/180*256;return{unitsPerMeter:[256/6370972,256/6370972,256/6370972],unitsPerMeter2:[0,0,0],metersPerUnit:[24886.609375,24886.609375,24886.609375],unitsPerDegree:[e,e,256/6370972],unitsPerDegree2:[0,0,0],degreesPerUnit:[1/e,1/e,24886.609375]}}var Ae=function(e){Object(p.a)(n,e);var t=ae(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(s.a)(this,n);var i=r.latitude,a=void 0===i?0:i,o=r.longitude,u=void 0===o?0:o,A=r.zoom,c=void 0===A?11:A,l=r.nearZMultiplier,f=void 0===l?.1:l,h=r.farZMultiplier,g=void 0===h?2:h,d=r.resolution,p=void 0===d?10:d,v=r.width,y=r.height,m=r.altitude,I=void 0===m?1.5:m;v=v||1,y=y||1,I=Math.max(.75,I);var b=(new ne.a).lookAt({eye:[0,-I,0],up:[0,0,1]}),E=Math.pow(2,c);b.rotateX(a*oe),b.rotateZ(-u*oe),b.scale(E/y);var C=Math.atan(.5/I),B=512*E/y,w=Object.assign({},r,{width:v,height:y,viewMatrix:b,longitude:u,latitude:a,zoom:c,fovyRadians:2*C,aspect:v/y,focalDistance:I,near:f,far:Math.min(2,1/B+1)*I*g});return(e=t.call(this,w)).resolution=p,e.distanceScales=ue(),e}return Object(u.a)(n,[{key:"getDistanceScales",value:function(){return this.distanceScales}},{key:"getBounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={targetZ:e.z||0},n=this.unproject([0,this.height/2],t),r=this.unproject([this.width/2,0],t),i=this.unproject([this.width,this.height/2],t),a=this.unproject([this.width/2,this.height],t);return i[0]<this.longitude&&(i[0]+=360),n[0]>this.longitude&&(n[0]-=360),[Math.min(n[0],i[0],r[0],a[0]),Math.min(n[1],i[1],r[1],a[1]),Math.max(n[0],i[0],r[0],a[0]),Math.max(n[1],i[1],r[1],a[1])]}},{key:"unproject",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.topLeft,i=void 0===r||r,a=n.targetZ,o=Object(te.a)(e,3),s=o[0],u=o[1],A=o[2],c=i?u:this.height-u,l=this.pixelUnprojectionMatrix;if(Number.isFinite(A))t=ce(l,[s,c,A,1]);else{var f=ce(l,[s,c,-1,1]),h=ce(l,[s,c,1,1]),g=256*((a||0)/6370972+1),d=re.n(re.o([],f,h)),p=re.n(f),v=re.n(h),y=(4*p*v-Math.pow(d-p-v,2))/16,m=4*y/d,I=Math.sqrt(p-m),b=Math.sqrt(Math.max(0,g*g-m)),E=(I-b)/Math.sqrt(d);t=re.h([],f,h,E)}var C=this.unprojectPosition(t),B=Object(te.a)(C,3),w=B[0],Q=B[1],k=B[2];return Number.isFinite(A)?[w,Q,k]:Number.isFinite(a)?[w,Q,a]:[w,Q]}},{key:"projectPosition",value:function(e){var t=Object(te.a)(e,3),n=t[0],r=t[1],i=t[2],a=void 0===i?0:i,o=n*oe,s=r*oe,u=Math.cos(s),A=256*(a/6370972+1);return[Math.sin(o)*u*A,-Math.cos(o)*u*A,Math.sin(s)*A]}},{key:"unprojectPosition",value:function(e){var t=Object(te.a)(e,3),n=t[0],r=t[1],i=t[2],a=re.f(e),o=Math.asin(i/a);return[Math.atan2(n,-r)*se,o*se,6370972*(a/256-1)]}},{key:"projectFlat",value:function(e){return e}},{key:"unprojectFlat",value:function(e){return e}},{key:"getMapCenterByLngLatPosition",value:function(e){var t=e.lngLat,n=e.pos,r=this.unproject(n);return[t[0]-r[0]+this.longitude,t[1]-r[1]+this.latitude]}},{key:"projectionMode",get:function(){return r.c.GLOBE}}]),n}($.a);function ce(e,t){var n=ie.n([],t,e);return ie.k(n,n,1/n[3]),n}var le=n(411),fe=n(187),he=n(412),ge=n(931),de=n(221),pe=n(120),ve=n(287),ye=n(66),me=n(119),Ie=n(223),be=n(83);function Ee(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(B){return!1}}();return function(){var n,r=Object(y.a)(e);if(t){var i=Object(y.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(v.a)(this,n)}}var Ce={position:[0,0,0],pitch:0,bearing:0,maxPitch:90,minPitch:-90},Be=function(e){Object(p.a)(n,e);var t=Ee(n);function n(e){var r,i=e.width,a=e.height,o=e.position,u=void 0===o?Ce.position:o,A=e.bearing,c=void 0===A?Ce.bearing:A,l=e.pitch,f=void 0===l?Ce.pitch:l,h=e.longitude,g=e.latitude,d=e.maxPitch,p=void 0===d?Ce.maxPitch:d,v=e.minPitch,y=void 0===v?Ce.minPitch:v,m=e.startBearing,I=e.startPitch,b=e.startZoomPosition,E=e.startZoom;return Object(s.a)(this,n),(r=t.call(this,{width:i,height:a,position:u,bearing:c,pitch:f,longitude:h,latitude:g,maxPitch:p,minPitch:y}))._interactiveState={startBearing:m,startPitch:I,startZoomPosition:b,startZoom:E},r}return Object(u.a)(n,[{key:"getInteractiveState",value:function(){return this._interactiveState}},{key:"getDirection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new ne.d({bearing:this._viewportProps.bearing,pitch:e?90:90+this._viewportProps.pitch}),n=t.toVector3().normalize();return n}},{key:"panStart",value:function(){return this}},{key:"pan",value:function(){return this}},{key:"panEnd",value:function(){return this}},{key:"rotateStart",value:function(e){e.pos;return this._getUpdatedState({startBearing:this._viewportProps.bearing,startPitch:this._viewportProps.pitch})}},{key:"rotate",value:function(e){var t=e.deltaScaleX,n=e.deltaScaleY,r=this._interactiveState,i=r.startBearing,a=r.startPitch;return Number.isFinite(i)&&Number.isFinite(a)?this._getUpdatedState({bearing:i-180*t,pitch:a-90*n}):this}},{key:"rotateEnd",value:function(){return this._getUpdatedState({startBearing:null,startPitch:null})}},{key:"zoomStart",value:function(){return this._getUpdatedState({startZoomPosition:this._viewportProps.position,startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(e){var t=e.scale,n=this._interactiveState.startZoomPosition;n||(n=this._viewportProps.position);var r=this.getDirection();return this._move(r,Math.log2(t),n)}},{key:"zoomEnd",value:function(){return this._getUpdatedState({startZoomPosition:null,startZoom:null})}},{key:"moveLeft",value:function(){var e=this.getDirection(!0);return this._move(e.rotateZ({radians:Math.PI/2}))}},{key:"moveRight",value:function(){var e=this.getDirection(!0);return this._move(e.rotateZ({radians:-Math.PI/2}))}},{key:"moveUp",value:function(){var e=this.getDirection(!0);return this._move(e)}},{key:"moveDown",value:function(){var e=this.getDirection(!0);return this._move(e.negate())}},{key:"rotateLeft",value:function(){return this._getUpdatedState({bearing:this._viewportProps.bearing-15})}},{key:"rotateRight",value:function(){return this._getUpdatedState({bearing:this._viewportProps.bearing+15})}},{key:"rotateUp",value:function(){return this._getUpdatedState({pitch:this._viewportProps.pitch+10})}},{key:"rotateDown",value:function(){return this._getUpdatedState({pitch:this._viewportProps.pitch-10})}},{key:"zoomIn",value:function(){return this.zoom({scale:2})}},{key:"zoomOut",value:function(){return this.zoom({scale:.5})}},{key:"shortestPathFrom",value:function(e){var t=e.getViewportProps(),n=Object.assign({},this._viewportProps),r=n.bearing,i=n.longitude;return Math.abs(r-t.bearing)>180&&(n.bearing=r<0?r+360:r-360),Math.abs(i-t.longitude)>180&&(n.longitude=i<0?i+360:i-360),n}},{key:"_move",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._viewportProps.position,r=e.scale(20*t);return this._getUpdatedState({position:new ne.c(n).add(r)})}},{key:"_getUpdatedState",value:function(e){return new n(Object.assign({},this._viewportProps,this._interactiveState,e))}},{key:"_applyConstraints",value:function(e){var t=e.pitch,n=e.maxPitch,r=e.minPitch,i=e.longitude,a=e.bearing;return e.pitch=Object(ne.e)(t,r,n),(i<-180||i>180)&&(e.longitude=Object(be.e)(i+180,360)-180),(a<-180||a>180)&&(e.bearing=Object(be.e)(a+180,360)-180),e}}]),n}(Ie.a),we=function(e){Object(p.a)(n,e);var t=Ee(n);function n(e){return Object(s.a)(this,n),t.call(this,Be,e)}return n}(me.a);function Qe(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(B){return!1}}();return function(){var n,r=Object(y.a)(e);if(t){var i=Object(y.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(v.a)(this,n)}}var ke=function(e){Object(p.a)(n,e);var t=Qe(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(u.a)(n,[{key:"_getViewport",value:function(e){var t=e.modelMatrix,n=void 0===t?null:t,r=e.bearing,i=void 0===r?0:r,a=e.pitch,o=void 0===a?0:a,s=e.up,u=void 0===s?[0,0,1]:s,A=function(e){var t=e.bearing,n=e.pitch;return new ne.d({bearing:t,pitch:n}).toVector3().normalize()}({bearing:i,pitch:90+o}),c=n?n.transformDirection(A):A,l=Object(ye.g)(e),f=Math.pow(2,l),h=(new ne.a).lookAt({eye:[0,0,0],center:c,up:u}).scale(f);return new $.a(Object.assign({},e,{zoom:l,viewMatrix:h}))}},{key:"controller",get:function(){return this._getControllerProps({type:we})}}]),n}(pe.a);ke.displayName="FirstPersonView";var _e=n(216);function xe(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(B){return!1}}();return function(){var n,r=Object(y.a)(e);if(t){var i=Object(y.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(v.a)(this,n)}}var Se=Math.PI/180;function Oe(e){var t=e.height,n=e.fovy,r=e.orbitAxis,i=e.rotationX,a=e.rotationOrbit,o=e.zoom,s=.5/Math.tan(n*Se/2),u="Z"===r?[0,0,1]:[0,1,0],A="Z"===r?[0,-s,0]:[0,0,s],c=(new ne.a).lookAt({eye:A,up:u});c.rotateX(i*Se),"Z"===r?c.rotateZ(a*Se):c.rotateY(a*Se);var l=Math.pow(2,o)/(t||1);return c.scale(l),c}var De=function(e){Object(p.a)(n,e);var t=xe(n);function n(e){Object(s.a)(this,n);var r=e.id,i=e.x,a=e.y,o=e.width,u=e.height,A=e.fovy,c=void 0===A?50:A,l=e.near,f=e.far,h=e.orbitAxis,g=void 0===h?"Z":h,d=e.target,p=void 0===d?[0,0,0]:d,v=e.rotationX,y=void 0===v?0:v,m=e.rotationOrbit,I=void 0===m?0:m,b=e.zoom,E=void 0===b?0:b;return t.call(this,{id:r,viewMatrix:Oe({height:u,fovy:c,orbitAxis:g,rotationX:y,rotationOrbit:I,zoom:E}),fovy:c,near:l,far:f,x:i,y:a,position:p,width:o,height:u,zoom:E})}return n}($.a),Re=function(e){Object(p.a)(n,e);var t=xe(n);function n(e){return Object(s.a)(this,n),t.call(this,Object.assign({},e,{type:De}))}return Object(u.a)(n,[{key:"controller",get:function(){return this._getControllerProps({type:_e.b})}}]),n}(pe.a);Re.displayName="OrbitView";var je=n(413),Me=n(1),Ne=n(29),Fe=n(214),Te=n(117),Le=n(118);function Pe(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(B){return!1}}();return function(){var n,r=Object(y.a)(e);if(t){var i=Object(y.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(v.a)(this,n)}}var Ue={transitionDuration:300,transitionEasing:function(e){return e},transitionInterpolator:new Te.a(["longitude","latitude","zoom"]),transitionInterruption:Le.a.BREAK},Ge=function(e){Object(p.a)(n,e);var t=Pe(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(u.a)(n,[{key:"_applyConstraints",value:function(e){var t=e.maxZoom,n=e.minZoom,r=e.zoom;e.zoom=Object(ne.e)(r,n,t);var i=e.longitude,a=e.latitude;return(i<-180||i>180)&&(e.longitude=Object(be.e)(i+180,360)-180),e.latitude=Object(ne.e)(a,-89,89),e}}]),n}(Fe.a),qe=function(e){Object(p.a)(n,e);var t=Pe(n);function n(e){var r;return Object(s.a)(this,n),(r=t.call(this,Ge,e)).invertPan=!0,r}return Object(u.a)(n,[{key:"setProps",value:function(e){Object(Ne.a)(Object(y.a)(n.prototype),"setProps",this).call(this,e),this.dragRotate=!1,this.touchRotate=!1}},{key:"_getTransitionProps",value:function(){return Ue}}]),n}(me.a);function He(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 Ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?He(Object(n),!0).forEach((function(t){Object(Me.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):He(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Je(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(B){return!1}}();return function(){var n,r=Object(y.a)(e);if(t){var i=Object(y.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(v.a)(this,n)}}var ze=function(e){Object(p.a)(n,e);var t=Je(n);function n(e){return Object(s.a)(this,n),t.call(this,Ye(Ye({},e),{},{type:Ae}))}return Object(u.a)(n,[{key:"controller",get:function(){return this._getControllerProps({type:qe})}}]),n}(pe.a);ze.displayName="GlobeView";var Ke=n(292),We=n(414),Ve=n(215);function Xe(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return Ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ze(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $e(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(B){return!1}}();return function(){var n,r=Object(y.a)(e);if(t){var i=Object(y.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(v.a)(this,n)}}var et=["bearing","pitch"],tt={speed:1.2,curve:1.414},nt=function(e){Object(p.a)(n,e);var t=$e(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(s.a)(this,n),(e=t.call(this,{compare:["longitude","latitude","zoom","bearing","pitch"],extract:["width","height","longitude","latitude","zoom","bearing","pitch"],required:["width","height","latitude","longitude","zoom"]})).props=Object.assign({},tt,r),e}return Object(u.a)(n,[{key:"interpolateProps",value:function(e,t,n){var r,i=Object(ye.c)(e,t,n,this.props),a=Xe(et);try{for(a.s();!(r=a.n()).done;){var o=r.value;i[o]=Object(ne.g)(e[o]||0,t[o]||0,n)}}catch(s){a.e(s)}finally{a.f()}return i}},{key:"getDuration",value:function(e,t){var n=t.transitionDuration;return"auto"===n&&(n=Object(ye.f)(e,t,this.props)),n}}]),n}(Ve.a),rt=n(44),it=n(101),at=n(415),ot=n(126),st=n(291),ut=n(155),At=n(290),ct=n(246);n.d(t,"COORDINATE_SYSTEM",(function(){return r.a})),n.d(t,"LightingEffect",(function(){return i.a})),n.d(t,"AmbientLight",(function(){return a.a})),n.d(t,"DirectionalLight",(function(){return o.a})),n.d(t,"PointLight",(function(){return g})),n.d(t,"_CameraLight",(function(){return b})),n.d(t,"_SunLight",(function(){return O})),n.d(t,"PostProcessEffect",(function(){return G})),n.d(t,"_LayersPass",(function(){return J.a})),n.d(t,"Deck",(function(){return z.a})),n.d(t,"LayerManager",(function(){return K.a})),n.d(t,"AttributeManager",(function(){return W.a})),n.d(t,"Layer",(function(){return V.a})),n.d(t,"CompositeLayer",(function(){return X.a})),n.d(t,"DeckRenderer",(function(){return Z.a})),n.d(t,"Viewport",(function(){return $.a})),n.d(t,"WebMercatorViewport",(function(){return ee.a})),n.d(t,"_GlobeViewport",(function(){return Ae})),n.d(t,"picking",(function(){return le.a})),n.d(t,"project",(function(){return fe.a})),n.d(t,"project32",(function(){return he.a})),n.d(t,"gouraudLighting",(function(){return ge.a})),n.d(t,"phongLighting",(function(){return ge.b})),n.d(t,"shadow",(function(){return de.a})),n.d(t,"View",(function(){return pe.a})),n.d(t,"MapView",(function(){return ve.a})),n.d(t,"FirstPersonView",(function(){return ke})),n.d(t,"OrbitView",(function(){return Re})),n.d(t,"OrthographicView",(function(){return je.a})),n.d(t,"_GlobeView",(function(){return ze})),n.d(t,"Controller",(function(){return me.a})),n.d(t,"MapController",(function(){return Fe.b})),n.d(t,"_GlobeController",(function(){return qe})),n.d(t,"FirstPersonController",(function(){return we})),n.d(t,"OrbitController",(function(){return _e.b})),n.d(t,"OrthographicController",(function(){return Ke.a})),n.d(t,"Effect",(function(){return D.a})),n.d(t,"LayerExtension",(function(){return We.a})),n.d(t,"TRANSITION_EVENTS",(function(){return Le.a})),n.d(t,"TransitionInterpolator",(function(){return Ve.a})),n.d(t,"LinearInterpolator",(function(){return Te.a})),n.d(t,"FlyToInterpolator",(function(){return nt})),n.d(t,"log",(function(){return rt.a})),n.d(t,"createIterable",(function(){return it.a})),n.d(t,"fp64LowPart",(function(){return be.c})),n.d(t,"Tesselator",(function(){return at.a})),n.d(t,"_fillArray",(function(){return ot.a})),n.d(t,"_flatten",(function(){return ot.b})),n.d(t,"_count",(function(){return st.a})),n.d(t,"_memoize",(function(){return ut.a})),n.d(t,"_mergeShaders",(function(){return At.a})),n.d(t,"_compareProps",(function(){return ct.a}))},function(e,t,n){"use strict";n.r(t);var r=n(21),i=n(257),a=n(359),o=n(734),s=n(82),u=n(927),A=n(140),c=n(191),l=n(179),f=n(463),h=n(314),g=n(362),d=n(462),p=n(464),v=n(921),y=n(929),m=n(311),I=n(928),b=n(474),E=n(922),C=n(121),B=n(920),w=n(78),Q=n(3),k=n(7),_=n(4),x=n(6),S=n(193),O={x:[2,0,1],y:[0,1,2],z:[1,2,0]},D=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(Q.a)(this,t);var n=e.id,r=void 0===n?Object(S.c)("truncated-code-geometry"):n,i=R(e),a=i.indices,o=i.attributes;return Object(k.a)(this,Object(_.a)(t).call(this,Object(w.a)({},e,{id:r,indices:a,attributes:Object(w.a)({},o,e.attributes)})))}return Object(x.a)(t,e),t}(C.a);function R(e){for(var t=e.bottomRadius,n=void 0===t?0:t,r=e.topRadius,i=void 0===r?0:r,a=e.height,o=void 0===a?1:a,s=e.nradial,u=void 0===s?10:s,A=e.nvertical,c=void 0===A?10:A,l=e.verticalAxis,f=void 0===l?"y":l,h=e.topCap,g=void 0!==h&&h,d=e.bottomCap,p=void 0!==d&&d,v=(g?2:0)+(p?2:0),y=(u+1)*(c+1+v),m=Math.atan2(n-i,o),I=Math.sin,b=Math.cos,E=Math.PI,C=b(m),B=I(m),w=g?-2:0,Q=c+(p?2:0),k=u+1,_=new Uint16Array(u*(c+v)*6),x=O[f],S=new Float32Array(3*y),D=new Float32Array(3*y),R=new Float32Array(2*y),j=0,M=0,N=w;N<=Q;N++){var F=N/c,T=o*F,L=void 0;N<0?(T=0,F=1,L=n):N>c?(T=o,F=1,L=i):L=n+N/c*(i-n),-2!==N&&N!==c+2||(L=0,F=0),T-=o/2;for(var P=0;P<k;P++){var U=I(P*E*2/u),G=b(P*E*2/u);S[j+x[0]]=U*L,S[j+x[1]]=T,S[j+x[2]]=G*L,D[j+x[0]]=N<0||N>c?0:U*C,D[j+x[1]]=N<0?-1:N>c?1:B,D[j+x[2]]=N<0||N>c?0:G*C,R[M+0]=P/u,R[M+1]=F,M+=2,j+=3}}for(var q=0;q<c+v;q++)for(var H=0;H<u;H++){var Y=6*(q*u+H);_[Y+0]=k*(q+0)+0+H,_[Y+1]=k*(q+0)+1+H,_[Y+2]=k*(q+1)+1+H,_[Y+3]=k*(q+0)+0+H,_[Y+4]=k*(q+1)+1+H,_[Y+5]=k*(q+1)+0+H}return{indices:_,attributes:{POSITION:{size:3,value:S},NORMAL:{size:3,value:D},TEXCOORD_0:{size:2,value:R}}}}var j=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(Q.a)(this,t);var n=e.id,r=void 0===n?Object(S.c)("cone-geometry"):n,i=e.radius,a=void 0===i?1:i,o=e.cap,s=void 0===o||o;return Object(k.a)(this,Object(_.a)(t).call(this,Object(w.a)({},e,{id:r,topRadius:0,topCap:Boolean(s),bottomCap:Boolean(s),bottomRadius:a})))}return Object(x.a)(t,e),t}(D),M=n(923),N=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(Q.a)(this,t);var n=e.id,r=void 0===n?Object(S.c)("cylinder-geometry"):n,i=e.radius,a=void 0===i?1:i;return Object(k.a)(this,Object(_.a)(t).call(this,Object(w.a)({},e,{id:r,bottomRadius:a,topRadius:a})))}return Object(x.a)(t,e),t}(D),F=n(417),T=[-1,0,0,0,1,0,0,0,-1,0,0,1,0,-1,0,1,0,0],L=[3,4,5,3,5,1,3,1,0,3,0,4,4,0,2,4,2,5,2,0,1,5,2,1],P=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(Q.a)(this,t);var n=e.id,r=void 0===n?Object(S.c)("ico-sphere-geometry"):n,i=U(e),a=i.indices,o=i.attributes;return Object(k.a)(this,Object(_.a)(t).call(this,Object(w.a)({},e,{id:r,indices:a,attributes:Object(w.a)({},o,e.attributes)})))}return Object(x.a)(t,e),t}(C.a);function U(e){var t=e.iterations,n=void 0===t?0:t,r=Math.PI,i=2*r,a=[].concat(T),o=[].concat(L);a.push(),o.push();for(var s=function(){var e={};return function(t,n){var r=(t*=3)>(n*=3)?t:n,i="".concat(t<n?t:n,"|").concat(r);if(i in e)return e[i];var o=a[t],s=a[t+1],u=a[t+2],A=(o+a[n])/2,c=(s+a[n+1])/2,l=(u+a[n+2])/2,f=Math.sqrt(A*A+c*c+l*l);return A/=f,c/=f,l/=f,a.push(A,c,l),e[i]=a.length/3-1}}(),u=0;u<n;u++){for(var A=[],c=0;c<o.length;c+=3){var l=s(o[c+0],o[c+1]),f=s(o[c+1],o[c+2]),h=s(o[c+2],o[c+0]);A.push(h,o[c+0],l,l,o[c+1],f,f,o[c+2],h,l,f,h)}o=A}for(var g=new Array(a.length),d=new Array(a.length/3*2),p=o.length-3;p>=0;p-=3){var v=o[p+0],y=o[p+1],m=o[p+2],I=3*v,b=3*y,E=3*m,C=2*v,B=2*y,w=2*m,Q=a[I+0],k=a[I+1],_=a[I+2],x=Math.acos(_/Math.sqrt(Q*Q+k*k+_*_))/r,S=1-(Math.atan2(k,Q)+r)/i,O=a[b+0],D=a[b+1],R=a[b+2],j=Math.acos(R/Math.sqrt(O*O+D*D+R*R))/r,M=1-(Math.atan2(D,O)+r)/i,N=a[E+0],P=a[E+1],U=a[E+2],G=Math.acos(U/Math.sqrt(N*N+P*P+U*U))/r,q=1-(Math.atan2(P,N)+r)/i,H=[N-O,P-D,U-R],Y=[Q-O,k-D,_-R],J=new F.a(H).cross(Y).normalize(),z=void 0;(0===S||0===M||0===q)&&(0===S||S>.5)&&(0===M||M>.5)&&(0===q||q>.5)&&(a.push(a[I+0],a[I+1],a[I+2]),z=a.length/3-1,o.push(z),d[2*z+0]=1,d[2*z+1]=x,g[3*z+0]=J.x,g[3*z+1]=J.y,g[3*z+2]=J.z,a.push(a[b+0],a[b+1],a[b+2]),z=a.length/3-1,o.push(z),d[2*z+0]=1,d[2*z+1]=j,g[3*z+0]=J.x,g[3*z+1]=J.y,g[3*z+2]=J.z,a.push(a[E+0],a[E+1],a[E+2]),z=a.length/3-1,o.push(z),d[2*z+0]=1,d[2*z+1]=G,g[3*z+0]=J.x,g[3*z+1]=J.y,g[3*z+2]=J.z),g[I+0]=g[b+0]=g[E+0]=J.x,g[I+1]=g[b+1]=g[E+1]=J.y,g[I+2]=g[b+2]=g[E+2]=J.z,d[C+0]=S,d[C+1]=x,d[B+0]=M,d[B+1]=j,d[w+0]=q,d[w+1]=G}return{indices:{size:1,value:new Uint16Array(o)},attributes:{POSITION:{size:3,value:new Float32Array(a)},NORMAL:{size:3,value:new Float32Array(g)},TEXCOORD_0:{size:2,value:new Float32Array(d)}}}}var G=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(Q.a)(this,t);var n=e.id,r=void 0===n?Object(S.c)("plane-geometry"):n,i=q(e),a=i.indices,o=i.attributes;return Object(k.a)(this,Object(_.a)(t).call(this,Object(w.a)({},e,{id:r,indices:a,attributes:Object(w.a)({},o,e.attributes)})))}return Object(x.a)(t,e),t}(C.a);function q(e){var t=e.type,n=void 0===t?"x,y":t,r=e.offset,i=void 0===r?0:r,a=e.flipCull,o=void 0!==a&&a,s=e.unpack,u=void 0!==s&&s,A=n.split(","),c=e["".concat(A[0],"len")]||1,l=e["".concat(A[1],"len")]||1,f=e["n".concat(A[0])]||1,h=e["n".concat(A[1])]||1,g=(f+1)*(h+1),d=new Float32Array(3*g),p=new Float32Array(3*g),v=new Float32Array(2*g);o&&(c=-c);for(var y=0,m=0,I=0;I<=h;I++)for(var b=0;b<=f;b++){var E=b/f,C=I/h;switch(v[y+0]=o?1-E:E,v[y+1]=C,n){case"x,y":d[m+0]=c*E-.5*c,d[m+1]=l*C-.5*l,d[m+2]=i,p[m+0]=0,p[m+1]=0,p[m+2]=o?1:-1;break;case"x,z":d[m+0]=c*E-.5*c,d[m+1]=i,d[m+2]=l*C-.5*l,p[m+0]=0,p[m+1]=o?1:-1,p[m+2]=0;break;case"y,z":d[m+0]=i,d[m+1]=c*E-.5*c,d[m+2]=l*C-.5*l,p[m+0]=o?1:-1,p[m+1]=0,p[m+2]=0;break;default:throw new Error("PlaneGeometry: unknown type")}y+=2,m+=3}for(var B=f+1,w=new Uint16Array(f*h*6),Q=0;Q<h;Q++)for(var k=0;k<f;k++){var _=6*(Q*f+k);w[_+0]=(Q+0)*B+k,w[_+1]=(Q+1)*B+k,w[_+2]=(Q+0)*B+k+1,w[_+3]=(Q+1)*B+k,w[_+4]=(Q+1)*B+k+1,w[_+5]=(Q+0)*B+k+1}var x={indices:{size:1,value:w},attributes:{POSITION:{size:3,value:d},NORMAL:{size:3,value:p},TEXCOORD_0:{size:2,value:v}}};return u?function(e){var t=e.indices,n=e.attributes;if(!t)return e;var r=t.value.length,i={};for(var a in n){var o=n[a],s=o.constant,u=o.value,A=o.size;if(!s&&A){for(var c=new u.constructor(r*A),l=0;l<r;++l)for(var f=t.value[l],h=0;h<A;h++)c[l*A+h]=u[f*A+h];i[a]={size:A,value:c}}}return{attributes:Object.assign({},n,i)}}(x):x}var H=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(Q.a)(this,t);var n=e.id,r=void 0===n?Object(S.c)("sphere-geometry"):n,i=Y(e),a=i.indices,o=i.attributes;return Object(k.a)(this,Object(_.a)(t).call(this,Object(w.a)({},e,{id:r,indices:a,attributes:Object(w.a)({},o,e.attributes)})))}return Object(x.a)(t,e),t}(C.a);function Y(e){var t=e.nlat,n=void 0===t?10:t,r=e.nlong,i=void 0===r?10:r,a=e.radius,o=void 0===a?1:a,s=Math.PI-0,u=2*Math.PI-0,A=(n+1)*(i+1);if("number"===typeof o){var c=o;o=function(e,t,n,r,i){return c}}for(var l=new Float32Array(3*A),f=new Float32Array(3*A),h=new Float32Array(2*A),g=new(A>65535?Uint32Array:Uint16Array)(n*i*6),d=0;d<=n;d++)for(var p=0;p<=i;p++){var v=p/i,y=d/n,m=p+d*(i+1),I=2*m,b=3*m,E=u*v,C=s*y,B=Math.sin(E),w=Math.cos(E),Q=Math.sin(C),k=w*Q,_=Math.cos(C),x=B*Q,S=o(k,_,x,v,y);l[b+0]=S*k,l[b+1]=S*_,l[b+2]=S*x,f[b+0]=k,f[b+1]=_,f[b+2]=x,h[I+0]=v,h[I+1]=1-y}for(var O=i+1,D=0;D<i;D++)for(var R=0;R<n;R++){var j=6*(D*n+R);g[j+0]=R*O+D,g[j+1]=R*O+D+1,g[j+2]=(R+1)*O+D,g[j+3]=(R+1)*O+D,g[j+4]=R*O+D+1,g[j+5]=(R+1)*O+D+1}return{indices:{size:1,value:g},attributes:{POSITION:{size:3,value:l},NORMAL:{size:3,value:f},TEXCOORD_0:{size:2,value:h}}}}var J=n(361),z=n(919);function K(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Math.fround(e),i=e-r;return t[n]=r,t[n+1]=i,t}function W(e){return e-Math.fround(e)}var V={ONE:1};var X={name:"fp64",vs:"const vec2 E_FP64 = vec2(2.7182817459106445e+00, 8.254840366817007e-08);\nconst vec2 LOG2_FP64 = vec2(0.6931471824645996e+00, -1.9046542121259336e-09);\nconst vec2 PI_FP64 = vec2(3.1415927410125732, -8.742278012618954e-8);\nconst vec2 TWO_PI_FP64 = vec2(6.2831854820251465, -1.7484556025237907e-7);\nconst vec2 PI_2_FP64 = vec2(1.5707963705062866, -4.371139006309477e-8);\nconst vec2 PI_4_FP64 = vec2(0.7853981852531433, -2.1855695031547384e-8);\nconst vec2 PI_16_FP64 = vec2(0.19634954631328583, -5.463923757886846e-9);\nconst vec2 PI_16_2_FP64 = vec2(0.39269909262657166, -1.0927847515773692e-8);\nconst vec2 PI_16_3_FP64 = vec2(0.5890486240386963, -1.4906100798128818e-9);\nconst vec2 PI_180_FP64 = vec2(0.01745329238474369, 1.3519960498364902e-10);\n\nconst vec2 SIN_TABLE_0_FP64 = vec2(0.19509032368659973, -1.6704714833615242e-9);\nconst vec2 SIN_TABLE_1_FP64 = vec2(0.3826834261417389, 6.22335089017767e-9);\nconst vec2 SIN_TABLE_2_FP64 = vec2(0.5555702447891235, -1.1769521357507529e-8);\nconst vec2 SIN_TABLE_3_FP64 = vec2(0.7071067690849304, 1.2101617041793133e-8);\n\nconst vec2 COS_TABLE_0_FP64 = vec2(0.9807852506637573, 2.9739473106360492e-8);\nconst vec2 COS_TABLE_1_FP64 = vec2(0.9238795042037964, 2.8307490351764386e-8);\nconst vec2 COS_TABLE_2_FP64 = vec2(0.8314695954322815, 1.6870263741530778e-8);\nconst vec2 COS_TABLE_3_FP64 = vec2(0.7071067690849304, 1.2101617152815436e-8);\n\nconst vec2 INVERSE_FACTORIAL_3_FP64 = vec2(1.666666716337204e-01, -4.967053879312289e-09);\nconst vec2 INVERSE_FACTORIAL_4_FP64 = vec2(4.16666679084301e-02, -1.2417634698280722e-09);\nconst vec2 INVERSE_FACTORIAL_5_FP64 = vec2(8.333333767950535e-03, -4.34617203337595e-10);\nconst vec2 INVERSE_FACTORIAL_6_FP64 = vec2(1.3888889225199819e-03, -3.3631094437103215e-11);\nconst vec2 INVERSE_FACTORIAL_7_FP64 = vec2(1.9841270113829523e-04,  -2.725596874933456e-12);\nconst vec2 INVERSE_FACTORIAL_8_FP64 = vec2(2.4801587642286904e-05, -3.406996025904184e-13);\nconst vec2 INVERSE_FACTORIAL_9_FP64 = vec2(2.75573188446287533e-06, 3.7935713937038186e-14);\nconst vec2 INVERSE_FACTORIAL_10_FP64 = vec2(2.755731998149713e-07, -7.575112367869873e-15);\n\nfloat nint(float d) {\n    if (d == floor(d)) return d;\n    return floor(d + 0.5);\n}\n\nvec2 nint_fp64(vec2 a) {\n    float hi = nint(a.x);\n    float lo;\n    vec2 tmp;\n    if (hi == a.x) {\n        lo = nint(a.y);\n        tmp = quickTwoSum(hi, lo);\n    } else {\n        lo = 0.0;\n        if (abs(hi - a.x) == 0.5 && a.y < 0.0) {\n            hi -= 1.0;\n        }\n        tmp = vec2(hi, lo);\n    }\n    return tmp;\n}\n\nvec2 exp_fp64(vec2 a) {\n\n  const int k_power = 4;\n  const float k = 16.0;\n\n  const float inv_k = 1.0 / k;\n\n  if (a.x <= -88.0) return vec2(0.0, 0.0);\n  if (a.x >= 88.0) return vec2(1.0 / 0.0, 1.0 / 0.0);\n  if (a.x == 0.0 && a.y == 0.0) return vec2(1.0, 0.0);\n  if (a.x == 1.0 && a.y == 0.0) return E_FP64;\n\n  float m = floor(a.x / LOG2_FP64.x + 0.5);\n  vec2 r = sub_fp64(a, mul_fp64(LOG2_FP64, vec2(m, 0.0))) * inv_k;\n  vec2 s, t, p;\n\n  p = mul_fp64(r, r);\n  s = sum_fp64(r, p * 0.5);\n  p = mul_fp64(p, r);\n  t = mul_fp64(p, INVERSE_FACTORIAL_3_FP64);\n\n  s = sum_fp64(s, t);\n  p = mul_fp64(p, r);\n  t = mul_fp64(p, INVERSE_FACTORIAL_4_FP64);\n\n  s = sum_fp64(s, t);\n  p = mul_fp64(p, r);\n  t = mul_fp64(p, INVERSE_FACTORIAL_5_FP64);\n\n\n\n\n\n\n  s = sum_fp64(s, t);\n  for (int i = 0; i < k_power; i++) {\n    s = sum_fp64(s * 2.0, mul_fp64(s, s));\n  }\n\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n  s = sum_fp64(s, vec2(ONE, 0.0));\n#else\n  s = sum_fp64(s, vec2(1.0, 0.0));\n#endif\n\n  return s * pow(2.0, m);\n}\n\nvec2 log_fp64(vec2 a)\n{\n  if (a.x == 1.0 && a.y == 0.0) return vec2(0.0, 0.0);\n  if (a.x <= 0.0) return vec2(0.0 / 0.0, 0.0 / 0.0);\n  vec2 x = vec2(log(a.x), 0.0);\n  vec2 s;\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n  s = vec2(ONE, 0.0);\n#else\n  s = vec2(1.0, 0.0);\n#endif\n\n  x = sub_fp64(sum_fp64(x, mul_fp64(a, exp_fp64(-x))), s);\n  return x;\n}\n\nvec2 sin_taylor_fp64(vec2 a) {\n  vec2 r, s, t, x;\n\n  if (a.x == 0.0 && a.y == 0.0) {\n    return vec2(0.0, 0.0);\n  }\n\n  x = -mul_fp64(a, a);\n  s = a;\n  r = a;\n\n  r = mul_fp64(r, x);\n  t = mul_fp64(r, INVERSE_FACTORIAL_3_FP64);\n  s = sum_fp64(s, t);\n\n  r = mul_fp64(r, x);\n  t = mul_fp64(r, INVERSE_FACTORIAL_5_FP64);\n  s = sum_fp64(s, t);\n\n\n\n\n\n\n  return s;\n}\n\nvec2 cos_taylor_fp64(vec2 a) {\n  vec2 r, s, t, x;\n\n  if (a.x == 0.0 && a.y == 0.0) {\n    return vec2(1.0, 0.0);\n  }\n\n  x = -mul_fp64(a, a);\n  r = x;\n  s = sum_fp64(vec2(1.0, 0.0), r * 0.5);\n\n  r = mul_fp64(r, x);\n  t = mul_fp64(r, INVERSE_FACTORIAL_4_FP64);\n  s = sum_fp64(s, t);\n\n  r = mul_fp64(r, x);\n  t = mul_fp64(r, INVERSE_FACTORIAL_6_FP64);\n  s = sum_fp64(s, t);\n\n\n\n\n\n\n  return s;\n}\n\nvoid sincos_taylor_fp64(vec2 a, out vec2 sin_t, out vec2 cos_t) {\n  if (a.x == 0.0 && a.y == 0.0) {\n    sin_t = vec2(0.0, 0.0);\n    cos_t = vec2(1.0, 0.0);\n  }\n\n  sin_t = sin_taylor_fp64(a);\n  cos_t = sqrt_fp64(sub_fp64(vec2(1.0, 0.0), mul_fp64(sin_t, sin_t)));\n}\n\nvec2 sin_fp64(vec2 a) {\n    if (a.x == 0.0 && a.y == 0.0) {\n        return vec2(0.0, 0.0);\n    }\n    vec2 z = nint_fp64(div_fp64(a, TWO_PI_FP64));\n    vec2 r = sub_fp64(a, mul_fp64(TWO_PI_FP64, z));\n\n    vec2 t;\n    float q = floor(r.x / PI_2_FP64.x + 0.5);\n    int j = int(q);\n\n    if (j < -2 || j > 2) {\n        return vec2(0.0 / 0.0, 0.0 / 0.0);\n    }\n\n    t = sub_fp64(r, mul_fp64(PI_2_FP64, vec2(q, 0.0)));\n\n    q = floor(t.x / PI_16_FP64.x + 0.5);\n    int k = int(q);\n\n    if (k == 0) {\n        if (j == 0) {\n            return sin_taylor_fp64(t);\n        } else if (j == 1) {\n            return cos_taylor_fp64(t);\n        } else if (j == -1) {\n            return -cos_taylor_fp64(t);\n        } else {\n            return -sin_taylor_fp64(t);\n        }\n    }\n\n    int abs_k = int(abs(float(k)));\n\n    if (abs_k > 4) {\n        return vec2(0.0 / 0.0, 0.0 / 0.0);\n    } else {\n        t = sub_fp64(t, mul_fp64(PI_16_FP64, vec2(q, 0.0)));\n    }\n\n    vec2 u = vec2(0.0, 0.0);\n    vec2 v = vec2(0.0, 0.0);\n\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n    if (abs(float(abs_k) - 1.0) < 0.5) {\n        u = COS_TABLE_0_FP64;\n        v = SIN_TABLE_0_FP64;\n    } else if (abs(float(abs_k) - 2.0) < 0.5) {\n        u = COS_TABLE_1_FP64;\n        v = SIN_TABLE_1_FP64;\n    } else if (abs(float(abs_k) - 3.0) < 0.5) {\n        u = COS_TABLE_2_FP64;\n        v = SIN_TABLE_2_FP64;\n    } else if (abs(float(abs_k) - 4.0) < 0.5) {\n        u = COS_TABLE_3_FP64;\n        v = SIN_TABLE_3_FP64;\n    }\n#else\n    if (abs_k == 1) {\n        u = COS_TABLE_0_FP64;\n        v = SIN_TABLE_0_FP64;\n    } else if (abs_k == 2) {\n        u = COS_TABLE_1_FP64;\n        v = SIN_TABLE_1_FP64;\n    } else if (abs_k == 3) {\n        u = COS_TABLE_2_FP64;\n        v = SIN_TABLE_2_FP64;\n    } else if (abs_k == 4) {\n        u = COS_TABLE_3_FP64;\n        v = SIN_TABLE_3_FP64;\n    }\n#endif\n\n    vec2 sin_t, cos_t;\n    sincos_taylor_fp64(t, sin_t, cos_t);\n\n\n\n    vec2 result = vec2(0.0, 0.0);\n    if (j == 0) {\n        if (k > 0) {\n            result = sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n        } else {\n            result = sub_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n        }\n    } else if (j == 1) {\n        if (k > 0) {\n            result = sub_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        } else {\n            result = sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        }\n    } else if (j == -1) {\n        if (k > 0) {\n            result = sub_fp64(mul_fp64(v, sin_t), mul_fp64(u, cos_t));\n        } else {\n            result = -sum_fp64(mul_fp64(v, sin_t), mul_fp64(u, cos_t));\n        }\n    } else {\n        if (k > 0) {\n            result = -sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n        } else {\n            result = sub_fp64(mul_fp64(v, cos_t), mul_fp64(u, sin_t));\n        }\n    }\n\n    return result;\n}\n\nvec2 cos_fp64(vec2 a) {\n    if (a.x == 0.0 && a.y == 0.0) {\n        return vec2(1.0, 0.0);\n    }\n    vec2 z = nint_fp64(div_fp64(a, TWO_PI_FP64));\n    vec2 r = sub_fp64(a, mul_fp64(TWO_PI_FP64, z));\n\n    vec2 t;\n    float q = floor(r.x / PI_2_FP64.x + 0.5);\n    int j = int(q);\n\n    if (j < -2 || j > 2) {\n        return vec2(0.0 / 0.0, 0.0 / 0.0);\n    }\n\n    t = sub_fp64(r, mul_fp64(PI_2_FP64, vec2(q, 0.0)));\n\n    q = floor(t.x / PI_16_FP64.x + 0.5);\n    int k = int(q);\n\n    if (k == 0) {\n        if (j == 0) {\n            return cos_taylor_fp64(t);\n        } else if (j == 1) {\n            return -sin_taylor_fp64(t);\n        } else if (j == -1) {\n            return sin_taylor_fp64(t);\n        } else {\n            return -cos_taylor_fp64(t);\n        }\n    }\n\n    int abs_k = int(abs(float(k)));\n\n    if (abs_k > 4) {\n        return vec2(0.0 / 0.0, 0.0 / 0.0);\n    } else {\n        t = sub_fp64(t, mul_fp64(PI_16_FP64, vec2(q, 0.0)));\n    }\n\n    vec2 u = vec2(0.0, 0.0);\n    vec2 v = vec2(0.0, 0.0);\n\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n    if (abs(float(abs_k) - 1.0) < 0.5) {\n        u = COS_TABLE_0_FP64;\n        v = SIN_TABLE_0_FP64;\n    } else if (abs(float(abs_k) - 2.0) < 0.5) {\n        u = COS_TABLE_1_FP64;\n        v = SIN_TABLE_1_FP64;\n    } else if (abs(float(abs_k) - 3.0) < 0.5) {\n        u = COS_TABLE_2_FP64;\n        v = SIN_TABLE_2_FP64;\n    } else if (abs(float(abs_k) - 4.0) < 0.5) {\n        u = COS_TABLE_3_FP64;\n        v = SIN_TABLE_3_FP64;\n    }\n#else\n    if (abs_k == 1) {\n        u = COS_TABLE_0_FP64;\n        v = SIN_TABLE_0_FP64;\n    } else if (abs_k == 2) {\n        u = COS_TABLE_1_FP64;\n        v = SIN_TABLE_1_FP64;\n    } else if (abs_k == 3) {\n        u = COS_TABLE_2_FP64;\n        v = SIN_TABLE_2_FP64;\n    } else if (abs_k == 4) {\n        u = COS_TABLE_3_FP64;\n        v = SIN_TABLE_3_FP64;\n    }\n#endif\n\n    vec2 sin_t, cos_t;\n    sincos_taylor_fp64(t, sin_t, cos_t);\n\n    vec2 result = vec2(0.0, 0.0);\n    if (j == 0) {\n        if (k > 0) {\n            result = sub_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        } else {\n            result = sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        }\n    } else if (j == 1) {\n        if (k > 0) {\n            result = -sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n        } else {\n            result = sub_fp64(mul_fp64(v, cos_t), mul_fp64(u, sin_t));\n        }\n    } else if (j == -1) {\n        if (k > 0) {\n            result = sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n        } else {\n            result = sub_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n        }\n    } else {\n        if (k > 0) {\n            result = sub_fp64(mul_fp64(v, sin_t), mul_fp64(u, cos_t));\n        } else {\n            result = -sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        }\n    }\n\n    return result;\n}\n\nvec2 tan_fp64(vec2 a) {\n    vec2 sin_a;\n    vec2 cos_a;\n\n    if (a.x == 0.0 && a.y == 0.0) {\n        return vec2(0.0, 0.0);\n    }\n    vec2 z = nint_fp64(div_fp64(a, TWO_PI_FP64));\n    vec2 r = sub_fp64(a, mul_fp64(TWO_PI_FP64, z));\n\n    vec2 t;\n    float q = floor(r.x / PI_2_FP64.x + 0.5);\n    int j = int(q);\n\n\n    if (j < -2 || j > 2) {\n        return vec2(0.0 / 0.0, 0.0 / 0.0);\n    }\n\n    t = sub_fp64(r, mul_fp64(PI_2_FP64, vec2(q, 0.0)));\n\n    q = floor(t.x / PI_16_FP64.x + 0.5);\n    int k = int(q);\n    int abs_k = int(abs(float(k)));\n\n    if (abs_k > 4) {\n        return vec2(0.0 / 0.0, 0.0 / 0.0);\n    } else {\n        t = sub_fp64(t, mul_fp64(PI_16_FP64, vec2(q, 0.0)));\n    }\n\n\n    vec2 u = vec2(0.0, 0.0);\n    vec2 v = vec2(0.0, 0.0);\n\n    vec2 sin_t, cos_t;\n    vec2 s, c;\n    sincos_taylor_fp64(t, sin_t, cos_t);\n\n    if (k == 0) {\n        s = sin_t;\n        c = cos_t;\n    } else {\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n        if (abs(float(abs_k) - 1.0) < 0.5) {\n            u = COS_TABLE_0_FP64;\n            v = SIN_TABLE_0_FP64;\n        } else if (abs(float(abs_k) - 2.0) < 0.5) {\n            u = COS_TABLE_1_FP64;\n            v = SIN_TABLE_1_FP64;\n        } else if (abs(float(abs_k) - 3.0) < 0.5) {\n            u = COS_TABLE_2_FP64;\n            v = SIN_TABLE_2_FP64;\n        } else if (abs(float(abs_k) - 4.0) < 0.5) {\n            u = COS_TABLE_3_FP64;\n            v = SIN_TABLE_3_FP64;\n        }\n#else\n        if (abs_k == 1) {\n            u = COS_TABLE_0_FP64;\n            v = SIN_TABLE_0_FP64;\n        } else if (abs_k == 2) {\n            u = COS_TABLE_1_FP64;\n            v = SIN_TABLE_1_FP64;\n        } else if (abs_k == 3) {\n            u = COS_TABLE_2_FP64;\n            v = SIN_TABLE_2_FP64;\n        } else if (abs_k == 4) {\n            u = COS_TABLE_3_FP64;\n            v = SIN_TABLE_3_FP64;\n        }\n#endif\n        if (k > 0) {\n            s = sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n            c = sub_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        } else {\n            s = sub_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n            c = sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n        }\n    }\n\n    if (j == 0) {\n        sin_a = s;\n        cos_a = c;\n    } else if (j == 1) {\n        sin_a = c;\n        cos_a = -s;\n    } else if (j == -1) {\n        sin_a = -c;\n        cos_a = s;\n    } else {\n        sin_a = -s;\n        cos_a = -c;\n    }\n    return div_fp64(sin_a, cos_a);\n}\n\nvec2 radians_fp64(vec2 degree) {\n  return mul_fp64(degree, PI_180_FP64);\n}\n\nvec2 mix_fp64(vec2 a, vec2 b, float x) {\n  vec2 range = sub_fp64(b, a);\n  return sum_fp64(a, mul_fp64(range, vec2(x, 0.0)));\n}\n\nvoid vec2_sum_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n    out_val[0] = sum_fp64(a[0], b[0]);\n    out_val[1] = sum_fp64(a[1], b[1]);\n}\n\nvoid vec2_sub_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n    out_val[0] = sub_fp64(a[0], b[0]);\n    out_val[1] = sub_fp64(a[1], b[1]);\n}\n\nvoid vec2_mul_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n    out_val[0] = mul_fp64(a[0], b[0]);\n    out_val[1] = mul_fp64(a[1], b[1]);\n}\n\nvoid vec2_div_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n    out_val[0] = div_fp64(a[0], b[0]);\n    out_val[1] = div_fp64(a[1], b[1]);\n}\n\nvoid vec2_mix_fp64(vec2 x[2], vec2 y[2], float a, out vec2 out_val[2]) {\n  vec2 range[2];\n  vec2_sub_fp64(y, x, range);\n  vec2 portion[2];\n  portion[0] = range[0] * a;\n  portion[1] = range[1] * a;\n  vec2_sum_fp64(x, portion, out_val);\n}\n\nvec2 vec2_length_fp64(vec2 x[2]) {\n  return sqrt_fp64(sum_fp64(mul_fp64(x[0], x[0]), mul_fp64(x[1], x[1])));\n}\n\nvoid vec2_normalize_fp64(vec2 x[2], out vec2 out_val[2]) {\n  vec2 length = vec2_length_fp64(x);\n  vec2 length_vec2[2];\n  length_vec2[0] = length;\n  length_vec2[1] = length;\n\n  vec2_div_fp64(x, length_vec2, out_val);\n}\n\nvec2 vec2_distance_fp64(vec2 x[2], vec2 y[2]) {\n  vec2 diff[2];\n  vec2_sub_fp64(x, y, diff);\n  return vec2_length_fp64(diff);\n}\n\nvec2 vec2_dot_fp64(vec2 a[2], vec2 b[2]) {\n  vec2 v[2];\n\n  v[0] = mul_fp64(a[0], b[0]);\n  v[1] = mul_fp64(a[1], b[1]);\n\n  return sum_fp64(v[0], v[1]);\n}\nvoid vec3_sub_fp64(vec2 a[3], vec2 b[3], out vec2 out_val[3]) {\n  for (int i = 0; i < 3; i++) {\n    out_val[i] = sum_fp64(a[i], b[i]);\n  }\n}\n\nvoid vec3_sum_fp64(vec2 a[3], vec2 b[3], out vec2 out_val[3]) {\n  for (int i = 0; i < 3; i++) {\n    out_val[i] = sum_fp64(a[i], b[i]);\n  }\n}\n\nvec2 vec3_length_fp64(vec2 x[3]) {\n  return sqrt_fp64(sum_fp64(sum_fp64(mul_fp64(x[0], x[0]), mul_fp64(x[1], x[1])),\n    mul_fp64(x[2], x[2])));\n}\n\nvec2 vec3_distance_fp64(vec2 x[3], vec2 y[3]) {\n  vec2 diff[3];\n  vec3_sub_fp64(x, y, diff);\n  return vec3_length_fp64(diff);\n}\nvoid vec4_fp64(vec4 a, out vec2 out_val[4]) {\n  out_val[0].x = a[0];\n  out_val[0].y = 0.0;\n\n  out_val[1].x = a[1];\n  out_val[1].y = 0.0;\n\n  out_val[2].x = a[2];\n  out_val[2].y = 0.0;\n\n  out_val[3].x = a[3];\n  out_val[3].y = 0.0;\n}\n\nvoid vec4_scalar_mul_fp64(vec2 a[4], vec2 b, out vec2 out_val[4]) {\n  out_val[0] = mul_fp64(a[0], b);\n  out_val[1] = mul_fp64(a[1], b);\n  out_val[2] = mul_fp64(a[2], b);\n  out_val[3] = mul_fp64(a[3], b);\n}\n\nvoid vec4_sum_fp64(vec2 a[4], vec2 b[4], out vec2 out_val[4]) {\n  for (int i = 0; i < 4; i++) {\n    out_val[i] = sum_fp64(a[i], b[i]);\n  }\n}\n\nvoid vec4_dot_fp64(vec2 a[4], vec2 b[4], out vec2 out_val) {\n  vec2 v[4];\n\n  v[0] = mul_fp64(a[0], b[0]);\n  v[1] = mul_fp64(a[1], b[1]);\n  v[2] = mul_fp64(a[2], b[2]);\n  v[3] = mul_fp64(a[3], b[3]);\n\n  out_val = sum_fp64(sum_fp64(v[0], v[1]), sum_fp64(v[2], v[3]));\n}\n\nvoid mat4_vec4_mul_fp64(vec2 b[16], vec2 a[4], out vec2 out_val[4]) {\n  vec2 tmp[4];\n\n  for (int i = 0; i < 4; i++)\n  {\n    for (int j = 0; j < 4; j++)\n    {\n      tmp[j] = b[j + i * 4];\n    }\n    vec4_dot_fp64(a, tmp, out_val[i]);\n  }\n}\n",fs:null,dependencies:[{name:"fp64-arithmetic",vs:"uniform float ONE;\nvec2 split(float a) {\n  const float SPLIT = 4097.0;\n  float t = a * SPLIT;\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n  float a_hi = t * ONE - (t - a);\n  float a_lo = a * ONE - a_hi;\n#else\n  float a_hi = t - (t - a);\n  float a_lo = a - a_hi;\n#endif\n  return vec2(a_hi, a_lo);\n}\nvec2 split2(vec2 a) {\n  vec2 b = split(a.x);\n  b.y += a.y;\n  return b;\n}\nvec2 quickTwoSum(float a, float b) {\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n  float sum = (a + b) * ONE;\n  float err = b - (sum - a) * ONE;\n#else\n  float sum = a + b;\n  float err = b - (sum - a);\n#endif\n  return vec2(sum, err);\n}\nvec2 twoSum(float a, float b) {\n  float s = (a + b);\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n  float v = (s * ONE - a) * ONE;\n  float err = (a - (s - v) * ONE) * ONE * ONE * ONE + (b - v);\n#else\n  float v = s - a;\n  float err = (a - (s - v)) + (b - v);\n#endif\n  return vec2(s, err);\n}\n\nvec2 twoSub(float a, float b) {\n  float s = (a - b);\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n  float v = (s * ONE - a) * ONE;\n  float err = (a - (s - v) * ONE) * ONE * ONE * ONE - (b + v);\n#else\n  float v = s - a;\n  float err = (a - (s - v)) - (b + v);\n#endif\n  return vec2(s, err);\n}\n\nvec2 twoSqr(float a) {\n  float prod = a * a;\n  vec2 a_fp64 = split(a);\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n  float err = ((a_fp64.x * a_fp64.x - prod) * ONE + 2.0 * a_fp64.x *\n    a_fp64.y * ONE * ONE) + a_fp64.y * a_fp64.y * ONE * ONE * ONE;\n#else\n  float err = ((a_fp64.x * a_fp64.x - prod) + 2.0 * a_fp64.x * a_fp64.y) + a_fp64.y * a_fp64.y;\n#endif\n  return vec2(prod, err);\n}\n\nvec2 twoProd(float a, float b) {\n  float prod = a * b;\n  vec2 a_fp64 = split(a);\n  vec2 b_fp64 = split(b);\n  float err = ((a_fp64.x * b_fp64.x - prod) + a_fp64.x * b_fp64.y +\n    a_fp64.y * b_fp64.x) + a_fp64.y * b_fp64.y;\n  return vec2(prod, err);\n}\n\nvec2 sum_fp64(vec2 a, vec2 b) {\n  vec2 s, t;\n  s = twoSum(a.x, b.x);\n  t = twoSum(a.y, b.y);\n  s.y += t.x;\n  s = quickTwoSum(s.x, s.y);\n  s.y += t.y;\n  s = quickTwoSum(s.x, s.y);\n  return s;\n}\n\nvec2 sub_fp64(vec2 a, vec2 b) {\n  vec2 s, t;\n  s = twoSub(a.x, b.x);\n  t = twoSub(a.y, b.y);\n  s.y += t.x;\n  s = quickTwoSum(s.x, s.y);\n  s.y += t.y;\n  s = quickTwoSum(s.x, s.y);\n  return s;\n}\n\nvec2 mul_fp64(vec2 a, vec2 b) {\n  vec2 prod = twoProd(a.x, b.x);\n  prod.y += a.x * b.y;\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n  prod = split2(prod);\n#endif\n  prod = quickTwoSum(prod.x, prod.y);\n  prod.y += a.y * b.x;\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n  prod = split2(prod);\n#endif\n  prod = quickTwoSum(prod.x, prod.y);\n  return prod;\n}\n\nvec2 div_fp64(vec2 a, vec2 b) {\n  float xn = 1.0 / b.x;\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n  vec2 yn = mul_fp64(a, vec2(xn, 0));\n#else\n  vec2 yn = a * xn;\n#endif\n  float diff = (sub_fp64(a, mul_fp64(b, yn))).x;\n  vec2 prod = twoProd(xn, diff);\n  return sum_fp64(yn, prod);\n}\n\nvec2 sqrt_fp64(vec2 a) {\n  if (a.x == 0.0 && a.y == 0.0) return vec2(0.0, 0.0);\n  if (a.x < 0.0) return vec2(0.0 / 0.0, 0.0 / 0.0);\n\n  float x = 1.0 / sqrt(a.x);\n  float yn = a.x * x;\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n  vec2 yn_sqr = twoSqr(yn) * ONE;\n#else\n  vec2 yn_sqr = twoSqr(yn);\n#endif\n  float diff = sub_fp64(a, yn_sqr).x;\n  vec2 prod = twoProd(x * 0.5, diff);\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n  return sum_fp64(split(yn), prod);\n#else\n  return sum_fp64(vec2(yn, 0.0), prod);\n#endif\n}\n",fs:null,getUniforms:function(){return V},fp64ify:K,fp64LowPart:W}],fp64ify:K,fp64LowPart:W,fp64ifyMatrix4:function(e){for(var t=new Float32Array(32),n=0;n<4;++n)for(var r=0;r<4;++r){var i=4*n+r;K(e[4*r+n],t,2*i)}return t}},Z=n(418),$=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],ee={modelMatrix:$,viewMatrix:$,projectionMatrix:$,cameraPositionWorld:[0,0,0]};var te="varying vec4 project_vPositionWorld;\nvarying vec3 project_vNormalWorld;\n\nvec4 project_getPosition_World() {\n  return project_vPositionWorld;\n}\n\nvec3 project_getNormal_World() {\n  return project_vNormalWorld;\n}\n",ne={name:"project",getUniforms:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ee,t=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],{});return void 0!==e.modelMatrix&&(t.modelMatrix=e.modelMatrix),void 0!==e.viewMatrix&&(t.viewMatrix=e.viewMatrix),void 0!==e.projectionMatrix&&(t.projectionMatrix=e.projectionMatrix),void 0!==e.cameraPositionWorld&&(t.cameraPositionWorld=e.cameraPositionWorld),void 0===e.projectionMatrix&&void 0===e.viewMatrix||(t.viewProjectionMatrix=new Z.a(e.projectionMatrix).multiplyRight(e.viewMatrix)),t},vs:"".concat(te,"\nuniform mat4 modelMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewProjectionMatrix;\nuniform vec3 cameraPositionWorld;\n\nstruct World {\n  vec3 position;\n  vec3 normal;\n};\n\nWorld world;\n\nvoid project_setPosition(vec4 position) {\n  project_vPositionWorld = position;\n}\n\nvoid project_setNormal(vec3 normal) {\n  project_vNormalWorld = normal;\n}\n\nvoid project_setPositionAndNormal_World(vec3 position, vec3 normal) {\n  world.position = position;\n  world.normal = normal;\n}\n\nvoid project_setPositionAndNormal_Model(vec3 position, vec3 normal) {\n  world.position = (modelMatrix * vec4(position, 1.)).xyz;\n  world.normal = mat3(modelMatrix) * normal;\n}\n\nvec4 project_model_to_clipspace(vec4 position) {\n  return viewProjectionMatrix * modelMatrix * position;\n}\n\nvec4 project_model_to_clipspace(vec3 position) {\n  return viewProjectionMatrix * modelMatrix * vec4(position, 1.);\n}\n\nvec4 project_world_to_clipspace(vec3 position) {\n  return viewProjectionMatrix * vec4(position, 1.);\n}\n\nvec4 project_view_to_clipspace(vec3 position) {\n  return projectionMatrix * vec4(position, 1.);\n}\n\nvec4 project_to_clipspace(vec3 position) {\n  return viewProjectionMatrix * vec4(position, 1.);\n}\n"),fs:"\n".concat(te)},re={lightDirection:new Float32Array([1,1,2])};var ie={name:"dirlight",vs:null,fs:"uniform vec3 dirlight_uLightDirection;\nvec4 dirlight_filterColor(vec4 color) {\n  vec3 normal = project_getNormal_World();\n  float d = abs(dot(normalize(normal), normalize(dirlight_uLightDirection)));\n  return vec4(color.rgb * d, color.a);\n}\n",getUniforms:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:re,t={};return e.lightDirection&&(t.dirlight_uLightDirection=e.lightDirection),t},dependencies:[ne]},ae=n(735),oe=n(931),se=n(930),ue=n(51);n.d(t,"createGLContext",(function(){return r.a})),n.d(t,"instrumentGLContext",(function(){return r.e})),n.d(t,"isWebGL",(function(){return r.f})),n.d(t,"isWebGL2",(function(){return r.g})),n.d(t,"getParameters",(function(){return r.d})),n.d(t,"setParameters",(function(){return r.k})),n.d(t,"withParameters",(function(){return r.l})),n.d(t,"resetParameters",(function(){return r.i})),n.d(t,"cssToDeviceRatio",(function(){return r.c})),n.d(t,"cssToDevicePixels",(function(){return r.b})),n.d(t,"lumaStats",(function(){return i.a})),n.d(t,"FEATURES",(function(){return a.a})),n.d(t,"hasFeature",(function(){return o.b})),n.d(t,"hasFeatures",(function(){return o.c})),n.d(t,"Buffer",(function(){return s.a})),n.d(t,"Program",(function(){return u.a})),n.d(t,"Framebuffer",(function(){return A.a})),n.d(t,"Renderbuffer",(function(){return c.a})),n.d(t,"Texture2D",(function(){return l.a})),n.d(t,"TextureCube",(function(){return f.a})),n.d(t,"clear",(function(){return h.a})),n.d(t,"readPixelsToArray",(function(){return g.c})),n.d(t,"readPixelsToBuffer",(function(){return g.d})),n.d(t,"cloneTextureFrom",(function(){return d.a})),n.d(t,"copyToTexture",(function(){return g.b})),n.d(t,"Texture3D",(function(){return p.a})),n.d(t,"TransformFeedback",(function(){return v.a})),n.d(t,"AnimationLoop",(function(){return y.a})),n.d(t,"Model",(function(){return m.a})),n.d(t,"Transform",(function(){return I.a})),n.d(t,"ProgramManager",(function(){return b.a})),n.d(t,"Timeline",(function(){return E.a})),n.d(t,"Geometry",(function(){return C.a})),n.d(t,"ClipSpace",(function(){return B.a})),n.d(t,"ConeGeometry",(function(){return j})),n.d(t,"CubeGeometry",(function(){return M.a})),n.d(t,"CylinderGeometry",(function(){return N})),n.d(t,"IcoSphereGeometry",(function(){return P})),n.d(t,"PlaneGeometry",(function(){return G})),n.d(t,"SphereGeometry",(function(){return H})),n.d(t,"TruncatedConeGeometry",(function(){return D})),n.d(t,"normalizeShaderModule",(function(){return J.b})),n.d(t,"fp32",(function(){return z.a})),n.d(t,"fp64",(function(){return X})),n.d(t,"project",(function(){return ne})),n.d(t,"dirlight",(function(){return ie})),n.d(t,"picking",(function(){return ae.a})),n.d(t,"gouraudLighting",(function(){return oe.a})),n.d(t,"phongLighting",(function(){return oe.b})),n.d(t,"pbr",(function(){return se.a})),n.d(t,"log",(function(){return r.h})),n.d(t,"assert",(function(){return ue.a})),n.d(t,"uid",(function(){return S.c}))},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error(t||"luma.gl: assertion failed.")}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return s})),n.d(t,"b",(function(){return u}));n(25),n(65),n(23),n(130),Math.PI,Math.PI;var r={};function i(e){return Math.round(e/r.EPSILON)*r.EPSILON}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.precision,a=void 0===n?r.precision||4:n;return e=i(e),"".concat(parseFloat(e.toPrecision(a)))}function o(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function s(e,t,n){return o(e)?e.map((function(e,r){return s(e,t[r],n)})):n*t+(1-n)*e}function u(e,t,n){var i=r.EPSILON;n&&(r.EPSILON=n);try{if(e===t)return!0;if(o(e)&&o(t)){if(e.length!==t.length)return!1;for(var a=0;a<e.length;++a)if(!u(e[a],t[a]))return!1;return!0}return e&&e.equals?e.equals(t):t&&t.equals?t.equals(e):!(!Number.isFinite(e)||!Number.isFinite(t))&&Math.abs(e-t)<=r.EPSILON*Math.max(1,Math.abs(e),Math.abs(t))}finally{r.EPSILON=i}}r.EPSILON=1e-12,r.debug=!1,r.precision=4,r.printTypes=!1,r.printDegrees=!1,r.printRowMajor=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return s}));n(25),n(65),n(23),n(102),Math.PI,Math.PI;var r={};function i(e){return Math.round(e/r.EPSILON)*r.EPSILON}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.precision,a=void 0===n?r.precision||4:n;return e=i(e),"".concat(parseFloat(e.toPrecision(a)))}function o(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function s(e,t,n){var i=r.EPSILON;n&&(r.EPSILON=n);try{if(e===t)return!0;if(o(e)&&o(t)){if(e.length!==t.length)return!1;for(var a=0;a<e.length;++a)if(!s(e[a],t[a]))return!1;return!0}return e&&e.equals?e.equals(t):t&&t.equals?t.equals(e):!(!Number.isFinite(e)||!Number.isFinite(t))&&Math.abs(e-t)<=r.EPSILON*Math.max(1,Math.abs(e),Math.abs(t))}finally{r.EPSILON=i}}r.EPSILON=1e-12,r.debug=!1,r.precision=4,r.printTypes=!1,r.printDegrees=!1,r.printRowMajor=!0},function(e,t,n){"use strict";n.d(t,"f",(function(){return o})),n.d(t,"g",(function(){return s})),n.d(t,"d",(function(){return u})),n.d(t,"a",(function(){return A})),n.d(t,"e",(function(){return c})),n.d(t,"i",(function(){return l})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return h})),n.d(t,"h",(function(){return g}));var r=n(25),i=function(e){return"boolean"===typeof e},a=function(e){return"function"===typeof e},o=function(e){return null!==e&&"object"===Object(r.a)(e)},s=function(e){return o(e)&&e.constructor==={}.constructor},u=function(e){return e&&"function"===typeof e[Symbol.iterator]},A=function(e){return e&&"function"===typeof e[Symbol.asyncIterator]},c=function(e){return e&&a(e.next)},l=function(e){return"undefined"!==typeof Response&&e instanceof Response||e&&e.arrayBuffer&&e.text&&e.json},f=function(e){return"undefined"!==typeof Blob&&e instanceof Blob},h=function(e){return e&&"object"===Object(r.a)(e)&&e.isBuffer},g=function(e){return function(e){return"undefined"!==typeof ReadableStream&&e instanceof ReadableStream||o(e)&&a(e.tee)&&a(e.cancel)&&a(e.getReader)}(e)||function(e){return o(e)&&a(e.read)&&a(e.pipe)&&i(e.readable)}(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return s}));n(25),n(65),n(23),n(129),Math.PI,Math.PI;var r={};function i(e){return Math.round(e/r.EPSILON)*r.EPSILON}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.precision,a=void 0===n?r.precision||4:n;return e=i(e),"".concat(parseFloat(e.toPrecision(a)))}function o(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function s(e,t,n){var i=r.EPSILON;n&&(r.EPSILON=n);try{if(e===t)return!0;if(o(e)&&o(t)){if(e.length!==t.length)return!1;for(var a=0;a<e.length;++a)if(!s(e[a],t[a]))return!1;return!0}return e&&e.equals?e.equals(t):t&&t.equals?t.equals(e):!(!Number.isFinite(e)||!Number.isFinite(t))&&Math.abs(e-t)<=r.EPSILON*Math.max(1,Math.abs(e),Math.abs(t))}finally{r.EPSILON=i}}r.EPSILON=1e-12,r.debug=!1,r.precision=4,r.printTypes=!1,r.printDegrees=!1,r.printRowMajor=!0},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error(t||"deck.gl: assertion failed.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return s}));n(25),n(65),n(23),n(184),Math.PI,Math.PI;var r={};function i(e){return Math.round(e/r.EPSILON)*r.EPSILON}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.precision,a=void 0===n?r.precision||4:n;return e=i(e),"".concat(parseFloat(e.toPrecision(a)))}function o(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function s(e,t,n){var i=r.EPSILON;n&&(r.EPSILON=n);try{if(e===t)return!0;if(o(e)&&o(t)){if(e.length!==t.length)return!1;for(var a=0;a<e.length;++a)if(!s(e[a],t[a]))return!1;return!0}return e&&e.equals?e.equals(t):t&&t.equals?t.equals(e):!(!Number.isFinite(e)||!Number.isFinite(t))&&Math.abs(e-t)<=r.EPSILON*Math.max(1,Math.abs(e),Math.abs(t))}finally{r.EPSILON=i}}r.EPSILON=1e-12,r.debug=!1,r.precision=4,r.printTypes=!1,r.printDegrees=!1,r.printRowMajor=!0},function(e,t,n){"use strict";function r(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(A){return void n(A)}s.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,a){var o=e.apply(t,n);function s(e){r(o,i,a,s,u,"next",e)}function u(e){r(o,i,a,s,u,"throw",e)}s(void 0)}))}}n.d(t,"a",(function(){return i}))},function(e,t,n){e.exports=n(611)},function(e,t,n){"use strict";var r={};function i(e){var t=e&&e.lastIndexOf("/");return t>=0?e.substr(0,t):""}n.r(r),n.d(r,"dirname",(function(){return i})),n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return u}));var r=n(54);function i(e,t){if(e.length!==t)return!1;for(var n=0;n<e.length;++n)if(!Number.isFinite(e[n]))return!1;return!0}function a(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(r.a.debug&&!i(e,t))throw new Error("math.gl: ".concat(n," some fields set to invalid numbers'"));return e}var s={};function u(e,t){s[e]||(s[e]=!0,console.warn("".concat(e," has been removed in version ").concat(t,", see upgrade guide for more information")))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return u}));var r=n(38);function i(e,t){if(e.length!==t)return!1;for(var n=0;n<e.length;++n)if(!Number.isFinite(e[n]))return!1;return!0}function a(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(r.b.debug&&!i(e,t))throw new Error("math.gl: ".concat(n," some fields set to invalid numbers'"));return e}var s={};function u(e,t){s[e]||(s[e]=!0,console.warn("".concat(e," has been removed in version ").concat(t,", see upgrade guide for more information")))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(220);function i(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function a(e,t,n){return(a=i()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var a=new(Function.bind.apply(e,i));return n&&Object(r.a)(a,n.prototype),a}).apply(null,arguments)}},function(e,t,n){"use strict";var r=n(23),i=n(16),a=n(3),o=n(2),s=n(40);function u(e,t){var n=s.n([],t,e);return s.k(n,n,1/n[3]),n}function A(e,t){var n=e%t;return n<0?t+n:n}function c(e,t,n){return n*t+(1-n)*e}var l=n(10),f=n(32),h=n(17);function g(e,t){if(!e)throw new Error(t||"@math.gl/web-mercator: assertion failed.")}var d=Math.PI,p=d/4,v=d/180,y=180/d;function m(e){return Math.pow(2,e)}function I(e){return Math.log2(e)}function b(e){var t=Object(i.a)(e,2),n=t[0],r=t[1];g(Number.isFinite(n)),g(Number.isFinite(r)&&r>=-90&&r<=90,"invalid latitude");var a=r*v;return[512*(n*v+d)/(2*d),512*(d+Math.log(Math.tan(p+.5*a)))/(2*d)]}function E(e){var t=Object(i.a)(e,2),n=t[0],r=t[1],a=n/512*(2*d)-d,o=2*(Math.atan(Math.exp(r/512*(2*d)-d))-p);return[a*y,o*y]}function C(e){var t=e.latitude;return g(Number.isFinite(t)),I(4003e4*Math.cos(t*v))-9}function B(e){var t=e.latitude,n=e.longitude,r=e.highPrecision,i=void 0!==r&&r;g(Number.isFinite(t)&&Number.isFinite(n));var a={},o=Math.cos(t*v),s=512/360/o,u=512/4003e4/o;if(a.unitsPerMeter=[u,u,u],a.metersPerUnit=[1/u,1/u,1/u],a.unitsPerDegree=[512/360,s,u],a.degreesPerUnit=[.703125,1/s,1/u],i){var A=v*Math.tan(t*v)/o,c=512/360*A/2,l=512/4003e4*A,f=l/s*u;a.unitsPerDegree2=[0,c,l],a.unitsPerMeter2=[f,0,f]}return a}function w(e,t){var n=Object(i.a)(e,3),r=n[0],a=n[1],o=n[2],s=Object(i.a)(t,3),u=s[0],A=s[1],c=s[2],l=B({longitude:r,latitude:a,highPrecision:!0}),f=l.unitsPerMeter,h=l.unitsPerMeter2,g=b(e);g[0]+=u*(f[0]+h[0]*A),g[1]+=A*(f[1]+h[1]*A);var d=E(g),p=(o||0)+(c||0);return Number.isFinite(o)||Number.isFinite(c)?[d[0],d[1],p]:d}function Q(e){var t=e.height,n=e.pitch,r=e.bearing,i=e.altitude,a=e.scale,o=e.center,s=void 0===o?null:o,u=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return l.p(u,u,[0,0,-i]),l.l(u,u,-n*v),l.n(u,u,r*v),a/=t,l.o(u,u,[a,a,a]),s&&l.p(u,u,h.i([],s)),u}function k(e){var t=e.width,n=e.height,r=e.altitude,i=void 0===r?1.5:r,a=e.pitch,o=void 0===a?0:a,s=e.nearZMultiplier,u=void 0===s?1:s,A=e.farZMultiplier,c=void 0===A?1:A,l=o*v,f=Math.atan(.5/i),h=Math.sin(f)*i/Math.sin(Math.min(Math.max(Math.PI/2-l-f,.01),Math.PI-.01));return{fov:2*f,aspect:t/n,focalDistance:i,near:u,far:(Math.sin(l)*h+i)*c}}function _(e){var t=e.width,n=e.height,r=e.pitch,i=k({width:t,height:n,altitude:e.altitude,pitch:r,nearZMultiplier:e.nearZMultiplier,farZMultiplier:e.farZMultiplier}),a=i.fov,o=i.aspect,s=i.near,u=i.far;return l.j([],a,o,s,u)}function x(e,t){var n=Object(i.a)(e,3),r=n[0],a=n[1],o=n[2],s=void 0===o?0:o;return g(Number.isFinite(r)&&Number.isFinite(a)&&Number.isFinite(s)),u(t,[r,a,s,1])}function S(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Object(i.a)(e,3),a=r[0],o=r[1],s=r[2];if(g(Number.isFinite(a)&&Number.isFinite(o),"invalid pixel coordinate"),Number.isFinite(s)){var A=u(t,[a,o,s,1]);return A}var c=u(t,[a,o,0,1]),l=u(t,[a,o,1,1]),h=c[2],d=l[2],p=h===d?0:((n||0)-h)/(d-h);return f.c([],c,l,p)}function O(e){var t=e.width,n=e.height,r=e.bounds,a=e.minExtent,o=void 0===a?0:a,s=e.maxZoom,u=void 0===s?24:s,A=e.padding,c=void 0===A?0:A,l=e.offset,f=void 0===l?[0,0]:l,h=Object(i.a)(r,2),d=Object(i.a)(h[0],2),p=d[0],v=d[1],y=Object(i.a)(h[1],2),m=y[0],I=y[1];if(Number.isFinite(c)){c={top:c,bottom:c,left:c,right:c}}else g(Number.isFinite(c.top)&&Number.isFinite(c.bottom)&&Number.isFinite(c.left)&&Number.isFinite(c.right));var b=new M({width:t,height:n,longitude:0,latitude:0,zoom:0}),E=b.project([p,I]),C=b.project([m,v]),B=[Math.max(Math.abs(C[0]-E[0]),o),Math.max(Math.abs(C[1]-E[1]),o)],w=[t-c.left-c.right-2*Math.abs(f[0]),n-c.top-c.bottom-2*Math.abs(f[1])];g(w[0]>0&&w[1]>0);var Q=w[0]/B[0],k=w[1]/B[1],_=(c.right-c.left)/2/Q,x=(c.bottom-c.top)/2/k,S=[(C[0]+E[0])/2+_,(C[1]+E[1])/2+x],O=b.unproject(S),D=Math.min(u,b.zoom+Math.log2(Math.abs(Math.min(Q,k))));return g(Number.isFinite(D)),{longitude:O[0],latitude:O[1],zoom:D}}var D=Math.PI/180;function R(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=e.width,a=e.height,o=e.unproject,s={targetZ:r},u=o([0,a],s),A=o([i,a],s),c=Math.atan(.5/e.altitude),l=(90-e.pitch)*D;return c>l-.01?(t=j(e,0,r),n=j(e,i,r)):(t=o([0,0],s),n=o([i,0],s)),[u,A,n,t]}function j(e,t,n){var r=e.pixelUnprojectionMatrix,i=u(r,[t,0,1,1]),a=u(r,[t,e.height,1,1]),o=(n*e.distanceScales.unitsPerMeter[2]-i[2])/(a[2]-i[2]),s=E(f.c([],i,a,o));return s[2]=n,s}var M=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{width:1,height:1},n=t.width,r=t.height,i=t.latitude,o=void 0===i?0:i,s=t.longitude,u=void 0===s?0:s,A=t.zoom,c=void 0===A?0:A,l=t.pitch,f=void 0===l?0:l,h=t.bearing,g=void 0===h?0:h,d=t.altitude,p=void 0===d?1.5:d,v=t.nearZMultiplier,y=void 0===v?.02:v,I=t.farZMultiplier,E=void 0===I?1.01:I;Object(a.a)(this,e),n=n||1,r=r||1;var C=m(c);p=Math.max(.75,p);var w=b([u,o]);w[2]=0,this.projectionMatrix=_({width:n,height:r,pitch:f,altitude:p,nearZMultiplier:y,farZMultiplier:E}),this.viewMatrix=Q({height:r,scale:C,center:w,pitch:f,bearing:g,altitude:p}),this.width=n,this.height=r,this.scale=C,this.latitude=o,this.longitude=u,this.zoom=c,this.pitch=f,this.bearing=g,this.altitude=p,this.center=w,this.distanceScales=B(this),this._initMatrices(),this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),Object.freeze(this)}return Object(o.a)(e,[{key:"_initMatrices",value:function(){var e=this.width,t=this.height,n=this.projectionMatrix,r=this.viewMatrix,i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];l.h(i,i,n),l.h(i,i,r),this.viewProjectionMatrix=i;var a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];l.o(a,a,[e/2,-t/2,1]),l.p(a,a,[1,-1,0]),l.h(a,a,i);var o=l.f([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],a);if(!o)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=a,this.pixelUnprojectionMatrix=o}},{key:"equals",value:function(t){return t instanceof e&&(t.width===this.width&&t.height===this.height&&l.b(t.projectionMatrix,this.projectionMatrix)&&l.b(t.viewMatrix,this.viewMatrix))}},{key:"project",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.topLeft,r=void 0===n||n,a=this.projectPosition(e),o=x(a,this.pixelProjectionMatrix),s=Object(i.a)(o,2),u=s[0],A=s[1],c=r?A:this.height-A;return 2===e.length?[u,c]:[u,c,o[2]]}},{key:"unproject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.topLeft,r=void 0===n||n,a=t.targetZ,o=void 0===a?void 0:a,s=Object(i.a)(e,3),u=s[0],A=s[1],c=s[2],l=r?A:this.height-A,f=o&&o*this.distanceScales.unitsPerMeter[2],h=S([u,l,c],this.pixelUnprojectionMatrix,f),g=this.unprojectPosition(h),d=Object(i.a)(g,3),p=d[0],v=d[1],y=d[2];return Number.isFinite(c)?[p,v,y]:Number.isFinite(o)?[p,v,o]:[p,v]}},{key:"projectPosition",value:function(e){var t=b(e),n=Object(i.a)(t,2);return[n[0],n[1],(e[2]||0)*this.distanceScales.unitsPerMeter[2]]}},{key:"unprojectPosition",value:function(e){var t=E(e),n=Object(i.a)(t,2);return[n[0],n[1],(e[2]||0)*this.distanceScales.metersPerUnit[2]]}},{key:"projectFlat",value:function(e){return b(e)}},{key:"unprojectFlat",value:function(e){return E(e)}},{key:"getMapCenterByLngLatPosition",value:function(e){var t=e.lngLat,n=S(e.pos,this.pixelUnprojectionMatrix),r=b(t),i=f.a([],r,f.d([],n));return E(f.a([],this.center,i))}},{key:"getLocationAtPoint",value:function(e){var t=e.lngLat,n=e.pos;return this.getMapCenterByLngLatPosition({lngLat:t,pos:n})}},{key:"fitBounds",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.width,i=this.height,a=O(Object.assign({width:r,height:i,bounds:t},n)),o=a.longitude,s=a.latitude,u=a.zoom;return new e({width:r,height:i,longitude:o,latitude:s,zoom:u})}},{key:"getBounds",value:function(e){var t=this.getBoundingRegion(e),n=Math.min.apply(Math,Object(r.a)(t.map((function(e){return e[0]})))),i=Math.max.apply(Math,Object(r.a)(t.map((function(e){return e[0]}))));return[[n,Math.min.apply(Math,Object(r.a)(t.map((function(e){return e[1]}))))],[i,Math.max.apply(Math,Object(r.a)(t.map((function(e){return e[1]}))))]]}},{key:"getBoundingRegion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return R(this,e.z||0)}}]),e}();function N(e){var t=e.width,n=e.height,r=e.longitude,i=e.latitude,a=e.zoom,o=e.pitch,s=void 0===o?0:o,u=e.bearing,c=void 0===u?0:u;(r<-180||r>180)&&(r=A(r+180,360)-180),(c<-180||c>180)&&(c=A(c+180,360)-180);var l=new M({width:t,height:n,longitude:r,latitude:i,zoom:a}),f=l.project([r,85.05113])[1],h=l.project([r,-85.05113])[1],g=0;return h-f<n&&(a+=Math.log2(n/(h-f)),f=(l=new M({width:t,height:n,longitude:r,latitude:i,zoom:a})).project([r,85.05113])[1],h=l.project([r,-85.05113])[1]),f>0?g=f:h<n&&(g=h-n),g&&(i=l.unproject([t/2,n/2+g])[1]),{width:t,height:n,longitude:r,latitude:i,zoom:a,pitch:s,bearing:c}}function F(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return T(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var L=["longitude","latitude","zoom"],P={curve:1.414,speed:1.2};function U(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i={},a=q(e,t,r),o=a.startZoom,s=a.startCenterXY,u=a.uDelta,A=a.w0,l=a.u1,h=a.S,g=a.rho,d=a.rho2,p=a.r0;if(l<.01){var v,y=F(L);try{for(y.s();!(v=y.n()).done;){var m=v.value,b=e[m],C=t[m];i[m]=c(b,C,n)}}catch(O){y.e(O)}finally{y.f()}return i}var B=n*h,w=Math.cosh(p)/Math.cosh(p+g*B),Q=A*((Math.cosh(p)*Math.tanh(p+g*B)-Math.sinh(p))/d)/l,k=1/w,_=o+I(k),x=f.e([],u,Q);f.a(x,x,s);var S=E(x);return i.longitude=S[0],i.latitude=S[1],i.zoom=_,i}function G(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r=Object.assign({},P,r),a=i.screenSpeed,o=i.speed,s=i.maxDuration,u=q(e,t,r),A=u.S,c=u.rho,l=1e3*A;return n=Number.isFinite(a)?l/(a/c):l/o,Number.isFinite(s)&&n>s?0:n}function q(e,t,n){var r=(n=Object.assign({},P,n)).curve,i=e.zoom,a=[e.longitude,e.latitude],o=m(i),s=t.zoom,u=[t.longitude,t.latitude],A=m(s-i),c=b(a),l=b(u),h=f.f([],l,c),g=Math.max(e.width,e.height),d=g/A,p=f.b(h)*o,v=Math.max(p,.01),y=r*r,I=(d*d-g*g+y*y*v*v)/(2*g*y*v),E=(d*d-g*g-y*y*v*v)/(2*d*y*v),C=Math.log(Math.sqrt(I*I+1)-I),B=Math.log(Math.sqrt(E*E+1)-E);return{startZoom:i,startCenterXY:c,uDelta:h,w0:g,u1:p,S:(B-C)/r,rho:r,rho2:y,r0:C,r1:B}}n.d(t,"d",(function(){return R})),n.d(t,"b",(function(){return O})),n.d(t,"k",(function(){return N})),n.d(t,"c",(function(){return U})),n.d(t,"f",(function(){return G})),n.d(t,"j",(function(){return b})),n.d(t,"m",(function(){return E})),n.d(t,"n",(function(){return x})),n.d(t,"l",(function(){return S})),n.d(t,"g",(function(){return C})),n.d(t,"e",(function(){return B})),n.d(t,"a",(function(){return w})),n.d(t,"i",(function(){return Q})),n.d(t,"h",(function(){return k}))},function(e,t,n){"use strict";var r=n(24),i=n(20),a=n(47),o=n(0),s=n(9),u=n.n(s);function A(e){var t,n=new Set,r=function(e,r){var i="function"===typeof e?e(t):e;i!==t&&(t=r?i:Object.assign({},t,i),n.forEach((function(e){return e(t)})))},i=function(){return t},a={setState:r,getState:i,subscribe:function(e,r,a){return r||a?function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Object.is,o=r(t);function s(){try{var n=r(t);a(o,n)||e(o=n)}catch(i){e(null,i)}}return n.add(s),function(){return n.delete(s)}}(e,r,a):(n.add(e),function(){return n.delete(e)})},destroy:function(){return n.clear()}};return t=e(r,i,a),a}var c="undefined"===typeof window?o.useEffect:o.useLayoutEffect;var l=function(e){var t="function"===typeof e?A(e):e,n=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.getState,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.is,i=Object(o.useReducer)((function(e){return e+1}),0)[1],a=Object(o.useRef)(),s=Object(o.useRef)(n),u=Object(o.useRef)(r),A=Object(o.useRef)(!1),l=t.getState();void 0===a.current&&(a.current=n(l));var f=!1;(s.current!==n||u.current!==r||A.current)&&(e=n(l),f=!r(a.current,e)),c((function(){f&&(a.current=e),s.current=n,u.current=r,A.current=!1}));var h=Object(o.useRef)(l);return Object(o.useEffect)((function(){var e=function(){try{var e=s.current(t.getState());u.current(a.current,e)||(a.current=e,i())}catch(n){A.current=!0,i()}},n=t.subscribe(e);return t.getState()!==h.current&&e(),n}),[]),f?e:a.current};return Object.assign(n,t),n[Symbol.iterator]=u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.warn("[useStore, api] = create() is deprecated and will be removed in v4"),e.next=3,n;case 3:return e.next=5,t;case 5:case"end":return e.stop()}}),e)})),n},f=n(385),h=n.n(f),g=n(100);n.d(t,"o",(function(){return d})),n.d(t,"d",(function(){return I})),n.d(t,"h",(function(){return b})),n.d(t,"g",(function(){return E})),n.d(t,"i",(function(){return C})),n.d(t,"a",(function(){return B})),n.d(t,"l",(function(){return w})),n.d(t,"m",(function(){return Q})),n.d(t,"b",(function(){return k})),n.d(t,"j",(function(){return _})),n.d(t,"p",(function(){return x})),n.d(t,"n",(function(){return S})),n.d(t,"c",(function(){return O})),n.d(t,"k",(function(){return D})),n.d(t,"f",(function(){return R})),n.d(t,"e",(function(){return j}));var d=l((function(e){return{viewConfig:null,loaders:null,setViewConfig:function(t){return e({viewConfig:t})},setLoaders:function(t){return e({loaders:t})},setCoordinationValue:function(t){var n=t.parameter,r=t.scope,o=t.value;return e((function(e){return{viewConfig:Object(a.a)({},e.viewConfig,{coordinationSpace:Object(a.a)({},e.viewConfig.coordinationSpace,Object(i.a)({},n,Object(a.a)({},e.viewConfig.coordinationSpace[n],Object(i.a)({},r,o))))})}}))},removeComponent:function(t){return e((function(e){var n=e.viewConfig.layout.slice();return n.splice(t,1),{viewConfig:Object(a.a)({},e.viewConfig,{layout:n})}}))},changeLayout:function(t){return e((function(e){var n=e.viewConfig.layout.slice();return t.forEach((function(e){var t=Object(r.a)(e,2),i=t[0],o=t[1];n[i]=Object(a.a)({},n[i],{},o)})),{viewConfig:Object(a.a)({},e.viewConfig,{layout:n})}}))}}})),p=l((function(e){return{componentHover:null,setComponentHover:function(t){return e({componentHover:t})}}})),v=l((function(e){return{warning:null,setWarning:function(t){return e({warning:t})}}})),y=l((function(e){return{viewInfo:{},setComponentViewInfo:function(t,n){return e((function(e){return{viewInfo:Object(a.a)({},e.viewInfo,Object(i.a)({},t,n))}}))}}})),m=l((function(e){return{resizeCount:{},incrementResizeCount:function(){return e((function(e){return{resizeCount:e.resizeCount+1}}))}}}));function I(e,t){var n=d((function(e){return e.setCoordinationValue}));return[d((function(n){var r=n.viewConfig.coordinationSpace;return Object(g.b)(e.map((function(e){return r&&r[e]?[e,r[e][t[e]]]:[e,void 0]})))}),h.a),Object(g.b)(e.map((function(e){return["set".concat(Object(g.a)(e)),function(r){return n({parameter:e,scope:t[e],value:r})}]})))]}function b(){return d((function(e){return e.loaders}))}function E(){return d((function(e){var t;return null===(t=e.viewConfig)||void 0===t?void 0:t.layout}))}function C(){return d((function(e){return e.removeComponent}))}function B(){return d((function(e){return e.changeLayout}))}function w(){return d((function(e){return e.setLoaders}))}function Q(){return Object(o.useRef)(d.getState().setViewConfig).current}function k(){return p((function(e){return e.componentHover}))}function _(){return p((function(e){return e.setComponentHover}))}function x(){return v((function(e){return e.warning}))}function S(){return v((function(e){return e.setWarning}))}function O(e){return y(Object(o.useCallback)((function(t){return t.viewInfo[e]}),[e]))}function D(e){var t=Object(o.useRef)(y.getState().setComponentViewInfo);return function(n){return t.current(e,n)}}function R(){return m((function(e){return e.resizeCount}))}function j(){return m((function(e){return e.incrementResizeCount}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),i=n(115);function a(e,t){return r.useMemo((function(){return null==e&&null==t?null:function(n){Object(i.a)(e,n),Object(i.a)(t,n)}}),[e,t])}},,function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return u}));var r=n(53);function i(e,t){if(e.length!==t)return!1;for(var n=0;n<e.length;++n)if(!Number.isFinite(e[n]))return!1;return!0}function a(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(r.a.debug&&!i(e,t))throw new Error("math.gl: ".concat(n," some fields set to invalid numbers'"));return e}var s={};function u(e,t){s[e]||(s[e]=!0,console.warn("".concat(e," has been removed in version ").concat(t,", see upgrade guide for more information")))}},function(e,t,n){"use strict";function r(e,t,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function i(e,t,n){return void 0===n&&(n={}),r({type:"Point",coordinates:e},t,n)}function a(e,t,n){void 0===n&&(n={});for(var i=0,a=e;i<a.length;i++){var o=a[i];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}return r({type:"Polygon",coordinates:e},t,n)}function o(e,t,n){if(void 0===n&&(n={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return r({type:"LineString",coordinates:e},t,n)}function s(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function u(e,t,n){return void 0===n&&(n={}),r({type:"MultiLineString",coordinates:e},t,n)}function A(e,t,n){return void 0===n&&(n={}),r({type:"MultiPoint",coordinates:e},t,n)}function c(e,t,n){return void 0===n&&(n={}),r({type:"MultiPolygon",coordinates:e},t,n)}function l(e,n){void 0===n&&(n="kilometers");var r=t.factors[n];if(!r)throw new Error(n+" units is invalid");return e*r}function f(e,n){void 0===n&&(n="kilometers");var r=t.factors[n];if(!r)throw new Error(n+" units is invalid");return e/r}function h(e){return 180*(e%(2*Math.PI))/Math.PI}function g(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)&&!/^\s*$/.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.earthRadius=6371008.8,t.factors={centimeters:100*t.earthRadius,centimetres:100*t.earthRadius,degrees:t.earthRadius/111325,feet:3.28084*t.earthRadius,inches:39.37*t.earthRadius,kilometers:t.earthRadius/1e3,kilometres:t.earthRadius/1e3,meters:t.earthRadius,metres:t.earthRadius,miles:t.earthRadius/1609.344,millimeters:1e3*t.earthRadius,millimetres:1e3*t.earthRadius,nauticalmiles:t.earthRadius/1852,radians:1,yards:t.earthRadius/1.0936},t.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/t.earthRadius,yards:1/1.0936},t.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},t.feature=r,t.geometry=function(e,t,n){switch(void 0===n&&(n={}),e){case"Point":return i(t).geometry;case"LineString":return o(t).geometry;case"Polygon":return a(t).geometry;case"MultiPoint":return A(t).geometry;case"MultiLineString":return u(t).geometry;case"MultiPolygon":return c(t).geometry;default:throw new Error(e+" is invalid")}},t.point=i,t.points=function(e,t,n){return void 0===n&&(n={}),s(e.map((function(e){return i(e,t)})),n)},t.polygon=a,t.polygons=function(e,t,n){return void 0===n&&(n={}),s(e.map((function(e){return a(e,t)})),n)},t.lineString=o,t.lineStrings=function(e,t,n){return void 0===n&&(n={}),s(e.map((function(e){return o(e,t)})),n)},t.featureCollection=s,t.multiLineString=u,t.multiPoint=A,t.multiPolygon=c,t.geometryCollection=function(e,t,n){return void 0===n&&(n={}),r({type:"GeometryCollection",geometries:e},t,n)},t.round=function(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n},t.radiansToLength=l,t.lengthToRadians=f,t.lengthToDegrees=function(e,t){return h(f(e,t))},t.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},t.radiansToDegrees=h,t.degreesToRadians=function(e){return e%360*Math.PI/180},t.convertLength=function(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return l(f(e,t),n)},t.convertArea=function(e,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(e>=0))throw new Error("area must be a positive number");var i=t.areaFactors[n];if(!i)throw new Error("invalid original units");var a=t.areaFactors[r];if(!a)throw new Error("invalid final units");return e/i*a},t.isNumber=g,t.isObject=function(e){return!!e&&e.constructor===Object},t.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!g(e))throw new Error("bbox must only contain numbers")}))},t.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")},t.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},t.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},t.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},t.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},t.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},t.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},t.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},function(e,t,n){"use strict";function r(e){return e.charAt(0).toUpperCase()+e.slice(1)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"l",(function(){return o})),n.d(t,"i",(function(){return s})),n.d(t,"h",(function(){return u})),n.d(t,"g",(function(){return A})),n.d(t,"b",(function(){return c})),n.d(t,"f",(function(){return l})),n.d(t,"e",(function(){return f})),n.d(t,"d",(function(){return h})),n.d(t,"c",(function(){return g})),n.d(t,"k",(function(){return d})),n.d(t,"a",(function(){return p})),n.d(t,"j",(function(){return v}));var r,i=n(20),a=n(148),o=2048,s=1,u=16,A=20,c=9,l=15,f=10,h=90,g=3,d={dark:[224,224,224],light:[64,64,64]},p="-apple-system, 'Helvetica Neue', Arial, sans-serif",v=(r={},Object(i.a)(r,a.default.TEXTURE_MIN_FILTER,a.default.NEAREST),Object(i.a)(r,a.default.TEXTURE_MAG_FILTER,a.default.NEAREST),Object(i.a)(r,a.default.TEXTURE_WRAP_S,a.default.CLAMP_TO_EDGE),Object(i.a)(r,a.default.TEXTURE_WRAP_T,a.default.CLAMP_TO_EDGE),r)},function(e,n){e.exports=t},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){Object(r.a)(e,t,n[t])}))}return e}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o}));var r=n(44),i={};function a(e){i=e}function o(e){var t;r.a.level>0&&i[e]&&(t=i[e]).call.apply(t,arguments)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));var r={NO_STATE:"Awaiting state",MATCHED:"Matched. State transferred from previous layer",INITIALIZED:"Initialized",AWAITING_GC:"Discarded. Awaiting garbage collection",AWAITING_FINALIZATION:"No longer matched. Awaiting garbage collection",FINALIZED:"Finalized! Awaiting garbage collection"},i={COMPONENT:Symbol.for("component"),ASYNC_DEFAULTS:Symbol.for("asyncPropDefaults"),ASYNC_ORIGINAL:Symbol.for("asyncPropOriginal"),ASYNC_RESOLVED:Symbol.for("asyncPropResolved")}},function(e,t,n){"use strict";var r=n(4),i=n(220);var a=n(65);function o(e){var t="function"===typeof Map?new Map:void 0;return(o=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return Object(a.a)(e,arguments,Object(r.a)(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Object(i.a)(o,e)})(e)}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(3),i=n(2),a=n(7),o=n(4),s=n(58),u=n(6),A=n(89),c=n(122),l=n(133),f=n(160),h=n(21),g=n(364),d=n(51),p={offset:"accessor.offset",stride:"accessor.stride",type:"accessor.type",size:"accessor.size",divisor:"accessor.divisor",normalized:"accessor.normalized",integer:"accessor.integer",instanced:"accessor.divisor",isInstanced:"accessor.divisor"},v={removedProps:{},replacedProps:{bytes:"byteLength"},deprecatedProps:p},y={removedProps:p},m=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r.a)(this,t),(n=Object(a.a)(this,Object(o.a)(t).call(this,e,i))).stubRemovedMethods("Buffer","v6.0",["layout","setLayout","getIndexedParameter"]),n.target=i.target||(n.gl.webgl2?36662:34962),n.initialize(i),Object.seal(Object(s.a)(n)),n}return Object(u.a)(t,e),Object(i.a)(t,[{key:"getElementCount",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/c.a.getBytesPerElement(e))}},{key:"getVertexCount",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/c.a.getBytesPerVertex(e))}},{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ArrayBuffer.isView(e)&&(e={data:e}),Number.isFinite(e)&&(e={byteLength:e}),e=Object(g.a)("Buffer",e,v),this.usage=e.usage||35044,this.debugData=null,this.setAccessor(Object.assign({},e,e.accessor)),e.data?this._setData(e.data,e.offset,e.byteLength):this._setByteLength(e.byteLength||0),this}},{key:"setProps",value:function(e){return"accessor"in(e=Object(g.a)("Buffer",e,y))&&this.setAccessor(e.accessor),this}},{key:"setAccessor",value:function(e){return delete(e=Object.assign({},e)).buffer,this.accessor=new c.a(e),this}},{key:"reallocate",value:function(e){return e>this.byteLength?(this._setByteLength(e),!0):(this.bytesUsed=e,!1)}},{key:"setData",value:function(e){return this.initialize(e)}},{key:"subData",value:function(e){ArrayBuffer.isView(e)&&(e={data:e});var t=e,n=t.data,r=t.offset,i=void 0===r?0:r,a=t.srcOffset,o=void 0===a?0:a,s=e.byteLength||e.length;Object(d.a)(n);var u=this.gl.webgl2?36663:this.target;return this.gl.bindBuffer(u,this.handle),0!==o||void 0!==s?(Object(l.a)(this.gl),this.gl.bufferSubData(this.target,i,n,o,s)):this.gl.bufferSubData(u,i,n),this.gl.bindBuffer(u,null),this.debugData=null,this._inferType(n),this}},{key:"copyData",value:function(e){var t=e.sourceBuffer,n=e.readOffset,r=void 0===n?0:n,i=e.writeOffset,a=void 0===i?0:i,o=e.size,s=this.gl;return Object(l.a)(s),s.bindBuffer(36662,t.handle),s.bindBuffer(36663,this.handle),s.copyBufferSubData(36662,36663,r,a,o),s.bindBuffer(36662,null),s.bindBuffer(36663,null),this.debugData=null,this}},{key:"getData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.dstData,n=void 0===t?null:t,r=e.srcByteOffset,i=void 0===r?0:r,a=e.dstOffset,o=void 0===a?0:a,s=e.length,u=void 0===s?0:s;Object(l.a)(this.gl);var A,c,h=Object(f.c)(this.accessor.type||5126,{clamped:!1}),g=this._getAvailableElementCount(i),p=o;n?A=(c=n.length)-p:c=p+(A=Math.min(g,u||g));var v=Math.min(g,A);return u=u||v,Object(d.a)(u<=v),n=n||new h(c),this.gl.bindBuffer(36662,this.handle),this.gl.getBufferSubData(36662,i,n,o,u),this.gl.bindBuffer(36662,null),n}},{key:"bind",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.target,n=void 0===t?this.target:t,r=e.index,i=void 0===r?this.accessor&&this.accessor.index:r,a=e.offset,o=void 0===a?0:a,s=e.size;return 35345===n||35982===n?void 0!==s?this.gl.bindBufferRange(n,i,this.handle,o,s):(Object(d.a)(0===o),this.gl.bindBufferBase(n,i,this.handle)):this.gl.bindBuffer(n,this.handle),this}},{key:"unbind",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.target,n=void 0===t?this.target:t,r=e.index,i=void 0===r?this.accessor&&this.accessor.index:r,a=35345===n||35982===n;return a?this.gl.bindBufferBase(n,i,null):this.gl.bindBuffer(n,null),this}},{key:"getDebugData",value:function(){return this.debugData?{data:this.debugData,changed:!1}:(this.debugData=this.getData({length:Math.min(10,this.byteLength)}),{data:this.debugData,changed:!0})}},{key:"invalidateDebugData",value:function(){this.debugData=null}},{key:"_setData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.byteLength+t;Object(d.a)(ArrayBuffer.isView(e)),this._trackDeallocatedMemory();var r=this._getTarget();this.gl.bindBuffer(r,this.handle),this.gl.bufferData(r,n,this.usage),this.gl.bufferSubData(r,t,e),this.gl.bindBuffer(r,null),this.debugData=e.slice(0,10),this.bytesUsed=n,this._trackAllocatedMemory(n);var i=Object(f.b)(e);return Object(d.a)(i),this.setAccessor(new c.a(this.accessor,{type:i})),this}},{key:"_setByteLength",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.usage;Object(d.a)(e>=0),this._trackDeallocatedMemory();var n=e;0===e&&(n=new Float32Array(0));var r=this._getTarget();return this.gl.bindBuffer(r,this.handle),this.gl.bufferData(r,n,t),this.gl.bindBuffer(r,null),this.usage=t,this.debugData=null,this.bytesUsed=e,this._trackAllocatedMemory(e),this}},{key:"_getTarget",value:function(){return this.gl.webgl2?36663:this.target}},{key:"_getAvailableElementCount",value:function(e){var t=e/Object(f.c)(this.accessor.type||5126,{clamped:!1}).BYTES_PER_ELEMENT;return this.getElementCount()-t}},{key:"_inferType",value:function(e){this.accessor.type||this.setAccessor(new c.a(this.accessor,{type:Object(f.b)(e)}))}},{key:"_createHandle",value:function(){return this.gl.createBuffer()}},{key:"_deleteHandle",value:function(){this.gl.deleteBuffer(this.handle),this._trackDeallocatedMemory()}},{key:"_getParameter",value:function(e){this.gl.bindBuffer(this.target,this.handle);var t=this.gl.getBufferParameter(this.target,e);return this.gl.bindBuffer(this.target,null),t}},{key:"setByteLength",value:function(e){return h.h.deprecated("setByteLength","reallocate")(),this.reallocate(e)}},{key:"updateAccessor",value:function(e){return h.h.deprecated("updateAccessor(...)","setAccessor(new Accessor(buffer.accessor, ...)")(),this.accessor=new c.a(this.accessor,e),this}},{key:"type",get:function(){return h.h.deprecated("Buffer.type","Buffer.accessor.type")(),this.accessor.type}},{key:"bytes",get:function(){return h.h.deprecated("Buffer.bytes","Buffer.byteLength")(),this.byteLength}}]),t}(A.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"e",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return p})),n.d(t,"c",(function(){return v})),n.d(t,"f",(function(){return y}));var r=n(128),i=n(35);function a(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(e,t){var n=e%t;return n<0?t+n:n}function s(e){var t=e.viewMatrix,n=e.viewMatrixInverse;return{eye:[n[12],n[13],n[14]],direction:[-t[2],-t[6],-t[10]],up:[t[1],t[5],t[9]],right:[t[0],t[4],t[8]]}}var u,A=new i.c,c=new i.c,l=new i.c,f=new i.c,h=new i.c,g=new i.c,d=new i.c;function p(e){var t=e.aspect,n=e.near,r=e.far,a=e.fovyRadians,o=e.position,s=e.direction,u=e.up,p=e.right;c.copy(s);var v=1/c.len();c.normalize(),A.copy(o),l.copy(u);var y=1/l.len();l.normalize(),f.copy(p).normalize();var m=2*Math.tan(a/2)*n*y,I=m*t;h.copy(c).scale(n*v).add(A),g.copy(c).scale(r*v).add(A);var b=c.clone().negate(),E=b.dot(h),C={near:{distance:E,normal:b},far:{distance:c.dot(g),normal:c.clone()}};return d.copy(f).scale(.5*I).add(h).subtract(A).normalize(),b=new i.c(d).cross(l),E=A.dot(b),C.right={normal:b,distance:E},d.copy(f).scale(.5*-I).add(h).subtract(A).normalize(),b=new i.c(l).cross(d),E=A.dot(b),C.left={normal:b,distance:E},d.copy(l).scale(.5*m).add(h).subtract(A).normalize(),b=new i.c(f).cross(d),E=A.dot(b),C.top={normal:b,distance:E},d.copy(l).scale(.5*-m).add(h).subtract(A).normalize(),b=new i.c(d).cross(f),E=A.dot(b),C.bottom={normal:b,distance:E},C}function v(e){return e-Math.fround(e)}function y(e,t){var n=t.size,i=void 0===n?1:n,a=t.startIndex,o=void 0===a?0:a,s=t.endIndex;Number.isFinite(s)||(s=e.length);var A=(s-o)/i;u=r.a.allocate(u,A,{type:Float32Array,size:2*i});for(var c=o,l=0;c<s;){for(var f=0;f<i;f++){var h=e[c++];u[l+f]=h,u[l+f+i]=v(h)}l+=2*i}return u.subarray(0,A*i*2)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return s}));var r=n(248),i=r.a;function a(e){i=Object(r.b)(i,e)}function o(e){return i.deserialize(e)}function s(e){return i.serialize(e)}},function(e,t,n){"use strict";n.d(t,"g",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return h})),n.d(t,"a",(function(){return g})),n.d(t,"c",(function(){return d})),n.d(t,"i",(function(){return p})),n.d(t,"j",(function(){return v})),n.d(t,"k",(function(){return y})),n.d(t,"h",(function(){return m})),n.d(t,"m",(function(){return I})),n.d(t,"o",(function(){return b})),n.d(t,"n",(function(){return E})),n.d(t,"l",(function(){return C})),n.d(t,"f",(function(){return B}));var r=n(22),i=n(24),a=n(0),o=n.n(a),s=n(39),u=n(91),A=n(177);function c(e,t,n,r){return{coordinateSystem:s.a.CARTESIAN,data:e,pickable:!0,autoHighlight:!0,stroked:!0,filled:!0,getElevation:0,onHover:function(e){if(r&&r(),e.object){var a=Object(i.a)(e.object,2),o=a[0],s=a[1].factors;t&&t((u=void 0===s?{}:s,Object.entries(u).map((function(e){var t=Object(i.a)(e,2),n=t[0],r=t[1];return"".concat(n,": ").concat(r)})).join("; "))),n&&n(o)}else n&&n("");var u}}}var l=[128,128,128],f=[[68,119,170],[136,204,238],[68,170,153],[17,119,51],[153,153,51],[221,204,119],[204,102,119],[136,34,85],[170,68,153]],h=[[0,0,255],[0,255,0],[255,0,255],[255,255,0],[0,255,255],[255,255,255],[255,128,0],[255,0,0]],g=["viridis","greys","magma","jet","hot","bone","copper","summer","density","inferno"],d={webgl2:!0};function p(e){return function(t){return console.warn("".concat(e," updateCellsHover: ").concat(t.cellId))}}function v(e){return function(t){return console.warn("".concat(e," updateGenesHover: ").concat(t.geneId))}}function y(e){return function(t){return console.warn("".concat(e," updateViewInfo: ").concat(t))}}function m(e){var t=new ArrayBuffer(e.buffer.byteLength),n=new Uint8Array(t);return n.set(e),n}function I(e,t){var n=1;if(e)for(;e.find((function(e){return e.name==="".concat(t).concat(n)}));)n++;return"".concat(t).concat(n)}function b(e,t,n,i,a,o,s){var A=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"Selection ",c="My Selections",l=null===t||void 0===t?void 0:t.tree.find((function(e){return e.name===c})),h={version:u.c[u.h].latestVersion,datatype:u.h,tree:Object(r.a)(t?t.tree:[])},g=I(null===l||void 0===l?void 0:l.children,A),d=0;l?(d=l.children.length,l.children.push({name:g,set:e.map((function(e){return[e,null]}))})):h.tree.push({name:c,children:[{name:g,set:e.map((function(e){return[e,null]}))}]}),a(h);var p=["My Selections",g];o([].concat(Object(r.a)(n||[]),[{path:p,color:f[d%f.length]}])),i([p]),s("cellSetSelection")}function E(e,t){return{version:u.c[u.h].latestVersion,datatype:u.h,tree:[].concat(Object(r.a)(e?e.tree:[]),Object(r.a)(t?t.tree:[]))}}function C(e){return function(){var t=e.title,n=e.message;return o.a.createElement("div",{className:A.b},o.a.createElement("h1",null,t),o.a.createElement("div",null,n))}}function B(e){return{__esModule:!0,default:e}}},function(e,t){var n,r,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(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"===typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var u,A=[],c=!1,l=-1;function f(){c&&u&&(c=!1,u.length?A=u.concat(A):l=-1,A.length&&h())}function h(){if(!c){var e=s(f);c=!0;for(var t=A.length;t;){for(u=A,A=[];++l<t;)u&&u[l].run();l=-1,t=A.length}u=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function d(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];A.push(new g(e,t)),1!==A.length||c||s(h)},g.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=d,i.addListener=d,i.once=d,i.off=d,i.removeListener=d,i.removeAllListeners=d,i.emit=d,i.prependListener=d,i.prependOnceListener=d,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,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function i(e){if(e.type)return e;if("#"===e.charAt(0))return i(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function a(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function o(e,t){var n=s(e),r=s(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function s(e){var t="hsl"===(e=i(e)).type?i(function(e){var t=(e=i(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,s=r*Math.min(o,1-o),u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-s*Math.max(Math.min(t-3,9-t,1),-1)},A="rgb",c=[Math.round(255*u(0)),Math.round(255*u(8)),Math.round(255*u(4))];return"hsla"===e.type&&(A+="a",c.push(t[3])),a({type:A,values:c})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function u(e,t){return e=i(e),t=r(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,a(e)}function A(e,t){if(e=i(e),t=r(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return a(e)}function c(e,t){if(e=i(e),t=r(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return a(e)}n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return A})),n.d(t,"d",(function(){return c}))},function(e,t,n){"use strict";n.d(t,"e",(function(){return ge})),n.d(t,"b",(function(){return de})),n.d(t,"d",(function(){return he})),n.d(t,"f",(function(){return h})),n.d(t,"c",(function(){return l})),n.d(t,"a",(function(){return z}));var r=n(18),i=n(163),a=(n(236),n(2)),o=n(202),s=n(58),u=n(175),A={}.constructor;function c(e){if(null==e||"object"!==typeof e)return e;if(Array.isArray(e))return e.map(c);if(e.constructor!==A)return e;var t={};for(var n in e)t[n]=c(e[n]);return t}function l(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=c(t),a=r.plugins.onCreateRule(e,i,n);return a||(e[0],null)}var f=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n};function h(e,t){if(void 0===t&&(t=!1),!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=f(e[r]," ");else n=f(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n}function g(e,t){for(var n="",r=0;r<t;r++)n+="  ";return n+e}function d(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,a=void 0===i?0:i,o=t.fallbacks;if(e&&a++,o)if(Array.isArray(o))for(var s=0;s<o.length;s++){var u=o[s];for(var A in u){var c=u[A];null!=c&&(r&&(r+="\n"),r+=""+g(A+": "+h(c)+";",a))}}else for(var l in o){var f=o[l];null!=f&&(r&&(r+="\n"),r+=""+g(l+": "+h(f)+";",a))}for(var d in t){var p=t[d];null!=p&&"fallbacks"!==d&&(r&&(r+="\n"),r+=""+g(d+": "+h(p)+";",a))}return(r||n.allowEmpty)&&e?(r&&(r="\n"+r+"\n"),g(e+" {"+r,--a)+g("}",a)):r}var p=/([[\].#*$><+~=|^:(),"'`\s])/g,v="undefined"!==typeof CSS&&CSS.escape,y=function(e){return v?v(e):e.replace(p,"\\$1")},m=function(){function e(e,t,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var a=null==i||!1===i,o=e in this.style;if(a&&!o&&!r)return this;var s=a&&o;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var u=this.options.sheet;return u&&u.attached,this},e}(),I=function(e){function t(t,n,r){var i;(i=e.call(this,t,n,r)||this).selectorText=void 0,i.id=void 0,i.renderable=void 0;var a=r.selector,o=r.scoped,u=r.sheet,A=r.generateId;return a?i.selectorText=a:!1!==o&&(i.id=A(Object(s.a)(Object(s.a)(i)),u),i.selectorText="."+y(i.id)),i}Object(o.a)(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==typeof n?e[t]=n:Array.isArray(n)&&(e[t]=h(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Object(r.a)({},e,{allowEmpty:!0}):e;return d(this.selectorText,this.style,n)},Object(a.a)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(m),b={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new I(e,t,n)}},E={indent:1,children:!0},C=/@([\w-]+)/,B=function(){function e(e,t,n){this.type="conditional",this.at=void 0,this.key=void 0,this.query=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.query=n.name;var i=e.match(C);for(var a in this.at=i?i[1]:"unknown",this.options=n,this.rules=new z(Object(r.a)({},n,{parent:this})),t)this.rules.add(a,t[a]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){if(void 0===e&&(e=E),null==e.indent&&(e.indent=E.indent),null==e.children&&(e.children=E.children),!1===e.children)return this.query+" {}";var t=this.rules.toString(e);return t?this.query+" {\n"+t+"\n}":""},e}(),w=/@media|@supports\s+/,Q={onCreateRule:function(e,t,n){return w.test(e)?new B(e,t,n):null}},k={indent:1,children:!0},_=/@keyframes\s+([\w-]+)/,x=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var i=e.match(_);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var a=n.scoped,o=n.sheet,s=n.generateId;for(var u in this.id=!1===a?this.name:y(s(this,o)),this.rules=new z(Object(r.a)({},n,{parent:this})),t)this.rules.add(u,t[u],Object(r.a)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=k),null==e.indent&&(e.indent=k.indent),null==e.children&&(e.children=k.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),S=/@keyframes\s+/,O=/\$([\w-]+)/g,D=function(e,t){return"string"===typeof e?e.replace(O,(function(e,n){return n in t?t[n]:e})):e},R=function(e,t,n){var r=e[t],i=D(r,n);i!==r&&(e[t]=i)},j={onCreateRule:function(e,t,n){return"string"===typeof e&&S.test(e)?new x(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&R(e,"animation-name",n.keyframes),"animation"in e&&R(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return D(e,r.keyframes);default:return e}}},M=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).renderable=void 0,t}return Object(o.a)(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Object(r.a)({},e,{allowEmpty:!0}):e;return d(this.key,this.style,n)},t}(m),N={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new M(e,t,n):null}},F=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=d(this.at,this.style[n]),this.style[n+1]&&(t+="\n");return t}return d(this.at,this.style,e)},e}(),T=/@font-face/,L={onCreateRule:function(e,t,n){return T.test(e)?new F(e,t,n):null}},P=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return d(this.key,this.style,e)},e}(),U={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new P(e,t,n):null}},G=function(){function e(e,t,n){this.type="simple",this.key=void 0,this.value=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),q={"@charset":!0,"@import":!0,"@namespace":!0},H=[b,Q,j,N,L,U,{onCreateRule:function(e,t,n){return e in q?new G(e,t,n):null}}],Y={process:!0},J={force:!0,process:!0},z=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=void 0,this.classes=void 0,this.keyframes=void 0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var i=this.options,a=i.parent,o=i.sheet,s=i.jss,u=i.Renderer,A=i.generateId,c=i.scoped,f=Object(r.a)({classes:this.classes,parent:a,sheet:o,jss:s,Renderer:u,generateId:A,scoped:c,name:e},n),h=e;e in this.raw&&(h=e+"-d"+this.counter++),this.raw[h]=t,h in this.classes&&(f.selector="."+y(this.classes[h]));var g=l(h,t,f);if(!g)return null;this.register(g);var d=void 0===f.index?this.index.length:f.index;return this.index.splice(d,0,g),g},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof I?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof x&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof I?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof x&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"===typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.map[e],t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=Y);var i=this.options,a=i.jss.plugins,o=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var s=t,u=s.style;if(a.onUpdate(n,t,o,r),r.process&&u&&u!==s.style){for(var A in a.onProcessStyle(s.style,s,o),s.style){var c=s.style[A];c!==u[A]&&s.prop(A,c,J)}for(var l in u){var f=s.style[l],h=u[l];null==f&&f!==h&&s.prop(l,null,J)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=0;i<this.index.length;i++){var a=this.index[i].toString(e);(a||r)&&(t&&(t+="\n"),t+=a)}return t},e}(),K=function(){function e(e,t){for(var n in this.options=void 0,this.deployed=void 0,this.attached=void 0,this.rules=void 0,this.renderer=void 0,this.classes=void 0,this.keyframes=void 0,this.queue=void 0,this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Object(r.a)({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new z(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"===typeof e?e:this.rules.get(e);return!!t&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),W=function(){function e(){this.plugins={internal:[],external:[]},this.registry=void 0}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),V=new(function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Object(u.a)(t,["attached"]),i="",a=0;a<this.registry.length;a++){var o=this.registry[a];null!=n&&o.attached!==n||(i&&(i+="\n"),i+=o.toString(r))}return i},Object(a.a)(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}()),X="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),Z="2f1acc6c3a606b082e5eef5e54414ffb";null==X[Z]&&(X[Z]=0);var $=X[Z]++,ee=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",a="";return r&&(r.options.classNamePrefix&&(a=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(a||"c")+$+i+t:a+n.key+"-"+$+(i?"-"+i:"")+"-"+t}},te=function(e){var t;return function(){return t||(t=e()),t}};function ne(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(n){return""}}function re(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=h(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;e.attributeStyleMap?e.attributeStyleMap.set(t,r):e.style.setProperty(t,r)}catch(i){return!1}return!0}function ie(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(n){}}function ae(e,t){return e.selectorText=t,e.selectorText===t}var oe=te((function(){return document.querySelector("head")}));function se(e){var t=V.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var i=function(e){for(var t=oe(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var ue=te((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),Ae=function(e,t,n){var r=e.cssRules.length;(void 0===n||n>r)&&(n=r);try{if("insertRule"in e)e.insertRule(t,n);else if("appendRule"in e){e.appendRule(t)}}catch(i){return!1}return e.cssRules[n]},ce=function(){function e(e){this.getPropertyValue=ne,this.setProperty=re,this.removeProperty=ie,this.setSelector=ae,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,e&&V.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var a=ue();a&&this.element.setAttribute("nonce",a)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=se(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var i=n,a=i.parentNode;a&&a.insertBefore(e,i.nextSibling)}else oe().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){var e=this.element.parentNode;e&&e.removeChild(this.element)},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;return("conditional"!==e.type&&"keyframes"!==e.type||!1!==(i=Ae(n,r.toString({children:!1}),t)))&&(this.insertRules(r.rules,i),i)}if(e.renderable&&e.renderable.parentStyleSheet===this.element.sheet)return e.renderable;var a=e.toString();if(!a)return!1;var o=Ae(n,a,t);return!1!==o&&(this.hasInsertedRules=!0,e.renderable=o,o)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),!0)},t.indexOf=function(e){for(var t=this.element.sheet.cssRules,n=0;n<t.length;n++)if(e===t[n])return n;return-1},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),le=0,fe=function(){function e(e){this.id=le++,this.version="10.1.1",this.plugins=new W,this.options={id:{minify:!1},createGenerateId:ee,Renderer:i.a?ce:null,plugins:[]},this.generateId=ee({minify:!1});for(var t=0;t<H.length;t++)this.plugins.use(H[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=Object(r.a)({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!==typeof n&&(n=0===V.index?0:V.index+1);var i=new K(e,Object(r.a)({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(i),i},t.removeStyleSheet=function(e){return e.detach(),V.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"===typeof e)return this.createRule(void 0,e,t);var i=Object(r.a)({},n,{name:e,jss:this,Renderer:this.options.Renderer});i.generateId||(i.generateId=this.generateId),i.classes||(i.classes={}),i.keyframes||(i.keyframes={});var a=l(e,t,i);return a&&this.plugins.onProcessRule(a),a},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}();function he(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if("function"===i)t||(t={}),t[n]=r;else if("object"===i&&null!==r&&!Array.isArray(r)){var a=he(r);a&&(t||(t={}),t[n]=a)}}return t}var ge="undefined"!==typeof CSS&&CSS&&"number"in CSS,de=function(e){return new fe(e)};de()},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(3),i=n(2),a=n(21),o=n(257),s=n(133),u=n(174),A=n(193),c=n(51),l=n(733),f="Resource subclass must define virtual methods",h=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,e),Object(s.b)(t);var i=n.id,a=n.userData,o=void 0===a?{}:a;this.gl=t,this.id=i||Object(A.c)(this.constructor.name),this.userData=o,this._bound=!1,this._handle=n.handle,void 0===this._handle&&(this._handle=this._createHandle()),this.byteLength=0,this._addStats()}return Object(i.a)(e,[{key:"toString",value:function(){return"".concat(this.constructor.name,"(").concat(this.id,")")}},{key:"delete",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.deleteChildren,n=void 0!==t&&t,r=this._handle&&this._deleteHandle(this._handle);return this._handle&&this._removeStats(),this._handle=null,r&&n&&r.filter(Boolean).forEach((function(e){e.delete()})),this}},{key:"bind",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.handle;return"function"!==typeof t?(this._bindHandle(t),this):(this._bound?e=t():(this._bindHandle(this.handle),this._bound=!0,e=t(),this._bound=!1,this._bindHandle(null)),e)}},{key:"unbind",value:function(){this.bind(null)}},{key:"getParameter",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object(u.b)(this.gl,e),Object(c.a)(e);var n=this.constructor.PARAMETERS||{},r=n[e];if(r){var i=Object(a.g)(this.gl),o=(!("webgl2"in r)||i)&&(!("extension"in r)||this.gl.getExtension(r.extension));if(!o){var s=r.webgl1,A="webgl2"in r?r.webgl2:r.webgl1,l=i?A:s;return l}}return this._getParameter(e,t)}},{key:"getParameters",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=t.parameters,r=t.keys,i=this.constructor.PARAMETERS||{},o=Object(a.g)(this.gl),s={},A=n||Object.keys(i),c=!0,l=!1,f=void 0;try{for(var h,g=A[Symbol.iterator]();!(c=(h=g.next()).done);c=!0){var d=h.value,p=i[d],v=p&&(!("webgl2"in p)||o)&&(!("extension"in p)||this.gl.getExtension(p.extension));if(v){var y=r?Object(u.a)(this.gl,d):d;s[y]=this.getParameter(d,e),r&&"GLenum"===p.type&&(s[y]=Object(u.a)(this.gl,s[y]))}}}catch(m){l=!0,f=m}finally{try{c||null==g.return||g.return()}finally{if(l)throw f}}return s}},{key:"setParameter",value:function(e,t){e=Object(u.b)(this.gl,e),Object(c.a)(e);var n=(this.constructor.PARAMETERS||{})[e];if(n){var r=Object(a.g)(this.gl);if(!((!("webgl2"in n)||r)&&(!("extension"in n)||this.gl.getExtension(n.extension))))throw new Error("Parameter not available on this platform");"GLenum"===n.type&&(t=Object(u.b)(t))}return this._setParameter(e,t),this}},{key:"setParameters",value:function(e){for(var t in e)this.setParameter(t,e[t]);return this}},{key:"stubRemovedMethods",value:function(e,t,n){return Object(l.a)(this,e,t,n)}},{key:"initialize",value:function(e){}},{key:"_createHandle",value:function(){throw new Error(f)}},{key:"_deleteHandle",value:function(){throw new Error(f)}},{key:"_bindHandle",value:function(){throw new Error(f)}},{key:"_getOptsFromHandle",value:function(){throw new Error(f)}},{key:"_getParameter",value:function(e,t){throw new Error(f)}},{key:"_setParameter",value:function(e,t){throw new Error(f)}},{key:"_context",value:function(){return this.gl.luma=this.gl.luma||{},this.gl.luma}},{key:"_addStats",value:function(){var e=this.constructor.name,t=o.a.get("Resource Counts");t.get("Resources Created").incrementCount(),t.get("".concat(e,"s Created")).incrementCount(),t.get("".concat(e,"s Active")).incrementCount()}},{key:"_removeStats",value:function(){var e=this.constructor.name;o.a.get("Resource Counts").get("".concat(e,"s Active")).decrementCount()}},{key:"_trackAllocatedMemory",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.constructor.name,n=o.a.get("Memory Usage");n.get("GPU Memory").addCount(e),n.get("".concat(t," Memory")).addCount(e),this.byteLength=e}},{key:"_trackDeallocatedMemory",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.constructor.name,t=o.a.get("Memory Usage");t.get("GPU Memory").subtractCount(this.byteLength),t.get("".concat(e," Memory")).subtractCount(this.byteLength),this.byteLength=0}},{key:"handle",get:function(){return this._handle}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(16),i=n(3),a=n(2),o=n(44),s=n(83),u=n(35),A=n(10),c=n(66),l=n(39),f=Math.PI/180,h=Object(s.a)(),g=[0,0,0],d={unitsPerMeter:[1,1,1],metersPerUnit:[1,1,1]},p=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(i.a)(this,e);var n=t.id,r=void 0===n?null:n,a=t.x,o=void 0===a?0:a,s=t.y,u=void 0===s?0:s,A=t.width,c=void 0===A?1:A,l=t.height,f=void 0===l?1:l;this.id=r||this.constructor.displayName||"viewport",this.x=o,this.y=u,this.width=c||1,this.height=f||1,this._frustumPlanes={},this._initViewMatrix(t),this._initProjectionMatrix(t),this._initPixelMatrices(),this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),this.projectFlat=this.projectFlat.bind(this),this.unprojectFlat=this.unprojectFlat.bind(this)}return Object(a.a)(e,[{key:"equals",value:function(t){return t instanceof e&&(this===t||t.width===this.width&&t.height===this.height&&t.scale===this.scale&&Object(u.f)(t.projectionMatrix,this.projectionMatrix)&&Object(u.f)(t.viewMatrix,this.viewMatrix))}},{key:"project",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.topLeft,i=void 0===n||n,a=this.projectPosition(e),o=Object(c.n)(a,this.pixelProjectionMatrix),s=Object(r.a)(o,2),u=s[0],A=s[1],l=i?A:this.height-A;return 2===e.length?[u,l]:[u,l,o[2]]}},{key:"unproject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.topLeft,i=void 0===n||n,a=t.targetZ,o=Object(r.a)(e,3),s=o[0],u=o[1],A=o[2],l=i?u:this.height-u,f=a&&a*this.distanceScales.unitsPerMeter[2],h=Object(c.l)([s,l,A],this.pixelUnprojectionMatrix,f),g=this.unprojectPosition(h),d=Object(r.a)(g,3),p=d[0],v=d[1],y=d[2];return Number.isFinite(A)?[p,v,y]:Number.isFinite(a)?[p,v,a]:[p,v]}},{key:"projectPosition",value:function(e){var t=this.projectFlat(e),n=Object(r.a)(t,2);return[n[0],n[1],(e[2]||0)*this.distanceScales.unitsPerMeter[2]]}},{key:"unprojectPosition",value:function(e){var t=this.unprojectFlat(e),n=Object(r.a)(t,2);return[n[0],n[1],(e[2]||0)*this.distanceScales.metersPerUnit[2]]}},{key:"projectFlat",value:function(e){return this.isGeospatial?Object(c.j)(e):e}},{key:"unprojectFlat",value:function(e){return this.isGeospatial?Object(c.m)(e):e}},{key:"getBounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={targetZ:e.z||0},n=this.unproject([0,0],t),r=this.unproject([this.width,0],t),i=this.unproject([0,this.height],t),a=this.unproject([this.width,this.height],t);return[Math.min(n[0],r[0],i[0],a[0]),Math.min(n[1],r[1],i[1],a[1]),Math.max(n[0],r[0],i[0],a[0]),Math.max(n[1],r[1],i[1],a[1])]}},{key:"getDistanceScales",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?Object(c.e)({longitude:e[0],latitude:e[1],highPrecision:!0}):this.distanceScales}},{key:"containsPixel",value:function(e){var t=e.x,n=e.y,r=e.width,i=void 0===r?1:r,a=e.height,o=void 0===a?1:a;return t<this.x+this.width&&this.x<t+i&&n<this.y+this.height&&this.y<n+o}},{key:"getFrustumPlanes",value:function(){if(this._frustumPlanes.near)return this._frustumPlanes;var e=this.projectionProps,t=e.near,n=e.far,r=e.fovyRadians,i=e.aspect;return Object.assign(this._frustumPlanes,Object(s.d)({aspect:i,near:t,far:n,fovyRadians:r,position:this.cameraPosition,direction:this.cameraDirection,up:this.cameraUp,right:this.cameraRight})),this._frustumPlanes}},{key:"getCameraPosition",value:function(){return this.cameraPosition}},{key:"getCameraDirection",value:function(){return this.cameraDirection}},{key:"getCameraUp",value:function(){return this.cameraUp}},{key:"_createProjectionMatrix",value:function(e){var t=e.orthographic,n=e.fovyRadians,r=e.aspect,i=e.focalDistance,a=e.near,o=e.far;return t?(new u.a).orthographic({fovy:n,aspect:r,focalDistance:i,near:a,far:o}):(new u.a).perspective({fovy:n,aspect:r,near:a,far:o})}},{key:"_initViewMatrix",value:function(e){var t=e.viewMatrix,n=void 0===t?h:t,r=e.longitude,i=void 0===r?null:r,a=e.latitude,o=void 0===a?null:a,s=e.zoom,A=void 0===s?null:s,l=e.position,f=void 0===l?null:l,p=e.modelMatrix,v=void 0===p?null:p,y=e.focalDistance,m=void 0===y?1:y,I=e.distanceScales,b=void 0===I?null:I;this.isGeospatial=Number.isFinite(o)&&Number.isFinite(i),this.zoom=A,Number.isFinite(this.zoom)||(this.zoom=this.isGeospatial?Object(c.g)({latitude:o})+Math.log2(m):0);var E=Math.pow(2,this.zoom);this.scale=E,this.distanceScales=this.isGeospatial?Object(c.e)({latitude:o,longitude:i}):b||d,this.focalDistance=m,this.distanceScales.metersPerUnit=new u.c(this.distanceScales.metersPerUnit),this.distanceScales.unitsPerMeter=new u.c(this.distanceScales.unitsPerMeter),this.position=g,this.meterOffset=g,f&&(this.position=f,this.modelMatrix=v,this.meterOffset=v?v.transformVector(f):f),this.isGeospatial?(this.longitude=i,this.latitude=o,this.center=this._getCenterInWorld({longitude:i,latitude:o})):this.center=f?this.projectPosition(f):[0,0,0],this.viewMatrixUncentered=n,this.viewMatrix=(new u.a).multiplyRight(this.viewMatrixUncentered).translate(new u.c(this.center||g).negate())}},{key:"_getCenterInWorld",value:function(e){var t=e.longitude,n=e.latitude,r=this.meterOffset,i=this.distanceScales,a=new u.c(this.projectPosition([t,n,0]));if(r){var o=new u.c(r).scale(i.unitsPerMeter);a.add(o)}return a}},{key:"_initProjectionMatrix",value:function(e){var t=e.projectionMatrix,n=void 0===t?null:t,r=e.orthographic,i=void 0!==r&&r,a=e.fovyRadians,o=e.fovy,s=void 0===o?75:o,u=e.near,A=void 0===u?.1:u,c=e.far,l=void 0===c?1e3:c,h=e.focalDistance,g=void 0===h?1:h;this.projectionProps={orthographic:i,fovyRadians:a||s*f,aspect:this.width/this.height,focalDistance:g,near:A,far:l},this.projectionMatrix=n||this._createProjectionMatrix(this.projectionProps)}},{key:"_initPixelMatrices",value:function(){var e=Object(s.a)();A.h(e,e,this.projectionMatrix),A.h(e,e,this.viewMatrix),this.viewProjectionMatrix=e,this.viewMatrixInverse=A.f([],this.viewMatrix)||this.viewMatrix;var t=Object(s.b)({viewMatrix:this.viewMatrix,viewMatrixInverse:this.viewMatrixInverse}),n=t.eye,r=t.direction,i=t.up,a=t.right;this.cameraPosition=n,this.cameraDirection=r,this.cameraUp=i,this.cameraRight=a;var u=Object(s.a)(),c=Object(s.a)();A.o(u,u,[this.width/2,-this.height/2,1]),A.p(u,u,[1,-1,0]),A.h(c,u,this.viewProjectionMatrix),this.pixelProjectionMatrix=c,this.viewportMatrix=u,this.pixelUnprojectionMatrix=A.f(Object(s.a)(),this.pixelProjectionMatrix),this.pixelUnprojectionMatrix||o.a.warn("Pixel project matrix not invertible")()}},{key:"metersPerPixel",get:function(){return this.distanceScales.metersPerUnit[2]/this.scale}},{key:"projectionMode",get:function(){return this.isGeospatial?this.zoom<12?l.c.WEB_MERCATOR:l.c.WEB_MERCATOR_AUTO_OFFSET:l.c.IDENTITY}}]),e}();p.displayName="Viewport"},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"e",(function(){return u})),n.d(t,"g",(function(){return A})),n.d(t,"f",(function(){return c})),n.d(t,"h",(function(){return l})),n.d(t,"c",(function(){return f})),n.d(t,"i",(function(){return h}));var r=n(334),i=n(458),a="json",o="application/json",s="csv",u="text/csv",A=",",c="NA",l="cell",f={cell:{latestVersion:"0.1.3",schema:r}},h={cell:{schema:i}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),i="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;function a(e){var t=r.useRef(e);return i((function(){t.current=e})),r.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}},function(e,t,n){"use strict";var r=n(42),i=n(219);var a=n(27);function o(e){var t="function"===typeof Map?new Map:void 0;return(o=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return Object(a.a)(e,arguments,Object(r.a)(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Object(i.a)(o,e)})(e)}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return c}));var i=n(25),a={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof e&&e,document:"undefined"!==typeof document&&document},o=a.global||a.self||a.window,s="object"!==("undefined"===typeof r?"undefined":Object(i.a)(r))||"[object process]"!==String(r)||r.browser,u="function"===typeof importScripts,A="undefined"!==typeof r&&r.version&&r.version.match(/v([0-9]*)/),c=A&&parseFloat(A[1])||0}).call(this,n(70),n(86))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(56);function r(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}},function(e,t,n){"use strict";function r(e){var t=e.source,n=e.target,r=e.start,i=void 0===r?0:r,a=e.end,o=e.getData;a=a||n.length;var s=t.length,u=a-i;if(s>u)n.set(t.subarray(0,u),i);else if(n.set(t,i),o)for(var A=s;A<u;)for(var c=o(A,t),l=0;l<c.length;l++)n[i+A]=c[l],A++}n.d(t,"e",(function(){return a})),n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return A})),n.d(t,"f",(function(){return c}));var i={interpolation:{duration:0,easing:function(e){return e}},spring:{stiffness:.05,damping:.5}};function a(e,t){return e?(Number.isFinite(e)&&(e={duration:e}),e.type=e.type||"interpolation",Object.assign({},i[e.type],t,e)):null}function o(e,t){return t.getBuffer()?[t.getBuffer(),{divisor:0,size:t.size,normalized:t.settings.normalized}]:t.value}function s(e){switch(e){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error('No defined attribute type for size "'.concat(e,'"'))}}function u(e){e.push(e.shift())}function A(e,t){var n=e.doublePrecision,r=e.settings,i=e.value,a=e.size,o=n?2:1;return(r.noAlloc?i.length:t*a)*o}function c(e){var t=e.buffer,n=e.numInstances,i=e.attribute,a=e.fromLength,o=e.fromStartIndices,s=e.getData,u=void 0===s?function(e){return e}:s,c=i.doublePrecision?2:1,l=i.size*c,f=i.byteOffset,h=i.startIndices,g=o&&h,d=A(i,n),p=i.state.constant;if(g||!(a>=d)){var v=p?i.value:i.getBuffer().getData({srcByteOffset:f});if(i.settings.normalized&&!p){var y=u;u=function(e,t){return i._normalizeConstant(y(e,t))}}var m=p?function(e,t){return u(v,t)}:function(e,t){return u(v.subarray(e,e+l),t)},I=t.getData({length:a}),b=new Float32Array(d);!function(e){var t=e.source,n=e.target,i=e.size,a=e.getData,o=e.sourceStartIndices,s=e.targetStartIndices;if(!Array.isArray(s))return r({source:t,target:n,getData:a}),n;for(var u=0,A=0,c=a&&function(e,t){return a(e+A,t)},l=Math.min(o.length,s.length),f=1;f<l;f++){var h=o[f]*i,g=s[f]*i;r({source:t.subarray(u,h),target:n,start:A,end:g,getData:c}),u=h,A=g}A<n.length&&r({source:[],target:n,start:A,getData:c})}({source:I,target:b,sourceStartIndices:o,targetStartIndices:h,size:l,getData:m}),t.byteLength<b.byteLength+f&&t.reallocate(b.byteLength+f),t.subData({data:b,offset:f})}}},function(e,t,n){var r=n(494);e.exports=function(e,t){return r(e,t)}},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error(t||"loader assertion failed.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r,i;n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),function(e){e.cancel="cancel",e.run="run"}(r||(r={})),function(e){e.error="error",e.init="init",e.result="result",e.running="running",e.uncaughtError="uncaughtError"}(i||(i={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"e",(function(){return o})),n.d(t,"d",(function(){return s})),n.d(t,"a",(function(){return u})),n.d(t,"c",(function(){return A}));var r=n(20),i=n(22);function a(e){return Object(i.a)(e).reduce((function(e,t){var n=t[0],i=t[1];return Object.assign(e,Object(r.a)({},n,i))}),{})}function o(e){return Object(i.a)(Array(e).keys())}function s(e,t,n){return 1===n?e:t}function u(e){return e.charAt(0).toUpperCase()+e.slice(1)}function A(e){var t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZ",r=[0];function i(){var e=[];r.forEach((function(t){e.unshift(n[t])}));for(var t=!0,i=0;i<r.length;i++){if(!(++r[i]>=n.length)){t=!1;break}r[i]=0}return t&&r.push(0),e.join("")}do{t=i()}while(e.includes(t));return t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return s}));var r=[],i=[];function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,a=r,o={index:-1,data:e,target:[]};return e?"function"===typeof e[Symbol.iterator]?a=e:e.length>0&&(i.length=e.length,a=i):a=r,(t>0||Number.isFinite(n))&&(a=(Array.isArray(a)?a:Array.from(a)).slice(t,n),o.index=t-1),{iterable:a,objectInfo:o}}function o(e){return e&&e[Symbol.asyncIterator]}function s(e,t){var n=t.size,r=t.stride,i=t.offset,a=t.startIndices,o=t.nested,s=e.BYTES_PER_ELEMENT,u=r?r/s:n,A=i?i/s:0,c=Math.floor((e.length-A)/u);return function(t,r){var i=r.index,s=r.target;if(!a){for(var l=i*u+A,f=0;f<n;f++)s[f]=e[l+f];return s}var h,g=a[i],d=a[i+1]||c;if(o){h=new Array(d-g);for(var p=g;p<d;p++){var v=p*u+A;s=new Array(n);for(var y=0;y<n;y++)s[y]=e[v+y];h[p-g]=s}}else if(u===n)h=e.subarray(g*n+A,d*n+A);else{h=new e.constructor((d-g)*n);for(var m=0,I=g;I<d;I++)for(var b=I*u+A,E=0;E<n;E++)h[m++]=e[b+E]}return h}}},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error("math.gl assertion ".concat(t))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a={isWorkerRuntime:function(){var e="undefined"!==typeof self&&"undefined"!==typeof Window&&self instanceof Window;return!("undefined"===typeof self||!self.postMessage||e)},postMessageToMaster:function(e,t){self.postMessage(e,t)},subscribeToMasterMessages:function(e){var t=function(t){e(t.data)};return self.addEventListener("message",t),function(){self.removeEventListener("message",t)}}}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";n.r(t);var r=n(448),i=n(373),a=n(294),o=n(3),s=n(2),u=n(29),A=n(6),c=n(7),l=n(4),f=n(412),h=n(411),g=n(217),d=n(311),p=n(121);function v(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(l.a)(e);if(t){var i=Object(l.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var y={getSourcePosition:{type:"accessor",value:function(e){return e.sourcePosition}},getTargetPosition:{type:"accessor",value:function(e){return e.targetPosition}},getColor:{type:"accessor",value:[0,0,0,255]},getWidth:{type:"accessor",value:1},widthUnits:"pixels",widthScale:{type:"number",value:1,min:0},widthMinPixels:{type:"number",value:0,min:0},widthMaxPixels:{type:"number",value:Number.MAX_SAFE_INTEGER,min:0}},m=function(e){Object(A.a)(n,e);var t=v(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(s.a)(n,[{key:"getShaders",value:function(){return Object(u.a)(Object(l.a)(n.prototype),"getShaders",this).call(this,{vs:"#define SHADER_NAME line-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 instanceSourcePositions;\nattribute vec3 instanceTargetPositions;\nattribute vec3 instanceSourcePositions64Low;\nattribute vec3 instanceTargetPositions64Low;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute float instanceWidths;\n\nuniform float opacity;\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\n\nvarying vec4 vColor;\nvarying vec2 uv;\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {\n  vec2 dir_screenspace = normalize(line_clipspace * project_uViewportSize);\n  dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n  return dir_screenspace * offset_direction * width / 2.0;\n}\n\nvoid main(void) {\n  geometry.worldPosition = instanceSourcePositions;\n  geometry.worldPositionAlt = instanceTargetPositions;\n  vec4 source_commonspace;\n  vec4 target_commonspace;\n  vec4 source = project_position_to_clipspace(instanceSourcePositions, instanceSourcePositions64Low, vec3(0.), source_commonspace);\n  vec4 target = project_position_to_clipspace(instanceTargetPositions, instanceTargetPositions64Low, vec3(0.), target_commonspace);\n  float widthPixels = clamp(\n    project_size_to_pixel(instanceWidths * widthScale),\n    widthMinPixels, widthMaxPixels\n  );\n  float segmentIndex = positions.x;\n  vec4 p = mix(source, target, segmentIndex);\n  geometry.position = mix(source_commonspace, target_commonspace, segmentIndex);\n  uv = positions.xy;\n  geometry.uv = uv;\n  geometry.pickingColor = instancePickingColors;\n  vec3 offset = vec3(\n    getExtrusionOffset(target.xy - source.xy, positions.y, widthPixels),\n    0.0);\n  DECKGL_FILTER_SIZE(offset, geometry);\n  gl_Position = p + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n  vColor = vec4(instanceColors.rgb, instanceColors.a * opacity);\n  DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME line-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 uv;\n\nvoid main(void) {\n  geometry.uv = uv;\n\n  gl_FragColor = vColor;\n\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[f.a,h.a]})}},{key:"initializeState",value:function(){this.getAttributeManager().addInstanced({instanceSourcePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getSourcePosition"},instanceTargetPositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getTargetPosition"},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getColor",defaultValue:[0,0,0,255]},instanceWidths:{size:1,transition:!0,accessor:"getWidth",defaultValue:1}})}},{key:"updateState",value:function(e){var t=e.props,r=e.oldProps,i=e.changeFlags;if(Object(u.a)(Object(l.a)(n.prototype),"updateState",this).call(this,{props:t,oldProps:r,changeFlags:i}),i.extensionsChanged){var a=this.context.gl;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(a)}),this.getAttributeManager().invalidateAll()}}},{key:"draw",value:function(e){var t=e.uniforms,n=this.context.viewport,r=this.props,i=r.widthUnits,a=r.widthScale,o=r.widthMinPixels,s=r.widthMaxPixels,u="pixels"===i?n.metersPerPixel:1;this.state.model.setUniforms(Object.assign({},t,{widthScale:a*u,widthMinPixels:o,widthMaxPixels:s})).draw()}},{key:"_getModel",value:function(e){return new d.a(e,Object.assign({},this.getShaders(),{id:this.props.id,geometry:new p.a({drawMode:5,attributes:{positions:new Float32Array([0,-1,0,0,1,0,1,-1,0,1,1,0])}}),isInstanced:!0}))}}]),n}(g.a);m.layerName="LineLayer",m.defaultProps=y;var I=n(449),b=n(269),E=n(295),C=n(923);function B(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(l.a)(e);if(t){var i=Object(l.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(c.a)(this,n)}}var w=function(e){Object(A.a)(n,e);var t=B(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(s.a)(n,[{key:"getGeometry",value:function(e){return new C.a}},{key:"draw",value:function(e){var t=e.uniforms,n=this.props,r=n.elevationScale,i=n.extruded,a=n.offset,o=n.coverage,s=n.cellSize,u=n.angle;this.state.model.setUniforms(Object.assign({},t,{radius:s/2,angle:u,offset:a,extruded:i,coverage:o,elevationScale:r,edgeDistance:1,isWireframe:!1})).draw()}}]),n}(E.a);w.layerName="GridCellLayer",w.defaultProps={cellSize:{type:"number",min:0,value:1e3},offset:{type:"array",min:0,value:[1,1]}};var Q=n(186),k=n(393),_=n(450),x=n(270),S=n(218),O=n(299);n.d(t,"ArcLayer",(function(){return r.a})),n.d(t,"BitmapLayer",(function(){return i.a})),n.d(t,"IconLayer",(function(){return a.a})),n.d(t,"LineLayer",(function(){return m})),n.d(t,"PointCloudLayer",(function(){return I.a})),n.d(t,"ScatterplotLayer",(function(){return b.a})),n.d(t,"ColumnLayer",(function(){return E.a})),n.d(t,"GridCellLayer",(function(){return w})),n.d(t,"PathLayer",(function(){return Q.a})),n.d(t,"PolygonLayer",(function(){return k.a})),n.d(t,"GeoJsonLayer",(function(){return _.a})),n.d(t,"TextLayer",(function(){return x.a})),n.d(t,"SolidPolygonLayer",(function(){return S.a})),n.d(t,"_MultiIconLayer",(function(){return O.a}))},function(e,t,n){"use strict";n.r(t),n.d(t,"UNITS",(function(){return h})),n.d(t,"h3IsValid",(function(){return D})),n.d(t,"h3IsPentagon",(function(){return R})),n.d(t,"h3IsResClassIII",(function(){return j})),n.d(t,"h3GetBaseCell",(function(){return M})),n.d(t,"h3GetFaces",(function(){return N})),n.d(t,"h3GetResolution",(function(){return F})),n.d(t,"geoToH3",(function(){return T})),n.d(t,"h3ToGeo",(function(){return L})),n.d(t,"h3ToGeoBoundary",(function(){return P})),n.d(t,"h3ToParent",(function(){return U})),n.d(t,"h3ToChildren",(function(){return G})),n.d(t,"h3ToCenterChild",(function(){return q})),n.d(t,"kRing",(function(){return H})),n.d(t,"kRingDistances",(function(){return Y})),n.d(t,"hexRing",(function(){return J})),n.d(t,"polyfill",(function(){return z})),n.d(t,"h3SetToMultiPolygon",(function(){return K})),n.d(t,"compact",(function(){return W})),n.d(t,"uncompact",(function(){return V})),n.d(t,"h3IndexesAreNeighbors",(function(){return X})),n.d(t,"getH3UnidirectionalEdge",(function(){return Z})),n.d(t,"getOriginH3IndexFromUnidirectionalEdge",(function(){return $})),n.d(t,"getDestinationH3IndexFromUnidirectionalEdge",(function(){return ee})),n.d(t,"h3UnidirectionalEdgeIsValid",(function(){return te})),n.d(t,"getH3IndexesFromUnidirectionalEdge",(function(){return ne})),n.d(t,"getH3UnidirectionalEdgesFromHexagon",(function(){return re})),n.d(t,"getH3UnidirectionalEdgeBoundary",(function(){return ie})),n.d(t,"h3Distance",(function(){return ae})),n.d(t,"h3Line",(function(){return oe})),n.d(t,"experimentalH3ToLocalIj",(function(){return se})),n.d(t,"experimentalLocalIjToH3",(function(){return ue})),n.d(t,"pointDist",(function(){return Ae})),n.d(t,"cellArea",(function(){return ce})),n.d(t,"exactEdgeLength",(function(){return le})),n.d(t,"hexArea",(function(){return fe})),n.d(t,"edgeLength",(function(){return he})),n.d(t,"numHexagons",(function(){return ge})),n.d(t,"getRes0Indexes",(function(){return de})),n.d(t,"getPentagonIndexes",(function(){return pe})),n.d(t,"degsToRads",(function(){return ve})),n.d(t,"radsToDegs",(function(){return ye}));var r=function(e){var t,n="undefined"!==typeof(e=e||{})?e:{},r={};for(t in n)n.hasOwnProperty(t)&&(r[t]=n[t]);var i,a=[],o="";document.currentScript&&(o=document.currentScript.src),o=0!==o.indexOf("blob:")?o.substr(0,o.lastIndexOf("/")+1):"",i=function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){if(200==r.status||0==r.status&&r.response)t(r.response);else{var i=W(e);i?t(i.buffer):n()}},r.onerror=n,r.send(null)};var s=n.print||console.log.bind(console),u=n.printErr||console.warn.bind(console);for(t in r)r.hasOwnProperty(t)&&(n[t]=r[t]);r=null,n.arguments&&(a=n.arguments);var A=0,c=function(){return A};var l=!1;function f(e){var t,r=n["_"+e];return t="Cannot call unknown function "+e+", make sure it is exported",r||ue("Assertion failed: "+t),r}function h(e,t,n,r,i){var a={string:function(e){var t=0;if(null!==e&&void 0!==e&&0!==e){var n=1+(e.length<<2);(function(e,t,n){(function(e,t,n,r){if(!(r>0))return 0;for(var i=n,a=n+r-1,o=0;o<e.length;++o){var s=e.charCodeAt(o);if(s>=55296&&s<=57343){var u=e.charCodeAt(++o);s=65536+((1023&s)<<10)|1023&u}if(s<=127){if(n>=a)break;t[n++]=s}else if(s<=2047){if(n+1>=a)break;t[n++]=192|s>>6,t[n++]=128|63&s}else if(s<=65535){if(n+2>=a)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|63&s}else{if(n+3>=a)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|63&s}}t[n]=0})(e,y,t,n)})(e,t=ee(n),n)}return t},array:function(e){var t=ee(e.length);return function(e,t){v.set(e,t)}(e,t),t}};var o=f(e),s=[],u=0;if(r)for(var A=0;A<r.length;A++){var c=a[n[A]];c?(0===u&&(u=ne()),s[A]=c(r[A])):s[A]=r[A]}var l=o.apply(null,s);return l=function(e){return"string"===t?d(e):"boolean"===t?Boolean(e):e}(l),0!==u&&te(u),l}var g="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;function d(e,t){return e?function(e,t,n){for(var r=t+n,i=t;e[i]&&!(i>=r);)++i;if(i-t>16&&e.subarray&&g)return g.decode(e.subarray(t,i));for(var a="";t<i;){var o=e[t++];if(128&o){var s=63&e[t++];if(192!=(224&o)){var u=63&e[t++];if((o=224==(240&o)?(15&o)<<12|s<<6|u:(7&o)<<18|s<<12|u<<6|63&e[t++])<65536)a+=String.fromCharCode(o);else{var A=o-65536;a+=String.fromCharCode(55296|A>>10,56320|1023&A)}}else a+=String.fromCharCode((31&o)<<6|s)}else a+=String.fromCharCode(o)}return a}(y,e,t):""}var p,v,y,m,I,b,E;"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le");function C(e,t){return e%t>0&&(e+=t-e%t),e}function B(e){p=e,n.HEAP8=v=new Int8Array(e),n.HEAP16=m=new Int16Array(e),n.HEAP32=I=new Int32Array(e),n.HEAPU8=y=new Uint8Array(e),n.HEAPU16=new Uint16Array(e),n.HEAPU32=new Uint32Array(e),n.HEAPF32=b=new Float32Array(e),n.HEAPF64=E=new Float64Array(e)}var w=n.TOTAL_MEMORY||33554432;function Q(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"===typeof r?void 0===t.arg?n.dynCall_v(r):n.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}else t()}}w=(p=n.buffer?n.buffer:new ArrayBuffer(w)).byteLength,B(p),I[6004]=5266928;var k=[],_=[],x=[],S=[];var O=Math.abs,D=Math.ceil,R=Math.floor,j=Math.min,M=0,N=null,F=null;n.preloadedImages={},n.preloadedAudios={};var T,L,P=null,U="data:application/octet-stream;base64,";function G(e){return String.prototype.startsWith?e.startsWith(U):0===e.indexOf(U)}P="data:application/octet-stream;base64, ";function q(e){return e}function H(e){return e.replace(/\b__Z[\w\d_]+/g,(function(e){return e===e?e:e+" ["+e+"]"}))}function Y(){var e=new Error;if(!e.stack){try{throw new Error(0)}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function J(){return v.length}function z(e){try{var t=new ArrayBuffer(e);if(t.byteLength!=e)return;return new Int8Array(t).set(v),$(t),B(t),1}catch(n){}}var K="function"===typeof atob?atob:function(e){var t,n,r,i,a,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u="",A=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{t=s.indexOf(e.charAt(A++))<<2|(i=s.indexOf(e.charAt(A++)))>>4,n=(15&i)<<4|(a=s.indexOf(e.charAt(A++)))>>2,r=(3&a)<<6|(o=s.indexOf(e.charAt(A++))),u+=String.fromCharCode(t),64!==a&&(u+=String.fromCharCode(n)),64!==o&&(u+=String.fromCharCode(r))}while(A<e.length);return u};function W(e){if(G(e))return function(e){try{for(var t=K(e),n=new Uint8Array(t.length),r=0;r<t.length;++r)n[r]=t.charCodeAt(r);return n}catch(i){throw new Error("Converting base64 string to bytes failed.")}}(e.slice(U.length))}var V,X,Z=function(e,t,n){var r=new e.Int8Array(n),i=new e.Int32Array(n),a=(new e.Uint8Array(n),new e.Float32Array(n),new e.Float64Array(n)),o=0|t.p,s=e.Math.floor,u=e.Math.abs,A=e.Math.sqrt,c=e.Math.pow,l=e.Math.cos,f=e.Math.sin,h=e.Math.tan,g=e.Math.acos,d=e.Math.asin,p=e.Math.atan,v=e.Math.atan2,y=e.Math.ceil,m=e.Math.imul,I=e.Math.min,b=e.Math.clz32,E=t.b,C=t.c,B=t.d,w=t.e,Q=t.f,k=t.g,_=t.h,x=t.i,S=24048;function O(e,t,n,r){var i,a;0|D(e|=0,t|=0,n|=0,r|=0,0)&&(xt(0|r,0,(a=1+(0|m(3*n|0,n+1|0))|0)<<3|0),(i=0|mt(a,4))&&(R(e,t,n,r,i,a,0),yt(i)))}function D(e,t,n,r,a){e|=0,t|=0,n|=0,a|=0;var o,s=0,u=0,A=0,c=0,l=0,f=0,h=0,g=0;if(o=S,S=S+16|0,g=o,i[(s=r|=0)>>2]=e,i[s+4>>2]=t,(s=0!=(0|a))&&(i[a>>2]=0),0|je(e,t))return S=o,0|(g=1);i[g>>2]=0;e:do{if((0|n)>=1)if(s)for(l=0,f=1,h=1,u=0,s=e;;){if(!(u|l)){if(0==(0|(s=0|j(s,t,4,g)))&0==(0|(t=0|C()))){s=2;break e}if(0|je(s,t)){s=1;break e}}if(0==(0|(s=0|j(s,t,0|i[16+(l<<2)>>2],g)))&0==(0|(t=0|C()))){s=2;break e}if(i[(e=r+(h<<3)|0)>>2]=s,i[e+4>>2]=t,i[a+(h<<2)>>2]=f,e=(0|(u=u+1|0))==(0|f),c=6==(0|(A=l+1|0)),0|je(s,t)){s=1;break e}if((0|(f=f+(c&e&1)|0))>(0|n)){s=0;break}l=e?c?0:A:l,h=h+1|0,u=e?0:u}else for(l=0,f=1,h=1,u=0,s=e;;){if(!(u|l)){if(0==(0|(s=0|j(s,t,4,g)))&0==(0|(t=0|C()))){s=2;break e}if(0|je(s,t)){s=1;break e}}if(0==(0|(s=0|j(s,t,0|i[16+(l<<2)>>2],g)))&0==(0|(t=0|C()))){s=2;break e}if(i[(e=r+(h<<3)|0)>>2]=s,i[e+4>>2]=t,e=(0|(u=u+1|0))==(0|f),c=6==(0|(A=l+1|0)),0|je(s,t)){s=1;break e}if((0|(f=f+(c&e&1)|0))>(0|n)){s=0;break}l=e?c?0:A:l,h=h+1|0,u=e?0:u}else s=0}while(0);return S=o,0|(g=s)}function R(e,t,n,r,a,o,s){n|=0,r|=0,a|=0,o|=0,s|=0;var u,A,c=0,l=0,f=0,h=0,g=0;if(A=S,S=S+16|0,u=A,0==(0|(e|=0))&0==(0|(t|=0)))S=A;else{if(c=0|Ct(0|e,0|t,0|o,((0|o)<0)<<31>>31|0),C(),!(0==(0|(g=0|i[(h=l=r+(c<<3)|0)>>2]))&0==(0|(h=0|i[h+4>>2]))|(f=(0|g)==(0|e)&(0|h)==(0|t))))do{f=(0|(h=0|i[(g=l=r+((c=(c+1|0)%(0|o)|0)<<3)|0)>>2]))==(0|e)&(0|(g=0|i[g+4>>2]))==(0|t)}while(!(0==(0|h)&0==(0|g)|f));c=a+(c<<2)|0,f&&(0|i[c>>2])<=(0|s)||(i[(g=l)>>2]=e,i[g+4>>2]=t,i[c>>2]=s,(0|s)>=(0|n)||(g=s+1|0,i[u>>2]=0,R(h=0|j(e,t,2,u),0|C(),n,r,a,o,g),i[u>>2]=0,R(h=0|j(e,t,3,u),0|C(),n,r,a,o,g),i[u>>2]=0,R(h=0|j(e,t,1,u),0|C(),n,r,a,o,g),i[u>>2]=0,R(h=0|j(e,t,5,u),0|C(),n,r,a,o,g),i[u>>2]=0,R(h=0|j(e,t,4,u),0|C(),n,r,a,o,g),i[u>>2]=0,R(h=0|j(e,t,6,u),0|C(),n,r,a,o,g))),S=A}}function j(e,t,n,r){e|=0,t|=0,n|=0;var a,o,s=0,u=0,A=0,c=0,l=0,f=0,h=0;if((0|i[(r|=0)>>2])>0){s=0;do{n=0|ue(n),s=s+1|0}while((0|s)<(0|i[r>>2]))}a=0|Bt(0|e,0|t,45),C(),o=127&a,u=0|Me(e,t),s=0|Bt(0|e,0|t,52),C(),s&=15;e:do{if(s)for(;;){if(f=0|Bt(0|e,0|t,0|(l=3*(15-s|0)|0)),C(),f&=7,h=0==(0|Pe(s)),s=s+-1|0,c=0|wt(7,0,0|l),t&=~(0|C()),e=(l=0|wt(0|i[(h?464:48)+(28*f|0)+(n<<2)>>2],0,0|l))|e&~c,t|=0|C(),!(n=0|i[(h?672:256)+(28*f|0)+(n<<2)>>2])){n=0;break e}if(!s){A=6;break}}else A=6}while(0);6==(0|A)&&(e|=f=0|wt(0|(h=0|i[880+(28*o|0)+(n<<2)>>2]),0,45),t=0|C()|-1040385&t,n=0|i[4304+(28*o|0)+(n<<2)>>2],127==(127&h|0)&&(h=0|wt(0|i[880+(28*o|0)+20>>2],0,45),t=0|C()|-1040385&t,n=0|i[4304+(28*o|0)+20>>2],e=0|Fe(h|e,t),t=0|C(),i[r>>2]=1+(0|i[r>>2]))),A=0|Bt(0|e,0|t,45),C(),A&=127;e:do{if(0|N(A)){t:do{if(1==(0|Me(e,t))){if((0|o)!=(0|A)){if(0|P(A,0|i[7728+(28*o|0)>>2])){e=0|Le(e,t),u=1,t=0|C();break}e=0|Fe(e,t),u=1,t=0|C();break}switch(0|u){case 5:e=0|Le(e,t),t=0|C(),i[r>>2]=5+(0|i[r>>2]),u=0;break t;case 3:e=0|Fe(e,t),t=0|C(),i[r>>2]=1+(0|i[r>>2]),u=0;break t;default:return h=0,E(0|(f=0)),0|h}}else u=0}while(0);if((0|n)>0){s=0;do{e=0|Ne(e,t),t=0|C(),s=s+1|0}while((0|s)!=(0|n))}if((0|o)!=(0|A)){if(!(0|F(A))){if(0!=(0|u)|5!=(0|Me(e,t)))break;i[r>>2]=1+(0|i[r>>2]);break}switch(127&a){case 8:case 118:break e}3!=(0|Me(e,t))&&(i[r>>2]=1+(0|i[r>>2]))}}else if((0|n)>0){s=0;do{e=0|Fe(e,t),t=0|C(),s=s+1|0}while((0|s)!=(0|n))}}while(0);return i[r>>2]=((0|i[r>>2])+n|0)%6|0,h=e,E(0|(f=t)),0|h}function M(e,t,n,r,o,s){t|=0,n|=0,r|=0,o|=0,s|=0;var u,A,c,l,f,h,g,d,p,v=0,y=0,m=0,I=0,b=0,E=0,B=0,w=0,Q=0,k=0,_=0,x=0,O=0,D=0;if(p=S,S=S+48|0,h=p+32|0,g=p+16|0,d=p,(0|(v=0|i[(e|=0)>>2]))<=0)return S=p,0|(x=0);u=e+4|0,A=h+8|0,c=g+8|0,l=d+8|0,f=((0|t)<0)<<31>>31,_=0;e:for(;;){Q=(y=0|i[u>>2])+(_<<4)|0,i[h>>2]=i[Q>>2],i[h+4>>2]=i[Q+4>>2],i[h+8>>2]=i[Q+8>>2],i[h+12>>2]=i[Q+12>>2],(0|_)==(v+-1|0)?(i[g>>2]=i[y>>2],i[g+4>>2]=i[y+4>>2],i[g+8>>2]=i[y+8>>2],i[g+12>>2]=i[y+12>>2]):(Q=y+(_+1<<4)|0,i[g>>2]=i[Q>>2],i[g+4>>2]=i[Q+4>>2],i[g+8>>2]=i[Q+8>>2],i[g+12>>2]=i[Q+12>>2]),Q=0|J(h,g,n);t:do{if((0|Q)>0){k=+(0|Q),w=0;n:for(;;){D=+(Q-w|0),O=+(0|w),a[d>>3]=+a[h>>3]*D/k+ +a[g>>3]*O/k,a[l>>3]=+a[A>>3]*D/k+ +a[c>>3]*O/k,y=0|Ct(0|(E=0|Ue(d,n)),0|(B=0|C()),0|t,0|f),C(),I=0|i[(m=v=s+(y<<3)|0)>>2],m=0|i[m+4>>2];r:do{if(0==(0|I)&0==(0|m))x=14;else for(b=0;;){if((0|b)>(0|t)){v=1;break r}if((0|I)==(0|E)&(0|m)==(0|B)){v=7;break r}if(0==(0|(I=0|i[(m=v=s+((y=(y+1|0)%(0|t)|0)<<3)|0)>>2]))&0==(0|(m=0|i[m+4>>2]))){x=14;break}b=b+1|0}}while(0);switch(14==(0|x)&&(x=0,0==(0|E)&0==(0|B)?v=7:(i[v>>2]=E,i[v+4>>2]=B,v=0|i[r>>2],i[(b=o+(v<<3)|0)>>2]=E,i[b+4>>2]=B,i[r>>2]=v+1,v=0)),7&v){case 7:case 0:break;default:break n}if((0|Q)<=(0|(w=w+1|0))){x=8;break t}}if(0|v){v=-1,x=20;break e}}else x=8}while(0);if(8==(0|x)&&(x=0),(0|(_=_+1|0))>=(0|(v=0|i[e>>2]))){v=0,x=20;break}}return 20==(0|x)?(S=p,0|v):0}function N(e){return 0|i[7728+(28*(e|=0)|0)+16>>2]}function F(e){return 4==(0|(e|=0))|117==(0|e)|0}function T(e){return 0|i[11152+(216*(0|i[(e|=0)>>2])|0)+(72*(0|i[e+4>>2])|0)+(24*(0|i[e+8>>2])|0)+(i[e+12>>2]<<3)>>2]}function L(e){return 0|i[11152+(216*(0|i[(e|=0)>>2])|0)+(72*(0|i[e+4>>2])|0)+(24*(0|i[e+8>>2])|0)+(i[e+12>>2]<<3)+4>>2]}function P(e,t){return t|=0,(0|i[7728+(28*(e|=0)|0)+20>>2])==(0|t)?0|(t=1):0|(t=(0|i[7728+(28*e|0)+24>>2])==(0|t))}function U(e,t){return 0|i[880+(28*(e|=0)|0)+((t|=0)<<2)>>2]}function G(e,t){return t|=0,(0|i[880+(28*(e|=0)|0)>>2])==(0|t)?0|(t=0):(0|i[880+(28*e|0)+4>>2])==(0|t)?0|(t=1):(0|i[880+(28*e|0)+8>>2])==(0|t)?0|(t=2):(0|i[880+(28*e|0)+12>>2])==(0|t)?0|(t=3):(0|i[880+(28*e|0)+16>>2])==(0|t)?0|(t=4):(0|i[880+(28*e|0)+20>>2])==(0|t)?0|(t=5):0|((0|i[880+(28*e|0)+24>>2])==(0|t)?6:7)}function q(e){return+a[(e|=0)+16>>3]<+a[e+24>>3]|0}function H(e,t){e|=0;var n,r,i=0;return(i=+a[(t|=0)>>3])>=+a[e+8>>3]&&i<=+a[e>>3]?(n=+a[e+16>>3],i=+a[e+24>>3],t=(r=+a[t+8>>3])>=i,e=r<=n&1,n<i?t&&(e=1):t||(e=0),0|(t=0!=(0|e))):0|(t=0)}function Y(e,t){e|=0,t|=0;var n,r,o,s,A,c,l=0,f=0;s=S,S=S+288|0,n=s+264|0,r=s+96|0,f=(l=o=s)+96|0;do{i[l>>2]=0,l=l+4|0}while((0|l)<(0|f));return Je(t,o),He(f=0|i[(l=o)>>2],l=0|i[l+4>>2],n),Ye(f,l,r),A=+_e(n,r+8|0),a[n>>3]=+a[e>>3],a[(l=n+8|0)>>3]=+a[e+16>>3],a[r>>3]=+a[e+8>>3],a[(f=r+8|0)>>3]=+a[e+24>>3],c=+_e(n,r),f=~~+y(+c*c/+Qt(+ +u(+(+a[l>>3]-+a[f>>3])/(+a[n>>3]-+a[r>>3])),3)/(A*(2.59807621135*A)*.8)),S=s,0|(0==(0|f)?1:f)}function J(e,t,n){e|=0,t|=0,n|=0;var r,a,o,s,u,A=0,c=0;s=S,S=S+288|0,r=s+264|0,a=s+96|0,c=(A=o=s)+96|0;do{i[A>>2]=0,A=A+4|0}while((0|A)<(0|c));return Je(n,o),He(A=0|i[(c=o)>>2],c=0|i[c+4>>2],r),Ye(A,c,a),u=+_e(r,a+8|0),c=~~+y(+ +_e(e,t)/(2*u)),S=s,0|(0==(0|c)?1:c)}function z(e,t,n,r){t|=0,n|=0,r|=0,i[(e|=0)>>2]=t,i[e+4>>2]=n,i[e+8>>2]=r}function K(e,t){e|=0;var n,r,o,s,A=0,c=0,l=0,f=0,h=0,g=0,d=0;i[(s=(t|=0)+8|0)>>2]=0,r=+a[e>>3],f=+u(+r),o=+a[e+8>>3],f+=.5*(h=+u(+o)/.8660254037844386),f-=+(0|(A=~~f)),h-=+(0|(e=~~h));do{if(f<.5){if(f<.3333333333333333){if(i[t>>2]=A,h<.5*(f+1)){i[t+4>>2]=e;break}e=e+1|0,i[t+4>>2]=e;break}if(e=(1&!(h<(d=1-f)))+e|0,i[t+4>>2]=e,d<=h&h<2*f){A=A+1|0,i[t>>2]=A;break}i[t>>2]=A;break}if(!(f<.6666666666666666)){if(A=A+1|0,i[t>>2]=A,h<.5*f){i[t+4>>2]=e;break}e=e+1|0,i[t+4>>2]=e;break}if(h<1-f){if(i[t+4>>2]=e,2*f-1<h){i[t>>2]=A;break}}else e=e+1|0,i[t+4>>2]=e;A=A+1|0,i[t>>2]=A}while(0);do{if(r<0){if(1&e){A=~~(+(0|A)-(2*(+((g=0|It(0|A,((0|A)<0)<<31>>31|0,0|(g=(e+1|0)/2|0),((0|g)<0)<<31>>31|0))>>>0)+4294967296*+(0|C()))+1)),i[t>>2]=A;break}A=~~(+(0|A)-2*(+((g=0|It(0|A,((0|A)<0)<<31>>31|0,0|(g=(0|e)/2|0),((0|g)<0)<<31>>31|0))>>>0)+4294967296*+(0|C()))),i[t>>2]=A;break}}while(0);g=t+4|0,o<0&&(A=A-((1|e<<1)/2|0)|0,i[t>>2]=A,e=0-e|0,i[g>>2]=e),c=e-A|0,(0|A)<0?(l=0-A|0,i[g>>2]=c,i[s>>2]=l,i[t>>2]=0,e=c,A=0):l=0,(0|e)<0&&(A=A-e|0,i[t>>2]=A,l=l-e|0,i[s>>2]=l,i[g>>2]=0,e=0),n=A-l|0,c=e-l|0,(0|l)<0&&(i[t>>2]=n,i[g>>2]=c,i[s>>2]=0,e=c,A=n,l=0),(0|(c=(0|l)<(0|(c=(0|e)<(0|A)?e:A))?l:c))<=0||(i[t>>2]=A-c,i[g>>2]=e-c,i[s>>2]=l-c)}function W(e){var t,n=0,r=0,a=0,o=0,s=0;n=0|i[(e|=0)>>2],r=0|i[(t=e+4|0)>>2],(0|n)<0&&(r=r-n|0,i[t>>2]=r,i[(s=e+8|0)>>2]=(0|i[s>>2])-n,i[e>>2]=0,n=0),(0|r)<0?(n=n-r|0,i[e>>2]=n,o=(0|i[(s=e+8|0)>>2])-r|0,i[s>>2]=o,i[t>>2]=0,r=0):(s=o=e+8|0,o=0|i[o>>2]),(0|o)<0&&(n=n-o|0,i[e>>2]=n,r=r-o|0,i[t>>2]=r,i[s>>2]=0,o=0),(0|(a=(0|o)<(0|(a=(0|r)<(0|n)?r:n))?o:a))<=0||(i[e>>2]=n-a,i[t>>2]=r-a,i[s>>2]=o-a)}function V(e,t){t|=0;var n,r;r=0|i[(e|=0)+8>>2],n=+((0|i[e+4>>2])-r|0),a[t>>3]=+((0|i[e>>2])-r|0)-.5*n,a[t+8>>3]=.8660254037844386*n}function X(e,t,n){e|=0,t|=0,i[(n|=0)>>2]=(0|i[t>>2])+(0|i[e>>2]),i[n+4>>2]=(0|i[t+4>>2])+(0|i[e+4>>2]),i[n+8>>2]=(0|i[t+8>>2])+(0|i[e+8>>2])}function Z(e,t,n){e|=0,t|=0,i[(n|=0)>>2]=(0|i[e>>2])-(0|i[t>>2]),i[n+4>>2]=(0|i[e+4>>2])-(0|i[t+4>>2]),i[n+8>>2]=(0|i[e+8>>2])-(0|i[t+8>>2])}function $(e,t){t|=0;var n,r=0;r=0|m(0|i[(e|=0)>>2],t),i[e>>2]=r,n=0|m(0|i[(r=e+4|0)>>2],t),i[r>>2]=n,t=0|m(0|i[(e=e+8|0)>>2],t),i[e>>2]=t}function ee(e){var t,n,r=0,a=0,o=0,s=0,u=0;u=(0|(n=0|i[(e|=0)>>2]))<0,e=(e=(a=(0|(s=((t=(0|(o=(0|i[e+4>>2])-(u?n:0)|0))<0)?0-o|0:0)+((0|i[e+8>>2])-(u?n:0))|0))<0)?0:s)-((o=(0|(a=(0|e)<(0|(a=(0|(r=(t?0:o)-(a?s:0)|0))<(0|(s=(u?0:n)-(t?o:0)-(a?s:0)|0))?r:s))?e:a))>0)?a:0)|0,r=r-(o?a:0)|0;e:do{switch(s-(o?a:0)|0){case 0:switch(0|r){case 0:return 0|(u=0==(0|e)?0:1==(0|e)?1:7);case 1:return 0|(u=0==(0|e)?2:1==(0|e)?3:7);default:break e}case 1:switch(0|r){case 0:return 0|(u=0==(0|e)?4:1==(0|e)?5:7);case 1:if(e)break e;return 0|(e=6);default:break e}}}while(0);return 0|(u=7)}function te(e){var t,n,r=0,a=0,o=0,s=0,u=0;a=0|i[(t=(e|=0)+8|0)>>2],o=0|pt(+((3*(r=(0|i[e>>2])-a|0)|0)-(a=(0|i[(n=e+4|0)>>2])-a|0)|0)/7),i[e>>2]=o,r=0|pt(+((a<<1)+r|0)/7),i[n>>2]=r,i[t>>2]=0,a=r-o|0,(0|o)<0?(u=0-o|0,i[n>>2]=a,i[t>>2]=u,i[e>>2]=0,r=a,o=0,a=u):a=0,(0|r)<0&&(o=o-r|0,i[e>>2]=o,a=a-r|0,i[t>>2]=a,i[n>>2]=0,r=0),u=o-a|0,s=r-a|0,(0|a)<0?(i[e>>2]=u,i[n>>2]=s,i[t>>2]=0,r=s,s=u,a=0):s=o,(0|(o=(0|a)<(0|(o=(0|r)<(0|s)?r:s))?a:o))<=0||(i[e>>2]=s-o,i[n>>2]=r-o,i[t>>2]=a-o)}function ne(e){var t,n,r=0,a=0,o=0,s=0,u=0;a=0|i[(t=(e|=0)+8|0)>>2],o=0|pt(+(((r=(0|i[e>>2])-a|0)<<1)+(a=(0|i[(n=e+4|0)>>2])-a|0)|0)/7),i[e>>2]=o,r=0|pt(+((3*a|0)-r|0)/7),i[n>>2]=r,i[t>>2]=0,a=r-o|0,(0|o)<0?(u=0-o|0,i[n>>2]=a,i[t>>2]=u,i[e>>2]=0,r=a,o=0,a=u):a=0,(0|r)<0&&(o=o-r|0,i[e>>2]=o,a=a-r|0,i[t>>2]=a,i[n>>2]=0,r=0),u=o-a|0,s=r-a|0,(0|a)<0?(i[e>>2]=u,i[n>>2]=s,i[t>>2]=0,r=s,s=u,a=0):s=o,(0|(o=(0|a)<(0|(o=(0|r)<(0|s)?r:s))?a:o))<=0||(i[e>>2]=s-o,i[n>>2]=r-o,i[t>>2]=a-o)}function re(e){var t,n,r,a=0,o=0,s=0,u=0;a=0|i[(e|=0)>>2],o=0|i[(n=e+4|0)>>2],s=0|i[(r=e+8|0)>>2],u=o+(3*a|0)|0,i[e>>2]=u,o=s+(3*o|0)|0,i[n>>2]=o,a=(3*s|0)+a|0,i[r>>2]=a,s=o-u|0,(0|u)<0?(a=a-u|0,i[n>>2]=s,i[r>>2]=a,i[e>>2]=0,o=s,s=0):s=u,(0|o)<0&&(s=s-o|0,i[e>>2]=s,a=a-o|0,i[r>>2]=a,i[n>>2]=0,o=0),t=s-a|0,u=o-a|0,(0|a)<0?(i[e>>2]=t,i[n>>2]=u,i[r>>2]=0,s=t,a=0):u=o,(0|(o=(0|a)<(0|(o=(0|u)<(0|s)?u:s))?a:o))<=0||(i[e>>2]=s-o,i[n>>2]=u-o,i[r>>2]=a-o)}function ie(e){var t,n,r,a=0,o=0,s=0,u=0;u=0|i[(e|=0)>>2],s=(3*(a=0|i[(n=e+4|0)>>2])|0)+u|0,u=(o=0|i[(r=e+8|0)>>2])+(3*u|0)|0,i[e>>2]=u,i[n>>2]=s,a=(3*o|0)+a|0,i[r>>2]=a,o=s-u|0,(0|u)<0?(a=a-u|0,i[n>>2]=o,i[r>>2]=a,i[e>>2]=0,u=0):o=s,(0|o)<0&&(u=u-o|0,i[e>>2]=u,a=a-o|0,i[r>>2]=a,i[n>>2]=0,o=0),t=u-a|0,s=o-a|0,(0|a)<0?(i[e>>2]=t,i[n>>2]=s,i[r>>2]=0,u=t,a=0):s=o,(0|(o=(0|a)<(0|(o=(0|s)<(0|u)?s:u))?a:o))<=0||(i[e>>2]=u-o,i[n>>2]=s-o,i[r>>2]=a-o)}function ae(e,t){e|=0;var n,r,a,o=0,s=0,u=0;((t|=0)+-1|0)>>>0>=6||(u=(0|i[15472+(12*t|0)>>2])+(0|i[e>>2])|0,i[e>>2]=u,a=e+4|0,s=(0|i[15472+(12*t|0)+4>>2])+(0|i[a>>2])|0,i[a>>2]=s,r=e+8|0,t=(0|i[15472+(12*t|0)+8>>2])+(0|i[r>>2])|0,i[r>>2]=t,o=s-u|0,(0|u)<0?(t=t-u|0,i[a>>2]=o,i[r>>2]=t,i[e>>2]=0,s=0):(o=s,s=u),(0|o)<0&&(s=s-o|0,i[e>>2]=s,t=t-o|0,i[r>>2]=t,i[a>>2]=0,o=0),n=s-t|0,u=o-t|0,(0|t)<0?(i[e>>2]=n,i[a>>2]=u,i[r>>2]=0,s=n,t=0):u=o,(0|(o=(0|t)<(0|(o=(0|u)<(0|s)?u:s))?t:o))<=0||(i[e>>2]=s-o,i[a>>2]=u-o,i[r>>2]=t-o))}function oe(e){var t,n,r,a=0,o=0,s=0,u=0;u=0|i[(e|=0)>>2],s=(a=0|i[(n=e+4|0)>>2])+u|0,u=(o=0|i[(r=e+8|0)>>2])+u|0,i[e>>2]=u,i[n>>2]=s,a=o+a|0,i[r>>2]=a,o=s-u|0,(0|u)<0?(a=a-u|0,i[n>>2]=o,i[r>>2]=a,i[e>>2]=0,s=0):(o=s,s=u),(0|o)<0&&(s=s-o|0,i[e>>2]=s,a=a-o|0,i[r>>2]=a,i[n>>2]=0,o=0),t=s-a|0,u=o-a|0,(0|a)<0?(i[e>>2]=t,i[n>>2]=u,i[r>>2]=0,s=t,a=0):u=o,(0|(o=(0|a)<(0|(o=(0|u)<(0|s)?u:s))?a:o))<=0||(i[e>>2]=s-o,i[n>>2]=u-o,i[r>>2]=a-o)}function se(e){var t,n,r,a=0,o=0,s=0,u=0;a=0|i[(e|=0)>>2],s=0|i[(n=e+4|0)>>2],o=0|i[(r=e+8|0)>>2],u=s+a|0,i[e>>2]=u,s=o+s|0,i[n>>2]=s,a=o+a|0,i[r>>2]=a,o=s-u|0,(0|u)<0?(a=a-u|0,i[n>>2]=o,i[r>>2]=a,i[e>>2]=0,s=0):(o=s,s=u),(0|o)<0&&(s=s-o|0,i[e>>2]=s,a=a-o|0,i[r>>2]=a,i[n>>2]=0,o=0),t=s-a|0,u=o-a|0,(0|a)<0?(i[e>>2]=t,i[n>>2]=u,i[r>>2]=0,s=t,a=0):u=o,(0|(o=(0|a)<(0|(o=(0|u)<(0|s)?u:s))?a:o))<=0||(i[e>>2]=s-o,i[n>>2]=u-o,i[r>>2]=a-o)}function ue(e){switch(0|(e|=0)){case 1:e=5;break;case 5:e=4;break;case 4:e=6;break;case 6:e=2;break;case 2:e=3;break;case 3:e=1}return 0|e}function Ae(e){switch(0|(e|=0)){case 1:e=3;break;case 3:e=2;break;case 2:e=6;break;case 6:e=4;break;case 4:e=5;break;case 5:e=1}return 0|e}function ce(e){var t,n,r,a=0,o=0,s=0,u=0;a=0|i[(e|=0)>>2],o=0|i[(n=e+4|0)>>2],s=0|i[(r=e+8|0)>>2],u=o+(a<<1)|0,i[e>>2]=u,o=s+(o<<1)|0,i[n>>2]=o,a=(s<<1)+a|0,i[r>>2]=a,s=o-u|0,(0|u)<0?(a=a-u|0,i[n>>2]=s,i[r>>2]=a,i[e>>2]=0,o=s,s=0):s=u,(0|o)<0&&(s=s-o|0,i[e>>2]=s,a=a-o|0,i[r>>2]=a,i[n>>2]=0,o=0),t=s-a|0,u=o-a|0,(0|a)<0?(i[e>>2]=t,i[n>>2]=u,i[r>>2]=0,s=t,a=0):u=o,(0|(o=(0|a)<(0|(o=(0|u)<(0|s)?u:s))?a:o))<=0||(i[e>>2]=s-o,i[n>>2]=u-o,i[r>>2]=a-o)}function le(e){var t,n,r,a=0,o=0,s=0,u=0;u=0|i[(e|=0)>>2],s=((a=0|i[(n=e+4|0)>>2])<<1)+u|0,u=(o=0|i[(r=e+8|0)>>2])+(u<<1)|0,i[e>>2]=u,i[n>>2]=s,a=(o<<1)+a|0,i[r>>2]=a,o=s-u|0,(0|u)<0?(a=a-u|0,i[n>>2]=o,i[r>>2]=a,i[e>>2]=0,u=0):o=s,(0|o)<0&&(u=u-o|0,i[e>>2]=u,a=a-o|0,i[r>>2]=a,i[n>>2]=0,o=0),t=u-a|0,s=o-a|0,(0|a)<0?(i[e>>2]=t,i[n>>2]=s,i[r>>2]=0,u=t,a=0):s=o,(0|(o=(0|a)<(0|(o=(0|s)<(0|u)?s:u))?a:o))<=0||(i[e>>2]=u-o,i[n>>2]=s-o,i[r>>2]=a-o)}function fe(e,t){t|=0;var n,r,a,o=0,s=0,u=0;return a=(0|(r=(0|i[(e|=0)>>2])-(0|i[t>>2])|0))<0,n=(0|(s=(0|i[e+4>>2])-(0|i[t+4>>2])-(a?r:0)|0))<0,t=(t=(e=(0|(u=(a?0-r|0:0)+(0|i[e+8>>2])-(0|i[t+8>>2])+(n?0-s|0:0)|0))<0)?0:u)-((s=(0|(e=(0|t)<(0|(e=(0|(o=(n?0:s)-(e?u:0)|0))<(0|(u=(a?0:r)-(n?s:0)-(e?u:0)|0))?o:u))?t:e))>0)?e:0)|0,o=o-(s?e:0)|0,0|((0|(e=(0|(e=u-(s?e:0)|0))>-1?e:0-e|0))>(0|(t=(0|(o=(0|o)>-1?o:0-o|0))>(0|(t=(0|t)>-1?t:0-t|0))?o:t))?e:t)}function he(e,t){t|=0;var n;n=0|i[(e|=0)+8>>2],i[t>>2]=(0|i[e>>2])-n,i[t+4>>2]=(0|i[e+4>>2])-n}function ge(e,t){t|=0;var n,r,a,o=0,s=0,u=0;s=0|i[(e|=0)>>2],i[t>>2]=s,e=0|i[e+4>>2],i[(r=t+4|0)>>2]=e,i[(a=t+8|0)>>2]=0,o=e-s|0,(0|s)<0?(e=0-s|0,i[r>>2]=o,i[a>>2]=e,i[t>>2]=0,s=0):(o=e,e=0),(0|o)<0&&(s=s-o|0,i[t>>2]=s,e=e-o|0,i[a>>2]=e,i[r>>2]=0,o=0),n=s-e|0,u=o-e|0,(0|e)<0?(i[t>>2]=n,i[r>>2]=u,i[a>>2]=0,o=u,u=n,e=0):u=s,(0|(s=(0|e)<(0|(s=(0|o)<(0|u)?o:u))?e:s))<=0||(i[t>>2]=u-s,i[r>>2]=o-s,i[a>>2]=e-s)}function de(e){var t,n,r,a;n=(a=0|i[(t=(e|=0)+8|0)>>2])-(0|i[e>>2])|0,i[e>>2]=n,e=(0|i[(r=e+4|0)>>2])-a|0,i[r>>2]=e,i[t>>2]=0-(e+n)}function pe(e){var t,n,r=0,a=0,o=0,s=0,u=0;r=0-(a=0|i[(e|=0)>>2])|0,i[e>>2]=r,i[(t=e+8|0)>>2]=0,s=(o=0|i[(n=e+4|0)>>2])+a|0,(0|a)>0?(i[n>>2]=s,i[t>>2]=a,i[e>>2]=0,r=0,o=s):a=0,(0|o)<0?(u=r-o|0,i[e>>2]=u,a=a-o|0,i[t>>2]=a,i[n>>2]=0,s=u-a|0,r=0-a|0,(0|a)<0?(i[e>>2]=s,i[n>>2]=r,i[t>>2]=0,o=r,a=0):(o=0,s=u)):s=r,(0|(r=(0|a)<(0|(r=(0|o)<(0|s)?o:s))?a:r))<=0||(i[e>>2]=s-r,i[n>>2]=o-r,i[t>>2]=a-r)}function ve(e,t,n,r){t|=0,n|=0,r|=0;var o,s=0,u=0,A=0,c=0;if(o=S,S=S+32|0,function(e,t){t|=0;var n,r,i=0;i=+a[(e=e|0)>>3],n=+l(+i),i=+f(+i),a[t+16>>3]=i,i=+a[e+8>>3],r=n*+l(+i),a[t>>3]=r,i=n*+f(+i),a[t+8>>3]=i}(e|=0,u=o),i[n>>2]=0,s=+ut(15888,u),(A=+ut(15912,u))<s&&(i[n>>2]=1,s=A),(A=+ut(15936,u))<s&&(i[n>>2]=2,s=A),(A=+ut(15960,u))<s&&(i[n>>2]=3,s=A),(A=+ut(15984,u))<s&&(i[n>>2]=4,s=A),(A=+ut(16008,u))<s&&(i[n>>2]=5,s=A),(A=+ut(16032,u))<s&&(i[n>>2]=6,s=A),(A=+ut(16056,u))<s&&(i[n>>2]=7,s=A),(A=+ut(16080,u))<s&&(i[n>>2]=8,s=A),(A=+ut(16104,u))<s&&(i[n>>2]=9,s=A),(A=+ut(16128,u))<s&&(i[n>>2]=10,s=A),(A=+ut(16152,u))<s&&(i[n>>2]=11,s=A),(A=+ut(16176,u))<s&&(i[n>>2]=12,s=A),(A=+ut(16200,u))<s&&(i[n>>2]=13,s=A),(A=+ut(16224,u))<s&&(i[n>>2]=14,s=A),(A=+ut(16248,u))<s&&(i[n>>2]=15,s=A),(A=+ut(16272,u))<s&&(i[n>>2]=16,s=A),(A=+ut(16296,u))<s&&(i[n>>2]=17,s=A),(A=+ut(16320,u))<s&&(i[n>>2]=18,s=A),(A=+ut(16344,u))<s&&(i[n>>2]=19,s=A),(A=+g(+(1-.5*s)))<1e-16)return i[r>>2]=0,i[r+4>>2]=0,i[r+8>>2]=0,i[r+12>>2]=0,void(S=o);if(n=0|i[n>>2],s=+Qe((s=+a[16368+(24*n|0)>>3])-+Qe(+function(e,t){e|=0;var n,r,i,o,s;return o=+a[(t=t|0)>>3],r=+l(+o),i=+a[t+8>>3]-+a[e+8>>3],s=r*+f(+i),n=+a[e>>3],+ +v(+s,+(+f(+o)*+l(+n)-+l(+i)*(r*+f(+n))))}(15568+(n<<4)|0,e))),c=0|Pe(t)?+Qe(s+-.3334731722518321):s,s=+h(+A)/.381966011250105,(0|t)>0){u=0;do{s*=2.6457513110645907,u=u+1|0}while((0|u)!=(0|t))}A=+l(+c)*s,a[r>>3]=A,c=+f(+c)*s,a[r+8>>3]=c,S=o}function ye(e,t,n,r,o){t|=0,n|=0,r|=0,o|=0;var s=0,c=0;if((s=+function(e){var t,n;return n=+a[(e=e|0)>>3],t=+a[e+8>>3],+ +A(+(n*n+t*t))}(e|=0))<1e-16)return t=15568+(t<<4)|0,i[o>>2]=i[t>>2],i[o+4>>2]=i[t+4>>2],i[o+8>>2]=i[t+8>>2],void(i[o+12>>2]=i[t+12>>2]);if(c=+v(+ +a[e+8>>3],+ +a[e>>3]),(0|n)>0){e=0;do{s/=2.6457513110645907,e=e+1|0}while((0|e)!=(0|n))}r?(s/=3,n=0==(0|Pe(n)),s=+p(.381966011250105*(n?s:s/2.6457513110645907))):(s=+p(.381966011250105*s),0|Pe(n)&&(c=+Qe(c+.3334731722518321))),function(e,t,n,r){e|=0,t=+t,r|=0;var o=0,s=0,A=0,c=0;if((n=+n)<1e-16)return i[r>>2]=i[e>>2],i[r+4>>2]=i[e+4>>2],i[r+8>>2]=i[e+8>>2],void(i[r+12>>2]=i[e+12>>2]);s=t<0?t+6.283185307179586:t,s=t>=6.283185307179586?s+-6.283185307179586:s;do{if(!(s<1e-16)){if(o=+u(+(s+-3.141592653589793))<1e-16,t=+a[e>>3],o){t-=n,a[r>>3]=t,o=r;break}if(A=+l(+n),n=+f(+n),t=A*+f(+t)+ +l(+s)*(n*+l(+t)),t=+d(+((t=t>1?1:t)<-1?-1:t)),a[r>>3]=t,+u(+(t+-1.5707963267948966))<1e-16)return a[r>>3]=1.5707963267948966,void(a[r+8>>3]=0);if(+u(+(t+1.5707963267948966))<1e-16)return a[r>>3]=-1.5707963267948966,void(a[r+8>>3]=0);if(c=+l(+t),s=n*+f(+s)/c,n=+a[e>>3],t=(A-+f(+t)*+f(+n))/+l(+n)/c,A=s>1?1:s,t=t>1?1:t,(t=+a[e+8>>3]+ +v(+(A<-1?-1:A),+(t<-1?-1:t)))>3.141592653589793)do{t+=-6.283185307179586}while(t>3.141592653589793);if(t<-3.141592653589793)do{t+=6.283185307179586}while(t<-3.141592653589793);return void(a[r+8>>3]=t)}t=+a[e>>3]+n,a[r>>3]=t,o=r}while(0);if(+u(+(t+-1.5707963267948966))<1e-16)return a[o>>3]=1.5707963267948966,void(a[r+8>>3]=0);if(+u(+(t+1.5707963267948966))<1e-16)return a[o>>3]=-1.5707963267948966,void(a[r+8>>3]=0);if((t=+a[e+8>>3])>3.141592653589793)do{t+=-6.283185307179586}while(t>3.141592653589793);if(t<-3.141592653589793)do{t+=6.283185307179586}while(t<-3.141592653589793);a[r+8>>3]=t}(15568+(t<<4)|0,+Qe(+a[16368+(24*t|0)>>3]-c),s,o)}function me(e,t,n){t|=0,n|=0;var r,a;r=S,S=S+16|0,V((e|=0)+4|0,a=r),ye(a,0|i[e>>2],t,0,n),S=r}function Ie(e,t,n,r,o){e|=0,t|=0,n|=0,r|=0,o|=0;var s,u,A,c,l,f,h,g,d,p,v,y,m,I,b,E,C,w,Q,k,_,x,O=0,D=0,R=0,j=0,M=0,N=0;if(x=S,S=S+272|0,j=x+240|0,Q=x,k=x+224|0,_=x+208|0,v=x+176|0,y=x+160|0,m=x+192|0,I=x+144|0,b=x+128|0,E=x+112|0,C=x+96|0,w=x+80|0,i[(O=x+256|0)>>2]=t,i[j>>2]=i[e>>2],i[j+4>>2]=i[e+4>>2],i[j+8>>2]=i[e+8>>2],i[j+12>>2]=i[e+12>>2],be(j,O,Q),i[o>>2]=0,(0|(j=r+n+(5==(0|r)&1)|0))<=(0|n))S=x;else{u=k+4|0,A=v+4|0,c=n+5|0,l=16848+((s=0|i[O>>2])<<2)|0,f=16928+(s<<2)|0,h=b+8|0,g=E+8|0,d=C+8|0,p=_+4|0,R=n;e:for(;;){D=Q+(((0|R)%5|0)<<4)|0,i[_>>2]=i[D>>2],i[_+4>>2]=i[D+4>>2],i[_+8>>2]=i[D+8>>2],i[_+12>>2]=i[D+12>>2];do{}while(2==(0|Ee(_,s,0,1)));if((0|R)>(0|n)&0!=(0|Pe(t))){if(i[v>>2]=i[_>>2],i[v+4>>2]=i[_+4>>2],i[v+8>>2]=i[_+8>>2],i[v+12>>2]=i[_+12>>2],V(u,y),r=0|i[v>>2],O=0|i[17008+(80*r|0)+(i[k>>2]<<2)>>2],i[v>>2]=i[18608+(80*r|0)+(20*O|0)>>2],(0|(D=0|i[18608+(80*r|0)+(20*O|0)+16>>2]))>0){e=0;do{oe(A),e=e+1|0}while((0|e)<(0|D))}switch(D=18608+(80*r|0)+(20*O|0)+4|0,i[m>>2]=i[D>>2],i[m+4>>2]=i[D+4>>2],i[m+8>>2]=i[D+8>>2],$(m,3*(0|i[l>>2])|0),X(A,m,A),W(A),V(A,I),M=+(0|i[f>>2]),a[b>>3]=3*M,a[h>>3]=0,N=-1.5*M,a[E>>3]=N,a[g>>3]=2.598076211353316*M,a[C>>3]=N,a[d>>3]=-2.598076211353316*M,0|i[17008+(80*(0|i[v>>2])|0)+(i[_>>2]<<2)>>2]){case 1:e=E,r=b;break;case 3:e=C,r=E;break;case 2:e=b,r=C;break;default:e=12;break e}ot(y,I,r,e,w),ye(w,0|i[v>>2],s,1,o+8+(i[o>>2]<<4)|0),i[o>>2]=1+(0|i[o>>2])}if((0|R)<(0|c)&&(V(p,v),ye(v,0|i[_>>2],s,1,o+8+(i[o>>2]<<4)|0),i[o>>2]=1+(0|i[o>>2])),i[k>>2]=i[_>>2],i[k+4>>2]=i[_+4>>2],i[k+8>>2]=i[_+8>>2],i[k+12>>2]=i[_+12>>2],(0|(R=R+1|0))>=(0|j)){e=3;break}}3!=(0|e)?12==(0|e)&&B(22474,22521,581,22531):S=x}}function be(e,t,n){e|=0,t|=0,n|=0;var r,a=0,o=0,s=0,u=0,A=0;r=S,S=S+128|0,o=r,u=20208,A=(s=a=r+64|0)+60|0;do{i[s>>2]=i[u>>2],s=s+4|0,u=u+4|0}while((0|s)<(0|A));u=20272,A=(s=o)+60|0;do{i[s>>2]=i[u>>2],s=s+4|0,u=u+4|0}while((0|s)<(0|A));a=(A=0==(0|Pe(0|i[t>>2])))?a:o,ce(o=e+4|0),le(o),0|Pe(0|i[t>>2])&&(ie(o),i[t>>2]=1+(0|i[t>>2])),i[n>>2]=i[e>>2],X(o,a,t=n+4|0),W(t),i[n+16>>2]=i[e>>2],X(o,a+12|0,t=n+20|0),W(t),i[n+32>>2]=i[e>>2],X(o,a+24|0,t=n+36|0),W(t),i[n+48>>2]=i[e>>2],X(o,a+36|0,t=n+52|0),W(t),i[n+64>>2]=i[e>>2],X(o,a+48|0,n=n+68|0),W(n),S=r}function Ee(e,t,n,r){n|=0,r|=0;var a,o,s,u,A,c,l=0,f=0,h=0,g=0,d=0;if(c=S,S=S+32|0,A=c+12|0,o=c,d=(e|=0)+4|0,g=0|i[16928+((t|=0)<<2)>>2],g=(u=0!=(0|r))?3*g|0:g,l=0|i[d>>2],a=0|i[(s=e+8|0)>>2],u){if((0|(l=a+l+(r=0|i[(f=e+12|0)>>2])|0))==(0|g))return S=c,0|(d=1);h=f}else l=a+l+(r=0|i[(h=e+12|0)>>2])|0;if((0|l)<=(0|g))return S=c,0|(d=0);do{if((0|r)>0){if(r=0|i[e>>2],(0|a)>0){f=18608+(80*r|0)+60|0,r=e;break}r=18608+(80*r|0)+40|0,n?(z(A,g,0,0),Z(d,A,o),se(o),X(o,A,d),f=r,r=e):(f=r,r=e)}else f=18608+(80*(0|i[e>>2])|0)+20|0,r=e}while(0);if(i[r>>2]=i[f>>2],(0|i[(l=f+16|0)>>2])>0){r=0;do{oe(d),r=r+1|0}while((0|r)<(0|i[l>>2]))}return e=f+4|0,i[A>>2]=i[e>>2],i[A+4>>2]=i[e+4>>2],i[A+8>>2]=i[e+8>>2],t=0|i[16848+(t<<2)>>2],$(A,u?3*t|0:t),X(d,A,d),W(d),r=u&&((0|i[s>>2])+(0|i[d>>2])+(0|i[h>>2])|0)==(0|g)?1:2,S=c,0|(d=r)}function Ce(e,t){e|=0,t|=0;var n=0;do{n=0|Ee(e,t,0,1)}while(2==(0|n));return 0|n}function Be(e,t,n,r,o){e|=0,t|=0,n|=0,r|=0,o|=0;var s,u,A,c,l,f,h,g,d,p,v,y,m,I,b,E,C,w,Q=0,k=0,_=0,x=0,O=0;if(w=S,S=S+240|0,I=w+208|0,b=w,E=w+192|0,C=w+176|0,d=w+160|0,p=w+144|0,v=w+128|0,y=w+112|0,m=w+96|0,i[(Q=w+224|0)>>2]=t,i[I>>2]=i[e>>2],i[I+4>>2]=i[e+4>>2],i[I+8>>2]=i[e+8>>2],i[I+12>>2]=i[e+12>>2],we(I,Q,b),i[o>>2]=0,(0|(g=r+n+(6==(0|r)&1)|0))<=(0|n))S=w;else{u=n+6|0,A=16928+((s=0|i[Q>>2])<<2)|0,c=p+8|0,l=v+8|0,f=y+8|0,h=E+4|0,k=0,_=n,r=-1;e:for(;;){if(e=b+((Q=(0|_)%6|0)<<4)|0,i[E>>2]=i[e>>2],i[E+4>>2]=i[e+4>>2],i[E+8>>2]=i[e+8>>2],i[E+12>>2]=i[e+12>>2],e=k,k=0|Ee(E,s,0,1),(0|_)>(0|n)&0!=(0|Pe(t))&&(1!=(0|e)&&(0|i[E>>2])!=(0|r))){switch(V(b+(((Q+5|0)%6|0)<<4)+4|0,C),V(b+(Q<<4)+4|0,d),x=+(0|i[A>>2]),a[p>>3]=3*x,a[c>>3]=0,O=-1.5*x,a[v>>3]=O,a[l>>3]=2.598076211353316*x,a[y>>3]=O,a[f>>3]=-2.598076211353316*x,Q=0|i[I>>2],0|i[17008+(80*Q|0)+(((0|r)==(0|Q)?0|i[E>>2]:r)<<2)>>2]){case 1:e=v,r=p;break;case 3:e=y,r=v;break;case 2:e=p,r=y;break;default:e=8;break e}ot(C,d,r,e,m),0|st(C,m)||0|st(d,m)||(ye(m,0|i[I>>2],s,1,o+8+(i[o>>2]<<4)|0),i[o>>2]=1+(0|i[o>>2]))}if((0|_)<(0|u)&&(V(h,C),ye(C,0|i[E>>2],s,1,o+8+(i[o>>2]<<4)|0),i[o>>2]=1+(0|i[o>>2])),(0|(_=_+1|0))>=(0|g)){e=3;break}r=0|i[E>>2]}3!=(0|e)?8==(0|e)&&B(22557,22521,746,22602):S=w}}function we(e,t,n){e|=0,t|=0,n|=0;var r,a=0,o=0,s=0,u=0,A=0;r=S,S=S+160|0,o=r,u=20336,A=(s=a=r+80|0)+72|0;do{i[s>>2]=i[u>>2],s=s+4|0,u=u+4|0}while((0|s)<(0|A));u=20416,A=(s=o)+72|0;do{i[s>>2]=i[u>>2],s=s+4|0,u=u+4|0}while((0|s)<(0|A));a=(A=0==(0|Pe(0|i[t>>2])))?a:o,ce(o=e+4|0),le(o),0|Pe(0|i[t>>2])&&(ie(o),i[t>>2]=1+(0|i[t>>2])),i[n>>2]=i[e>>2],X(o,a,t=n+4|0),W(t),i[n+16>>2]=i[e>>2],X(o,a+12|0,t=n+20|0),W(t),i[n+32>>2]=i[e>>2],X(o,a+24|0,t=n+36|0),W(t),i[n+48>>2]=i[e>>2],X(o,a+36|0,t=n+52|0),W(t),i[n+64>>2]=i[e>>2],X(o,a+48|0,t=n+68|0),W(t),i[n+80>>2]=i[e>>2],X(o,a+60|0,n=n+84|0),W(n),S=r}function Qe(e){var t;return t=(e=+e)<0?e+6.283185307179586:e,+(e>=6.283185307179586?t+-6.283185307179586:t)}function ke(e,t){return t|=0,+u(+(+a[(e|=0)>>3]-+a[t>>3]))<17453292519943298e-27?0|(t=+u(+(+a[e+8>>3]-+a[t+8>>3]))<17453292519943298e-27):0|(t=0)}function _e(e,t){e|=0;var n,r,i,o=0;return r=+a[(t|=0)>>3],n=+a[e>>3],o=(i=+f(.5*(r-n)))*i+(o=+f(.5*(+a[t+8>>3]-+a[e+8>>3])))*(+l(+r)*+l(+n)*o),2*+v(+ +A(+o),+ +A(+(1-o)))*6371.007180918475}function xe(e,t,n){e|=0,n|=0;var r,i,o,s,u=0,c=0,g=0,d=0,y=0,m=0;return m=+a[(t|=0)>>3],o=+a[e>>3],y=+f(.5*(m-o)),g=+a[t+8>>3],i=+a[e+8>>3],d=+f(.5*(g-i)),r=+l(+o),s=+l(+m),d=2*+v(+ +A(+(d=y*y+d*(s*r*d))),+ +A(+(1-d))),y=+a[n>>3],m=+f(.5*(y-m)),u=+a[n+8>>3],g=+f(.5*(u-g)),c=+l(+y),g=2*+v(+ +A(+(g=m*m+g*(s*c*g))),+ +A(+(1-g))),y=+f(.5*(o-y)),u=+f(.5*(i-u)),u=2*+v(+ +A(+(u=y*y+u*(r*c*u))),+ +A(+(1-u))),4*+p(+ +A(+ +h(.5*(c=.5*(d+g+u)))*+h(.5*(c-d))*+h(.5*(c-g))*+h(.5*(c-u))))}function Se(e,t){return t=0|Bt(0|(e|=0),0|(t|=0),45),C(),127&t|0}function Oe(e,t){var n=0,r=0,i=0,a=0,o=0,s=0;if(!(!0&134217728==(-16777216&(t|=0)|0)))return 0|(t=0);if(o=0|Bt(0|(e|=0),0|t,45),C(),(o&=127)>>>0>121)return 0|(t=0);n=0|Bt(0|e,0|t,52),C(),n&=15;do{if(0|n){for(i=1,r=0;;){if(a=0|Bt(0|e,0|t,3*(15-i|0)|0),C(),0!=(0|(a&=7))&(1^r)){if(1==(0|a)&0!=(0|N(o))){s=0,r=13;break}r=1}if(7==(0|a)){s=0,r=13;break}if(!(i>>>0<n>>>0)){r=9;break}i=i+1|0}if(9==(0|r)){if(15!=(0|n))break;return 0|(s=1)}if(13==(0|r))return 0|s}}while(0);for(;;){if(s=0|Bt(0|e,0|t,3*(14-n|0)|0),C(),!(7==(7&s|0)&!0)){s=0,r=13;break}if(!(n>>>0<14)){s=1,r=13;break}n=n+1|0}return 13==(0|r)?0|s:0}function De(e,t,n){n|=0;var r=0,i=0;if(r=0|Bt(0|(e|=0),0|(t|=0),52),C(),(0|(r&=15))>=(0|n)){if((0|r)!=(0|n))if(n>>>0<=15){if(e|=i=0|wt(0|n,0,52),t=0|C()|-15728641&t,(0|r)>(0|n))do{i=0|wt(7,0,3*(14-n|0)|0),n=n+1|0,e|=i,t=0|C()|t}while((0|n)<(0|r))}else t=0,e=0}else t=0,e=0;return E(0|t),0|e}function Re(e,t,n,r){n|=0,r|=0;var a,o=0,s=0,u=0,A=0,c=0,l=0;if(u=0|Bt(0|(e|=0),0|(t|=0),52),C(),(0|n)<16&(0|(u&=15))<=(0|n)){if((0|u)==(0|n))return i[(n=r)>>2]=e,void(i[n+4>>2]=t);if(a=(0|(c=0|tt(7,n-u|0)))/7|0,A=0|Bt(0|e,0|t,45),C(),0|N(127&A)){e:do{if(u)for(s=1;;){if(o=0|Bt(0|e,0|t,3*(15-s|0)|0),C(),0|(o&=7))break e;if(!(s>>>0<u>>>0)){o=0;break}s=s+1|0}else o=0}while(0);s=0==(0|o)}else s=0;if(l=0|wt(u+1|0,0,52),o=0|C()|-15728641&t,Re(t=(l|e)&~(t=0|wt(7,0,0|(A=3*(14-u|0)|0))),u=o&~(0|C()),n,r),o=r+(a<<3)|0,!s)return Re((l=0|wt(1,0,0|A))|t,0|C()|u,n,o),l=o+(a<<3)|0,Re((c=0|wt(2,0,0|A))|t,0|C()|u,n,l),l=l+(a<<3)|0,Re((c=0|wt(3,0,0|A))|t,0|C()|u,n,l),l=l+(a<<3)|0,Re((c=0|wt(4,0,0|A))|t,0|C()|u,n,l),l=l+(a<<3)|0,Re((c=0|wt(5,0,0|A))|t,0|C()|u,n,l),void Re((c=0|wt(6,0,0|A))|t,0|C()|u,n,l+(a<<3)|0);s=o+(a<<3)|0,(0|c)>6&&(xt(0|o,0,(l=(s>>>0>(c=o+8|0)>>>0?s:c)+-1+(0-o)|0)+8&-8|0),o=c+(l>>>3<<3)|0),Re((l=0|wt(2,0,0|A))|t,0|C()|u,n,o),l=o+(a<<3)|0,Re((c=0|wt(3,0,0|A))|t,0|C()|u,n,l),l=l+(a<<3)|0,Re((c=0|wt(4,0,0|A))|t,0|C()|u,n,l),l=l+(a<<3)|0,Re((c=0|wt(5,0,0|A))|t,0|C()|u,n,l),Re((c=0|wt(6,0,0|A))|t,0|C()|u,n,l+(a<<3)|0)}}function je(e,t){var n=0,r=0,i=0;if(i=0|Bt(0|(e|=0),0|(t|=0),45),C(),!(0|N(127&i)))return 0|(i=0);i=0|Bt(0|e,0|t,52),C(),i&=15;e:do{if(i)for(r=1;;){if(n=0|Bt(0|e,0|t,3*(15-r|0)|0),C(),0|(n&=7))break e;if(!(r>>>0<i>>>0)){n=0;break}r=r+1|0}else n=0}while(0);return 0|(i=0==(0|n)&1)}function Me(e,t){var n=0,r=0,i=0;if(i=0|Bt(0|(e|=0),0|(t|=0),52),C(),!(i&=15))return 0|(i=0);for(r=1;;){if(n=0|Bt(0|e,0|t,3*(15-r|0)|0),C(),0|(n&=7)){r=5;break}if(!(r>>>0<i>>>0)){n=0,r=5;break}r=r+1|0}return 5==(0|r)?0|n:0}function Ne(e,t){var n=0,r=0,i=0,a=0,o=0,s=0,u=0;if(u=0|Bt(0|(e|=0),0|(t|=0),52),C(),!(u&=15))return u=e,E(0|(s=t)),0|u;for(s=1,n=0;;){r=0|wt(7,0,0|(a=3*(15-s|0)|0)),i=0|C(),o=0|Bt(0|e,0|t,0|a),C(),e=(a=0|wt(0|ue(7&o),0,0|a))|e&~r,t=(o=0|C())|t&~i;e:do{if(!n)if(0==(a&r|0)&0==(o&i|0))n=0;else if(r=0|Bt(0|e,0|t,52),C(),r&=15){n=1;t:for(;;){switch(o=0|Bt(0|e,0|t,3*(15-n|0)|0),C(),7&o){case 1:break t;case 0:break;default:n=1;break e}if(!(n>>>0<r>>>0)){n=1;break e}n=n+1|0}for(n=1;;){if(i=0|Bt(0|e,0|t,0|(o=3*(15-n|0)|0)),C(),a=0|wt(7,0,0|o),t&=~(0|C()),e=e&~a|(o=0|wt(0|ue(7&i),0,0|o)),t=0|t|C(),!(n>>>0<r>>>0)){n=1;break}n=n+1|0}}else n=1}while(0);if(!(s>>>0<u>>>0))break;s=s+1|0}return E(0|t),0|e}function Fe(e,t){var n=0,r=0,i=0,a=0,o=0;if(r=0|Bt(0|(e|=0),0|(t|=0),52),C(),!(r&=15))return r=e,E(0|(n=t)),0|r;for(n=1;o=0|Bt(0|e,0|t,0|(a=3*(15-n|0)|0)),C(),i=0|wt(7,0,0|a),t&=~(0|C()),e=(a=0|wt(0|ue(7&o),0,0|a))|e&~i,t=0|C()|t,n>>>0<r>>>0;)n=n+1|0;return E(0|t),0|e}function Te(e,t){var n=0,r=0,i=0,a=0,o=0,s=0,u=0;if(u=0|Bt(0|(e|=0),0|(t|=0),52),C(),!(u&=15))return u=e,E(0|(s=t)),0|u;for(s=1,n=0;;){r=0|wt(7,0,0|(a=3*(15-s|0)|0)),i=0|C(),o=0|Bt(0|e,0|t,0|a),C(),e=(a=0|wt(0|Ae(7&o),0,0|a))|e&~r,t=(o=0|C())|t&~i;e:do{if(!n)if(0==(a&r|0)&0==(o&i|0))n=0;else if(r=0|Bt(0|e,0|t,52),C(),r&=15){n=1;t:for(;;){switch(o=0|Bt(0|e,0|t,3*(15-n|0)|0),C(),7&o){case 1:break t;case 0:break;default:n=1;break e}if(!(n>>>0<r>>>0)){n=1;break e}n=n+1|0}for(n=1;;){if(a=0|wt(7,0,0|(i=3*(15-n|0)|0)),o=t&~(0|C()),t=0|Bt(0|e,0|t,0|i),C(),e=e&~a|(t=0|wt(0|Ae(7&t),0,0|i)),t=0|o|C(),!(n>>>0<r>>>0)){n=1;break}n=n+1|0}}else n=1}while(0);if(!(s>>>0<u>>>0))break;s=s+1|0}return E(0|t),0|e}function Le(e,t){var n=0,r=0,i=0,a=0,o=0;if(r=0|Bt(0|(e|=0),0|(t|=0),52),C(),!(r&=15))return r=e,E(0|(n=t)),0|r;for(n=1;a=0|wt(7,0,0|(o=3*(15-n|0)|0)),i=t&~(0|C()),t=0|Bt(0|e,0|t,0|o),C(),e=(t=0|wt(0|Ae(7&t),0,0|o))|e&~a,t=0|C()|i,n>>>0<r>>>0;)n=n+1|0;return E(0|t),0|e}function Pe(e){return 0|(0|(e|=0))%2}function Ue(e,t){e|=0;var n,r;return r=S,S=S+16|0,n=r,(t|=0)>>>0<=15&&2146435072!=(2146435072&i[e+4>>2]|0)&&2146435072!=(2146435072&i[e+8+4>>2]|0)?(!function(e,t,n){var r,i;r=S,S=S+16|0,ve(e|=0,t|=0,n|=0,i=r),K(i,n+4|0),S=r}(e,t,n),t=0|function(e,t){e|=0;var n,r=0,a=0,o=0,s=0,u=0,A=0,c=0,l=0;if(n=S,S=S+64|0,A=n+40|0,a=n+24|0,o=n+12|0,s=n,wt(0|(t|=0),0,52),r=134225919|C(),!t)return(0|i[e+4>>2])>2||(0|i[e+8>>2])>2||(0|i[e+12>>2])>2?(A=0,E(0|(u=0)),S=n,0|A):(wt(0|T(e),0,45),u=0|C()|r,A=-1,E(0|u),S=n,0|A);if(i[A>>2]=i[e>>2],i[A+4>>2]=i[e+4>>2],i[A+8>>2]=i[e+8>>2],i[A+12>>2]=i[e+12>>2],u=A+4|0,(0|t)>0)for(e=-1;i[a>>2]=i[u>>2],i[a+4>>2]=i[u+4>>2],i[a+8>>2]=i[u+8>>2],1&t?(te(u),i[o>>2]=i[u>>2],i[o+4>>2]=i[u+4>>2],i[o+8>>2]=i[u+8>>2],re(o)):(ne(u),i[o>>2]=i[u>>2],i[o+4>>2]=i[u+4>>2],i[o+8>>2]=i[u+8>>2],ie(o)),Z(a,o,s),W(s),c=0|wt(7,0,0|(l=3*(15-t|0)|0)),r&=~(0|C()),e=(l=0|wt(0|ee(s),0,0|l))|e&~c,r=0|C()|r,(0|t)>1;)t=t+-1|0;else e=-1;e:do{if((0|i[u>>2])<=2&&(0|i[A+8>>2])<=2&&(0|i[A+12>>2])<=2){if(t=0|wt(0|(a=0|T(A)),0,45),t|=e,e=0|C()|-1040385&r,s=0|L(A),!(0|N(a))){if((0|s)<=0)break;for(o=0;;){if(a=0|Bt(0|t,0|e,52),C(),a&=15)for(r=1;A=0|Bt(0|t,0|e,0|(l=3*(15-r|0)|0)),C(),c=0|wt(7,0,0|l),e&=~(0|C()),t=t&~c|(l=0|wt(0|ue(7&A),0,0|l)),e=0|e|C(),r>>>0<a>>>0;)r=r+1|0;if((0|(o=o+1|0))==(0|s))break e}}o=0|Bt(0|t,0|e,52),C(),o&=15;t:do{if(o){r=1;n:for(;;){switch(l=0|Bt(0|t,0|e,3*(15-r|0)|0),C(),7&l){case 1:break n;case 0:break;default:break t}if(!(r>>>0<o>>>0))break t;r=r+1|0}if(0|P(a,0|i[A>>2]))for(r=1;c=0|wt(7,0,0|(A=3*(15-r|0)|0)),l=e&~(0|C()),e=0|Bt(0|t,0|e,0|A),C(),t=t&~c|(e=0|wt(0|Ae(7&e),0,0|A)),e=0|l|C(),r>>>0<o>>>0;)r=r+1|0;else for(r=1;A=0|Bt(0|t,0|e,0|(l=3*(15-r|0)|0)),C(),c=0|wt(7,0,0|l),e&=~(0|C()),t=t&~c|(l=0|wt(0|ue(7&A),0,0|l)),e=0|e|C(),r>>>0<o>>>0;)r=r+1|0}}while(0);if((0|s)>0){r=0;do{t=0|Ne(t,e),e=0|C(),r=r+1|0}while((0|r)!=(0|s))}}else t=0,e=0}while(0);return l=t,E(0|(c=e)),S=n,0|l}(n,t),e=0|C()):(e=0,t=0),E(0|e),S=r,0|t}function Ge(e,t,n){var r,a=0,o=0,s=0;if(r=(n|=0)+4|0,o=0|Bt(0|(e|=0),0|(t|=0),52),C(),o&=15,s=0|Bt(0|e,0|t,45),C(),a=0==(0|o),0|N(127&s)){if(a)return 0|(s=1);a=1}else{if(a)return 0|(s=0);a=0==(0|i[r>>2])&&0==(0|i[n+8>>2])?0!=(0|i[n+12>>2])&1:1}for(n=1;1&n?re(r):ie(r),s=0|Bt(0|e,0|t,3*(15-n|0)|0),C(),ae(r,7&s),n>>>0<o>>>0;)n=n+1|0;return 0|a}function qe(e,t,n){n|=0;var r,a,o=0,s=0,u=0,A=0,c=0,l=0;a=S,S=S+16|0,r=a,l=0|Bt(0|(e|=0),0|(t|=0),45),C(),l&=127;e:do{if(0!=(0|N(l))&&(u=0|Bt(0|e,0|t,52),C(),0!=(0|(u&=15)))){o=1;t:for(;;){switch(c=0|Bt(0|e,0|t,3*(15-o|0)|0),C(),7&c){case 5:break t;case 0:break;default:o=t;break e}if(!(o>>>0<u>>>0)){o=t;break e}o=o+1|0}for(s=1,o=t;A=0|wt(7,0,0|(t=3*(15-s|0)|0)),c=o&~(0|C()),o=0|Bt(0|e,0|o,0|t),C(),e=e&~A|(o=0|wt(0|Ae(7&o),0,0|t)),o=0|c|C(),s>>>0<u>>>0;)s=s+1|0}else o=t}while(0);if(c=7728+(28*l|0)|0,i[n>>2]=i[c>>2],i[n+4>>2]=i[c+4>>2],i[n+8>>2]=i[c+8>>2],i[n+12>>2]=i[c+12>>2],0|Ge(e,o,n)){if(A=n+4|0,i[r>>2]=i[A>>2],i[r+4>>2]=i[A+4>>2],i[r+8>>2]=i[A+8>>2],u=0|Bt(0|e,0|o,52),C(),c=15&u,1&u?(ie(A),u=c+1|0):u=c,0|N(l)){e:do{if(c)for(t=1;;){if(s=0|Bt(0|e,0|o,3*(15-t|0)|0),C(),0|(s&=7)){o=s;break e}if(!(t>>>0<c>>>0)){o=0;break}t=t+1|0}else o=0}while(0);o=4==(0|o)&1}else o=0;if(0|Ee(n,u,o,0)){if(0|N(l))do{}while(0!=(0|Ee(n,u,0,0)));(0|u)!=(0|c)&&ne(A)}else(0|u)!=(0|c)&&(i[A>>2]=i[r>>2],i[A+4>>2]=i[r+4>>2],i[A+8>>2]=i[r+8>>2]);S=a}else S=a}function He(e,t,n){n|=0;var r,i;r=S,S=S+16|0,qe(e|=0,t|=0,i=r),t=0|Bt(0|e,0|t,52),C(),me(i,15&t,n),S=r}function Ye(e,t,n){n|=0;var r,i,a=0,o=0;i=S,S=S+16|0,qe(e|=0,t|=0,r=i),a=0|Bt(0|e,0|t,45),C(),a=0==(0|N(127&a)),o=0|Bt(0|e,0|t,52),C(),o&=15;e:do{if(!a){if(0|o)for(a=1;;){if(!(0==((0|wt(7,0,3*(15-a|0)|0))&e|0)&0==((0|C())&t|0)))break e;if(!(a>>>0<o>>>0))break;a=a+1|0}return Ie(r,o,0,5,n),void(S=i)}}while(0);Be(r,o,0,6,n),S=i}function Je(e,t){t|=0;var n,r=0,a=0,o=0,s=0,u=0,A=0;if(wt(0|(e|=0),0,52),n=134225919|C(),(0|e)<1){a=0,r=0;do{0|N(a)&&(wt(0|a,0,45),u=0|n|C(),i[(e=t+(r<<3)|0)>>2]=-1,i[e+4>>2]=u,r=r+1|0),a=a+1|0}while(122!=(0|a))}else{u=0,r=0;do{if(0|N(u)){for(wt(0|u,0,45),a=1,o=-1,s=0|n|C();o&=~(A=0|wt(7,0,3*(15-a|0)|0)),s&=~(0|C()),(0|a)!=(0|e);)a=a+1|0;i[(A=t+(r<<3)|0)>>2]=o,i[A+4>>2]=s,r=r+1|0}u=u+1|0}while(122!=(0|u))}}function ze(e,t,n,r){var a,o=0,s=0,u=0,A=0,c=0;if(a=S,S=S+64|0,u=a,(0|(e|=0))==(0|(n|=0))&(0|(t|=0))==(0|(r|=0))|!1|134217728!=(2013265920&t|0)|!1|134217728!=(2013265920&r|0))return S=a,0|(u=0);if(o=0|Bt(0|e,0|t,52),C(),o&=15,s=0|Bt(0|n,0|r,52),C(),(0|o)!=(15&s|0))return S=a,0|(u=0);if(s=o+-1|0,o>>>0>1&&(c=0|De(e,t,s),A=0|C(),(0|c)==(0|(s=0|De(n,r,s)))&(0|A)==(0|C()))){if(o=0|Bt(0|e,0|t,0|(s=3*(15^o)|0)),C(),o&=7,s=0|Bt(0|n,0|r,0|s),C(),0==(0|o)|0==(0|(s&=7)))return S=a,0|(c=1);if((0|i[21136+(o<<2)>>2])==(0|s))return S=a,0|(c=1);if((0|i[21168+(o<<2)>>2])==(0|s))return S=a,0|(c=1)}s=(o=u)+56|0;do{i[o>>2]=0,o=o+4|0}while((0|o)<(0|s));return O(e,t,1,u),o=(0|i[(c=u)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=u+8|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=u+16|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=u+24|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=u+32|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)||(0|i[(c=u+40|0)>>2])==(0|n)&&(0|i[c+4>>2])==(0|r)?1:1&((0|i[(o=u+48|0)>>2])==(0|n)?(0|i[o+4>>2])==(0|r):0),S=a,0|(c=o)}function Ke(e,t,n){n|=0;var r,a,o,s,u=0;if(o=S,S=S+16|0,a=o,u=0|Bt(0|(e|=0),0|(t|=0),56),C(),-1==(0|(t=0|function(e,t,n){n|=0;var r,a=0;if(a=0|je(e=e|0,t=t|0),(n+-1|0)>>>0>5)return 0|(n=-1);if(1==(0|n)&(r=0!=(0|a)))return 0|(n=-1);return a=0|function(e,t){var n,r,a,o=0,s=0,u=0,A=0,c=0;if(a=S,S=S+32|0,r=a,qe(e=e|0,t=t|0,n=a+16|0),u=0|Se(e,t),c=0|Me(e,t),function(e,t){e=7728+(28*(e|=0)|0)|0,i[(t|=0)>>2]=i[e>>2],i[t+4>>2]=i[e+4>>2],i[t+8>>2]=i[e+8>>2],i[t+12>>2]=i[e+12>>2]}(u,r),t=0|function(e,t){e|=0;var n=0,r=0;if((t|=0)>>>0>20)return 0|(t=-1);do{if((0|i[11152+(216*t|0)>>2])!=(0|e))if((0|i[11152+(216*t|0)+8>>2])!=(0|e))if((0|i[11152+(216*t|0)+16>>2])!=(0|e))if((0|i[11152+(216*t|0)+24>>2])!=(0|e))if((0|i[11152+(216*t|0)+32>>2])!=(0|e))if((0|i[11152+(216*t|0)+40>>2])!=(0|e))if((0|i[11152+(216*t|0)+48>>2])!=(0|e))if((0|i[11152+(216*t|0)+56>>2])!=(0|e))if((0|i[11152+(216*t|0)+64>>2])!=(0|e))if((0|i[11152+(216*t|0)+72>>2])!=(0|e))if((0|i[11152+(216*t|0)+80>>2])!=(0|e))if((0|i[11152+(216*t|0)+88>>2])!=(0|e))if((0|i[11152+(216*t|0)+96>>2])!=(0|e))if((0|i[11152+(216*t|0)+104>>2])!=(0|e))if((0|i[11152+(216*t|0)+112>>2])!=(0|e))if((0|i[11152+(216*t|0)+120>>2])!=(0|e))if((0|i[11152+(216*t|0)+128>>2])!=(0|e)){if((0|i[11152+(216*t|0)+136>>2])!=(0|e)){if((0|i[11152+(216*t|0)+144>>2])==(0|e)){e=0,n=2,r=0;break}if((0|i[11152+(216*t|0)+152>>2])==(0|e)){e=0,n=2,r=1;break}if((0|i[11152+(216*t|0)+160>>2])==(0|e)){e=0,n=2,r=2;break}if((0|i[11152+(216*t|0)+168>>2])==(0|e)){e=1,n=2,r=0;break}if((0|i[11152+(216*t|0)+176>>2])==(0|e)){e=1,n=2,r=1;break}if((0|i[11152+(216*t|0)+184>>2])==(0|e)){e=1,n=2,r=2;break}if((0|i[11152+(216*t|0)+192>>2])==(0|e)){e=2,n=2,r=0;break}if((0|i[11152+(216*t|0)+200>>2])==(0|e)){e=2,n=2,r=1;break}if((0|i[11152+(216*t|0)+208>>2])==(0|e)){e=2,n=2,r=2;break}return 0|(e=-1)}e=2,n=1,r=2}else e=2,n=1,r=1;else e=2,n=1,r=0;else e=1,n=1,r=2;else e=1,n=1,r=1;else e=1,n=1,r=0;else e=0,n=1,r=2;else e=0,n=1,r=1;else e=0,n=1,r=0;else e=2,n=0,r=2;else e=2,n=0,r=1;else e=2,n=0,r=0;else e=1,n=0,r=2;else e=1,n=0,r=1;else e=1,n=0,r=0;else e=0,n=0,r=2;else e=0,n=0,r=1;else e=0,n=0,r=0}while(0);return 0|(t=0|i[11152+(216*t|0)+(72*n|0)+(24*e|0)+(r<<3)+4>>2])}(u,0|i[n>>2]),!(0|N(u)))return S=a,0|(c=t);switch(0|u){case 4:e=0,o=14;break;case 14:e=1,o=14;break;case 24:e=2,o=14;break;case 38:e=3,o=14;break;case 49:e=4,o=14;break;case 58:e=5,o=14;break;case 63:e=6,o=14;break;case 72:e=7,o=14;break;case 83:e=8,o=14;break;case 97:e=9,o=14;break;case 107:e=10,o=14;break;case 117:e=11,o=14;break;default:A=0,s=0}14==(0|o)&&(A=0|i[22096+(24*e|0)+8>>2],s=0|i[22096+(24*e|0)+16>>2]);(0|(e=0|i[n>>2]))!=(0|i[r>>2])&&(u=0|F(u),e=0|i[n>>2],u|(0|e)==(0|s)&&(t=(t+1|0)%6|0));if(3==(0|c)&(0|e)==(0|s))return S=a,0|(c=(t+5|0)%6|0);if(!(5==(0|c)&(0|e)==(0|A)))return S=a,0|(c=t);return S=a,0|(c=(t+1|0)%6|0)}(e,t),r?0|(n=(5-a+(0|i[22384+(n<<2)>>2])|0)%5|0):0|(n=(6-a+(0|i[22416+(n<<2)>>2])|0)%6|0)}(r=(s=!0&268435456==(2013265920&t|0))?e:0,e=s?-2130706433&t|134217728:0,7&u))))return i[n>>2]=0,void(S=o);qe(r,e,a),u=0|Bt(0|r,0|e,52),C(),u&=15,0|je(r,e)?Ie(a,u,t,2,n):Be(a,u,t,2,n),S=o}function We(e){e|=0;var t,n,r=0;return(t=0|mt(1,12))||B(22691,22646,49,22704),0|(r=0|i[(n=e+4|0)>>2])?(i[(r=r+8|0)>>2]=t,i[n>>2]=t,0|t):(0|i[e>>2]&&B(22721,22646,61,22744),i[(r=e)>>2]=t,i[n>>2]=t,0|t)}function Ve(e,t){e|=0,t|=0;var n,r;return(r=0|vt(24))||B(22758,22646,78,22772),i[r>>2]=i[t>>2],i[r+4>>2]=i[t+4>>2],i[r+8>>2]=i[t+8>>2],i[r+12>>2]=i[t+12>>2],i[r+16>>2]=0,0|(n=0|i[(t=e+4|0)>>2])?(i[n+16>>2]=r,i[t>>2]=r,0|r):(0|i[e>>2]&&B(22787,22646,82,22772),i[e>>2]=r,i[t>>2]=r,0|r)}function Xe(e){var t,n,r=0,o=0,s=0,A=0,c=0,l=0,f=0,h=0,g=0,d=0,p=0,v=0,y=0,m=0,I=0,b=0,E=0,C=0,w=0,Q=0,k=0,_=0,x=0,S=0,O=0,D=0,R=0,j=0,M=0,N=0;if(0|i[(A=(e|=0)+8|0)>>2])return 0|(N=1);if(!(s=0|i[e>>2]))return 0|(N=0);r=s,o=0;do{o=o+1|0,r=0|i[r+8>>2]}while(0!=(0|r));if(o>>>0<2)return 0|(N=0);(n=0|vt(o<<2))||B(22807,22646,317,22826),(t=0|vt(o<<5))||B(22848,22646,321,22826),i[e>>2]=0,i[(_=e+4|0)>>2]=0,i[A>>2]=0,o=0,j=0,k=0,p=0;e:for(;;){if(d=0|i[s>>2]){c=0,l=d;do{if(h=+a[l+8>>3],r=l,l=0|i[l+16>>2],f=+a[(A=(g=0==(0|l))?d:l)+8>>3],+u(+(h-f))>3.141592653589793){N=14;break}c+=(f-h)*(+a[r>>3]+ +a[A>>3])}while(!g);if(14==(0|N)){N=0,c=0,r=d;do{Q=+a[r+8>>3],D=0|i[(R=r+16|0)>>2],w=+a[(D=0==(0|D)?d:D)+8>>3],c+=(+a[r>>3]+ +a[D>>3])*((w<0?w+6.283185307179586:w)-(Q<0?Q+6.283185307179586:Q)),r=0|i[(0==(0|r)?s:R)>>2]}while(0!=(0|r))}c>0?(i[n+(j<<2)>>2]=s,j=j+1|0,A=k,r=p):N=19}else N=19;if(19==(0|N)){N=0;do{if(!o){if(p){A=_,l=p+8|0,r=s,o=e;break}if(0|i[e>>2]){N=27;break e}A=_,l=e,r=s,o=e;break}if(0|i[(r=o+8|0)>>2]){N=21;break e}if(!(o=0|mt(1,12))){N=23;break e}i[r>>2]=o,A=o+4|0,l=o,r=p}while(0);if(i[l>>2]=s,i[A>>2]=s,l=t+(k<<5)|0,g=0|i[s>>2]){for(a[(d=t+(k<<5)+8|0)>>3]=17976931348623157e292,a[(p=t+(k<<5)+24|0)>>3]=17976931348623157e292,a[l>>3]=-17976931348623157e292,a[(v=t+(k<<5)+16|0)>>3]=-17976931348623157e292,E=17976931348623157e292,C=-17976931348623157e292,A=0,y=g,h=17976931348623157e292,I=17976931348623157e292,b=-17976931348623157e292,f=-17976931348623157e292;c=+a[y>>3],Q=+a[y+8>>3],y=0|i[y+16>>2],w=+a[((m=0==(0|y))?g:y)+8>>3],c<h&&(a[d>>3]=c,h=c),Q<I&&(a[p>>3]=Q,I=Q),c>b?a[l>>3]=c:c=b,Q>f&&(a[v>>3]=Q,f=Q),E=Q>0&Q<E?Q:E,C=Q<0&Q>C?Q:C,A|=+u(+(Q-w))>3.141592653589793,!m;)b=c;A&&(a[v>>3]=C,a[p>>3]=E)}else i[l>>2]=0,i[l+4>>2]=0,i[l+8>>2]=0,i[l+12>>2]=0,i[l+16>>2]=0,i[l+20>>2]=0,i[l+24>>2]=0,i[l+28>>2]=0;A=k+1|0}if(s=0|i[(R=s+8|0)>>2],i[R>>2]=0,!s){N=45;break}k=A,p=r}if(21==(0|N))B(22624,22646,35,22658);else if(23==(0|N))B(22678,22646,37,22658);else if(27==(0|N))B(22721,22646,61,22744);else if(45==(0|N)){e:do{if((0|j)>0){for(R=0==(0|A),O=A<<2,D=0==(0|e),S=0,r=0;;){if(x=0|i[n+(S<<2)>>2],R)N=73;else{if(!(k=0|vt(O))){N=50;break}if(!(_=0|vt(O))){N=52;break}t:do{if(D)o=0;else{for(A=0,o=0,l=e;s=t+(A<<5)|0,0|Ze(0|i[l>>2],s,0|i[x>>2])?(i[k+(o<<2)>>2]=l,i[_+(o<<2)>>2]=s,m=o+1|0):m=o,l=0|i[l+8>>2];)A=A+1|0,o=m;if((0|m)>0)if(s=0|i[k>>2],1==(0|m))o=s;else for(v=0,y=-1,o=s,p=s;;){for(g=0|i[p>>2],s=0,l=0;d=(0|(A=0|i[i[k+(l<<2)>>2]>>2]))==(0|g)?s:s+(1&(0|Ze(A,0|i[_+(l<<2)>>2],0|i[g>>2])))|0,(0|(l=l+1|0))!=(0|m);)s=d;if(o=(A=(0|d)>(0|y))?p:o,(0|(s=v+1|0))==(0|m))break t;v=s,y=A?d:y,p=0|i[k+(s<<2)>>2]}else o=0}}while(0);if(yt(k),yt(_),o){if(s=0|i[(A=o+4|0)>>2])o=s+8|0;else if(0|i[o>>2]){N=70;break}i[o>>2]=x,i[A>>2]=x}else N=73}if(73==(0|N)){if(N=0,0|(r=0|i[x>>2]))do{_=r,r=0|i[r+16>>2],yt(_)}while(0!=(0|r));yt(x),r=2}if((0|(S=S+1|0))>=(0|j)){M=r;break e}}50==(0|N)?B(22863,22646,249,22882):52==(0|N)?B(22901,22646,252,22882):70==(0|N)&&B(22721,22646,61,22744)}else M=0}while(0);return yt(n),yt(t),0|(N=M)}return 0}function Ze(e,t,n){e|=0;var r,o=0,s=0,u=0,A=0,c=0,l=0,f=0;if(!(0|H(t|=0,n|=0)))return 0|(e=0);if(t=0|q(t),r=+a[n>>3],o=t&(o=+a[n+8>>3])<0?o+6.283185307179586:o,!(e=0|i[e>>2]))return 0|(e=0);if(t){t=0,n=e;e:for(;;){for(;A=+a[n>>3],l=+a[n+8>>3],f=0|i[(n=n+16|0)>>2],u=+a[(f=0==(0|f)?e:f)>>3],s=+a[f+8>>3],A>u?(c=A,A=l):(c=u,u=A,A=s,s=l),r<u|r>c;)if(!(n=0|i[n>>2])){n=22;break e}if(o=(A=A<0?A+6.283185307179586:A)==o|(l=s<0?s+6.283185307179586:s)==o?o+-2220446049250313e-31:o,((l+=(r-u)/(c-u)*(A-l))<0?l+6.283185307179586:l)>o&&(t^=1),!(n=0|i[n>>2])){n=22;break}}if(22==(0|n))return 0|t}else{t=0,n=e;e:for(;;){for(;A=+a[n>>3],l=+a[n+8>>3],f=0|i[(n=n+16|0)>>2],u=+a[(f=0==(0|f)?e:f)>>3],s=+a[f+8>>3],A>u?(c=A,A=l):(c=u,u=A,A=s,s=l),r<u|r>c;)if(!(n=0|i[n>>2])){n=22;break e}if(s+(r-u)/(c-u)*(A-s)>(o=A==o|s==o?o+-2220446049250313e-31:o)&&(t^=1),!(n=0|i[n>>2])){n=22;break}}if(22==(0|n))return 0|t}return 0}function $e(e,t,n,a,o){n|=0,a|=0,o|=0;var s,u,A,c,l=0,f=0,h=0,g=0,d=0,p=0,v=0,y=0,m=0,I=0;if(c=S,S=S+32|0,I=c+16|0,A=c,l=0|Bt(0|(e|=0),0|(t|=0),52),C(),l&=15,v=0|Bt(0|n,0|a,52),C(),(0|l)!=(15&v|0))return S=c,0|(I=1);if(d=0|Bt(0|e,0|t,45),C(),d&=127,p=0|Bt(0|n,0|a,45),C(),v=(0|d)!=(0|(p&=127))){if(7==(0|(h=0|G(d,p))))return S=c,0|(I=2);7==(0|(g=0|G(p,d)))?B(22925,22949,151,22959):(y=h,f=g)}else y=0,f=0;s=0|N(d),u=0|N(p),i[I>>2]=0,i[I+4>>2]=0,i[I+8>>2]=0,i[I+12>>2]=0;do{if(y){if(h=(0|(p=0|i[4304+(28*d|0)+(y<<2)>>2]))>0,u)if(h){d=0,g=n,h=a;do{g=0|Te(g,h),h=0|C(),1==(0|(f=0|Ae(f)))&&(f=0|Ae(1)),d=d+1|0}while((0|d)!=(0|p));p=f,d=g,g=h}else p=f,d=n,g=a;else if(h){d=0,g=n,h=a;do{g=0|Le(g,h),h=0|C(),f=0|Ae(f),d=d+1|0}while((0|d)!=(0|p));p=f,d=g,g=h}else p=f,d=n,g=a;if(Ge(d,g,I),v||B(22972,22949,181,22959),(h=0!=(0|s))&(f=0!=(0|u))&&B(22999,22949,182,22959),h){if(f=0|Me(e,t),0|r[22032+(7*f|0)+y>>0]){l=3;break}d=g=0|i[21200+(28*f|0)+(y<<2)>>2],m=26}else if(f){if(f=0|Me(d,g),0|r[22032+(7*f|0)+p>>0]){l=4;break}d=0,g=0|i[21200+(28*p|0)+(f<<2)>>2],m=26}else f=0;if(26==(0|m))if((0|g)<=-1&&B(23030,22949,212,22959),(0|d)<=-1&&B(23053,22949,213,22959),(0|g)>0){h=I+4|0,f=0;do{se(h),f=f+1|0}while((0|f)!=(0|g));f=d}else f=d;if(i[A>>2]=0,i[A+4>>2]=0,i[A+8>>2]=0,ae(A,y),0|l)for(;0|Pe(l)?re(A):ie(A),(0|l)>1;)l=l+-1|0;if((0|f)>0){l=0;do{se(A),l=l+1|0}while((0|l)!=(0|f))}X(m=I+4|0,A,m),W(m),m=50}else if(Ge(n,a,I),0!=(0|s)&0!=(0|u))if((0|p)!=(0|d)&&B(23077,22949,243,22959),f=0|Me(e,t),l=0|Me(n,a),0|r[22032+(7*f|0)+l>>0])l=5;else if((0|(f=0|i[21200+(28*f|0)+(l<<2)>>2]))>0){h=I+4|0,l=0;do{se(h),l=l+1|0}while((0|l)!=(0|f));m=50}else m=50;else m=50}while(0);return 50==(0|m)&&(l=I+4|0,i[o>>2]=i[l>>2],i[o+4>>2]=i[l+4>>2],i[o+8>>2]=i[l+8>>2],l=0),S=c,0|(I=l)}function et(e,t,n,r){n|=0,r|=0;var a,o,s=0,u=0,A=0,c=0,l=0,f=0,h=0,g=0,d=0,p=0,v=0,y=0,m=0;if(o=S,S=S+48|0,A=o+36|0,c=o+24|0,l=o+12|0,f=o,u=0|Bt(0|(e|=0),0|(t|=0),52),C(),u&=15,g=0|Bt(0|e,0|t,45),C(),a=0|N(g&=127),wt(0|u,0,52),v=134225919|C(),i[(p=r)>>2]=-1,i[p+4>>2]=v,!u)return(0|i[n>>2])>1||(0|i[n+4>>2])>1||(0|i[n+8>>2])>1||127==(0|(s=0|U(g,0|ee(n))))?(S=o,0|(v=1)):(d=0|wt(0|s,0,45),p=0|C(),p=-1040385&i[(g=r)+4>>2]|p,i[(v=r)>>2]=i[g>>2]|d,i[v+4>>2]=p,S=o,0|(v=0));for(i[A>>2]=i[n>>2],i[A+4>>2]=i[n+4>>2],i[A+8>>2]=i[n+8>>2];i[c>>2]=i[A>>2],i[c+4>>2]=i[A+4>>2],i[c+8>>2]=i[A+8>>2],0|Pe(u)?(te(A),i[l>>2]=i[A>>2],i[l+4>>2]=i[A+4>>2],i[l+8>>2]=i[A+8>>2],re(l)):(ne(A),i[l>>2]=i[A>>2],i[l+4>>2]=i[A+4>>2],i[l+8>>2]=i[A+8>>2],ie(l)),Z(c,l,f),W(f),y=0|i[(p=r)>>2],p=0|i[p+4>>2],n=0|wt(7,0,0|(m=3*(15-u|0)|0)),p&=~(0|C()),m=0|wt(0|ee(f),0,0|m),p=0|C()|p,i[(v=r)>>2]=m|y&~n,i[v+4>>2]=p,(0|u)>1;)u=u+-1|0;e:do{if((0|i[A>>2])<=1&&(0|i[A+4>>2])<=1&&(0|i[A+8>>2])<=1){f=127==(0|(c=0|U(g,u=0|ee(A))))?0:0|N(c);t:do{if(u){if(a){if(A=21408+(28*(0|Me(e,t))|0)+(u<<2)|0,(0|(A=0|i[A>>2]))>0){n=0;do{u=0|ue(u),n=n+1|0}while((0|n)!=(0|A))}if(1==(0|u)){s=3;break e}127==(0|(n=0|U(g,u)))&&B(23104,22949,376,23134),0|N(n)?B(23147,22949,377,23134):(d=A,h=u,s=n)}else d=0,h=u,s=c;if((0|(l=0|i[4304+(28*g|0)+(h<<2)>>2]))<=-1&&B(23178,22949,384,23134),!f){if((0|d)<=-1&&B(23030,22949,417,23134),0|d){u=0,n=0|i[(A=r)>>2],A=0|i[A+4>>2];do{n=0|Fe(n,A),A=0|C(),i[(m=r)>>2]=n,i[m+4>>2]=A,u=u+1|0}while((0|u)<(0|d))}if((0|l)<=0){u=54;break}for(u=0,n=0|i[(A=r)>>2],A=0|i[A+4>>2];;)if(n=0|Fe(n,A),A=0|C(),i[(m=r)>>2]=n,i[m+4>>2]=A,(0|(u=u+1|0))==(0|l)){u=54;break t}}if(7==(0|(c=0|G(s,g)))&&B(22925,22949,393,23134),n=0|i[(u=r)>>2],u=0|i[u+4>>2],(0|l)>0){A=0;do{n=0|Fe(n,u),u=0|C(),i[(m=r)>>2]=n,i[m+4>>2]=u,A=A+1|0}while((0|A)!=(0|l))}if(n=0|Me(n,u),m=0|F(s),(0|(n=0|i[(m?21824:21616)+(28*c|0)+(n<<2)>>2]))<=-1&&B(23030,22949,412,23134),n){u=0,A=0|i[(c=r)>>2],c=0|i[c+4>>2];do{A=0|Ne(A,c),c=0|C(),i[(m=r)>>2]=A,i[m+4>>2]=c,u=u+1|0}while((0|u)<(0|n));u=54}else u=54}else if(0!=(0|a)&0!=(0|f))if(u=21408+(28*(m=0|Me(e,t))|0)+((0|Me(0|i[(u=r)>>2],0|i[u+4>>2]))<<2)|0,(0|(u=0|i[u>>2]))<=-1&&B(23201,22949,433,23134),u){s=0,n=0|i[(A=r)>>2],A=0|i[A+4>>2];do{n=0|Fe(n,A),A=0|C(),i[(m=r)>>2]=n,i[m+4>>2]=A,s=s+1|0}while((0|s)<(0|u));s=c,u=54}else s=c,u=55;else s=c,u=54}while(0);if(54==(0|u)&&f&&(u=55),55==(0|u)&&1==(0|Me(0|i[(m=r)>>2],0|i[m+4>>2]))){s=4;break}v=0|i[(m=r)>>2],m=-1040385&i[m+4>>2],y=0|wt(0|s,0,45),m=0|m|C(),i[(s=r)>>2]=v|y,i[s+4>>2]=m,s=0}else s=2}while(0);return S=o,0|(m=s)}function tt(e,t){var n=0;if(!(t|=0))return 0|(n=1);n=e|=0,e=1;do{e=0|m(0==(1&t|0)?1:n,e),t>>=1,n=0|m(n,n)}while(0!=(0|t));return 0|e}function nt(e,t,n){e|=0;var r,o,s=0,u=0,A=0,c=0,l=0,f=0,h=0,g=0;if(!(0|H(t|=0,n|=0)))return 0|(g=0);if(t=0|q(t),o=+a[n>>3],s=t&(s=+a[n+8>>3])<0?s+6.283185307179586:s,(0|(g=0|i[e>>2]))<=0)return 0|(g=0);if(r=0|i[e+4>>2],t){t=0,n=-1,e=0;e:for(;;){for(h=e;c=+a[r+(h<<4)>>3],f=+a[r+(h<<4)+8>>3],A=+a[r+((e=(n+2|0)%(0|g)|0)<<4)>>3],u=+a[r+(e<<4)+8>>3],c>A?(l=c,c=f):(l=A,A=c,c=u,u=f),o<A|o>l;){if(!((0|(n=h+1|0))<(0|g))){n=22;break e}e=h,h=n,n=e}if(s=(c=c<0?c+6.283185307179586:c)==s|(f=u<0?u+6.283185307179586:u)==s?s+-2220446049250313e-31:s,((f+=(o-A)/(l-A)*(c-f))<0?f+6.283185307179586:f)>s&&(t^=1),(0|(e=h+1|0))>=(0|g)){n=22;break}n=h}if(22==(0|n))return 0|t}else{t=0,n=-1,e=0;e:for(;;){for(h=e;c=+a[r+(h<<4)>>3],f=+a[r+(h<<4)+8>>3],A=+a[r+((e=(n+2|0)%(0|g)|0)<<4)>>3],u=+a[r+(e<<4)+8>>3],c>A?(l=c,c=f):(l=A,A=c,c=u,u=f),o<A|o>l;){if(!((0|(n=h+1|0))<(0|g))){n=22;break e}e=h,h=n,n=e}if(u+(o-A)/(l-A)*(c-u)>(s=c==s|u==s?s+-2220446049250313e-31:s)&&(t^=1),(0|(e=h+1|0))>=(0|g)){n=22;break}n=h}if(22==(0|n))return 0|t}return 0}function rt(e,t){t|=0;var n,r,o,s,A,c=0,l=0,f=0,h=0,g=0,d=0,p=0,v=0,y=0,m=0,I=0,b=0;if(!(r=0|i[(e|=0)>>2]))return i[t>>2]=0,i[t+4>>2]=0,i[t+8>>2]=0,i[t+12>>2]=0,i[t+16>>2]=0,i[t+20>>2]=0,i[t+24>>2]=0,void(i[t+28>>2]=0);if(a[(o=t+8|0)>>3]=17976931348623157e292,a[(s=t+24|0)>>3]=17976931348623157e292,a[t>>3]=-17976931348623157e292,a[(A=t+16|0)>>3]=-17976931348623157e292,!((0|r)<=0)){for(n=0|i[e+4>>2],v=17976931348623157e292,y=-17976931348623157e292,m=0,e=-1,h=17976931348623157e292,g=17976931348623157e292,p=-17976931348623157e292,l=-17976931348623157e292,I=0;c=+a[n+(I<<4)>>3],d=+a[n+(I<<4)+8>>3],f=+a[n+(((0|(e=e+2|0))==(0|r)?0:e)<<4)+8>>3],c<h&&(a[o>>3]=c,h=c),d<g&&(a[s>>3]=d,g=d),c>p?a[t>>3]=c:c=p,d>l&&(a[A>>3]=d,l=d),v=d>0&d<v?d:v,y=d<0&d>y?d:y,m|=+u(+(d-f))>3.141592653589793,(0|(e=I+1|0))!=(0|r);)b=I,p=c,I=e,e=b;m&&(a[A>>3]=y,a[s>>3]=v)}}function it(e,t){t|=0;var n,r=0,o=0,s=0,A=0,c=0,l=0,f=0,h=0,g=0,d=0,p=0,v=0,y=0,m=0,I=0,b=0,E=0,C=0,B=0,w=0,Q=0;if(y=0|i[(e|=0)>>2]){if(a[(m=t+8|0)>>3]=17976931348623157e292,a[(I=t+24|0)>>3]=17976931348623157e292,a[t>>3]=-17976931348623157e292,a[(b=t+16|0)>>3]=-17976931348623157e292,(0|y)>0){for(s=0|i[e+4>>2],p=17976931348623157e292,v=-17976931348623157e292,o=0,r=-1,f=17976931348623157e292,h=17976931348623157e292,d=-17976931348623157e292,c=-17976931348623157e292,E=0;A=+a[s+(E<<4)>>3],g=+a[s+(E<<4)+8>>3],l=+a[s+(((0|(w=r+2|0))==(0|y)?0:w)<<4)+8>>3],A<f&&(a[m>>3]=A,f=A),g<h&&(a[I>>3]=g,h=g),A>d?a[t>>3]=A:A=d,g>c&&(a[b>>3]=g,c=g),p=g>0&g<p?g:p,v=g<0&g>v?g:v,o|=+u(+(g-l))>3.141592653589793,(0|(r=E+1|0))!=(0|y);)w=E,d=A,E=r,r=w;o&&(a[b>>3]=v,a[I>>3]=p)}}else i[t>>2]=0,i[t+4>>2]=0,i[t+8>>2]=0,i[t+12>>2]=0,i[t+16>>2]=0,i[t+20>>2]=0,i[t+24>>2]=0,i[t+28>>2]=0;if(!((0|(r=0|i[(w=e+8|0)>>2]))<=0)){n=e+12|0,B=0;do{if(s=0|i[n>>2],o=B,I=t+((B=B+1|0)<<5)|0,b=0|i[s+(o<<3)>>2]){if(a[(E=t+(B<<5)+8|0)>>3]=17976931348623157e292,a[(e=t+(B<<5)+24|0)>>3]=17976931348623157e292,a[I>>3]=-17976931348623157e292,a[(C=t+(B<<5)+16|0)>>3]=-17976931348623157e292,(0|b)>0){for(y=0|i[s+(o<<3)+4>>2],p=17976931348623157e292,v=-17976931348623157e292,s=0,o=-1,m=0,f=17976931348623157e292,h=17976931348623157e292,g=-17976931348623157e292,c=-17976931348623157e292;A=+a[y+(m<<4)>>3],d=+a[y+(m<<4)+8>>3],l=+a[y+(((0|(o=o+2|0))==(0|b)?0:o)<<4)+8>>3],A<f&&(a[E>>3]=A,f=A),d<h&&(a[e>>3]=d,h=d),A>g?a[I>>3]=A:A=g,d>c&&(a[C>>3]=d,c=d),p=d>0&d<p?d:p,v=d<0&d>v?d:v,s|=+u(+(d-l))>3.141592653589793,(0|(o=m+1|0))!=(0|b);)Q=m,m=o,g=A,o=Q;s&&(a[C>>3]=v,a[e>>3]=p)}}else i[I>>2]=0,i[I+4>>2]=0,i[I+8>>2]=0,i[I+12>>2]=0,i[I+16>>2]=0,i[I+20>>2]=0,i[I+24>>2]=0,i[I+28>>2]=0,r=0|i[w>>2]}while((0|B)<(0|r))}}function at(e,t,n){var r=0,a=0,o=0;if(!(0|nt(e|=0,t|=0,n|=0)))return 0|(a=0);if((0|i[(a=e+8|0)>>2])<=0)return 0|(a=1);for(r=e+12|0,e=0;;){if(o=e,e=e+1|0,0|nt((0|i[r>>2])+(o<<3)|0,t+(e<<5)|0,n)){e=0,r=6;break}if((0|e)>=(0|i[a>>2])){e=1,r=6;break}}return 6==(0|r)?0|e:0}function ot(e,t,n,r,i){t|=0,n|=0,r|=0,i|=0;var o,s,u,A,c,l,f,h=0;A=+a[(e|=0)>>3],u=+a[t>>3]-A,s=+a[e+8>>3],o=+a[t+8>>3]-s,l=+a[n>>3],h=((h=+a[r>>3]-l)*(s-(f=+a[n+8>>3]))-(A-l)*(c=+a[r+8>>3]-f))/(u*c-o*h),a[i>>3]=A+u*h,a[i+8>>3]=s+o*h}function st(e,t){return t|=0,+a[(e|=0)>>3]!=+a[t>>3]?0|(t=0):0|(t=+a[e+8>>3]==+a[t+8>>3])}function ut(e,t){t|=0;var n,r,i;return+((i=+a[(e|=0)>>3]-+a[t>>3])*i+(r=+a[e+8>>3]-+a[t+8>>3])*r+(n=+a[e+16>>3]-+a[t+16>>3])*n)}function At(e,t,n){e|=0,n|=0;var r=0;(0|(t|=0))>0?(r=0|mt(t,4),i[e>>2]=r,r||B(23230,23253,40,23267)):i[e>>2]=0,i[e+4>>2]=t,i[e+8>>2]=0,i[e+12>>2]=n}function ct(e){var t,n,r,o=0,s=0,A=0,l=0;t=(e|=0)+4|0,n=e+12|0,r=e+8|0;e:for(;;){for(s=0|i[t>>2],o=0;;){if((0|o)>=(0|s))break e;if(A=0|i[e>>2],l=0|i[A+(o<<2)>>2])break;o=o+1|0}o=A+(~~(+u(+ +c(10,+ +(15-(0|i[n>>2])|0))*(+a[l>>3]+ +a[l+8>>3]))%+(0|s))>>>0<<2)|0,s=0|i[o>>2];t:do{if(0|s){if(A=l+32|0,(0|s)==(0|l))i[o>>2]=i[A>>2];else{if(!(o=0|i[(s=s+32|0)>>2]))break;for(;(0|o)!=(0|l);)if(!(o=0|i[(s=o+32|0)>>2]))break t;i[s>>2]=i[A>>2]}yt(l),i[r>>2]=(0|i[r>>2])-1}}while(0)}yt(0|i[e>>2])}function lt(e){var t,n=0,r=0;for(t=0|i[(e|=0)+4>>2],r=0;;){if((0|r)>=(0|t)){n=0,r=4;break}if(n=0|i[(0|i[e>>2])+(r<<2)>>2]){r=4;break}r=r+1|0}return 4==(0|r)?0|n:0}function ft(e,t){t|=0;var n=0,r=0,o=0,s=0;if(n=~~(+u(+ +c(10,+ +(15-(0|i[(e|=0)+12>>2])|0))*(+a[t>>3]+ +a[t+8>>3]))%+(0|i[e+4>>2]))>>>0,n=(0|i[e>>2])+(n<<2)|0,!(r=0|i[n>>2]))return 0|(s=1);s=t+32|0;do{if((0|r)!=(0|t)){if(!(n=0|i[r+32>>2]))return 0|(s=1);for(o=n;;){if((0|o)==(0|t)){o=8;break}if(!(n=0|i[o+32>>2])){n=1,o=10;break}r=o,o=n}if(8==(0|o)){i[r+32>>2]=i[s>>2];break}if(10==(0|o))return 0|n}else i[n>>2]=i[s>>2]}while(0);return yt(t),i[(s=e+8|0)>>2]=(0|i[s>>2])-1,0|(s=0)}function ht(e,t,n){e|=0,t|=0,n|=0;var r,o=0,s=0,A=0;(r=0|vt(40))||B(23283,23253,98,23296),i[r>>2]=i[t>>2],i[r+4>>2]=i[t+4>>2],i[r+8>>2]=i[t+8>>2],i[r+12>>2]=i[t+12>>2],i[(s=r+16|0)>>2]=i[n>>2],i[s+4>>2]=i[n+4>>2],i[s+8>>2]=i[n+8>>2],i[s+12>>2]=i[n+12>>2],i[r+32>>2]=0,s=~~(+u(+ +c(10,+ +(15-(0|i[e+12>>2])|0))*(+a[t>>3]+ +a[t+8>>3]))%+(0|i[e+4>>2]))>>>0,s=(0|i[e>>2])+(s<<2)|0,o=0|i[s>>2];do{if(o){for(;!(0|ke(o,t)&&0|ke(o+16|0,n));)if(s=0|i[o+32>>2],!(0|i[(o=0==(0|s)?o:s)+32>>2])){A=10;break}if(10==(0|A)){i[o+32>>2]=r;break}return yt(r),0|(A=o)}i[s>>2]=r}while(0);return i[(A=e+8|0)>>2]=1+(0|i[A>>2]),0|(A=r)}function gt(e,t,n){t|=0,n|=0;var r=0,o=0;if(o=~~(+u(+ +c(10,+ +(15-(0|i[(e|=0)+12>>2])|0))*(+a[t>>3]+ +a[t+8>>3]))%+(0|i[e+4>>2]))>>>0,!(o=0|i[(0|i[e>>2])+(o<<2)>>2]))return 0|(n=0);if(!n){for(e=o;;){if(0|ke(e,t)){r=10;break}if(!(e=0|i[e+32>>2])){e=0,r=10;break}}if(10==(0|r))return 0|e}for(e=o;;){if(0|ke(e,t)&&0|ke(e+16|0,n)){r=10;break}if(!(e=0|i[e+32>>2])){e=0,r=10;break}}return 10==(0|r)?0|e:0}function dt(e,t){t|=0;var n=0;if(n=~~(+u(+ +c(10,+ +(15-(0|i[(e|=0)+12>>2])|0))*(+a[t>>3]+ +a[t+8>>3]))%+(0|i[e+4>>2]))>>>0,!(e=0|i[(0|i[e>>2])+(n<<2)>>2]))return 0|(n=0);for(;;){if(0|ke(e,t)){t=5;break}if(!(e=0|i[e+32>>2])){e=0,t=5;break}}return 5==(0|t)?0|e:0}function pt(e){return 0|~~+function(e){return+ +St(+(e=+e))}(e=+e)}function vt(e){e|=0;var t,n=0,r=0,a=0,o=0,s=0,u=0,A=0,c=0,l=0,f=0,h=0,g=0,d=0,p=0,v=0,y=0,m=0,I=0,b=0,E=0;t=S,S=S+16|0,g=t;do{if(e>>>0<245){if(e=(l=e>>>0<11?16:e+11&-8)>>>3,3&(r=(h=0|i[5829])>>>e)|0)return a=0|i[(r=(e=23356+((n=(1&r^1)+e|0)<<1<<2)|0)+8|0)>>2],(0|(s=0|i[(o=a+8|0)>>2]))==(0|e)?i[5829]=h&~(1<<n):(i[s+12>>2]=e,i[r>>2]=s),E=n<<3,i[a+4>>2]=3|E,i[(E=a+E+4|0)>>2]=1|i[E>>2],S=t,0|(E=o);if(l>>>0>(f=0|i[5831])>>>0){if(0|r)return n=((n=r<<e&((n=2<<e)|0-n))&0-n)-1|0,s=0|i[(e=(n=23356+((a=((r=(n>>>=A=n>>>12&16)>>>5&8)|A|(s=(n>>>=r)>>>2&4)|(e=(n>>>=s)>>>1&2)|(a=(n>>>=e)>>>1&1))+(n>>>a)|0)<<1<<2)|0)+8|0)>>2],(0|(r=0|i[(A=s+8|0)>>2]))==(0|n)?(e=h&~(1<<a),i[5829]=e):(i[r+12>>2]=n,i[e>>2]=r,e=h),u=(E=a<<3)-l|0,i[s+4>>2]=3|l,i[(o=s+l|0)+4>>2]=1|u,i[s+E>>2]=u,0|f&&(a=0|i[5834],r=23356+((n=f>>>3)<<1<<2)|0,e&(n=1<<n)?n=0|i[(e=r+8|0)>>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=a,i[n+12>>2]=a,i[a+8>>2]=n,i[a+12>>2]=r),i[5831]=u,i[5834]=o,S=t,0|(E=A);if(s=0|i[5830]){for(r=(s&0-s)-1|0,r=c=0|i[23620+(((a=(r>>>=o=r>>>12&16)>>>5&8)|o|(u=(r>>>=a)>>>2&4)|(A=(r>>>=u)>>>1&2)|(c=(r>>>=A)>>>1&1))+(r>>>c)<<2)>>2],A=c,c=(-8&i[c+4>>2])-l|0;(e=0|i[r+16>>2])||(e=0|i[r+20>>2]);)r=e,A=(o=(u=(-8&i[e+4>>2])-l|0)>>>0<c>>>0)?e:A,c=o?u:c;if((u=A+l|0)>>>0>A>>>0){o=0|i[A+24>>2],n=0|i[A+12>>2];do{if((0|n)==(0|A)){if(!(n=0|i[(e=A+20|0)>>2])&&!(n=0|i[(e=A+16|0)>>2])){r=0;break}for(;;)if(r=0|i[(a=n+20|0)>>2])n=r,e=a;else{if(!(r=0|i[(a=n+16|0)>>2]))break;n=r,e=a}i[e>>2]=0,r=n}else r=0|i[A+8>>2],i[r+12>>2]=n,i[n+8>>2]=r,r=n}while(0);do{if(0|o){if(n=0|i[A+28>>2],(0|A)==(0|i[(e=23620+(n<<2)|0)>>2])){if(i[e>>2]=r,!r){i[5830]=s&~(1<<n);break}}else if(i[((0|i[(E=o+16|0)>>2])==(0|A)?E:o+20|0)>>2]=r,!r)break;i[r+24>>2]=o,0|(n=0|i[A+16>>2])&&(i[r+16>>2]=n,i[n+24>>2]=r),0|(n=0|i[A+20>>2])&&(i[r+20>>2]=n,i[n+24>>2]=r)}}while(0);return c>>>0<16?(E=c+l|0,i[A+4>>2]=3|E,i[(E=A+E+4|0)>>2]=1|i[E>>2]):(i[A+4>>2]=3|l,i[u+4>>2]=1|c,i[u+c>>2]=c,0|f&&(a=0|i[5834],r=23356+((n=f>>>3)<<1<<2)|0,(n=1<<n)&h?n=0|i[(e=r+8|0)>>2]:(i[5829]=n|h,n=r,e=r+8|0),i[e>>2]=a,i[n+12>>2]=a,i[a+8>>2]=n,i[a+12>>2]=r),i[5831]=c,i[5834]=u),S=t,0|(E=A+8|0)}h=l}else h=l}else h=l}else if(e>>>0<=4294967231)if(l=-8&(e=e+11|0),a=0|i[5830]){o=0-l|0,c=(e>>>=8)?l>>>0>16777215?31:l>>>((c=14-((A=((v=e<<(h=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|h|(c=((v<<=A)+245760|0)>>>16&2))+(v<<c>>>15)|0)+7|0)&1|c<<1:0,r=0|i[23620+(c<<2)>>2];e:do{if(r)for(e=0,A=l<<(31==(0|c)?0:25-(c>>>1)|0),s=0;;){if((u=(-8&i[r+4>>2])-l|0)>>>0<o>>>0){if(!u){e=r,o=0,v=65;break e}e=r,o=u}if(s=0==(0|(v=0|i[r+20>>2]))|(0|v)==(0|(r=0|i[r+16+(A>>>31<<2)>>2]))?s:v,!r){r=s,v=61;break}A<<=1}else r=0,e=0,v=61}while(0);if(61==(0|v)){if(0==(0|r)&0==(0|e)){if(!(e=((e=2<<c)|0-e)&a)){h=l;break}h=(e&0-e)-1|0,e=0,r=0|i[23620+(((s=(h>>>=u=h>>>12&16)>>>5&8)|u|(A=(h>>>=s)>>>2&4)|(c=(h>>>=A)>>>1&2)|(r=(h>>>=c)>>>1&1))+(h>>>r)<<2)>>2]}r?v=65:(A=e,u=o)}if(65==(0|v))for(s=r;;){if(o=(r=(h=(-8&i[s+4>>2])-l|0)>>>0<o>>>0)?h:o,e=r?s:e,(r=0|i[s+16>>2])||(r=0|i[s+20>>2]),!r){A=e,u=o;break}s=r}if(0!=(0|A)&&u>>>0<((0|i[5831])-l|0)>>>0&&(f=A+l|0)>>>0>A>>>0){s=0|i[A+24>>2],n=0|i[A+12>>2];do{if((0|n)==(0|A)){if(!(n=0|i[(e=A+20|0)>>2])&&!(n=0|i[(e=A+16|0)>>2])){n=0;break}for(;;)if(r=0|i[(o=n+20|0)>>2])n=r,e=o;else{if(!(r=0|i[(o=n+16|0)>>2]))break;n=r,e=o}i[e>>2]=0}else E=0|i[A+8>>2],i[E+12>>2]=n,i[n+8>>2]=E}while(0);do{if(s){if(e=0|i[A+28>>2],(0|A)==(0|i[(r=23620+(e<<2)|0)>>2])){if(i[r>>2]=n,!n){a&=~(1<<e),i[5830]=a;break}}else if(i[((0|i[(E=s+16|0)>>2])==(0|A)?E:s+20|0)>>2]=n,!n)break;i[n+24>>2]=s,0|(e=0|i[A+16>>2])&&(i[n+16>>2]=e,i[e+24>>2]=n),(e=0|i[A+20>>2])&&(i[n+20>>2]=e,i[e+24>>2]=n)}}while(0);e:do{if(u>>>0<16)E=u+l|0,i[A+4>>2]=3|E,i[(E=A+E+4|0)>>2]=1|i[E>>2];else{if(i[A+4>>2]=3|l,i[f+4>>2]=1|u,i[f+u>>2]=u,n=u>>>3,u>>>0<256){r=23356+(n<<1<<2)|0,(e=0|i[5829])&(n=1<<n)?n=0|i[(e=r+8|0)>>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=f,i[n+12>>2]=f,i[f+8>>2]=n,i[f+12>>2]=r;break}if(n=23620+((r=(n=u>>>8)?u>>>0>16777215?31:u>>>((r=14-((I=((E=n<<(b=(n+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(r=((E<<=I)+245760|0)>>>16&2))+(E<<r>>>15)|0)+7|0)&1|r<<1:0)<<2)|0,i[f+28>>2]=r,i[(e=f+16|0)+4>>2]=0,i[e>>2]=0,!(a&(e=1<<r))){i[5830]=a|e,i[n>>2]=f,i[f+24>>2]=n,i[f+12>>2]=f,i[f+8>>2]=f;break}n=0|i[n>>2];t:do{if((-8&i[n+4>>2]|0)!=(0|u)){for(a=u<<(31==(0|r)?0:25-(r>>>1)|0);e=0|i[(r=n+16+(a>>>31<<2)|0)>>2];){if((-8&i[e+4>>2]|0)==(0|u)){n=e;break t}a<<=1,n=e}i[r>>2]=f,i[f+24>>2]=n,i[f+12>>2]=f,i[f+8>>2]=f;break e}}while(0);E=0|i[(b=n+8|0)>>2],i[E+12>>2]=f,i[b>>2]=f,i[f+8>>2]=E,i[f+12>>2]=n,i[f+24>>2]=0}}while(0);return S=t,0|(E=A+8|0)}h=l}else h=l;else h=-1}while(0);if((r=0|i[5831])>>>0>=h>>>0)return n=r-h|0,e=0|i[5834],n>>>0>15?(E=e+h|0,i[5834]=E,i[5831]=n,i[E+4>>2]=1|n,i[e+r>>2]=n,i[e+4>>2]=3|h):(i[5831]=0,i[5834]=0,i[e+4>>2]=3|r,i[(E=e+r+4|0)>>2]=1|i[E>>2]),S=t,0|(E=e+8|0);if((u=0|i[5832])>>>0>h>>>0)return I=u-h|0,i[5832]=I,b=(E=0|i[5835])+h|0,i[5835]=b,i[b+4>>2]=1|I,i[E+4>>2]=3|h,S=t,0|(E=E+8|0);if(0|i[5947]?e=0|i[5949]:(i[5949]=4096,i[5948]=4096,i[5950]=-1,i[5951]=-1,i[5952]=0,i[5940]=0,i[5947]=-16&g^1431655768,e=4096),A=h+48|0,(l=(s=e+(c=h+47|0)|0)&(o=0-e|0))>>>0<=h>>>0)return S=t,0|(E=0);if(0|(e=0|i[5939])&&(g=(f=0|i[5937])+l|0)>>>0<=f>>>0|g>>>0>e>>>0)return S=t,0|(E=0);e:do{if(4&i[5940])n=0,v=143;else{r=0|i[5835];t:do{if(r){for(a=23764;!((g=0|i[a>>2])>>>0<=r>>>0&&(g+(0|i[a+4>>2])|0)>>>0>r>>>0);){if(!(e=0|i[a+8>>2])){v=128;break t}a=e}if((n=s-u&o)>>>0<2147483647)if((0|(e=0|Ot(0|n)))==((0|i[a>>2])+(0|i[a+4>>2])|0)){if(-1!=(0|e)){u=n,s=e,v=145;break e}}else a=e,v=136;else n=0}else v=128}while(0);do{if(128==(0|v))if(-1!=(0|(r=0|Ot(0)))&&(n=r,p=(n=(0==((p=(d=0|i[5948])+-1|0)&n|0)?0:(p+n&0-d)-n|0)+l|0)+(d=0|i[5937])|0,n>>>0>h>>>0&n>>>0<2147483647)){if(0|(g=0|i[5939])&&p>>>0<=d>>>0|p>>>0>g>>>0){n=0;break}if((0|(e=0|Ot(0|n)))==(0|r)){u=n,s=r,v=145;break e}a=e,v=136}else n=0}while(0);do{if(136==(0|v)){if(r=0-n|0,!(A>>>0>n>>>0&n>>>0<2147483647&-1!=(0|a))){if(-1==(0|a)){n=0;break}u=n,s=a,v=145;break e}if((e=c-n+(e=0|i[5949])&0-e)>>>0>=2147483647){u=n,s=a,v=145;break e}if(-1==(0|Ot(0|e))){Ot(0|r),n=0;break}u=e+n|0,s=a,v=145;break e}}while(0);i[5940]=4|i[5940],v=143}}while(0);if(143==(0|v)&&l>>>0<2147483647&&!(-1==(0|(I=0|Ot(0|l)))|1^(m=(y=(p=0|Ot(0))-I|0)>>>0>(h+40|0)>>>0)|I>>>0<p>>>0&-1!=(0|I)&-1!=(0|p)^1)&&(u=m?y:n,s=I,v=145),145==(0|v)){n=(0|i[5937])+u|0,i[5937]=n,n>>>0>(0|i[5938])>>>0&&(i[5938]=n),c=0|i[5835];e:do{if(c){for(n=23764;;){if((0|s)==((e=0|i[n>>2])+(r=0|i[n+4>>2])|0)){v=154;break}if(!(a=0|i[n+8>>2]))break;n=a}if(154==(0|v)&&(b=n+4|0,0==(8&i[n+12>>2]|0))&&s>>>0>c>>>0&e>>>0<=c>>>0){i[b>>2]=r+u,b=c+(I=0==(7&(I=c+8|0)|0)?0:0-I&7)|0,I=(E=(0|i[5832])+u|0)-I|0,i[5835]=b,i[5832]=I,i[b+4>>2]=1|I,i[c+E+4>>2]=40,i[5836]=i[5951];break}for(s>>>0<(0|i[5833])>>>0&&(i[5833]=s),r=s+u|0,n=23764;;){if((0|i[n>>2])==(0|r)){v=162;break}if(!(e=0|i[n+8>>2]))break;n=e}if(162==(0|v)&&0==(8&i[n+12>>2]|0)){i[n>>2]=s,i[(f=n+4|0)>>2]=(0|i[f>>2])+u,l=(f=s+(0==(7&(f=s+8|0)|0)?0:0-f&7)|0)+h|0,A=(n=r+(0==(7&(n=r+8|0)|0)?0:0-n&7)|0)-f-h|0,i[f+4>>2]=3|h;t:do{if((0|c)==(0|n))E=(0|i[5832])+A|0,i[5832]=E,i[5835]=l,i[l+4>>2]=1|E;else{if((0|i[5834])==(0|n)){E=(0|i[5831])+A|0,i[5831]=E,i[5834]=l,i[l+4>>2]=1|E,i[l+E>>2]=E;break}if(1==(3&(e=0|i[n+4>>2])|0)){u=-8&e,a=e>>>3;n:do{if(e>>>0<256){if(e=0|i[n+8>>2],(0|(r=0|i[n+12>>2]))==(0|e)){i[5829]=i[5829]&~(1<<a);break}i[e+12>>2]=r,i[r+8>>2]=e;break}s=0|i[n+24>>2],e=0|i[n+12>>2];do{if((0|e)==(0|n)){if(e=0|i[(a=(r=n+16|0)+4|0)>>2])r=a;else if(!(e=0|i[r>>2])){e=0;break}for(;;)if(a=0|i[(o=e+20|0)>>2])e=a,r=o;else{if(!(a=0|i[(o=e+16|0)>>2]))break;e=a,r=o}i[r>>2]=0}else E=0|i[n+8>>2],i[E+12>>2]=e,i[e+8>>2]=E}while(0);if(!s)break;a=23620+((r=0|i[n+28>>2])<<2)|0;do{if((0|i[a>>2])==(0|n)){if(i[a>>2]=e,0|e)break;i[5830]=i[5830]&~(1<<r);break n}if(i[((0|i[(E=s+16|0)>>2])==(0|n)?E:s+20|0)>>2]=e,!e)break n}while(0);if(i[e+24>>2]=s,0|(a=0|i[(r=n+16|0)>>2])&&(i[e+16>>2]=a,i[a+24>>2]=e),!(r=0|i[r+4>>2]))break;i[e+20>>2]=r,i[r+24>>2]=e}while(0);n=n+u|0,o=u+A|0}else o=A;if(i[(n=n+4|0)>>2]=-2&i[n>>2],i[l+4>>2]=1|o,i[l+o>>2]=o,n=o>>>3,o>>>0<256){r=23356+(n<<1<<2)|0,(e=0|i[5829])&(n=1<<n)?n=0|i[(e=r+8|0)>>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=l,i[n+12>>2]=l,i[l+8>>2]=n,i[l+12>>2]=r;break}n=o>>>8;do{if(n){if(o>>>0>16777215){a=31;break}a=o>>>((a=14-((I=((E=n<<(b=(n+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(a=((E<<=I)+245760|0)>>>16&2))+(E<<a>>>15)|0)+7|0)&1|a<<1}else a=0}while(0);if(n=23620+(a<<2)|0,i[l+28>>2]=a,i[(e=l+16|0)+4>>2]=0,i[e>>2]=0,!((e=0|i[5830])&(r=1<<a))){i[5830]=e|r,i[n>>2]=l,i[l+24>>2]=n,i[l+12>>2]=l,i[l+8>>2]=l;break}n=0|i[n>>2];n:do{if((-8&i[n+4>>2]|0)!=(0|o)){for(a=o<<(31==(0|a)?0:25-(a>>>1)|0);e=0|i[(r=n+16+(a>>>31<<2)|0)>>2];){if((-8&i[e+4>>2]|0)==(0|o)){n=e;break n}a<<=1,n=e}i[r>>2]=l,i[l+24>>2]=n,i[l+12>>2]=l,i[l+8>>2]=l;break t}}while(0);E=0|i[(b=n+8|0)>>2],i[E+12>>2]=l,i[b>>2]=l,i[l+8>>2]=E,i[l+12>>2]=n,i[l+24>>2]=0}}while(0);return S=t,0|(E=f+8|0)}for(n=23764;!((e=0|i[n>>2])>>>0<=c>>>0&&(E=e+(0|i[n+4>>2])|0)>>>0>c>>>0);)n=0|i[n+8>>2];n=(e=(e=(o=E+-47|0)+(0==(7&(e=o+8|0)|0)?0:0-e&7)|0)>>>0<(o=c+16|0)>>>0?c:e)+8|0,b=s+(I=0==(7&(I=s+8|0)|0)?0:0-I&7)|0,I=(r=u+-40|0)-I|0,i[5835]=b,i[5832]=I,i[b+4>>2]=1|I,i[s+r+4>>2]=40,i[5836]=i[5951],i[(r=e+4|0)>>2]=27,i[n>>2]=i[5941],i[n+4>>2]=i[5942],i[n+8>>2]=i[5943],i[n+12>>2]=i[5944],i[5941]=s,i[5942]=u,i[5944]=0,i[5943]=n,n=e+24|0;do{b=n,i[(n=n+4|0)>>2]=7}while((b+8|0)>>>0<E>>>0);if((0|e)!=(0|c)){if(s=e-c|0,i[r>>2]=-2&i[r>>2],i[c+4>>2]=1|s,i[e>>2]=s,n=s>>>3,s>>>0<256){r=23356+(n<<1<<2)|0,(e=0|i[5829])&(n=1<<n)?n=0|i[(e=r+8|0)>>2]:(i[5829]=e|n,n=r,e=r+8|0),i[e>>2]=c,i[n+12>>2]=c,i[c+8>>2]=n,i[c+12>>2]=r;break}if(r=23620+((a=(n=s>>>8)?s>>>0>16777215?31:s>>>((a=14-((I=((E=n<<(b=(n+1048320|0)>>>16&8))+520192|0)>>>16&4)|b|(a=((E<<=I)+245760|0)>>>16&2))+(E<<a>>>15)|0)+7|0)&1|a<<1:0)<<2)|0,i[c+28>>2]=a,i[c+20>>2]=0,i[o>>2]=0,!((n=0|i[5830])&(e=1<<a))){i[5830]=n|e,i[r>>2]=c,i[c+24>>2]=r,i[c+12>>2]=c,i[c+8>>2]=c;break}n=0|i[r>>2];t:do{if((-8&i[n+4>>2]|0)!=(0|s)){for(a=s<<(31==(0|a)?0:25-(a>>>1)|0);e=0|i[(r=n+16+(a>>>31<<2)|0)>>2];){if((-8&i[e+4>>2]|0)==(0|s)){n=e;break t}a<<=1,n=e}i[r>>2]=c,i[c+24>>2]=n,i[c+12>>2]=c,i[c+8>>2]=c;break e}}while(0);E=0|i[(b=n+8|0)>>2],i[E+12>>2]=c,i[b>>2]=c,i[c+8>>2]=E,i[c+12>>2]=n,i[c+24>>2]=0}}else 0==(0|(E=0|i[5833]))|s>>>0<E>>>0&&(i[5833]=s),i[5941]=s,i[5942]=u,i[5944]=0,i[5838]=i[5947],i[5837]=-1,i[5842]=23356,i[5841]=23356,i[5844]=23364,i[5843]=23364,i[5846]=23372,i[5845]=23372,i[5848]=23380,i[5847]=23380,i[5850]=23388,i[5849]=23388,i[5852]=23396,i[5851]=23396,i[5854]=23404,i[5853]=23404,i[5856]=23412,i[5855]=23412,i[5858]=23420,i[5857]=23420,i[5860]=23428,i[5859]=23428,i[5862]=23436,i[5861]=23436,i[5864]=23444,i[5863]=23444,i[5866]=23452,i[5865]=23452,i[5868]=23460,i[5867]=23460,i[5870]=23468,i[5869]=23468,i[5872]=23476,i[5871]=23476,i[5874]=23484,i[5873]=23484,i[5876]=23492,i[5875]=23492,i[5878]=23500,i[5877]=23500,i[5880]=23508,i[5879]=23508,i[5882]=23516,i[5881]=23516,i[5884]=23524,i[5883]=23524,i[5886]=23532,i[5885]=23532,i[5888]=23540,i[5887]=23540,i[5890]=23548,i[5889]=23548,i[5892]=23556,i[5891]=23556,i[5894]=23564,i[5893]=23564,i[5896]=23572,i[5895]=23572,i[5898]=23580,i[5897]=23580,i[5900]=23588,i[5899]=23588,i[5902]=23596,i[5901]=23596,i[5904]=23604,i[5903]=23604,b=s+(I=0==(7&(I=s+8|0)|0)?0:0-I&7)|0,I=(E=u+-40|0)-I|0,i[5835]=b,i[5832]=I,i[b+4>>2]=1|I,i[s+E+4>>2]=40,i[5836]=i[5951]}while(0);if((n=0|i[5832])>>>0>h>>>0)return I=n-h|0,i[5832]=I,b=(E=0|i[5835])+h|0,i[5835]=b,i[b+4>>2]=1|I,i[E+4>>2]=3|h,S=t,0|(E=E+8|0)}return i[(E=23312)>>2]=12,S=t,0|(E=0)}function yt(e){var t=0,n=0,r=0,a=0,o=0,s=0,u=0,A=0;if(e|=0){n=e+-8|0,a=0|i[5833],A=n+(t=-8&(e=0|i[e+-4>>2]))|0;do{if(1&e)u=n,s=n;else{if(r=0|i[n>>2],!(3&e))return;if(o=r+t|0,(s=n+(0-r)|0)>>>0<a>>>0)return;if((0|i[5834])==(0|s)){if(3!=(3&(t=0|i[(e=A+4|0)>>2])|0)){u=s,t=o;break}return i[5831]=o,i[e>>2]=-2&t,i[s+4>>2]=1|o,void(i[s+o>>2]=o)}if(n=r>>>3,r>>>0<256){if(e=0|i[s+8>>2],(0|(t=0|i[s+12>>2]))==(0|e)){i[5829]=i[5829]&~(1<<n),u=s,t=o;break}i[e+12>>2]=t,i[t+8>>2]=e,u=s,t=o;break}a=0|i[s+24>>2],e=0|i[s+12>>2];do{if((0|e)==(0|s)){if(e=0|i[(n=(t=s+16|0)+4|0)>>2])t=n;else if(!(e=0|i[t>>2])){e=0;break}for(;;)if(n=0|i[(r=e+20|0)>>2])e=n,t=r;else{if(!(n=0|i[(r=e+16|0)>>2]))break;e=n,t=r}i[t>>2]=0}else u=0|i[s+8>>2],i[u+12>>2]=e,i[e+8>>2]=u}while(0);if(a){if(t=0|i[s+28>>2],(0|i[(n=23620+(t<<2)|0)>>2])==(0|s)){if(i[n>>2]=e,!e){i[5830]=i[5830]&~(1<<t),u=s,t=o;break}}else if(i[((0|i[(u=a+16|0)>>2])==(0|s)?u:a+20|0)>>2]=e,!e){u=s,t=o;break}i[e+24>>2]=a,0|(n=0|i[(t=s+16|0)>>2])&&(i[e+16>>2]=n,i[n+24>>2]=e),(t=0|i[t+4>>2])?(i[e+20>>2]=t,i[t+24>>2]=e,u=s,t=o):(u=s,t=o)}else u=s,t=o}}while(0);if(!(s>>>0>=A>>>0)&&1&(r=0|i[(e=A+4|0)>>2])){if(2&r)i[e>>2]=-2&r,i[u+4>>2]=1|t,i[s+t>>2]=t,a=t;else{if((0|i[5835])==(0|A)){if(A=(0|i[5832])+t|0,i[5832]=A,i[5835]=u,i[u+4>>2]=1|A,(0|u)!=(0|i[5834]))return;return i[5834]=0,void(i[5831]=0)}if((0|i[5834])==(0|A))return A=(0|i[5831])+t|0,i[5831]=A,i[5834]=s,i[u+4>>2]=1|A,void(i[s+A>>2]=A);a=(-8&r)+t|0,n=r>>>3;do{if(r>>>0<256){if(t=0|i[A+8>>2],(0|(e=0|i[A+12>>2]))==(0|t)){i[5829]=i[5829]&~(1<<n);break}i[t+12>>2]=e,i[e+8>>2]=t;break}o=0|i[A+24>>2],e=0|i[A+12>>2];do{if((0|e)==(0|A)){if(e=0|i[(n=(t=A+16|0)+4|0)>>2])t=n;else if(!(e=0|i[t>>2])){n=0;break}for(;;)if(n=0|i[(r=e+20|0)>>2])e=n,t=r;else{if(!(n=0|i[(r=e+16|0)>>2]))break;e=n,t=r}i[t>>2]=0,n=e}else n=0|i[A+8>>2],i[n+12>>2]=e,i[e+8>>2]=n,n=e}while(0);if(0|o){if(e=0|i[A+28>>2],(0|i[(t=23620+(e<<2)|0)>>2])==(0|A)){if(i[t>>2]=n,!n){i[5830]=i[5830]&~(1<<e);break}}else if(i[((0|i[(r=o+16|0)>>2])==(0|A)?r:o+20|0)>>2]=n,!n)break;i[n+24>>2]=o,0|(t=0|i[(e=A+16|0)>>2])&&(i[n+16>>2]=t,i[t+24>>2]=n),0|(e=0|i[e+4>>2])&&(i[n+20>>2]=e,i[e+24>>2]=n)}}while(0);if(i[u+4>>2]=1|a,i[s+a>>2]=a,(0|u)==(0|i[5834]))return void(i[5831]=a)}if(e=a>>>3,a>>>0<256)return n=23356+(e<<1<<2)|0,(t=0|i[5829])&(e=1<<e)?e=0|i[(t=n+8|0)>>2]:(i[5829]=t|e,e=n,t=n+8|0),i[t>>2]=u,i[e+12>>2]=u,i[u+8>>2]=e,void(i[u+12>>2]=n);e=23620+((r=(e=a>>>8)?a>>>0>16777215?31:a>>>((r=14-((o=((A=e<<(s=(e+1048320|0)>>>16&8))+520192|0)>>>16&4)|s|(r=((A<<=o)+245760|0)>>>16&2))+(A<<r>>>15)|0)+7|0)&1|r<<1:0)<<2)|0,i[u+28>>2]=r,i[u+20>>2]=0,i[u+16>>2]=0,t=0|i[5830],n=1<<r;e:do{if(t&n){e=0|i[e>>2];t:do{if((-8&i[e+4>>2]|0)!=(0|a)){for(r=a<<(31==(0|r)?0:25-(r>>>1)|0);t=0|i[(n=e+16+(r>>>31<<2)|0)>>2];){if((-8&i[t+4>>2]|0)==(0|a)){e=t;break t}r<<=1,e=t}i[n>>2]=u,i[u+24>>2]=e,i[u+12>>2]=u,i[u+8>>2]=u;break e}}while(0);A=0|i[(s=e+8|0)>>2],i[A+12>>2]=u,i[s>>2]=u,i[u+8>>2]=A,i[u+12>>2]=e,i[u+24>>2]=0}else i[5830]=t|n,i[e>>2]=u,i[u+24>>2]=e,i[u+12>>2]=u,i[u+8>>2]=u}while(0);if(A=(0|i[5837])-1|0,i[5837]=A,!(0|A)){for(e=23772;e=0|i[e>>2];)e=e+8|0;i[5837]=-1}}}}function mt(e,t){t|=0;var n=0;return(e|=0)?(n=0|m(t,e),(t|e)>>>0>65535&&(n=(0|(n>>>0)/(e>>>0))==(0|t)?n:-1)):n=0,(e=0|vt(n))&&3&i[e+-4>>2]?(xt(0|e,0,0|n),0|e):0|e}function It(e,t,n,r){return 0|(E(0|(r=(t|=0)-(r|=0)-((n|=0)>>>0>(e|=0)>>>0|0)>>>0)),e-n>>>0|0)}function bt(e){return 0|((e|=0)?31-(0|b(e^e-1))|0:32)}function Et(e,t,n,r,a){a|=0;var o=0,s=0,u=0,A=0,c=0,l=0,f=0,h=0,g=0,d=0;if(l=e|=0,s=n|=0,u=h=r|=0,!(c=A=t|=0))return o=0!=(0|a),u?o?(i[a>>2]=0|e,i[a+4>>2]=0&t,a=0,0|(E(0|(h=0)),a)):(a=0,0|(E(0|(h=0)),a)):(o&&(i[a>>2]=(l>>>0)%(s>>>0),i[a+4>>2]=0),a=(l>>>0)/(s>>>0)>>>0,0|(E(0|(h=0)),a));o=0==(0|u);do{if(s){if(!o){if((o=(0|b(0|u))-(0|b(0|c))|0)>>>0<=31){s=f=o+1|0,e=l>>>(f>>>0)&(t=o-31>>31)|c<<(u=31-o|0),t&=c>>>(f>>>0),o=0,u=l<<u;break}return a?(i[a>>2]=0|e,i[a+4>>2]=A|0&t,a=0,0|(E(0|(h=0)),a)):(a=0,0|(E(0|(h=0)),a))}if((o=s-1|0)&s|0){s=u=33+(0|b(0|s))-(0|b(0|c))|0,e=(f=32-u|0)-1>>31&c>>>((g=u-32|0)>>>0)|(c<<f|l>>>(u>>>0))&(t=g>>31),t&=c>>>(u>>>0),o=l<<(d=64-u|0)&(A=f>>31),u=(c<<d|l>>>(g>>>0))&A|l<<f&u-33>>31;break}return 0|a&&(i[a>>2]=o&l,i[a+4>>2]=0),1==(0|s)?(d=0|e,0|(E(0|(g=A|0&t)),d)):(g=c>>>((d=0|bt(0|s))>>>0)|0,d=c<<32-d|l>>>(d>>>0)|0,0|(E(0|g),d))}if(o)return 0|a&&(i[a>>2]=(c>>>0)%(s>>>0),i[a+4>>2]=0),d=(c>>>0)/(s>>>0)>>>0,0|(E(0|(g=0)),d);if(!l)return 0|a&&(i[a>>2]=0,i[a+4>>2]=(c>>>0)%(u>>>0)),d=(c>>>0)/(u>>>0)>>>0,0|(E(0|(g=0)),d);if(!((o=u-1|0)&u))return 0|a&&(i[a>>2]=0|e,i[a+4>>2]=o&c|0&t),g=0,d=c>>>((0|bt(0|u))>>>0),0|(E(0|g),d);if((o=(0|b(0|u))-(0|b(0|c))|0)>>>0<=30){s=t=o+1|0,e=c<<(u=31-o|0)|l>>>(t>>>0),t=c>>>(t>>>0),o=0,u=l<<u;break}return a?(i[a>>2]=0|e,i[a+4>>2]=A|0&t,d=0,0|(E(0|(g=0)),d)):(d=0,0|(E(0|(g=0)),d))}while(0);if(s){c=0|function(e,t,n,r){return 0|(E((t|=0)+(r|=0)+((n=(e|=0)+(n|=0)>>>0)>>>0<e>>>0|0)>>>0|0),0|n)}(0|(f=0|n),0|(l=h|0&r),-1,-1),n=0|C(),A=u,u=0;do{r=A,A=o>>>31|A<<1,o=u|o<<1,It(0|c,0|n,0|(r=e<<1|r>>>31|0),0|(h=e>>>31|t<<1|0)),u=1&(g=(d=0|C())>>31|((0|d)<0?-1:0)<<1),e=0|It(0|r,0|h,g&f|0,(((0|d)<0?-1:0)>>31|((0|d)<0?-1:0)<<1)&l|0),t=0|C(),s=s-1|0}while(0!=(0|s));c=A,A=0}else c=u,A=0,u=0;return s=0,0|a&&(i[a>>2]=e,i[a+4>>2]=t),d=-2&(o<<1|0)|u,0|(E(0|(g=(0|o)>>>31|(c|s)<<1|0&(s<<1|o>>>31)|A)),d)}function Ct(e,t,n,r){var a,o;return o=S,S=S+16|0,Et(e|=0,t|=0,n|=0,r|=0,a=0|o),S=o,0|(E(0|i[a+4>>2]),0|i[a>>2])}function Bt(e,t,n){return e|=0,t|=0,(0|(n|=0))<32?(E(t>>>n|0),e>>>n|(t&(1<<n)-1)<<32-n):(E(0),t>>>n-32|0)}function wt(e,t,n){return e|=0,t|=0,(0|(n|=0))<32?(E(t<<n|(e&(1<<n)-1<<32-n)>>>32-n|0),e<<n):(E(e<<n-32|0),0)}function Qt(e,t){return t=+t,(e=+e)!=e?+t:t!=t?+e:+I(+e,+t)}function kt(e){return(e=+e)>=0?+s(e+.5):+y(e-.5)}function _t(e,t,n){e|=0,t|=0;var a,o,s=0;if((0|(n|=0))>=8192)return k(0|e,0|t,0|n),0|e;if(o=0|e,a=e+n|0,(3&e)==(3&t)){for(;3&e;){if(!n)return 0|o;r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0,n=n-1|0}for(s=(n=-4&a|0)-64|0;(0|e)<=(0|s);)i[e>>2]=i[t>>2],i[e+4>>2]=i[t+4>>2],i[e+8>>2]=i[t+8>>2],i[e+12>>2]=i[t+12>>2],i[e+16>>2]=i[t+16>>2],i[e+20>>2]=i[t+20>>2],i[e+24>>2]=i[t+24>>2],i[e+28>>2]=i[t+28>>2],i[e+32>>2]=i[t+32>>2],i[e+36>>2]=i[t+36>>2],i[e+40>>2]=i[t+40>>2],i[e+44>>2]=i[t+44>>2],i[e+48>>2]=i[t+48>>2],i[e+52>>2]=i[t+52>>2],i[e+56>>2]=i[t+56>>2],i[e+60>>2]=i[t+60>>2],e=e+64|0,t=t+64|0;for(;(0|e)<(0|n);)i[e>>2]=i[t>>2],e=e+4|0,t=t+4|0}else for(n=a-4|0;(0|e)<(0|n);)r[e>>0]=0|r[t>>0],r[e+1>>0]=0|r[t+1>>0],r[e+2>>0]=0|r[t+2>>0],r[e+3>>0]=0|r[t+3>>0],e=e+4|0,t=t+4|0;for(;(0|e)<(0|a);)r[e>>0]=0|r[t>>0],e=e+1|0,t=t+1|0;return 0|o}function xt(e,t,n){t|=0;var a,o=0,s=0,u=0;if(a=(e|=0)+(n|=0)|0,t&=255,(0|n)>=67){for(;3&e;)r[e>>0]=t,e=e+1|0;for(u=t|t<<8|t<<16|t<<24,s=(o=-4&a|0)-64|0;(0|e)<=(0|s);)i[e>>2]=u,i[e+4>>2]=u,i[e+8>>2]=u,i[e+12>>2]=u,i[e+16>>2]=u,i[e+20>>2]=u,i[e+24>>2]=u,i[e+28>>2]=u,i[e+32>>2]=u,i[e+36>>2]=u,i[e+40>>2]=u,i[e+44>>2]=u,i[e+48>>2]=u,i[e+52>>2]=u,i[e+56>>2]=u,i[e+60>>2]=u,e=e+64|0;for(;(0|e)<(0|o);)i[e>>2]=u,e=e+4|0}for(;(0|e)<(0|a);)r[e>>0]=t,e=e+1|0;return a-n|0}function St(e){return(e=+e)>=0?+s(e+.5):+y(e-.5)}function Ot(e){e|=0;var t,n,r;return r=0|Q(),(0|e)>0&(0|(t=(n=0|i[o>>2])+e|0))<(0|n)|(0|t)<0?(x(0|t),w(12),-1):(0|t)>(0|r)&&!(0|_(0|t))?(w(12),-1):(i[o>>2]=t,0|n)}return{___uremdi3:Ct,_bitshift64Lshr:Bt,_bitshift64Shl:wt,_calloc:mt,_cellAreaKm2:function(e,t){var n,r,a,o=0;if(a=S,S=S+192|0,r=a,He(e|=0,t|=0,n=a+168|0),Ye(e,t,r),(0|(t=0|i[r>>2]))>0){if(o=+xe(r+8|0,r+8+((1!=(0|t)&1)<<4)|0,n)+0,1!=(0|t)){e=1;do{o+=+xe(r+8+(e<<4)|0,r+8+(((0|(e=e+1|0))%(0|t)|0)<<4)|0,n)}while((0|e)<(0|t))}}else o=0;return S=a,6371.007180918475*o*6371.007180918475},_cellAreaM2:function(e,t){var n,r,a,o=0;if(a=S,S=S+192|0,r=a,He(e|=0,t|=0,n=a+168|0),Ye(e,t,r),(0|(t=0|i[r>>2]))>0){if(o=+xe(r+8|0,r+8+((1!=(0|t)&1)<<4)|0,n)+0,1!=(0|t)){e=1;do{o+=+xe(r+8+(e<<4)|0,r+8+(((0|(e=e+1|0))%(0|t)|0)<<4)|0,n)}while((0|e)<(0|t))}}else o=0;return S=a,6371.007180918475*o*6371.007180918475*1e3*1e3},_cellAreaRads2:function(e,t){var n,r,a,o=0;if(a=S,S=S+192|0,r=a,He(e|=0,t|=0,n=a+168|0),Ye(e,t,r),(0|(t=0|i[r>>2]))<=0)return S=a,+(o=0);if(o=+xe(r+8|0,r+8+((1!=(0|t)&1)<<4)|0,n)+0,1==(0|t))return S=a,+o;e=1;do{o+=+xe(r+8+(e<<4)|0,r+8+(((0|(e=e+1|0))%(0|t)|0)<<4)|0,n)}while((0|e)<(0|t));return S=a,+o},_compact:function(e,t,n){t|=0;var r,a=0,o=0,s=0,u=0,A=0,c=0,l=0,f=0,h=0,g=0,d=0,p=0,v=0,y=0,m=0,I=0,b=0,E=0,B=0,w=0,Q=0;if(!(n|=0))return 0|(w=0);if(a=0|i[(o=e|=0)>>2],!0&0==(15728640&(o=0|i[o+4>>2])|0)){if((0|n)<=0)return 0|(w=0);if(i[(w=t)>>2]=a,i[w+4>>2]=o,1==(0|n))return 0|(w=0);a=1;do{B=0|i[(E=e+(a<<3)|0)+4>>2],i[(w=t+(a<<3)|0)>>2]=i[E>>2],i[w+4>>2]=B,a=a+1|0}while((0|a)!=(0|n));return 0|(a=0)}if(!(B=0|vt(E=n<<3)))return 0|(w=-3);if(_t(0|B,0|e,0|E),!(r=0|mt(n,8)))return yt(B),0|(w=-3);a=n;e:for(;;){I=0|Bt(0|(f=0|i[(u=B)>>2]),0|(u=0|i[u+4>>2]),52),C(),b=(I&=15)+-1|0,m=(0|a)>0;t:do{if(m){if(y=((0|a)<0)<<31>>31,p=0|wt(0|b,0,52),v=0|C(),b>>>0>15)for(o=0,e=f,n=u;;){if(!(0==(0|e)&0==(0|n))){if(s=0|Bt(0|e,0|n,52),C(),A=(0|(s&=15))<(0|b),s=(0|s)==(0|b),n=0|Ct(0|(l=A?0:s?e:0),0|(e=A?0:s?n:0),0|a,0|y),C(),0==(0|(c=0|i[(A=s=r+(n<<3)|0)>>2]))&0==(0|(A=0|i[A+4>>2])))n=l;else for(p=0,d=n,g=A,n=l;;){if((0|p)>(0|a)){w=41;break e}if((0|c)==(0|n)&(-117440513&g|0)==(0|e)){l=0|Bt(0|c,0|g,56),C(),h=(l&=7)+1|0,v=0|Bt(0|c,0|g,45),C();n:do{if(0|N(127&v)){if(c=0|Bt(0|c,0|g,52),C(),!(c&=15)){A=6;break}for(A=1;;){if(!(0==((v=0|wt(7,0,3*(15-A|0)|0))&n|0)&0==((0|C())&e|0))){A=7;break n}if(!(A>>>0<c>>>0)){A=6;break}A=A+1|0}}else A=7}while(0);if((l+2|0)>>>0>A>>>0){w=51;break e}v=0|wt(0|h,0,56),e=0|C()|-117440513&e,i[(A=s)>>2]=0,i[A+4>>2]=0,A=d,n|=v}else A=(d+1|0)%(0|a)|0;if(0==(0|(c=0|i[(g=s=r+(A<<3)|0)>>2]))&0==(0|(g=0|i[g+4>>2])))break;p=p+1|0,d=A}i[(v=s)>>2]=n,i[v+4>>2]=e}if((0|(o=o+1|0))>=(0|a))break t;e=0|i[(n=B+(o<<3)|0)>>2],n=0|i[n+4>>2]}for(o=0,e=f,n=u;;){if(!(0==(0|e)&0==(0|n))){if(A=0|Bt(0|e,0|n,52),C(),(0|(A&=15))>=(0|b)){if((0|A)!=(0|b)&&(e|=p,n=-15728641&n|v,A>>>0>=I>>>0)){s=b;do{d=0|wt(7,0,3*(14-s|0)|0),s=s+1|0,e|=d,n=0|C()|n}while(s>>>0<A>>>0)}}else e=0,n=0;if(A=0|Ct(0|e,0|n,0|a,0|y),C(),!(0==(0|(l=0|i[(c=s=r+(A<<3)|0)>>2]))&0==(0|(c=0|i[c+4>>2]))))for(d=0;;){if((0|d)>(0|a)){w=41;break e}if((0|l)==(0|e)&(-117440513&c|0)==(0|n)){h=0|Bt(0|l,0|c,56),C(),g=(h&=7)+1|0,Q=0|Bt(0|l,0|c,45),C();n:do{if(0|N(127&Q)){if(l=0|Bt(0|l,0|c,52),C(),!(l&=15)){c=6;break}for(c=1;;){if(!(0==((Q=0|wt(7,0,3*(15-c|0)|0))&e|0)&0==((0|C())&n|0))){c=7;break n}if(!(c>>>0<l>>>0)){c=6;break}c=c+1|0}}else c=7}while(0);if((h+2|0)>>>0>c>>>0){w=51;break e}Q=0|wt(0|g,0,56),n=0|C()|-117440513&n,i[(g=s)>>2]=0,i[g+4>>2]=0,e|=Q}else A=(A+1|0)%(0|a)|0;if(0==(0|(l=0|i[(c=s=r+(A<<3)|0)>>2]))&0==(0|(c=0|i[c+4>>2])))break;d=d+1|0}i[(Q=s)>>2]=e,i[Q+4>>2]=n}if((0|(o=o+1|0))>=(0|a))break t;e=0|i[(n=B+(o<<3)|0)>>2],n=0|i[n+4>>2]}}}while(0);if((a+5|0)>>>0<11){w=99;break}if(!(v=0|mt((0|a)/6|0,8))){w=58;break}t:do{if(m){d=0,g=0;do{if(!(0==(0|(o=0|i[(e=A=r+(d<<3)|0)>>2]))&0==(0|(e=0|i[e+4>>2])))){c=0|Bt(0|o,0|e,56),C(),n=(c&=7)+1|0,l=-117440513&e,Q=0|Bt(0|o,0|e,45),C();n:do{if(0|N(127&Q)){if(h=0|Bt(0|o,0|e,52),C(),0|(h&=15))for(s=1;;){if(!(0==(o&(Q=0|wt(7,0,3*(15-s|0)|0))|0)&0==(l&(0|C())|0)))break n;if(!(s>>>0<h>>>0))break;s=s+1|0}o|=e=0|wt(0|n,0,56),e=0|C()|l,i[(n=A)>>2]=o,i[n+4>>2]=e,n=c+2|0}}while(0);7==(0|n)&&(i[(Q=v+(g<<3)|0)>>2]=o,i[Q+4>>2]=-117440513&e,g=g+1|0)}d=d+1|0}while((0|d)!=(0|a));if(m){if(p=((0|a)<0)<<31>>31,h=0|wt(0|b,0,52),d=0|C(),b>>>0>15)for(e=0,o=0;;){do{if(!(0==(0|f)&0==(0|u))){for(c=0|Bt(0|f,0|u,52),C(),s=(0|(c&=15))<(0|b),c=(0|c)==(0|b),s=0|Ct(0|(A=s?0:c?f:0),0|(c=s?0:c?u:0),0|a,0|p),C(),n=0;;){if((0|n)>(0|a)){w=98;break e}if((-117440513&(l=0|i[(Q=r+(s<<3)|0)+4>>2])|0)==(0|c)&&(0|i[Q>>2])==(0|A)){w=70;break}if((0|i[(Q=r+((s=(s+1|0)%(0|a)|0)<<3)|0)>>2])==(0|A)&&(0|i[Q+4>>2])==(0|c))break;n=n+1|0}if(70==(0|w)&&(w=0,!0&100663296==(117440512&l|0)))break;i[(Q=t+(o<<3)|0)>>2]=f,i[Q+4>>2]=u,o=o+1|0}}while(0);if((0|(e=e+1|0))>=(0|a)){a=g;break t}f=0|i[(u=B+(e<<3)|0)>>2],u=0|i[u+4>>2]}for(e=0,o=0;;){do{if(!(0==(0|f)&0==(0|u))){if(c=0|Bt(0|f,0|u,52),C(),(0|(c&=15))>=(0|b))if((0|c)!=(0|b))if(n=f|h,s=-15728641&u|d,c>>>0<I>>>0)c=s;else{A=b;do{Q=0|wt(7,0,3*(14-A|0)|0),A=A+1|0,n|=Q,s=0|C()|s}while(A>>>0<c>>>0);c=s}else n=f,c=u;else n=0,c=0;for(A=0|Ct(0|n,0|c,0|a,0|p),C(),s=0;;){if((0|s)>(0|a)){w=98;break e}if((-117440513&(l=0|i[(Q=r+(A<<3)|0)+4>>2])|0)==(0|c)&&(0|i[Q>>2])==(0|n)){w=93;break}if((0|i[(Q=r+((A=(A+1|0)%(0|a)|0)<<3)|0)>>2])==(0|n)&&(0|i[Q+4>>2])==(0|c))break;s=s+1|0}if(93==(0|w)&&(w=0,!0&100663296==(117440512&l|0)))break;i[(Q=t+(o<<3)|0)>>2]=f,i[Q+4>>2]=u,o=o+1|0}}while(0);if((0|(e=e+1|0))>=(0|a)){a=g;break t}f=0|i[(u=B+(e<<3)|0)>>2],u=0|i[u+4>>2]}}else o=0,a=g}else o=0,a=0}while(0);if(xt(0|r,0,0|E),_t(0|B,0|v,a<<3|0),yt(v),!a)break;t=t+(o<<3)|0}return 41==(0|w)?(yt(B),yt(r),0|(Q=-1)):51==(0|w)?(yt(B),yt(r),0|(Q=-2)):58==(0|w)?(yt(B),yt(r),0|(Q=-3)):98==(0|w)?(yt(v),yt(B),yt(r),0|(Q=-1)):(99==(0|w)&&_t(0|t,0|B,a<<3|0),yt(B),yt(r),0|(Q=0))},_destroyLinkedPolygon:function(e){var t=0,n=0,r=0,a=0;if(e|=0)for(r=1;;){if(0|(t=0|i[e>>2]))do{if(0|(n=0|i[t>>2]))do{a=n,n=0|i[n+16>>2],yt(a)}while(0!=(0|n));a=t,t=0|i[t+8>>2],yt(a)}while(0!=(0|t));if(t=e,e=0|i[e+8>>2],r||yt(t),!e)break;r=0}},_edgeLengthKm:function(e){return+ +a[20752+((e|=0)<<3)>>3]},_edgeLengthM:function(e){return+ +a[20880+((e|=0)<<3)>>3]},_emscripten_replace_memory:function(e){return r=new Int8Array(e),new Uint8Array(e),i=new Int32Array(e),new Float32Array(e),a=new Float64Array(e),n=e,!0},_exactEdgeLengthKm:function(e,t){var n,r,o=0,s=0,u=0,c=0,h=0,g=0;if(r=S,S=S+176|0,Ke(e|=0,t|=0,n=r),(0|(e=0|i[n>>2]))<=1)return S=r,+(u=0);t=e+-1|0,e=0,o=0,s=+a[n+8>>3],u=+a[n+16>>3];do{h=s,s=+a[n+8+((e=e+1|0)<<4)>>3],g=+f(.5*(s-h)),c=u,u=+a[n+8+(e<<4)+8>>3],c=g*g+(c=+f(.5*(u-c)))*(+l(+h)*+l(+s)*c),o+=2*+v(+ +A(+c),+ +A(+(1-c)))}while((0|e)!=(0|t));return S=r,+(g=6371.007180918475*o)},_exactEdgeLengthM:function(e,t){var n,r,o=0,s=0,u=0,c=0,h=0,g=0;if(r=S,S=S+176|0,Ke(e|=0,t|=0,n=r),(0|(e=0|i[n>>2]))<=1)return S=r,+(u=0);t=e+-1|0,e=0,o=0,s=+a[n+8>>3],u=+a[n+16>>3];do{h=s,s=+a[n+8+((e=e+1|0)<<4)>>3],g=+f(.5*(s-h)),c=u,u=+a[n+8+(e<<4)+8>>3],c=g*g+(c=+f(.5*(u-c)))*(+l(+h)*+l(+s)*c),o+=2*+v(+ +A(+c),+ +A(+(1-c)))}while((0|e)!=(0|t));return S=r,+(g=6371.007180918475*o*1e3)},_exactEdgeLengthRads:function(e,t){var n,r,o=0,s=0,u=0,c=0,h=0,g=0;if(r=S,S=S+176|0,Ke(e|=0,t|=0,n=r),(0|(e=0|i[n>>2]))<=1)return S=r,+(u=0);t=e+-1|0,e=0,o=0,s=+a[n+8>>3],u=+a[n+16>>3];do{h=s,s=+a[n+8+((e=e+1|0)<<4)>>3],g=+f(.5*(s-h)),c=u,u=+a[n+8+(e<<4)+8>>3],c=g*g+(c=+f(.5*(u-c)))*(+l(+s)*+l(+h)*c),o+=2*+v(+ +A(+c),+ +A(+(1-c)))}while((0|e)<(0|t));return S=r,+o},_experimentalH3ToLocalIj:function(e,t,n,r,i){var a,o;return i|=0,o=S,S=S+16|0,(e=0|$e(e|=0,t|=0,n|=0,r|=0,a=o))||(he(a,i),e=0),S=o,0|e},_experimentalLocalIjToH3:function(e,t,n,r){var i,a;return e|=0,t|=0,r|=0,i=S,S=S+16|0,ge(n|=0,a=i),r=0|et(e,t,a,r),S=i,0|r},_free:yt,_geoToH3:Ue,_getDestinationH3IndexFromUnidirectionalEdge:function(e,t){e|=0;var n,r,a=0;return n=S,S=S+16|0,a=n,!0&268435456==(2013265920&(t|=0)|0)?(r=0|Bt(0|e,0|t,56),C(),i[a>>2]=0,a=0|j(e,-2130706433&t|134217728,7&r,a),t=0|C(),E(0|t),S=n,0|a):(a=0,E(0|(t=0)),S=n,0|a)},_getH3IndexesFromUnidirectionalEdge:function(e,t,n){e|=0;var r,a,o,s,u=0;o=S,S=S+16|0,r=o,s=!0&268435456==(2013265920&(t|=0)|0),a=-2130706433&t|134217728,i[(u=n|=0)>>2]=s?e:0,i[u+4>>2]=s?a:0,s?(t=0|Bt(0|e,0|t,56),C(),i[r>>2]=0,e=0|j(e,a,7&t,r),t=0|C()):(e=0,t=0),i[(u=n+8|0)>>2]=e,i[u+4>>2]=t,S=o},_getH3UnidirectionalEdge:function(e,t,n,r){var a,o,s=0,u=0,A=0,c=0,l=0;if(o=S,S=S+16|0,a=o,!(0|ze(e|=0,t|=0,n|=0,r|=0)))return c=0,E(0|(A=0)),S=o,0|c;for(A=-2130706433&t,s=(s=0==(0|je(e,t)))?1:2;i[a>>2]=0,u=s+1|0,!((0|(l=0|j(e,t,s,a)))==(0|n)&(0|C())==(0|r));){if(!(u>>>0<7)){s=0,e=0,c=6;break}s=u}return 6==(0|c)?(E(0|s),S=o,0|e):(l=0|wt(0|s,0,56),c=0|A|C()|268435456,l|=e,E(0|c),S=o,0|l)},_getH3UnidirectionalEdgeBoundary:Ke,_getH3UnidirectionalEdgesFromHexagon:function(e,t,n){n|=0;var r,a=0;r=0==(0|je(e|=0,t|=0)),t&=-2130706433,i[(a=n)>>2]=r?e:0,i[a+4>>2]=r?285212672|t:0,i[(a=n+8|0)>>2]=e,i[a+4>>2]=301989888|t,i[(a=n+16|0)>>2]=e,i[a+4>>2]=318767104|t,i[(a=n+24|0)>>2]=e,i[a+4>>2]=335544320|t,i[(a=n+32|0)>>2]=e,i[a+4>>2]=352321536|t,i[(n=n+40|0)>>2]=e,i[n+4>>2]=369098752|t},_getOriginH3IndexFromUnidirectionalEdge:function(e,t){var n;return e|=0,E(0|((n=!0&268435456==(2013265920&(t|=0)|0))?-2130706433&t|134217728:0)),0|(n?e:0)},_getPentagonIndexes:Je,_getRes0Indexes:function(e){e|=0;var t=0,n=0,r=0;t=0;do{wt(0|t,0,45),r=134225919|C(),i[(n=e+(t<<3)|0)>>2]=-1,i[n+4>>2]=r,t=t+1|0}while(122!=(0|t))},_h3Distance:function(e,t,n,r){var i,a,o;return n|=0,r|=0,o=S,S=S+32|0,a=o,e=0==(0|$e(e|=0,t|=0,e,t,i=o+12|0))&&0==(0|$e(e,t,n,r,a))?0|fe(i,a):-1,S=o,0|e},_h3GetBaseCell:Se,_h3GetFaces:function e(t,n,r){r|=0;var a,o=0,s=0,u=0,A=0,c=0,l=0,f=0,h=0;a=S,S=S+128|0,f=a+112|0,u=a+96|0,h=a,s=0|Bt(0|(t|=0),0|(n|=0),52),C(),c=15&s,i[f>>2]=c,A=0|Bt(0|t,0|n,45),C(),A&=127;e:do{if(0|N(A)){if(0|c)for(o=1;;){if(!(0==((l=0|wt(7,0,3*(15-o|0)|0))&t|0)&0==((0|C())&n|0))){s=0;break e}if(!(o>>>0<c>>>0))break;o=o+1|0}if(!(1&s))return l=0|wt(c+1|0,0,52),h=0|C()|-15728641&n,e((l|t)&~(f=0|wt(7,0,3*(14-c|0)|0)),h&~(0|C()),r),void(S=a);s=1}else s=0}while(0);qe(t,n,u),s?(be(u,f,h),l=5):(we(u,f,h),l=6);e:do{if(0|N(A))if(c)for(o=1;;){if(!(0==((A=0|wt(7,0,3*(15-o|0)|0))&t|0)&0==((0|C())&n|0))){o=8;break e}if(!(o>>>0<c>>>0)){o=20;break}o=o+1|0}else o=20;else o=8}while(0);if(xt(0|r,-1,0|o),s){s=0;do{for(Ce(u=h+(s<<4)|0,0|i[f>>2]),u=0|i[u>>2],o=0;!(-1==(0|(c=0|i[(A=r+(o<<2)|0)>>2]))|(0|c)==(0|u));)o=o+1|0;i[A>>2]=u,s=s+1|0}while((0|s)!=(0|l))}else{s=0;do{for(Ee(u=h+(s<<4)|0,0|i[f>>2],0,1),u=0|i[u>>2],o=0;!(-1==(0|(c=0|i[(A=r+(o<<2)|0)>>2]))|(0|c)==(0|u));)o=o+1|0;i[A>>2]=u,s=s+1|0}while((0|s)!=(0|l))}S=a},_h3IndexesAreNeighbors:ze,_h3IsPentagon:je,_h3IsResClassIII:function(e,t){return t=0|Bt(0|(e|=0),0|(t|=0),52),C(),1&t|0},_h3IsValid:Oe,_h3Line:function(e,t,n,r,a){n|=0,r|=0,a|=0;var o,s=0,A=0,c=0,l=0,f=0,h=0,g=0,d=0,p=0,v=0,y=0,m=0,I=0,b=0,E=0,C=0,B=0;if(o=S,S=S+48|0,A=o+12|0,C=o,0==(0|$e(e|=0,t|=0,e,t,s=o+24|0))&&0==(0|$e(e,t,n,r,A))){if((0|(E=0|fe(s,A)))<0)return S=o,0|(C=E);for(i[s>>2]=0,i[s+4>>2]=0,i[s+8>>2]=0,i[A>>2]=0,i[A+4>>2]=0,i[A+8>>2]=0,$e(e,t,e,t,s),$e(e,t,n,r,A),de(s),de(A),E?(p=+(0|E),b=s,n=h=0|i[s>>2],r=g=0|i[(m=s+4|0)>>2],s=d=0|i[(I=s+8|0)>>2],v=+((0|i[A>>2])-h|0)/p,y=+((0|i[A+4>>2])-g|0)/p,p=+((0|i[A+8>>2])-d|0)/p):(m=r=s+4|0,I=d=s+8|0,b=s,n=0|i[s>>2],r=0|i[r>>2],s=0|i[d>>2],v=0,y=0,p=0),i[C>>2]=n,i[(d=C+4|0)>>2]=r,i[(g=C+8|0)>>2]=s,h=0;;){B=v*(l=+(0|h))+ +(0|n),c=y*l+ +(0|i[m>>2]),l=p*l+ +(0|i[I>>2]),r=~~+kt(+B),A=~~+kt(+c),n=~~+kt(+l),B=+u(+(+(0|r)-B)),c=+u(+(+(0|A)-c)),l=+u(+(+(0|n)-l));do{if(!(B>c&B>l)){if(f=0-r|0,c>l){s=f-n|0;break}s=A,n=f-A|0;break}r=0-(A+n)|0,s=A}while(0);if(i[C>>2]=r,i[d>>2]=s,i[g>>2]=n,pe(C),et(e,t,C,a+(h<<3)|0),(0|h)==(0|E))break;h=h+1|0,n=0|i[b>>2]}return S=o,0|(C=0)}return S=o,0|(C=-1)},_h3LineSize:function(e,t,n,r){var i,a,o;return n|=0,r|=0,o=S,S=S+32|0,a=o,e=0==(0|$e(e|=0,t|=0,e,t,i=o+12|0))&&0==(0|$e(e,t,n,r,a))?0|fe(i,a):-1,S=o,(e>>>31^1)+e|0},_h3SetToLinkedGeo:function(e,t,n){n|=0;var r,a,o,s=0;if(o=S,S=S+32|0,r=o,function(e,t,n){e|=0,n|=0;var r,a,o=0,s=0,u=0,A=0,c=0;if(a=S,S=S+176|0,r=a,(0|(t|=0))<1)return At(n,0,0),void(S=a);A=0|Bt(0|i[(A=e)>>2],0|i[A+4>>2],52),C(),At(n,(0|t)>6?t:6,15&A),A=0;do{if(Ye(0|i[(o=e+(A<<3)|0)>>2],0|i[o+4>>2],r),(0|(o=0|i[r>>2]))>0){c=0;do{u=r+8+(c<<4)|0,(s=0|gt(n,o=r+8+(((0|(c=c+1|0))%(0|o)|0)<<4)|0,u))?ft(n,s):ht(n,u,o),o=0|i[r>>2]}while((0|c)<(0|o))}A=A+1|0}while((0|A)!=(0|t));S=a}(e|=0,t|=0,a=o+16|0),i[n>>2]=0,i[n+4>>2]=0,i[n+8>>2]=0,!(e=0|lt(a)))return Xe(n),ct(a),void(S=o);do{t=0|We(n);do{Ve(t,e),s=e+16|0,i[r>>2]=i[s>>2],i[r+4>>2]=i[s+4>>2],i[r+8>>2]=i[s+8>>2],i[r+12>>2]=i[s+12>>2],ft(a,e),e=0|dt(a,r)}while(0!=(0|e));e=0|lt(a)}while(0!=(0|e));Xe(n),ct(a),S=o},_h3ToCenterChild:function(e,t,n){n|=0;var r=0,i=0;if(r=0|Bt(0|(e|=0),0|(t|=0),52),C(),(0|n)<16&(0|(r&=15))<=(0|n)){if((0|r)!=(0|n)&&(e|=i=0|wt(0|n,0,52),t=0|C()|-15728641&t,(0|r)<(0|n)))do{i=0|wt(7,0,3*(14-r|0)|0),r=r+1|0,e&=~i,t&=~(0|C())}while((0|r)<(0|n))}else t=0,e=0;return E(0|t),0|e},_h3ToChildren:Re,_h3ToGeo:He,_h3ToGeoBoundary:Ye,_h3ToParent:De,_h3UnidirectionalEdgeIsValid:function(e,t){var n=0;if(!(!0&268435456==(2013265920&(t|=0)|0)))return 0|(n=0);switch(n=0|Bt(0|(e|=0),0|t,56),C(),7&n){case 0:case 7:return 0|(n=0)}return!0&16777216==(117440512&t|0)&0!=(0|je(e,n=-2130706433&t|134217728))?0|(n=0):0|(n=0|Oe(e,n))},_hexAreaKm2:function(e){return+ +a[20496+((e|=0)<<3)>>3]},_hexAreaM2:function(e){return+ +a[20624+((e|=0)<<3)>>3]},_hexRing:function(e,t,n,r){e|=0,t|=0,r|=0;var a,o=0,s=0,u=0,A=0,c=0,l=0,f=0;if(a=S,S=S+16|0,f=a,!(n|=0))return i[(f=r)>>2]=e,i[f+4>>2]=t,S=a,0|(f=0);i[f>>2]=0;e:do{if(0|je(e,t))e=1;else{if(s=(0|n)>0){o=0,l=e;do{if(0==(0|(l=0|j(l,t,4,f)))&0==(0|(t=0|C()))){e=2;break e}if(o=o+1|0,0|je(l,t)){e=1;break e}}while((0|o)<(0|n));if(i[(c=r)>>2]=l,i[c+4>>2]=t,c=n+-1|0,s){s=0,u=1,o=l,e=t;do{if(0==(0|(o=0|j(o,e,2,f)))&0==(0|(e=0|C()))){e=2;break e}if(i[(A=r+(u<<3)|0)>>2]=o,i[A+4>>2]=e,u=u+1|0,0|je(o,e)){e=1;break e}s=s+1|0}while((0|s)<(0|n));A=0,s=u;do{if(0==(0|(o=0|j(o,e,3,f)))&0==(0|(e=0|C()))){e=2;break e}if(i[(u=r+(s<<3)|0)>>2]=o,i[u+4>>2]=e,s=s+1|0,0|je(o,e)){e=1;break e}A=A+1|0}while((0|A)<(0|n));u=0;do{if(0==(0|(o=0|j(o,e,1,f)))&0==(0|(e=0|C()))){e=2;break e}if(i[(A=r+(s<<3)|0)>>2]=o,i[A+4>>2]=e,s=s+1|0,0|je(o,e)){e=1;break e}u=u+1|0}while((0|u)<(0|n));u=0;do{if(0==(0|(o=0|j(o,e,5,f)))&0==(0|(e=0|C()))){e=2;break e}if(i[(A=r+(s<<3)|0)>>2]=o,i[A+4>>2]=e,s=s+1|0,0|je(o,e)){e=1;break e}u=u+1|0}while((0|u)<(0|n));u=0;do{if(0==(0|(o=0|j(o,e,4,f)))&0==(0|(e=0|C()))){e=2;break e}if(i[(A=r+(s<<3)|0)>>2]=o,i[A+4>>2]=e,s=s+1|0,0|je(o,e)){e=1;break e}u=u+1|0}while((0|u)<(0|n));for(u=0;;){if(0==(0|(o=0|j(o,e,6,f)))&0==(0|(e=0|C()))){e=2;break e}if((0|u)!=(0|c)){if(i[(A=r+(s<<3)|0)>>2]=o,i[A+4>>2]=e,0|je(o,e)){e=1;break e}s=s+1|0}if((0|(u=u+1|0))>=(0|n)){u=l,s=t;break}}}else u=l,o=l,s=t,e=t}else i[(u=r)>>2]=e,i[u+4>>2]=t,u=e,o=e,s=t,e=t;e=1&((0|u)!=(0|o)|(0|s)!=(0|e))}}while(0);return S=a,0|(f=e)},_i64Subtract:It,_kRing:O,_kRingDistances:function(e,t,n,r,i){var a;if(0|D(e|=0,t|=0,n|=0,r|=0,i|=0)){if(xt(0|r,0,(a=1+(0|m(3*n|0,n+1|0))|0)<<3|0),0|i)return xt(0|i,0,a<<2|0),void R(e,t,n,r,i,a,0);(i=0|mt(a,4))&&(R(e,t,n,r,i,a,0),yt(i))}},_llvm_minnum_f64:Qt,_llvm_round_f64:kt,_malloc:vt,_maxFaceCount:function(e,t){var n=0,r=0;if(r=0|Bt(0|(e|=0),0|(t|=0),45),C(),!(0|N(127&r)))return 0|(r=2);if(r=0|Bt(0|e,0|t,52),C(),!(r&=15))return 0|(r=5);for(n=1;;){if(!(0==((0|wt(7,0,3*(15-n|0)|0))&e|0)&0==((0|C())&t|0))){n=2,e=6;break}if(!(n>>>0<r>>>0)){n=5,e=6;break}n=n+1|0}return 6==(0|e)?0|n:0},_maxH3ToChildrenSize:function(e,t,n){return n|=0,e=0|Bt(0|(e|=0),0|(t|=0),52),C(),(0|n)<16&(0|(e&=15))<=(0|n)?0|(n=0|tt(7,n-e|0)):0|(n=0)},_maxKringSize:function(e){return 1+(0|m(3*(e|=0)|0,e+1|0))|0},_maxPolyfillSize:function(e,t){t|=0;var n,r=0,a=0,o=0,s=0,u=0;if(n=S,S=S+48|0,o=n+8|0,a=n,s=0|i[(u=e|=0)+4>>2],i[(r=a)>>2]=i[u>>2],i[r+4>>2]=s,rt(a,o),o=0|Y(o,t),t=0|i[a>>2],(0|(a=0|i[e+8>>2]))<=0)return S=n,0|(u=(u=(s=(0|o)<(0|(u=t)))?u:o)+12|0);r=0|i[e+12>>2],e=0;do{t=(0|i[r+(e<<3)>>2])+t|0,e=e+1|0}while((0|e)<(0|a));return S=n,0|(u=(u=(u=(0|o)<(0|t))?t:o)+12|0)},_maxUncompactSize:function(e,t,n){e|=0,n|=0;var r=0,a=0,o=0,s=0;if((0|(t|=0))<=0)return 0|(n=0);if((0|n)>=16){for(r=0;;){if(!(0==(0|i[(s=e+(r<<3)|0)>>2])&0==(0|i[s+4>>2]))){r=-1,a=13;break}if((0|(r=r+1|0))>=(0|t)){r=0,a=13;break}}if(13==(0|a))return 0|r}r=0,s=0;e:for(;;){o=0|i[(a=e+(s<<3)|0)>>2],a=0|i[a+4>>2];do{if(!(0==(0|o)&0==(0|a))){if(a=0|Bt(0|o,0|a,52),C(),(0|(a&=15))>(0|n)){r=-1,a=13;break e}if((0|a)==(0|n)){r=r+1|0;break}r=(0|tt(7,n-a|0))+r|0;break}}while(0);if((0|(s=s+1|0))>=(0|t)){a=13;break}}return 13==(0|a)?0|r:0},_memcpy:_t,_memset:xt,_numHexagons:function(e){var t;return e=0|i[(t=21008+((e|=0)<<3)|0)>>2],E(0|i[t+4>>2]),0|e},_pentagonIndexCount:function(){return 12},_pointDistKm:_e,_pointDistM:function(e,t){e|=0;var n,r,i,o=0;return r=+a[(t|=0)>>3],n=+a[e>>3],o=(i=+f(.5*(r-n)))*i+(o=+f(.5*(+a[t+8>>3]-+a[e+8>>3])))*(+l(+r)*+l(+n)*o),2*+v(+ +A(+o),+ +A(+(1-o)))*6371.007180918475*1e3},_pointDistRads:function(e,t){e|=0;var n,r,i,o=0;return r=+a[(t|=0)>>3],n=+a[e>>3],o=(i=+f(.5*(r-n)))*i+(o=+f(.5*(+a[t+8>>3]-+a[e+8>>3])))*(+l(+r)*+l(+n)*o),2*+v(+ +A(+o),+ +A(+(1-o)))},_polyfill:function(e,t,n){var r,a=0,o=0,s=0,u=0,A=0;if(r=S,S=S+48|0,a=r+8|0,o=r,0|function(e,t,n){t|=0,n|=0;var r,a,o,s,u,A=0,c=0,l=0,f=0,h=0,g=0,d=0,p=0,v=0,y=0,m=0,I=0,b=0,E=0,w=0,Q=0,k=0,_=0,x=0,O=0,j=0,N=0,F=0,T=0,L=0;u=S,S=S+112|0,a=u+80|0,g=u+72|0,o=u,s=u+56|0,(L=0|vt(32+(i[(d=(e=e|0)+8|0)>>2]<<5)|0))||B(22848,22448,800,22456);if(it(e,L),A=0|i[(l=e)+4>>2],i[(h=g)>>2]=i[l>>2],i[h+4>>2]=A,rt(g,a),h=0|Y(a,t),A=0|i[g>>2],(0|(l=0|i[d>>2]))>0){f=0|i[e+12>>2],c=0;do{A=(0|i[f+(c<<3)>>2])+A|0,c=c+1|0}while((0|c)!=(0|l))}if(c=0|mt(r=(h=(0|h)<(0|A)?A:h)+12|0,8),p=0|mt(r,8),i[a>>2]=0,T=0|i[(F=e)+4>>2],i[(A=g)>>2]=i[F>>2],i[A+4>>2]=T,0|(A=0|M(g,r,t,a,c,p)))return yt(c),yt(p),yt(L),S=u,0|(L=A);e:do{if((0|i[d>>2])>0){for(l=e+12|0,A=0;f=0|M((0|i[l>>2])+(A<<3)|0,r,t,a,c,p),A=A+1|0,!(0|f);)if((0|A)>=(0|i[d>>2]))break e;return yt(c),yt(p),yt(L),S=u,0|(L=f)}}while(0);(0|h)>-12&&xt(0|p,0,((0|r)>1?r:1)<<3|0);e:do{if((0|i[a>>2])>0){T=((0|r)<0)<<31>>31,_=c,x=p,O=c,j=c,N=p,F=c,A=c,E=c,w=p,Q=p,k=p,c=p;t:for(;;){for(b=0|i[a>>2],m=0,I=0,l=0;;){h=(f=o)+56|0;do{i[f>>2]=0,f=f+4|0}while((0|f)<(0|h));if(g=0|i[(t=_+(m<<3)|0)>>2],t=0|i[t+4>>2],0|D(g,t,1,o,0)){h=(f=o)+56|0;do{i[f>>2]=0,f=f+4|0}while((0|f)<(0|h));0|(f=0|mt(7,4))&&(R(g,t,1,o,f,7,0),yt(f))}y=0;do{p=0|i[(v=o+(y<<3)|0)>>2],v=0|i[v+4>>2];n:do{if(!(0==(0|p)&0==(0|v))){if(g=0|Ct(0|p,0|v,0|r,0|T),C(),t=0|i[(h=f=n+(g<<3)|0)>>2],h=0|i[h+4>>2],!(0==(0|t)&0==(0|h)))for(d=0;;){if((0|d)>(0|r))break t;if((0|t)==(0|p)&(0|h)==(0|v))break n;if(t=0|i[(h=f=n+((g=(g+1|0)%(0|r)|0)<<3)|0)>>2],h=0|i[h+4>>2],0==(0|t)&0==(0|h))break;d=d+1|0}0==(0|p)&0==(0|v)||(He(p,v,s),0|at(e,L,s)&&(i[(d=f)>>2]=p,i[d+4>>2]=v,i[(d=x+(l<<3)|0)>>2]=p,i[d+4>>2]=v,l=l+1|0))}}while(0);y=y+1|0}while(y>>>0<7);if((0|(I=I+1|0))>=(0|b))break;m=m+1|0}if((0|b)>0&&xt(0|O,0,b<<3|0),i[a>>2]=l,!((0|l)>0))break e;p=c,v=k,y=F,m=Q,I=w,b=x,c=E,k=A,Q=j,w=O,E=p,A=v,F=N,N=y,j=m,O=I,x=_,_=b}return yt(j),yt(N),yt(L),S=u,0|(L=-1)}A=p}while(0);return yt(L),yt(c),yt(A),S=u,0|(L=0)}(e|=0,t|=0,n|=0)){if(s=0|i[(A=e)+4>>2],i[(u=o)>>2]=i[A>>2],i[u+4>>2]=s,rt(o,a),u=0|Y(a,t),t=0|i[o>>2],(0|(s=0|i[e+8>>2]))>0){o=0|i[e+12>>2],a=0;do{t=(0|i[o+(a<<3)>>2])+t|0,a=a+1|0}while((0|a)!=(0|s))}(0|(t=(0|u)<(0|t)?t:u))<=-12||xt(0|n,0,8+(((0|(A=t+11|0))>0?A:0)<<3)|0),S=r}else S=r},_res0IndexCount:function(){return 122},_round:St,_sbrk:Ot,_sizeOfCoordIJ:function(){return 8},_sizeOfGeoBoundary:function(){return 168},_sizeOfGeoCoord:function(){return 16},_sizeOfGeoPolygon:function(){return 16},_sizeOfGeofence:function(){return 8},_sizeOfH3Index:function(){return 8},_sizeOfLinkedGeoPolygon:function(){return 12},_uncompact:function(e,t,n,r,a){e|=0,n|=0,r|=0,a|=0;var o=0,s=0,u=0,A=0,c=0,l=0;if((0|(t|=0))<=0)return 0|(a=0);if((0|a)>=16){for(o=0;;){if(!(0==(0|i[(l=e+(o<<3)|0)>>2])&0==(0|i[l+4>>2]))){o=14;break}if((0|(o=o+1|0))>=(0|t)){s=0,o=16;break}}if(14==(0|o))return 0|((0|r)>0?-2:-1);if(16==(0|o))return 0|s}o=0,l=0;e:for(;;){s=0|i[(u=c=e+(l<<3)|0)>>2],u=0|i[u+4>>2];do{if(!(0==(0|s)&0==(0|u))){if((0|o)>=(0|r)){s=-1,o=16;break e}if(A=0|Bt(0|s,0|u,52),C(),(0|(A&=15))>(0|a)){s=-2,o=16;break e}if((0|A)==(0|a)){i[(c=n+(o<<3)|0)>>2]=s,i[c+4>>2]=u,o=o+1|0;break}if((0|(s=(0|tt(7,a-A|0))+o|0))>(0|r)){s=-1,o=16;break e}Re(0|i[c>>2],0|i[c+4>>2],a,n+(o<<3)|0),o=s}}while(0);if((0|(l=l+1|0))>=(0|t)){s=0,o=16;break}}return 16==(0|o)?0|s:0},establishStackSpace:function(e,t){S=e|=0},stackAlloc:function(e){var t;return t=S,S=(S=S+(e|=0)|0)+15&-16,0|t},stackRestore:function(e){S=e|=0},stackSave:function(){return 0|S}}}({Math:Math,Int8Array:Int8Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Float32Array:Float32Array,Float64Array:Float64Array},{a:ue,b:function(e){A=e},c:c,d:function(e,t,n,r){ue("Assertion failed: "+d(e)+", at: "+[t?d(t):"unknown filename",n,r?d(r):"unknown function"])},e:function(e){return n.___errno_location&&(I[n.___errno_location()>>2]=e),e},f:J,g:function(e,t,n){y.set(y.subarray(t,t+n),e)},h:function(e){var t=J();if(e>2130706432)return!1;for(var n=Math.max(t,16777216);n<e;)n=n<=536870912?C(2*n,16777216):Math.min(C((3*n+2147483648)/4,16777216),2130706432);return!!z(n)},i:function(e){ue("OOM")},j:q,k:H,l:z,m:Y,n:function(){var e=Y();return n.extraStackTrace&&(e+="\n"+n.extraStackTrace()),H(e)},o:24032,p:24016},p),$=(n.___uremdi3=Z.___uremdi3,n._bitshift64Lshr=Z._bitshift64Lshr,n._bitshift64Shl=Z._bitshift64Shl,n._calloc=Z._calloc,n._cellAreaKm2=Z._cellAreaKm2,n._cellAreaM2=Z._cellAreaM2,n._cellAreaRads2=Z._cellAreaRads2,n._compact=Z._compact,n._destroyLinkedPolygon=Z._destroyLinkedPolygon,n._edgeLengthKm=Z._edgeLengthKm,n._edgeLengthM=Z._edgeLengthM,n._emscripten_replace_memory=Z._emscripten_replace_memory),ee=(n._exactEdgeLengthKm=Z._exactEdgeLengthKm,n._exactEdgeLengthM=Z._exactEdgeLengthM,n._exactEdgeLengthRads=Z._exactEdgeLengthRads,n._experimentalH3ToLocalIj=Z._experimentalH3ToLocalIj,n._experimentalLocalIjToH3=Z._experimentalLocalIjToH3,n._free=Z._free,n._geoToH3=Z._geoToH3,n._getDestinationH3IndexFromUnidirectionalEdge=Z._getDestinationH3IndexFromUnidirectionalEdge,n._getH3IndexesFromUnidirectionalEdge=Z._getH3IndexesFromUnidirectionalEdge,n._getH3UnidirectionalEdge=Z._getH3UnidirectionalEdge,n._getH3UnidirectionalEdgeBoundary=Z._getH3UnidirectionalEdgeBoundary,n._getH3UnidirectionalEdgesFromHexagon=Z._getH3UnidirectionalEdgesFromHexagon,n._getOriginH3IndexFromUnidirectionalEdge=Z._getOriginH3IndexFromUnidirectionalEdge,n._getPentagonIndexes=Z._getPentagonIndexes,n._getRes0Indexes=Z._getRes0Indexes,n._h3Distance=Z._h3Distance,n._h3GetBaseCell=Z._h3GetBaseCell,n._h3GetFaces=Z._h3GetFaces,n._h3IndexesAreNeighbors=Z._h3IndexesAreNeighbors,n._h3IsPentagon=Z._h3IsPentagon,n._h3IsResClassIII=Z._h3IsResClassIII,n._h3IsValid=Z._h3IsValid,n._h3Line=Z._h3Line,n._h3LineSize=Z._h3LineSize,n._h3SetToLinkedGeo=Z._h3SetToLinkedGeo,n._h3ToCenterChild=Z._h3ToCenterChild,n._h3ToChildren=Z._h3ToChildren,n._h3ToGeo=Z._h3ToGeo,n._h3ToGeoBoundary=Z._h3ToGeoBoundary,n._h3ToParent=Z._h3ToParent,n._h3UnidirectionalEdgeIsValid=Z._h3UnidirectionalEdgeIsValid,n._hexAreaKm2=Z._hexAreaKm2,n._hexAreaM2=Z._hexAreaM2,n._hexRing=Z._hexRing,n._i64Subtract=Z._i64Subtract,n._kRing=Z._kRing,n._kRingDistances=Z._kRingDistances,n._llvm_minnum_f64=Z._llvm_minnum_f64,n._llvm_round_f64=Z._llvm_round_f64,n._malloc=Z._malloc,n._maxFaceCount=Z._maxFaceCount,n._maxH3ToChildrenSize=Z._maxH3ToChildrenSize,n._maxKringSize=Z._maxKringSize,n._maxPolyfillSize=Z._maxPolyfillSize,n._maxUncompactSize=Z._maxUncompactSize,n._memcpy=Z._memcpy,n._memset=Z._memset,n._numHexagons=Z._numHexagons,n._pentagonIndexCount=Z._pentagonIndexCount,n._pointDistKm=Z._pointDistKm,n._pointDistM=Z._pointDistM,n._pointDistRads=Z._pointDistRads,n._polyfill=Z._polyfill,n._res0IndexCount=Z._res0IndexCount,n._round=Z._round,n._sbrk=Z._sbrk,n._sizeOfCoordIJ=Z._sizeOfCoordIJ,n._sizeOfGeoBoundary=Z._sizeOfGeoBoundary,n._sizeOfGeoCoord=Z._sizeOfGeoCoord,n._sizeOfGeoPolygon=Z._sizeOfGeoPolygon,n._sizeOfGeofence=Z._sizeOfGeofence,n._sizeOfH3Index=Z._sizeOfH3Index,n._sizeOfLinkedGeoPolygon=Z._sizeOfLinkedGeoPolygon,n._uncompact=Z._uncompact,n.establishStackSpace=Z.establishStackSpace,n.stackAlloc=Z.stackAlloc),te=n.stackRestore=Z.stackRestore,ne=n.stackSave=Z.stackSave;if(n.asm=Z,n.cwrap=function(e,t,n,r){var i=(n=n||[]).every((function(e){return"number"===e}));return"string"!==t&&i&&!r?f(e):function(){return h(e,t,n,arguments)}},n.setValue=function(e,t,n,r){switch("*"===(n=n||"i8").charAt(n.length-1)&&(n="i32"),n){case"i1":case"i8":v[e>>0]=t;break;case"i16":m[e>>1]=t;break;case"i32":I[e>>2]=t;break;case"i64":L=[t>>>0,(T=t,+O(T)>=1?T>0?(0|j(+R(T/4294967296),4294967295))>>>0:~~+D((T-+(~~T>>>0))/4294967296)>>>0:0)],I[e>>2]=L[0],I[e+4>>2]=L[1];break;case"float":b[e>>2]=t;break;case"double":E[e>>3]=t;break;default:ue("invalid type for setValue: "+n)}},n.getValue=function(e,t,n){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return v[e>>0];case"i16":return m[e>>1];case"i32":case"i64":return I[e>>2];case"float":return b[e>>2];case"double":return E[e>>3];default:ue("invalid type for getValue: "+t)}return null},n.getTempRet0=c,P){G(P)||(V=P,P=n.locateFile?n.locateFile(V,o):o+V),M++,n.monitorRunDependencies&&n.monitorRunDependencies(M);var re=function(e){e.byteLength&&(e=new Uint8Array(e)),y.set(e,8),n.memoryInitializerRequest&&delete n.memoryInitializerRequest.response,function(e){if(M--,n.monitorRunDependencies&&n.monitorRunDependencies(M),0==M&&(null!==N&&(clearInterval(N),N=null),F)){var t=F;F=null,t()}}()},ie=function(){i(P,re,(function(){throw"could not load memory initializer "+P}))},ae=W(P);if(ae)re(ae.buffer);else if(n.memoryInitializerRequest){var oe=function(){var e=n.memoryInitializerRequest,t=e.response;if(200!==e.status&&0!==e.status){var r=W(n.memoryInitializerRequestURL);if(!r)return console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+e.status+", retrying "+P),void ie();t=r.buffer}re(t)};n.memoryInitializerRequest.response?setTimeout(oe,0):n.memoryInitializerRequest.addEventListener("load",oe)}else ie()}function se(e){function t(){X||(X=!0,l||(Q(_),Q(x),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)e=n.postRun.shift(),S.unshift(e);var e;Q(S)}()))}e=e||a,M>0||(!function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)e=n.preRun.shift(),k.unshift(e);var e;Q(k)}(),M>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),t()}),1)):t()))}function ue(e){throw n.onAbort&&n.onAbort(e),s(e+=""),u(e),l=!0,"abort("+e+"). Build with -s ASSERTIONS=1 for more info."}if(F=function e(){X||se(),X||(F=e)},n.run=se,n.abort=ue,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return se(),e}("object"===typeof r?r:{}),i="number",a={};[["sizeOfH3Index",i],["sizeOfGeoCoord",i],["sizeOfGeoBoundary",i],["sizeOfGeoPolygon",i],["sizeOfGeofence",i],["sizeOfLinkedGeoPolygon",i],["sizeOfCoordIJ",i],["h3IsValid","number",["number","number"]],["geoToH3","number",[i,i,"number"]],["h3ToGeo",null,["number","number",i]],["h3ToGeoBoundary",null,["number","number",i]],["maxKringSize",i,[i]],["kRing",null,["number","number",i,i]],["kRingDistances",null,["number","number",i,i,i]],["hexRing",null,["number","number",i,i]],["maxPolyfillSize",i,[i,"number"]],["polyfill",null,[i,"number",i]],["h3SetToLinkedGeo",null,[i,i,i]],["destroyLinkedPolygon",null,[i]],["compact",i,[i,i,i]],["uncompact",i,[i,i,i,i,"number"]],["maxUncompactSize",i,[i,i,"number"]],["h3IsPentagon","number",["number","number"]],["h3IsResClassIII","number",["number","number"]],["h3GetBaseCell",i,["number","number"]],["maxFaceCount",i,["number","number"]],["h3GetFaces",null,["number","number",i]],["h3ToParent","number",["number","number","number"]],["h3ToChildren",null,["number","number","number",i]],["h3ToCenterChild","number",["number","number","number"]],["maxH3ToChildrenSize",i,["number","number","number"]],["h3IndexesAreNeighbors","number",["number","number","number","number"]],["getH3UnidirectionalEdge","number",["number","number","number","number"]],["getOriginH3IndexFromUnidirectionalEdge","number",["number","number"]],["getDestinationH3IndexFromUnidirectionalEdge","number",["number","number"]],["h3UnidirectionalEdgeIsValid","number",["number","number"]],["getH3IndexesFromUnidirectionalEdge",null,["number","number",i]],["getH3UnidirectionalEdgesFromHexagon",null,["number","number",i]],["getH3UnidirectionalEdgeBoundary",null,["number","number",i]],["h3Distance",i,["number","number","number","number"]],["h3Line",i,["number","number","number","number",i]],["h3LineSize",i,["number","number","number","number"]],["experimentalH3ToLocalIj",i,["number","number","number","number",i]],["experimentalLocalIjToH3",i,["number","number",i,i]],["hexAreaM2",i,["number"]],["hexAreaKm2",i,["number"]],["edgeLengthM",i,["number"]],["edgeLengthKm",i,["number"]],["pointDistM",i,[i,i]],["pointDistKm",i,[i,i]],["pointDistRads",i,[i,i]],["cellAreaM2",i,["number","number"]],["cellAreaKm2",i,["number","number"]],["cellAreaRads2",i,["number","number"]],["exactEdgeLengthM",i,["number","number"]],["exactEdgeLengthKm",i,["number","number"]],["exactEdgeLengthRads",i,["number","number"]],["numHexagons",i,["number"]],["getRes0Indexes",null,[i]],["res0IndexCount",i],["getPentagonIndexes",null,[i,i]],["pentagonIndexCount",i]].forEach((function(e){a[e[0]]=r.cwrap.apply(r,e)}));var o=a.sizeOfH3Index(),s=a.sizeOfGeoCoord(),u=a.sizeOfGeoBoundary(),A=a.sizeOfGeoPolygon(),c=a.sizeOfGeofence(),l=a.sizeOfLinkedGeoPolygon(),f=a.sizeOfCoordIJ(),h={m:"m",m2:"m2",km:"km",km2:"km2",rads:"rads",rads2:"rads2"};function g(e){if("number"!==typeof e||e<0||e>15||Math.floor(e)!==e)throw new Error("Invalid resolution: "+e)}var d=/[^0-9a-fA-F]/;function p(e){if(Array.isArray(e)&&2===e.length&&Number.isInteger(e[0])&&Number.isInteger(e[1]))return e;if("string"!==typeof e||d.test(e))return[0,0];var t=parseInt(e.substring(0,e.length-8),16);return[parseInt(e.substring(e.length-8),16),t]}function v(e){if(e>=0)return e.toString(16);var t=m(8,(e&=2147483647).toString(16));return t=(parseInt(t[0],16)+8).toString(16)+t.substring(1)}function y(e,t){return v(t)+m(8,v(e))}function m(e,t){for(var n=e-t.length,r="",i=0;i<n;i++)r+="0";return r+=t}function I(e,t,n){for(var i=e.length,a=r._calloc(i,s),o=n?1:0,u=n?0:1,A=0;A<2*i;A+=2)r.HEAPF64.set([e[A/2][o],e[A/2][u]].map(ve),a/8+A);return r.HEAPU32.set([i,a],t/4),t}function b(e){return[e,r.getTempRet0()]}function E(e){var t=b(e),n=t[0],r=t[1];return r?y(n,r):null}function C(e,t){void 0===t&&(t=0);var n=r.getValue(e+4*t*2,"i32"),i=r.getValue(e+4*(2*t+1),"i32");return i?y(n,i):null}function B(e,t,n){r.HEAPU32.set(p(e),t/4+2*n)}function w(e,t){for(var n=[],r=0;r<t;r++){var i=C(e,r);null!==i&&n.push(i)}return n}function Q(e,t){for(var n=t.length,r=0;r<n;r++)B(t[r],e,r)}function k(e,t){var n=r._calloc(1,s);return r.HEAPF64.set([e,t].map(ve),n/8),n}function _(e){return ye(r.getValue(e,"double"))}function x(e){return[_(e),_(e+8)]}function S(e){return[_(e+8),_(e)]}function O(e,t,n){for(var i=r.getValue(e,"i32"),a=e+8,o=[],s=t?S:x,u=0;u<2*i;u+=2)o.push(s(a+8*u));return n&&o.push(o[0]),o}function D(e){var t=p(e),n=t[0],r=t[1];return Boolean(a.h3IsValid(n,r))}function R(e){var t=p(e),n=t[0],r=t[1];return Boolean(a.h3IsPentagon(n,r))}function j(e){var t=p(e),n=t[0],r=t[1];return Boolean(a.h3IsResClassIII(n,r))}function M(e){var t=p(e),n=t[0],r=t[1];return a.h3GetBaseCell(n,r)}function N(e){var t=p(e),n=t[0],i=t[1],o=a.maxFaceCount(n,i),s=r._malloc(4*o);a.h3GetFaces(n,i,s);var u=function(e,t){for(var n=[],i=0;i<t;i++){var a=r.getValue(e+4*i,"i32");a>=0&&n.push(a)}return n}(s,o);return r._free(s),u}function F(e){return"string"!==typeof e?-1:parseInt(e.charAt(1),16)}function T(e,t,n){var i=r._malloc(s);r.HEAPF64.set([e,t].map(ve),i/8);var o=E(a.geoToH3(i,n));return r._free(i),o}function L(e){var t=r._malloc(s),n=p(e),i=n[0],o=n[1];a.h3ToGeo(i,o,t);var u=x(t);return r._free(t),u}function P(e,t){var n=r._malloc(u),i=p(e),o=i[0],s=i[1];a.h3ToGeoBoundary(o,s,n);var A=O(n,t,t);return r._free(n),A}function U(e,t){var n=p(e),r=n[0],i=n[1];return E(a.h3ToParent(r,i,t))}function G(e,t){if(!D(e))return[];var n=p(e),i=n[0],s=n[1],u=a.maxH3ToChildrenSize(i,s,t),A=r._calloc(u,o);a.h3ToChildren(i,s,t,A);var c=w(A,u);return r._free(A),c}function q(e,t){var n=p(e),r=n[0],i=n[1];return E(a.h3ToCenterChild(r,i,t))}function H(e,t){var n=p(e),i=n[0],s=n[1],u=a.maxKringSize(t),A=r._calloc(u,o);a.kRing(i,s,t,A);var c=w(A,u);return r._free(A),c}function Y(e,t){var n=p(e),i=n[0],s=n[1],u=a.maxKringSize(t),A=r._calloc(u,o),c=r._calloc(u,4);a.kRingDistances(i,s,t,A,c);for(var l=[],f=0;f<t+1;f++)l.push([]);for(var h=0;h<2*u;h+=2){var g=r.getValue(A+4*h,"i32"),d=r.getValue(A+4*(h+1),"i32"),v=r.getValue(c+h/2*4,"i32");0===g&&0===d||l[v].push(y(g,d))}return r._free(A),r._free(c),l}function J(e,t){var n=0===t?1:6*t,i=r._calloc(n,o);if(0!==a.hexRing.apply(a,p(e).concat([t],[i])))throw r._free(i),new Error("Failed to get hexRing (encountered a pentagon?)");var s=w(i,n);return r._free(i),s}function z(e,t,n){if(g(t),n=Boolean(n),0===e.length||0===e[0].length)return[];"number"===typeof e[0][0]&&(e=[e]);var i=function(e,t){var n,i=e.length-1,a=r._calloc(A),o=0+c,s=o+4;if(I(e[0],a+0,t),i>0){n=r._calloc(i,c);for(var u=0;u<i;u++)I(e[u+1],n+c*u,t)}return r.setValue(a+o,i,"i32"),r.setValue(a+s,n,"i32"),a}(e,n),s=a.maxPolyfillSize(i,t),u=r._calloc(s,o);a.polyfill(i,t,u);var l=w(u,s);return r._free(u),function(e){var t=0+c,n=t+4;r._free(r.getValue(e+0,"i8*"));for(var i=r.getValue(e+t,"i32"),a=0;a<i;a++)r._free(r.getValue(e+n+c*a,"i8*"));r._free(e)}(i),l}function K(e,t){if(!e||!e.length)return[];var n=e.length,i=r._calloc(n,o);Q(i,e);var s=r._calloc(l),u=s;a.h3SetToLinkedGeo(i,n,s);var A=function(e,t){for(var n,i,a,o,s=[],u=t?S:x;e;){for(s.push(n=[]),i=r.getValue(e,"i8*");i;){for(n.push(a=[]),o=r.getValue(i,"i8*");o;)a.push(u(o)),o=r.getValue(o+16,"i8*");t&&a.push(a[0]),i=r.getValue(i+8,"i8*")}e=r.getValue(e+8,"i8*")}return s}(s,t);return a.destroyLinkedPolygon(u),r._free(u),r._free(i),A}function W(e){if(!e||!e.length)return[];var t=e.length,n=r._calloc(t,o);Q(n,e);var i=r._calloc(t,o);if(0!==a.compact(n,i,t))throw r._free(n),r._free(i),new Error("Failed to compact, malformed input data (duplicate hexagons?)");var s=w(i,t);return r._free(n),r._free(i),s}function V(e,t){if(g(t),!e||!e.length)return[];var n=e.length,i=r._calloc(n,o);Q(i,e);var s=a.maxUncompactSize(i,n,t),u=r._calloc(s,o);if(0!==a.uncompact(i,n,u,s,t))throw r._free(i),r._free(u),new Error("Failed to uncompact (bad resolution?)");var A=w(u,s);return r._free(i),r._free(u),A}function X(e,t){var n=p(e),r=n[0],i=n[1],o=p(t),s=o[0],u=o[1];return Boolean(a.h3IndexesAreNeighbors(r,i,s,u))}function Z(e,t){var n=p(e),r=n[0],i=n[1],o=p(t),s=o[0],u=o[1];return E(a.getH3UnidirectionalEdge(r,i,s,u))}function $(e){var t=p(e),n=t[0],r=t[1];return E(a.getOriginH3IndexFromUnidirectionalEdge(n,r))}function ee(e){var t=p(e),n=t[0],r=t[1];return E(a.getDestinationH3IndexFromUnidirectionalEdge(n,r))}function te(e){var t=p(e),n=t[0],r=t[1];return Boolean(a.h3UnidirectionalEdgeIsValid(n,r))}function ne(e){var t=p(e),n=t[0],i=t[1],s=r._calloc(2,o);a.getH3IndexesFromUnidirectionalEdge(n,i,s);var u=w(s,2);return r._free(s),u}function re(e){var t=p(e),n=t[0],i=t[1],s=r._calloc(6,o);a.getH3UnidirectionalEdgesFromHexagon(n,i,s);var u=w(s,6);return r._free(s),u}function ie(e,t){var n=r._malloc(u),i=p(e),o=i[0],s=i[1];a.getH3UnidirectionalEdgeBoundary(o,s,n);var A=O(n,t);return r._free(n),A}function ae(e,t){var n=p(e),r=n[0],i=n[1],o=p(t),s=o[0],u=o[1];return a.h3Distance(r,i,s,u)}function oe(e,t){var n=p(e),i=n[0],s=n[1],u=p(t),A=u[0],c=u[1],l=a.h3LineSize(i,s,A,c);if(l<0)throw new Error("Line cannot be calculated");var f=r._calloc(l,o);a.h3Line(i,s,A,c,f);var h=w(f,l);return r._free(f),h}function se(e,t){var n,i=r._malloc(f),o=a.experimentalH3ToLocalIj.apply(a,p(e).concat(p(t),[i])),s=(n=i,{i:r.getValue(n,"i32"),j:r.getValue(n+4,"i32")});switch(r._free(i),o){case 0:return s;case 1:throw new Error("Incompatible origin and index.");case 2:default:throw new Error("Local IJ coordinates undefined for this origin and index pair. The index may be too far from the origin.");case 3:case 4:case 5:throw new Error("Encountered possible pentagon distortion")}}function ue(e,t){if(!t||"number"!==typeof t.i||"number"!==typeof t.j)throw new Error("Coordinates must be provided as an {i, j} object");var n=r._malloc(f),i=r._malloc(o);!function(e,t){var n=t.i,i=t.j;r.setValue(e,n,"i32"),r.setValue(e+4,i,"i32")}(n,t);var s=a.experimentalLocalIjToH3.apply(a,p(e).concat([n],[i])),u=C(i);if(r._free(n),r._free(i),0!==s)throw new Error("Index not defined for this origin and IJ coordinates pair. IJ coordinates may be too far from origin, or a pentagon distortion was encountered.");return u}function Ae(e,t,n){var i,o=k(e[0],e[1]),s=k(t[0],t[1]);switch(n){case h.m:i=a.pointDistM(o,s);break;case h.km:i=a.pointDistKm(o,s);break;case h.rads:i=a.pointDistRads(o,s);break;default:i=null}if(r._free(o),r._free(s),null===i)throw new Error("Unknown unit: "+n);return i}function ce(e,t){var n=p(e),r=n[0],i=n[1];switch(t){case h.m2:return a.cellAreaM2(r,i);case h.km2:return a.cellAreaKm2(r,i);case h.rads2:return a.cellAreaRads2(r,i);default:throw new Error("Unknown unit: "+t)}}function le(e,t){var n=p(e),r=n[0],i=n[1];switch(t){case h.m:return a.exactEdgeLengthM(r,i);case h.km:return a.exactEdgeLengthKm(r,i);case h.rads:return a.exactEdgeLengthRads(r,i);default:throw new Error("Unknown unit: "+t)}}function fe(e,t){switch(g(e),t){case h.m2:return a.hexAreaM2(e);case h.km2:return a.hexAreaKm2(e);default:throw new Error("Unknown unit: "+t)}}function he(e,t){switch(g(e),t){case h.m:return a.edgeLengthM(e);case h.km:return a.edgeLengthKm(e);default:throw new Error("Unknown unit: "+t)}}function ge(e){g(e);var t=b(a.numHexagons(e)),n=t[0],r=t[1];return r?r*Math.pow(2,32)+n:n}function de(){var e=a.res0IndexCount(),t=r._malloc(o*e);a.getRes0Indexes(t);var n=w(t,e);return r._free(t),n}function pe(e){g(e);var t=a.pentagonIndexCount(),n=r._malloc(o*t);a.getPentagonIndexes(e,n);var i=w(n,t);return r._free(n),i}function ve(e){return e*Math.PI/180}function ye(e){return 180*e/Math.PI}},function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},,function(e,t){function n(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)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(3),i=n(7),a=n(4),o=n(2),s=n(6),u=n(89),A=n(82),c=n(159),l=n(21),f=n(61),h=n(133),g=n(193),d=n(51),p=[9729,9728],v=f.global.WebGLBuffer||function(){},y=function(e){function t(e,n){var o;Object(r.a)(this,t);var s=n.id,u=void 0===s?Object(g.c)("texture"):s,A=n.handle,c=n.target;return(o=Object(i.a)(this,Object(a.a)(t).call(this,e,{id:u,handle:A}))).target=c,o.textureUnit=void 0,o.loaded=!1,o.width=void 0,o.height=void 0,o.depth=void 0,o.format=void 0,o.type=void 0,o.dataFormat=void 0,o.border=void 0,o.textureUnit=void 0,o.mipmaps=void 0,o}return Object(s.a)(t,e),Object(o.a)(t,null,[{key:"isSupported",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.format,r=t.linearFiltering,i=!0;return n&&(i=(i=i&&Object(c.d)(e,n))&&(!r||Object(c.e)(e,n))),i}}]),Object(o.a)(t,[{key:"toString",value:function(){return"Texture(".concat(this.id,",").concat(this.width,"x").concat(this.height,")")}},{key:"initialize",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.data;if(n instanceof Promise)return n.then((function(n){return e.initialize(Object.assign({},t,{pixels:n,data:n}))})),this;var r=t.pixels,i=void 0===r?null:r,a=t.format,o=void 0===a?6408:a,s=t.border,u=void 0===s?0:s,A=t.recreate,c=void 0!==A&&A,f=t.parameters,h=void 0===f?{}:f,g=t.pixelStore,d=void 0===g?{}:g,p=t.textureUnit,v=void 0===p?void 0:p,y=t.mipmaps,m=void 0===y||y;n||(n=i);var I=t.width,b=t.height,E=t.dataFormat,C=t.type,B=t.depth,w=void 0===B?0:B,Q=this._deduceParameters({format:o,type:C,dataFormat:E,compressed:!1,data:n,width:I,height:b});return I=Q.width,b=Q.height,E=Q.dataFormat,C=Q.type,this.width=I,this.height=b,this.depth=w,this.format=o,this.type=C,this.dataFormat=E,this.border=u,this.textureUnit=v,Number.isFinite(this.textureUnit)&&(this.gl.activeTexture(33984+this.textureUnit),this.gl.bindTexture(this.target,this.handle)),m&&this._isNPOT()&&(l.h.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),m=!1,this._updateForNPOT(h)),this.mipmaps=m,this.setImageData({data:n,width:I,height:b,depth:w,format:o,type:C,dataFormat:E,border:u,mipmaps:m,parameters:d}),m&&this.generateMipmap(),this.setParameters(h),c&&(this.data=n),this}},{key:"resize",value:function(e){var t=e.height,n=e.width,r=e.mipmaps,i=void 0!==r&&r;return n!==this.width||t!==this.height?this.initialize({width:n,height:t,format:this.format,type:this.type,dataFormat:this.dataFormat,border:this.border,mipmaps:i}):this}},{key:"generateMipmap",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._isNPOT()?(l.h.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),this):(this.mipmaps=!0,this.gl.bindTexture(this.target,this.handle),Object(l.l)(this.gl,t,(function(){e.gl.generateMipmap(e.target)})),this.gl.bindTexture(this.target,null),this)}},{key:"setImageData",value:function(e){this._trackDeallocatedMemory("Texture");var t=e.target,n=void 0===t?this.target:t,r=e.pixels,i=void 0===r?null:r,a=e.level,o=void 0===a?0:a,s=e.format,u=void 0===s?this.format:s,A=e.border,f=void 0===A?this.border:A,g=e.offset,p=void 0===g?0:g,v=e.parameters,y=void 0===v?{}:v,m=e.data,I=void 0===m?null:m,b=e.type,E=void 0===b?this.type:b,C=e.width,B=void 0===C?this.width:C,w=e.height,Q=void 0===w?this.height:w,k=e.dataFormat,_=void 0===k?this.dataFormat:k,x=e.compressed,S=void 0!==x&&x;I||(I=i);var O=this._deduceParameters({format:u,type:E,dataFormat:_,compressed:S,data:I,width:B,height:Q});E=O.type,_=O.dataFormat,S=O.compressed,B=O.width,Q=O.height;var D=this.gl;D.bindTexture(this.target,this.handle);var R,j=this._getDataType({data:I,compressed:S});if(I=j.data,R=j.dataType,Object(l.l)(this.gl,y,(function(){switch(R){case"null":D.texImage2D(n,o,u,B,Q,f,_,E,I);break;case"typed-array":D.texImage2D(n,o,u,B,Q,f,_,E,I,p);break;case"buffer":Object(h.a)(D),D.bindBuffer(35052,I.handle||I),D.texImage2D(n,o,u,B,Q,f,_,E,p),D.bindBuffer(35052,null);break;case"browser-object":Object(l.g)(D)?D.texImage2D(n,o,u,B,Q,f,_,E,I):D.texImage2D(n,o,u,_,E,I);break;case"compressed":D.compressedTexImage2D(n,o,u,B,Q,f,I);break;default:Object(d.a)(!1,"Unknown image data type")}})),I&&I.byteLength)this._trackAllocatedMemory(I.byteLength,"Texture");else{var M=c.a[this.dataFormat]||4,N=c.c[this.type]||1;this._trackAllocatedMemory(this.width*this.height*M*N,"Texture")}return this.loaded=!0,this}},{key:"setSubImageData",value:function(e){var t=this,n=e.target,r=void 0===n?this.target:n,i=e.pixels,a=void 0===i?null:i,o=e.data,s=void 0===o?null:o,u=e.x,c=void 0===u?0:u,f=e.y,g=void 0===f?0:f,p=e.width,y=void 0===p?this.width:p,m=e.height,I=void 0===m?this.height:m,b=e.level,E=void 0===b?0:b,C=e.format,B=void 0===C?this.format:C,w=e.type,Q=void 0===w?this.type:w,k=e.dataFormat,_=void 0===k?this.dataFormat:k,x=e.compressed,S=void 0!==x&&x,O=e.offset,D=void 0===O?0:O,R=e.border,j=(void 0===R&&this.border,e.parameters),M=void 0===j?{}:j,N=this._deduceParameters({format:B,type:Q,dataFormat:_,compressed:S,data:s,width:y,height:I});if(Q=N.type,_=N.dataFormat,S=N.compressed,y=N.width,I=N.height,Object(d.a)(0===this.depth,"texSubImage not supported for 3D textures"),s||(s=a),s&&s.data){var F=s;s=F.data,y=F.shape[0],I=F.shape[1]}s instanceof A.a&&(s=s.handle),this.gl.bindTexture(this.target,this.handle),Object(l.l)(this.gl,M,(function(){S?t.gl.compressedTexSubImage2D(r,E,c,g,y,I,B,s):null===s?t.gl.texSubImage2D(r,E,c,g,y,I,_,Q,null):ArrayBuffer.isView(s)?t.gl.texSubImage2D(r,E,c,g,y,I,_,Q,s,D):s instanceof v?(Object(h.a)(t.gl),t.gl.bindBuffer(35052,s),t.gl.texSubImage2D(r,E,c,g,y,I,_,Q,D),t.gl.bindBuffer(35052,null)):Object(l.g)(t.gl)?t.gl.texSubImage2D(r,E,c,g,y,I,_,Q,s):t.gl.texSubImage2D(r,E,c,g,_,Q,s)})),this.gl.bindTexture(this.target,null)}},{key:"copyFramebuffer",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return l.h.error("Texture.copyFramebuffer({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}},{key:"getActiveUnit",value:function(){return this.gl.getParameter(34016)-33984}},{key:"bind",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.textureUnit,t=this.gl;return void 0!==e&&(this.textureUnit=e,t.activeTexture(33984+e)),t.bindTexture(this.target,this.handle),e}},{key:"unbind",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.textureUnit,t=this.gl;return void 0!==e&&(this.textureUnit=e,t.activeTexture(33984+e)),t.bindTexture(this.target,null),e}},{key:"_getDataType",value:function(e){var t=e.data,n=e.compressed;return void 0!==n&&n?{data:t,dataType:"compressed"}:null===t?{data:t,dataType:"null"}:ArrayBuffer.isView(t)?{data:t,dataType:"typed-array"}:t instanceof A.a?{data:t.handle,dataType:"buffer"}:t instanceof v?{data:t,dataType:"buffer"}:{data:t,dataType:"browser-object"}}},{key:"_deduceParameters",value:function(e){var t=e.format,n=e.data,r=e.width,i=e.height,a=e.dataFormat,o=e.type,s=e.compressed,u=c.b[t];a=a||u&&u.dataFormat,o=o||u&&u.types[0],s=s||u&&u.compressed;var A=this._deduceImageSize(n,r,i);return{dataFormat:a,type:o,compressed:s,width:r=A.width,height:i=A.height,format:t,data:n}}},{key:"_deduceImageSize",value:function(e,t,n){var r;return r="undefined"!==typeof ImageData&&e instanceof ImageData?{width:e.width,height:e.height}:"undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement?{width:e.naturalWidth,height:e.naturalHeight}:"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap?{width:e.width,height:e.height}:"undefined"!==typeof HTMLVideoElement&&e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e?{width:t,height:n}:{width:t>=0?t:1,height:n>=0?n:1},Object(d.a)(r,"Could not deduced texture size"),Object(d.a)(void 0===t||r.width===t,"Deduced texture width does not match supplied width"),Object(d.a)(void 0===n||r.height===n,"Deduced texture height does not match supplied height"),r}},{key:"_createHandle",value:function(){return this.gl.createTexture()}},{key:"_deleteHandle",value:function(){this.gl.deleteTexture(this.handle),this._trackDeallocatedMemory("Texture")}},{key:"_getParameter",value:function(e){switch(e){case 4096:return this.width;case 4097:return this.height;default:this.gl.bindTexture(this.target,this.handle);var t=this.gl.getTexParameter(this.target,e);return this.gl.bindTexture(this.target,null),t}}},{key:"_setParameter",value:function(e,t){switch(this.gl.bindTexture(this.target,this.handle),t=this._getNPOTParam(e,t),e){case 33082:case 33083:this.gl.texParameterf(this.handle,e,t);break;case 4096:case 4097:Object(d.a)(!1);break;default:this.gl.texParameteri(this.target,e,t)}return this.gl.bindTexture(this.target,null),this}},{key:"_isNPOT",value:function(){return!Object(l.g)(this.gl)&&(!(!this.width||!this.height)&&(!Object(g.b)(this.width)||!Object(g.b)(this.height)))}},{key:"_updateForNPOT",value:function(e){void 0===e[this.gl.TEXTURE_MIN_FILTER]&&(e[this.gl.TEXTURE_MIN_FILTER]=this.gl.LINEAR),void 0===e[this.gl.TEXTURE_WRAP_S]&&(e[this.gl.TEXTURE_WRAP_S]=this.gl.CLAMP_TO_EDGE),void 0===e[this.gl.TEXTURE_WRAP_T]&&(e[this.gl.TEXTURE_WRAP_T]=this.gl.CLAMP_TO_EDGE)}},{key:"_getNPOTParam",value:function(e,t){if(this._isNPOT())switch(e){case 10241:-1===p.indexOf(t)&&(t=9729);break;case 10242:case 10243:33071!==t&&(t=33071)}return t}}]),t}(u.a)},function(e,t,n){"use strict";function r(e,t,n){var r=t[0],i=t[1],a=n[3]*r+n[7]*i||1;return e[0]=(n[0]*r+n[4]*i)/a,e[1]=(n[1]*r+n[5]*i)/a,e}function i(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[3]*r+n[7]*i+n[11]*a||1;return e[0]=(n[0]*r+n[4]*i+n[8]*a)/o,e[1]=(n[1]*r+n[5]*i+n[9]*a)/o,e[2]=(n[2]*r+n[6]*i+n[10]*a)/o,e}function a(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2],e}function o(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2],e[3]=t[3],e}function s(e,t,n){var r=t[0],i=t[1],a=t[2];return e[0]=n[0]*r+n[3]*i+n[6]*a,e[1]=n[1]*r+n[4]*i+n[7]*a,e[2]=n[2]*r+n[5]*i+n[8]*a,e[3]=t[3],e}n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return s}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return s}));var r=Symbol("thread.errors"),i=Symbol("thread.events"),a=Symbol("thread.terminate"),o=Symbol("thread.transferable"),s=Symbol("thread.worker")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72);t.getCoord=function(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")},t.getCoords=function(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")},t.containsNumber=function e(t){if(t.length>1&&r.isNumber(t[0])&&r.isNumber(t[1]))return!0;if(Array.isArray(t[0])&&t[0].length)return e(t[0]);throw new Error("coordinates must only contain numbers")},t.geojsonType=function(e,t,n){if(!t||!n)throw new Error("type and name required");if(!e||e.type!==t)throw new Error("Invalid input to "+n+": must be a "+t+", given "+e.type)},t.featureOf=function(e,t,n){if(!e)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!e||"Feature"!==e.type||!e.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!e.geometry||e.geometry.type!==t)throw new Error("Invalid input to "+n+": must be a "+t+", given "+e.geometry.type)},t.collectionOf=function(e,t,n){if(!e)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!e||"FeatureCollection"!==e.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(var r=0,i=e.features;r<i.length;r++){var a=i[r];if(!a||"Feature"!==a.type||!a.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!a.geometry||a.geometry.type!==t)throw new Error("Invalid input to "+n+": must be a "+t+", given "+a.geometry.type)}},t.getGeom=function(e){return"Feature"===e.type?e.geometry:e},t.getType=function(e,t){return"FeatureCollection"===e.type?"FeatureCollection":"GeometryCollection"===e.type?"GeometryCollection":"Feature"===e.type&&null!==e.geometry?e.geometry.type:e.type}},function(e,t,n){"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e,r){n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s}));var i=n(25),a={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof e&&e,document:"undefined"!==typeof document&&document,process:"object"===("undefined"===typeof r?"undefined":Object(i.a)(r))&&r},o=a.window||a.self||a.global,s=a.process||{};console}).call(this,n(70),n(86))},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(3),i=n(2),a=n(6),o=n(7),s=n(4),u=n(215),A=n(35);function c(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var l=["longitude","latitude","zoom","bearing","pitch"],f=["longitude","latitude","zoom"],h=function(e){Object(a.a)(n,e);var t=c(n);function n(e){return Object(r.a)(this,n),t.call(this,e||{compare:l,extract:l,required:f})}return Object(i.a)(n,[{key:"interpolateProps",value:function(e,t,n){var r={};for(var i in t)r[i]=Object(A.g)(e[i]||0,t[i]||0,n);return r}}]),n}(u.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return c}));var r=n(3),i=n(2),a=n(117),o=n(142),s=function(){},u={BREAK:1,SNAP_TO_END:2,IGNORE:3},A={transitionDuration:0,transitionEasing:function(e){return e},transitionInterpolator:new a.a,transitionInterruption:u.BREAK,onTransitionStart:s,onTransitionInterrupt:s,onTransitionEnd:s},c=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,e),this.ControllerState=t,this.props=Object.assign({},A,n),this.propsInTransition=null,this.transition=new o.a(n.timeline),this.onViewStateChange=n.onViewStateChange,this._onTransitionUpdate=this._onTransitionUpdate.bind(this)}return Object(i.a)(e,[{key:"finalize",value:function(){this.transition.cancel()}},{key:"getViewportInTransition",value:function(){return this.propsInTransition}},{key:"processViewStateChange",value:function(e){var t=!1,n=this.props;if(e=Object.assign({},A,e),this.props=e,this._shouldIgnoreViewportChange(n,e))return t;if(this._isTransitionEnabled(e)){var r=this.transition.settings,i=r.interruption,a=r.endProps,o=Object.assign({},n,i===u.SNAP_TO_END?a:this.propsInTransition||n);this._triggerTransition(o,e),t=!0}else this.transition.cancel();return t}},{key:"updateTransition",value:function(){this.transition.update()}},{key:"_isTransitionEnabled",value:function(e){var t=e.transitionDuration,n=e.transitionInterpolator;return(t>0||"auto"===t)&&Boolean(n)}},{key:"_isUpdateDueToCurrentTransition",value:function(e){return!!this.transition.inProgress&&this.transition.settings.interpolator.arePropsEqual(e,this.propsInTransition)}},{key:"_shouldIgnoreViewportChange",value:function(e,t){return this.transition.inProgress?this.transition.settings.interruption===u.IGNORE||this._isUpdateDueToCurrentTransition(t):!this._isTransitionEnabled(t)||t.transitionInterpolator.arePropsEqual(e,t)}},{key:"_triggerTransition",value:function(e,t){var n=new this.ControllerState(e),r=new this.ControllerState(t).shortestPathFrom(n),i=t.transitionInterpolator,a=i.getDuration?i.getDuration(e,t):t.transitionDuration;if(0!==a){var o=t.transitionInterpolator.initializeProps(e,r);this.propsInTransition={},this.duration=a,this.transition.start({duration:a,easing:t.transitionEasing,interpolator:t.transitionInterpolator,interruption:t.transitionInterruption,startProps:o.start,endProps:o.end,onStart:t.onTransitionStart,onUpdate:this._onTransitionUpdate,onInterrupt:this._onTransitionEnd(t.onTransitionInterrupt),onEnd:this._onTransitionEnd(t.onTransitionEnd)}),this.updateTransition()}}},{key:"_onTransitionEnd",value:function(e){var t=this;return function(n){t.propsInTransition=null,e(n)}}},{key:"_onTransitionUpdate",value:function(e){var t=e.time,n=e.settings,r=n.interpolator,i=n.startProps,a=n.endProps,o=n.duration,s=(0,n.easing)(t/o),u=r.interpolateProps(i,a,s);this.propsInTransition=new this.ControllerState(Object.assign({},this.props,u)).getViewportProps(),this.onViewStateChange&&this.onViewStateChange({viewState:this.propsInTransition,interactionState:{inTransition:!0},oldViewState:this.props})}}]),e}();c.defaultProps=A},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(1),i=n(3),a=n(2),o=n(118),s=n(57);function u(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 A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c={transitionDuration:0},l=["wheel"],f=["panstart","panmove","panend"],h=["pinchstart","pinchmove","pinchend"],g=["doubletap"],d=["keydown"],p=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(i.a)(this,e),Object(s.a)(t),this.ControllerState=t,this.controllerState=null,this.controllerStateProps=null,this.eventManager=null,this.transitionManager=new o.b(t,n),this._events=null,this._state={isDragging:!1},this._customEvents=[],this.onViewStateChange=null,this.onStateChange=null,this.invertPan=!1,this.handleEvent=this.handleEvent.bind(this),this.setProps(n)}return Object(a.a)(e,[{key:"finalize",value:function(){for(var e in this._events)this._events[e]&&this.eventManager.off(e,this.handleEvent);this.transitionManager.finalize()}},{key:"handleEvent",value:function(e){var t=this.ControllerState;switch(this.controllerState=new t(A(A({makeViewport:this.makeViewport},this.controllerStateProps),this._state)),e.type){case"panstart":return this._onPanStart(e);case"panmove":return this._onPan(e);case"panend":return this._onPanEnd(e);case"pinchstart":return this._onPinchStart(e);case"pinchmove":return this._onPinch(e);case"pinchend":return this._onPinchEnd(e);case"doubletap":return this._onDoubleTap(e);case"wheel":return this._onWheel(e);case"keydown":return this._onKeyDown(e);default:return!1}}},{key:"getCenter",value:function(e){var t=this.controllerStateProps,n=t.x,r=t.y,i=e.offsetCenter;return[i.x-n,i.y-r]}},{key:"isPointInBounds",value:function(e,t){var n=this.controllerStateProps,r=n.width,i=n.height;if(t&&t.handled)return!1;var a=e[0]>=0&&e[0]<=r&&e[1]>=0&&e[1]<=i;return a&&t&&t.stopPropagation(),a}},{key:"isFunctionKeyPressed",value:function(e){var t=e.srcEvent;return Boolean(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}},{key:"isDragging",value:function(){return this._state.isDragging}},{key:"setProps",value:function(e){"onViewStateChange"in e&&(this.onViewStateChange=e.onViewStateChange),"onStateChange"in e&&(this.onStateChange=e.onStateChange),"makeViewport"in e&&(this.makeViewport=e.makeViewport),this.controllerStateProps=e,"eventManager"in e&&this.eventManager!==e.eventManager&&(this.eventManager=e.eventManager,this._events={},this.toggleEvents(this._customEvents,!0)),this.transitionManager.processViewStateChange(this.controllerStateProps);var t=e.scrollZoom,n=void 0===t||t,r=e.dragPan,i=void 0===r||r,a=e.dragRotate,o=void 0===a||a,s=e.doubleClickZoom,u=void 0===s||s,A=e.touchZoom,c=void 0===A||A,p=e.touchRotate,v=void 0!==p&&p,y=e.keyboard,m=void 0===y||y,I=Boolean(this.onViewStateChange);this.toggleEvents(l,I&&n),this.toggleEvents(f,I&&(i||o)),this.toggleEvents(h,I&&(c||v)),this.toggleEvents(g,I&&u),this.toggleEvents(d,I&&m),this.scrollZoom=n,this.dragPan=i,this.dragRotate=o,this.doubleClickZoom=u,this.touchZoom=c,this.touchRotate=v,this.keyboard=m}},{key:"updateTransition",value:function(){this.transitionManager.updateTransition()}},{key:"toggleEvents",value:function(e,t){var n=this;this.eventManager&&e.forEach((function(e){n._events[e]!==t&&(n._events[e]=t,t?n.eventManager.on(e,n.handleEvent):n.eventManager.off(e,n.handleEvent))}))}},{key:"updateViewport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.assign({},e.getViewportProps(),t),i=this.controllerState!==e;if(i){var a=this.controllerState?this.controllerState.getViewportProps():null;this.onViewStateChange&&this.onViewStateChange({viewState:r,interactionState:n,oldViewState:a})}Object.assign(this._state,e.getInteractiveState(),n),this.onStateChange&&this.onStateChange(this._state)}},{key:"_onPanStart",value:function(e){var t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;var n=this.controllerState.panStart({pos:t}).rotateStart({pos:t});return this.updateViewport(n,c,{isDragging:!0}),!0}},{key:"_onPan",value:function(e){if(!this.isDragging())return!1;var t=this.isFunctionKeyPressed(e)||e.rightButton;return(t=this.invertPan?!t:t)?this._onPanMove(e):this._onPanRotate(e)}},{key:"_onPanEnd",value:function(e){var t=this.controllerState.panEnd().rotateEnd();return this.updateViewport(t,null,{isDragging:!1,isPanning:!1,isRotating:!1}),!0}},{key:"_onPanMove",value:function(e){if(!this.dragPan)return!1;var t=this.getCenter(e),n=this.controllerState.pan({pos:t});return this.updateViewport(n,c,{isDragging:!0,isPanning:!0}),!0}},{key:"_onPanRotate",value:function(e){if(!this.dragRotate)return!1;var t=e.deltaX,n=e.deltaY,r=this.controllerState.getViewportProps(),i=t/r.width,a=n/r.height,o=this.controllerState.rotate({deltaScaleX:i,deltaScaleY:a});return this.updateViewport(o,c,{isDragging:!0,isRotating:!0}),!0}},{key:"_onWheel",value:function(e){if(!this.scrollZoom)return!1;e.preventDefault();var t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;var n=e.delta,r=2/(1+Math.exp(-Math.abs(.01*n)));n<0&&0!==r&&(r=1/r);var i=this.controllerState.zoom({pos:t,scale:r});return this.updateViewport(i,c,{isZooming:!0,isPanning:!0}),!0}},{key:"_onPinchStart",value:function(e){var t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;var n=this.controllerState.zoomStart({pos:t}).rotateStart({pos:t});return this._state.startPinchRotation=e.rotation,this.updateViewport(n,c,{isDragging:!0}),!0}},{key:"_onPinch",value:function(e){if(!this.touchZoom&&!this.touchRotate)return!1;if(!this.isDragging())return!1;var t=this.controllerState;if(this.touchZoom){var n=e.scale,r=this.getCenter(e);t=t.zoom({pos:r,scale:n})}if(this.touchRotate){var i=e.rotation,a=this._state.startPinchRotation;t=t.rotate({deltaScaleX:-(i-a)/180})}return this.updateViewport(t,c,{isDragging:!0,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:this.touchRotate}),!0}},{key:"_onPinchEnd",value:function(e){var t=this.controllerState.zoomEnd().rotateEnd();return this._state.startPinchRotation=0,this.updateViewport(t,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1}),!0}},{key:"_onDoubleTap",value:function(e){if(!this.doubleClickZoom)return!1;var t=this.getCenter(e);if(!this.isPointInBounds(t,e))return!1;var n=this.isFunctionKeyPressed(e),r=this.controllerState.zoom({pos:t,scale:n?.5:2});return this.updateViewport(r,this._getTransitionProps(),{isZooming:!0,isPanning:!0}),!0}},{key:"_onKeyDown",value:function(e){if(!this.keyboard)return!1;var t,n=this.isFunctionKeyPressed(e),r=this.controllerState,i={};switch(e.srcEvent.code){case"Minus":t=n?r.zoomOut().zoomOut():r.zoomOut(),i.isZooming=!0;break;case"Equal":t=n?r.zoomIn().zoomIn():r.zoomIn(),i.isZooming=!0;break;case"ArrowLeft":n?(t=r.rotateLeft(),i.isRotating=!0):(t=r.moveLeft(),i.isPanning=!0);break;case"ArrowRight":n?(t=r.rotateRight(),i.isRotating=!0):(t=r.moveRight(),i.isPanning=!0);break;case"ArrowUp":n?(t=r.rotateUp(),i.isRotating=!0):(t=r.moveUp(),i.isPanning=!0);break;case"ArrowDown":n?(t=r.rotateDown(),i.isRotating=!0):(t=r.moveDown(),i.isPanning=!0);break;default:return!1}return this.updateViewport(t,this._getTransitionProps(),i),!0}},{key:"_getTransitionProps",value:function(){return c}},{key:"events",set:function(e){this.toggleEvents(this._customEvents,!1),this.toggleEvents(e,!0),this._customEvents=e,this.setProps(this.controllerStateProps)}}]),e}()},function(e,t,n){"use strict";var r=n(25),i=n(1),a=n(3),o=n(2),s=n(90),u=/([0-9]+\.?[0-9]*)(%|px)/;function A(e){switch(Object(r.a)(e)){case"number":return{position:e,relative:!1};case"string":var t=e.match(u);if(t&&t.length>=3){var n="%"===t[2],i=parseFloat(t[1]);return{position:n?i/100:i,relative:n}}default:throw new Error("Could not parse position string ".concat(e))}}function c(e,t){return e.relative?Math.round(e.position*t):e.position}var l=n(141),f=n(57);function h(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 g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n.d(t,"a",(function(){return d}));var d=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(this,e);var n=t.id,r=void 0===n?null:n,i=t.x,o=void 0===i?0:i,u=t.y,A=void 0===u?0:u,c=t.width,l=void 0===c?"100%":c,h=t.height,g=void 0===h?"100%":h,d=t.projectionMatrix,p=void 0===d?null:d,v=t.fovy,y=void 0===v?50:v,m=t.near,I=void 0===m?.1:m,b=t.far,E=void 0===b?1e3:b,C=t.modelMatrix,B=void 0===C?null:C,w=t.viewportInstance,Q=void 0===w?null:w,k=t.type,_=void 0===k?s.a:k;Object(f.a)(!Q||Q instanceof s.a),this.viewportInstance=Q,this.id=r||this.constructor.displayName||"view",this.type=_,this.props=Object.assign({},t,{id:this.id,projectionMatrix:p,fovy:y,near:I,far:E,modelMatrix:B}),this._parseDimensions({x:o,y:A,width:l,height:g}),this.equals=this.equals.bind(this),Object.seal(this)}return Object(o.a)(e,[{key:"equals",value:function(e){return this===e||(this.viewportInstance?e.viewportInstance&&this.viewportInstance.equals(e.viewportInstance):Object(l.a)(this.props,e.props))}},{key:"makeViewport",value:function(e){var t=e.width,n=e.height,r=e.viewState;if(this.viewportInstance)return this.viewportInstance;r=this.filterViewState(r);var i=this.getDimensions({width:t,height:n}),a=g(g(g({},r),this.props),i);return this._getViewport(a)}},{key:"getViewStateId",value:function(){switch(Object(r.a)(this.props.viewState)){case"string":return this.props.viewState;case"object":return this.props.viewState&&this.props.viewState.id;default:return this.id}}},{key:"filterViewState",value:function(e){if(this.props.viewState&&"object"===Object(r.a)(this.props.viewState)){if(!this.props.viewState.id)return this.props.viewState;var t=Object.assign({},e);for(var n in this.props.viewState)"id"!==n&&(t[n]=this.props.viewState[n]);return t}return e}},{key:"getDimensions",value:function(e){var t=e.width,n=e.height;return{x:c(this._x,t),y:c(this._y,n),width:c(this._width,t),height:c(this._height,n)}}},{key:"_getControllerProps",value:function(e){var t=this.props.controller;return t?!0===t?e:("function"===typeof t&&(t={type:t}),Object.assign({},e,t)):null}},{key:"_getViewport",value:function(e){return new(0,this.type)(e)}},{key:"_parseDimensions",value:function(e){var t=e.x,n=e.y,r=e.width,i=e.height;this._x=A(t),this._y=A(n),this._width=A(r),this._height=A(i)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r=n(78),i=n(3),a=n(2),o=n(193),s=n(51),u={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},A=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(i.a)(this,e);var n=t.id,r=void 0===n?Object(o.c)("geometry"):n,a=t.drawMode,s=void 0===a?u.TRIANGLES:a,A=t.attributes,c=void 0===A?{}:A,l=t.indices,f=void 0===l?null:l,h=t.vertexCount,g=void 0===h?null:h;this.id=r,this.drawMode=0|s,this.attributes={},this.userData={},this._setAttributes(c,f),this.vertexCount=g||this._calculateVertexCount(this.attributes,this.indices)}return Object(a.a)(e,null,[{key:"DRAW_MODE",get:function(){return u}}]),Object(a.a)(e,[{key:"getVertexCount",value:function(){return this.vertexCount}},{key:"getAttributes",value:function(){return this.indices?Object(r.a)({indices:this.indices},this.attributes):this.attributes}},{key:"_print",value:function(e){return"Geometry ".concat(this.id," attribute ").concat(e)}},{key:"_setAttributes",value:function(e,t){for(var n in t&&(this.indices=ArrayBuffer.isView(t)?{value:t,size:1}:t),e){var r=e[n];r=ArrayBuffer.isView(r)?{value:r}:r,Object(s.a)(ArrayBuffer.isView(r.value),"".concat(this._print(n),": must be typed array or object with value as typed array")),"POSITION"!==n&&"positions"!==n||r.size||(r.size=3),"indices"===n?(Object(s.a)(!this.indices),this.indices=r):this.attributes[n]=r}return this.indices&&void 0!==this.indices.isIndexed&&(this.indices=Object.assign({},this.indices),delete this.indices.isIndexed),this}},{key:"_calculateVertexCount",value:function(e,t){if(t)return t.value.length;var n=1/0;for(var r in e){var i=e[r],a=i.value,o=i.size;!i.constant&&a&&o>=1&&(n=Math.min(n,a.length/o))}return Object(s.a)(Number.isFinite(n)),n}},{key:"mode",get:function(){return this.drawMode}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(65),i=n(3),a=n(2),o=n(160),s=n(51),u=n(364),A={offset:0,stride:0,type:5126,size:1,divisor:0,normalized:!1,integer:!1},c={deprecatedProps:{instanced:"divisor",isInstanced:"divisor"}},l=function(){function e(){var t=this;Object(i.a)(this,e);for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];r.forEach((function(e){return t._assign(e)})),Object.freeze(this)}return Object(a.a)(e,null,[{key:"getBytesPerElement",value:function(e){return Object(o.c)(e.type||5126).BYTES_PER_ELEMENT}},{key:"getBytesPerVertex",value:function(e){return Object(s.a)(e.size),Object(o.c)(e.type||5126).BYTES_PER_ELEMENT*e.size}},{key:"resolve",value:function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return Object(r.a)(e,[A].concat(n))}}]),Object(a.a)(e,[{key:"toString",value:function(){return JSON.stringify(this)}},{key:"_assign",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return void 0!==(e=Object(u.a)("Accessor",e,c)).type&&(this.type=e.type,5124!==e.type&&5125!==e.type||(this.integer=!0)),void 0!==e.size&&(this.size=e.size),void 0!==e.offset&&(this.offset=e.offset),void 0!==e.stride&&(this.stride=e.stride),void 0!==e.normalized&&(this.normalized=e.normalized),void 0!==e.integer&&(this.integer=e.integer),void 0!==e.divisor&&(this.divisor=e.divisor),void 0!==e.buffer&&(this.buffer=e.buffer),void 0!==e.index&&("boolean"===typeof index?this.index=e.index?1:0:this.index=e.index),void 0!==e.instanced&&(this.divisor=e.instanced?1:0),void 0!==e.isInstanced&&(this.divisor=e.isInstanced?1:0),this}},{key:"BYTES_PER_ELEMENT",get:function(){return e.getBytesPerElement(this)}},{key:"BYTES_PER_VERTEX",get:function(){return e.getBytesPerVertex(this)}}]),e}()},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return A})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return f})),n.d(t,"h",(function(){return h})),n.d(t,"a",(function(){return g})),n.d(t,"g",(function(){return d}));var r=n(22),i=n(395),a=n.n(i),o=n(97),s=n.n(o);function u(e,t,n){e.key===t&&(e.preventDefault(),n())}function A(e){return a()({r:e[0],g:e[1],b:e[2]}).toHexString()}function c(e){var t=a()(e).toRgb();return[t.r,t.g,t.b]}function l(e){if(0===e)return"Color by hierarchy";if(e<=2){return"Color by ".concat("sub".repeat(e-1),"cluster")}return"Color by cluster level ".concat(e)}function f(e,t){return e.length<=t.length&&s()(e,t.slice(0,e.length))}function h(e,t,n){return f(e,t)?[].concat(Object(r.a)(n),Object(r.a)(t.slice(n.length))):t}var g="___";function d(e){return e.join(g)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReactCSS=t.loop=t.handleActive=t.handleHover=t.hover=void 0;var r=A(n(1180)),i=A(n(1202)),a=A(n(1222)),o=A(n(1223)),s=A(n(1224)),u=A(n(1225));function A(e){return e&&e.__esModule?e:{default:e}}t.hover=o.default,t.handleHover=o.default,t.handleActive=s.default,t.loop=u.default;var c=t.ReactCSS=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var s=(0,r.default)(n),u=(0,i.default)(e,s);return(0,a.default)(u)};t.default=c},function(e,t,n){"use strict";n.d(t,"g",(function(){return r})),n.d(t,"e",(function(){return i})),n.d(t,"f",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return s})),n.d(t,"d",(function(){return u})),n.d(t,"b",(function(){return A}));var r=["z","time"],i="Min/Max",a={colormap:null,opacity:1,domainType:i},o={type:"molecules",opacity:1,radius:20,visible:!0},s={type:"cells",opacity:1,radius:50,visible:!0,stroked:!1},u={type:"neighborhoods",visible:!1},A=["molecules","cells","neighborhoods","raster"]},function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};return Array.isArray(e)?i(e,t,[]):t(e)?[e]:[]}function i(e,t,n){for(var r=-1;++r<e.length;){var a=e[r];Array.isArray(a)?i(a,t,n):t(a)&&n.push(a)}return n}function a(e){for(var t=e.target,n=e.source,r=e.start,i=void 0===r?0:r,a=e.count,o=void 0===a?1:a,s=n.length,u=o*s,A=0,c=i;A<s;A++)t[c++]=n[A];for(;A<u;)A<u-A?(t.copyWithin(i+A,i,i+A),A*=2):(t.copyWithin(i+A,i,i+u-A),A=u);return t}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error("math.gl assertion ".concat(t))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(3),i=n(2),a=function(){function e(t){Object(r.a)(this,e),this._pool=[],this.props={overAlloc:2,poolSize:100},this.setProps(t)}return Object(i.a)(e,[{key:"setProps",value:function(e){Object.assign(this.props,e)}},{key:"allocate",value:function(e,t,n){var r=n.size,i=void 0===r?1:r,a=n.type,o=n.padding,s=void 0===o?0:o,u=n.copy,A=void 0!==u&&u,c=n.initialize,l=void 0!==c&&c,f=a||e&&e.constructor||Float32Array,h=t*i+s;if(ArrayBuffer.isView(e)){if(h<=e.length)return e;if(h*e.BYTES_PER_ELEMENT<=e.buffer.byteLength)return new f(e.buffer,0,h)}var g=this._allocate(f,h,l);return e&&A?g.set(e):l||g.fill(0,0,4),this._release(e),g}},{key:"release",value:function(e){this._release(e)}},{key:"_allocate",value:function(e,t,n){t=Math.max(Math.ceil(t*this.props.overAlloc),1);var r=this._pool,i=e.BYTES_PER_ELEMENT*t,a=r.findIndex((function(e){return e.byteLength>=i}));if(a>=0){var o=new e(r.splice(a,1)[0],0,t);return n&&o.fill(0),o}return new e(t)}},{key:"_release",value:function(e){if(ArrayBuffer.isView(e)){var t=this._pool,n=e.buffer,r=n.byteLength,i=t.findIndex((function(e){return e.byteLength>=r}));i<0?t.push(n):(i>0||t.length<this.props.poolSize)&&t.splice(i,0,n),t.length>this.props.poolSize&&t.shift()}}}]),e}();t.a=new a},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error("math.gl assertion ".concat(t))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error("math.gl assertion ".concat(t))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return u}));var r=n(59);function i(e,t){if(e.length!==t)return!1;for(var n=0;n<e.length;++n)if(!Number.isFinite(e[n]))return!1;return!0}function a(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(r.a.debug&&!i(e,t))throw new Error("math.gl: ".concat(n," some fields set to invalid numbers'"));return e}var s={};function u(e,t){s[e]||(s[e]=!0,console.warn("".concat(e," has been removed in version ").concat(t,", see upgrade guide for more information")))}},function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return d})),n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return y})),n.d(t,"d",(function(){return I}));var r,i,a,o=n(16),s=n(23),u=n(1),A=n(43),c=(r={},Object(u.a)(r,3042,!1),Object(u.a)(r,32773,new Float32Array([0,0,0,0])),Object(u.a)(r,32777,32774),Object(u.a)(r,34877,32774),Object(u.a)(r,32969,1),Object(u.a)(r,32968,0),Object(u.a)(r,32971,1),Object(u.a)(r,32970,0),Object(u.a)(r,3106,new Float32Array([0,0,0,0])),Object(u.a)(r,3107,[!0,!0,!0,!0]),Object(u.a)(r,2884,!1),Object(u.a)(r,2885,1029),Object(u.a)(r,2929,!1),Object(u.a)(r,2931,1),Object(u.a)(r,2932,513),Object(u.a)(r,2928,new Float32Array([0,1])),Object(u.a)(r,2930,!0),Object(u.a)(r,3024,!0),Object(u.a)(r,36006,null),Object(u.a)(r,2886,2305),Object(u.a)(r,33170,4352),Object(u.a)(r,2849,1),Object(u.a)(r,32823,!1),Object(u.a)(r,32824,0),Object(u.a)(r,10752,0),Object(u.a)(r,32938,1),Object(u.a)(r,32939,!1),Object(u.a)(r,3089,!1),Object(u.a)(r,3088,new Int32Array([0,0,1024,1024])),Object(u.a)(r,2960,!1),Object(u.a)(r,2961,0),Object(u.a)(r,2968,4294967295),Object(u.a)(r,36005,4294967295),Object(u.a)(r,2962,519),Object(u.a)(r,2967,0),Object(u.a)(r,2963,4294967295),Object(u.a)(r,34816,519),Object(u.a)(r,36003,0),Object(u.a)(r,36004,4294967295),Object(u.a)(r,2964,7680),Object(u.a)(r,2965,7680),Object(u.a)(r,2966,7680),Object(u.a)(r,34817,7680),Object(u.a)(r,34818,7680),Object(u.a)(r,34819,7680),Object(u.a)(r,2978,[0,0,1024,1024]),Object(u.a)(r,3333,4),Object(u.a)(r,3317,4),Object(u.a)(r,37440,!1),Object(u.a)(r,37441,!1),Object(u.a)(r,37443,37444),Object(u.a)(r,35723,4352),Object(u.a)(r,36010,null),Object(u.a)(r,35977,!1),Object(u.a)(r,3330,0),Object(u.a)(r,3332,0),Object(u.a)(r,3331,0),Object(u.a)(r,3314,0),Object(u.a)(r,32878,0),Object(u.a)(r,3316,0),Object(u.a)(r,3315,0),Object(u.a)(r,32877,0),r),l=function(e,t,n){return t?e.enable(n):e.disable(n)},f=function(e,t,n){return e.hint(n,t)},h=function(e,t,n){return e.pixelStorei(n,t)};function g(e){return Array.isArray(e)||ArrayBuffer.isView(e)}var d=(i={},Object(u.a)(i,3042,l),Object(u.a)(i,32773,(function(e,t){return e.blendColor.apply(e,Object(s.a)(t))})),Object(u.a)(i,32777,"blendEquation"),Object(u.a)(i,34877,"blendEquation"),Object(u.a)(i,32969,"blendFunc"),Object(u.a)(i,32968,"blendFunc"),Object(u.a)(i,32971,"blendFunc"),Object(u.a)(i,32970,"blendFunc"),Object(u.a)(i,3106,(function(e,t){return e.clearColor.apply(e,Object(s.a)(t))})),Object(u.a)(i,3107,(function(e,t){return e.colorMask.apply(e,Object(s.a)(t))})),Object(u.a)(i,2884,l),Object(u.a)(i,2885,(function(e,t){return e.cullFace(t)})),Object(u.a)(i,2929,l),Object(u.a)(i,2931,(function(e,t){return e.clearDepth(t)})),Object(u.a)(i,2932,(function(e,t){return e.depthFunc(t)})),Object(u.a)(i,2928,(function(e,t){return e.depthRange.apply(e,Object(s.a)(t))})),Object(u.a)(i,2930,(function(e,t){return e.depthMask(t)})),Object(u.a)(i,3024,l),Object(u.a)(i,35723,f),Object(u.a)(i,36006,(function(e,t){var n=Object(A.h)(e)?36009:36160;return e.bindFramebuffer(n,t)})),Object(u.a)(i,2886,(function(e,t){return e.frontFace(t)})),Object(u.a)(i,33170,f),Object(u.a)(i,2849,(function(e,t){return e.lineWidth(t)})),Object(u.a)(i,32823,l),Object(u.a)(i,32824,"polygonOffset"),Object(u.a)(i,10752,"polygonOffset"),Object(u.a)(i,35977,l),Object(u.a)(i,32938,"sampleCoverage"),Object(u.a)(i,32939,"sampleCoverage"),Object(u.a)(i,3089,l),Object(u.a)(i,3088,(function(e,t){return e.scissor.apply(e,Object(s.a)(t))})),Object(u.a)(i,2960,l),Object(u.a)(i,2961,(function(e,t){return e.clearStencil(t)})),Object(u.a)(i,2968,(function(e,t){return e.stencilMaskSeparate(1028,t)})),Object(u.a)(i,36005,(function(e,t){return e.stencilMaskSeparate(1029,t)})),Object(u.a)(i,2962,"stencilFuncFront"),Object(u.a)(i,2967,"stencilFuncFront"),Object(u.a)(i,2963,"stencilFuncFront"),Object(u.a)(i,34816,"stencilFuncBack"),Object(u.a)(i,36003,"stencilFuncBack"),Object(u.a)(i,36004,"stencilFuncBack"),Object(u.a)(i,2964,"stencilOpFront"),Object(u.a)(i,2965,"stencilOpFront"),Object(u.a)(i,2966,"stencilOpFront"),Object(u.a)(i,34817,"stencilOpBack"),Object(u.a)(i,34818,"stencilOpBack"),Object(u.a)(i,34819,"stencilOpBack"),Object(u.a)(i,2978,(function(e,t){return e.viewport.apply(e,Object(s.a)(t))})),Object(u.a)(i,3333,h),Object(u.a)(i,3317,h),Object(u.a)(i,37440,h),Object(u.a)(i,37441,h),Object(u.a)(i,37443,h),Object(u.a)(i,3330,h),Object(u.a)(i,3332,h),Object(u.a)(i,3331,h),Object(u.a)(i,36010,(function(e,t){return e.bindFramebuffer(36008,t)})),Object(u.a)(i,3314,h),Object(u.a)(i,32878,h),Object(u.a)(i,3316,h),Object(u.a)(i,3315,h),Object(u.a)(i,32877,h),Object(u.a)(i,"framebuffer",(function(e,t){var n=t&&"handle"in t?t.handle:t;return e.bindFramebuffer(36160,n)})),Object(u.a)(i,"blend",(function(e,t){return t?e.enable(3042):e.disable(3042)})),Object(u.a)(i,"blendColor",(function(e,t){return e.blendColor.apply(e,Object(s.a)(t))})),Object(u.a)(i,"blendEquation",(function(e,t){t=g(t)?t:[t,t],e.blendEquationSeparate.apply(e,Object(s.a)(t))})),Object(u.a)(i,"blendFunc",(function(e,t){t=g(t)&&2===t.length?[].concat(Object(s.a)(t),Object(s.a)(t)):t,e.blendFuncSeparate.apply(e,Object(s.a)(t))})),Object(u.a)(i,"clearColor",(function(e,t){return e.clearColor.apply(e,Object(s.a)(t))})),Object(u.a)(i,"clearDepth",(function(e,t){return e.clearDepth(t)})),Object(u.a)(i,"clearStencil",(function(e,t){return e.clearStencil(t)})),Object(u.a)(i,"colorMask",(function(e,t){return e.colorMask.apply(e,Object(s.a)(t))})),Object(u.a)(i,"cull",(function(e,t){return t?e.enable(2884):e.disable(2884)})),Object(u.a)(i,"cullFace",(function(e,t){return e.cullFace(t)})),Object(u.a)(i,"depthTest",(function(e,t){return t?e.enable(2929):e.disable(2929)})),Object(u.a)(i,"depthFunc",(function(e,t){return e.depthFunc(t)})),Object(u.a)(i,"depthMask",(function(e,t){return e.depthMask(t)})),Object(u.a)(i,"depthRange",(function(e,t){return e.depthRange.apply(e,Object(s.a)(t))})),Object(u.a)(i,"dither",(function(e,t){return t?e.enable(3024):e.disable(3024)})),Object(u.a)(i,"derivativeHint",(function(e,t){e.hint(35723,t)})),Object(u.a)(i,"frontFace",(function(e,t){return e.frontFace(t)})),Object(u.a)(i,"mipmapHint",(function(e,t){return e.hint(33170,t)})),Object(u.a)(i,"lineWidth",(function(e,t){return e.lineWidth(t)})),Object(u.a)(i,"polygonOffsetFill",(function(e,t){return t?e.enable(32823):e.disable(32823)})),Object(u.a)(i,"polygonOffset",(function(e,t){return e.polygonOffset.apply(e,Object(s.a)(t))})),Object(u.a)(i,"sampleCoverage",(function(e,t){return e.sampleCoverage.apply(e,Object(s.a)(t))})),Object(u.a)(i,"scissorTest",(function(e,t){return t?e.enable(3089):e.disable(3089)})),Object(u.a)(i,"scissor",(function(e,t){return e.scissor.apply(e,Object(s.a)(t))})),Object(u.a)(i,"stencilTest",(function(e,t){return t?e.enable(2960):e.disable(2960)})),Object(u.a)(i,"stencilMask",(function(e,t){var n=t=g(t)?t:[t,t],r=Object(o.a)(n,2),i=r[0],a=r[1];e.stencilMaskSeparate(1028,i),e.stencilMaskSeparate(1029,a)})),Object(u.a)(i,"stencilFunc",(function(e,t){var n=t=g(t)&&3===t.length?[].concat(Object(s.a)(t),Object(s.a)(t)):t,r=Object(o.a)(n,6),i=r[0],a=r[1],u=r[2],A=r[3],c=r[4],l=r[5];e.stencilFuncSeparate(1028,i,a,u),e.stencilFuncSeparate(1029,A,c,l)})),Object(u.a)(i,"stencilOp",(function(e,t){var n=t=g(t)&&3===t.length?[].concat(Object(s.a)(t),Object(s.a)(t)):t,r=Object(o.a)(n,6),i=r[0],a=r[1],u=r[2],A=r[3],c=r[4],l=r[5];e.stencilOpSeparate(1028,i,a,u),e.stencilOpSeparate(1029,A,c,l)})),Object(u.a)(i,"viewport",(function(e,t){return e.viewport.apply(e,Object(s.a)(t))})),i);function p(e,t,n){return void 0!==t[e]?t[e]:n[e]}var v={blendEquation:function(e,t,n){return e.blendEquationSeparate(p(32777,t,n),p(34877,t,n))},blendFunc:function(e,t,n){return e.blendFuncSeparate(p(32969,t,n),p(32968,t,n),p(32971,t,n),p(32970,t,n))},polygonOffset:function(e,t,n){return e.polygonOffset(p(32824,t,n),p(10752,t,n))},sampleCoverage:function(e,t,n){return e.sampleCoverage(p(32938,t,n),p(32939,t,n))},stencilFuncFront:function(e,t,n){return e.stencilFuncSeparate(1028,p(2962,t,n),p(2967,t,n),p(2963,t,n))},stencilFuncBack:function(e,t,n){return e.stencilFuncSeparate(1029,p(34816,t,n),p(36003,t,n),p(36004,t,n))},stencilOpFront:function(e,t,n){return e.stencilOpSeparate(1028,p(2964,t,n),p(2965,t,n),p(2966,t,n))},stencilOpBack:function(e,t,n){return e.stencilOpSeparate(1029,p(34817,t,n),p(34818,t,n),p(34819,t,n))}},y={enable:function(e,t){return e(Object(u.a)({},t,!0))},disable:function(e,t){return e(Object(u.a)({},t,!1))},pixelStorei:function(e,t,n){return e(Object(u.a)({},t,n))},hint:function(e,t,n){return e(Object(u.a)({},t,n))},bindFramebuffer:function(e,t,n){var r;switch(t){case 36160:return e((r={},Object(u.a)(r,36006,n),Object(u.a)(r,36010,n),r));case 36009:return e(Object(u.a)({},36006,n));case 36008:return e(Object(u.a)({},36010,n));default:return null}},blendColor:function(e,t,n,r,i){return e(Object(u.a)({},32773,new Float32Array([t,n,r,i])))},blendEquation:function(e,t){var n;return e((n={},Object(u.a)(n,32777,t),Object(u.a)(n,34877,t),n))},blendEquationSeparate:function(e,t,n){var r;return e((r={},Object(u.a)(r,32777,t),Object(u.a)(r,34877,n),r))},blendFunc:function(e,t,n){var r;return e((r={},Object(u.a)(r,32969,t),Object(u.a)(r,32968,n),Object(u.a)(r,32971,t),Object(u.a)(r,32970,n),r))},blendFuncSeparate:function(e,t,n,r,i){var a;return e((a={},Object(u.a)(a,32969,t),Object(u.a)(a,32968,n),Object(u.a)(a,32971,r),Object(u.a)(a,32970,i),a))},clearColor:function(e,t,n,r,i){return e(Object(u.a)({},3106,new Float32Array([t,n,r,i])))},clearDepth:function(e,t){return e(Object(u.a)({},2931,t))},clearStencil:function(e,t){return e(Object(u.a)({},2961,t))},colorMask:function(e,t,n,r,i){return e(Object(u.a)({},3107,[t,n,r,i]))},cullFace:function(e,t){return e(Object(u.a)({},2885,t))},depthFunc:function(e,t){return e(Object(u.a)({},2932,t))},depthRange:function(e,t,n){return e(Object(u.a)({},2928,new Float32Array([t,n])))},depthMask:function(e,t){return e(Object(u.a)({},2930,t))},frontFace:function(e,t){return e(Object(u.a)({},2886,t))},lineWidth:function(e,t){return e(Object(u.a)({},2849,t))},polygonOffset:function(e,t,n){var r;return e((r={},Object(u.a)(r,32824,t),Object(u.a)(r,10752,n),r))},sampleCoverage:function(e,t,n){var r;return e((r={},Object(u.a)(r,32938,t),Object(u.a)(r,32939,n),r))},scissor:function(e,t,n,r,i){return e(Object(u.a)({},3088,new Int32Array([t,n,r,i])))},stencilMask:function(e,t){var n;return e((n={},Object(u.a)(n,2968,t),Object(u.a)(n,36005,t),n))},stencilMaskSeparate:function(e,t,n){return e(Object(u.a)({},1028===t?2968:36005,n))},stencilFunc:function(e,t,n,r){var i;return e((i={},Object(u.a)(i,2962,t),Object(u.a)(i,2967,n),Object(u.a)(i,2963,r),Object(u.a)(i,34816,t),Object(u.a)(i,36003,n),Object(u.a)(i,36004,r),i))},stencilFuncSeparate:function(e,t,n,r,i){var a;return e((a={},Object(u.a)(a,1028===t?2962:34816,n),Object(u.a)(a,1028===t?2967:36003,r),Object(u.a)(a,1028===t?2963:36004,i),a))},stencilOp:function(e,t,n,r){var i;return e((i={},Object(u.a)(i,2964,t),Object(u.a)(i,2965,n),Object(u.a)(i,2966,r),Object(u.a)(i,34817,t),Object(u.a)(i,34818,n),Object(u.a)(i,34819,r),i))},stencilOpSeparate:function(e,t,n,r,i){var a;return e((a={},Object(u.a)(a,1028===t?2964:34817,n),Object(u.a)(a,1028===t?2965:34818,r),Object(u.a)(a,1028===t?2966:34819,i),a))},viewport:function(e,t,n,r,i){return e(Object(u.a)({},2978,[t,n,r,i]))}},m=function(e,t){return e.isEnabled(t)},I=(a={},Object(u.a)(a,3042,m),Object(u.a)(a,2884,m),Object(u.a)(a,2929,m),Object(u.a)(a,3024,m),Object(u.a)(a,32823,m),Object(u.a)(a,32926,m),Object(u.a)(a,32928,m),Object(u.a)(a,3089,m),Object(u.a)(a,2960,m),Object(u.a)(a,35977,m),a)},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o}));var r=n(51),i=n(21);function a(e){Object(r.a)(Object(i.f)(e),"Invalid WebGLRenderingContext")}function o(e){Object(r.a)(Object(i.g)(e),"Requires WebGL2")}},function(e,t,n){"use strict";n.d(t,"l",(function(){return B})),n.d(t,"i",(function(){return w})),n.d(t,"d",(function(){return Q})),n.d(t,"f",(function(){return k})),n.d(t,"e",(function(){return _})),n.d(t,"s",(function(){return x})),n.d(t,"q",(function(){return S})),n.d(t,"o",(function(){return O})),n.d(t,"g",(function(){return D})),n.d(t,"j",(function(){return j})),n.d(t,"k",(function(){return M})),n.d(t,"m",(function(){return N})),n.d(t,"h",(function(){return F})),n.d(t,"n",(function(){return L})),n.d(t,"r",(function(){return P})),n.d(t,"a",(function(){return U})),n.d(t,"p",(function(){return G})),n.d(t,"t",(function(){return q})),n.d(t,"c",(function(){return H})),n.d(t,"b",(function(){return Y}));var r=n(24),i=n(47),a=n(22),o=n(330),s=n.n(o),u=n(475),A=n.n(u),c=n(97),l=n.n(c),f=n(318),h=n.n(f),g=n(72),d=n(537),p=n.n(d),v=n(380),y=n.n(v),m=n(91),I=n(85),b=n(123);function E(e){return e.children?e.children.flatMap((function(e){return E(e)})):e.set||[]}function C(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e.children)return t;var n=t+1,r=e.children.map((function(e){return C(e,n)}));return Math.max.apply(Math,Object(a.a)(r).concat([n]))}function B(e,t){var n=e.tree.map((function(e){return function e(t,n,r){var i=n[r];if(t.name===i){if(r===n.length-1)return t;if(t.children){var a=t.children.map((function(t){return e(t,n,r+1)})).filter(Boolean);if(1===a.length)return a[0]}}return null}(e,t,0)})).filter(Boolean);return 1===n.length?n[0]:null}function w(e,t,n,r,o){var s;return s=o?Object(a.a)(o):[e.name],t(e,s)?(r.push(s),n(e)):e.children?Object(i.a)({},e,{children:e.children.map((function(e){return w(e,t,n,r,s.concat([e.name]))}))}):e}function Q(e,t){return Object(i.a)({},e,{children:[].concat(Object(a.a)(e.children),[t])})}function k(e,t){return Object(i.a)({},e,{children:[t].concat(Object(a.a)(e.children))})}function _(e,t,n){var r=Array.from(e.children);return r.splice(n,0,t),Object(i.a)({},e,{children:r})}function x(e,t){var n=t.map((function(t){return B(e,t)})).map((function(e){return E(e).map((function(e){return Object(r.a)(e,1)[0]}))}));return n.reduce((function(e,t){return e.concat(t.filter((function(t){return!e.includes(t)})))}),n[0]||[])}function S(e,t){var n=t.map((function(t){return B(e,t)})).map((function(e){return E(e).map((function(e){return Object(r.a)(e,1)[0]}))}));return n.reduce((function(e,t){return t.filter((function(t){return e.includes(t)}))}),n[0]||[])}function O(e,t,n){var r=x(e,t);return n.filter((function(e){return!r.includes(e)}))}function D(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return e.children?0===t?[[].concat(Object(a.a)(n),[e.name])]:e.children.flatMap((function(i){return D(i,t-1,[].concat(Object(a.a)(n),[e.name]),r)})).filter(Boolean):r?[[].concat(Object(a.a)(n),[e.name])]:null}function R(e,t){return{version:m.c[t].latestVersion,datatype:t,tree:e.tree}}function j(e,t,n){var r=B(e,t);return{treeToExport:R(Object(i.a)({},e,{tree:e.tree.filter((function(e){return e.name===t[0]}))}),n),nodeName:r.name}}function M(e,t){var n=B(e,t);return{setToExport:E(n),nodeName:n.name}}function N(e){return{version:m.c[e].latestVersion,datatype:e,tree:[]}}function F(e,t,n){var r,i=t.length-1;return{title:e.name,nodeKey:Object(b.g)(t),path:t,size:E(e).length,color:null===n||void 0===n||null===(r=n.find((function(e){return l()(e.path,t)})))||void 0===r?void 0:r.color,level:i,isLeaf:(!e.children||0===e.children.length)&&Boolean(e.set),height:C(e)}}function T(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[128,128,128];return[(e[0]-n[0])*t+n[0],(e[1]-n[1])*t+n[1],(e[2]-n[2])*t+n[2]]}function L(e,t,n){var i=[];return t.forEach((function(t){var o=B(e,t);if(o){var s,u=E(o),c=(null===n||void 0===n||null===(s=n.find((function(e){return l()(e.path,t)})))||void 0===s?void 0:s.color)||I.b;i=[].concat(Object(a.a)(i),Object(a.a)(u.map((function(e){var t=Object(r.a)(e,2),n=t[0],i=t[1];return[n,A()(i)?c:T(c,i)]}))))}})),new Map(i)}function P(e,t,n){var r=[];return t.forEach((function(t){var i=B(e,t);if(i){var a,o=E(i),u=(null===(a=n.find((function(e){return l()(e.path,t)})))||void 0===a?void 0:a.color)||I.b;r.push({key:s()(),name:i.name,size:o.length,color:u})}})),r}function U(e,t,n){return l()([].concat(Object(a.a)(t),[e.name]),n)?null:e.children?Object(i.a)({},e,{children:e.children.map((function(r){return U(r,[].concat(Object(a.a)(t),[e.name]),n)})).filter(Boolean)}):e}function G(e,t){var n=null;return e&&e.tree.forEach((function(e){var r=[e.name],i=C(e);h()(i).forEach((function(i){var a=i+1,o=D(e,a,[],!0);l()(o,t)&&(n={levelZeroPath:r,levelIndex:a})}))})),n}function q(e,t){var n=[],r=[],i=!1;function o(e,t){n.push([].concat(Object(a.a)(t),[e.name])),e.children&&e.children.forEach((function(n){return o(n,[].concat(Object(a.a)(t),[e.name]))}))}return e.tree.forEach((function(e){return o(e,[])})),t.tree.forEach((function(e){return t=e,n=[],r.push([].concat(Object(a.a)(n),[t.name])),void(t.children&&t.children.forEach((function(e){return o(e,[].concat(Object(a.a)(n),[t.name]))})));var t,n})),r.forEach((function(e){n.find((function(t){return l()(t,e)}))&&(i=!0)})),i}function H(e,t){var n=Object(a.a)(t||[]),r=e.tree.map((function(e){return Array.from({length:C(e)+1}).fill(0)}));return e.tree.forEach((function(e,t){return function e(t,i,o,s){var u=r[s][o],A=[].concat(Object(a.a)(i),[t.name]);n.find((function(e){return l()(e.path,A)}))||n.push({path:A,color:I.d[u%I.d.length]}),r[s][o]+=1,t.children&&t.children.forEach((function(t){return e(t,A,o+1,s)}))}(e,[],0,t)})),n}function Y(e){var t=e.cells,n=e.mapping,i=e.cellSets,a=e.cellSetSelection,o=e.cellSetColor;return a&&a.length>0&&i&&t?function(e,t,n,i,a){var o=[];return i.forEach((function(i){var s=B(e,i);if(s){var u,A=E(s),c=(null===a||void 0===a||null===(u=a.find((function(e){return l()(e.path,i)})))||void 0===u?void 0:u.color)||I.b,f=A.map((function(e){var i,a,o=Object(r.a)(e,1)[0];return[null===(i=t[o])||void 0===i?void 0:i.mappings[n][0],-(null===(a=t[o])||void 0===a?void 0:a.mappings[n][1])]})).filter(Boolean);if(f.length>2){var h=Object(g.featureCollection)(f.map(g.point)),d=p()(h);if(d){var v=d.geometry.coordinates,m=y()(h).geometry.coordinates;o.push({path:i,name:i[i.length-1],hull:v,color:c,centroid:m})}}}})),o}(i,t,n,a,o):[]}},function(e,t,n){"use strict";var r=n(11),i=n(13),a=function(){function e(t){Object(r.a)(this,e),this.message=t}return Object(i.a)(e,[{key:"warnInConsole",value:function(){throw new Error("The warnInConsole() method has not been implemented.")}}]),e}(),o=n(14),s=n(15),u=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e,i,a,o){var s;return Object(r.a)(this,n),(s=t.call(this,"Error HTTP status fetching ".concat(e,"."))).name="LoaderFetchError",s.datasetType=e,s.datasetFileType=i,s.datasetUrl=a,s.responseHeaders=o,s}return Object(i.a)(n,[{key:"warnInConsole",value:function(){var e=this.datasetType,t=this.datasetUrl,n=this.responseHeaders;console.warn("".concat(e," from ").concat(t,": fetch failed"),n)}}]),n}(a),A=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e,i,a,o){var s;return Object(r.a)(this,n),(s=t.call(this,"Error while validating ".concat(e,"."))).name="LoaderValidationError",s.datasetType=e,s.datasetFileType=i,s.datasetUrl=a,s.reason=o,s}return Object(i.a)(n,[{key:"warnInConsole",value:function(){var e=this.datasetType,t=this.datasetUrl,n=this.reason;console.warn("".concat(e," from ").concat(t,": validation failed"),JSON.stringify(n,null,2))}}]),n}(a),c=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,"Error finding loader for ".concat(e,"."))).name="LoaderNotFoundError",o.datasetType=e,o.datasetFileType=i,o.datasetUrl=a,o}return Object(i.a)(n,[{key:"warnInConsole",value:function(){var e=this.datasetType,t=this.datasetFileType,n=this.datasetUrl;t&&n?console.warn("".concat(e," from ").concat(n,": unable to find loader for fileType ").concat(t)):console.warn("".concat(e,": unable to find loader"))}}]),n}(a);n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return u})),n.d(t,"d",(function(){return A})),n.d(t,"c",(function(){return c}))},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(261),i=n(265),a=n(150),o=n(262);function s(e){return Object(r.a)(e)||Object(i.a)(e)||Object(a.a)(e)||Object(o.a)()}},function(e,t,n){var r=n(399),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();e.exports=a},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return f})),n.d(t,"c",(function(){return h})),n.d(t,"b",(function(){return g}));var r=n(3),i=n(2),a=n(132),o=n(164),s=n(43);function u(e,t){var n=e[t].bind(e);e[t]=function(){var t=arguments.length<=0?void 0:arguments[0];return t in e.state.cache||(e.state.cache[t]=n.apply(void 0,arguments)),e.state.enable?e.state.cache[t]:n.apply(void 0,arguments)},Object.defineProperty(e[t],"name",{value:"".concat(t,"-from-cache"),configurable:!1})}function A(e,t,n){var r=e[t].bind(e);e[t]=function(){for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];var o=n.apply(void 0,[e.state._updateCache].concat(i)),s=o.valueChanged,u=o.oldValue;return s&&r.apply(void 0,i),u},Object.defineProperty(e[t],"name",{value:"".concat(t,"-to-cache"),configurable:!1})}function c(e){var t=e.useProgram.bind(e);e.useProgram=function(n){e.state.program!==n&&(t(n),e.state.program=n)}}var l=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.copyState,s=void 0!==i&&i,u=n.log,A=void 0===u?function(){}:u;Object(r.a)(this,e),this.gl=t,this.program=null,this.stateStack=[],this.enable=!0,this.cache=s?Object(o.a)(t):Object.assign({},a.c),this.log=A,this._updateCache=this._updateCache.bind(this),Object.seal(this)}return Object(i.a)(e,[{key:"push",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.stateStack.push({})}},{key:"pop",value:function(){Object(s.a)(this.stateStack.length>0);var e=this.stateStack[this.stateStack.length-1];Object(o.c)(this.gl,e,this.cache),this.stateStack.pop()}},{key:"_updateCache",value:function(e){var t,n=!1,r=this.stateStack.length>0&&this.stateStack[this.stateStack.length-1];for(var i in e){Object(s.a)(void 0!==i);var a=e[i],o=this.cache[i];Object(s.d)(a,o)||(n=!0,t=o,r&&!(i in r)&&(r[i]=o),this.cache[i]=a)}return{valueChanged:n,oldValue:t}}}]),e}();function f(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.enable,i=void 0===r||r,o=n.copyState;if(Object(s.a)(void 0!==o),!t.state){var f="undefined"!==typeof e?e:window;for(var h in f.polyfillContext&&f.polyfillContext(t),t.state=new l(t,{copyState:o,enable:i}),c(t),a.b){var g=a.b[h];A(t,h,g)}u(t,"getParameter"),u(t,"isEnabled")}return t.state.enable=i,t}function h(e){e.state||f(e,{copyState:!1}),e.state.push()}function g(e){Object(s.a)(e.state),e.state.pop()}}).call(this,n(70))},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n(1),i=n(16),a=n(3),o=n(7),s=n(58),u=n(4),A=n(29),c=n(2),l=n(6),f=n(21),h=n(89),g=n(179),d=n(191),p=n(314),v=n(362),y=n(734),m=n(133),I=n(174),b=n(51),E=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(a.a)(this,t),(n=Object(o.a)(this,Object(u.a)(t).call(this,e,r))).width=null,n.height=null,n.attachments={},n.readBuffer=36064,n.drawBuffers=[36064],n.ownResources=[],n.initialize(r),Object.seal(Object(s.a)(n)),n}return Object(l.a)(t,e),Object(c.a)(t,[{key:"MAX_COLOR_ATTACHMENTS",get:function(){return this.gl.getParameter(this.gl.MAX_COLOR_ATTACHMENTS)}},{key:"MAX_DRAW_BUFFERS",get:function(){return this.gl.getParameter(this.gl.MAX_DRAW_BUFFERS)}}],[{key:"isSupported",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.colorBufferFloat,r=t.colorBufferHalfFloat,i=!0;return n&&(i=Boolean(e.getExtension("EXT_color_buffer_float")||e.getExtension("WEBGL_color_buffer_float")||e.getExtension("OES_texture_float"))),r&&(i=i&&Boolean(e.getExtension("EXT_color_buffer_float")||e.getExtension("EXT_color_buffer_half_float"))),i}},{key:"getDefaultFramebuffer",value:function(e){return e.luma=e.luma||{},e.luma.defaultFramebuffer=e.luma.defaultFramebuffer||new t(e,{id:"default-framebuffer",handle:null,attachments:{}}),e.luma.defaultFramebuffer}}]),Object(c.a)(t,[{key:"initialize",value:function(e){var t=e.width,n=void 0===t?1:t,r=e.height,i=void 0===r?1:r,a=e.attachments,o=void 0===a?null:a,s=e.color,u=void 0===s||s,A=e.depth,c=void 0===A||A,l=e.stencil,f=void 0!==l&&l,h=e.check,g=void 0===h||h,d=e.readBuffer,p=e.drawBuffers;if(Object(b.a)(n>=0&&i>=0,"Width and height need to be integers"),this.width=n,this.height=i,o)for(var v in o){var y=o[v];(Array.isArray(y)?y[0]:y).resize({width:n,height:i})}else o=this._createDefaultAttachments(u,c,f,n,i);this.update({clearAttachments:!0,attachments:o,readBuffer:d,drawBuffers:p}),o&&g&&this.checkStatus()}},{key:"delete",value:function(){var e=!0,n=!1,r=void 0;try{for(var i,a=this.ownResources[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){i.value.delete()}}catch(o){n=!0,r=o}finally{try{e||null==a.return||a.return()}finally{if(n)throw r}}Object(A.a)(Object(u.a)(t.prototype),"delete",this).call(this)}},{key:"update",value:function(e){var t=e.attachments,n=void 0===t?{}:t,r=e.readBuffer,i=e.drawBuffers,a=e.clearAttachments,o=void 0!==a&&a,s=e.resizeAttachments,u=void 0===s||s;this.attach(n,{clearAttachments:o,resizeAttachments:u});var A=this.gl,c=A.bindFramebuffer(36160,this.handle);return r&&this._setReadBuffer(r),i&&this._setDrawBuffers(i),A.bindFramebuffer(36160,c||null),this}},{key:"resize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height;if(null===this.handle)return Object(b.a)(void 0===t&&void 0===n),this.width=this.gl.drawingBufferWidth,this.height=this.gl.drawingBufferHeight,this;for(var r in void 0===t&&(t=this.gl.drawingBufferWidth),void 0===n&&(n=this.gl.drawingBufferHeight),t!==this.width&&n!==this.height&&f.h.log(2,"Resizing framebuffer ".concat(this.id," to ").concat(t,"x").concat(n))(),this.attachments)this.attachments[r].resize({width:t,height:n});return this.width=t,this.height=n,this}},{key:"attach",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.clearAttachments,a=void 0!==r&&r,o=n.resizeAttachments,s=void 0===o||o,u={};a&&Object.keys(this.attachments).forEach((function(e){u[e]=null})),Object.assign(u,e);var A=this.gl.bindFramebuffer(36160,this.handle);for(var c in u){Object(b.a)(void 0!==c,"Misspelled framebuffer binding point?");var l=Number(c),f=u[l],h=f;if(h)if(h instanceof d.a)this._attachRenderbuffer({attachment:l,renderbuffer:h});else if(Array.isArray(f)){var g=Object(i.a)(f,3),p=g[0],v=g[1],y=void 0===v?0:v,m=g[2],I=void 0===m?0:m;h=p,this._attachTexture({attachment:l,texture:p,layer:y,level:I})}else this._attachTexture({attachment:l,texture:h,layer:0,level:0});else this._unattach(l);s&&h&&h.resize({width:this.width,height:this.height})}this.gl.bindFramebuffer(36160,A||null),Object.assign(this.attachments,e),Object.keys(this.attachments).filter((function(e){return!t.attachments[e]})).forEach((function(e){delete t.attachments[e]}))}},{key:"checkStatus",value:function(){this.gl;var e=this.getStatus();if(36053!==e)throw new Error(C(e));return this}},{key:"getStatus",value:function(){var e=this.gl,t=e.bindFramebuffer(36160,this.handle),n=e.checkFramebufferStatus(36160);return e.bindFramebuffer(36160,t||null),n}},{key:"clear",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.color,n=e.depth,r=e.stencil,i=e.drawBuffers,a=void 0===i?[]:i,o=this.gl.bindFramebuffer(36160,this.handle);return(t||n||r)&&Object(p.a)(this.gl,{color:t,depth:n,stencil:r}),a.forEach((function(e,t){Object(p.b)({drawBuffer:t,value:e})})),this.gl.bindFramebuffer(36160,o||null),this}},{key:"readPixels",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return f.h.error("Framebuffer.readPixels() is no logner supported, use readPixelsToArray(framebuffer)")(),null}},{key:"readPixelsToBuffer",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return f.h.error("Framebuffer.readPixelsToBuffer()is no logner supported, use readPixelsToBuffer(framebuffer)")(),null}},{key:"copyToDataUrl",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return f.h.error("Framebuffer.copyToDataUrl() is no logner supported, use copyToDataUrl(framebuffer)")(),null}},{key:"copyToImage",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return f.h.error("Framebuffer.copyToImage() is no logner supported, use copyToImage(framebuffer)")(),null}},{key:"copyToTexture",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return f.h.error("Framebuffer.copyToTexture({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}},{key:"blit",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return f.h.error("Framebuffer.blit({...}) is no logner supported, use blit(source, target, opts)")(),null}},{key:"invalidate",value:function(e){var t=e.attachments,n=void 0===t?[]:t,r=e.x,i=void 0===r?0:r,a=e.y,o=void 0===a?0:a,s=e.width,u=e.height,A=this.gl;Object(m.a)(A);var c=A.bindFramebuffer(36008,this.handle);return 0===i&&0===o&&void 0===s&&void 0===u?A.invalidateFramebuffer(36008,n):A.invalidateFramebuffer(36008,n,i,o,s,u),A.bindFramebuffer(36008,c),this}},{key:"getAttachmentParameter",value:function(e,t,n){var r=this._getAttachmentParameterFallback(t);return null===r&&(this.gl.bindFramebuffer(36160,this.handle),r=this.gl.getFramebufferAttachmentParameter(36160,e,t),this.gl.bindFramebuffer(36160,null)),n&&r>1e3&&(r=Object(I.a)(this.gl,r)),r}},{key:"getAttachmentParameters",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:36064,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.constructor.ATTACHMENT_PARAMETERS||[],r={},i=!0,a=!1,o=void 0;try{for(var s,u=n[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var A=s.value,c=t?Object(I.a)(this.gl,A):A;r[c]=this.getAttachmentParameter(e,A,t)}}catch(l){a=!0,o=l}finally{try{i||null==u.return||u.return()}finally{if(a)throw o}}return r}},{key:"getParameters",value:function(){for(var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=Object.keys(this.attachments),n={},r=0,i=t;r<i.length;r++){var a=i[r],o=Number(a),s=e?Object(I.a)(this.gl,o):o;n[s]=this.getAttachmentParameters(o,e)}return n}},{key:"show",value:function(){return"undefined"!==typeof window&&window.open(Object(v.a)(this),"luma-debug-texture"),this}},{key:"log",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(e>f.h.level||"undefined"===typeof window)return this;t=t||"Framebuffer ".concat(this.id);var n=Object(v.a)(this,{maxHeight:100});return f.h.image({logLevel:e,message:t,image:n},t)(),this}},{key:"bind",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.target,n=void 0===t?36160:t;return this.gl.bindFramebuffer(n,this.handle),this}},{key:"unbind",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.target,n=void 0===t?36160:t;return this.gl.bindFramebuffer(n,null),this}},{key:"_createDefaultAttachments",value:function(e,t,n,i,a){var o,s=null;e&&((s=s||{})[36064]=new g.a(this.gl,{id:"".concat(this.id,"-color0"),pixels:null,format:6408,type:5121,width:i,height:a,mipmaps:!1,parameters:(o={},Object(r.a)(o,10241,9729),Object(r.a)(o,10240,9729),Object(r.a)(o,10242,33071),Object(r.a)(o,10243,33071),o)}),this.ownResources.push(s[36064]));return t&&n?((s=s||{})[33306]=new d.a(this.gl,{id:"".concat(this.id,"-depth-stencil"),format:35056,width:i,height:111}),this.ownResources.push(s[33306])):t?((s=s||{})[36096]=new d.a(this.gl,{id:"".concat(this.id,"-depth"),format:33189,width:i,height:a}),this.ownResources.push(s[36096])):n&&Object(b.a)(!1),s}},{key:"_unattach",value:function(e){var t=this.attachments[e];t&&(t instanceof d.a?this.gl.framebufferRenderbuffer(36160,e,36161,null):this.gl.framebufferTexture2D(36160,e,3553,null,0),delete this.attachments[e])}},{key:"_attachRenderbuffer",value:function(e){var t=e.attachment,n=void 0===t?36064:t,r=e.renderbuffer;this.gl.framebufferRenderbuffer(36160,n,36161,r.handle),this.attachments[n]=r}},{key:"_attachTexture",value:function(e){var t=e.attachment,n=void 0===t?36064:t,r=e.texture,i=e.layer,a=e.level,o=this.gl;switch(o.bindTexture(r.target,r.handle),r.target){case 35866:case 32879:o.framebufferTextureLayer(36160,n,r.target,a,i);break;case 34067:var s=function(e){return e<34069?e+34069:e}(i);o.framebufferTexture2D(36160,n,s,r.handle,a);break;case 3553:o.framebufferTexture2D(36160,n,3553,r.handle,a);break;default:Object(b.a)(!1,"Illegal texture type")}o.bindTexture(r.target,null),this.attachments[n]=r}},{key:"_setReadBuffer",value:function(e){var t=this.gl;Object(f.g)(t)?t.readBuffer(e):Object(b.a)(36064===e||1029===e,"Multiple render targets not supported"),this.readBuffer=e}},{key:"_setDrawBuffers",value:function(e){var t=this.gl;if(Object(f.g)(t))t.drawBuffers(e);else{var n=t.getExtension("WEBGL.draw_buffers");n?n.drawBuffersWEBGL(e):Object(b.a)(1===e.length&&(36064===e[0]||1029===e[0]),"Multiple render targets not supported")}this.drawBuffers=e}},{key:"_getAttachmentParameterFallback",value:function(e){var t=Object(y.a)(this.gl);switch(e){case 36052:return t.WEBGL2?null:0;case 33298:case 33299:case 33300:case 33301:case 33302:case 33303:return t.WEBGL2?null:8;case 33297:return t.WEBGL2?null:5125;case 33296:return t.WEBGL2||t.EXT_sRGB?null:9729;default:return null}}},{key:"_createHandle",value:function(){return this.gl.createFramebuffer()}},{key:"_deleteHandle",value:function(){this.gl.deleteFramebuffer(this.handle)}},{key:"_bindHandle",value:function(e){return this.gl.bindFramebuffer(36160,e)}},{key:"color",get:function(){return this.attachments[36064]||null}},{key:"texture",get:function(){return this.attachments[36064]||null}},{key:"depth",get:function(){return this.attachments[36096]||this.attachments[33306]||null}},{key:"stencil",get:function(){return this.attachments[36128]||this.attachments[33306]||null}}]),t}(h.a);function C(e){return(E.STATUS||{})[e]||"Framebuffer error ".concat(e)}E.ATTACHMENT_PARAMETERS=[36049,36048,33296,33298,33299,33300,33301,33302,33303]},function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if(!e||!t)return!1;for(var n in e){var i=e[n],a=t[n];if(!(i===a||Array.isArray(i)&&Array.isArray(a)&&r(i,a)))return!1}return!0}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(3),i=n(2);function a(){}var o={onStart:a,onUpdate:a,onInterrupt:a,onEnd:a},s=function(){function e(t){Object(r.a)(this,e),this._inProgress=!1,this._handle=null,this.timeline=t,this.settings={}}return Object(i.a)(e,[{key:"start",value:function(e){this.cancel(),this.settings=Object.assign({},o,e),this._inProgress=!0,this.settings.onStart(this)}},{key:"end",value:function(){this._inProgress&&(this.timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1,this.settings.onEnd(this))}},{key:"cancel",value:function(){this._inProgress&&(this.settings.onInterrupt(this),this.timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1)}},{key:"update",value:function(){if(!this._inProgress)return!1;if(null===this._handle){var e=this.timeline,t=this.settings;this._handle=e.addChannel({delay:e.getTime(),duration:t.duration})}return this.time=this.timeline.getTime(this._handle),this._onUpdate(),this.settings.onUpdate(this),this.timeline.isFinished(this._handle)&&this.end(),!0}},{key:"_onUpdate",value:function(){}},{key:"inProgress",get:function(){return this._inProgress}}]),e}()},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error("math.gl assertion ".concat(t))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));var r="vs",i="fs"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72);function i(e,t,n){if(null!==e)for(var r,a,o,s,u,A,c,l,f=0,h=0,g=e.type,d="FeatureCollection"===g,p="Feature"===g,v=d?e.features.length:1,y=0;y<v;y++){u=(l=!!(c=d?e.features[y].geometry:p?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var m=0;m<u;m++){var I=0,b=0;if(null!==(s=l?c.geometries[m]:c)){A=s.coordinates;var E=s.type;switch(f=!n||"Polygon"!==E&&"MultiPolygon"!==E?0:1,E){case null:break;case"Point":if(!1===t(A,h,y,I,b))return!1;h++,I++;break;case"LineString":case"MultiPoint":for(r=0;r<A.length;r++){if(!1===t(A[r],h,y,I,b))return!1;h++,"MultiPoint"===E&&I++}"LineString"===E&&I++;break;case"Polygon":case"MultiLineString":for(r=0;r<A.length;r++){for(a=0;a<A[r].length-f;a++){if(!1===t(A[r][a],h,y,I,b))return!1;h++}"MultiLineString"===E&&I++,"Polygon"===E&&b++}"Polygon"===E&&I++;break;case"MultiPolygon":for(r=0;r<A.length;r++){for(b=0,a=0;a<A[r].length;a++){for(o=0;o<A[r][a].length-f;o++){if(!1===t(A[r][a][o],h,y,I,b))return!1;h++}b++}I++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===i(s.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function a(e,t){var n;switch(e.type){case"FeatureCollection":for(n=0;n<e.features.length&&!1!==t(e.features[n].properties,n);n++);break;case"Feature":t(e.properties,0)}}function o(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function s(e,t){var n,r,i,a,o,s,u,A,c,l,f=0,h="FeatureCollection"===e.type,g="Feature"===e.type,d=h?e.features.length:1;for(n=0;n<d;n++){for(s=h?e.features[n].geometry:g?e.geometry:e,A=h?e.features[n].properties:g?e.properties:{},c=h?e.features[n].bbox:g?e.bbox:void 0,l=h?e.features[n].id:g?e.id:void 0,o=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<o;i++)if(null!==(a=u?s.geometries[i]:s))switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(a,f,A,c,l))return!1;break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===t(a.geometries[r],f,A,c,l))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,f,A,c,l))return!1;f++}}function u(e,t){s(e,(function(e,n,i,a,o){var s,u=null===e?null:e.type;switch(u){case null:case"Point":case"LineString":case"Polygon":return!1!==t(r.feature(e,i,{bbox:a,id:o}),n,0)&&void 0}switch(u){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon"}for(var A=0;A<e.coordinates.length;A++){var c={type:s,coordinates:e.coordinates[A]};if(!1===t(r.feature(c,i),n,A))return!1}}))}function A(e,t){u(e,(function(e,n,a){var o=0;if(e.geometry){var s=e.geometry.type;if("Point"!==s&&"MultiPoint"!==s){var u,A=0,c=0,l=0;return!1!==i(e,(function(i,s,f,h,g){if(void 0===u||n>A||h>c||g>l)return u=i,A=n,c=h,l=g,void(o=0);var d=r.lineString([u,i],e.properties);if(!1===t(d,n,a,g,o))return!1;o++,u=i}))&&void 0}}}))}function c(e,t){if(!e)throw new Error("geojson is required");u(e,(function(e,n,i){if(null!==e.geometry){var a=e.geometry.type,o=e.geometry.coordinates;switch(a){case"LineString":if(!1===t(e,n,i,0,0))return!1;break;case"Polygon":for(var s=0;s<o.length;s++)if(!1===t(r.lineString(o[s],e.properties),n,i,s))return!1}}}))}t.coordEach=i,t.coordReduce=function(e,t,n,r){var a=n;return i(e,(function(e,r,i,o,s){a=0===r&&void 0===n?e:t(a,e,r,i,o,s)}),r),a},t.propEach=a,t.propReduce=function(e,t,n){var r=n;return a(e,(function(e,i){r=0===i&&void 0===n?e:t(r,e,i)})),r},t.featureEach=o,t.featureReduce=function(e,t,n){var r=n;return o(e,(function(e,i){r=0===i&&void 0===n?e:t(r,e,i)})),r},t.coordAll=function(e){var t=[];return i(e,(function(e){t.push(e)})),t},t.geomEach=s,t.geomReduce=function(e,t,n){var r=n;return s(e,(function(e,i,a,o,s){r=0===i&&void 0===n?e:t(r,e,i,a,o,s)})),r},t.flattenEach=u,t.flattenReduce=function(e,t,n){var r=n;return u(e,(function(e,i,a){r=0===i&&0===a&&void 0===n?e:t(r,e,i,a)})),r},t.segmentEach=A,t.segmentReduce=function(e,t,n){var r=n,i=!1;return A(e,(function(e,a,o,s,u){r=!1===i&&void 0===n?e:t(r,e,a,o,s,u),i=!0})),r},t.lineEach=c,t.lineReduce=function(e,t,n){var r=n;return c(e,(function(e,i,a,o){r=0===i&&void 0===n?e:t(r,e,i,a,o)})),r},t.findSegment=function(e,t){if(t=t||{},!r.isObject(t))throw new Error("options is invalid");var n,i=t.featureIndex||0,a=t.multiFeatureIndex||0,o=t.geometryIndex||0,s=t.segmentIndex||0,u=t.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),u=u||e.features[i].properties,n=e.features[i].geometry;break;case"Feature":u=u||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var A=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=A.length+s-1),r.lineString([A[s],A[s+1]],u,t);case"Polygon":return o<0&&(o=A.length+o),s<0&&(s=A[o].length+s-1),r.lineString([A[o][s],A[o][s+1]],u,t);case"MultiLineString":return a<0&&(a=A.length+a),s<0&&(s=A[a].length+s-1),r.lineString([A[a][s],A[a][s+1]],u,t);case"MultiPolygon":return a<0&&(a=A.length+a),o<0&&(o=A[a].length+o),s<0&&(s=A[a][o].length-s-1),r.lineString([A[a][o][s],A[a][o][s+1]],u,t)}throw new Error("geojson is invalid")},t.findPoint=function(e,t){if(t=t||{},!r.isObject(t))throw new Error("options is invalid");var n,i=t.featureIndex||0,a=t.multiFeatureIndex||0,o=t.geometryIndex||0,s=t.coordIndex||0,u=t.properties;switch(e.type){case"FeatureCollection":i<0&&(i=e.features.length+i),u=u||e.features[i].properties,n=e.features[i].geometry;break;case"Feature":u=u||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var A=n.coordinates;switch(n.type){case"Point":return r.point(A,u,t);case"MultiPoint":return a<0&&(a=A.length+a),r.point(A[a],u,t);case"LineString":return s<0&&(s=A.length+s),r.point(A[s],u,t);case"Polygon":return o<0&&(o=A.length+o),s<0&&(s=A[o].length+s),r.point(A[o][s],u,t);case"MultiLineString":return a<0&&(a=A.length+a),s<0&&(s=A[a].length+s),r.point(A[a][s],u,t);case"MultiPolygon":return a<0&&(a=A.length+a),o<0&&(o=A[a].length+o),s<0&&(s=A[a][o].length-s),r.point(A[a][o][s],u,t)}throw new Error("geojson is invalid")}},function(e,t,n){var r=n(614);e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(206),i=n(52);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?i(e):t}},function(e,t,n){"use strict";n.r(t),t.default={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,FUNC_ADD:32774,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,BLEND_COLOR:32773,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,VENDOR:7936,RENDERER:7937,VERSION:7938,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,BROWSER_DEFAULT_WEBGL:37444,STATIC_DRAW:35044,STREAM_DRAW:35040,DYNAMIC_DRAW:35048,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,CULL_FACE:2884,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,BLEND:3042,DEPTH_TEST:2929,DITHER:3024,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,SCISSOR_TEST:3089,STENCIL_TEST:2960,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CONTEXT_LOST_WEBGL:37442,CW:2304,CCW:2305,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,COMPILE_STATUS:35713,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_ATTRIBUTES:35721,ACTIVE_UNIFORMS:35718,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,ALWAYS:519,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,GEQUAL:518,NOTEQUAL:517,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,TEXTURE_WIDTH:4096,TEXTURE_HEIGHT:4097,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,MAX_3D_TEXTURE_SIZE:32883,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,MAX_TEXTURE_LOD_BIAS:34045,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,RASTERIZER_DISCARD:35977,VERTEX_ARRAY_BINDING:34229,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,MAX_ELEMENT_INDEX:36203,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,RGB9_E5:35901,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2UI:36975,TEXTURE_IMMUTABLE_FORMAT:37167,TEXTURE_IMMUTABLE_LEVELS:33503,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,UNSIGNED_INT_24_8:34042,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,INT_2_10_10_10_REV:36255,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,MAX_SAMPLES:36183,SAMPLER_BINDING:35097,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,UNSIGNED_NORMALIZED:35863,SIGNED_NORMALIZED:36764,VERTEX_ATTRIB_ARRAY_INTEGER:35069,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,DEPTH24_STENCIL8:35056,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,COLOR:6144,DEPTH:6145,STENCIL:6146,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,INVALID_INDEX:4294967295,TIMEOUT_IGNORED:-1,MAX_CLIENT_WAIT_TIMEOUT_WEBGL:37447,VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE:35070,UNMASKED_VENDOR_WEBGL:37445,UNMASKED_RENDERER_WEBGL:37446,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047,TEXTURE_MAX_ANISOTROPY_EXT:34046,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35986,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,UNSIGNED_INT_24_8_WEBGL:34042,HALF_FLOAT_OES:36193,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863,MIN_EXT:32775,MAX_EXT:32776,SRGB_EXT:35904,SRGB_ALPHA_EXT:35906,SRGB8_ALPHA8_EXT:35907,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT:33296,FRAGMENT_SHADER_DERIVATIVE_HINT_OES:35723,COLOR_ATTACHMENT0_WEBGL:36064,COLOR_ATTACHMENT1_WEBGL:36065,COLOR_ATTACHMENT2_WEBGL:36066,COLOR_ATTACHMENT3_WEBGL:36067,COLOR_ATTACHMENT4_WEBGL:36068,COLOR_ATTACHMENT5_WEBGL:36069,COLOR_ATTACHMENT6_WEBGL:36070,COLOR_ATTACHMENT7_WEBGL:36071,COLOR_ATTACHMENT8_WEBGL:36072,COLOR_ATTACHMENT9_WEBGL:36073,COLOR_ATTACHMENT10_WEBGL:36074,COLOR_ATTACHMENT11_WEBGL:36075,COLOR_ATTACHMENT12_WEBGL:36076,COLOR_ATTACHMENT13_WEBGL:36077,COLOR_ATTACHMENT14_WEBGL:36078,COLOR_ATTACHMENT15_WEBGL:36079,DRAW_BUFFER0_WEBGL:34853,DRAW_BUFFER1_WEBGL:34854,DRAW_BUFFER2_WEBGL:34855,DRAW_BUFFER3_WEBGL:34856,DRAW_BUFFER4_WEBGL:34857,DRAW_BUFFER5_WEBGL:34858,DRAW_BUFFER6_WEBGL:34859,DRAW_BUFFER7_WEBGL:34860,DRAW_BUFFER8_WEBGL:34861,DRAW_BUFFER9_WEBGL:34862,DRAW_BUFFER10_WEBGL:34863,DRAW_BUFFER11_WEBGL:34864,DRAW_BUFFER12_WEBGL:34865,DRAW_BUFFER13_WEBGL:34866,DRAW_BUFFER14_WEBGL:34867,DRAW_BUFFER15_WEBGL:34868,MAX_COLOR_ATTACHMENTS_WEBGL:36063,MAX_DRAW_BUFFERS_WEBGL:34852,VERTEX_ARRAY_BINDING_OES:34229,QUERY_COUNTER_BITS_EXT:34916,CURRENT_QUERY_EXT:34917,QUERY_RESULT_EXT:34918,QUERY_RESULT_AVAILABLE_EXT:34919,TIME_ELAPSED_EXT:35007,TIMESTAMP_EXT:36392,GPU_DISJOINT_EXT:36795}},function(e,t,n){"use strict";t.a={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(201);function i(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},,,function(e,t,n){"use strict";var r=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i="["+r+"][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",a=new RegExp("^"+i+"$");t.isExist=function(e){return"undefined"!==typeof e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,n){if(t)for(var r=Object.keys(t),i=r.length,a=0;a<i;a++)e[r[a]]="strict"===n?[t[r[a]]]:t[r[a]]},t.getValue=function(e){return t.isExist(e)?e:""},t.buildOptions=function(e,t,n){var r={};if(!e)return t;for(var i=0;i<n.length;i++)void 0!==e[n[i]]?r[n[i]]=e[n[i]]:r[n[i]]=t[n[i]];return r},t.isName=function(e){var t=a.exec(e);return!(null===t||"undefined"===typeof t)},t.getAllMatches=function(e,t){for(var n=[],r=t.exec(e);r;){for(var i=[],a=r.length,o=0;o<a;o++)i.push(r[o]);n.push(i),r=t.exec(e)}return n},t.nameRegexp=i},function(e,t,n){"use strict";n.d(t,"d",(function(){return u})),n.d(t,"a",(function(){return A})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l}));var r=n(25),i=n(98),a=n(360);function o(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(u)throw a}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){if(a.toArrayBuffer&&(e=a.toArrayBuffer(e)),e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return e.buffer;if("string"===typeof e){var t=e;return(new TextEncoder).encode(t).buffer}return e&&"object"===Object(r.a)(e)&&e._toArrayBuffer?e._toArrayBuffer():Object(i.a)(!1)}function A(e,t,n){if(n=n||e.byteLength,e.byteLength<n||t.byteLength<n)return!1;for(var r=new Uint8Array(e),i=new Uint8Array(t),a=0;a<r.length;++a)if(r[a]!==i[a])return!1;return!0}function c(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=t.map((function(e){return e instanceof ArrayBuffer?new Uint8Array(e):e})),a=i.reduce((function(e,t){return e+t.byteLength}),0),s=new Uint8Array(a),u=0,A=o(i);try{for(A.s();!(r=A.n()).done;){var c=r.value;s.set(c,u),u+=c.byteLength}}catch(l){A.e(l)}finally{A.f()}return s.buffer}function l(e,t,n){var r=void 0!==n?new Uint8Array(e).subarray(t,t+n):new Uint8Array(e).subarray(t);return new Uint8Array(r).buffer}},function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if(Array.isArray(e)){var n=e.length;if(!t||t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}return!1}function i(e){var t,n={};return function(i){for(var a in i)if(!r(i[a],n[a])){t=e(i),n=i;break}return t}}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return A})),n.d(t,"b",(function(){return c}));var r,i=n(16),a=n(1),o=n(51),s=(r={},Object(a.a)(r,5126,[5126,1,"float"]),Object(a.a)(r,35664,[5126,2,"vec2"]),Object(a.a)(r,35665,[5126,3,"vec3"]),Object(a.a)(r,35666,[5126,4,"vec4"]),Object(a.a)(r,5124,[5124,1,"int"]),Object(a.a)(r,35667,[5124,2,"ivec2"]),Object(a.a)(r,35668,[5124,3,"ivec3"]),Object(a.a)(r,35669,[5124,4,"ivec4"]),Object(a.a)(r,5125,[5125,1,"uint"]),Object(a.a)(r,36294,[5125,2,"uvec2"]),Object(a.a)(r,36295,[5125,3,"uvec3"]),Object(a.a)(r,36296,[5125,4,"uvec4"]),Object(a.a)(r,35670,[5126,1,"bool"]),Object(a.a)(r,35671,[5126,2,"bvec2"]),Object(a.a)(r,35672,[5126,3,"bvec3"]),Object(a.a)(r,35673,[5126,4,"bvec4"]),Object(a.a)(r,35674,[5126,8,"mat2"]),Object(a.a)(r,35685,[5126,8,"mat2x3"]),Object(a.a)(r,35686,[5126,8,"mat2x4"]),Object(a.a)(r,35675,[5126,12,"mat3"]),Object(a.a)(r,35687,[5126,12,"mat3x2"]),Object(a.a)(r,35688,[5126,12,"mat3x4"]),Object(a.a)(r,35676,[5126,16,"mat4"]),Object(a.a)(r,35689,[5126,16,"mat4x2"]),Object(a.a)(r,35690,[5126,16,"mat4x3"]),r);function u(e){switch(e){case 0:return 0;case 1:case 3:case 2:return 1;case 4:case 5:case 6:return 4;default:return Object(o.a)(!1),0}}function A(e){var t=s[e];if(!t)return null;var n=Object(i.a)(t,2);return{type:n[0],components:n[1]}}function c(e,t){switch(e){case 5120:case 5121:case 5122:case 5123:e=5126}for(var n in s){var r=Object(i.a)(s[n],3),a=r[0],o=r[1],u=r[2];if(a===e&&o===t)return{glType:n,name:u}}return null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u}));var r=n(1),i=n(98);function a(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e){if(!e)return!1;Array.isArray(e)&&(e=e[0]);var t=e.parseTextSync||e.parseSync||e.parse||e.parseStream||e.parseInBatches,n=e.options&&e.options[e.id];return t=t||n&&n.workerUrl}function u(e){var t;return Object(i.a)(e,"null loader"),Object(i.a)(s(e),"invalid loader"),Array.isArray(e)&&(t=e[1],e=o(o({},e=e[0]),{},{options:o(o({},e.options),t)})),e.extension&&(e.extensions=e.extensions||e.extension,delete e.extension),Array.isArray(e.extensions)||(e.extensions=[e.extensions]),Object(i.a)(e.extensions&&e.extensions.length>0&&e.extensions[0]),(e.parseTextSync||e.parseText)&&(e.text=!0),e.text||(e.binary=!0),e}},function(e,t,n){"use strict";var r=n(1),i=n(94),a=n(55),o=n(12),s=n.n(o),u=n(26),A=n(207),c=n(190);function l(e){return f.apply(this,arguments)}function f(){return(f=Object(u.a)(s.a.mark((function e(t){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n="Failed to fetch resource ".concat(t.url," (").concat(t.status,"): "),e.prev=1,!t.headers.get("Content-Type").includes("application/json")){e.next=10;break}return e.t0=n,e.next=7,t.text();case 7:n=e.t0+=e.sent,e.next=11;break;case 10:n+=t.statusText;case 11:e.next=16;break;case 13:return e.prev=13,e.t1=e.catch(1),e.abrupt("return",n);case 16:return e.abrupt("return",n);case 17:case"end":return e.stop()}}),e,null,[[1,13]])})))).apply(this,arguments)}function h(e){return g.apply(this,arguments)}function g(){return(g=Object(u.a)(s.a.mark((function e(t){var n,r,i=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.length>1&&void 0!==i[1]?i[1]:{},"string"===typeof t){e.next=5;break}return e.next=4,Object(c.b)(t);case 4:return e.abrupt("return",e.sent);case 5:return t=Object(A.a)(t),e.next=8,fetch(t,n);case 8:if((r=e.sent).ok||!n.throws){e.next=15;break}return e.t0=Error,e.next=13,l(r);case 13:throw e.t1=e.sent,new e.t0(e.t1);case 15:return e.abrupt("return",r);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var d=n(3),p=n(2),v=function(){function e(){Object(d.a)(this,e)}return Object(p.a)(e,[{key:"log",value:function(){return function(e){}}},{key:"info",value:function(){return function(e){}}},{key:"warn",value:function(){return function(e){}}},{key:"error",value:function(){return function(e){}}}]),e}(),y=function(){function e(){Object(d.a)(this,e),this.console=console}return Object(p.a)(e,[{key:"log",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=this.console.log).bind.apply(e,[this.console].concat(n))}},{key:"info",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=this.console.info).bind.apply(e,[this.console].concat(n))}},{key:"warn",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=this.console.warn).bind.apply(e,[this.console].concat(n))}},{key:"error",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=this.console.error).bind.apply(e,[this.console].concat(n))}}]),e}();function m(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return I(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b(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 E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n.d(t,"b",(function(){return w})),n.d(t,"c",(function(){return k})),n.d(t,"a",(function(){return _}));var C={fetch:null,CDN:"https://unpkg.com/@loaders.gl",worker:!0,log:new y,metadata:!1,transforms:[]},B={dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"},w=function(){i.a.loaders=i.a.loaders||{};var e=i.a.loaders;return e._state=e._state||{},e._state},Q=function(){var e=w();return e.globalOptions=e.globalOptions||E({},C),e.globalOptions};function k(e,t,n,r){return n=n||[],function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:console;x(e,null,n,C,B,t);var r,i=m(t);try{for(i.s();!(r=i.n()).done;){var a=r.value,o=e&&e[a.id]||{},s=a.options&&a.options[a.id]||{},u=a.defaultOptions&&a.defaultOptions[a.id]||{};x(o,a.id,n,s,u,t)}}catch(A){i.e(A)}finally{i.f()}}(e,n=Array.isArray(n)?n:[n]),O(t,e,r)}function _(e,t){var n=Q(),r=e.fetch||n.fetch;return"function"===typeof r?r:Object(a.f)(r)?function(e){return h(e,r)}:t&&t.fetch?t.fetch:function(t){return h(t,e)}}function x(e,t,n,r,i,o){var s=t||"Top level",u=t?"".concat(t,"."):"";for(var A in e){var c=!t&&Object(a.f)(e[A]);if(!(A in r))if(A in i)n.warn("".concat(s," loader option '").concat(u).concat(A,"' deprecated, use '").concat(i[A],"'"));else if(!c){var l=S(A,o);n.warn("".concat(s," loader option '").concat(u).concat(A,"' not recognized. ").concat(l))}}}function S(e,t){var n,r=e.toLowerCase(),i="",a=m(t);try{for(a.s();!(n=a.n()).done;){var o=n.value;for(var s in o.options){if(e===s)return"Did you mean '".concat(o.id,".").concat(s,"'?");var u=s.toLowerCase();(r.startsWith(u)||u.startsWith(r))&&(i=i||"Did you mean '".concat(o.id,".").concat(s,"'?"))}}}catch(A){a.e(A)}finally{a.f()}return i}function O(e,t,n){var r=E({},e.options||{});return function(e,t){t&&!("baseUri"in e)&&(e.baseUri=t)}(r,n),null===r.log&&(r.log=new v),D(r,Q()),D(r,t),r}function D(e,t){for(var n in t)if(n in t){var r=t[n];Object(a.g)(r)&&Object(a.g)(e[n])?e[n]=E(E({},e[n]),t[n]):e[n]=t[n]}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return A})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return f}));var r,i,a,o=n(1),s=n(21),u=(r={},Object(o.a)(r,6407,{dataFormat:6407,types:[5121,33635]}),Object(o.a)(r,6408,{dataFormat:6408,types:[5121,32819,32820]}),Object(o.a)(r,6406,{dataFormat:6406,types:[5121]}),Object(o.a)(r,6409,{dataFormat:6409,types:[5121]}),Object(o.a)(r,6410,{dataFormat:6410,types:[5121]}),Object(o.a)(r,33326,{dataFormat:6403,types:[5126],gl2:!0}),Object(o.a)(r,33328,{dataFormat:33319,types:[5126],gl2:!0}),Object(o.a)(r,34837,{dataFormat:6407,types:[5126],gl2:!0}),Object(o.a)(r,34836,{dataFormat:6408,types:[5126],gl2:!0}),r),A=(i={},Object(o.a)(i,6403,1),Object(o.a)(i,36244,1),Object(o.a)(i,33319,2),Object(o.a)(i,33320,2),Object(o.a)(i,6407,3),Object(o.a)(i,36248,3),Object(o.a)(i,6408,4),Object(o.a)(i,36249,4),Object(o.a)(i,6402,1),Object(o.a)(i,34041,1),Object(o.a)(i,6406,1),Object(o.a)(i,6409,1),Object(o.a)(i,6410,2),i),c=(a={},Object(o.a)(a,5126,4),Object(o.a)(a,5125,4),Object(o.a)(a,5124,4),Object(o.a)(a,5123,2),Object(o.a)(a,5122,2),Object(o.a)(a,5131,2),Object(o.a)(a,5120,1),Object(o.a)(a,5121,1),a);function l(e,t){var n=u[t];if(!n)return!1;if(void 0===n.gl1&&void 0===n.gl2)return!0;var r=Object(s.g)(e)&&n.gl2||n.gl1;return"string"===typeof r?e.getExtension(r):r}function f(e,t){var n=u[t];switch(n&&n.types[0]){case 5126:return e.getExtension("OES_texture_float_linear");case 5131:return e.getExtension("OES_texture_half_float_linear");default:return!0}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return o}));function r(e){switch(ArrayBuffer.isView(e)?e.constructor:e){case Float32Array:return 5126;case Uint16Array:return 5123;case Uint32Array:return 5125;case Uint8Array:case Uint8ClampedArray:return 5121;case Int8Array:return 5120;case Int16Array:return 5122;case Int32Array:return 5124;default:throw new Error("Failed to deduce GL constant from typed array")}}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.clamped,r=void 0===n||n;switch(e){case 5126:return Float32Array;case 5123:case 33635:case 32819:case 32820:return Uint16Array;case 5125:return Uint32Array;case 5121:return r?Uint8ClampedArray:Uint8Array;case 5120:return Int8Array;case 5122:return Int16Array;case 5124:return Int32Array;default:throw new Error("Failed to deduce typed array type from GL constant")}}function a(e){var t=e.data,n=e.width,r=e.height,i=e.bytesPerPixel,a=void 0===i?4:i,o=e.temp,s=n*a;o=o||new Uint8Array(s);for(var u=0;u<r/2;++u){var A=u*s,c=(r-u-1)*s;o.set(t.subarray(A,A+s)),t.copyWithin(A,c,c+s),t.set(o,c)}}function o(e){for(var t=e.data,n=e.width,r=e.height,i=Math.round(n/2),a=Math.round(r/2),o=new Uint8Array(i*a*4),s=0;s<a;s++)for(var u=0;u<i;u++)for(var A=0;A<4;A++)o[4*(s*i+u)+A]=t[4*(2*s*n+2*u)+A];return{data:o,width:i,height:a}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return A})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return f}));var r=n(22),i=n(24),a=n(0),o=n(273),s=n.n(o),u=n(67);function A(){var e=Object(a.useRef)(),t=Object(a.useState)(),n=Object(i.a)(t,2),r=n[0],o=n[1],A=Object(a.useState)(),c=Object(i.a)(A,2),l=c[0],f=c[1],h=Object(u.f)(),g=Object(u.e)();return Object(a.useEffect)((function(){function e(){g()}var t=s()(e,100,{trailing:!0});return window.addEventListener("resize",t),e(),function(){window.removeEventListener("resize",t)}}),[g]),Object(a.useEffect)((function(){if(e.current){var t=e.current.getBoundingClientRect();o(t.height),f(t.width)}}),[h]),[l,r,e]}function c(){var e=Object(a.useRef)(),t=Object(a.useState)(),n=Object(i.a)(t,2),r=n[0],o=n[1],A=Object(a.useState)(),c=Object(i.a)(A,2),l=c[0],f=c[1],h=Object(u.f)(),g=Object(u.e)();return Object(a.useEffect)((function(){function e(){g()}var t=s()(e,100,{trailing:!0});return window.addEventListener("resize",t),e(),function(){window.removeEventListener("resize",t)}}),[g]),Object(a.useEffect)((function(){if(e.current){var t=e.current.deck.canvas.getBoundingClientRect();o(t.height),f(t.width)}}),[h]),[l,r,e]}function l(e){var t=e,n=Object(a.useState)(t),r=Object(i.a)(n,2),o=r[0],s=r[1],u=Object(a.useCallback)((function(e){s((function(t){var n=t.filter((function(t){return t!==e}));return console.log("cleared ".concat(e,"; waiting on ").concat(n.length,": ").concat(JSON.stringify(n))),n}))}),[s]),A=Object(a.useCallback)((function(){s(t),console.log("waiting on ".concat(t.length,": ").concat(JSON.stringify(t)))}),[s,t]);return[0===o.length,u,A]}function f(){var e=Object(a.useState)([]),t=Object(i.a)(e,2),n=t[0],o=t[1];return[n,Object(a.useCallback)((function(e,t){e&&o((function(n){return[].concat(Object(r.a)(n),[{url:e,name:t}])}))}),[o]),Object(a.useCallback)((function(){o([])}),[o])]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIntermediatePosition=function(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]},t.GeoJsonEditMode=void 0;var r=A(n(959)),i=A(n(821)),a=A(n(960)),o=A(n(1053)),s=n(241),u=n(326);function A(e){return e&&e.__esModule?e:{default:e}}function c(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"===typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(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)}}var g={type:"FeatureCollection",features:[]},d=[],p=function(){function e(){var t,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r=[],(n="_clickSequence")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r}var t,n,A;return t=e,(n=[{key:"getGuides",value:function(e){return g}},{key:"getTooltips",value:function(e){return d}},{key:"getSelectedFeature",value:function(e){return 1===e.selectedIndexes.length?e.data.features[e.selectedIndexes[0]]:null}},{key:"getSelectedGeometry",value:function(e){var t=this.getSelectedFeature(e);return t?t.geometry:null}},{key:"getSelectedFeaturesAsFeatureCollection",value:function(e){var t=e.data.features;return{type:"FeatureCollection",features:e.selectedIndexes.map((function(e){return t[e]}))}}},{key:"getClickSequence",value:function(){return this._clickSequence}},{key:"addClickSequence",value:function(e){var t=e.mapCoords;this._clickSequence.push(t)}},{key:"resetClickSequence",value:function(){this._clickSequence=[]}},{key:"getTentativeGuide",value:function(e){return this.getGuides(e).features.find((function(e){return e.properties&&"tentative"===e.properties.guideType}))}},{key:"isSelectionPicked",value:function(e,t){if(!e.length)return!1;var n=(0,s.getNonGuidePicks)(e).map((function(e){return e.index})),r=(0,s.getPickedEditHandles)(e).map((function(e){return e.properties.featureIndex})),i=new Set([].concat(c(n),c(r)));return t.selectedIndexes.some((function(e){return i.has(e)}))}},{key:"rewindPolygon",value:function(e){var t=e.geometry;return"Polygon"===t.type||"MultiPolygon"===t.type?(0,o.default)(e):e}},{key:"getAddFeatureAction",value:function(e,t){var n=e,r="Feature"===n.type?n:{type:"Feature",properties:{},geometry:n},i=this.rewindPolygon(r),a=new u.ImmutableFeatureCollection(t).addFeature(i).getObject();return{updatedData:a,editType:"addFeature",editContext:{featureIndexes:[a.features.length-1]}}}},{key:"getAddManyFeaturesAction",value:function(e,t){var n,r=e.features,i=new u.ImmutableFeatureCollection(t),a=i.getObject().features.length,o=[],s=function(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=l(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,i,a=!0,o=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(r);try{for(s.s();!(n=s.n()).done;){var A=n.value,c=A.properties,f=A.geometry;i=i.addFeature({type:"Feature",properties:c,geometry:f}),o.push(a+o.length)}}catch(h){s.e(h)}finally{s.f()}return{updatedData:i.getObject(),editType:"addFeature",editContext:{featureIndexes:o}}}},{key:"getAddFeatureOrBooleanPolygonAction",value:function(e,t){var n=e,o=this.getSelectedFeature(t),s=t.modeConfig;if(s&&s.booleanOperation){if(!o||"Polygon"!==o.geometry.type&&"MultiPolygon"!==o.geometry.type)return console.warn("booleanOperation only supported for single Polygon or MultiPolygon selection"),null;var A,c="Feature"===n.type?n:{type:"Feature",geometry:n};if("union"===s.booleanOperation)A=(0,r.default)(o,c);else if("difference"===s.booleanOperation)A=(0,i.default)(o,c);else{if("intersection"!==s.booleanOperation)return console.warn("Invalid booleanOperation ".concat(s.booleanOperation)),null;A=(0,a.default)(o,c)}if(!A)return console.warn("Canceling edit. Boolean operation erased entire polygon."),null;var l=t.selectedIndexes[0];return{updatedData:new u.ImmutableFeatureCollection(t.data).replaceGeometry(l,A.geometry).getObject(),editType:"unionGeometry",editContext:{featureIndexes:[l]}}}return this.getAddFeatureAction(e,t.data)}},{key:"createTentativeFeature",value:function(e){return null}},{key:"handleClick",value:function(e,t){}},{key:"handlePointerMove",value:function(e,t){var n=this.createTentativeFeature(t);n&&t.onEdit({updatedData:t.data,editType:"updateTentativeFeature",editContext:{feature:n}})}},{key:"handleStartDragging",value:function(e,t){}},{key:"handleStopDragging",value:function(e,t){}},{key:"handleDragging",value:function(e,t){}},{key:"handleKeyUp",value:function(e,t){"Escape"===e.key&&(this.resetClickSequence(),t.onEdit({updatedData:t.data,editType:"cancelFeature",editContext:{}}))}}])&&h(t.prototype,n),A&&h(t,A),e}();t.GeoJsonEditMode=p},function(e,t,n){"use strict";var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i="object"===("undefined"===typeof window?"undefined":r(window))&&"object"===("undefined"===typeof document?"undefined":r(document))&&9===document.nodeType;t.a=i},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u})),n.d(t,"d",(function(){return A}));var r=n(132),i=n(139),a=n(43);function o(e,t){if(Object(a.a)(Object(a.g)(e),"setParameters requires a WebGL context"),!Object(a.f)(t)){var n={};for(var i in t){var o=Number(i),s=r.e[i];s&&("string"===typeof s?n[s]=!0:s(e,t[i],o))}var u=e.state&&e.state.cache;if(u)for(var A in n){(0,r.a[A])(e,t,u)}}}function s(e,t){if("number"===typeof(t=t||r.c)){var n=t,i=r.d[n];return i?i(e,n):e.getParameter(n)}var a=Array.isArray(t)?t:Object.keys(t),o={},s=!0,u=!1,A=void 0;try{for(var c,l=a[Symbol.iterator]();!(s=(c=l.next()).done);s=!0){var f=c.value,h=r.d[f];o[f]=h?h(e,Number(f)):e.getParameter(Number(f))}}catch(g){u=!0,A=g}finally{try{s||null==l.return||l.return()}finally{if(u)throw A}}return o}function u(e){o(e,r.c)}function A(e,t,n){if(Object(a.f)(t))return n(e);var r,s=t.nocatch,u=void 0===s||s;if(Object(i.c)(e),o(e,t),u)r=n(e),Object(i.b)(e);else try{r=n(e)}finally{Object(i.b)(e)}return r}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o}));var r=n(20),i=n(113);function a(e){return e&&"object"===typeof e&&e[i.d]}function o(e,t){var n,a;if(!t){if(!(a=e)||"object"!==typeof a)throw Error();t=[e]}return n={},Object(r.a)(n,i.d,!0),Object(r.a)(n,"send",e),Object(r.a)(n,"transferables",t),n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(3),i=n(2),a=n(6),o=n(7),s=n(4),u=n(306),A=n(21),c=n(314),l=n(44);function f(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var d=function(e){Object(a.a)(n,e);var t=g(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"render",value:function(e){var t=this.gl;return Object(A.k)(t,{framebuffer:e.target}),this._drawLayers(e)}},{key:"_drawLayers",value:function(e){var t=e.viewports,n=e.views,r=e.onViewportActive,i=e.clearCanvas,a=void 0===i||i,o=this.gl;a&&function(e){var t=e.drawingBufferWidth,n=e.drawingBufferHeight;Object(A.k)(e,{viewport:[0,0,t,n]}),e.clear(16640)}(o);var s,u=[],c=f(t);try{for(c.s();!(s=c.n()).done;){var l=s.value,h=l.viewport||l,g=n&&n[h.id];r(h);var d=this._getDrawLayerParams(h,e);e.view=g;var p,v=f(h.subViewports||[h]);try{for(v.s();!(p=v.n()).done;){var y=p.value;e.viewport=y;var m=this._drawLayersInViewport(o,e,d);u.push(m)}}catch(I){v.e(I)}finally{v.f()}}}catch(I){c.e(I)}finally{c.f()}return u}},{key:"_getDrawLayerParams",value:function(e,t){for(var n=t.layers,r=t.pass,i=void 0===r?"unknown":r,a=t.layerFilter,o=t.effects,s=t.moduleParameters,u=[],A=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},i=function i(a,o){var s,u=a.props._offset,A=a.id,c=a.parent&&a.parent.id;if(c&&!(c in n)&&i(a.parent,!1),c in r){var l=r[c]=r[c]||e(n[c],n);s=l(a,o),r[A]=l}else Number.isFinite(u)?(s=u+(n[c]||0),r[A]=null):s=t;return o&&s>=t&&(t=s+1),n[A]=s,s};return i}(),c=0;c<n.length;c++){var l=n[c],f=this._shouldDrawLayer(l,e,i,a),h={shouldDrawLayer:f,layerRenderIndex:A(l,f)};f&&(h.moduleParameters=this._getModuleParameters(l,o,i,s),h.layerParameters=this.getLayerParameters(l,c)),u[c]=h}return u}},{key:"_drawLayersInViewport",value:function(e,t,n){var r=t.layers,i=t.onError,a=t.viewport,o=t.view,s=function(e,t){var n=t.viewport,r=e.canvas?e.canvas.clientHeight||e.canvas.height:100,i=n,a=Object(A.c)(e);return[i.x*a,(r-i.y-i.height)*a,i.width*a,i.height*a]}(e,{viewport:a});if(o&&o.props.clear){var u=!0===o.props.clear?{color:!0,depth:!0}:o.props.clear;Object(A.l)(e,{scissorTest:!0,scissor:s},(function(){return Object(c.a)(e,u)}))}var f={totalCount:r.length,visibleCount:0,compositeCount:0,pickableCount:0};Object(A.k)(e,{viewport:s});for(var h=0;h<r.length;h++){var g=r[h],d=n[h],p=d.shouldDrawLayer,v=d.layerRenderIndex,y=d.moduleParameters,m=d.layerParameters;if(p&&g.props.pickable&&f.pickableCount++,g.isComposite)f.compositeCount++;else if(p){f.visibleCount++,y.viewport=a;try{g.drawLayer({moduleParameters:y,uniforms:{layerIndex:v},parameters:m})}catch(I){i?i(I,g):l.a.error("error during drawing of ".concat(g),I)()}}}return f}},{key:"shouldDrawLayer",value:function(e){return!0}},{key:"getModuleParameters",value:function(e,t){return null}},{key:"getLayerParameters",value:function(e,t){return e.props.parameters}},{key:"_shouldDrawLayer",value:function(e,t,n,r){var i=this.shouldDrawLayer(e)&&e.props.visible;return i&&r&&(i=r({layer:e,viewport:t,isPicking:n.startsWith("picking"),renderPass:n})),i&&e.activateViewport(t),i}},{key:"_getModuleParameters",value:function(e,t,n,r){var i=Object.assign(Object.create(e.props),{autoWrapLongitude:e.wrapLongitude,viewport:e.context.viewport,mousePosition:e.context.mousePosition,pickingActive:0,devicePixelRatio:Object(A.c)(this.gl)});if(t){var a,o=f(t);try{for(o.s();!(a=o.n()).done;){var s=a.value;Object.assign(i,s.getModuleParameters(e))}}catch(u){o.e(u)}finally{o.f()}}return Object.assign(i,this.getModuleParameters(e,t),r)}}]),n}(u.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),i=n(2),a=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r.a)(this,e);var n=t.id,i=void 0===n?"effect":n;this.id=i,this.props={},Object.assign(this.props,t)}return Object(i.a)(e,[{key:"preRender",value:function(){}},{key:"getModuleParameters",value:function(){}},{key:"cleanup",value:function(){}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(3),i=n(2),a=n(7),o=n(4),s=n(6),u=n(81),A=n(34),c=function(e){function t(){return Object(r.a)(this,t),Object(a.a)(this,Object(o.a)(t).apply(this,arguments))}return Object(s.a)(t,e),Object(i.a)(t,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}},{key:"fromArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)this[n]=e[n+t];return this.check()}},{key:"to",value:function(e){return e===this?this:Object(A.m)(e)?this.toArray(e):this.toObject(e)}},{key:"toTarget",value:function(e){return e?this.to(e):this}},{key:"toArray",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)e[t+n]=this[n];return e}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(A.f)}},{key:"formatString",value:function(e){for(var t="",n=0;n<this.ELEMENTS;++n)t+=(n>0?", ":"")+Object(A.l)(this[n],e);return"".concat(e.printTypes?this.constructor.name:"","[").concat(t,"]")}},{key:"equals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(!Object(A.j)(this[t],e[t]))return!1;return!0}},{key:"exactEquals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(this[t]!==e[t])return!1;return!0}},{key:"negate",value:function(){for(var e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}},{key:"lerp",value:function(e,t,n){void 0===n&&(n=t,t=e,e=this);for(var r=0;r<this.ELEMENTS;++r){var i=e[r];this[r]=i+n*(t[r]-i)}return this.check()}},{key:"min",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}},{key:"max",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}},{key:"clamp",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e[n]),t[n]);return this.check()}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]+=a[o];return this.check()}},{key:"subtract",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]-=a[o];return this.check()}},{key:"scale",value:function(e){if(Array.isArray(e))return this.multiply(e);for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"sub",value:function(e){return this.subtract(e)}},{key:"setScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}},{key:"addScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}},{key:"subScalar",value:function(e){return this.addScalar(-e)}},{key:"multiplyScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"divideScalar",value:function(e){return this.scale(1/e)}},{key:"clampScalar",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e),t);return this.check()}},{key:"multiplyByScalar",value:function(e){return this.scale(e)}},{key:"check",value:function(){if(A.f.debug&&!this.validate(this))throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}},{key:"validate",value:function(){for(var e=this.length===this.ELEMENTS,t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}},{key:"elements",get:function(){return this}}]),t}(Object(u.a)(Array))},function(e,t,n){"use strict";function r(e,t,n){var r=t[0],i=t[1],a=n[3]*r+n[7]*i||1;return e[0]=(n[0]*r+n[4]*i)/a,e[1]=(n[1]*r+n[5]*i)/a,e}function i(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[3]*r+n[7]*i+n[11]*a||1;return e[0]=(n[0]*r+n[4]*i+n[8]*a)/o,e[1]=(n[1]*r+n[5]*i+n[9]*a)/o,e[2]=(n[2]*r+n[6]*i+n[10]*a)/o,e}function a(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2],e}n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return a}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));function r(e){var t=i(e);return function(e){var t=i(e);if(!(t.byteLength>=24&&2303741511===t.getUint32(0,!1)))return null;return{mimeType:"image/png",width:t.getUint32(16,!1),height:t.getUint32(20,!1)}}(t)||function(e){var t=i(e);if(!(t.byteLength>=3&&65496===t.getUint16(0,!1)&&255===t.getUint8(2)))return null;var n=function(){for(var e=new Set([65499,65476,65484,65501,65534]),t=65504;t<65520;++t)e.add(t);var n=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:e,sofMarkers:n}}(),r=n.tableMarkers,a=n.sofMarkers,o=2;for(;o+9<t.byteLength;){var s=t.getUint16(o,!1);if(a.has(s))return{mimeType:"image/jpeg",height:t.getUint16(o+5,!1),width:t.getUint16(o+7,!1)};if(!r.has(s))return null;o+=2,o+=t.getUint16(o,!1)}return null}(t)||function(e){var t=i(e);if(!(t.byteLength>=10&&1195984440===t.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:t.getUint16(6,!0),height:t.getUint16(8,!0)}}(t)||function(e){var t=i(e);if(!(t.byteLength>=14&&16973===t.getUint16(0,!1)&&t.getUint32(2,!0)===t.byteLength))return null;return{mimeType:"image/bmp",width:t.getUint32(18,!0),height:t.getUint32(22,!0)}}(t)}function i(e){if(e instanceof DataView)return e;if(ArrayBuffer.isView(e))return new DataView(e.buffer);if(e instanceof ArrayBuffer)return new DataView(e);throw new Error("toDataView")}},function(e,t,n){(function(r){t.log=function(){var e;return"object"===typeof console&&console.log&&(e=console).log.apply(e,arguments)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(n){}!e&&"undefined"!==typeof r&&"env"in r&&(e=Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).DEBUG);return e},t.useColors=function(){if("undefined"!==typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(626)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this,n(86))},function(e,t,n){"use strict";var r=n(55),i=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,a=/^([-\w.]+\/[-\w.+]+)/;function o(e){if("string"!==typeof e)return"";var t=e.match(i);return t?t[1]:""}n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return A}));var s=/\?.*/;function u(e){if(Object(r.i)(e)){var t=function(e){if("string"!==typeof e)return"";var t=e.match(a);return t?t[1]:e}(e.headers.get("content-type")),n=o(e.url);return{url:c(e.url||""),type:t||n||null}}return Object(r.b)(e)?{url:c(e.name||""),type:e.type||""}:"string"===typeof e?{url:c(e),type:o(e)}:{url:"",type:""}}function A(e){return Object(r.i)(e)?e.headers["content-length"]||-1:Object(r.b)(e)?e.size:"string"===typeof e?e.length:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:-1}function c(e){return e.replace(s,"")}},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var o=i.apply(null,r);o&&e.push(o)}else if("object"===a)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}));var r=n(51);function i(e,t){if("string"!==typeof t)return t;var n=Number(t);if(!isNaN(n))return n;var i=e[t=t.replace(/^.*\./,"")];return Object(r.a)(void 0!==i,"Accessing undefined constant GL.".concat(t)),i}function a(e,t){for(var n in t=Number(t),e)if(e[n]===t)return"GL.".concat(n);return String(t)}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u}));var r,i=n(20),a={DATASET:"dataset",EMBEDDING_TYPE:"embeddingType",EMBEDDING_ZOOM:"embeddingZoom",EMBEDDING_ROTATION:"embeddingRotation",EMBEDDING_TARGET_X:"embeddingTargetX",EMBEDDING_TARGET_Y:"embeddingTargetY",EMBEDDING_TARGET_Z:"embeddingTargetZ",EMBEDDING_CELL_SET_POLYGONS_VISIBLE:"embeddingCellSetPolygonsVisible",EMBEDDING_CELL_SET_LABELS_VISIBLE:"embeddingCellSetLabelsVisible",EMBEDDING_CELL_SET_LABEL_SIZE:"embeddingCellSetLabelSize",EMBEDDING_CELL_RADIUS:"embeddingCellRadius",SPATIAL_ZOOM:"spatialZoom",SPATIAL_ROTATION:"spatialRotation",SPATIAL_TARGET_X:"spatialTargetX",SPATIAL_TARGET_Y:"spatialTargetY",SPATIAL_TARGET_Z:"spatialTargetZ",HEATMAP_ZOOM_X:"heatmapZoomX",HEATMAP_ZOOM_Y:"heatmapZoomY",HEATMAP_TARGET_X:"heatmapTargetX",HEATMAP_TARGET_Y:"heatmapTargetY",CELL_FILTER:"cellFilter",CELL_HIGHLIGHT:"cellHighlight",CELL_SET_SELECTION:"cellSetSelection",CELL_SET_HIGHLIGHT:"cellSetHighlight",CELL_SET_COLOR:"cellSetColor",GENE_FILTER:"geneFilter",GENE_HIGHLIGHT:"geneHighlight",GENE_SELECTION:"geneSelection",GENE_EXPRESSION_COLORMAP:"geneExpressionColormap",GENE_EXPRESSION_COLORMAP_RANGE:"geneExpressionColormapRange",CELL_COLOR_ENCODING:"cellColorEncoding",SPATIAL_LAYERS:"spatialLayers",GENOMIC_ZOOM_X:"genomicZoomX",GENOMIC_ZOOM_Y:"genomicZoomY",GENOMIC_TARGET_X:"genomicTargetX",GENOMIC_TARGET_Y:"genomicTargetY",ADDITIONAL_CELL_SETS:"additionalCellSets",MOLECULE_HIGHLIGHT:"moleculeHighlight"},o=(r={},Object(i.a)(r,a.EMBEDDING_ZOOM,0),Object(i.a)(r,a.EMBEDDING_ROTATION,0),Object(i.a)(r,a.EMBEDDING_TARGET_X,0),Object(i.a)(r,a.EMBEDDING_TARGET_Y,0),Object(i.a)(r,a.EMBEDDING_TARGET_Z,0),Object(i.a)(r,a.EMBEDDING_CELL_SET_POLYGONS_VISIBLE,!1),Object(i.a)(r,a.EMBEDDING_CELL_SET_LABELS_VISIBLE,!1),Object(i.a)(r,a.EMBEDDING_CELL_SET_LABEL_SIZE,14),Object(i.a)(r,a.EMBEDDING_CELL_RADIUS,1),Object(i.a)(r,a.SPATIAL_ZOOM,0),Object(i.a)(r,a.SPATIAL_ROTATION,0),Object(i.a)(r,a.SPATIAL_TARGET_X,0),Object(i.a)(r,a.SPATIAL_TARGET_Y,0),Object(i.a)(r,a.SPATIAL_TARGET_Z,0),Object(i.a)(r,a.SPATIAL_LAYERS,null),Object(i.a)(r,a.HEATMAP_ZOOM_X,0),Object(i.a)(r,a.HEATMAP_ZOOM_Y,0),Object(i.a)(r,a.HEATMAP_TARGET_X,0),Object(i.a)(r,a.HEATMAP_TARGET_Y,0),Object(i.a)(r,a.GENE_EXPRESSION_COLORMAP,"plasma"),Object(i.a)(r,a.GENE_EXPRESSION_COLORMAP_RANGE,[0,1]),Object(i.a)(r,a.GENE_FILTER,null),Object(i.a)(r,a.GENE_HIGHLIGHT,null),Object(i.a)(r,a.GENE_SELECTION,null),Object(i.a)(r,a.CELL_FILTER,null),Object(i.a)(r,a.CELL_HIGHLIGHT,null),Object(i.a)(r,a.CELL_SET_SELECTION,null),Object(i.a)(r,a.CELL_SET_HIGHLIGHT,null),Object(i.a)(r,a.CELL_SET_COLOR,null),Object(i.a)(r,a.CELL_COLOR_ENCODING,"cellSetSelection"),Object(i.a)(r,a.GENOMIC_ZOOM_X,0),Object(i.a)(r,a.GENOMIC_ZOOM_Y,0),Object(i.a)(r,a.GENOMIC_TARGET_X,1549999999.5),Object(i.a)(r,a.GENOMIC_TARGET_Y,1549999999.5),Object(i.a)(r,a.ADDITIONAL_CELL_SETS,null),Object(i.a)(r,a.MOLECULE_HIGHLIGHT,null),r),s=[a.SPATIAL_ZOOM,a.SPATIAL_TARGET_X,a.SPATIAL_TARGET_Y,a.SPATIAL_TARGET_Z,a.HEATMAP_ZOOM_X,a.HEATMAP_ZOOM_Y,a.HEATMAP_TARGET_X,a.HEATMAP_TARGET_Y,a.EMBEDDING_ZOOM,a.EMBEDDING_TARGET_X,a.EMBEDDING_TARGET_Y,a.EMBEDDING_TARGET_Z,a.EMBEDDING_CELL_SET_POLYGONS_VISIBLE,a.EMBEDDING_CELL_SET_LABELS_VISIBLE,a.EMBEDDING_CELL_SET_LABEL_SIZE,a.EMBEDDING_CELL_RADIUS],u={scatterplot:[a.DATASET,a.EMBEDDING_TYPE,a.EMBEDDING_ZOOM,a.EMBEDDING_ROTATION,a.EMBEDDING_TARGET_X,a.EMBEDDING_TARGET_Y,a.EMBEDDING_TARGET_Z,a.EMBEDDING_CELL_SET_POLYGONS_VISIBLE,a.EMBEDDING_CELL_SET_LABELS_VISIBLE,a.EMBEDDING_CELL_SET_LABEL_SIZE,a.EMBEDDING_CELL_RADIUS,a.CELL_FILTER,a.CELL_HIGHLIGHT,a.CELL_SET_SELECTION,a.CELL_SET_HIGHLIGHT,a.CELL_SET_COLOR,a.GENE_HIGHLIGHT,a.GENE_SELECTION,a.GENE_EXPRESSION_COLORMAP,a.GENE_EXPRESSION_COLORMAP_RANGE,a.CELL_COLOR_ENCODING,a.ADDITIONAL_CELL_SETS],spatial:[a.DATASET,a.SPATIAL_ZOOM,a.SPATIAL_ROTATION,a.SPATIAL_LAYERS,a.SPATIAL_TARGET_X,a.SPATIAL_TARGET_Y,a.SPATIAL_TARGET_Z,a.CELL_FILTER,a.CELL_HIGHLIGHT,a.CELL_SET_SELECTION,a.CELL_SET_HIGHLIGHT,a.CELL_SET_COLOR,a.GENE_HIGHLIGHT,a.GENE_SELECTION,a.GENE_EXPRESSION_COLORMAP,a.GENE_EXPRESSION_COLORMAP_RANGE,a.CELL_COLOR_ENCODING,a.ADDITIONAL_CELL_SETS,a.MOLECULE_HIGHLIGHT],heatmap:[a.DATASET,a.HEATMAP_ZOOM_X,a.HEATMAP_ZOOM_Y,a.HEATMAP_TARGET_X,a.HEATMAP_TARGET_Y,a.CELL_FILTER,a.CELL_HIGHLIGHT,a.CELL_SET_SELECTION,a.CELL_SET_HIGHLIGHT,a.CELL_SET_COLOR,a.GENE_FILTER,a.GENE_HIGHLIGHT,a.GENE_SELECTION,a.GENE_EXPRESSION_COLORMAP,a.GENE_EXPRESSION_COLORMAP_RANGE,a.CELL_COLOR_ENCODING,a.ADDITIONAL_CELL_SETS],cellSets:[a.DATASET,a.CELL_SET_SELECTION,a.CELL_SET_HIGHLIGHT,a.CELL_SET_COLOR,a.CELL_COLOR_ENCODING,a.ADDITIONAL_CELL_SETS,a.GENE_SELECTION],cellSetSizes:[a.DATASET,a.CELL_SET_SELECTION,a.CELL_SET_HIGHLIGHT,a.CELL_SET_COLOR,a.ADDITIONAL_CELL_SETS],status:[a.DATASET,a.CELL_HIGHLIGHT,a.GENE_HIGHLIGHT,a.CELL_SET_HIGHLIGHT,a.MOLECULE_HIGHLIGHT],genes:[a.DATASET,a.GENE_FILTER,a.GENE_HIGHLIGHT,a.GENE_SELECTION,a.CELL_COLOR_ENCODING,a.CELL_SET_SELECTION],layerController:[a.DATASET,a.SPATIAL_LAYERS],higlass:[a.DATASET,a.GENOMIC_ZOOM_X,a.GENOMIC_ZOOM_Y,a.GENOMIC_TARGET_X,a.GENOMIC_TARGET_Y,a.GENE_FILTER,a.GENE_HIGHLIGHT,a.GENE_SELECTION],genomicProfiles:[a.DATASET,a.GENOMIC_ZOOM_X,a.GENOMIC_ZOOM_Y,a.GENOMIC_TARGET_X,a.GENOMIC_TARGET_Y,a.GENE_FILTER,a.GENE_HIGHLIGHT,a.GENE_SELECTION,a.CELL_SET_SELECTION,a.CELL_SET_HIGHLIGHT,a.CELL_SET_COLOR,a.ADDITIONAL_CELL_SETS],description:[a.DATASET,a.SPATIAL_LAYERS]}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return a})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return s}));var r="card card-body my-2 ".concat("tooltip-ancestor"),i="".concat(r," bg-primary"),a="".concat(r," bg-secondary"),o="".concat(r," bg-black"),s="".concat(i," scroll")},function(e,t,n){"use strict";n.d(t,"b",(function(){return A})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"e",(function(){return f})),n.d(t,"f",(function(){return h})),n.d(t,"g",(function(){return g})),n.d(t,"d",(function(){return d}));var r=n(24),i=n(0),a=n(67),o=n(135),s=n(271);function u(e,t){t(e.message),console.warn(e.message),e instanceof o.a&&e.warnInConsole()}function A(e,t,n,s,A){var c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,l=Object(i.useState)({}),f=Object(r.a)(l,2),h=f[0],g=f[1],d=Object(i.useState)(0),p=Object(r.a)(d,2),v=p[0],y=p[1],m=Object(a.n)();return Object(i.useEffect)((function(){e[t]&&(e[t].loaders.cells?e[t].loaders.cells.load().catch((function(e){return u(e,m)})).then((function(e){if(e){var t=e.data,r=e.url;g(t),y(Object.keys(t).length),s(r,"Cells"),c&&c(),n("cells")}})):(g({}),y(0),A?u(new o.c(t,"cells",null,null),m):n("cells")))}),[e,t]),[h,v]}function c(e,t,n,s,A){var c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,l=Object(i.useState)(),f=Object(r.a)(l,2),h=f[0],g=f[1],d=Object(a.n)();return Object(i.useEffect)((function(){e[t]&&(e[t].loaders["cell-sets"]?e[t].loaders["cell-sets"].load().catch((function(e){return u(e,d)})).then((function(e){if(e){var t=e.data,r=e.url;g(t),s(r,"Cell Sets"),c&&c(t),n("cell-sets")}})):(g(null),A?u(new o.c(t,"cell-sets",null,null),d):n("cell-sets")))}),[e,t]),[h]}function l(e,t,n,s,A){var c=Object(i.useState)(),l=Object(r.a)(c,2),f=l[0],h=l[1],g=Object(a.n)();return Object(i.useEffect)((function(){e[t]&&(e[t].loaders["expression-matrix"]?e[t].loaders["expression-matrix"].load().catch((function(e){return u(e,g)})).then((function(e){if(e){var t=e.data,i=e.url,a=Object(r.a)(t,2),o=a[0],u=a[1];h({cols:o.cols,rows:o.rows,matrix:u.data}),s(i,"Expression Matrix"),n("expression-matrix")}})):(h(null),A?u(new o.c(t,"expression-matrix",null,null),g):n("expression-matrix")))}),[e,t]),[f]}function f(e,t,n,s,A){var c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,l=Object(i.useState)(),f=Object(r.a)(l,2),h=f[0],g=f[1],d=Object(i.useState)(0),p=Object(r.a)(d,2),v=p[0],y=p[1],m=Object(i.useState)(0),I=Object(r.a)(m,2),b=I[0],E=I[1],C=Object(a.n)();return Object(i.useEffect)((function(){e[t]&&(e[t].loaders.molecules?e[t].loaders.molecules.load().catch((function(e){return u(e,C)})).then((function(e){if(e){var t=e.data,r=e.url;g(t),y(Object.keys(t).length),E(Object.values(t).map((function(e){return e.length})).reduce((function(e,t){return e+t}),0)),s(r,"Molecules"),c&&c(),n("molecules")}})):(g({}),y(0),E(0),A?u(new o.c(t,"molecules",null,null),C):n("molecules")))}),[e,t]),[h,v,b]}function h(e,t,n,s,A){var c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,l=Object(i.useState)(),f=Object(r.a)(l,2),h=f[0],g=f[1],d=Object(a.n)();return Object(i.useEffect)((function(){e[t]&&(e[t].loaders.neighborhoods?e[t].loaders.neighborhoods.load().catch((function(e){return u(e,d)})).then((function(e){if(e){var t=e.data,r=e.url;g(t),s(r,"Neighborhoods"),c&&c(),n("neighborhoods")}})):(g({}),A?u(new o.c(t,"neighborhoods",null,null),d):n("neighborhoods")))}),[e,t]),[h]}function g(e,t,n,A,c){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,f=Object(i.useState)(),h=Object(r.a)(f,2),g=h[0],d=h[1],p=Object(i.useState)([]),v=Object(r.a)(p,2),y=v[0],m=v[1],I=Object(i.useState)([]),b=Object(r.a)(I,2),E=b[0],C=b[1],B=Object(a.n)();return Object(i.useEffect)((function(){e[t]&&(e[t].loaders.raster?e[t].loaders.raster.load().catch((function(e){return u(e,B)})).then((function(e){if(e){var t=e.data,i=e.urls;d(t),i.forEach((function(e){var t=Object(r.a)(e,2),n=t[0],i=t[1];A(n,i)}));var a=t.layers,o=t.renderLayers;Object(s.c)(a,o).then((function(e){var t=Object(r.a)(e,3),i=t[0],a=t[1],o=t[2];m(a),C(o),l&&l(i),n("raster")}))}})):(m([]),C([]),c?u(new o.c(t,"raster",null,null),B):n("raster")))}),[e,t]),[g,y,E]}function d(e,t,n,s,A){var c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,l=Object(i.useState)(),f=Object(r.a)(l,2),h=f[0],g=f[1],d=Object(a.n)();return Object(i.useEffect)((function(){e[t]&&(e[t].loaders["genomic-profiles"]?e[t].loaders["genomic-profiles"].load().catch((function(e){return u(e,d)})).then((function(e){if(e){var t=e.data,r=e.url;g(t),s(r),c&&c(),n("genomic-profiles")}})):(g(null),A?u(new o.c(t,"genomic-profiles",null,null),d):n("genomic-profiles")))}),[e,t]),[h]}},function(e,t,n){"use strict";var r=n(3),i=n(7),a=n(4),o=n(58),s=n(2),u=n(6),A=n(111),c=n(133),l=n(51),f="";function h(e,t){return Object(l.a)("string"===typeof e),e=f+e,new Promise((function(n,r){try{var i=new Image;i.onload=function(){return n(i)},i.onerror=function(){return r(new Error("Could not load image ".concat(e,".")))},i.crossOrigin=t&&t.crossOrigin||"anonymous",i.src=e}catch(a){r(a)}}))}n.d(t,"a",(function(){return g}));var g=function(e){function t(e){var n,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r.a)(this,t),Object(c.b)(e),(s instanceof Promise||"string"===typeof s)&&(s={data:s}),"string"===typeof s.data&&(s=Object.assign({},s,{data:h(s.data)})),(n=Object(i.a)(this,Object(a.a)(t).call(this,e,Object.assign({},s,{target:3553})))).initialize(s),Object.seal(Object(o.a)(n)),n}return Object(u.a)(t,e),Object(s.a)(t,null,[{key:"isSupported",value:function(e,t){return A.a.isSupported(e,t)}}]),t}(A.a)},,,function(e,t,n){"use strict";var r=n(108);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=a.default.memo(a.default.forwardRef((function(t,n){return a.default.createElement(o.default,(0,i.default)({ref:n},t),e)})));0;return n.muiName=o.default.muiName,n};var i=r(n(238)),a=r(n(0)),o=r(n(490))},function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r=n(3),i=n(2),a=n(35),o=[255,255,255],s=[0,0,-1],u=0,A=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r.a)(this,e);var n=t.color,i=void 0===n?o:n,A=t.intensity,c=void 0===A?1:A,l=t.direction,f=void 0===l?s:l,h=t._shadow,g=void 0!==h&&h;this.id=t.id||"directional-".concat(u++),this.color=i,this.intensity=c,this.type="directional",this.direction=new a.c(f).normalize().toArray(),this.shadow=g}return Object(i.a)(e,[{key:"getProjectedLight",value:function(){return this}}]),e}()},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error("math.gl assertion ".concat(t))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(3),i=n(2),a=n(7),o=n(4),s=n(6),u=n(225),A=n(34),c=n(36),l=n(17),f=n(112),h=[0,0,0],g=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object(r.a)(this,t),e=Object(a.a)(this,Object(o.a)(t).call(this,-0,-0,-0)),1===arguments.length&&Object(A.m)(n)?e.copy(n):(A.f.debug&&(Object(c.a)(n),Object(c.a)(i),Object(c.a)(s)),e[0]=n,e[1]=i,e[2]=s),e}return Object(s.a)(t,e),Object(i.a)(t,[{key:"set",value:function(e,t,n){return this[0]=e,this[1]=t,this[2]=n,this.check()}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}},{key:"fromObject",value:function(e){return A.f.debug&&(Object(c.a)(e.x),Object(c.a)(e.y),Object(c.a)(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}},{key:"toObject",value:function(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}},{key:"angle",value:function(e){return l.a(this,e)}},{key:"cross",value:function(e){return l.c(this,this,e),this.check()}},{key:"rotateX",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?h:n;return l.k(this,this,r,t),this.check()}},{key:"rotateY",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?h:n;return l.l(this,this,r,t),this.check()}},{key:"rotateZ",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?h:n;return l.m(this,this,r,t),this.check()}},{key:"transform",value:function(e){return this.transformAsPoint(e)}},{key:"transformAsPoint",value:function(e){return l.q(this,this,e),this.check()}},{key:"transformAsVector",value:function(e){return Object(f.c)(this,this,e),this.check()}},{key:"transformByMatrix3",value:function(e){return l.p(this,this,e),this.check()}},{key:"transformByMatrix2",value:function(e){return Object(f.b)(this,this,e),this.check()}},{key:"transformByQuaternion",value:function(e){return l.r(this,this,e),this.check()}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(e){return this[2]=Object(c.a)(e)}}]),t}(u.a)},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(29),o=n(6),s=n(7),u=n(4),A=n(412),c=n(411),l=n(44),f=n(217),h=n(311),g=n(121),d=n(1),p=n(415),v=n(233);function y(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I(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 b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){Object(d.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}var C=function(e){Object(o.a)(n,e);var t=E(n);function n(e){return Object(r.a)(this,n),t.call(this,b(b({},e),{},{attributes:{positions:{size:3,padding:18,initialize:!0,type:e.fp64?Float64Array:Float32Array},segmentTypes:{size:1,type:Uint8ClampedArray}}}))}return Object(i.a)(n,[{key:"getGeometryFromBuffer",value:function(e){return this.normalize?Object(a.a)(Object(u.a)(n.prototype),"getGeometryFromBuffer",this).call(this,e):function(){return null}}},{key:"normalizeGeometry",value:function(e){return this.normalize?function(e,t,n,r){var i=e;if(Array.isArray(e[0])){var a=e.length*t;i=new Array(a);for(var o=0;o<e.length;o++)for(var s=0;s<t;s++)i[o*t+s]=e[o][s]||0}return n?Object(v.c)(i,{size:t,gridResolution:n}):r?Object(v.d)(i,{size:t}):i}(e,this.positionSize,this.opts.resolution,this.opts.wrapLongitude):e}},{key:"get",value:function(e){return this.attributes[e]}},{key:"getGeometrySize",value:function(e){if(Array.isArray(e[0])){var t,n=0,r=y(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;n+=this.getGeometrySize(i)}}catch(o){r.e(o)}finally{r.f()}return n}var a=this.getPathLength(e);return a<2?0:this.isClosed(e)?a<3?0:a+2:a}},{key:"updateGeometryAttributes",value:function(e,t){if(0!==t.geometrySize)if(e&&Array.isArray(e[0])){var n,r=y(e);try{for(r.s();!(n=r.n()).done;){var i=n.value,a=this.getGeometrySize(i);t.geometrySize=a,this.updateGeometryAttributes(i,t),t.vertexStart+=a}}catch(o){r.e(o)}finally{r.f()}}else this._updateSegmentTypes(e,t),this._updatePositions(e,t)}},{key:"_updateSegmentTypes",value:function(e,t){var n=this.attributes.segmentTypes,r=this.isClosed(e),i=t.vertexStart,a=t.geometrySize;n.fill(0,i,i+a),r?(n[i]=4,n[i+a-2]=4):(n[i]+=1,n[i+a-2]+=2),n[i+a-1]=4}},{key:"_updatePositions",value:function(e,t){var n=this.attributes.positions;if(n)for(var r=t.vertexStart,i=t.geometrySize,a=new Array(3),o=r,s=0;s<i;o++,s++)this.getPointOnPath(e,s,a),n[3*o]=a[0],n[3*o+1]=a[1],n[3*o+2]=a[2]}},{key:"getPathLength",value:function(e){return e.length/this.positionSize}},{key:"getPointOnPath",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=this.positionSize;t*r>=e.length&&(t+=1-e.length/r);var i=t*r;return n[0]=e[i],n[1]=e[i+1],n[2]=3===r&&e[i+2]||0,n}},{key:"isClosed",value:function(e){if(!this.normalize)return this.opts.loop;var t=this.positionSize,n=e.length-t;return e[0]===e[n]&&e[1]===e[n+1]&&(2===t||e[2]===e[n+2])}}]),n}(p.a);function B(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}n.d(t,"a",(function(){return _}));var w=[0,0,0,255],Q={widthUnits:"meters",widthScale:{type:"number",min:0,value:1},widthMinPixels:{type:"number",min:0,value:0},widthMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},rounded:!1,miterLimit:{type:"number",min:0,value:4},billboard:!1,_pathType:null,getPath:{type:"accessor",value:function(e){return e.path}},getColor:{type:"accessor",value:w},getWidth:{type:"accessor",value:1}},k={enter:function(e,t){return t.length?t.subarray(t.length-e.length):e}},_=function(e){Object(o.a)(n,e);var t=B(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"getShaders",value:function(){return Object(a.a)(Object(u.a)(n.prototype),"getShaders",this).call(this,{vs:"#define SHADER_NAME path-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute float instanceTypes;\nattribute vec3 instanceStartPositions;\nattribute vec3 instanceEndPositions;\nattribute vec3 instanceLeftPositions;\nattribute vec3 instanceRightPositions;\nattribute vec3 instanceLeftPositions64Low;\nattribute vec3 instanceStartPositions64Low;\nattribute vec3 instanceEndPositions64Low;\nattribute vec3 instanceRightPositions64Low;\nattribute float instanceStrokeWidths;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\n\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform float jointType;\nuniform float miterLimit;\nuniform bool billboard;\n\nuniform float opacity;\n\nvarying vec4 vColor;\nvarying vec2 vCornerOffset;\nvarying float vMiterLength;\nvarying vec2 vPathPosition;\nvarying float vPathLength;\n\nconst float EPSILON = 0.001;\nconst vec3 ZERO_OFFSET = vec3(0.0);\n\nfloat flipIfTrue(bool flag) {\n  return -(float(flag) * 2. - 1.);\n}\nvec3 lineJoin(\n  vec3 prevPoint, vec3 currPoint, vec3 nextPoint,\n  vec2 width\n) {\n  bool isEnd = positions.x > 0.0;\n  float sideOfPath = positions.y;\n  float isJoint = float(sideOfPath == 0.0);\n\n  vec3 deltaA3 = (currPoint - prevPoint);\n  vec3 deltaB3 = (nextPoint - currPoint);\n\n  mat3 rotationMatrix;\n  bool needsRotation = !billboard && project_needs_rotation(currPoint, rotationMatrix);\n  if (needsRotation) {\n    deltaA3 = deltaA3 * rotationMatrix;\n    deltaB3 = deltaB3 * rotationMatrix;\n  }\n  vec2 deltaA = deltaA3.xy / width;\n  vec2 deltaB = deltaB3.xy / width;\n\n  float lenA = length(deltaA);\n  float lenB = length(deltaB);\n\n  vec2 dirA = lenA > 0. ? normalize(deltaA) : vec2(0.0, 0.0);\n  vec2 dirB = lenB > 0. ? normalize(deltaB) : vec2(0.0, 0.0);\n\n  vec2 perpA = vec2(-dirA.y, dirA.x);\n  vec2 perpB = vec2(-dirB.y, dirB.x);\n  vec2 tangent = dirA + dirB;\n  tangent = length(tangent) > 0. ? normalize(tangent) : perpA;\n  vec2 miterVec = vec2(-tangent.y, tangent.x);\n  vec2 dir = isEnd ? dirA : dirB;\n  vec2 perp = isEnd ? perpA : perpB;\n  float L = isEnd ? lenA : lenB;\n  float sinHalfA = abs(dot(miterVec, perp));\n  float cosHalfA = abs(dot(dirA, miterVec));\n  float turnDirection = flipIfTrue(dirA.x * dirB.y >= dirA.y * dirB.x);\n  float cornerPosition = sideOfPath * turnDirection;\n\n  float miterSize = 1.0 / max(sinHalfA, EPSILON);\n  miterSize = mix(\n    min(miterSize, max(lenA, lenB) / max(cosHalfA, EPSILON)),\n    miterSize,\n    step(0.0, cornerPosition)\n  );\n\n  vec2 offsetVec = mix(miterVec * miterSize, perp, step(0.5, cornerPosition))\n    * (sideOfPath + isJoint * turnDirection);\n  bool isStartCap = lenA == 0.0 || (!isEnd && (instanceTypes == 1.0 || instanceTypes == 3.0));\n  bool isEndCap = lenB == 0.0 || (isEnd && (instanceTypes == 2.0 || instanceTypes == 3.0));\n  bool isCap = isStartCap || isEndCap;\n  if (isCap) {\n    offsetVec = mix(perp * sideOfPath, dir * jointType * 4.0 * flipIfTrue(isStartCap), isJoint);\n  }\n  vPathLength = L;\n  vCornerOffset = offsetVec;\n  vMiterLength = dot(vCornerOffset, miterVec * turnDirection);\n  vMiterLength = isCap ? isJoint : vMiterLength;\n\n  vec2 offsetFromStartOfPath = vCornerOffset + deltaA * float(isEnd);\n  vPathPosition = vec2(\n    dot(offsetFromStartOfPath, perp),\n    dot(offsetFromStartOfPath, dir)\n  );\n  geometry.uv = vPathPosition;\n\n  float isValid = step(instanceTypes, 3.5);\n  vec3 offset = vec3(offsetVec * width * isValid, 0.0);\n\n  if (needsRotation) {\n    offset = rotationMatrix * offset;\n  }\n  return currPoint + offset;\n}\nvoid clipLine(inout vec4 position, vec4 refPosition) {\n  if (position.w < EPSILON) {\n    float r = (EPSILON - refPosition.w) / (position.w - refPosition.w);\n    position = refPosition + (position - refPosition) * r;\n  }\n}\n\nvoid main() {\n  geometry.worldPosition = instanceStartPositions;\n  geometry.worldPositionAlt = instanceEndPositions;\n  geometry.pickingColor = instancePickingColors;\n\n  vec2 widthPixels = vec2(clamp(project_size_to_pixel(instanceStrokeWidths * widthScale),\n    widthMinPixels, widthMaxPixels) / 2.0);\n  vec3 width;\n\n  vColor = vec4(instanceColors.rgb, instanceColors.a * opacity);\n\n  float isEnd = positions.x;\n\n  vec3 prevPosition = mix(instanceLeftPositions, instanceStartPositions, isEnd);\n  vec3 prevPosition64Low = mix(instanceLeftPositions64Low, instanceStartPositions64Low, isEnd);\n\n  vec3 currPosition = mix(instanceStartPositions, instanceEndPositions, isEnd);\n  vec3 currPosition64Low = mix(instanceStartPositions64Low, instanceEndPositions64Low, isEnd);\n\n  vec3 nextPosition = mix(instanceEndPositions, instanceRightPositions, isEnd);\n  vec3 nextPosition64Low = mix(instanceEndPositions64Low, instanceRightPositions64Low, isEnd);\n\n  if (billboard) {\n    vec4 prevPositionScreen = project_position_to_clipspace(prevPosition, prevPosition64Low, ZERO_OFFSET);\n    vec4 currPositionScreen = project_position_to_clipspace(currPosition, currPosition64Low, ZERO_OFFSET, geometry.position);\n    vec4 nextPositionScreen = project_position_to_clipspace(nextPosition, nextPosition64Low, ZERO_OFFSET);\n\n    clipLine(prevPositionScreen, currPositionScreen);\n    clipLine(nextPositionScreen, currPositionScreen);\n    clipLine(currPositionScreen, mix(nextPositionScreen, prevPositionScreen, isEnd));\n\n    width = vec3(widthPixels, 0.0);\n    DECKGL_FILTER_SIZE(width, geometry);\n\n    vec3 pos = lineJoin(\n      prevPositionScreen.xyz / prevPositionScreen.w,\n      currPositionScreen.xyz / currPositionScreen.w,\n      nextPositionScreen.xyz / nextPositionScreen.w,\n      project_pixel_size_to_clipspace(width.xy)\n    );\n\n    gl_Position = vec4(pos * currPositionScreen.w, currPositionScreen.w);\n  } else {\n    prevPosition = project_position(prevPosition, prevPosition64Low);\n    currPosition = project_position(currPosition, currPosition64Low);\n    nextPosition = project_position(nextPosition, nextPosition64Low);\n\n    width = vec3(project_pixel_size(widthPixels), 0.0);\n    DECKGL_FILTER_SIZE(width, geometry);\n\n    vec4 pos = vec4(\n      lineJoin(prevPosition, currPosition, nextPosition, width.xy),\n      1.0);\n    geometry.position = pos;\n    gl_Position = project_common_position_to_clipspace(pos);\n  }\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n  DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME path-layer-fragment-shader\n\nprecision highp float;\n\nuniform float jointType;\nuniform float miterLimit;\n\nvarying vec4 vColor;\nvarying vec2 vCornerOffset;\nvarying float vMiterLength;\nvarying vec2 vPathPosition;\nvarying float vPathLength;\n\nvoid main(void) {\n  geometry.uv = vPathPosition;\n\n  if (vPathPosition.y < 0.0 || vPathPosition.y > vPathLength) {\n    if (jointType > 0.0 && length(vCornerOffset) > 1.0) {\n      discard;\n    }\n    if (jointType == 0.0 && vMiterLength > miterLimit + 1.0) {\n      discard;\n    }\n  }\n  gl_FragColor = vColor;\n\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[A.a,c.a]})}},{key:"initializeState",value:function(){var e=this;this.getAttributeManager().addInstanced({positions:{size:3,vertexOffset:1,type:5130,fp64:this.use64bitPositions(),transition:k,accessor:"getPath",update:this.calculatePositions,noAlloc:!0,shaderAttributes:{instanceLeftPositions:{vertexOffset:0},instanceStartPositions:{vertexOffset:1},instanceEndPositions:{vertexOffset:2},instanceRightPositions:{vertexOffset:3}}},instanceTypes:{size:1,type:5121,update:this.calculateSegmentTypes,noAlloc:!0},instanceStrokeWidths:{size:1,accessor:"getWidth",transition:k,defaultValue:1},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,accessor:"getColor",transition:k,defaultValue:w},instancePickingColors:{size:3,type:5121,accessor:function(t,n){var r=n.index,i=n.target;return e.encodePickingColor(t&&t.__source?t.__source.index:r,i)}}}),this.setState({pathTesselator:new C({fp64:this.use64bitPositions()})}),this.props.getDashArray&&!this.props.extensions.length&&l.a.removed("getDashArray","PathStyleExtension")()}},{key:"updateState",value:function(e){var t=e.oldProps,r=e.props,i=e.changeFlags;Object(a.a)(Object(u.a)(n.prototype),"updateState",this).call(this,{props:r,oldProps:t,changeFlags:i});var o=this.getAttributeManager();if(i.dataChanged||i.updateTriggersChanged&&(i.updateTriggersChanged.all||i.updateTriggersChanged.getPath)){var s=this.state.pathTesselator,A=r.data.attributes||{};s.updateGeometry({data:r.data,geometryBuffer:A.getPath,buffers:A,normalize:!r._pathType,loop:"loop"===r._pathType,getGeometry:r.getPath,positionFormat:r.positionFormat,wrapLongitude:r.wrapLongitude,resolution:this.context.viewport.resolution,dataChanged:i.dataChanged}),this.setState({numInstances:s.instanceCount,startIndices:s.vertexStarts}),i.dataChanged||o.invalidateAll()}if(i.extensionsChanged){var c=this.context.gl;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(c)}),o.invalidateAll()}}},{key:"getPickingInfo",value:function(e){var t=Object(a.a)(Object(u.a)(n.prototype),"getPickingInfo",this).call(this,e),r=t.index,i=this.props.data;return i[0]&&i[0].__source&&(t.object=i.find((function(e){return e.__source.index===r}))),t}},{key:"draw",value:function(e){var t=e.uniforms,n=this.context.viewport,r=this.props,i=r.rounded,a=r.billboard,o=r.miterLimit,s=r.widthUnits,u=r.widthScale,A=r.widthMinPixels,c=r.widthMaxPixels,l="pixels"===s?n.metersPerPixel:1;this.state.model.setUniforms(Object.assign({},t,{jointType:Number(i),billboard:a,widthScale:u*l,miterLimit:o,widthMinPixels:A,widthMaxPixels:c})).draw()}},{key:"_getModel",value:function(e){return new h.a(e,Object.assign({},this.getShaders(),{id:this.props.id,geometry:new g.a({drawMode:4,attributes:{indices:new Uint16Array([0,1,2,1,4,2,1,3,4,3,5,4]),positions:{value:new Float32Array([0,0,0,-1,0,1,1,-1,1,1,1,0]),size:2}}}),isInstanced:!0}))}},{key:"calculatePositions",value:function(e){var t=this.state.pathTesselator;e.startIndices=t.vertexStarts,e.value=t.get("positions")}},{key:"calculateSegmentTypes",value:function(e){var t=this.state.pathTesselator;e.startIndices=t.vertexStarts,e.value=t.get("segmentTypes")}},{key:"wrapLongitude",get:function(){return!1}}]),n}(f.a);_.layerName="PathLayer",_.defaultProps=Q},function(e,t,n){"use strict";var r=n(919),i=n(39),a=Object.keys(i.a).map((function(e){return"const int COORDINATE_SYSTEM_".concat(e," = ").concat(i.a[e],";")})).join(""),o=Object.keys(i.c).map((function(e){return"const int PROJECTION_MODE_".concat(e," = ").concat(i.c[e],";")})).join(""),s="".concat(a,"\n").concat(o,"\n\nuniform int project_uCoordinateSystem;\nuniform int project_uProjectionMode;\nuniform float project_uScale;\nuniform bool project_uWrapLongitude;\nuniform float project_uAntimeridian;\nuniform vec3 project_uCommonUnitsPerMeter;\nuniform vec3 project_uCommonUnitsPerWorldUnit;\nuniform vec3 project_uCommonUnitsPerWorldUnit2;\nuniform vec4 project_uCenter;\nuniform mat4 project_uModelMatrix;\nuniform mat4 project_uViewProjectionMatrix;\nuniform vec2 project_uViewportSize;\nuniform float project_uDevicePixelRatio;\nuniform float project_uFocalDistance;\nuniform vec3 project_uCameraPosition;\nuniform vec3 project_uCoordinateOrigin;\n\nconst float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / (PI * 2.0);\nconst vec3 ZERO_64_LOW = vec3(0.0);\nconst float EARTH_RADIUS = 6370972.0;\nconst float GLOBE_RADIUS = 256.0;\nfloat project_size(float meters) {\n  return meters * project_uCommonUnitsPerMeter.z;\n}\n\nvec2 project_size(vec2 meters) {\n  return meters * project_uCommonUnitsPerMeter.xy;\n}\n\nvec3 project_size(vec3 meters) {\n  return meters * project_uCommonUnitsPerMeter;\n}\n\nvec4 project_size(vec4 meters) {\n  return vec4(meters.xyz * project_uCommonUnitsPerMeter, meters.w);\n}\nvec3 project_normal(vec3 vector) {\n  vec4 normal_modelspace = project_uModelMatrix * vec4(vector, 0.0);\n  return normalize(normal_modelspace.xyz * project_uCommonUnitsPerMeter);\n}\n\nvec4 project_offset_(vec4 offset) {\n  float dy = offset.y;\n  if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n    dy = clamp(dy, -1., 1.);\n  }\n  vec3 commonUnitsPerWorldUnit = project_uCommonUnitsPerWorldUnit + project_uCommonUnitsPerWorldUnit2 * dy;\n  return vec4(offset.xyz * commonUnitsPerWorldUnit, offset.w);\n}\nvec2 project_mercator_(vec2 lnglat) {\n  float x = lnglat.x;\n  if (project_uWrapLongitude) {\n    x = mod(x - project_uAntimeridian, 360.0) + project_uAntimeridian;\n  }\n  return vec2(\n    radians(x) + PI,\n    PI + log(tan_fp32(PI * 0.25 + radians(lnglat.y) * 0.5))\n  );\n}\n\nvec3 project_globe_(vec3 lnglatz) {\n  float lambda = radians(lnglatz.x);\n  float phi = radians(lnglatz.y);\n  float cosPhi = cos(phi);\n  float D = (lnglatz.z / EARTH_RADIUS + 1.0) * GLOBE_RADIUS;\n\n  return vec3(\n    sin(lambda) * cosPhi,\n    -cos(lambda) * cosPhi,\n    sin(phi)\n  ) * D;\n}\nvec4 project_position(vec4 position, vec3 position64Low) {\n  vec4 position_world = project_uModelMatrix * position;\n  if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR) {\n    if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n      return vec4(\n        project_mercator_(position_world.xy) * WORLD_SCALE,\n        project_size(position_world.z),\n        position_world.w\n      );\n    }\n    if (project_uCoordinateSystem == COORDINATE_SYSTEM_CARTESIAN) {\n      position_world.xyz += project_uCoordinateOrigin;\n    }\n  }\n  if (project_uProjectionMode == PROJECTION_MODE_GLOBE) {\n    if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n      return vec4(\n        project_globe_(position_world.xyz),\n        position_world.w\n      );\n    }\n  }\n  if (project_uProjectionMode == PROJECTION_MODE_IDENTITY ||\n    (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET &&\n    (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n     project_uCoordinateSystem == COORDINATE_SYSTEM_CARTESIAN))) {\n    position_world.xyz -= project_uCoordinateOrigin;\n  }\n  return project_offset_(position_world + project_uModelMatrix * vec4(position64Low, 0.0));\n}\n\nvec4 project_position(vec4 position) {\n  return project_position(position, ZERO_64_LOW);\n}\n\nvec3 project_position(vec3 position, vec3 position64Low) {\n  vec4 projected_position = project_position(vec4(position, 1.0), position64Low);\n  return projected_position.xyz;\n}\n\nvec3 project_position(vec3 position) {\n  vec4 projected_position = project_position(vec4(position, 1.0), ZERO_64_LOW);\n  return projected_position.xyz;\n}\n\nvec2 project_position(vec2 position) {\n  vec4 projected_position = project_position(vec4(position, 0.0, 1.0), ZERO_64_LOW);\n  return projected_position.xy;\n}\n\nvec4 project_common_position_to_clipspace(vec4 position, mat4 viewProjectionMatrix, vec4 center) {\n  return viewProjectionMatrix * position + center;\n}\nvec4 project_common_position_to_clipspace(vec4 position) {\n  return project_common_position_to_clipspace(position, project_uViewProjectionMatrix, project_uCenter);\n}\nvec2 project_pixel_size_to_clipspace(vec2 pixels) {\n  vec2 offset = pixels / project_uViewportSize * project_uDevicePixelRatio * 2.0;\n  return offset * project_uFocalDistance;\n}\n\nfloat project_size_to_pixel(float meters) {\n  return project_size(meters) * project_uScale;\n}\nfloat project_pixel_size(float pixels) {\n  return pixels / project_uScale;\n}\nvec2 project_pixel_size(vec2 pixels) {\n  return pixels / project_uScale;\n}\nmat3 project_get_orientation_matrix(vec3 up) {\n  vec3 uz = normalize(up);\n  vec3 ux = abs(uz.z) == 1.0 ? vec3(1.0, 0.0, 0.0) : normalize(vec3(uz.y, -uz.x, 0));\n  vec3 uy = cross(uz, ux);\n  return mat3(ux, uy, uz);\n}\n\nbool project_needs_rotation(vec3 commonPosition, out mat3 transform) {\n  if (project_uProjectionMode == PROJECTION_MODE_GLOBE) {\n    transform = project_get_orientation_matrix(commonPosition);\n    return true;\n  }\n  return false;\n}\n"),u=n(222),A={};t.a={name:"project",dependencies:[r.a],vs:s,getUniforms:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A;return e.viewport?Object(u.b)(e):{}}}},function(e,t,n){"use strict";var r=n(0),i=r.createContext({});t.a=i},function(e,t,n){var r=n(596),i=n(599),a=n(493),o=n(517),s=n(604),u=n(605),A=n(9),c=n(609),l=n(479),f=n(480);e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=33)}([function(e,t){e.exports=n(12)},function(e,t){e.exports=n(104)},function(e,t){e.exports=n(110)},function(e,t){e.exports=n(610)},function(e,t){e.exports=n(136)},function(e,t){e.exports=n(49)},function(e,t){e.exports=n(148)},function(e,t){e.exports=n(41)},function(e,t){e.exports=n(146)},function(e,t){e.exports=n(147)},function(e,t){e.exports=n(508)},function(e,t){e.exports=n(509)},function(e,t){e.exports=n(266)},function(e,t){e.exports=n(50)},function(e,t){e.exports=n(105)},function(e,t){},function(e,t){e.exports=n(0)},function(e,t){e.exports=n(623)},function(e,t){e.exports=n(625)},function(e,t){e.exports=n(724)},function(e,t){e.exports=n(52)},function(e,t){e.exports=n(634)},function(e,t){e.exports=n(512)},function(e,t){e.exports=n(198)},function(e,t){e.exports=n(640)},function(e,t){e.exports=n(641)},function(e,t){e.exports=n(654)},function(e,t){e.exports=n(655)},function(e,t,n){var r=n(15),i=n(21),a=e.exports;for(var o in r)r.hasOwnProperty(o)&&(a[o]=r[o]);function s(e){if("string"===typeof e&&(e=i.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}a.request=function(e,t){return e=s(e),r.request.call(this,e,t)},a.get=function(e,t){return e=s(e),r.get.call(this,e,t)}},function(e,t,n){e.exports=function(){return n(32)("/******/ (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 = 72);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return $errors; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return $events; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return $terminate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return $transferable; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return $worker; });\nconst $errors = Symbol(\"thread.errors\");\nconst $events = Symbol(\"thread.events\");\nconst $terminate = Symbol(\"thread.terminate\");\nconst $transferable = Symbol(\"thread.transferable\");\nconst $worker = Symbol(\"thread.worker\");\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n// 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/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process) {/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#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\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.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 */\nfunction log(...args) {\n\t// This hackery is required for IE8/9, where\n\t// the `console.log` function doesn't have 'apply'\n\treturn typeof console === 'object' &&\n\t\tconsole.log &&\n\t\tconsole.log(...args);\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\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\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = __webpack_require__(64)(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(2)))\n\n/***/ }),\n/* 4 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, \"a\", function() { return /* binding */ deserialize; });\n__webpack_require__.d(__webpack_exports__, \"b\", function() { return /* binding */ serialize; });\n\n// UNUSED EXPORTS: registerSerializer\n\n// CONCATENATED MODULE: ./node_modules/threads/dist-esm/serializers.js\nfunction extendSerializer(extend, implementation) {\n    const fallbackDeserializer = extend.deserialize.bind(extend);\n    const fallbackSerializer = extend.serialize.bind(extend);\n    return {\n        deserialize(message) {\n            return implementation.deserialize(message, fallbackDeserializer);\n        },\n        serialize(input) {\n            return implementation.serialize(input, fallbackSerializer);\n        }\n    };\n}\nconst DefaultErrorSerializer = {\n    deserialize(message) {\n        return Object.assign(Error(message.message), {\n            name: message.name,\n            stack: message.stack\n        });\n    },\n    serialize(error) {\n        return {\n            __error_marker: \"$$error\",\n            message: error.message,\n            name: error.name,\n            stack: error.stack\n        };\n    }\n};\nconst isSerializedError = (thing) => thing && typeof thing === \"object\" && \"__error_marker\" in thing && thing.__error_marker === \"$$error\";\nconst DefaultSerializer = {\n    deserialize(message) {\n        if (isSerializedError(message)) {\n            return DefaultErrorSerializer.deserialize(message);\n        }\n        else {\n            return message;\n        }\n    },\n    serialize(input) {\n        if (input instanceof Error) {\n            return DefaultErrorSerializer.serialize(input);\n        }\n        else {\n            return input;\n        }\n    }\n};\n\n// CONCATENATED MODULE: ./node_modules/threads/dist-esm/common.js\n\nlet registeredSerializer = DefaultSerializer;\nfunction registerSerializer(serializer) {\n    registeredSerializer = extendSerializer(registeredSerializer, serializer);\n}\nfunction deserialize(message) {\n    return registeredSerializer.deserialize(message);\n}\nfunction serialize(input) {\n    return registeredSerializer.serialize(input);\n}\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar codes = {};\n\nfunction createErrorType(code, message, Base) {\n  if (!Base) {\n    Base = Error;\n  }\n\n  function getMessage(arg1, arg2, arg3) {\n    if (typeof message === 'string') {\n      return message;\n    } else {\n      return message(arg1, arg2, arg3);\n    }\n  }\n\n  var NodeError =\n  /*#__PURE__*/\n  function (_Base) {\n    _inheritsLoose(NodeError, _Base);\n\n    function NodeError(arg1, arg2, arg3) {\n      return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;\n    }\n\n    return NodeError;\n  }(Base);\n\n  NodeError.prototype.name = Base.name;\n  NodeError.prototype.code = code;\n  codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n  if (Array.isArray(expected)) {\n    var len = expected.length;\n    expected = expected.map(function (i) {\n      return String(i);\n    });\n\n    if (len > 2) {\n      return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n    } else if (len === 2) {\n      return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n    } else {\n      return \"of \".concat(thing, \" \").concat(expected[0]);\n    }\n  } else {\n    return \"of \".concat(thing, \" \").concat(String(expected));\n  }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n  return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n  if (this_len === undefined || this_len > str.length) {\n    this_len = str.length;\n  }\n\n  return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n  if (typeof start !== 'number') {\n    start = 0;\n  }\n\n  if (start + search.length > str.length) {\n    return false;\n  } else {\n    return str.indexOf(search, start) !== -1;\n  }\n}\n\ncreateErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {\n  return 'The value \"' + value + '\" is invalid for option \"' + name + '\"';\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n  // determiner: 'must be' or 'must not be'\n  var determiner;\n\n  if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n    determiner = 'must not be';\n    expected = expected.replace(/^not /, '');\n  } else {\n    determiner = 'must be';\n  }\n\n  var msg;\n\n  if (endsWith(name, ' argument')) {\n    // For cases like 'first argument'\n    msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n  } else {\n    var type = includes(name, '.') ? 'property' : 'argument';\n    msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n  }\n\n  msg += \". Received type \".concat(typeof actual);\n  return msg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');\ncreateErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {\n  return 'The ' + name + ' method is not implemented';\n});\ncreateErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');\ncreateErrorType('ERR_STREAM_DESTROYED', function (name) {\n  return 'Cannot call ' + name + ' after a stream was destroyed';\n});\ncreateErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');\ncreateErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');\ncreateErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');\ncreateErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);\ncreateErrorType('ERR_UNKNOWN_ENCODING', function (arg) {\n  return 'Unknown encoding: ' + arg;\n}, TypeError);\ncreateErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');\nmodule.exports.codes = codes;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports) {\n\nif (typeof Object.create === 'function') {\n  // implementation from standard node.js 'util' module\n  module.exports = function inherits(ctor, superCtor) {\n    if (superCtor) {\n      ctor.super_ = superCtor\n      ctor.prototype = Object.create(superCtor.prototype, {\n        constructor: {\n          value: ctor,\n          enumerable: false,\n          writable: true,\n          configurable: true\n        }\n      })\n    }\n  };\n} else {\n  // old school shim for old browsers\n  module.exports = function inherits(ctor, superCtor) {\n    if (superCtor) {\n      ctor.super_ = superCtor\n      var TempCtor = function () {}\n      TempCtor.prototype = superCtor.prototype\n      ctor.prototype = new TempCtor()\n      ctor.prototype.constructor = ctor\n    }\n  }\n}\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {// 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// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\n/*<replacement>*/\n\nvar objectKeys = Object.keys || function (obj) {\n  var keys = [];\n\n  for (var key in obj) {\n    keys.push(key);\n  }\n\n  return keys;\n};\n/*</replacement>*/\n\n\nmodule.exports = Duplex;\n\nvar Readable = __webpack_require__(19);\n\nvar Writable = __webpack_require__(24);\n\n__webpack_require__(6)(Duplex, Readable);\n\n{\n  // Allow the keys array to be GC'ed.\n  var keys = objectKeys(Writable.prototype);\n\n  for (var v = 0; v < keys.length; v++) {\n    var method = keys[v];\n    if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n  }\n}\n\nfunction Duplex(options) {\n  if (!(this instanceof Duplex)) return new Duplex(options);\n  Readable.call(this, options);\n  Writable.call(this, options);\n  this.allowHalfOpen = true;\n\n  if (options) {\n    if (options.readable === false) this.readable = false;\n    if (options.writable === false) this.writable = false;\n\n    if (options.allowHalfOpen === false) {\n      this.allowHalfOpen = false;\n      this.once('end', onend);\n    }\n  }\n}\n\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function get() {\n    return this._writableState.highWaterMark;\n  }\n});\nObject.defineProperty(Duplex.prototype, 'writableBuffer', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function get() {\n    return this._writableState && this._writableState.getBuffer();\n  }\n});\nObject.defineProperty(Duplex.prototype, 'writableLength', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function get() {\n    return this._writableState.length;\n  }\n}); // the no-half-open enforcer\n\nfunction onend() {\n  // If the writable side ended, then we're ok.\n  if (this._writableState.ended) return; // no more data can be written.\n  // But allow more writes to happen in this tick.\n\n  process.nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n  self.end();\n}\n\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function get() {\n    if (this._readableState === undefined || this._writableState === undefined) {\n      return false;\n    }\n\n    return this._readableState.destroyed && this._writableState.destroyed;\n  },\n  set: function set(value) {\n    // we ignore the value if the stream\n    // has not been initialized yet\n    if (this._readableState === undefined || this._writableState === undefined) {\n      return;\n    } // backward compatibility, the user is explicitly\n    // managing destroyed\n\n\n    this._readableState.destroyed = value;\n    this._writableState.destroyed = value;\n  }\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(2)))\n\n/***/ }),\n/* 8 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MasterMessageType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return WorkerMessageType; });\n/////////////////////////////\n// Messages sent by master:\nvar MasterMessageType;\n(function (MasterMessageType) {\n    MasterMessageType[\"cancel\"] = \"cancel\";\n    MasterMessageType[\"run\"] = \"run\";\n})(MasterMessageType || (MasterMessageType = {}));\n////////////////////////////\n// Messages sent by worker:\nvar WorkerMessageType;\n(function (WorkerMessageType) {\n    WorkerMessageType[\"error\"] = \"error\";\n    WorkerMessageType[\"init\"] = \"init\";\n    WorkerMessageType[\"result\"] = \"result\";\n    WorkerMessageType[\"running\"] = \"running\";\n    WorkerMessageType[\"uncaughtError\"] = \"uncaughtError\";\n})(WorkerMessageType || (WorkerMessageType = {}));\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// UNUSED EXPORTS: Subscription, SubscriptionObserver, Observable\n\n// CONCATENATED MODULE: ./node_modules/observable-fns/dist.esm/_symbols.js\nconst hasSymbols = () => typeof Symbol === \"function\";\nconst hasSymbol = (name) => hasSymbols() && Boolean(Symbol[name]);\nconst getSymbol = (name) => hasSymbol(name) ? Symbol[name] : \"@@\" + name;\nfunction registerObservableSymbol() {\n    if (hasSymbols() && !hasSymbol(\"observable\")) {\n        Symbol.observable = Symbol(\"observable\");\n    }\n}\nif (!hasSymbol(\"asyncIterator\")) {\n    Symbol.asyncIterator = Symbol.asyncIterator || Symbol.for(\"Symbol.asyncIterator\");\n}\n\n// CONCATENATED MODULE: ./node_modules/observable-fns/dist.esm/observable.js\n/**\n * Based on <https://raw.githubusercontent.com/zenparsing/zen-observable/master/src/Observable.js>\n * At commit: f63849a8c60af5d514efc8e9d6138d8273c49ad6\n */\n/// <reference path=\"../types/symbols.d.ts\" />\n\nconst SymbolIterator = getSymbol(\"iterator\");\nconst SymbolObservable = getSymbol(\"observable\");\nconst SymbolSpecies = getSymbol(\"species\");\n// === Abstract Operations ===\nfunction getMethod(obj, key) {\n    const value = obj[key];\n    if (value == null) {\n        return undefined;\n    }\n    if (typeof value !== \"function\") {\n        throw new TypeError(value + \" is not a function\");\n    }\n    return value;\n}\nfunction getSpecies(obj) {\n    let ctor = obj.constructor;\n    if (ctor !== undefined) {\n        ctor = ctor[SymbolSpecies];\n        if (ctor === null) {\n            ctor = undefined;\n        }\n    }\n    return ctor !== undefined ? ctor : observable_Observable;\n}\nfunction isObservable(x) {\n    return x instanceof observable_Observable; // SPEC: Brand check\n}\nfunction hostReportError(error) {\n    if (hostReportError.log) {\n        hostReportError.log(error);\n    }\n    else {\n        setTimeout(() => { throw error; }, 0);\n    }\n}\nfunction enqueue(fn) {\n    Promise.resolve().then(() => {\n        try {\n            fn();\n        }\n        catch (e) {\n            hostReportError(e);\n        }\n    });\n}\nfunction cleanupSubscription(subscription) {\n    const cleanup = subscription._cleanup;\n    if (cleanup === undefined) {\n        return;\n    }\n    subscription._cleanup = undefined;\n    if (!cleanup) {\n        return;\n    }\n    try {\n        if (typeof cleanup === \"function\") {\n            cleanup();\n        }\n        else {\n            const unsubscribe = getMethod(cleanup, \"unsubscribe\");\n            if (unsubscribe) {\n                unsubscribe.call(cleanup);\n            }\n        }\n    }\n    catch (e) {\n        hostReportError(e);\n    }\n}\nfunction closeSubscription(subscription) {\n    subscription._observer = undefined;\n    subscription._queue = undefined;\n    subscription._state = \"closed\";\n}\nfunction flushSubscription(subscription) {\n    const queue = subscription._queue;\n    if (!queue) {\n        return;\n    }\n    subscription._queue = undefined;\n    subscription._state = \"ready\";\n    for (const item of queue) {\n        notifySubscription(subscription, item.type, item.value);\n        if (subscription._state === \"closed\") {\n            break;\n        }\n    }\n}\nfunction notifySubscription(subscription, type, value) {\n    subscription._state = \"running\";\n    const observer = subscription._observer;\n    try {\n        const m = observer ? getMethod(observer, type) : undefined;\n        switch (type) {\n            case \"next\":\n                if (m)\n                    m.call(observer, value);\n                break;\n            case \"error\":\n                closeSubscription(subscription);\n                if (m)\n                    m.call(observer, value);\n                else\n                    throw value;\n                break;\n            case \"complete\":\n                closeSubscription(subscription);\n                if (m)\n                    m.call(observer);\n                break;\n        }\n    }\n    catch (e) {\n        hostReportError(e);\n    }\n    if (subscription._state === \"closed\") {\n        cleanupSubscription(subscription);\n    }\n    else if (subscription._state === \"running\") {\n        subscription._state = \"ready\";\n    }\n}\nfunction onNotify(subscription, type, value) {\n    if (subscription._state === \"closed\") {\n        return;\n    }\n    if (subscription._state === \"buffering\") {\n        subscription._queue = subscription._queue || [];\n        subscription._queue.push({ type, value });\n        return;\n    }\n    if (subscription._state !== \"ready\") {\n        subscription._state = \"buffering\";\n        subscription._queue = [{ type, value }];\n        enqueue(() => flushSubscription(subscription));\n        return;\n    }\n    notifySubscription(subscription, type, value);\n}\nclass Subscription {\n    constructor(observer, subscriber) {\n        // ASSERT: observer is an object\n        // ASSERT: subscriber is callable\n        this._cleanup = undefined;\n        this._observer = observer;\n        this._queue = undefined;\n        this._state = \"initializing\";\n        const subscriptionObserver = new SubscriptionObserver(this);\n        try {\n            this._cleanup = subscriber.call(undefined, subscriptionObserver);\n        }\n        catch (e) {\n            subscriptionObserver.error(e);\n        }\n        if (this._state === \"initializing\") {\n            this._state = \"ready\";\n        }\n    }\n    get closed() {\n        return this._state === \"closed\";\n    }\n    unsubscribe() {\n        if (this._state !== \"closed\") {\n            closeSubscription(this);\n            cleanupSubscription(this);\n        }\n    }\n}\nclass SubscriptionObserver {\n    constructor(subscription) { this._subscription = subscription; }\n    get closed() { return this._subscription._state === \"closed\"; }\n    next(value) { onNotify(this._subscription, \"next\", value); }\n    error(value) { onNotify(this._subscription, \"error\", value); }\n    complete() { onNotify(this._subscription, \"complete\"); }\n}\n/**\n * The basic Observable class. This primitive is used to wrap asynchronous\n * data streams in a common standardized data type that is interoperable\n * between libraries and can be composed to represent more complex processes.\n */\nclass observable_Observable {\n    constructor(subscriber) {\n        if (!(this instanceof observable_Observable)) {\n            throw new TypeError(\"Observable cannot be called as a function\");\n        }\n        if (typeof subscriber !== \"function\") {\n            throw new TypeError(\"Observable initializer must be a function\");\n        }\n        this._subscriber = subscriber;\n    }\n    subscribe(nextOrObserver, onError, onComplete) {\n        if (typeof nextOrObserver !== \"object\" || nextOrObserver === null) {\n            nextOrObserver = {\n                next: nextOrObserver,\n                error: onError,\n                complete: onComplete\n            };\n        }\n        return new Subscription(nextOrObserver, this._subscriber);\n    }\n    pipe(first, ...mappers) {\n        // tslint:disable-next-line no-this-assignment\n        let intermediate = this;\n        for (const mapper of [first, ...mappers]) {\n            intermediate = mapper(intermediate);\n        }\n        return intermediate;\n    }\n    tap(nextOrObserver, onError, onComplete) {\n        const tapObserver = typeof nextOrObserver !== \"object\" || nextOrObserver === null\n            ? {\n                next: nextOrObserver,\n                error: onError,\n                complete: onComplete\n            }\n            : nextOrObserver;\n        return new observable_Observable(observer => {\n            return this.subscribe({\n                next(value) {\n                    tapObserver.next && tapObserver.next(value);\n                    observer.next(value);\n                },\n                error(error) {\n                    tapObserver.error && tapObserver.error(error);\n                    observer.error(error);\n                },\n                complete() {\n                    tapObserver.complete && tapObserver.complete();\n                    observer.complete();\n                },\n                start(subscription) {\n                    tapObserver.start && tapObserver.start(subscription);\n                }\n            });\n        });\n    }\n    forEach(fn) {\n        return new Promise((resolve, reject) => {\n            if (typeof fn !== \"function\") {\n                reject(new TypeError(fn + \" is not a function\"));\n                return;\n            }\n            function done() {\n                subscription.unsubscribe();\n                resolve();\n            }\n            const subscription = this.subscribe({\n                next(value) {\n                    try {\n                        fn(value, done);\n                    }\n                    catch (e) {\n                        reject(e);\n                        subscription.unsubscribe();\n                    }\n                },\n                error: reject,\n                complete: resolve,\n            });\n        });\n    }\n    map(fn) {\n        if (typeof fn !== \"function\") {\n            throw new TypeError(fn + \" is not a function\");\n        }\n        const C = getSpecies(this);\n        return new C(observer => this.subscribe({\n            next(value) {\n                let propagatedValue = value;\n                try {\n                    propagatedValue = fn(value);\n                }\n                catch (e) {\n                    return observer.error(e);\n                }\n                observer.next(propagatedValue);\n            },\n            error(e) { observer.error(e); },\n            complete() { observer.complete(); },\n        }));\n    }\n    filter(fn) {\n        if (typeof fn !== \"function\") {\n            throw new TypeError(fn + \" is not a function\");\n        }\n        const C = getSpecies(this);\n        return new C(observer => this.subscribe({\n            next(value) {\n                try {\n                    if (!fn(value))\n                        return;\n                }\n                catch (e) {\n                    return observer.error(e);\n                }\n                observer.next(value);\n            },\n            error(e) { observer.error(e); },\n            complete() { observer.complete(); },\n        }));\n    }\n    reduce(fn, seed) {\n        if (typeof fn !== \"function\") {\n            throw new TypeError(fn + \" is not a function\");\n        }\n        const C = getSpecies(this);\n        const hasSeed = arguments.length > 1;\n        let hasValue = false;\n        let acc = seed;\n        return new C(observer => this.subscribe({\n            next(value) {\n                const first = !hasValue;\n                hasValue = true;\n                if (!first || hasSeed) {\n                    try {\n                        acc = fn(acc, value);\n                    }\n                    catch (e) {\n                        return observer.error(e);\n                    }\n                }\n                else {\n                    acc = value;\n                }\n            },\n            error(e) { observer.error(e); },\n            complete() {\n                if (!hasValue && !hasSeed) {\n                    return observer.error(new TypeError(\"Cannot reduce an empty sequence\"));\n                }\n                observer.next(acc);\n                observer.complete();\n            },\n        }));\n    }\n    concat(...sources) {\n        const C = getSpecies(this);\n        return new C(observer => {\n            let subscription;\n            let index = 0;\n            function startNext(next) {\n                subscription = next.subscribe({\n                    next(v) { observer.next(v); },\n                    error(e) { observer.error(e); },\n                    complete() {\n                        if (index === sources.length) {\n                            subscription = undefined;\n                            observer.complete();\n                        }\n                        else {\n                            startNext(C.from(sources[index++]));\n                        }\n                    },\n                });\n            }\n            startNext(this);\n            return () => {\n                if (subscription) {\n                    subscription.unsubscribe();\n                    subscription = undefined;\n                }\n            };\n        });\n    }\n    flatMap(fn) {\n        if (typeof fn !== \"function\") {\n            throw new TypeError(fn + \" is not a function\");\n        }\n        const C = getSpecies(this);\n        return new C(observer => {\n            const subscriptions = [];\n            const outer = this.subscribe({\n                next(value) {\n                    let normalizedValue;\n                    if (fn) {\n                        try {\n                            normalizedValue = fn(value);\n                        }\n                        catch (e) {\n                            return observer.error(e);\n                        }\n                    }\n                    else {\n                        normalizedValue = value;\n                    }\n                    const inner = C.from(normalizedValue).subscribe({\n                        next(innerValue) { observer.next(innerValue); },\n                        error(e) { observer.error(e); },\n                        complete() {\n                            const i = subscriptions.indexOf(inner);\n                            if (i >= 0)\n                                subscriptions.splice(i, 1);\n                            completeIfDone();\n                        },\n                    });\n                    subscriptions.push(inner);\n                },\n                error(e) { observer.error(e); },\n                complete() { completeIfDone(); },\n            });\n            function completeIfDone() {\n                if (outer.closed && subscriptions.length === 0) {\n                    observer.complete();\n                }\n            }\n            return () => {\n                subscriptions.forEach(s => s.unsubscribe());\n                outer.unsubscribe();\n            };\n        });\n    }\n    [SymbolObservable]() { return this; }\n    static from(x) {\n        const C = (typeof this === \"function\" ? this : observable_Observable);\n        if (x == null) {\n            throw new TypeError(x + \" is not an object\");\n        }\n        const observableMethod = getMethod(x, SymbolObservable);\n        if (observableMethod) {\n            const observable = observableMethod.call(x);\n            if (Object(observable) !== observable) {\n                throw new TypeError(observable + \" is not an object\");\n            }\n            if (isObservable(observable) && observable.constructor === C) {\n                return observable;\n            }\n            return new C(observer => observable.subscribe(observer));\n        }\n        if (hasSymbol(\"iterator\")) {\n            const iteratorMethod = getMethod(x, SymbolIterator);\n            if (iteratorMethod) {\n                return new C(observer => {\n                    enqueue(() => {\n                        if (observer.closed)\n                            return;\n                        for (const item of iteratorMethod.call(x)) {\n                            observer.next(item);\n                            if (observer.closed)\n                                return;\n                        }\n                        observer.complete();\n                    });\n                });\n            }\n        }\n        if (Array.isArray(x)) {\n            return new C(observer => {\n                enqueue(() => {\n                    if (observer.closed)\n                        return;\n                    for (const item of x) {\n                        observer.next(item);\n                        if (observer.closed)\n                            return;\n                    }\n                    observer.complete();\n                });\n            });\n        }\n        throw new TypeError(x + \" is not observable\");\n    }\n    static of(...items) {\n        const C = (typeof this === \"function\" ? this : observable_Observable);\n        return new C(observer => {\n            enqueue(() => {\n                if (observer.closed)\n                    return;\n                for (const item of items) {\n                    observer.next(item);\n                    if (observer.closed)\n                        return;\n                }\n                observer.complete();\n            });\n        });\n    }\n    static get [SymbolSpecies]() { return this; }\n}\nif (hasSymbols()) {\n    Object.defineProperty(observable_Observable, Symbol(\"extensions\"), {\n        value: {\n            symbol: SymbolObservable,\n            hostReportError,\n        },\n        configurable: true,\n    });\n}\n/* harmony default export */ var observable = __webpack_exports__[\"a\"] = (observable_Observable);\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WorkerEventType; });\n/// <reference lib=\"dom\" />\n// tslint:disable max-classes-per-file\n\n/** Event as emitted by worker thread. Subscribe to using `Thread.events(thread)`. */\nvar WorkerEventType;\n(function (WorkerEventType) {\n    WorkerEventType[\"internalError\"] = \"internalError\";\n    WorkerEventType[\"message\"] = \"message\";\n    WorkerEventType[\"termination\"] = \"termination\";\n})(WorkerEventType || (WorkerEventType = {}));\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports) {\n\nvar 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/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n\nvar TYPED_OK =  (typeof Uint8Array !== 'undefined') &&\n                (typeof Uint16Array !== 'undefined') &&\n                (typeof Int32Array !== 'undefined');\n\nfunction _has(obj, key) {\n  return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n  var sources = Array.prototype.slice.call(arguments, 1);\n  while (sources.length) {\n    var source = sources.shift();\n    if (!source) { continue; }\n\n    if (typeof source !== 'object') {\n      throw new TypeError(source + 'must be non-object');\n    }\n\n    for (var p in source) {\n      if (_has(source, p)) {\n        obj[p] = source[p];\n      }\n    }\n  }\n\n  return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n  if (buf.length === size) { return buf; }\n  if (buf.subarray) { return buf.subarray(0, size); }\n  buf.length = size;\n  return buf;\n};\n\n\nvar fnTyped = {\n  arraySet: function (dest, src, src_offs, len, dest_offs) {\n    if (src.subarray && dest.subarray) {\n      dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n      return;\n    }\n    // Fallback to ordinary array\n    for (var i = 0; i < len; i++) {\n      dest[dest_offs + i] = src[src_offs + i];\n    }\n  },\n  // Join array of chunks to single array.\n  flattenChunks: function (chunks) {\n    var i, l, len, pos, chunk, result;\n\n    // calculate data length\n    len = 0;\n    for (i = 0, l = chunks.length; i < l; i++) {\n      len += chunks[i].length;\n    }\n\n    // join chunks\n    result = new Uint8Array(len);\n    pos = 0;\n    for (i = 0, l = chunks.length; i < l; i++) {\n      chunk = chunks[i];\n      result.set(chunk, pos);\n      pos += chunk.length;\n    }\n\n    return result;\n  }\n};\n\nvar fnUntyped = {\n  arraySet: function (dest, src, src_offs, len, dest_offs) {\n    for (var i = 0; i < len; i++) {\n      dest[dest_offs + i] = src[src_offs + i];\n    }\n  },\n  // Join array of chunks to single array.\n  flattenChunks: function (chunks) {\n    return [].concat.apply([], chunks);\n  }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n  if (on) {\n    exports.Buf8  = Uint8Array;\n    exports.Buf16 = Uint16Array;\n    exports.Buf32 = Int32Array;\n    exports.assign(exports, fnTyped);\n  } else {\n    exports.Buf8  = Array;\n    exports.Buf16 = Array;\n    exports.Buf32 = Array;\n    exports.assign(exports, fnUntyped);\n  }\n};\n\nexports.setTyped(TYPED_OK);\n\n\n/***/ }),\n/* 13 */,\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n// Ported from https://github.com/mafintosh/end-of-stream with\n// permission from the author, Mathias Buus (@mafintosh).\n\n\nvar ERR_STREAM_PREMATURE_CLOSE = __webpack_require__(5).codes.ERR_STREAM_PREMATURE_CLOSE;\n\nfunction once(callback) {\n  var called = false;\n  return function () {\n    if (called) return;\n    called = 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    callback.apply(this, args);\n  };\n}\n\nfunction noop() {}\n\nfunction isRequest(stream) {\n  return stream.setHeader && typeof stream.abort === 'function';\n}\n\nfunction eos(stream, opts, callback) {\n  if (typeof opts === 'function') return eos(stream, null, opts);\n  if (!opts) opts = {};\n  callback = once(callback || noop);\n  var readable = opts.readable || opts.readable !== false && stream.readable;\n  var writable = opts.writable || opts.writable !== false && stream.writable;\n\n  var onlegacyfinish = function onlegacyfinish() {\n    if (!stream.writable) onfinish();\n  };\n\n  var writableEnded = stream._writableState && stream._writableState.finished;\n\n  var onfinish = function onfinish() {\n    writable = false;\n    writableEnded = true;\n    if (!readable) callback.call(stream);\n  };\n\n  var readableEnded = stream._readableState && stream._readableState.endEmitted;\n\n  var onend = function onend() {\n    readable = false;\n    readableEnded = true;\n    if (!writable) callback.call(stream);\n  };\n\n  var onerror = function onerror(err) {\n    callback.call(stream, err);\n  };\n\n  var onclose = function onclose() {\n    var err;\n\n    if (readable && !readableEnded) {\n      if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n      return callback.call(stream, err);\n    }\n\n    if (writable && !writableEnded) {\n      if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();\n      return callback.call(stream, err);\n    }\n  };\n\n  var onrequest = function onrequest() {\n    stream.req.on('finish', onfinish);\n  };\n\n  if (isRequest(stream)) {\n    stream.on('complete', onfinish);\n    stream.on('abort', onclose);\n    if (stream.req) onrequest();else stream.on('request', onrequest);\n  } else if (writable && !stream._writableState) {\n    // legacy streams\n    stream.on('end', onlegacyfinish);\n    stream.on('close', onlegacyfinish);\n  }\n\n  stream.on('end', onend);\n  stream.on('finish', onfinish);\n  if (opts.error !== false) stream.on('error', onerror);\n  stream.on('close', onclose);\n  return function () {\n    stream.removeListener('complete', onfinish);\n    stream.removeListener('abort', onclose);\n    stream.removeListener('request', onrequest);\n    if (stream.req) stream.req.removeListener('finish', onfinish);\n    stream.removeListener('end', onlegacyfinish);\n    stream.removeListener('close', onlegacyfinish);\n    stream.removeListener('finish', onfinish);\n    stream.removeListener('end', onend);\n    stream.removeListener('error', onerror);\n    stream.removeListener('close', onclose);\n  };\n}\n\nmodule.exports = eos;\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\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\n\nvar punycode = __webpack_require__(66);\nvar util = __webpack_require__(68);\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n  this.protocol = null;\n  this.slashes = null;\n  this.auth = null;\n  this.host = null;\n  this.port = null;\n  this.hostname = null;\n  this.hash = null;\n  this.search = null;\n  this.query = null;\n  this.pathname = null;\n  this.path = null;\n  this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n    portPattern = /:[0-9]*$/,\n\n    // Special case for a simple path URL\n    simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n    // RFC 2396: characters reserved for delimiting URLs.\n    // We actually just auto-escape these.\n    delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n    // RFC 2396: characters not allowed for various reasons.\n    unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n    // Allowed by RFCs, but cause of XSS attacks.  Always escape these.\n    autoEscape = ['\\''].concat(unwise),\n    // Characters that are never ever allowed in a hostname.\n    // Note that any invalid chars are also handled, but these\n    // are the ones that are *expected* to be seen, so we fast-path\n    // them.\n    nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n    hostEndingChars = ['/', '?', '#'],\n    hostnameMaxLen = 255,\n    hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n    hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n    // protocols that can allow \"unsafe\" and \"unwise\" chars.\n    unsafeProtocol = {\n      'javascript': true,\n      'javascript:': true\n    },\n    // protocols that never have a hostname.\n    hostlessProtocol = {\n      'javascript': true,\n      'javascript:': true\n    },\n    // protocols that always contain a // bit.\n    slashedProtocol = {\n      'http': true,\n      'https': true,\n      'ftp': true,\n      'gopher': true,\n      'file': true,\n      'http:': true,\n      'https:': true,\n      'ftp:': true,\n      'gopher:': true,\n      'file:': true\n    },\n    querystring = __webpack_require__(69);\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n  if (url && util.isObject(url) && url instanceof Url) return url;\n\n  var u = new Url;\n  u.parse(url, parseQueryString, slashesDenoteHost);\n  return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n  if (!util.isString(url)) {\n    throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n  }\n\n  // Copy chrome, IE, opera backslash-handling behavior.\n  // Back slashes before the query string get converted to forward slashes\n  // See: https://code.google.com/p/chromium/issues/detail?id=25916\n  var queryIndex = url.indexOf('?'),\n      splitter =\n          (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n      uSplit = url.split(splitter),\n      slashRegex = /\\\\/g;\n  uSplit[0] = uSplit[0].replace(slashRegex, '/');\n  url = uSplit.join(splitter);\n\n  var rest = url;\n\n  // trim before proceeding.\n  // This is to support parse stuff like \"  http://foo.com  \\n\"\n  rest = rest.trim();\n\n  if (!slashesDenoteHost && url.split('#').length === 1) {\n    // Try fast path regexp\n    var simplePath = simplePathPattern.exec(rest);\n    if (simplePath) {\n      this.path = rest;\n      this.href = rest;\n      this.pathname = simplePath[1];\n      if (simplePath[2]) {\n        this.search = simplePath[2];\n        if (parseQueryString) {\n          this.query = querystring.parse(this.search.substr(1));\n        } else {\n          this.query = this.search.substr(1);\n        }\n      } else if (parseQueryString) {\n        this.search = '';\n        this.query = {};\n      }\n      return this;\n    }\n  }\n\n  var proto = protocolPattern.exec(rest);\n  if (proto) {\n    proto = proto[0];\n    var lowerProto = proto.toLowerCase();\n    this.protocol = lowerProto;\n    rest = rest.substr(proto.length);\n  }\n\n  // figure out if it's got a host\n  // user@server is *always* interpreted as a hostname, and url\n  // resolution will treat //foo/bar as host=foo,path=bar because that's\n  // how the browser resolves relative URLs.\n  if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n    var slashes = rest.substr(0, 2) === '//';\n    if (slashes && !(proto && hostlessProtocol[proto])) {\n      rest = rest.substr(2);\n      this.slashes = true;\n    }\n  }\n\n  if (!hostlessProtocol[proto] &&\n      (slashes || (proto && !slashedProtocol[proto]))) {\n\n    // there's a hostname.\n    // the first instance of /, ?, ;, or # ends the host.\n    //\n    // If there is an @ in the hostname, then non-host chars *are* allowed\n    // to the left of the last @ sign, unless some host-ending character\n    // comes *before* the @-sign.\n    // URLs are obnoxious.\n    //\n    // ex:\n    // http://a@b@c/ => user:a@b host:c\n    // http://a@b?@c => user:a host:c path:/?@c\n\n    // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n    // Review our test case against browsers more comprehensively.\n\n    // find the first instance of any hostEndingChars\n    var hostEnd = -1;\n    for (var i = 0; i < hostEndingChars.length; i++) {\n      var hec = rest.indexOf(hostEndingChars[i]);\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n        hostEnd = hec;\n    }\n\n    // at this point, either we have an explicit point where the\n    // auth portion cannot go past, or the last @ char is the decider.\n    var auth, atSign;\n    if (hostEnd === -1) {\n      // atSign can be anywhere.\n      atSign = rest.lastIndexOf('@');\n    } else {\n      // atSign must be in auth portion.\n      // http://a@b/c@d => host:b auth:a path:/c@d\n      atSign = rest.lastIndexOf('@', hostEnd);\n    }\n\n    // Now we have a portion which is definitely the auth.\n    // Pull that off.\n    if (atSign !== -1) {\n      auth = rest.slice(0, atSign);\n      rest = rest.slice(atSign + 1);\n      this.auth = decodeURIComponent(auth);\n    }\n\n    // the host is the remaining to the left of the first non-host char\n    hostEnd = -1;\n    for (var i = 0; i < nonHostChars.length; i++) {\n      var hec = rest.indexOf(nonHostChars[i]);\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n        hostEnd = hec;\n    }\n    // if we still have not hit it, then the entire thing is a host.\n    if (hostEnd === -1)\n      hostEnd = rest.length;\n\n    this.host = rest.slice(0, hostEnd);\n    rest = rest.slice(hostEnd);\n\n    // pull out port.\n    this.parseHost();\n\n    // we've indicated that there is a hostname,\n    // so even if it's empty, it has to be present.\n    this.hostname = this.hostname || '';\n\n    // if hostname begins with [ and ends with ]\n    // assume that it's an IPv6 address.\n    var ipv6Hostname = this.hostname[0] === '[' &&\n        this.hostname[this.hostname.length - 1] === ']';\n\n    // validate a little.\n    if (!ipv6Hostname) {\n      var hostparts = this.hostname.split(/\\./);\n      for (var i = 0, l = hostparts.length; i < l; i++) {\n        var part = hostparts[i];\n        if (!part) continue;\n        if (!part.match(hostnamePartPattern)) {\n          var newpart = '';\n          for (var j = 0, k = part.length; j < k; j++) {\n            if (part.charCodeAt(j) > 127) {\n              // we replace non-ASCII char with a temporary placeholder\n              // we need this to make sure size of hostname is not\n              // broken by replacing non-ASCII by nothing\n              newpart += 'x';\n            } else {\n              newpart += part[j];\n            }\n          }\n          // we test again with ASCII char only\n          if (!newpart.match(hostnamePartPattern)) {\n            var validParts = hostparts.slice(0, i);\n            var notHost = hostparts.slice(i + 1);\n            var bit = part.match(hostnamePartStart);\n            if (bit) {\n              validParts.push(bit[1]);\n              notHost.unshift(bit[2]);\n            }\n            if (notHost.length) {\n              rest = '/' + notHost.join('.') + rest;\n            }\n            this.hostname = validParts.join('.');\n            break;\n          }\n        }\n      }\n    }\n\n    if (this.hostname.length > hostnameMaxLen) {\n      this.hostname = '';\n    } else {\n      // hostnames are always lower case.\n      this.hostname = this.hostname.toLowerCase();\n    }\n\n    if (!ipv6Hostname) {\n      // IDNA Support: Returns a punycoded representation of \"domain\".\n      // It only converts parts of the domain name that\n      // have non-ASCII characters, i.e. it doesn't matter if\n      // you call it with a domain that already is ASCII-only.\n      this.hostname = punycode.toASCII(this.hostname);\n    }\n\n    var p = this.port ? ':' + this.port : '';\n    var h = this.hostname || '';\n    this.host = h + p;\n    this.href += this.host;\n\n    // strip [ and ] from the hostname\n    // the host field still retains them, though\n    if (ipv6Hostname) {\n      this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n      if (rest[0] !== '/') {\n        rest = '/' + rest;\n      }\n    }\n  }\n\n  // now rest is set to the post-host stuff.\n  // chop off any delim chars.\n  if (!unsafeProtocol[lowerProto]) {\n\n    // First, make 100% sure that any \"autoEscape\" chars get\n    // escaped, even if encodeURIComponent doesn't think they\n    // need to be.\n    for (var i = 0, l = autoEscape.length; i < l; i++) {\n      var ae = autoEscape[i];\n      if (rest.indexOf(ae) === -1)\n        continue;\n      var esc = encodeURIComponent(ae);\n      if (esc === ae) {\n        esc = escape(ae);\n      }\n      rest = rest.split(ae).join(esc);\n    }\n  }\n\n\n  // chop off from the tail first.\n  var hash = rest.indexOf('#');\n  if (hash !== -1) {\n    // got a fragment string.\n    this.hash = rest.substr(hash);\n    rest = rest.slice(0, hash);\n  }\n  var qm = rest.indexOf('?');\n  if (qm !== -1) {\n    this.search = rest.substr(qm);\n    this.query = rest.substr(qm + 1);\n    if (parseQueryString) {\n      this.query = querystring.parse(this.query);\n    }\n    rest = rest.slice(0, qm);\n  } else if (parseQueryString) {\n    // no query string, but parseQueryString still requested\n    this.search = '';\n    this.query = {};\n  }\n  if (rest) this.pathname = rest;\n  if (slashedProtocol[lowerProto] &&\n      this.hostname && !this.pathname) {\n    this.pathname = '/';\n  }\n\n  //to support http.request\n  if (this.pathname || this.search) {\n    var p = this.pathname || '';\n    var s = this.search || '';\n    this.path = p + s;\n  }\n\n  // finally, reconstruct the href based on what has been validated.\n  this.href = this.format();\n  return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n  // ensure it's an object, and not a string url.\n  // If it's an obj, this is a no-op.\n  // this way, you can call url_format() on strings\n  // to clean up potentially wonky urls.\n  if (util.isString(obj)) obj = urlParse(obj);\n  if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n  return obj.format();\n}\n\nUrl.prototype.format = function() {\n  var auth = this.auth || '';\n  if (auth) {\n    auth = encodeURIComponent(auth);\n    auth = auth.replace(/%3A/i, ':');\n    auth += '@';\n  }\n\n  var protocol = this.protocol || '',\n      pathname = this.pathname || '',\n      hash = this.hash || '',\n      host = false,\n      query = '';\n\n  if (this.host) {\n    host = auth + this.host;\n  } else if (this.hostname) {\n    host = auth + (this.hostname.indexOf(':') === -1 ?\n        this.hostname :\n        '[' + this.hostname + ']');\n    if (this.port) {\n      host += ':' + this.port;\n    }\n  }\n\n  if (this.query &&\n      util.isObject(this.query) &&\n      Object.keys(this.query).length) {\n    query = querystring.stringify(this.query);\n  }\n\n  var search = this.search || (query && ('?' + query)) || '';\n\n  if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n  // only the slashedProtocols get the //.  Not mailto:, xmpp:, etc.\n  // unless they had them to begin with.\n  if (this.slashes ||\n      (!protocol || slashedProtocol[protocol]) && host !== false) {\n    host = '//' + (host || '');\n    if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n  } else if (!host) {\n    host = '';\n  }\n\n  if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n  if (search && search.charAt(0) !== '?') search = '?' + search;\n\n  pathname = pathname.replace(/[?#]/g, function(match) {\n    return encodeURIComponent(match);\n  });\n  search = search.replace('#', '%23');\n\n  return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n  return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n  return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n  if (!source) return relative;\n  return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n  if (util.isString(relative)) {\n    var rel = new Url();\n    rel.parse(relative, false, true);\n    relative = rel;\n  }\n\n  var result = new Url();\n  var tkeys = Object.keys(this);\n  for (var tk = 0; tk < tkeys.length; tk++) {\n    var tkey = tkeys[tk];\n    result[tkey] = this[tkey];\n  }\n\n  // hash is always overridden, no matter what.\n  // even href=\"\" will remove it.\n  result.hash = relative.hash;\n\n  // if the relative url is empty, then there's nothing left to do here.\n  if (relative.href === '') {\n    result.href = result.format();\n    return result;\n  }\n\n  // hrefs like //foo/bar always cut to the protocol.\n  if (relative.slashes && !relative.protocol) {\n    // take everything except the protocol from relative\n    var rkeys = Object.keys(relative);\n    for (var rk = 0; rk < rkeys.length; rk++) {\n      var rkey = rkeys[rk];\n      if (rkey !== 'protocol')\n        result[rkey] = relative[rkey];\n    }\n\n    //urlParse appends trailing / to urls like http://www.example.com\n    if (slashedProtocol[result.protocol] &&\n        result.hostname && !result.pathname) {\n      result.path = result.pathname = '/';\n    }\n\n    result.href = result.format();\n    return result;\n  }\n\n  if (relative.protocol && relative.protocol !== result.protocol) {\n    // if it's a known url protocol, then changing\n    // the protocol does weird things\n    // first, if it's not file:, then we MUST have a host,\n    // and if there was a path\n    // to begin with, then we MUST have a path.\n    // if it is file:, then the host is dropped,\n    // because that's known to be hostless.\n    // anything else is assumed to be absolute.\n    if (!slashedProtocol[relative.protocol]) {\n      var keys = Object.keys(relative);\n      for (var v = 0; v < keys.length; v++) {\n        var k = keys[v];\n        result[k] = relative[k];\n      }\n      result.href = result.format();\n      return result;\n    }\n\n    result.protocol = relative.protocol;\n    if (!relative.host && !hostlessProtocol[relative.protocol]) {\n      var relPath = (relative.pathname || '').split('/');\n      while (relPath.length && !(relative.host = relPath.shift()));\n      if (!relative.host) relative.host = '';\n      if (!relative.hostname) relative.hostname = '';\n      if (relPath[0] !== '') relPath.unshift('');\n      if (relPath.length < 2) relPath.unshift('');\n      result.pathname = relPath.join('/');\n    } else {\n      result.pathname = relative.pathname;\n    }\n    result.search = relative.search;\n    result.query = relative.query;\n    result.host = relative.host || '';\n    result.auth = relative.auth;\n    result.hostname = relative.hostname || relative.host;\n    result.port = relative.port;\n    // to support http.request\n    if (result.pathname || result.search) {\n      var p = result.pathname || '';\n      var s = result.search || '';\n      result.path = p + s;\n    }\n    result.slashes = result.slashes || relative.slashes;\n    result.href = result.format();\n    return result;\n  }\n\n  var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n      isRelAbs = (\n          relative.host ||\n          relative.pathname && relative.pathname.charAt(0) === '/'\n      ),\n      mustEndAbs = (isRelAbs || isSourceAbs ||\n                    (result.host && relative.pathname)),\n      removeAllDots = mustEndAbs,\n      srcPath = result.pathname && result.pathname.split('/') || [],\n      relPath = relative.pathname && relative.pathname.split('/') || [],\n      psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n  // if the url is a non-slashed url, then relative\n  // links like ../.. should be able\n  // to crawl up to the hostname, as well.  This is strange.\n  // result.protocol has already been set by now.\n  // Later on, put the first path part into the host field.\n  if (psychotic) {\n    result.hostname = '';\n    result.port = null;\n    if (result.host) {\n      if (srcPath[0] === '') srcPath[0] = result.host;\n      else srcPath.unshift(result.host);\n    }\n    result.host = '';\n    if (relative.protocol) {\n      relative.hostname = null;\n      relative.port = null;\n      if (relative.host) {\n        if (relPath[0] === '') relPath[0] = relative.host;\n        else relPath.unshift(relative.host);\n      }\n      relative.host = null;\n    }\n    mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n  }\n\n  if (isRelAbs) {\n    // it's absolute.\n    result.host = (relative.host || relative.host === '') ?\n                  relative.host : result.host;\n    result.hostname = (relative.hostname || relative.hostname === '') ?\n                      relative.hostname : result.hostname;\n    result.search = relative.search;\n    result.query = relative.query;\n    srcPath = relPath;\n    // fall through to the dot-handling below.\n  } else if (relPath.length) {\n    // it's relative\n    // throw away the existing file, and take the new path instead.\n    if (!srcPath) srcPath = [];\n    srcPath.pop();\n    srcPath = srcPath.concat(relPath);\n    result.search = relative.search;\n    result.query = relative.query;\n  } else if (!util.isNullOrUndefined(relative.search)) {\n    // just pull out the search.\n    // like href='?foo'.\n    // Put this after the other two cases because it simplifies the booleans\n    if (psychotic) {\n      result.hostname = result.host = srcPath.shift();\n      //occationaly the auth can get stuck only in host\n      //this especially happens in cases like\n      //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n      var authInHost = result.host && result.host.indexOf('@') > 0 ?\n                       result.host.split('@') : false;\n      if (authInHost) {\n        result.auth = authInHost.shift();\n        result.host = result.hostname = authInHost.shift();\n      }\n    }\n    result.search = relative.search;\n    result.query = relative.query;\n    //to support http.request\n    if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n      result.path = (result.pathname ? result.pathname : '') +\n                    (result.search ? result.search : '');\n    }\n    result.href = result.format();\n    return result;\n  }\n\n  if (!srcPath.length) {\n    // no path at all.  easy.\n    // we've already handled the other stuff above.\n    result.pathname = null;\n    //to support http.request\n    if (result.search) {\n      result.path = '/' + result.search;\n    } else {\n      result.path = null;\n    }\n    result.href = result.format();\n    return result;\n  }\n\n  // if a url ENDs in . or .., then it must get a trailing slash.\n  // however, if it ends in anything else non-slashy,\n  // then it must NOT get a trailing slash.\n  var last = srcPath.slice(-1)[0];\n  var hasTrailingSlash = (\n      (result.host || relative.host || srcPath.length > 1) &&\n      (last === '.' || last === '..') || last === '');\n\n  // strip single dots, resolve double dots to parent dir\n  // if the path tries to go above the root, `up` ends up > 0\n  var up = 0;\n  for (var i = srcPath.length; i >= 0; i--) {\n    last = srcPath[i];\n    if (last === '.') {\n      srcPath.splice(i, 1);\n    } else if (last === '..') {\n      srcPath.splice(i, 1);\n      up++;\n    } else if (up) {\n      srcPath.splice(i, 1);\n      up--;\n    }\n  }\n\n  // if the path is allowed to go above the root, restore leading ..s\n  if (!mustEndAbs && !removeAllDots) {\n    for (; up--; up) {\n      srcPath.unshift('..');\n    }\n  }\n\n  if (mustEndAbs && srcPath[0] !== '' &&\n      (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n    srcPath.unshift('');\n  }\n\n  if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n    srcPath.push('');\n  }\n\n  var isAbsolute = srcPath[0] === '' ||\n      (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n  // put the host back\n  if (psychotic) {\n    result.hostname = result.host = isAbsolute ? '' :\n                                    srcPath.length ? srcPath.shift() : '';\n    //occationaly the auth can get stuck only in host\n    //this especially happens in cases like\n    //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n    var authInHost = result.host && result.host.indexOf('@') > 0 ?\n                     result.host.split('@') : false;\n    if (authInHost) {\n      result.auth = authInHost.shift();\n      result.host = result.hostname = authInHost.shift();\n    }\n  }\n\n  mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n  if (mustEndAbs && !isAbsolute) {\n    srcPath.unshift('');\n  }\n\n  if (!srcPath.length) {\n    result.pathname = null;\n    result.path = null;\n  } else {\n    result.pathname = srcPath.join('/');\n  }\n\n  //to support request.http\n  if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n    result.path = (result.pathname ? result.pathname : '') +\n                  (result.search ? result.search : '');\n  }\n  result.auth = relative.auth || result.auth;\n  result.slashes = result.slashes || relative.slashes;\n  result.href = result.format();\n  return result;\n};\n\nUrl.prototype.parseHost = function() {\n  var host = this.host;\n  var port = portPattern.exec(host);\n  if (port) {\n    port = port[0];\n    if (port !== ':') {\n      this.port = port.substr(1);\n    }\n    host = host.substr(0, host.length - port.length);\n  }\n  if (host) this.hostname = host;\n};\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(37);\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, \"a\", function() { return /* binding */ createProxyFunction; });\n__webpack_require__.d(__webpack_exports__, \"b\", function() { return /* binding */ createProxyModule; });\n\n// EXTERNAL MODULE: ./node_modules/debug/src/browser.js\nvar browser = __webpack_require__(3);\nvar browser_default = /*#__PURE__*/__webpack_require__.n(browser);\n\n// EXTERNAL MODULE: ./node_modules/observable-fns/dist.esm/observable.js + 1 modules\nvar observable = __webpack_require__(9);\n\n// EXTERNAL MODULE: ./node_modules/observable-fns/dist.esm/multicast.js + 1 modules\nvar multicast = __webpack_require__(74);\n\n// EXTERNAL MODULE: ./node_modules/threads/dist-esm/common.js + 1 modules\nvar common = __webpack_require__(4);\n\n// CONCATENATED MODULE: ./node_modules/threads/dist-esm/observable-promise.js\n\nconst doNothing = () => undefined;\nconst returnInput = (input) => input;\nconst runDeferred = (fn) => Promise.resolve().then(fn);\nfunction fail(error) {\n    throw error;\n}\nfunction isThenable(thing) {\n    return thing && typeof thing.then === \"function\";\n}\n/**\n * Creates a hybrid, combining the APIs of an Observable and a Promise.\n *\n * It is used to proxy async process states when we are initially not sure\n * if that async process will yield values once (-> Promise) or multiple\n * times (-> Observable).\n *\n * Note that the observable promise inherits some of the observable's characteristics:\n * The `init` function will be called *once for every time anyone subscribes to it*.\n *\n * If this is undesired, derive a hot observable from it using `makeHot()` and\n * subscribe to that.\n */\nclass observable_promise_ObservablePromise extends observable[\"a\" /* default */] {\n    constructor(init) {\n        super(originalObserver => {\n            // tslint:disable-next-line no-this-assignment\n            const self = this;\n            const observer = Object.assign(Object.assign({}, originalObserver), { complete() {\n                    originalObserver.complete();\n                    self.onCompletion();\n                }, error(error) {\n                    originalObserver.error(error);\n                    self.onError(error);\n                },\n                next(value) {\n                    originalObserver.next(value);\n                    self.onNext(value);\n                } });\n            try {\n                this.initHasRun = true;\n                return init(observer);\n            }\n            catch (error) {\n                observer.error(error);\n            }\n        });\n        this.initHasRun = false;\n        this.fulfillmentCallbacks = [];\n        this.rejectionCallbacks = [];\n        this.firstValueSet = false;\n        this.state = \"pending\";\n    }\n    onNext(value) {\n        if (!this.firstValueSet) {\n            this.firstValue = value;\n            this.firstValueSet = true;\n        }\n    }\n    onError(error) {\n        this.state = \"rejected\";\n        this.rejection = error;\n        for (const onRejected of this.rejectionCallbacks) {\n            // Promisifying the call to turn errors into unhandled promise rejections\n            // instead of them failing sync and cancelling the iteration\n            runDeferred(() => onRejected(error));\n        }\n    }\n    onCompletion() {\n        this.state = \"fulfilled\";\n        for (const onFulfilled of this.fulfillmentCallbacks) {\n            // Promisifying the call to turn errors into unhandled promise rejections\n            // instead of them failing sync and cancelling the iteration\n            runDeferred(() => onFulfilled(this.firstValue));\n        }\n    }\n    then(onFulfilledRaw, onRejectedRaw) {\n        const onFulfilled = onFulfilledRaw || returnInput;\n        const onRejected = onRejectedRaw || fail;\n        let onRejectedCalled = false;\n        return new Promise((resolve, reject) => {\n            const rejectionCallback = (error) => {\n                if (onRejectedCalled)\n                    return;\n                onRejectedCalled = true;\n                try {\n                    resolve(onRejected(error));\n                }\n                catch (anotherError) {\n                    reject(anotherError);\n                }\n            };\n            const fulfillmentCallback = (value) => {\n                try {\n                    resolve(onFulfilled(value));\n                }\n                catch (error) {\n                    rejectionCallback(error);\n                }\n            };\n            if (!this.initHasRun) {\n                this.subscribe({ error: rejectionCallback });\n            }\n            if (this.state === \"fulfilled\") {\n                return resolve(onFulfilled(this.firstValue));\n            }\n            if (this.state === \"rejected\") {\n                onRejectedCalled = true;\n                return resolve(onRejected(this.rejection));\n            }\n            this.fulfillmentCallbacks.push(fulfillmentCallback);\n            this.rejectionCallbacks.push(rejectionCallback);\n        });\n    }\n    catch(onRejected) {\n        return this.then(undefined, onRejected);\n    }\n    finally(onCompleted) {\n        const handler = onCompleted || doNothing;\n        return this.then((value) => {\n            handler();\n            return value;\n        }, () => handler());\n    }\n    static from(thing) {\n        if (isThenable(thing)) {\n            return new observable_promise_ObservablePromise(observer => {\n                const onFulfilled = (value) => {\n                    observer.next(value);\n                    observer.complete();\n                };\n                const onRejected = (error) => {\n                    observer.error(error);\n                };\n                thing.then(onFulfilled, onRejected);\n            });\n        }\n        else {\n            return super.from(thing);\n        }\n    }\n}\n\n// EXTERNAL MODULE: ./node_modules/threads/dist-esm/transferable.js\nvar transferable = __webpack_require__(35);\n\n// EXTERNAL MODULE: ./node_modules/threads/dist-esm/types/messages.js\nvar messages = __webpack_require__(8);\n\n// CONCATENATED MODULE: ./node_modules/threads/dist-esm/master/invocation-proxy.js\n/*\n * This source file contains the code for proxying calls in the master thread to calls in the workers\n * by `.postMessage()`-ing.\n *\n * Keep in mind that this code can make or break the program's performance! Need to optimize more\u2026\n */\n\n\n\n\n\n\nconst debugMessages = browser_default()(\"threads:master:messages\");\nlet nextJobUID = 1;\nconst dedupe = (array) => Array.from(new Set(array));\nconst isJobErrorMessage = (data) => data && data.type === messages[\"b\" /* WorkerMessageType */].error;\nconst isJobResultMessage = (data) => data && data.type === messages[\"b\" /* WorkerMessageType */].result;\nconst isJobStartMessage = (data) => data && data.type === messages[\"b\" /* WorkerMessageType */].running;\nfunction createObservableForJob(worker, jobUID) {\n    return new observable[\"a\" /* default */](observer => {\n        let asyncType;\n        const messageHandler = ((event) => {\n            debugMessages(\"Message from worker:\", event.data);\n            if (!event.data || event.data.uid !== jobUID)\n                return;\n            if (isJobStartMessage(event.data)) {\n                asyncType = event.data.resultType;\n            }\n            else if (isJobResultMessage(event.data)) {\n                if (asyncType === \"promise\") {\n                    if (typeof event.data.payload !== \"undefined\") {\n                        observer.next(Object(common[\"a\" /* deserialize */])(event.data.payload));\n                    }\n                    observer.complete();\n                    worker.removeEventListener(\"message\", messageHandler);\n                }\n                else {\n                    if (event.data.payload) {\n                        observer.next(Object(common[\"a\" /* deserialize */])(event.data.payload));\n                    }\n                    if (event.data.complete) {\n                        observer.complete();\n                        worker.removeEventListener(\"message\", messageHandler);\n                    }\n                }\n            }\n            else if (isJobErrorMessage(event.data)) {\n                const error = Object(common[\"a\" /* deserialize */])(event.data.error);\n                if (asyncType === \"promise\" || !asyncType) {\n                    observer.error(error);\n                }\n                else {\n                    observer.error(error);\n                }\n                worker.removeEventListener(\"message\", messageHandler);\n            }\n        });\n        worker.addEventListener(\"message\", messageHandler);\n        return () => {\n            if (asyncType === \"observable\" || !asyncType) {\n                const cancelMessage = {\n                    type: messages[\"a\" /* MasterMessageType */].cancel,\n                    uid: jobUID\n                };\n                worker.postMessage(cancelMessage);\n            }\n            worker.removeEventListener(\"message\", messageHandler);\n        };\n    });\n}\nfunction prepareArguments(rawArgs) {\n    if (rawArgs.length === 0) {\n        // Exit early if possible\n        return {\n            args: [],\n            transferables: []\n        };\n    }\n    const args = [];\n    const transferables = [];\n    for (const arg of rawArgs) {\n        if (Object(transferable[\"b\" /* isTransferDescriptor */])(arg)) {\n            args.push(Object(common[\"b\" /* serialize */])(arg.send));\n            transferables.push(...arg.transferables);\n        }\n        else {\n            args.push(Object(common[\"b\" /* serialize */])(arg));\n        }\n    }\n    return {\n        args,\n        transferables: transferables.length === 0 ? transferables : dedupe(transferables)\n    };\n}\nfunction createProxyFunction(worker, method) {\n    return ((...rawArgs) => {\n        const uid = nextJobUID++;\n        const { args, transferables } = prepareArguments(rawArgs);\n        const runMessage = {\n            type: messages[\"a\" /* MasterMessageType */].run,\n            uid,\n            method,\n            args\n        };\n        debugMessages(\"Sending command to run function to worker:\", runMessage);\n        try {\n            worker.postMessage(runMessage, transferables);\n        }\n        catch (error) {\n            return observable_promise_ObservablePromise.from(Promise.reject(error));\n        }\n        return observable_promise_ObservablePromise.from(Object(multicast[\"a\" /* default */])(createObservableForJob(worker, uid)));\n    });\n}\nfunction createProxyModule(worker, methodNames) {\n    const proxy = {};\n    for (const methodName of methodNames) {\n        proxy[methodName] = createProxyFunction(worker, methodName);\n    }\n    return proxy;\n}\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports) {\n\nfunction _iterableToArray(iter) {\n  if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global, process) {// 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\nmodule.exports = Readable;\n/*<replacement>*/\n\nvar Duplex;\n/*</replacement>*/\n\nReadable.ReadableState = ReadableState;\n/*<replacement>*/\n\nvar EE = __webpack_require__(20).EventEmitter;\n\nvar EElistenerCount = function EElistenerCount(emitter, type) {\n  return emitter.listeners(type).length;\n};\n/*</replacement>*/\n\n/*<replacement>*/\n\n\nvar Stream = __webpack_require__(21);\n/*</replacement>*/\n\n\nvar Buffer = __webpack_require__(0).Buffer;\n\nvar OurUint8Array = global.Uint8Array || function () {};\n\nfunction _uint8ArrayToBuffer(chunk) {\n  return Buffer.from(chunk);\n}\n\nfunction _isUint8Array(obj) {\n  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n/*<replacement>*/\n\n\nvar debugUtil = __webpack_require__(45);\n\nvar debug;\n\nif (debugUtil && debugUtil.debuglog) {\n  debug = debugUtil.debuglog('stream');\n} else {\n  debug = function debug() {};\n}\n/*</replacement>*/\n\n\nvar BufferList = __webpack_require__(46);\n\nvar destroyImpl = __webpack_require__(22);\n\nvar _require = __webpack_require__(23),\n    getHighWaterMark = _require.getHighWaterMark;\n\nvar _require$codes = __webpack_require__(5).codes,\n    ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n    ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,\n    ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n    ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance.\n\n\nvar StringDecoder;\nvar createReadableStreamAsyncIterator;\nvar from;\n\n__webpack_require__(6)(Readable, Stream);\n\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n  // Sadly this is not cacheable as some libraries bundle their own\n  // event emitter implementation with them.\n  if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // This is a hack to make sure that our error handler is attached before any\n  // userland ones.  NEVER DO THIS. This is here only because this code needs\n  // to continue to work with older versions of Node.js that do not include\n  // the prependListener() method. The goal is to eventually remove this hack.\n\n  if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream, isDuplex) {\n  Duplex = Duplex || __webpack_require__(7);\n  options = options || {}; // Duplex streams are both readable and writable, but share\n  // the same options object.\n  // However, some cases require setting options to different\n  // values for the readable and the writable sides of the duplex stream.\n  // These options can be provided separately as readableXXX and writableXXX.\n\n  if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to\n  // make all the buffer merging and length checks go away\n\n  this.objectMode = !!options.objectMode;\n  if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer\n  // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n\n  this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); // A linked list is used to store data chunks instead of an array because the\n  // linked list can remove elements from the beginning faster than\n  // array.shift()\n\n  this.buffer = new BufferList();\n  this.length = 0;\n  this.pipes = null;\n  this.pipesCount = 0;\n  this.flowing = null;\n  this.ended = false;\n  this.endEmitted = false;\n  this.reading = false; // a flag to be able to tell if the event 'readable'/'data' is emitted\n  // immediately, or on a later tick.  We set this to true at first, because\n  // any actions that shouldn't happen until \"later\" should generally also\n  // not happen before the first read call.\n\n  this.sync = true; // whenever we return null, then we set a flag to say\n  // that we're awaiting a 'readable' event emission.\n\n  this.needReadable = false;\n  this.emittedReadable = false;\n  this.readableListening = false;\n  this.resumeScheduled = false;\n  this.paused = true; // Should close be emitted on destroy. Defaults to true.\n\n  this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish')\n\n  this.autoDestroy = !!options.autoDestroy; // has it been destroyed\n\n  this.destroyed = false; // Crypto is kind of old and crusty.  Historically, its default string\n  // encoding is 'binary' so we have to make this configurable.\n  // Everything else in the universe uses 'utf8', though.\n\n  this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s\n\n  this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled\n\n  this.readingMore = false;\n  this.decoder = null;\n  this.encoding = null;\n\n  if (options.encoding) {\n    if (!StringDecoder) StringDecoder = __webpack_require__(25).StringDecoder;\n    this.decoder = new StringDecoder(options.encoding);\n    this.encoding = options.encoding;\n  }\n}\n\nfunction Readable(options) {\n  Duplex = Duplex || __webpack_require__(7);\n  if (!(this instanceof Readable)) return new Readable(options); // Checking for a Stream.Duplex instance is faster here instead of inside\n  // the ReadableState constructor, at least with V8 6.5\n\n  var isDuplex = this instanceof Duplex;\n  this._readableState = new ReadableState(options, this, isDuplex); // legacy\n\n  this.readable = true;\n\n  if (options) {\n    if (typeof options.read === 'function') this._read = options.read;\n    if (typeof options.destroy === 'function') this._destroy = options.destroy;\n  }\n\n  Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function get() {\n    if (this._readableState === undefined) {\n      return false;\n    }\n\n    return this._readableState.destroyed;\n  },\n  set: function set(value) {\n    // we ignore the value if the stream\n    // has not been initialized yet\n    if (!this._readableState) {\n      return;\n    } // backward compatibility, the user is explicitly\n    // managing destroyed\n\n\n    this._readableState.destroyed = value;\n  }\n});\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\n\nReadable.prototype._destroy = function (err, cb) {\n  cb(err);\n}; // Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\n\n\nReadable.prototype.push = function (chunk, encoding) {\n  var state = this._readableState;\n  var skipChunkCheck;\n\n  if (!state.objectMode) {\n    if (typeof chunk === 'string') {\n      encoding = encoding || state.defaultEncoding;\n\n      if (encoding !== state.encoding) {\n        chunk = Buffer.from(chunk, encoding);\n        encoding = '';\n      }\n\n      skipChunkCheck = true;\n    }\n  } else {\n    skipChunkCheck = true;\n  }\n\n  return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n}; // Unshift should *always* be something directly out of read()\n\n\nReadable.prototype.unshift = function (chunk) {\n  return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n  debug('readableAddChunk', chunk);\n  var state = stream._readableState;\n\n  if (chunk === null) {\n    state.reading = false;\n    onEofChunk(stream, state);\n  } else {\n    var er;\n    if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n\n    if (er) {\n      errorOrDestroy(stream, er);\n    } else if (state.objectMode || chunk && chunk.length > 0) {\n      if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n        chunk = _uint8ArrayToBuffer(chunk);\n      }\n\n      if (addToFront) {\n        if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);\n      } else if (state.ended) {\n        errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());\n      } else if (state.destroyed) {\n        return false;\n      } else {\n        state.reading = false;\n\n        if (state.decoder && !encoding) {\n          chunk = state.decoder.write(chunk);\n          if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n        } else {\n          addChunk(stream, state, chunk, false);\n        }\n      }\n    } else if (!addToFront) {\n      state.reading = false;\n      maybeReadMore(stream, state);\n    }\n  } // We can push more data if we are below the highWaterMark.\n  // Also, if we have no data yet, we can stand some more bytes.\n  // This is to work around cases where hwm=0, such as the repl.\n\n\n  return !state.ended && (state.length < state.highWaterMark || state.length === 0);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n  if (state.flowing && state.length === 0 && !state.sync) {\n    state.awaitDrain = 0;\n    stream.emit('data', chunk);\n  } else {\n    // update the buffer info.\n    state.length += state.objectMode ? 1 : chunk.length;\n    if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n    if (state.needReadable) emitReadable(stream);\n  }\n\n  maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n  var er;\n\n  if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n    er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);\n  }\n\n  return er;\n}\n\nReadable.prototype.isPaused = function () {\n  return this._readableState.flowing === false;\n}; // backwards compatibility.\n\n\nReadable.prototype.setEncoding = function (enc) {\n  if (!StringDecoder) StringDecoder = __webpack_require__(25).StringDecoder;\n  var decoder = new StringDecoder(enc);\n  this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8\n\n  this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers:\n\n  var p = this._readableState.buffer.head;\n  var content = '';\n\n  while (p !== null) {\n    content += decoder.write(p.data);\n    p = p.next;\n  }\n\n  this._readableState.buffer.clear();\n\n  if (content !== '') this._readableState.buffer.push(content);\n  this._readableState.length = content.length;\n  return this;\n}; // Don't raise the hwm > 1GB\n\n\nvar MAX_HWM = 0x40000000;\n\nfunction computeNewHighWaterMark(n) {\n  if (n >= MAX_HWM) {\n    // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.\n    n = MAX_HWM;\n  } else {\n    // Get the next highest power of 2 to prevent increasing hwm excessively in\n    // tiny amounts\n    n--;\n    n |= n >>> 1;\n    n |= n >>> 2;\n    n |= n >>> 4;\n    n |= n >>> 8;\n    n |= n >>> 16;\n    n++;\n  }\n\n  return n;\n} // This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\n\nfunction howMuchToRead(n, state) {\n  if (n <= 0 || state.length === 0 && state.ended) return 0;\n  if (state.objectMode) return 1;\n\n  if (n !== n) {\n    // Only flow one buffer at a time\n    if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n  } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n  if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n  if (n <= state.length) return n; // Don't have enough\n\n  if (!state.ended) {\n    state.needReadable = true;\n    return 0;\n  }\n\n  return state.length;\n} // you can override either this method, or the async _read(n) below.\n\n\nReadable.prototype.read = function (n) {\n  debug('read', n);\n  n = parseInt(n, 10);\n  var state = this._readableState;\n  var nOrig = n;\n  if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we\n  // already have a bunch of data in the buffer, then just trigger\n  // the 'readable' event and move on.\n\n  if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {\n    debug('read: emitReadable', state.length, state.ended);\n    if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n    return null;\n  }\n\n  n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up.\n\n  if (n === 0 && state.ended) {\n    if (state.length === 0) endReadable(this);\n    return null;\n  } // All the actual chunk generation logic needs to be\n  // *below* the call to _read.  The reason is that in certain\n  // synthetic stream cases, such as passthrough streams, _read\n  // may be a completely synchronous operation which may change\n  // the state of the read buffer, providing enough data when\n  // before there was *not* enough.\n  //\n  // So, the steps are:\n  // 1. Figure out what the state of things will be after we do\n  // a read from the buffer.\n  //\n  // 2. If that resulting state will trigger a _read, then call _read.\n  // Note that this may be asynchronous, or synchronous.  Yes, it is\n  // deeply ugly to write APIs this way, but that still doesn't mean\n  // that the Readable class should behave improperly, as streams are\n  // designed to be sync/async agnostic.\n  // Take note if the _read call is sync or async (ie, if the read call\n  // has returned yet), so that we know whether or not it's safe to emit\n  // 'readable' etc.\n  //\n  // 3. Actually pull the requested chunks out of the buffer and return.\n  // if we need a readable event, then we need to do some reading.\n\n\n  var doRead = state.needReadable;\n  debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some\n\n  if (state.length === 0 || state.length - n < state.highWaterMark) {\n    doRead = true;\n    debug('length less than watermark', doRead);\n  } // however, if we've ended, then there's no point, and if we're already\n  // reading, then it's unnecessary.\n\n\n  if (state.ended || state.reading) {\n    doRead = false;\n    debug('reading or ended', doRead);\n  } else if (doRead) {\n    debug('do read');\n    state.reading = true;\n    state.sync = true; // if the length is currently zero, then we *need* a readable event.\n\n    if (state.length === 0) state.needReadable = true; // call internal read method\n\n    this._read(state.highWaterMark);\n\n    state.sync = false; // If _read pushed data synchronously, then `reading` will be false,\n    // and we need to re-evaluate how much data we can return to the user.\n\n    if (!state.reading) n = howMuchToRead(nOrig, state);\n  }\n\n  var ret;\n  if (n > 0) ret = fromList(n, state);else ret = null;\n\n  if (ret === null) {\n    state.needReadable = state.length <= state.highWaterMark;\n    n = 0;\n  } else {\n    state.length -= n;\n    state.awaitDrain = 0;\n  }\n\n  if (state.length === 0) {\n    // If we have nothing in the buffer, then we want to know\n    // as soon as we *do* get something into the buffer.\n    if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick.\n\n    if (nOrig !== n && state.ended) endReadable(this);\n  }\n\n  if (ret !== null) this.emit('data', ret);\n  return ret;\n};\n\nfunction onEofChunk(stream, state) {\n  debug('onEofChunk');\n  if (state.ended) return;\n\n  if (state.decoder) {\n    var chunk = state.decoder.end();\n\n    if (chunk && chunk.length) {\n      state.buffer.push(chunk);\n      state.length += state.objectMode ? 1 : chunk.length;\n    }\n  }\n\n  state.ended = true;\n\n  if (state.sync) {\n    // if we are sync, wait until next tick to emit the data.\n    // Otherwise we risk emitting data in the flow()\n    // the readable code triggers during a read() call\n    emitReadable(stream);\n  } else {\n    // emit 'readable' now to make sure it gets picked up.\n    state.needReadable = false;\n\n    if (!state.emittedReadable) {\n      state.emittedReadable = true;\n      emitReadable_(stream);\n    }\n  }\n} // Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow.  This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\n\n\nfunction emitReadable(stream) {\n  var state = stream._readableState;\n  debug('emitReadable', state.needReadable, state.emittedReadable);\n  state.needReadable = false;\n\n  if (!state.emittedReadable) {\n    debug('emitReadable', state.flowing);\n    state.emittedReadable = true;\n    process.nextTick(emitReadable_, stream);\n  }\n}\n\nfunction emitReadable_(stream) {\n  var state = stream._readableState;\n  debug('emitReadable_', state.destroyed, state.length, state.ended);\n\n  if (!state.destroyed && (state.length || state.ended)) {\n    stream.emit('readable');\n    state.emittedReadable = false;\n  } // The stream needs another readable event if\n  // 1. It is not flowing, as the flow mechanism will take\n  //    care of it.\n  // 2. It is not ended.\n  // 3. It is below the highWaterMark, so we can schedule\n  //    another readable later.\n\n\n  state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;\n  flow(stream);\n} // at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data.  that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\n\n\nfunction maybeReadMore(stream, state) {\n  if (!state.readingMore) {\n    state.readingMore = true;\n    process.nextTick(maybeReadMore_, stream, state);\n  }\n}\n\nfunction maybeReadMore_(stream, state) {\n  // Attempt to read more data if we should.\n  //\n  // The conditions for reading more data are (one of):\n  // - Not enough data buffered (state.length < state.highWaterMark). The loop\n  //   is responsible for filling the buffer with enough data if such data\n  //   is available. If highWaterMark is 0 and we are not in the flowing mode\n  //   we should _not_ attempt to buffer any extra data. We'll get more data\n  //   when the stream consumer calls read() instead.\n  // - No data in the buffer, and the stream is in flowing mode. In this mode\n  //   the loop below is responsible for ensuring read() is called. Failing to\n  //   call read here would abort the flow and there's no other mechanism for\n  //   continuing the flow if the stream consumer has just subscribed to the\n  //   'data' event.\n  //\n  // In addition to the above conditions to keep reading data, the following\n  // conditions prevent the data from being read:\n  // - The stream has ended (state.ended).\n  // - There is already a pending 'read' operation (state.reading). This is a\n  //   case where the the stream has called the implementation defined _read()\n  //   method, but they are processing the call asynchronously and have _not_\n  //   called push() with new data. In this case we skip performing more\n  //   read()s. The execution ends in this method again after the _read() ends\n  //   up calling push() with more data.\n  while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {\n    var len = state.length;\n    debug('maybeReadMore read 0');\n    stream.read(0);\n    if (len === state.length) // didn't get any data, stop spinning.\n      break;\n  }\n\n  state.readingMore = false;\n} // abstract method.  to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\n\n\nReadable.prototype._read = function (n) {\n  errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n  var src = this;\n  var state = this._readableState;\n\n  switch (state.pipesCount) {\n    case 0:\n      state.pipes = dest;\n      break;\n\n    case 1:\n      state.pipes = [state.pipes, dest];\n      break;\n\n    default:\n      state.pipes.push(dest);\n      break;\n  }\n\n  state.pipesCount += 1;\n  debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n  var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n  var endFn = doEnd ? onend : unpipe;\n  if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn);\n  dest.on('unpipe', onunpipe);\n\n  function onunpipe(readable, unpipeInfo) {\n    debug('onunpipe');\n\n    if (readable === src) {\n      if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n        unpipeInfo.hasUnpiped = true;\n        cleanup();\n      }\n    }\n  }\n\n  function onend() {\n    debug('onend');\n    dest.end();\n  } // when the dest drains, it reduces the awaitDrain counter\n  // on the source.  This would be more elegant with a .once()\n  // handler in flow(), but adding and removing repeatedly is\n  // too slow.\n\n\n  var ondrain = pipeOnDrain(src);\n  dest.on('drain', ondrain);\n  var cleanedUp = false;\n\n  function cleanup() {\n    debug('cleanup'); // cleanup event handlers once the pipe is broken\n\n    dest.removeListener('close', onclose);\n    dest.removeListener('finish', onfinish);\n    dest.removeListener('drain', ondrain);\n    dest.removeListener('error', onerror);\n    dest.removeListener('unpipe', onunpipe);\n    src.removeListener('end', onend);\n    src.removeListener('end', unpipe);\n    src.removeListener('data', ondata);\n    cleanedUp = true; // if the reader is waiting for a drain event from this\n    // specific writer, then it would cause it to never start\n    // flowing again.\n    // So, if this is awaiting a drain, then we just call it now.\n    // If we don't know, then assume that we are waiting for one.\n\n    if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n  }\n\n  src.on('data', ondata);\n\n  function ondata(chunk) {\n    debug('ondata');\n    var ret = dest.write(chunk);\n    debug('dest.write', ret);\n\n    if (ret === false) {\n      // If the user unpiped during `dest.write()`, it is possible\n      // to get stuck in a permanently paused state if that write\n      // also returned false.\n      // => Check whether `dest` is still a piping destination.\n      if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n        debug('false write response, pause', state.awaitDrain);\n        state.awaitDrain++;\n      }\n\n      src.pause();\n    }\n  } // if the dest has an error, then stop piping into it.\n  // however, don't suppress the throwing behavior for this.\n\n\n  function onerror(er) {\n    debug('onerror', er);\n    unpipe();\n    dest.removeListener('error', onerror);\n    if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);\n  } // Make sure our error handler is attached before userland ones.\n\n\n  prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once.\n\n  function onclose() {\n    dest.removeListener('finish', onfinish);\n    unpipe();\n  }\n\n  dest.once('close', onclose);\n\n  function onfinish() {\n    debug('onfinish');\n    dest.removeListener('close', onclose);\n    unpipe();\n  }\n\n  dest.once('finish', onfinish);\n\n  function unpipe() {\n    debug('unpipe');\n    src.unpipe(dest);\n  } // tell the dest that it's being piped to\n\n\n  dest.emit('pipe', src); // start the flow if it hasn't been started already.\n\n  if (!state.flowing) {\n    debug('pipe resume');\n    src.resume();\n  }\n\n  return dest;\n};\n\nfunction pipeOnDrain(src) {\n  return function pipeOnDrainFunctionResult() {\n    var state = src._readableState;\n    debug('pipeOnDrain', state.awaitDrain);\n    if (state.awaitDrain) state.awaitDrain--;\n\n    if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n      state.flowing = true;\n      flow(src);\n    }\n  };\n}\n\nReadable.prototype.unpipe = function (dest) {\n  var state = this._readableState;\n  var unpipeInfo = {\n    hasUnpiped: false\n  }; // if we're not piping anywhere, then do nothing.\n\n  if (state.pipesCount === 0) return this; // just one destination.  most common case.\n\n  if (state.pipesCount === 1) {\n    // passed in one, but it's not the right one.\n    if (dest && dest !== state.pipes) return this;\n    if (!dest) dest = state.pipes; // got a match.\n\n    state.pipes = null;\n    state.pipesCount = 0;\n    state.flowing = false;\n    if (dest) dest.emit('unpipe', this, unpipeInfo);\n    return this;\n  } // slow case. multiple pipe destinations.\n\n\n  if (!dest) {\n    // remove all.\n    var dests = state.pipes;\n    var len = state.pipesCount;\n    state.pipes = null;\n    state.pipesCount = 0;\n    state.flowing = false;\n\n    for (var i = 0; i < len; i++) {\n      dests[i].emit('unpipe', this, {\n        hasUnpiped: false\n      });\n    }\n\n    return this;\n  } // try to find the right one.\n\n\n  var index = indexOf(state.pipes, dest);\n  if (index === -1) return this;\n  state.pipes.splice(index, 1);\n  state.pipesCount -= 1;\n  if (state.pipesCount === 1) state.pipes = state.pipes[0];\n  dest.emit('unpipe', this, unpipeInfo);\n  return this;\n}; // set up data events if they are asked for\n// Ensure readable listeners eventually get something\n\n\nReadable.prototype.on = function (ev, fn) {\n  var res = Stream.prototype.on.call(this, ev, fn);\n  var state = this._readableState;\n\n  if (ev === 'data') {\n    // update readableListening so that resume() may be a no-op\n    // a few lines down. This is needed to support once('readable').\n    state.readableListening = this.listenerCount('readable') > 0; // Try start flowing on next tick if stream isn't explicitly paused\n\n    if (state.flowing !== false) this.resume();\n  } else if (ev === 'readable') {\n    if (!state.endEmitted && !state.readableListening) {\n      state.readableListening = state.needReadable = true;\n      state.flowing = false;\n      state.emittedReadable = false;\n      debug('on readable', state.length, state.reading);\n\n      if (state.length) {\n        emitReadable(this);\n      } else if (!state.reading) {\n        process.nextTick(nReadingNextTick, this);\n      }\n    }\n  }\n\n  return res;\n};\n\nReadable.prototype.addListener = Readable.prototype.on;\n\nReadable.prototype.removeListener = function (ev, fn) {\n  var res = Stream.prototype.removeListener.call(this, ev, fn);\n\n  if (ev === 'readable') {\n    // We need to check if there is someone still listening to\n    // readable and reset the state. However this needs to happen\n    // after readable has been emitted but before I/O (nextTick) to\n    // support once('readable', fn) cycles. This means that calling\n    // resume within the same tick will have no\n    // effect.\n    process.nextTick(updateReadableListening, this);\n  }\n\n  return res;\n};\n\nReadable.prototype.removeAllListeners = function (ev) {\n  var res = Stream.prototype.removeAllListeners.apply(this, arguments);\n\n  if (ev === 'readable' || ev === undefined) {\n    // We need to check if there is someone still listening to\n    // readable and reset the state. However this needs to happen\n    // after readable has been emitted but before I/O (nextTick) to\n    // support once('readable', fn) cycles. This means that calling\n    // resume within the same tick will have no\n    // effect.\n    process.nextTick(updateReadableListening, this);\n  }\n\n  return res;\n};\n\nfunction updateReadableListening(self) {\n  var state = self._readableState;\n  state.readableListening = self.listenerCount('readable') > 0;\n\n  if (state.resumeScheduled && !state.paused) {\n    // flowing needs to be set to true now, otherwise\n    // the upcoming resume will not flow.\n    state.flowing = true; // crude way to check if we should resume\n  } else if (self.listenerCount('data') > 0) {\n    self.resume();\n  }\n}\n\nfunction nReadingNextTick(self) {\n  debug('readable nexttick read 0');\n  self.read(0);\n} // pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\n\n\nReadable.prototype.resume = function () {\n  var state = this._readableState;\n\n  if (!state.flowing) {\n    debug('resume'); // we flow only if there is no one listening\n    // for readable, but we still have to call\n    // resume()\n\n    state.flowing = !state.readableListening;\n    resume(this, state);\n  }\n\n  state.paused = false;\n  return this;\n};\n\nfunction resume(stream, state) {\n  if (!state.resumeScheduled) {\n    state.resumeScheduled = true;\n    process.nextTick(resume_, stream, state);\n  }\n}\n\nfunction resume_(stream, state) {\n  debug('resume', state.reading);\n\n  if (!state.reading) {\n    stream.read(0);\n  }\n\n  state.resumeScheduled = false;\n  stream.emit('resume');\n  flow(stream);\n  if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n  debug('call pause flowing=%j', this._readableState.flowing);\n\n  if (this._readableState.flowing !== false) {\n    debug('pause');\n    this._readableState.flowing = false;\n    this.emit('pause');\n  }\n\n  this._readableState.paused = true;\n  return this;\n};\n\nfunction flow(stream) {\n  var state = stream._readableState;\n  debug('flow', state.flowing);\n\n  while (state.flowing && stream.read() !== null) {\n    ;\n  }\n} // wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\n\n\nReadable.prototype.wrap = function (stream) {\n  var _this = this;\n\n  var state = this._readableState;\n  var paused = false;\n  stream.on('end', function () {\n    debug('wrapped end');\n\n    if (state.decoder && !state.ended) {\n      var chunk = state.decoder.end();\n      if (chunk && chunk.length) _this.push(chunk);\n    }\n\n    _this.push(null);\n  });\n  stream.on('data', function (chunk) {\n    debug('wrapped data');\n    if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode\n\n    if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n    var ret = _this.push(chunk);\n\n    if (!ret) {\n      paused = true;\n      stream.pause();\n    }\n  }); // proxy all the other methods.\n  // important when wrapping filters and duplexes.\n\n  for (var i in stream) {\n    if (this[i] === undefined && typeof stream[i] === 'function') {\n      this[i] = function methodWrap(method) {\n        return function methodWrapReturnFunction() {\n          return stream[method].apply(stream, arguments);\n        };\n      }(i);\n    }\n  } // proxy certain important events.\n\n\n  for (var n = 0; n < kProxyEvents.length; n++) {\n    stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n  } // when we try to consume some more bytes, simply unpause the\n  // underlying stream.\n\n\n  this._read = function (n) {\n    debug('wrapped _read', n);\n\n    if (paused) {\n      paused = false;\n      stream.resume();\n    }\n  };\n\n  return this;\n};\n\nif (typeof Symbol === 'function') {\n  Readable.prototype[Symbol.asyncIterator] = function () {\n    if (createReadableStreamAsyncIterator === undefined) {\n      createReadableStreamAsyncIterator = __webpack_require__(50);\n    }\n\n    return createReadableStreamAsyncIterator(this);\n  };\n}\n\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function get() {\n    return this._readableState.highWaterMark;\n  }\n});\nObject.defineProperty(Readable.prototype, 'readableBuffer', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function get() {\n    return this._readableState && this._readableState.buffer;\n  }\n});\nObject.defineProperty(Readable.prototype, 'readableFlowing', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function get() {\n    return this._readableState.flowing;\n  },\n  set: function set(state) {\n    if (this._readableState) {\n      this._readableState.flowing = state;\n    }\n  }\n}); // exposed for testing purposes only.\n\nReadable._fromList = fromList;\nObject.defineProperty(Readable.prototype, 'readableLength', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function get() {\n    return this._readableState.length;\n  }\n}); // Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\nfunction fromList(n, state) {\n  // nothing buffered\n  if (state.length === 0) return null;\n  var ret;\n  if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n    // read it all, truncate the list\n    if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length);\n    state.buffer.clear();\n  } else {\n    // read part of list\n    ret = state.buffer.consume(n, state.decoder);\n  }\n  return ret;\n}\n\nfunction endReadable(stream) {\n  var state = stream._readableState;\n  debug('endReadable', state.endEmitted);\n\n  if (!state.endEmitted) {\n    state.ended = true;\n    process.nextTick(endReadableNT, state, stream);\n  }\n}\n\nfunction endReadableNT(state, stream) {\n  debug('endReadableNT', state.endEmitted, state.length); // Check that we didn't get one last unshift.\n\n  if (!state.endEmitted && state.length === 0) {\n    state.endEmitted = true;\n    stream.readable = false;\n    stream.emit('end');\n\n    if (state.autoDestroy) {\n      // In case of duplex streams we need a way to detect\n      // if the writable side is ready for autoDestroy as well\n      var wState = stream._writableState;\n\n      if (!wState || wState.autoDestroy && wState.finished) {\n        stream.destroy();\n      }\n    }\n  }\n}\n\nif (typeof Symbol === 'function') {\n  Readable.from = function (iterable, opts) {\n    if (from === undefined) {\n      from = __webpack_require__(51);\n    }\n\n    return from(Readable, iterable, opts);\n  };\n}\n\nfunction indexOf(xs, x) {\n  for (var i = 0, l = xs.length; i < l; i++) {\n    if (xs[i] === x) return i;\n  }\n\n  return -1;\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(11), __webpack_require__(2)))\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\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\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n  ? R.apply\n  : function ReflectApply(target, receiver, args) {\n    return Function.prototype.apply.call(target, receiver, args);\n  }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n  ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n  ReflectOwnKeys = function ReflectOwnKeys(target) {\n    return Object.getOwnPropertyNames(target)\n      .concat(Object.getOwnPropertySymbols(target));\n  };\n} else {\n  ReflectOwnKeys = function ReflectOwnKeys(target) {\n    return Object.getOwnPropertyNames(target);\n  };\n}\n\nfunction ProcessEmitWarning(warning) {\n  if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n  return value !== value;\n}\n\nfunction EventEmitter() {\n  EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n  if (typeof listener !== 'function') {\n    throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n  }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n  enumerable: true,\n  get: function() {\n    return defaultMaxListeners;\n  },\n  set: function(arg) {\n    if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n      throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n    }\n    defaultMaxListeners = arg;\n  }\n});\n\nEventEmitter.init = function() {\n\n  if (this._events === undefined ||\n      this._events === Object.getPrototypeOf(this)._events) {\n    this._events = Object.create(null);\n    this._eventsCount = 0;\n  }\n\n  this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n  if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n    throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n  }\n  this._maxListeners = n;\n  return this;\n};\n\nfunction _getMaxListeners(that) {\n  if (that._maxListeners === undefined)\n    return EventEmitter.defaultMaxListeners;\n  return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n  return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n  var args = [];\n  for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n  var doError = (type === 'error');\n\n  var events = this._events;\n  if (events !== undefined)\n    doError = (doError && events.error === undefined);\n  else if (!doError)\n    return false;\n\n  // If there is no 'error' event listener then throw.\n  if (doError) {\n    var er;\n    if (args.length > 0)\n      er = args[0];\n    if (er instanceof Error) {\n      // Note: The comments on the `throw` lines are intentional, they show\n      // up in Node's output if this results in an unhandled exception.\n      throw er; // Unhandled 'error' event\n    }\n    // At least give some kind of context to the user\n    var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n    err.context = er;\n    throw err; // Unhandled 'error' event\n  }\n\n  var handler = events[type];\n\n  if (handler === undefined)\n    return false;\n\n  if (typeof handler === 'function') {\n    ReflectApply(handler, this, args);\n  } else {\n    var len = handler.length;\n    var listeners = arrayClone(handler, len);\n    for (var i = 0; i < len; ++i)\n      ReflectApply(listeners[i], this, args);\n  }\n\n  return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n  var m;\n  var events;\n  var existing;\n\n  checkListener(listener);\n\n  events = target._events;\n  if (events === undefined) {\n    events = target._events = Object.create(null);\n    target._eventsCount = 0;\n  } else {\n    // To avoid recursion in the case that type === \"newListener\"! Before\n    // adding it to the listeners, first emit \"newListener\".\n    if (events.newListener !== undefined) {\n      target.emit('newListener', type,\n                  listener.listener ? listener.listener : listener);\n\n      // Re-assign `events` because a newListener handler could have caused the\n      // this._events to be assigned to a new object\n      events = target._events;\n    }\n    existing = events[type];\n  }\n\n  if (existing === undefined) {\n    // Optimize the case of one listener. Don't need the extra array object.\n    existing = events[type] = listener;\n    ++target._eventsCount;\n  } else {\n    if (typeof existing === 'function') {\n      // Adding the second element, need to change to array.\n      existing = events[type] =\n        prepend ? [listener, existing] : [existing, listener];\n      // If we've already got an array, just append.\n    } else if (prepend) {\n      existing.unshift(listener);\n    } else {\n      existing.push(listener);\n    }\n\n    // Check for listener leak\n    m = _getMaxListeners(target);\n    if (m > 0 && existing.length > m && !existing.warned) {\n      existing.warned = true;\n      // No error code for this since it is a Warning\n      // eslint-disable-next-line no-restricted-syntax\n      var w = new Error('Possible EventEmitter memory leak detected. ' +\n                          existing.length + ' ' + String(type) + ' listeners ' +\n                          'added. Use emitter.setMaxListeners() to ' +\n                          'increase limit');\n      w.name = 'MaxListenersExceededWarning';\n      w.emitter = target;\n      w.type = type;\n      w.count = existing.length;\n      ProcessEmitWarning(w);\n    }\n  }\n\n  return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n  return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n    function prependListener(type, listener) {\n      return _addListener(this, type, listener, true);\n    };\n\nfunction onceWrapper() {\n  if (!this.fired) {\n    this.target.removeListener(this.type, this.wrapFn);\n    this.fired = true;\n    if (arguments.length === 0)\n      return this.listener.call(this.target);\n    return this.listener.apply(this.target, arguments);\n  }\n}\n\nfunction _onceWrap(target, type, listener) {\n  var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n  var wrapped = onceWrapper.bind(state);\n  wrapped.listener = listener;\n  state.wrapFn = wrapped;\n  return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n  checkListener(listener);\n  this.on(type, _onceWrap(this, type, listener));\n  return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n    function prependOnceListener(type, listener) {\n      checkListener(listener);\n      this.prependListener(type, _onceWrap(this, type, listener));\n      return this;\n    };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n    function removeListener(type, listener) {\n      var list, events, position, i, originalListener;\n\n      checkListener(listener);\n\n      events = this._events;\n      if (events === undefined)\n        return this;\n\n      list = events[type];\n      if (list === undefined)\n        return this;\n\n      if (list === listener || list.listener === listener) {\n        if (--this._eventsCount === 0)\n          this._events = Object.create(null);\n        else {\n          delete events[type];\n          if (events.removeListener)\n            this.emit('removeListener', type, list.listener || listener);\n        }\n      } else if (typeof list !== 'function') {\n        position = -1;\n\n        for (i = list.length - 1; i >= 0; i--) {\n          if (list[i] === listener || list[i].listener === listener) {\n            originalListener = list[i].listener;\n            position = i;\n            break;\n          }\n        }\n\n        if (position < 0)\n          return this;\n\n        if (position === 0)\n          list.shift();\n        else {\n          spliceOne(list, position);\n        }\n\n        if (list.length === 1)\n          events[type] = list[0];\n\n        if (events.removeListener !== undefined)\n          this.emit('removeListener', type, originalListener || listener);\n      }\n\n      return this;\n    };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n    function removeAllListeners(type) {\n      var listeners, events, i;\n\n      events = this._events;\n      if (events === undefined)\n        return this;\n\n      // not listening for removeListener, no need to emit\n      if (events.removeListener === undefined) {\n        if (arguments.length === 0) {\n          this._events = Object.create(null);\n          this._eventsCount = 0;\n        } else if (events[type] !== undefined) {\n          if (--this._eventsCount === 0)\n            this._events = Object.create(null);\n          else\n            delete events[type];\n        }\n        return this;\n      }\n\n      // emit removeListener for all listeners on all events\n      if (arguments.length === 0) {\n        var keys = Object.keys(events);\n        var key;\n        for (i = 0; i < keys.length; ++i) {\n          key = keys[i];\n          if (key === 'removeListener') continue;\n          this.removeAllListeners(key);\n        }\n        this.removeAllListeners('removeListener');\n        this._events = Object.create(null);\n        this._eventsCount = 0;\n        return this;\n      }\n\n      listeners = events[type];\n\n      if (typeof listeners === 'function') {\n        this.removeListener(type, listeners);\n      } else if (listeners !== undefined) {\n        // LIFO order\n        for (i = listeners.length - 1; i >= 0; i--) {\n          this.removeListener(type, listeners[i]);\n        }\n      }\n\n      return this;\n    };\n\nfunction _listeners(target, type, unwrap) {\n  var events = target._events;\n\n  if (events === undefined)\n    return [];\n\n  var evlistener = events[type];\n  if (evlistener === undefined)\n    return [];\n\n  if (typeof evlistener === 'function')\n    return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n  return unwrap ?\n    unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n  return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n  return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n  if (typeof emitter.listenerCount === 'function') {\n    return emitter.listenerCount(type);\n  } else {\n    return listenerCount.call(emitter, type);\n  }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n  var events = this._events;\n\n  if (events !== undefined) {\n    var evlistener = events[type];\n\n    if (typeof evlistener === 'function') {\n      return 1;\n    } else if (evlistener !== undefined) {\n      return evlistener.length;\n    }\n  }\n\n  return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n  return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n  var copy = new Array(n);\n  for (var i = 0; i < n; ++i)\n    copy[i] = arr[i];\n  return copy;\n}\n\nfunction spliceOne(list, index) {\n  for (; index + 1 < list.length; index++)\n    list[index] = list[index + 1];\n  list.pop();\n}\n\nfunction unwrapListeners(arr) {\n  var ret = new Array(arr.length);\n  for (var i = 0; i < ret.length; ++i) {\n    ret[i] = arr[i].listener || arr[i];\n  }\n  return ret;\n}\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(20).EventEmitter;\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) { // undocumented cb() API, needed for core, not for public API\n\nfunction destroy(err, cb) {\n  var _this = this;\n\n  var readableDestroyed = this._readableState && this._readableState.destroyed;\n  var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n  if (readableDestroyed || writableDestroyed) {\n    if (cb) {\n      cb(err);\n    } else if (err) {\n      if (!this._writableState) {\n        process.nextTick(emitErrorNT, this, err);\n      } else if (!this._writableState.errorEmitted) {\n        this._writableState.errorEmitted = true;\n        process.nextTick(emitErrorNT, this, err);\n      }\n    }\n\n    return this;\n  } // we set destroyed to true before firing error callbacks in order\n  // to make it re-entrance safe in case destroy() is called within callbacks\n\n\n  if (this._readableState) {\n    this._readableState.destroyed = true;\n  } // if this is a duplex stream mark the writable part as destroyed as well\n\n\n  if (this._writableState) {\n    this._writableState.destroyed = true;\n  }\n\n  this._destroy(err || null, function (err) {\n    if (!cb && err) {\n      if (!_this._writableState) {\n        process.nextTick(emitErrorAndCloseNT, _this, err);\n      } else if (!_this._writableState.errorEmitted) {\n        _this._writableState.errorEmitted = true;\n        process.nextTick(emitErrorAndCloseNT, _this, err);\n      } else {\n        process.nextTick(emitCloseNT, _this);\n      }\n    } else if (cb) {\n      process.nextTick(emitCloseNT, _this);\n      cb(err);\n    } else {\n      process.nextTick(emitCloseNT, _this);\n    }\n  });\n\n  return this;\n}\n\nfunction emitErrorAndCloseNT(self, err) {\n  emitErrorNT(self, err);\n  emitCloseNT(self);\n}\n\nfunction emitCloseNT(self) {\n  if (self._writableState && !self._writableState.emitClose) return;\n  if (self._readableState && !self._readableState.emitClose) return;\n  self.emit('close');\n}\n\nfunction undestroy() {\n  if (this._readableState) {\n    this._readableState.destroyed = false;\n    this._readableState.reading = false;\n    this._readableState.ended = false;\n    this._readableState.endEmitted = false;\n  }\n\n  if (this._writableState) {\n    this._writableState.destroyed = false;\n    this._writableState.ended = false;\n    this._writableState.ending = false;\n    this._writableState.finalCalled = false;\n    this._writableState.prefinished = false;\n    this._writableState.finished = false;\n    this._writableState.errorEmitted = false;\n  }\n}\n\nfunction emitErrorNT(self, err) {\n  self.emit('error', err);\n}\n\nfunction errorOrDestroy(stream, err) {\n  // We have tests that rely on errors being emitted\n  // in the same tick, so changing this is semver major.\n  // For now when you opt-in to autoDestroy we allow\n  // the error to be emitted nextTick. In a future\n  // semver major update we should change the default to this.\n  var rState = stream._readableState;\n  var wState = stream._writableState;\n  if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);\n}\n\nmodule.exports = {\n  destroy: destroy,\n  undestroy: undestroy,\n  errorOrDestroy: errorOrDestroy\n};\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(2)))\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar ERR_INVALID_OPT_VALUE = __webpack_require__(5).codes.ERR_INVALID_OPT_VALUE;\n\nfunction highWaterMarkFrom(options, isDuplex, duplexKey) {\n  return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;\n}\n\nfunction getHighWaterMark(state, options, duplexKey, isDuplex) {\n  var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);\n\n  if (hwm != null) {\n    if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {\n      var name = isDuplex ? duplexKey : 'highWaterMark';\n      throw new ERR_INVALID_OPT_VALUE(name, hwm);\n    }\n\n    return Math.floor(hwm);\n  } // Default value\n\n\n  return state.objectMode ? 16 : 16 * 1024;\n}\n\nmodule.exports = {\n  getHighWaterMark: getHighWaterMark\n};\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global, process) {// 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// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n\n\nmodule.exports = Writable;\n/* <replacement> */\n\nfunction WriteReq(chunk, encoding, cb) {\n  this.chunk = chunk;\n  this.encoding = encoding;\n  this.callback = cb;\n  this.next = null;\n} // It seems a linked list but it is not\n// there will be only 2 of these for each stream\n\n\nfunction CorkedRequest(state) {\n  var _this = this;\n\n  this.next = null;\n  this.entry = null;\n\n  this.finish = function () {\n    onCorkedFinish(_this, state);\n  };\n}\n/* </replacement> */\n\n/*<replacement>*/\n\n\nvar Duplex;\n/*</replacement>*/\n\nWritable.WritableState = WritableState;\n/*<replacement>*/\n\nvar internalUtil = {\n  deprecate: __webpack_require__(48)\n};\n/*</replacement>*/\n\n/*<replacement>*/\n\nvar Stream = __webpack_require__(21);\n/*</replacement>*/\n\n\nvar Buffer = __webpack_require__(0).Buffer;\n\nvar OurUint8Array = global.Uint8Array || function () {};\n\nfunction _uint8ArrayToBuffer(chunk) {\n  return Buffer.from(chunk);\n}\n\nfunction _isUint8Array(obj) {\n  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n\nvar destroyImpl = __webpack_require__(22);\n\nvar _require = __webpack_require__(23),\n    getHighWaterMark = _require.getHighWaterMark;\n\nvar _require$codes = __webpack_require__(5).codes,\n    ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n    ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n    ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n    ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,\n    ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,\n    ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,\n    ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,\n    ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;\n\nvar errorOrDestroy = destroyImpl.errorOrDestroy;\n\n__webpack_require__(6)(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream, isDuplex) {\n  Duplex = Duplex || __webpack_require__(7);\n  options = options || {}; // Duplex streams are both readable and writable, but share\n  // the same options object.\n  // However, some cases require setting options to different\n  // values for the readable and the writable sides of the duplex stream,\n  // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.\n\n  if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream\n  // contains buffers or objects.\n\n  this.objectMode = !!options.objectMode;\n  if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false\n  // Note: 0 is a valid value, means that we always return false if\n  // the entire buffer is not flushed immediately on write()\n\n  this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // if _final has been called\n\n  this.finalCalled = false; // drain event flag.\n\n  this.needDrain = false; // at the start of calling end()\n\n  this.ending = false; // when end() has been called, and returned\n\n  this.ended = false; // when 'finish' is emitted\n\n  this.finished = false; // has it been destroyed\n\n  this.destroyed = false; // should we decode strings into buffers before passing to _write?\n  // this is here so that some node-core streams can optimize string\n  // handling at a lower level.\n\n  var noDecode = options.decodeStrings === false;\n  this.decodeStrings = !noDecode; // Crypto is kind of old and crusty.  Historically, its default string\n  // encoding is 'binary' so we have to make this configurable.\n  // Everything else in the universe uses 'utf8', though.\n\n  this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement\n  // of how much we're waiting to get pushed to some underlying\n  // socket or file.\n\n  this.length = 0; // a flag to see when we're in the middle of a write.\n\n  this.writing = false; // when true all writes will be buffered until .uncork() call\n\n  this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately,\n  // or on a later tick.  We set this to true at first, because any\n  // actions that shouldn't happen until \"later\" should generally also\n  // not happen before the first write call.\n\n  this.sync = true; // a flag to know if we're processing previously buffered items, which\n  // may call the _write() callback in the same tick, so that we don't\n  // end up in an overlapped onwrite situation.\n\n  this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb)\n\n  this.onwrite = function (er) {\n    onwrite(stream, er);\n  }; // the callback that the user supplies to write(chunk,encoding,cb)\n\n\n  this.writecb = null; // the amount that is being written when _write is called.\n\n  this.writelen = 0;\n  this.bufferedRequest = null;\n  this.lastBufferedRequest = null; // number of pending user-supplied write callbacks\n  // this must be 0 before 'finish' can be emitted\n\n  this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs\n  // This is relevant for synchronous Transform streams\n\n  this.prefinished = false; // True if the error was already emitted and should not be thrown again\n\n  this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true.\n\n  this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end')\n\n  this.autoDestroy = !!options.autoDestroy; // count buffered requests\n\n  this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always\n  // one allocated and free to use, and we maintain at most two\n\n  this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n  var current = this.bufferedRequest;\n  var out = [];\n\n  while (current) {\n    out.push(current);\n    current = current.next;\n  }\n\n  return out;\n};\n\n(function () {\n  try {\n    Object.defineProperty(WritableState.prototype, 'buffer', {\n      get: internalUtil.deprecate(function writableStateBufferGetter() {\n        return this.getBuffer();\n      }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n    });\n  } catch (_) {}\n})(); // Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\n\n\nvar realHasInstance;\n\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n  realHasInstance = Function.prototype[Symbol.hasInstance];\n  Object.defineProperty(Writable, Symbol.hasInstance, {\n    value: function value(object) {\n      if (realHasInstance.call(this, object)) return true;\n      if (this !== Writable) return false;\n      return object && object._writableState instanceof WritableState;\n    }\n  });\n} else {\n  realHasInstance = function realHasInstance(object) {\n    return object instanceof this;\n  };\n}\n\nfunction Writable(options) {\n  Duplex = Duplex || __webpack_require__(7); // Writable ctor is applied to Duplexes, too.\n  // `realHasInstance` is necessary because using plain `instanceof`\n  // would return false, as no `_writableState` property is attached.\n  // Trying to use the custom `instanceof` for Writable here will also break the\n  // Node.js LazyTransform implementation, which has a non-trivial getter for\n  // `_writableState` that would lead to infinite recursion.\n  // Checking for a Stream.Duplex instance is faster here instead of inside\n  // the WritableState constructor, at least with V8 6.5\n\n  var isDuplex = this instanceof Duplex;\n  if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);\n  this._writableState = new WritableState(options, this, isDuplex); // legacy.\n\n  this.writable = true;\n\n  if (options) {\n    if (typeof options.write === 'function') this._write = options.write;\n    if (typeof options.writev === 'function') this._writev = options.writev;\n    if (typeof options.destroy === 'function') this._destroy = options.destroy;\n    if (typeof options.final === 'function') this._final = options.final;\n  }\n\n  Stream.call(this);\n} // Otherwise people can pipe Writable streams, which is just wrong.\n\n\nWritable.prototype.pipe = function () {\n  errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());\n};\n\nfunction writeAfterEnd(stream, cb) {\n  var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb\n\n  errorOrDestroy(stream, er);\n  process.nextTick(cb, er);\n} // Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\n\n\nfunction validChunk(stream, state, chunk, cb) {\n  var er;\n\n  if (chunk === null) {\n    er = new ERR_STREAM_NULL_VALUES();\n  } else if (typeof chunk !== 'string' && !state.objectMode) {\n    er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);\n  }\n\n  if (er) {\n    errorOrDestroy(stream, er);\n    process.nextTick(cb, er);\n    return false;\n  }\n\n  return true;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n  var state = this._writableState;\n  var ret = false;\n\n  var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n  if (isBuf && !Buffer.isBuffer(chunk)) {\n    chunk = _uint8ArrayToBuffer(chunk);\n  }\n\n  if (typeof encoding === 'function') {\n    cb = encoding;\n    encoding = null;\n  }\n\n  if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n  if (typeof cb !== 'function') cb = nop;\n  if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n    state.pendingcb++;\n    ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n  }\n  return ret;\n};\n\nWritable.prototype.cork = function () {\n  this._writableState.corked++;\n};\n\nWritable.prototype.uncork = function () {\n  var state = this._writableState;\n\n  if (state.corked) {\n    state.corked--;\n    if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n  }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n  // node::ParseEncoding() requires lower case.\n  if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n  if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);\n  this._writableState.defaultEncoding = encoding;\n  return this;\n};\n\nObject.defineProperty(Writable.prototype, 'writableBuffer', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function get() {\n    return this._writableState && this._writableState.getBuffer();\n  }\n});\n\nfunction decodeChunk(state, chunk, encoding) {\n  if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n    chunk = Buffer.from(chunk, encoding);\n  }\n\n  return chunk;\n}\n\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function get() {\n    return this._writableState.highWaterMark;\n  }\n}); // if we're already writing something, then just put this\n// in the queue, and wait our turn.  Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\n\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n  if (!isBuf) {\n    var newChunk = decodeChunk(state, chunk, encoding);\n\n    if (chunk !== newChunk) {\n      isBuf = true;\n      encoding = 'buffer';\n      chunk = newChunk;\n    }\n  }\n\n  var len = state.objectMode ? 1 : chunk.length;\n  state.length += len;\n  var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false.\n\n  if (!ret) state.needDrain = true;\n\n  if (state.writing || state.corked) {\n    var last = state.lastBufferedRequest;\n    state.lastBufferedRequest = {\n      chunk: chunk,\n      encoding: encoding,\n      isBuf: isBuf,\n      callback: cb,\n      next: null\n    };\n\n    if (last) {\n      last.next = state.lastBufferedRequest;\n    } else {\n      state.bufferedRequest = state.lastBufferedRequest;\n    }\n\n    state.bufferedRequestCount += 1;\n  } else {\n    doWrite(stream, state, false, len, chunk, encoding, cb);\n  }\n\n  return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n  state.writelen = len;\n  state.writecb = cb;\n  state.writing = true;\n  state.sync = true;\n  if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n  state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n  --state.pendingcb;\n\n  if (sync) {\n    // defer the callback if we are being called synchronously\n    // to avoid piling up things on the stack\n    process.nextTick(cb, er); // this can emit finish, and it will always happen\n    // after error\n\n    process.nextTick(finishMaybe, stream, state);\n    stream._writableState.errorEmitted = true;\n    errorOrDestroy(stream, er);\n  } else {\n    // the caller expect this to happen before if\n    // it is async\n    cb(er);\n    stream._writableState.errorEmitted = true;\n    errorOrDestroy(stream, er); // this can emit finish, but finish must\n    // always follow error\n\n    finishMaybe(stream, state);\n  }\n}\n\nfunction onwriteStateUpdate(state) {\n  state.writing = false;\n  state.writecb = null;\n  state.length -= state.writelen;\n  state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n  var state = stream._writableState;\n  var sync = state.sync;\n  var cb = state.writecb;\n  if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();\n  onwriteStateUpdate(state);\n  if (er) onwriteError(stream, state, sync, er, cb);else {\n    // Check if we're actually ready to finish, but don't emit yet\n    var finished = needFinish(state) || stream.destroyed;\n\n    if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n      clearBuffer(stream, state);\n    }\n\n    if (sync) {\n      process.nextTick(afterWrite, stream, state, finished, cb);\n    } else {\n      afterWrite(stream, state, finished, cb);\n    }\n  }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n  if (!finished) onwriteDrain(stream, state);\n  state.pendingcb--;\n  cb();\n  finishMaybe(stream, state);\n} // Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\n\n\nfunction onwriteDrain(stream, state) {\n  if (state.length === 0 && state.needDrain) {\n    state.needDrain = false;\n    stream.emit('drain');\n  }\n} // if there's something in the buffer waiting, then process it\n\n\nfunction clearBuffer(stream, state) {\n  state.bufferProcessing = true;\n  var entry = state.bufferedRequest;\n\n  if (stream._writev && entry && entry.next) {\n    // Fast case, write everything using _writev()\n    var l = state.bufferedRequestCount;\n    var buffer = new Array(l);\n    var holder = state.corkedRequestsFree;\n    holder.entry = entry;\n    var count = 0;\n    var allBuffers = true;\n\n    while (entry) {\n      buffer[count] = entry;\n      if (!entry.isBuf) allBuffers = false;\n      entry = entry.next;\n      count += 1;\n    }\n\n    buffer.allBuffers = allBuffers;\n    doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time\n    // as the hot path ends with doWrite\n\n    state.pendingcb++;\n    state.lastBufferedRequest = null;\n\n    if (holder.next) {\n      state.corkedRequestsFree = holder.next;\n      holder.next = null;\n    } else {\n      state.corkedRequestsFree = new CorkedRequest(state);\n    }\n\n    state.bufferedRequestCount = 0;\n  } else {\n    // Slow case, write chunks one-by-one\n    while (entry) {\n      var chunk = entry.chunk;\n      var encoding = entry.encoding;\n      var cb = entry.callback;\n      var len = state.objectMode ? 1 : chunk.length;\n      doWrite(stream, state, false, len, chunk, encoding, cb);\n      entry = entry.next;\n      state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then\n      // it means that we need to wait until it does.\n      // also, that means that the chunk and cb are currently\n      // being processed, so move the buffer counter past them.\n\n      if (state.writing) {\n        break;\n      }\n    }\n\n    if (entry === null) state.lastBufferedRequest = null;\n  }\n\n  state.bufferedRequest = entry;\n  state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n  cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n  var state = this._writableState;\n\n  if (typeof chunk === 'function') {\n    cb = chunk;\n    chunk = null;\n    encoding = null;\n  } else if (typeof encoding === 'function') {\n    cb = encoding;\n    encoding = null;\n  }\n\n  if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks\n\n  if (state.corked) {\n    state.corked = 1;\n    this.uncork();\n  } // ignore unnecessary end() calls.\n\n\n  if (!state.ending) endWritable(this, state, cb);\n  return this;\n};\n\nObject.defineProperty(Writable.prototype, 'writableLength', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function get() {\n    return this._writableState.length;\n  }\n});\n\nfunction needFinish(state) {\n  return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\n\nfunction callFinal(stream, state) {\n  stream._final(function (err) {\n    state.pendingcb--;\n\n    if (err) {\n      errorOrDestroy(stream, err);\n    }\n\n    state.prefinished = true;\n    stream.emit('prefinish');\n    finishMaybe(stream, state);\n  });\n}\n\nfunction prefinish(stream, state) {\n  if (!state.prefinished && !state.finalCalled) {\n    if (typeof stream._final === 'function' && !state.destroyed) {\n      state.pendingcb++;\n      state.finalCalled = true;\n      process.nextTick(callFinal, stream, state);\n    } else {\n      state.prefinished = true;\n      stream.emit('prefinish');\n    }\n  }\n}\n\nfunction finishMaybe(stream, state) {\n  var need = needFinish(state);\n\n  if (need) {\n    prefinish(stream, state);\n\n    if (state.pendingcb === 0) {\n      state.finished = true;\n      stream.emit('finish');\n\n      if (state.autoDestroy) {\n        // In case of duplex streams we need a way to detect\n        // if the readable side is ready for autoDestroy as well\n        var rState = stream._readableState;\n\n        if (!rState || rState.autoDestroy && rState.endEmitted) {\n          stream.destroy();\n        }\n      }\n    }\n  }\n\n  return need;\n}\n\nfunction endWritable(stream, state, cb) {\n  state.ending = true;\n  finishMaybe(stream, state);\n\n  if (cb) {\n    if (state.finished) process.nextTick(cb);else stream.once('finish', cb);\n  }\n\n  state.ended = true;\n  stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n  var entry = corkReq.entry;\n  corkReq.entry = null;\n\n  while (entry) {\n    var cb = entry.callback;\n    state.pendingcb--;\n    cb(err);\n    entry = entry.next;\n  } // reuse the free corkReq.\n\n\n  state.corkedRequestsFree.next = corkReq;\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n  // making it explicit this property is not enumerable\n  // because otherwise some prototype manipulation in\n  // userland will fail\n  enumerable: false,\n  get: function get() {\n    if (this._writableState === undefined) {\n      return false;\n    }\n\n    return this._writableState.destroyed;\n  },\n  set: function set(value) {\n    // we ignore the value if the stream\n    // has not been initialized yet\n    if (!this._writableState) {\n      return;\n    } // backward compatibility, the user is explicitly\n    // managing destroyed\n\n\n    this._writableState.destroyed = value;\n  }\n});\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\n\nWritable.prototype._destroy = function (err, cb) {\n  cb(err);\n};\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(11), __webpack_require__(2)))\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\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\n\n/*<replacement>*/\n\nvar Buffer = __webpack_require__(49).Buffer;\n/*</replacement>*/\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n  encoding = '' + encoding;\n  switch (encoding && encoding.toLowerCase()) {\n    case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':\n      return true;\n    default:\n      return false;\n  }\n};\n\nfunction _normalizeEncoding(enc) {\n  if (!enc) return 'utf8';\n  var retried;\n  while (true) {\n    switch (enc) {\n      case 'utf8':\n      case 'utf-8':\n        return 'utf8';\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return 'utf16le';\n      case 'latin1':\n      case 'binary':\n        return 'latin1';\n      case 'base64':\n      case 'ascii':\n      case 'hex':\n        return enc;\n      default:\n        if (retried) return; // undefined\n        enc = ('' + enc).toLowerCase();\n        retried = true;\n    }\n  }\n};\n\n// Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\nfunction normalizeEncoding(enc) {\n  var nenc = _normalizeEncoding(enc);\n  if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n  return nenc || enc;\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\nexports.StringDecoder = StringDecoder;\nfunction StringDecoder(encoding) {\n  this.encoding = normalizeEncoding(encoding);\n  var nb;\n  switch (this.encoding) {\n    case 'utf16le':\n      this.text = utf16Text;\n      this.end = utf16End;\n      nb = 4;\n      break;\n    case 'utf8':\n      this.fillLast = utf8FillLast;\n      nb = 4;\n      break;\n    case 'base64':\n      this.text = base64Text;\n      this.end = base64End;\n      nb = 3;\n      break;\n    default:\n      this.write = simpleWrite;\n      this.end = simpleEnd;\n      return;\n  }\n  this.lastNeed = 0;\n  this.lastTotal = 0;\n  this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n  if (buf.length === 0) return '';\n  var r;\n  var i;\n  if (this.lastNeed) {\n    r = this.fillLast(buf);\n    if (r === undefined) return '';\n    i = this.lastNeed;\n    this.lastNeed = 0;\n  } else {\n    i = 0;\n  }\n  if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n  return r || '';\n};\n\nStringDecoder.prototype.end = utf8End;\n\n// Returns only complete characters in a Buffer\nStringDecoder.prototype.text = utf8Text;\n\n// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\nStringDecoder.prototype.fillLast = function (buf) {\n  if (this.lastNeed <= buf.length) {\n    buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n    return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n  }\n  buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n  this.lastNeed -= buf.length;\n};\n\n// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\nfunction utf8CheckByte(byte) {\n  if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;\n  return byte >> 6 === 0x02 ? -1 : -2;\n}\n\n// Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\nfunction utf8CheckIncomplete(self, buf, i) {\n  var j = buf.length - 1;\n  if (j < i) return 0;\n  var nb = utf8CheckByte(buf[j]);\n  if (nb >= 0) {\n    if (nb > 0) self.lastNeed = nb - 1;\n    return nb;\n  }\n  if (--j < i || nb === -2) return 0;\n  nb = utf8CheckByte(buf[j]);\n  if (nb >= 0) {\n    if (nb > 0) self.lastNeed = nb - 2;\n    return nb;\n  }\n  if (--j < i || nb === -2) return 0;\n  nb = utf8CheckByte(buf[j]);\n  if (nb >= 0) {\n    if (nb > 0) {\n      if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n    }\n    return nb;\n  }\n  return 0;\n}\n\n// Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\nfunction utf8CheckExtraBytes(self, buf, p) {\n  if ((buf[0] & 0xC0) !== 0x80) {\n    self.lastNeed = 0;\n    return '\\ufffd';\n  }\n  if (self.lastNeed > 1 && buf.length > 1) {\n    if ((buf[1] & 0xC0) !== 0x80) {\n      self.lastNeed = 1;\n      return '\\ufffd';\n    }\n    if (self.lastNeed > 2 && buf.length > 2) {\n      if ((buf[2] & 0xC0) !== 0x80) {\n        self.lastNeed = 2;\n        return '\\ufffd';\n      }\n    }\n  }\n}\n\n// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\nfunction utf8FillLast(buf) {\n  var p = this.lastTotal - this.lastNeed;\n  var r = utf8CheckExtraBytes(this, buf, p);\n  if (r !== undefined) return r;\n  if (this.lastNeed <= buf.length) {\n    buf.copy(this.lastChar, p, 0, this.lastNeed);\n    return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n  }\n  buf.copy(this.lastChar, p, 0, buf.length);\n  this.lastNeed -= buf.length;\n}\n\n// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\nfunction utf8Text(buf, i) {\n  var total = utf8CheckIncomplete(this, buf, i);\n  if (!this.lastNeed) return buf.toString('utf8', i);\n  this.lastTotal = total;\n  var end = buf.length - (total - this.lastNeed);\n  buf.copy(this.lastChar, 0, end);\n  return buf.toString('utf8', i, end);\n}\n\n// For UTF-8, a replacement character is added when ending on a partial\n// character.\nfunction utf8End(buf) {\n  var r = buf && buf.length ? this.write(buf) : '';\n  if (this.lastNeed) return r + '\\ufffd';\n  return r;\n}\n\n// UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\nfunction utf16Text(buf, i) {\n  if ((buf.length - i) % 2 === 0) {\n    var r = buf.toString('utf16le', i);\n    if (r) {\n      var c = r.charCodeAt(r.length - 1);\n      if (c >= 0xD800 && c <= 0xDBFF) {\n        this.lastNeed = 2;\n        this.lastTotal = 4;\n        this.lastChar[0] = buf[buf.length - 2];\n        this.lastChar[1] = buf[buf.length - 1];\n        return r.slice(0, -1);\n      }\n    }\n    return r;\n  }\n  this.lastNeed = 1;\n  this.lastTotal = 2;\n  this.lastChar[0] = buf[buf.length - 1];\n  return buf.toString('utf16le', i, buf.length - 1);\n}\n\n// For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\nfunction utf16End(buf) {\n  var r = buf && buf.length ? this.write(buf) : '';\n  if (this.lastNeed) {\n    var end = this.lastTotal - this.lastNeed;\n    return r + this.lastChar.toString('utf16le', 0, end);\n  }\n  return r;\n}\n\nfunction base64Text(buf, i) {\n  var n = (buf.length - i) % 3;\n  if (n === 0) return buf.toString('base64', i);\n  this.lastNeed = 3 - n;\n  this.lastTotal = 3;\n  if (n === 1) {\n    this.lastChar[0] = buf[buf.length - 1];\n  } else {\n    this.lastChar[0] = buf[buf.length - 2];\n    this.lastChar[1] = buf[buf.length - 1];\n  }\n  return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n  var r = buf && buf.length ? this.write(buf) : '';\n  if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n  return r;\n}\n\n// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\nfunction simpleWrite(buf) {\n  return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n  return buf && buf.length ? this.write(buf) : '';\n}\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\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// a transform stream is a readable/writable stream where you do\n// something with the data.  Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored.  (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation.  For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes.  When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up.  When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer.  When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks.  If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk.  However,\n// a pathological inflate type of transform can cause excessive buffering\n// here.  For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output.  In this case, you could write a very small\n// amount of input, and end up with a very large amount of output.  In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform.  A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\n\nmodule.exports = Transform;\n\nvar _require$codes = __webpack_require__(5).codes,\n    ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,\n    ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,\n    ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,\n    ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;\n\nvar Duplex = __webpack_require__(7);\n\n__webpack_require__(6)(Transform, Duplex);\n\nfunction afterTransform(er, data) {\n  var ts = this._transformState;\n  ts.transforming = false;\n  var cb = ts.writecb;\n\n  if (cb === null) {\n    return this.emit('error', new ERR_MULTIPLE_CALLBACK());\n  }\n\n  ts.writechunk = null;\n  ts.writecb = null;\n  if (data != null) // single equals check for both `null` and `undefined`\n    this.push(data);\n  cb(er);\n  var rs = this._readableState;\n  rs.reading = false;\n\n  if (rs.needReadable || rs.length < rs.highWaterMark) {\n    this._read(rs.highWaterMark);\n  }\n}\n\nfunction Transform(options) {\n  if (!(this instanceof Transform)) return new Transform(options);\n  Duplex.call(this, options);\n  this._transformState = {\n    afterTransform: afterTransform.bind(this),\n    needTransform: false,\n    transforming: false,\n    writecb: null,\n    writechunk: null,\n    writeencoding: null\n  }; // start out asking for a readable event once data is transformed.\n\n  this._readableState.needReadable = true; // we have implemented the _read method, and done the other things\n  // that Readable wants before the first _read call, so unset the\n  // sync guard flag.\n\n  this._readableState.sync = false;\n\n  if (options) {\n    if (typeof options.transform === 'function') this._transform = options.transform;\n    if (typeof options.flush === 'function') this._flush = options.flush;\n  } // When the writable side finishes, then flush out anything remaining.\n\n\n  this.on('prefinish', prefinish);\n}\n\nfunction prefinish() {\n  var _this = this;\n\n  if (typeof this._flush === 'function' && !this._readableState.destroyed) {\n    this._flush(function (er, data) {\n      done(_this, er, data);\n    });\n  } else {\n    done(this, null, null);\n  }\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n  this._transformState.needTransform = false;\n  return Duplex.prototype.push.call(this, chunk, encoding);\n}; // This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side.  You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk.  If you pass\n// an error, then that'll put the hurt on the whole operation.  If you\n// never call cb(), then you'll never get another chunk.\n\n\nTransform.prototype._transform = function (chunk, encoding, cb) {\n  cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n  var ts = this._transformState;\n  ts.writecb = cb;\n  ts.writechunk = chunk;\n  ts.writeencoding = encoding;\n\n  if (!ts.transforming) {\n    var rs = this._readableState;\n    if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n  }\n}; // Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\n\n\nTransform.prototype._read = function (n) {\n  var ts = this._transformState;\n\n  if (ts.writechunk !== null && !ts.transforming) {\n    ts.transforming = true;\n\n    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n  } else {\n    // mark that we need a transform, so that any data that comes in\n    // will get processed, now that we've asked for it.\n    ts.needTransform = true;\n  }\n};\n\nTransform.prototype._destroy = function (err, cb) {\n  Duplex.prototype._destroy.call(this, err, function (err2) {\n    cb(err2);\n  });\n};\n\nfunction done(stream, er, data) {\n  if (er) return stream.emit('error', er);\n  if (data != null) // single equals check for both `null` and `undefined`\n    stream.push(data); // TODO(BridgeAR): Write a test for these two error cases\n  // if there's nothing in the write buffer, then that means\n  // that nothing more will ever be provided\n\n  if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();\n  if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();\n  return stream.push(null);\n}\n\n/***/ }),\n/* 27 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return spawn; });\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);\n/* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(debug__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var observable_fns__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);\n/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);\n/* harmony import */ var _promise__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(34);\n/* harmony import */ var _symbols__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);\n/* harmony import */ var _types_master__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(10);\n/* harmony import */ var _invocation_proxy__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(17);\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};\n\n\n\n\n\n\n\nconst debugMessages = debug__WEBPACK_IMPORTED_MODULE_0___default()(\"threads:master:messages\");\nconst debugSpawn = debug__WEBPACK_IMPORTED_MODULE_0___default()(\"threads:master:spawn\");\nconst debugThreadUtils = debug__WEBPACK_IMPORTED_MODULE_0___default()(\"threads:master:thread-utils\");\nconst isInitMessage = (data) => data && data.type === \"init\";\nconst isUncaughtErrorMessage = (data) => data && data.type === \"uncaughtError\";\nconst initMessageTimeout = typeof process !== \"undefined\" && process.env.THREADS_WORKER_INIT_TIMEOUT\n    ? Number.parseInt(process.env.THREADS_WORKER_INIT_TIMEOUT, 10)\n    : 10000;\nfunction withTimeout(promise, timeoutInMs, errorMessage) {\n    return __awaiter(this, void 0, void 0, function* () {\n        let timeoutHandle;\n        const timeout = new Promise((resolve, reject) => {\n            timeoutHandle = setTimeout(() => reject(Error(errorMessage)), timeoutInMs);\n        });\n        const result = yield Promise.race([\n            promise,\n            timeout\n        ]);\n        clearTimeout(timeoutHandle);\n        return result;\n    });\n}\nfunction receiveInitMessage(worker) {\n    return new Promise((resolve, reject) => {\n        const messageHandler = ((event) => {\n            debugMessages(\"Message from worker before finishing initialization:\", event.data);\n            if (isInitMessage(event.data)) {\n                worker.removeEventListener(\"message\", messageHandler);\n                resolve(event.data);\n            }\n            else if (isUncaughtErrorMessage(event.data)) {\n                worker.removeEventListener(\"message\", messageHandler);\n                reject(Object(_common__WEBPACK_IMPORTED_MODULE_2__[/* deserialize */ \"a\"])(event.data.error));\n            }\n        });\n        worker.addEventListener(\"message\", messageHandler);\n    });\n}\nfunction createEventObservable(worker, workerTermination) {\n    return new observable_fns__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"](observer => {\n        const messageHandler = ((messageEvent) => {\n            const workerEvent = {\n                type: _types_master__WEBPACK_IMPORTED_MODULE_5__[/* WorkerEventType */ \"a\"].message,\n                data: messageEvent.data\n            };\n            observer.next(workerEvent);\n        });\n        const rejectionHandler = ((errorEvent) => {\n            debugThreadUtils(\"Unhandled promise rejection event in thread:\", errorEvent);\n            const workerEvent = {\n                type: _types_master__WEBPACK_IMPORTED_MODULE_5__[/* WorkerEventType */ \"a\"].internalError,\n                error: Error(errorEvent.reason)\n            };\n            observer.next(workerEvent);\n        });\n        worker.addEventListener(\"message\", messageHandler);\n        worker.addEventListener(\"unhandledrejection\", rejectionHandler);\n        workerTermination.then(() => {\n            const terminationEvent = {\n                type: _types_master__WEBPACK_IMPORTED_MODULE_5__[/* WorkerEventType */ \"a\"].termination\n            };\n            worker.removeEventListener(\"message\", messageHandler);\n            worker.removeEventListener(\"unhandledrejection\", rejectionHandler);\n            observer.next(terminationEvent);\n            observer.complete();\n        });\n    });\n}\nfunction createTerminator(worker) {\n    const [termination, resolver] = Object(_promise__WEBPACK_IMPORTED_MODULE_3__[/* createPromiseWithResolver */ \"a\"])();\n    const terminate = () => __awaiter(this, void 0, void 0, function* () {\n        debugThreadUtils(\"Terminating worker\");\n        // Newer versions of worker_threads workers return a promise\n        yield worker.terminate();\n        resolver();\n    });\n    return { terminate, termination };\n}\nfunction setPrivateThreadProps(raw, worker, workerEvents, terminate) {\n    const workerErrors = workerEvents\n        .filter(event => event.type === _types_master__WEBPACK_IMPORTED_MODULE_5__[/* WorkerEventType */ \"a\"].internalError)\n        .map(errorEvent => errorEvent.error);\n    // tslint:disable-next-line prefer-object-spread\n    return Object.assign(raw, {\n        [_symbols__WEBPACK_IMPORTED_MODULE_4__[/* $errors */ \"a\"]]: workerErrors,\n        [_symbols__WEBPACK_IMPORTED_MODULE_4__[/* $events */ \"b\"]]: workerEvents,\n        [_symbols__WEBPACK_IMPORTED_MODULE_4__[/* $terminate */ \"c\"]]: terminate,\n        [_symbols__WEBPACK_IMPORTED_MODULE_4__[/* $worker */ \"e\"]]: worker\n    });\n}\n/**\n * Spawn a new thread. Takes a fresh worker instance, wraps it in a thin\n * abstraction layer to provide the transparent API and verifies that\n * the worker has initialized successfully.\n *\n * @param worker Instance of `Worker`. Either a web worker, `worker_threads` worker or `tiny-worker` worker.\n * @param [options]\n * @param [options.timeout] Init message timeout. Default: 10000 or set by environment variable.\n */\nfunction spawn(worker, options) {\n    return __awaiter(this, void 0, void 0, function* () {\n        debugSpawn(\"Initializing new thread\");\n        const initMessage = yield withTimeout(receiveInitMessage(worker), options && options.timeout ? options.timeout : initMessageTimeout, `Timeout: Did not receive an init message from worker after ${initMessageTimeout}ms. Make sure the worker calls expose().`);\n        const exposed = initMessage.exposed;\n        const { termination, terminate } = createTerminator(worker);\n        const events = createEventObservable(worker, termination);\n        if (exposed.type === \"function\") {\n            const proxy = Object(_invocation_proxy__WEBPACK_IMPORTED_MODULE_6__[/* createProxyFunction */ \"a\"])(worker);\n            return setPrivateThreadProps(proxy, worker, events, terminate);\n        }\n        else if (exposed.type === \"module\") {\n            const proxy = Object(_invocation_proxy__WEBPACK_IMPORTED_MODULE_6__[/* createProxyModule */ \"b\"])(worker, exposed.methods);\n            return setPrivateThreadProps(proxy, worker, events, terminate);\n        }\n        else {\n            const type = exposed.type;\n            throw Error(`Worker init message states unexpected type of expose(): ${type}`);\n        }\n    });\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(2)))\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayWithoutHoles = __webpack_require__(38);\n\nvar iterableToArray = __webpack_require__(18);\n\nvar nonIterableSpread = __webpack_require__(39);\n\nfunction _toConsumableArray(arr) {\n  return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar arrayWithHoles = __webpack_require__(40);\n\nvar iterableToArray = __webpack_require__(18);\n\nvar nonIterableRest = __webpack_require__(41);\n\nfunction _toArray(arr) {\n  return arrayWithHoles(arr) || iterableToArray(arr) || nonIterableRest();\n}\n\nmodule.exports = _toArray;\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports) {\n\nfunction 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;\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// ==ClosureCompiler==\n// @output_file_name default.js\n// @compilation_level SIMPLE_OPTIMIZATIONS\n// ==/ClosureCompiler==\n\n/**\n * @author: Tobias Nickel\n * @created: 06.04.2015\n * I needed a small xmlparser chat can be used in a worker.\n */\n\n/**\n * @typedef tNode \n * @property {string} tagName \n * @property {object} attributes\n * @property {tNode|string|number[]} children \n **/\n\n/**\n * parseXML / html into a DOM Object. with no validation and some failur tolerance\n * @param {string} S your XML to parse\n * @param options {object} all other options:\n * searchId {string} the id of a single element, that should be returned. using this will increase the speed rapidly\n * filter {function} filter method, as you know it from Array.filter. but is goes throw the DOM.\n\n * @return {tNode[]}\n */\nfunction tXml(S, options) {\n    \"use strict\";\n    options = options || {};\n\n    var pos = options.pos || 0;\n\n    var openBracket = \"<\";\n    var openBracketCC = \"<\".charCodeAt(0);\n    var closeBracket = \">\";\n    var closeBracketCC = \">\".charCodeAt(0);\n    var minus = \"-\";\n    var minusCC = \"-\".charCodeAt(0);\n    var slash = \"/\";\n    var slashCC = \"/\".charCodeAt(0);\n    var exclamation = '!';\n    var exclamationCC = '!'.charCodeAt(0);\n    var singleQuote = \"'\";\n    var singleQuoteCC = \"'\".charCodeAt(0);\n    var doubleQuote = '\"';\n    var doubleQuoteCC = '\"'.charCodeAt(0);\n    var openCornerBracket = '[';\n    var openCornerBracketCC = '['.charCodeAt(0);\n    var closeCornerBracket = ']';\n    var closeCornerBracketCC = ']'.charCodeAt(0);\n    \n\n    /**\n     * parsing a list of entries\n     */\n    function parseChildren() {\n        var children = [];\n        while (S[pos]) {\n            if (S.charCodeAt(pos) == openBracketCC) {\n                if (S.charCodeAt(pos + 1) === slashCC) {\n                    pos = S.indexOf(closeBracket, pos);\n                    if (pos + 1) pos += 1\n                    return children;\n                } else if (S.charCodeAt(pos + 1) === exclamationCC) {\n                    if (S.charCodeAt(pos + 2) == minusCC) {\n                        //comment support\n                        while (pos !== -1 && !(S.charCodeAt(pos) === closeBracketCC && S.charCodeAt(pos - 1) == minusCC && S.charCodeAt(pos - 2) == minusCC && pos != -1)) {\n                            pos = S.indexOf(closeBracket, pos + 1);\n                        }\n                        if (pos === -1) {\n                            pos = S.length\n                        }\n                    }else if(\n                        S.charCodeAt(pos + 2) === openCornerBracketCC\n                        && S.charCodeAt(pos + 8) === openCornerBracketCC\n                        && S.substr(pos+3, 5).toLowerCase() === 'cdata'\n                    ){\n                        // cdata\n                        var cdataEndIndex = S.indexOf(']]>',pos)\n                        if (cdataEndIndex==-1) {\n                            children.push(S.substr(pos+8));\n                            pos=S.length;\n                        } else {\n                            children.push(S.substring(pos+9, cdataEndIndex));\n                            pos = cdataEndIndex + 3;\n                        }\n                        continue\n                    } else {\n                        // doctypesupport\n                        pos += 2;\n                        while (S.charCodeAt(pos) !== closeBracketCC && S[pos]) {\n                            pos++;\n                        }\n                    }\n                    pos++;\n                    continue;\n                }\n                var node = parseNode();\n                children.push(node);\n            } else {\n                var text = parseText()\n                if (text.trim().length > 0)\n                    children.push(text);\n                pos++;\n            }\n        }\n        return children;\n    }\n\n    /**\n     *    returns the text outside of texts until the first '<'\n     */\n    function parseText() {\n        var start = pos;\n        pos = S.indexOf(openBracket, pos) - 1;\n        if (pos === -2)\n            pos = S.length;\n        return S.slice(start, pos + 1);\n    }\n    /**\n     *    returns text until the first nonAlphebetic letter\n     */\n    var nameSpacer = '\\r\\n\\t>/= ';\n\n    function parseName() {\n        var start = pos;\n        while (nameSpacer.indexOf(S[pos]) === -1 && S[pos]) {\n            pos++;\n        }\n        return S.slice(start, pos);\n    }\n    /**\n     *    is parsing a node, including tagName, Attributes and its children,\n     * to parse children it uses the parseChildren again, that makes the parsing recursive\n     */\n    var NoChildNodes = options.noChildNodes || ['img', 'br', 'input', 'meta', 'link'];\n\n    function parseNode() {\n        pos++;\n        const tagName = parseName();\n        const attributes = {};\n        let children = [];\n\n        // parsing attributes\n        while (S.charCodeAt(pos) !== closeBracketCC && S[pos]) {\n            var c = S.charCodeAt(pos);\n            if ((c > 64 && c < 91) || (c > 96 && c < 123)) {\n                //if('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.indexOf(S[pos])!==-1 ){\n                var name = parseName();\n                // search beginning of the string\n                var code = S.charCodeAt(pos);\n                while (code && code !== singleQuoteCC && code !== doubleQuoteCC && !((code > 64 && code < 91) || (code > 96 && code < 123)) && code !== closeBracketCC) {\n                    pos++;\n                    code = S.charCodeAt(pos);\n                }\n                if (code === singleQuoteCC || code === doubleQuoteCC) {\n                    var value = parseString();\n                    if (pos === -1) {\n                        return {\n                            tagName,\n                            attributes,\n                            children,\n                        };\n                    }\n                } else {\n                    value = null;\n                    pos--;\n                }\n                attributes[name] = value;\n            }\n            pos++;\n        }\n        // optional parsing of children\n        if (S.charCodeAt(pos - 1) !== slashCC) {\n            if (tagName == \"script\") {\n                var start = pos + 1;\n                pos = S.indexOf('<\/script>', pos);\n                children = [S.slice(start, pos)];\n                pos += 9;\n            } else if (tagName == \"style\") {\n                var start = pos + 1;\n                pos = S.indexOf('</style>', pos);\n                children = [S.slice(start, pos)];\n                pos += 8;\n            } else if (NoChildNodes.indexOf(tagName) == -1) {\n                pos++;\n                children = parseChildren(name);\n            }\n        } else {\n            pos++;\n        }\n        return {\n            tagName,\n            attributes,\n            children,\n        };\n    }\n\n    /**\n     *    is parsing a string, that starts with a char and with the same usually  ' or \"\n     */\n\n    function parseString() {\n        var startChar = S[pos];\n        var startpos = pos+1;\n        pos = S.indexOf(startChar, startpos)\n        return S.slice(startpos, pos);\n    }\n\n    /**\n     *\n     */\n    function findElements() {\n        var r = new RegExp('\\\\s' + options.attrName + '\\\\s*=[\\'\"]' + options.attrValue + '[\\'\"]').exec(S)\n        if (r) {\n            return r.index;\n        } else {\n            return -1;\n        }\n    }\n\n    var out = null;\n    if (options.attrValue !== undefined) {\n        options.attrName = options.attrName || 'id';\n        var out = [];\n\n        while ((pos = findElements()) !== -1) {\n            pos = S.lastIndexOf('<', pos);\n            if (pos !== -1) {\n                out.push(parseNode());\n            }\n            S = S.substr(pos);\n            pos = 0;\n        }\n    } else if (options.parseNode) {\n        out = parseNode()\n    } else {\n        out = parseChildren();\n    }\n\n    if (options.filter) {\n        out = tXml.filter(out, options.filter);\n    }\n\n    if (options.setPos) {\n        out.pos = pos;\n    }\n\n    return out;\n}\n\n/**\n * transform the DomObject to an object that is like the object of PHP`s simple_xmp_load_*() methods.\n * this format helps you to write that is more likely to keep your program working, even if there a small changes in the XML schema.\n * be aware, that it is not possible to reproduce the original xml from a simplified version, because the order of elements is not saved.\n * therefore your program will be more flexible and easier to read.\n *\n * @param {tNode[]} children the childrenList\n */\ntXml.simplify = function simplify(children) {\n    var out = {};\n    if (!children.length) {\n        return '';\n    }\n\n    if (children.length === 1 && typeof children[0] == 'string') {\n        return children[0];\n    }\n    // map each object\n    children.forEach(function(child) {\n        if (typeof child !== 'object') {\n            return;\n        }\n        if (!out[child.tagName])\n            out[child.tagName] = [];\n        var kids = tXml.simplify(child.children);\n        out[child.tagName].push(kids);\n        if (Object.keys(child.attributes).length) {\n            kids._attributes = child.attributes;\n        }\n    });\n\n    for (var i in out) {\n        if (out[i].length == 1) {\n            out[i] = out[i][0];\n        }\n    }\n\n    return out;\n};\n\n\n/**\n * similar to simplify, but lost less\n *\n * @param {tNode[]} children the childrenList\n */ \ntXml.simplifyLostLess = function simplify(children, parentAttributes={}) {\n    var out = {};\n    if (!children.length) {\n        return '';\n    }\n\n    if (children.length === 1 && typeof children[0] == 'string') {\n        return Object.keys(parentAttributes).length ? {\n            _attributes: parentAttributes,\n            value: children[0]\n        } :children[0];\n    }\n    // map each object\n    children.forEach(function(child) {\n        if (typeof child !== 'object') {\n            return;\n        }\n        if (!out[child.tagName])\n            out[child.tagName] = [];\n        var kids = tXml.simplifyLostLess(child.children||[], child.attributes);\n        out[child.tagName].push(kids);\n        if (Object.keys(child.attributes).length) {\n            kids._attributes = child.attributes;\n        }\n    });\n\n    return out;\n};\n\n/**\n * behaves the same way as Array.filter, if the filter method return true, the element is in the resultList\n * @params children{Array} the children of a node\n * @param f{function} the filter method\n */\ntXml.filter = function(children, f, dept=0,path='') {\n    var out = [];\n    children.forEach(function(child, i) {\n        if (typeof(child) === 'object' && f(child, i, dept, path)) out.push(child);\n        if (child.children) {\n            var kids = tXml.filter(child.children, f, dept+1, (path?path+'.':'')+i+'.'+child.tagName);\n            out = out.concat(kids);\n        }\n    });\n    return out;\n};\n\n/**\n * stringify a previously parsed string object.\n * this is useful,\n *  1. to remove whitespace\n * 2. to recreate xml data, with some changed data.\n * @param {tNode} O the object to Stringify\n */\ntXml.stringify = function stringify(O) {\n    var out = '';\n\n    function writeChildren(O) {\n        if (O)\n            for (var i = 0; i < O.length; i++) {\n                if (typeof O[i] == 'string') {\n                    out += O[i].trim();\n                } else {\n                    writeNode(O[i]);\n                }\n            }\n    }\n\n    function writeNode(N) {\n        out += \"<\" + N.tagName;\n        for (var i in N.attributes) {\n            if (N.attributes[i] === null) {\n                out += ' ' + i;\n            } else if (N.attributes[i].indexOf('\"') === -1) {\n                out += ' ' + i + '=\"' + N.attributes[i].trim() + '\"';\n            } else {\n                out += ' ' + i + \"='\" + N.attributes[i].trim() + \"'\";\n            }\n        }\n        out += '>';\n        writeChildren(N.children);\n        out += '</' + N.tagName + '>';\n    }\n    writeChildren(O);\n\n    return out;\n};\n\n\n/**\n * use this method to read the text content, of some node.\n * It is great if you have mixed content like:\n * this text has some <b>big</b> text and a <a href=''>link</a>\n * @return {string}\n */\ntXml.toContentString = function(tDom) {\n    if (Array.isArray(tDom)) {\n        var out = '';\n        tDom.forEach(function(e) {\n            out += ' ' + tXml.toContentString(e);\n            out = out.trim();\n        });\n        return out;\n    } else if (typeof tDom === 'object') {\n        return tXml.toContentString(tDom.children)\n    } else {\n        return ' ' + tDom;\n    }\n};\n\ntXml.getElementById = function(S, id, simplified) {\n    var out = tXml(S, {\n        attrValue: id\n    });\n    return simplified ? tXml.simplify(out) : out[0];\n};\n\ntXml.getElementsByClassName = function(S, classname, simplified) {\n    const out = tXml(S, {\n        attrName: 'class',\n        attrValue: '[a-zA-Z0-9- ]*' + classname + '[a-zA-Z0-9- ]*'\n    });\n    return simplified ? tXml.simplify(out) : out;\n};\n\ntXml.parseStream = function(stream, offset) {\n    if (typeof offset === 'string') {\n        offset = offset.length + 2;\n    }\n    if (typeof stream === 'string') {\n        var fs = __webpack_require__(42);\n        stream = fs.createReadStream(stream, { start: offset });\n        offset = 0;\n    }\n\n    var position = offset;\n    var data = '';\n    stream.on('data', function(chunk) {\n        data += chunk;\n        var lastPos = 0;\n        do {\n            position = data.indexOf('<', position) + 1;\n            if(!position) {\n                position = lastPos;\n                return;\n            }\n            if (data[position + 1] === '/') {\n                position = position + 1;\n                lastPos = pos;\n                continue;\n            }\n            var res = tXml(data, { pos: position-1, parseNode: true, setPos: true });\n            position = res.pos;\n            if (position > (data.length - 1) || position < lastPos) {\n                data = data.slice(lastPos);\n                position = 0;\n                lastPos = 0;\n                return;\n            } else {\n                stream.emit('xml', res);\n                lastPos = position;\n            }\n        } while (1);\n    });\n    // stream.on('end', function() {\n    //     console.log('end')\n    // });\n    return stream;\n}\n\ntXml.transformStream = function (offset) {\n    // require through here, so it will not get added to webpack/browserify\n    const through2 = __webpack_require__(43);\n    if (typeof offset === 'string') {\n        offset = offset.length + 2;\n    }\n\n    var position = offset || 0;\n    var data = '';\n    const stream = through2({ readableObjectMode: true }, function (chunk, enc, callback) {\n        data += chunk;\n        var lastPos = 0;\n        do {\n            position = data.indexOf('<', position) + 1;\n            if (!position) {\n                position = lastPos;\n                return callback();;\n            }\n            if (data[position + 1] === '/') {\n                position = position + 1;\n                lastPos = pos;\n                continue;\n            }\n            var res = tXml(data, { pos: position - 1, parseNode: true, setPos: true });\n            position = res.pos;\n            if (position > (data.length - 1) || position < lastPos) {\n                data = data.slice(lastPos);\n                position = 0;\n                return callback();;\n            } else {\n                this.push(res);\n                lastPos = position;\n            }\n        } while (1);\n        callback();\n    });\n\n    return stream;\n}\n\nif (true) {\n    module.exports = tXml;\n    tXml.xml = tXml;\n}\n//console.clear();\n//console.log('here:',tXml.getElementById('<some><xml id=\"test\">dada</xml><that id=\"test\">value</that></some>','test'));\n//console.log('here:',tXml.getElementsByClassName('<some><xml id=\"test\" class=\"sdf test jsalf\">dada</xml><that id=\"test\">value</that></some>','test'));\n\n/*\nconsole.clear();\ntXml(d,'content');\n //some testCode\nvar s = document.body.innerHTML.toLowerCase();\nvar start = new Date().getTime();\nvar o = tXml(s,'content');\nvar end = new Date().getTime();\n//console.log(JSON.stringify(o,undefined,'\\t'));\nconsole.log(\"MILLISECONDS\",end-start);\nvar nodeCount=document.querySelectorAll('*').length;\nconsole.log('node count',nodeCount);\nconsole.log(\"speed:\",(1000/(end-start))*nodeCount,'Nodes / second')\n//console.log(JSON.stringify(tXml('<html><head><title>testPage</title></head><body><h1>TestPage</h1><p>this is a <b>test</b>page</p></body></html>'),undefined,'\\t'));\nvar p = new DOMParser();\nvar s2='<body>'+s+'</body>'\nvar start2= new Date().getTime();\nvar o2 = p.parseFromString(s2,'text/html').querySelector('#content')\nvar end2=new Date().getTime();\nconsole.log(\"MILLISECONDS\",end2-start2);\n// */\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n\nvar zlib_inflate = __webpack_require__(54);\nvar utils        = __webpack_require__(12);\nvar strings      = __webpack_require__(59);\nvar c            = __webpack_require__(60);\nvar msg          = __webpack_require__(61);\nvar ZStream      = __webpack_require__(62);\nvar GZheader     = __webpack_require__(63);\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n *   from utf8 to utf16 (javascript) string. When string output requested,\n *   chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true);  // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n  if (!(this instanceof Inflate)) return new Inflate(options);\n\n  this.options = utils.assign({\n    chunkSize: 16384,\n    windowBits: 0,\n    to: ''\n  }, options || {});\n\n  var opt = this.options;\n\n  // Force window size for `raw` data, if not set directly,\n  // because we have no header for autodetect.\n  if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n    opt.windowBits = -opt.windowBits;\n    if (opt.windowBits === 0) { opt.windowBits = -15; }\n  }\n\n  // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n  if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n      !(options && options.windowBits)) {\n    opt.windowBits += 32;\n  }\n\n  // Gzip header has no info about windows size, we can do autodetect only\n  // for deflate. So, if window size not set, force it to max when gzip possible\n  if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n    // bit 3 (16) -> gzipped data\n    // bit 4 (32) -> autodetect gzip/deflate\n    if ((opt.windowBits & 15) === 0) {\n      opt.windowBits |= 15;\n    }\n  }\n\n  this.err    = 0;      // error code, if happens (0 = Z_OK)\n  this.msg    = '';     // error message\n  this.ended  = false;  // used to avoid multiple onEnd() calls\n  this.chunks = [];     // chunks of compressed data\n\n  this.strm   = new ZStream();\n  this.strm.avail_out = 0;\n\n  var status  = zlib_inflate.inflateInit2(\n    this.strm,\n    opt.windowBits\n  );\n\n  if (status !== c.Z_OK) {\n    throw new Error(msg[status]);\n  }\n\n  this.header = new GZheader();\n\n  zlib_inflate.inflateGetHeader(this.strm, this.header);\n\n  // Setup dictionary\n  if (opt.dictionary) {\n    // Convert data if needed\n    if (typeof opt.dictionary === 'string') {\n      opt.dictionary = strings.string2buf(opt.dictionary);\n    } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n      opt.dictionary = new Uint8Array(opt.dictionary);\n    }\n    if (opt.raw) { //In raw mode we need to set the dictionary early\n      status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary);\n      if (status !== c.Z_OK) {\n        throw new Error(msg[status]);\n      }\n    }\n  }\n}\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true);  // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, mode) {\n  var strm = this.strm;\n  var chunkSize = this.options.chunkSize;\n  var dictionary = this.options.dictionary;\n  var status, _mode;\n  var next_out_utf8, tail, utf8str;\n\n  // Flag to properly process Z_BUF_ERROR on testing inflate call\n  // when we check that all output data was flushed.\n  var allowBufError = false;\n\n  if (this.ended) { return false; }\n  _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n  // Convert data if needed\n  if (typeof data === 'string') {\n    // Only binary strings can be decompressed on practice\n    strm.input = strings.binstring2buf(data);\n  } else if (toString.call(data) === '[object ArrayBuffer]') {\n    strm.input = new Uint8Array(data);\n  } else {\n    strm.input = data;\n  }\n\n  strm.next_in = 0;\n  strm.avail_in = strm.input.length;\n\n  do {\n    if (strm.avail_out === 0) {\n      strm.output = new utils.Buf8(chunkSize);\n      strm.next_out = 0;\n      strm.avail_out = chunkSize;\n    }\n\n    status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH);    /* no bad return value */\n\n    if (status === c.Z_NEED_DICT && dictionary) {\n      status = zlib_inflate.inflateSetDictionary(this.strm, dictionary);\n    }\n\n    if (status === c.Z_BUF_ERROR && allowBufError === true) {\n      status = c.Z_OK;\n      allowBufError = false;\n    }\n\n    if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n      this.onEnd(status);\n      this.ended = true;\n      return false;\n    }\n\n    if (strm.next_out) {\n      if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n        if (this.options.to === 'string') {\n\n          next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n          tail = strm.next_out - next_out_utf8;\n          utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n          // move tail\n          strm.next_out = tail;\n          strm.avail_out = chunkSize - tail;\n          if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n          this.onData(utf8str);\n\n        } else {\n          this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n        }\n      }\n    }\n\n    // When no more input data, we should check that internal inflate buffers\n    // are flushed. The only way to do it when avail_out = 0 - run one more\n    // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n    // Here we set flag to process this error properly.\n    //\n    // NOTE. Deflate does not return error in this case and does not needs such\n    // logic.\n    if (strm.avail_in === 0 && strm.avail_out === 0) {\n      allowBufError = true;\n    }\n\n  } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);\n\n  if (status === c.Z_STREAM_END) {\n    _mode = c.Z_FINISH;\n  }\n\n  // Finalize on the last chunk.\n  if (_mode === c.Z_FINISH) {\n    status = zlib_inflate.inflateEnd(this.strm);\n    this.onEnd(status);\n    this.ended = true;\n    return status === c.Z_OK;\n  }\n\n  // callback interim results if Z_SYNC_FLUSH.\n  if (_mode === c.Z_SYNC_FLUSH) {\n    this.onEnd(c.Z_OK);\n    strm.avail_out = 0;\n    return true;\n  }\n\n  return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n *   on js engine support. When string output requested, each chunk\n *   will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n  this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n *   other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n  // On success - join\n  if (status === c.Z_OK) {\n    if (this.options.to === 'string') {\n      // Glue & convert here, until we teach pako to send\n      // utf8 aligned strings to onData\n      this.result = this.chunks.join('');\n    } else {\n      this.result = utils.flattenChunks(this.chunks);\n    }\n  }\n  this.chunks = [];\n  this.err = status;\n  this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n *   negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n *   from utf8 to utf16 (javascript) string. When string output requested,\n *   chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n *   , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n *   , output;\n *\n * try {\n *   output = pako.inflate(input);\n * } catch (err)\n *   console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n  var inflator = new Inflate(options);\n\n  inflator.push(input, true);\n\n  // That will never happens, if you don't cheat with options :)\n  if (inflator.err) { throw inflator.msg || msg[inflator.err]; }\n\n  return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n  options = options || {};\n  options.raw = true;\n  return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip  = inflate;\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var _observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);\n\n// TODO: This observer iteration approach looks inelegant and expensive\n// Idea: Come up with super class for Subscription that contains the\n//       notify*, ... methods and use it here\n/**\n * A subject is a \"hot\" observable (see `multicast`) that has its observer\n * methods (`.next(value)`, `.error(error)`, `.complete()`) exposed.\n *\n * Be careful, though! With great power comes great responsibility. Only use\n * the `Subject` when you really need to trigger updates \"from the outside\" and\n * try to keep the code that can access it to a minimum. Return\n * `Observable.from(mySubject)` to not allow other code to mutate.\n */\nclass MulticastSubject extends _observable__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"] {\n    constructor() {\n        super(observer => {\n            this._observers.add(observer);\n            return () => this._observers.delete(observer);\n        });\n        this._observers = new Set();\n    }\n    next(value) {\n        for (const observer of this._observers) {\n            observer.next(value);\n        }\n    }\n    error(error) {\n        for (const observer of this._observers) {\n            observer.error(error);\n        }\n    }\n    complete() {\n        for (const observer of this._observers) {\n            observer.complete();\n        }\n    }\n}\n/* harmony default export */ __webpack_exports__[\"a\"] = (MulticastSubject);\n\n\n/***/ }),\n/* 34 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createPromiseWithResolver; });\nconst doNothing = () => undefined;\n/**\n * Creates a new promise and exposes its resolver function.\n * Use with care!\n */\nfunction createPromiseWithResolver() {\n    let alreadyResolved = false;\n    let resolvedTo;\n    let resolver = doNothing;\n    const promise = new Promise(resolve => {\n        if (alreadyResolved) {\n            resolve(resolvedTo);\n        }\n        else {\n            resolver = resolve;\n        }\n    });\n    const exposedResolver = (value) => {\n        alreadyResolved = true;\n        resolvedTo = value;\n        resolver();\n    };\n    return [promise, exposedResolver];\n}\n\n\n/***/ }),\n/* 35 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return isTransferDescriptor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Transfer; });\n/* harmony import */ var _symbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);\n\nfunction isTransferable(thing) {\n    if (!thing || typeof thing !== \"object\")\n        return false;\n    // Don't check too thoroughly, since the list of transferable things in JS might grow over time\n    return true;\n}\nfunction isTransferDescriptor(thing) {\n    return thing && typeof thing === \"object\" && thing[_symbols__WEBPACK_IMPORTED_MODULE_0__[/* $transferable */ \"d\"]];\n}\nfunction Transfer(payload, transferables) {\n    if (!transferables) {\n        if (!isTransferable(payload))\n            throw Error();\n        transferables = [payload];\n    }\n    return {\n        [_symbols__WEBPACK_IMPORTED_MODULE_0__[/* $transferable */ \"d\"]]: true,\n        send: payload,\n        transferables\n    };\n}\n\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar http = __webpack_require__(0)\nvar url = __webpack_require__(15)\n\nvar https = module.exports\n\nfor (var key in http) {\n  if (http.hasOwnProperty(key)) https[key] = http[key]\n}\n\nhttps.request = function (params, cb) {\n  params = validateParams(params)\n  return http.request.call(this, params, cb)\n}\n\nhttps.get = function (params, cb) {\n  params = validateParams(params)\n  return http.get.call(this, params, cb)\n}\n\nfunction validateParams (params) {\n  if (typeof params === 'string') {\n    params = url.parse(params)\n  }\n  if (!params.protocol) {\n    params.protocol = 'https:'\n  }\n  if (params.protocol !== 'https:') {\n    throw new Error('Protocol \"' + params.protocol + '\" not supported. Expected \"https:\"')\n  }\n  return params\n}\n\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\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 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 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    generator._invoke = 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  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 = Gp.constructor = GeneratorFunctionPrototype;\n  GeneratorFunctionPrototype.constructor = GeneratorFunction;\n  GeneratorFunctionPrototype[toStringTagSymbol] =\n    GeneratorFunction.displayName = \"GeneratorFunction\";\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      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      if (!(toStringTagSymbol in genFun)) {\n        genFun[toStringTagSymbol] = \"GeneratorFunction\";\n      }\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    this._invoke = enqueue;\n  }\n\n  defineIteratorMethods(AsyncIterator.prototype);\n  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 method = delegate.iterator[context.method];\n    if (method === undefined) {\n      // A .throw or .return when the delegate iterator has no .throw\n      // method always terminates the yield* loop.\n      context.delegate = null;\n\n      if (context.method === \"throw\") {\n        // Note: [\"return\"] must be used for ES3 parsing compatibility.\n        if (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\n        context.method = \"throw\";\n        context.arg = new TypeError(\n          \"The iterator does not provide a 'throw' 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  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  Gp[iteratorSymbol] = function() {\n    return this;\n  };\n\n  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(object) {\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, 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  Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports) {\n\nfunction _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) {\n    for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n      arr2[i] = arr[i];\n    }\n\n    return arr2;\n  }\n}\n\nmodule.exports = _arrayWithoutHoles;\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports) {\n\nfunction _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nmodule.exports = _nonIterableSpread;\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports) {\n\nfunction _arrayWithHoles(arr) {\n  if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports) {\n\nfunction _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nmodule.exports = _nonIterableRest;\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports) {\n\n/* (ignored) */\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(process) {var Transform = __webpack_require__(44).Transform\n  , inherits  = __webpack_require__(6)\n\nfunction DestroyableTransform(opts) {\n  Transform.call(this, opts)\n  this._destroyed = false\n}\n\ninherits(DestroyableTransform, Transform)\n\nDestroyableTransform.prototype.destroy = function(err) {\n  if (this._destroyed) return\n  this._destroyed = true\n  \n  var self = this\n  process.nextTick(function() {\n    if (err)\n      self.emit('error', err)\n    self.emit('close')\n  })\n}\n\n// a noop _transform function\nfunction noop (chunk, enc, callback) {\n  callback(null, chunk)\n}\n\n\n// create a new export function, used by both the main export and\n// the .ctor export, contains common logic for dealing with arguments\nfunction through2 (construct) {\n  return function (options, transform, flush) {\n    if (typeof options == 'function') {\n      flush     = transform\n      transform = options\n      options   = {}\n    }\n\n    if (typeof transform != 'function')\n      transform = noop\n\n    if (typeof flush != 'function')\n      flush = null\n\n    return construct(options, transform, flush)\n  }\n}\n\n\n// main export, just make me a transform stream!\nmodule.exports = through2(function (options, transform, flush) {\n  var t2 = new DestroyableTransform(options)\n\n  t2._transform = transform\n\n  if (flush)\n    t2._flush = flush\n\n  return t2\n})\n\n\n// make me a reusable prototype that I can `new`, or implicitly `new`\n// with a constructor call\nmodule.exports.ctor = through2(function (options, transform, flush) {\n  function Through2 (override) {\n    if (!(this instanceof Through2))\n      return new Through2(override)\n\n    this.options = Object.assign({}, options, override)\n\n    DestroyableTransform.call(this, this.options)\n  }\n\n  inherits(Through2, DestroyableTransform)\n\n  Through2.prototype._transform = transform\n\n  if (flush)\n    Through2.prototype._flush = flush\n\n  return Through2\n})\n\n\nmodule.exports.obj = through2(function (options, transform, flush) {\n  var t2 = new DestroyableTransform(Object.assign({ objectMode: true, highWaterMark: 16 }, options))\n\n  t2._transform = transform\n\n  if (flush)\n    t2._flush = flush\n\n  return t2\n})\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(2)))\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\nexports = module.exports = __webpack_require__(19);\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = __webpack_require__(24);\nexports.Duplex = __webpack_require__(7);\nexports.Transform = __webpack_require__(26);\nexports.PassThrough = __webpack_require__(52);\nexports.finished = __webpack_require__(14);\nexports.pipeline = __webpack_require__(53);\n\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports) {\n\n/* (ignored) */\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\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 _require = __webpack_require__(0),\n    Buffer = _require.Buffer;\n\nvar _require2 = __webpack_require__(47),\n    inspect = _require2.inspect;\n\nvar custom = inspect && inspect.custom || 'inspect';\n\nfunction copyBuffer(src, target, offset) {\n  Buffer.prototype.copy.call(src, target, offset);\n}\n\nmodule.exports =\n/*#__PURE__*/\nfunction () {\n  function BufferList() {\n    _classCallCheck(this, BufferList);\n\n    this.head = null;\n    this.tail = null;\n    this.length = 0;\n  }\n\n  _createClass(BufferList, [{\n    key: \"push\",\n    value: function push(v) {\n      var entry = {\n        data: v,\n        next: null\n      };\n      if (this.length > 0) this.tail.next = entry;else this.head = entry;\n      this.tail = entry;\n      ++this.length;\n    }\n  }, {\n    key: \"unshift\",\n    value: function unshift(v) {\n      var entry = {\n        data: v,\n        next: this.head\n      };\n      if (this.length === 0) this.tail = entry;\n      this.head = entry;\n      ++this.length;\n    }\n  }, {\n    key: \"shift\",\n    value: function shift() {\n      if (this.length === 0) return;\n      var ret = this.head.data;\n      if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n      --this.length;\n      return ret;\n    }\n  }, {\n    key: \"clear\",\n    value: function clear() {\n      this.head = this.tail = null;\n      this.length = 0;\n    }\n  }, {\n    key: \"join\",\n    value: function join(s) {\n      if (this.length === 0) return '';\n      var p = this.head;\n      var ret = '' + p.data;\n\n      while (p = p.next) {\n        ret += s + p.data;\n      }\n\n      return ret;\n    }\n  }, {\n    key: \"concat\",\n    value: function concat(n) {\n      if (this.length === 0) return Buffer.alloc(0);\n      var ret = Buffer.allocUnsafe(n >>> 0);\n      var p = this.head;\n      var i = 0;\n\n      while (p) {\n        copyBuffer(p.data, ret, i);\n        i += p.data.length;\n        p = p.next;\n      }\n\n      return ret;\n    } // Consumes a specified amount of bytes or characters from the buffered data.\n\n  }, {\n    key: \"consume\",\n    value: function consume(n, hasStrings) {\n      var ret;\n\n      if (n < this.head.data.length) {\n        // `slice` is the same for buffers and strings.\n        ret = this.head.data.slice(0, n);\n        this.head.data = this.head.data.slice(n);\n      } else if (n === this.head.data.length) {\n        // First chunk is a perfect match.\n        ret = this.shift();\n      } else {\n        // Result spans more than one buffer.\n        ret = hasStrings ? this._getString(n) : this._getBuffer(n);\n      }\n\n      return ret;\n    }\n  }, {\n    key: \"first\",\n    value: function first() {\n      return this.head.data;\n    } // Consumes a specified amount of characters from the buffered data.\n\n  }, {\n    key: \"_getString\",\n    value: function _getString(n) {\n      var p = this.head;\n      var c = 1;\n      var ret = p.data;\n      n -= ret.length;\n\n      while (p = p.next) {\n        var str = p.data;\n        var nb = n > str.length ? str.length : n;\n        if (nb === str.length) ret += str;else ret += str.slice(0, n);\n        n -= nb;\n\n        if (n === 0) {\n          if (nb === str.length) {\n            ++c;\n            if (p.next) this.head = p.next;else this.head = this.tail = null;\n          } else {\n            this.head = p;\n            p.data = str.slice(nb);\n          }\n\n          break;\n        }\n\n        ++c;\n      }\n\n      this.length -= c;\n      return ret;\n    } // Consumes a specified amount of bytes from the buffered data.\n\n  }, {\n    key: \"_getBuffer\",\n    value: function _getBuffer(n) {\n      var ret = Buffer.allocUnsafe(n);\n      var p = this.head;\n      var c = 1;\n      p.data.copy(ret);\n      n -= p.data.length;\n\n      while (p = p.next) {\n        var buf = p.data;\n        var nb = n > buf.length ? buf.length : n;\n        buf.copy(ret, ret.length - n, 0, nb);\n        n -= nb;\n\n        if (n === 0) {\n          if (nb === buf.length) {\n            ++c;\n            if (p.next) this.head = p.next;else this.head = this.tail = null;\n          } else {\n            this.head = p;\n            p.data = buf.slice(nb);\n          }\n\n          break;\n        }\n\n        ++c;\n      }\n\n      this.length -= c;\n      return ret;\n    } // Make sure the linked list only shows the minimal necessary information.\n\n  }, {\n    key: custom,\n    value: function value(_, options) {\n      return inspect(this, _objectSpread({}, options, {\n        // Only inspect one level.\n        depth: 0,\n        // It should not recurse.\n        customInspect: false\n      }));\n    }\n  }]);\n\n  return BufferList;\n}();\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports) {\n\n/* (ignored) */\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(global) {\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n  if (config('noDeprecation')) {\n    return fn;\n  }\n\n  var warned = false;\n  function deprecated() {\n    if (!warned) {\n      if (config('throwDeprecation')) {\n        throw new Error(msg);\n      } else if (config('traceDeprecation')) {\n        console.trace(msg);\n      } else {\n        console.warn(msg);\n      }\n      warned = true;\n    }\n    return fn.apply(this, arguments);\n  }\n\n  return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n  // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n  try {\n    if (!global.localStorage) return false;\n  } catch (_) {\n    return false;\n  }\n  var val = global.localStorage[name];\n  if (null == val) return false;\n  return String(val).toLowerCase() === 'true';\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(11)))\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* eslint-disable node/no-deprecated-api */\nvar buffer = __webpack_require__(0)\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n  for (var key in src) {\n    dst[key] = src[key]\n  }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n  module.exports = buffer\n} else {\n  // Copy properties from require('buffer')\n  copyProps(buffer, exports)\n  exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n  return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n  if (typeof arg === 'number') {\n    throw new TypeError('Argument must not be a number')\n  }\n  return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n  if (typeof size !== 'number') {\n    throw new TypeError('Argument must be a number')\n  }\n  var buf = Buffer(size)\n  if (fill !== undefined) {\n    if (typeof encoding === 'string') {\n      buf.fill(fill, encoding)\n    } else {\n      buf.fill(fill)\n    }\n  } else {\n    buf.fill(0)\n  }\n  return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('Argument must be a number')\n  }\n  return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('Argument must be a number')\n  }\n  return buffer.SlowBuffer(size)\n}\n\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {\n\nvar _Object$setPrototypeO;\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar finished = __webpack_require__(14);\n\nvar kLastResolve = Symbol('lastResolve');\nvar kLastReject = Symbol('lastReject');\nvar kError = Symbol('error');\nvar kEnded = Symbol('ended');\nvar kLastPromise = Symbol('lastPromise');\nvar kHandlePromise = Symbol('handlePromise');\nvar kStream = Symbol('stream');\n\nfunction createIterResult(value, done) {\n  return {\n    value: value,\n    done: done\n  };\n}\n\nfunction readAndResolve(iter) {\n  var resolve = iter[kLastResolve];\n\n  if (resolve !== null) {\n    var data = iter[kStream].read(); // we defer if data is null\n    // we can be expecting either 'end' or\n    // 'error'\n\n    if (data !== null) {\n      iter[kLastPromise] = null;\n      iter[kLastResolve] = null;\n      iter[kLastReject] = null;\n      resolve(createIterResult(data, false));\n    }\n  }\n}\n\nfunction onReadable(iter) {\n  // we wait for the next tick, because it might\n  // emit an error with process.nextTick\n  process.nextTick(readAndResolve, iter);\n}\n\nfunction wrapForNext(lastPromise, iter) {\n  return function (resolve, reject) {\n    lastPromise.then(function () {\n      if (iter[kEnded]) {\n        resolve(createIterResult(undefined, true));\n        return;\n      }\n\n      iter[kHandlePromise](resolve, reject);\n    }, reject);\n  };\n}\n\nvar AsyncIteratorPrototype = Object.getPrototypeOf(function () {});\nvar ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {\n  get stream() {\n    return this[kStream];\n  },\n\n  next: function next() {\n    var _this = this;\n\n    // if we have detected an error in the meanwhile\n    // reject straight away\n    var error = this[kError];\n\n    if (error !== null) {\n      return Promise.reject(error);\n    }\n\n    if (this[kEnded]) {\n      return Promise.resolve(createIterResult(undefined, true));\n    }\n\n    if (this[kStream].destroyed) {\n      // We need to defer via nextTick because if .destroy(err) is\n      // called, the error will be emitted via nextTick, and\n      // we cannot guarantee that there is no error lingering around\n      // waiting to be emitted.\n      return new Promise(function (resolve, reject) {\n        process.nextTick(function () {\n          if (_this[kError]) {\n            reject(_this[kError]);\n          } else {\n            resolve(createIterResult(undefined, true));\n          }\n        });\n      });\n    } // if we have multiple next() calls\n    // we will wait for the previous Promise to finish\n    // this logic is optimized to support for await loops,\n    // where next() is only called once at a time\n\n\n    var lastPromise = this[kLastPromise];\n    var promise;\n\n    if (lastPromise) {\n      promise = new Promise(wrapForNext(lastPromise, this));\n    } else {\n      // fast path needed to support multiple this.push()\n      // without triggering the next() queue\n      var data = this[kStream].read();\n\n      if (data !== null) {\n        return Promise.resolve(createIterResult(data, false));\n      }\n\n      promise = new Promise(this[kHandlePromise]);\n    }\n\n    this[kLastPromise] = promise;\n    return promise;\n  }\n}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {\n  return this;\n}), _defineProperty(_Object$setPrototypeO, \"return\", function _return() {\n  var _this2 = this;\n\n  // destroy(err, cb) is a private API\n  // we can guarantee we have that here, because we control the\n  // Readable class this is attached to\n  return new Promise(function (resolve, reject) {\n    _this2[kStream].destroy(null, function (err) {\n      if (err) {\n        reject(err);\n        return;\n      }\n\n      resolve(createIterResult(undefined, true));\n    });\n  });\n}), _Object$setPrototypeO), AsyncIteratorPrototype);\n\nvar createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {\n  var _Object$create;\n\n  var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {\n    value: stream,\n    writable: true\n  }), _defineProperty(_Object$create, kLastResolve, {\n    value: null,\n    writable: true\n  }), _defineProperty(_Object$create, kLastReject, {\n    value: null,\n    writable: true\n  }), _defineProperty(_Object$create, kError, {\n    value: null,\n    writable: true\n  }), _defineProperty(_Object$create, kEnded, {\n    value: stream._readableState.endEmitted,\n    writable: true\n  }), _defineProperty(_Object$create, kHandlePromise, {\n    value: function value(resolve, reject) {\n      var data = iterator[kStream].read();\n\n      if (data) {\n        iterator[kLastPromise] = null;\n        iterator[kLastResolve] = null;\n        iterator[kLastReject] = null;\n        resolve(createIterResult(data, false));\n      } else {\n        iterator[kLastResolve] = resolve;\n        iterator[kLastReject] = reject;\n      }\n    },\n    writable: true\n  }), _Object$create));\n  iterator[kLastPromise] = null;\n  finished(stream, function (err) {\n    if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {\n      var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise\n      // returned by next() and store the error\n\n      if (reject !== null) {\n        iterator[kLastPromise] = null;\n        iterator[kLastResolve] = null;\n        iterator[kLastReject] = null;\n        reject(err);\n      }\n\n      iterator[kError] = err;\n      return;\n    }\n\n    var resolve = iterator[kLastResolve];\n\n    if (resolve !== null) {\n      iterator[kLastPromise] = null;\n      iterator[kLastResolve] = null;\n      iterator[kLastReject] = null;\n      resolve(createIterResult(undefined, true));\n    }\n\n    iterator[kEnded] = true;\n  });\n  stream.on('readable', onReadable.bind(null, iterator));\n  return iterator;\n};\n\nmodule.exports = createReadableStreamAsyncIterator;\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(2)))\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports) {\n\nmodule.exports = function () {\n  throw new Error('Readable.from is not available in the browser')\n};\n\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\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// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\n\nmodule.exports = PassThrough;\n\nvar Transform = __webpack_require__(26);\n\n__webpack_require__(6)(PassThrough, Transform);\n\nfunction PassThrough(options) {\n  if (!(this instanceof PassThrough)) return new PassThrough(options);\n  Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n  cb(null, chunk);\n};\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n// Ported from https://github.com/mafintosh/pump with\n// permission from the author, Mathias Buus (@mafintosh).\n\n\nvar eos;\n\nfunction once(callback) {\n  var called = false;\n  return function () {\n    if (called) return;\n    called = true;\n    callback.apply(void 0, arguments);\n  };\n}\n\nvar _require$codes = __webpack_require__(5).codes,\n    ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,\n    ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;\n\nfunction noop(err) {\n  // Rethrow the error if it exists to avoid swallowing it\n  if (err) throw err;\n}\n\nfunction isRequest(stream) {\n  return stream.setHeader && typeof stream.abort === 'function';\n}\n\nfunction destroyer(stream, reading, writing, callback) {\n  callback = once(callback);\n  var closed = false;\n  stream.on('close', function () {\n    closed = true;\n  });\n  if (eos === undefined) eos = __webpack_require__(14);\n  eos(stream, {\n    readable: reading,\n    writable: writing\n  }, function (err) {\n    if (err) return callback(err);\n    closed = true;\n    callback();\n  });\n  var destroyed = false;\n  return function (err) {\n    if (closed) return;\n    if (destroyed) return;\n    destroyed = true; // request.destroy just do .end - .abort is what we want\n\n    if (isRequest(stream)) return stream.abort();\n    if (typeof stream.destroy === 'function') return stream.destroy();\n    callback(err || new ERR_STREAM_DESTROYED('pipe'));\n  };\n}\n\nfunction call(fn) {\n  fn();\n}\n\nfunction pipe(from, to) {\n  return from.pipe(to);\n}\n\nfunction popCallback(streams) {\n  if (!streams.length) return noop;\n  if (typeof streams[streams.length - 1] !== 'function') return noop;\n  return streams.pop();\n}\n\nfunction pipeline() {\n  for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {\n    streams[_key] = arguments[_key];\n  }\n\n  var callback = popCallback(streams);\n  if (Array.isArray(streams[0])) streams = streams[0];\n\n  if (streams.length < 2) {\n    throw new ERR_MISSING_ARGS('streams');\n  }\n\n  var error;\n  var destroys = streams.map(function (stream, i) {\n    var reading = i < streams.length - 1;\n    var writing = i > 0;\n    return destroyer(stream, reading, writing, function (err) {\n      if (!error) error = err;\n      if (err) destroys.forEach(call);\n      if (reading) return;\n      destroys.forEach(call);\n      callback(error);\n    });\n  });\n  return streams.reduce(pipe);\n}\n\nmodule.exports = pipeline;\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils         = __webpack_require__(12);\nvar adler32       = __webpack_require__(55);\nvar crc32         = __webpack_require__(56);\nvar inflate_fast  = __webpack_require__(57);\nvar inflate_table = __webpack_require__(58);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH      = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH    = 2;\n//var Z_FULL_FLUSH    = 3;\nvar Z_FINISH        = 4;\nvar Z_BLOCK         = 5;\nvar Z_TREES         = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK            = 0;\nvar Z_STREAM_END    = 1;\nvar Z_NEED_DICT     = 2;\n//var Z_ERRNO         = -1;\nvar Z_STREAM_ERROR  = -2;\nvar Z_DATA_ERROR    = -3;\nvar Z_MEM_ERROR     = -4;\nvar Z_BUF_ERROR     = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED  = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar    HEAD = 1;       /* i: waiting for magic header */\nvar    FLAGS = 2;      /* i: waiting for method and flags (gzip) */\nvar    TIME = 3;       /* i: waiting for modification time (gzip) */\nvar    OS = 4;         /* i: waiting for extra flags and operating system (gzip) */\nvar    EXLEN = 5;      /* i: waiting for extra length (gzip) */\nvar    EXTRA = 6;      /* i: waiting for extra bytes (gzip) */\nvar    NAME = 7;       /* i: waiting for end of file name (gzip) */\nvar    COMMENT = 8;    /* i: waiting for end of comment (gzip) */\nvar    HCRC = 9;       /* i: waiting for header crc (gzip) */\nvar    DICTID = 10;    /* i: waiting for dictionary check value */\nvar    DICT = 11;      /* waiting for inflateSetDictionary() call */\nvar        TYPE = 12;      /* i: waiting for type bits, including last-flag bit */\nvar        TYPEDO = 13;    /* i: same, but skip check to exit inflate on new block */\nvar        STORED = 14;    /* i: waiting for stored size (length and complement) */\nvar        COPY_ = 15;     /* i/o: same as COPY below, but only first time in */\nvar        COPY = 16;      /* i/o: waiting for input or output to copy stored block */\nvar        TABLE = 17;     /* i: waiting for dynamic block table lengths */\nvar        LENLENS = 18;   /* i: waiting for code length code lengths */\nvar        CODELENS = 19;  /* i: waiting for length/lit and distance code lengths */\nvar            LEN_ = 20;      /* i: same as LEN below, but only first time in */\nvar            LEN = 21;       /* i: waiting for length/lit/eob code */\nvar            LENEXT = 22;    /* i: waiting for length extra bits */\nvar            DIST = 23;      /* i: waiting for distance code */\nvar            DISTEXT = 24;   /* i: waiting for distance extra bits */\nvar            MATCH = 25;     /* o: waiting for output space to copy string */\nvar            LIT = 26;       /* o: waiting for output space to write literal */\nvar    CHECK = 27;     /* i: waiting for 32-bit check value */\nvar    LENGTH = 28;    /* i: waiting for 32-bit length (gzip) */\nvar    DONE = 29;      /* finished check, done -- remain here until reset */\nvar    BAD = 30;       /* got a data error -- remain here until reset */\nvar    MEM = 31;       /* got an inflate() memory error -- remain here until reset */\nvar    SYNC = 32;      /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH =  (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n  return  (((q >>> 24) & 0xff) +\n          ((q >>> 8) & 0xff00) +\n          ((q & 0xff00) << 8) +\n          ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n  this.mode = 0;             /* current inflate mode */\n  this.last = false;          /* true if processing last block */\n  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */\n  this.havedict = false;      /* true if dictionary provided */\n  this.flags = 0;             /* gzip header method and flags (0 if zlib) */\n  this.dmax = 0;              /* zlib header max distance (INFLATE_STRICT) */\n  this.check = 0;             /* protected copy of check value */\n  this.total = 0;             /* protected copy of output count */\n  // TODO: may be {}\n  this.head = null;           /* where to save gzip header information */\n\n  /* sliding window */\n  this.wbits = 0;             /* log base 2 of requested window size */\n  this.wsize = 0;             /* window size or zero if not using window */\n  this.whave = 0;             /* valid bytes in the window */\n  this.wnext = 0;             /* window write index */\n  this.window = null;         /* allocated sliding window, if needed */\n\n  /* bit accumulator */\n  this.hold = 0;              /* input bit accumulator */\n  this.bits = 0;              /* number of bits in \"in\" */\n\n  /* for string and stored block copying */\n  this.length = 0;            /* literal or length of data to copy */\n  this.offset = 0;            /* distance back to copy string from */\n\n  /* for table and code decoding */\n  this.extra = 0;             /* extra bits needed */\n\n  /* fixed and dynamic code tables */\n  this.lencode = null;          /* starting table for length/literal codes */\n  this.distcode = null;         /* starting table for distance codes */\n  this.lenbits = 0;           /* index bits for lencode */\n  this.distbits = 0;          /* index bits for distcode */\n\n  /* dynamic table building */\n  this.ncode = 0;             /* number of code length code lengths */\n  this.nlen = 0;              /* number of length code lengths */\n  this.ndist = 0;             /* number of distance code lengths */\n  this.have = 0;              /* number of code lengths in lens[] */\n  this.next = null;              /* next available space in codes[] */\n\n  this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n  this.work = new utils.Buf16(288); /* work area for code table building */\n\n  /*\n   because we don't have pointers in js, we use lencode and distcode directly\n   as buffers so we don't need codes\n  */\n  //this.codes = new utils.Buf32(ENOUGH);       /* space for code tables */\n  this.lendyn = null;              /* dynamic table for length/literal codes (JS specific) */\n  this.distdyn = null;             /* dynamic table for distance codes (JS specific) */\n  this.sane = 0;                   /* if false, allow invalid distance too far */\n  this.back = 0;                   /* bits back of last unprocessed length/lit */\n  this.was = 0;                    /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n  var state;\n\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n  strm.total_in = strm.total_out = state.total = 0;\n  strm.msg = ''; /*Z_NULL*/\n  if (state.wrap) {       /* to support ill-conceived Java test suite */\n    strm.adler = state.wrap & 1;\n  }\n  state.mode = HEAD;\n  state.last = 0;\n  state.havedict = 0;\n  state.dmax = 32768;\n  state.head = null/*Z_NULL*/;\n  state.hold = 0;\n  state.bits = 0;\n  //state.lencode = state.distcode = state.next = state.codes;\n  state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n  state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n  state.sane = 1;\n  state.back = -1;\n  //Tracev((stderr, \"inflate: reset\\n\"));\n  return Z_OK;\n}\n\nfunction inflateReset(strm) {\n  var state;\n\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n  state.wsize = 0;\n  state.whave = 0;\n  state.wnext = 0;\n  return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n  var wrap;\n  var state;\n\n  /* get the state */\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n\n  /* extract wrap request from windowBits parameter */\n  if (windowBits < 0) {\n    wrap = 0;\n    windowBits = -windowBits;\n  }\n  else {\n    wrap = (windowBits >> 4) + 1;\n    if (windowBits < 48) {\n      windowBits &= 15;\n    }\n  }\n\n  /* set number of window bits, free window if different */\n  if (windowBits && (windowBits < 8 || windowBits > 15)) {\n    return Z_STREAM_ERROR;\n  }\n  if (state.window !== null && state.wbits !== windowBits) {\n    state.window = null;\n  }\n\n  /* update state and reset the rest of it */\n  state.wrap = wrap;\n  state.wbits = windowBits;\n  return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n  var ret;\n  var state;\n\n  if (!strm) { return Z_STREAM_ERROR; }\n  //strm.msg = Z_NULL;                 /* in case we return an error */\n\n  state = new InflateState();\n\n  //if (state === Z_NULL) return Z_MEM_ERROR;\n  //Tracev((stderr, \"inflate: allocated\\n\"));\n  strm.state = state;\n  state.window = null/*Z_NULL*/;\n  ret = inflateReset2(strm, windowBits);\n  if (ret !== Z_OK) {\n    strm.state = null/*Z_NULL*/;\n  }\n  return ret;\n}\n\nfunction inflateInit(strm) {\n  return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding.  Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter.  This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time.  However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n  /* build fixed huffman tables if first call (may not be thread safe) */\n  if (virgin) {\n    var sym;\n\n    lenfix = new utils.Buf32(512);\n    distfix = new utils.Buf32(32);\n\n    /* literal/length table */\n    sym = 0;\n    while (sym < 144) { state.lens[sym++] = 8; }\n    while (sym < 256) { state.lens[sym++] = 9; }\n    while (sym < 280) { state.lens[sym++] = 7; }\n    while (sym < 288) { state.lens[sym++] = 8; }\n\n    inflate_table(LENS,  state.lens, 0, 288, lenfix,   0, state.work, { bits: 9 });\n\n    /* distance table */\n    sym = 0;\n    while (sym < 32) { state.lens[sym++] = 5; }\n\n    inflate_table(DISTS, state.lens, 0, 32,   distfix, 0, state.work, { bits: 5 });\n\n    /* do this just once */\n    virgin = false;\n  }\n\n  state.lencode = lenfix;\n  state.lenbits = 9;\n  state.distcode = distfix;\n  state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning.  If window does not exist yet, create it.  This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n  var dist;\n  var state = strm.state;\n\n  /* if it hasn't been done already, allocate space for the window */\n  if (state.window === null) {\n    state.wsize = 1 << state.wbits;\n    state.wnext = 0;\n    state.whave = 0;\n\n    state.window = new utils.Buf8(state.wsize);\n  }\n\n  /* copy state->wsize or less output bytes into the circular window */\n  if (copy >= state.wsize) {\n    utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n    state.wnext = 0;\n    state.whave = state.wsize;\n  }\n  else {\n    dist = state.wsize - state.wnext;\n    if (dist > copy) {\n      dist = copy;\n    }\n    //zmemcpy(state->window + state->wnext, end - copy, dist);\n    utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n    copy -= dist;\n    if (copy) {\n      //zmemcpy(state->window, end - copy, copy);\n      utils.arraySet(state.window, src, end - copy, copy, 0);\n      state.wnext = copy;\n      state.whave = state.wsize;\n    }\n    else {\n      state.wnext += dist;\n      if (state.wnext === state.wsize) { state.wnext = 0; }\n      if (state.whave < state.wsize) { state.whave += dist; }\n    }\n  }\n  return 0;\n}\n\nfunction inflate(strm, flush) {\n  var state;\n  var input, output;          // input/output buffers\n  var next;                   /* next input INDEX */\n  var put;                    /* next output INDEX */\n  var have, left;             /* available input and output */\n  var hold;                   /* bit buffer */\n  var bits;                   /* bits in bit buffer */\n  var _in, _out;              /* save starting available input and output */\n  var copy;                   /* number of stored or match bytes to copy */\n  var from;                   /* where to copy match bytes from */\n  var from_source;\n  var here = 0;               /* current decoding table entry */\n  var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n  //var last;                   /* parent table entry */\n  var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n  var len;                    /* length to copy for repeats, bits to drop */\n  var ret;                    /* return code */\n  var hbuf = new utils.Buf8(4);    /* buffer for gzip header crc calculation */\n  var opts;\n\n  var n; // temporary var for NEED_BITS\n\n  var order = /* permutation of code lengths */\n    [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n  if (!strm || !strm.state || !strm.output ||\n      (!strm.input && strm.avail_in !== 0)) {\n    return Z_STREAM_ERROR;\n  }\n\n  state = strm.state;\n  if (state.mode === TYPE) { state.mode = TYPEDO; }    /* skip check */\n\n\n  //--- LOAD() ---\n  put = strm.next_out;\n  output = strm.output;\n  left = strm.avail_out;\n  next = strm.next_in;\n  input = strm.input;\n  have = strm.avail_in;\n  hold = state.hold;\n  bits = state.bits;\n  //---\n\n  _in = have;\n  _out = left;\n  ret = Z_OK;\n\n  inf_leave: // goto emulation\n  for (;;) {\n    switch (state.mode) {\n      case HEAD:\n        if (state.wrap === 0) {\n          state.mode = TYPEDO;\n          break;\n        }\n        //=== NEEDBITS(16);\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if ((state.wrap & 2) && hold === 0x8b1f) {  /* gzip header */\n          state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = crc32(state.check, hbuf, 2, 0);\n          //===//\n\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n          state.mode = FLAGS;\n          break;\n        }\n        state.flags = 0;           /* expect zlib header */\n        if (state.head) {\n          state.head.done = false;\n        }\n        if (!(state.wrap & 1) ||   /* check if zlib header allowed */\n          (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n          strm.msg = 'incorrect header check';\n          state.mode = BAD;\n          break;\n        }\n        if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n          strm.msg = 'unknown compression method';\n          state.mode = BAD;\n          break;\n        }\n        //--- DROPBITS(4) ---//\n        hold >>>= 4;\n        bits -= 4;\n        //---//\n        len = (hold & 0x0f)/*BITS(4)*/ + 8;\n        if (state.wbits === 0) {\n          state.wbits = len;\n        }\n        else if (len > state.wbits) {\n          strm.msg = 'invalid window size';\n          state.mode = BAD;\n          break;\n        }\n        state.dmax = 1 << len;\n        //Tracev((stderr, \"inflate:   zlib header ok\\n\"));\n        strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n        state.mode = hold & 0x200 ? DICTID : TYPE;\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        break;\n      case FLAGS:\n        //=== NEEDBITS(16); */\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.flags = hold;\n        if ((state.flags & 0xff) !== Z_DEFLATED) {\n          strm.msg = 'unknown compression method';\n          state.mode = BAD;\n          break;\n        }\n        if (state.flags & 0xe000) {\n          strm.msg = 'unknown header flags set';\n          state.mode = BAD;\n          break;\n        }\n        if (state.head) {\n          state.head.text = ((hold >> 8) & 1);\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = crc32(state.check, hbuf, 2, 0);\n          //===//\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = TIME;\n        /* falls through */\n      case TIME:\n        //=== NEEDBITS(32); */\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if (state.head) {\n          state.head.time = hold;\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC4(state.check, hold)\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          hbuf[2] = (hold >>> 16) & 0xff;\n          hbuf[3] = (hold >>> 24) & 0xff;\n          state.check = crc32(state.check, hbuf, 4, 0);\n          //===\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = OS;\n        /* falls through */\n      case OS:\n        //=== NEEDBITS(16); */\n        while (bits < 16) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if (state.head) {\n          state.head.xflags = (hold & 0xff);\n          state.head.os = (hold >> 8);\n        }\n        if (state.flags & 0x0200) {\n          //=== CRC2(state.check, hold);\n          hbuf[0] = hold & 0xff;\n          hbuf[1] = (hold >>> 8) & 0xff;\n          state.check = crc32(state.check, hbuf, 2, 0);\n          //===//\n        }\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = EXLEN;\n        /* falls through */\n      case EXLEN:\n        if (state.flags & 0x0400) {\n          //=== NEEDBITS(16); */\n          while (bits < 16) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.length = hold;\n          if (state.head) {\n            state.head.extra_len = hold;\n          }\n          if (state.flags & 0x0200) {\n            //=== CRC2(state.check, hold);\n            hbuf[0] = hold & 0xff;\n            hbuf[1] = (hold >>> 8) & 0xff;\n            state.check = crc32(state.check, hbuf, 2, 0);\n            //===//\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n        }\n        else if (state.head) {\n          state.head.extra = null/*Z_NULL*/;\n        }\n        state.mode = EXTRA;\n        /* falls through */\n      case EXTRA:\n        if (state.flags & 0x0400) {\n          copy = state.length;\n          if (copy > have) { copy = have; }\n          if (copy) {\n            if (state.head) {\n              len = state.head.extra_len - state.length;\n              if (!state.head.extra) {\n                // Use untyped array for more convenient processing later\n                state.head.extra = new Array(state.head.extra_len);\n              }\n              utils.arraySet(\n                state.head.extra,\n                input,\n                next,\n                // extra field is limited to 65536 bytes\n                // - no need for additional size check\n                copy,\n                /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n                len\n              );\n              //zmemcpy(state.head.extra + len, next,\n              //        len + copy > state.head.extra_max ?\n              //        state.head.extra_max - len : copy);\n            }\n            if (state.flags & 0x0200) {\n              state.check = crc32(state.check, input, copy, next);\n            }\n            have -= copy;\n            next += copy;\n            state.length -= copy;\n          }\n          if (state.length) { break inf_leave; }\n        }\n        state.length = 0;\n        state.mode = NAME;\n        /* falls through */\n      case NAME:\n        if (state.flags & 0x0800) {\n          if (have === 0) { break inf_leave; }\n          copy = 0;\n          do {\n            // TODO: 2 or 1 bytes?\n            len = input[next + copy++];\n            /* use constant limit because in js we should not preallocate memory */\n            if (state.head && len &&\n                (state.length < 65536 /*state.head.name_max*/)) {\n              state.head.name += String.fromCharCode(len);\n            }\n          } while (len && copy < have);\n\n          if (state.flags & 0x0200) {\n            state.check = crc32(state.check, input, copy, next);\n          }\n          have -= copy;\n          next += copy;\n          if (len) { break inf_leave; }\n        }\n        else if (state.head) {\n          state.head.name = null;\n        }\n        state.length = 0;\n        state.mode = COMMENT;\n        /* falls through */\n      case COMMENT:\n        if (state.flags & 0x1000) {\n          if (have === 0) { break inf_leave; }\n          copy = 0;\n          do {\n            len = input[next + copy++];\n            /* use constant limit because in js we should not preallocate memory */\n            if (state.head && len &&\n                (state.length < 65536 /*state.head.comm_max*/)) {\n              state.head.comment += String.fromCharCode(len);\n            }\n          } while (len && copy < have);\n          if (state.flags & 0x0200) {\n            state.check = crc32(state.check, input, copy, next);\n          }\n          have -= copy;\n          next += copy;\n          if (len) { break inf_leave; }\n        }\n        else if (state.head) {\n          state.head.comment = null;\n        }\n        state.mode = HCRC;\n        /* falls through */\n      case HCRC:\n        if (state.flags & 0x0200) {\n          //=== NEEDBITS(16); */\n          while (bits < 16) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          if (hold !== (state.check & 0xffff)) {\n            strm.msg = 'header crc mismatch';\n            state.mode = BAD;\n            break;\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n        }\n        if (state.head) {\n          state.head.hcrc = ((state.flags >> 9) & 1);\n          state.head.done = true;\n        }\n        strm.adler = state.check = 0;\n        state.mode = TYPE;\n        break;\n      case DICTID:\n        //=== NEEDBITS(32); */\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        strm.adler = state.check = zswap32(hold);\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = DICT;\n        /* falls through */\n      case DICT:\n        if (state.havedict === 0) {\n          //--- RESTORE() ---\n          strm.next_out = put;\n          strm.avail_out = left;\n          strm.next_in = next;\n          strm.avail_in = have;\n          state.hold = hold;\n          state.bits = bits;\n          //---\n          return Z_NEED_DICT;\n        }\n        strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n        state.mode = TYPE;\n        /* falls through */\n      case TYPE:\n        if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n        /* falls through */\n      case TYPEDO:\n        if (state.last) {\n          //--- BYTEBITS() ---//\n          hold >>>= bits & 7;\n          bits -= bits & 7;\n          //---//\n          state.mode = CHECK;\n          break;\n        }\n        //=== NEEDBITS(3); */\n        while (bits < 3) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.last = (hold & 0x01)/*BITS(1)*/;\n        //--- DROPBITS(1) ---//\n        hold >>>= 1;\n        bits -= 1;\n        //---//\n\n        switch ((hold & 0x03)/*BITS(2)*/) {\n          case 0:                             /* stored block */\n            //Tracev((stderr, \"inflate:     stored block%s\\n\",\n            //        state.last ? \" (last)\" : \"\"));\n            state.mode = STORED;\n            break;\n          case 1:                             /* fixed block */\n            fixedtables(state);\n            //Tracev((stderr, \"inflate:     fixed codes block%s\\n\",\n            //        state.last ? \" (last)\" : \"\"));\n            state.mode = LEN_;             /* decode codes */\n            if (flush === Z_TREES) {\n              //--- DROPBITS(2) ---//\n              hold >>>= 2;\n              bits -= 2;\n              //---//\n              break inf_leave;\n            }\n            break;\n          case 2:                             /* dynamic block */\n            //Tracev((stderr, \"inflate:     dynamic codes block%s\\n\",\n            //        state.last ? \" (last)\" : \"\"));\n            state.mode = TABLE;\n            break;\n          case 3:\n            strm.msg = 'invalid block type';\n            state.mode = BAD;\n        }\n        //--- DROPBITS(2) ---//\n        hold >>>= 2;\n        bits -= 2;\n        //---//\n        break;\n      case STORED:\n        //--- BYTEBITS() ---// /* go to byte boundary */\n        hold >>>= bits & 7;\n        bits -= bits & 7;\n        //---//\n        //=== NEEDBITS(32); */\n        while (bits < 32) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n          strm.msg = 'invalid stored block lengths';\n          state.mode = BAD;\n          break;\n        }\n        state.length = hold & 0xffff;\n        //Tracev((stderr, \"inflate:       stored length %u\\n\",\n        //        state.length));\n        //=== INITBITS();\n        hold = 0;\n        bits = 0;\n        //===//\n        state.mode = COPY_;\n        if (flush === Z_TREES) { break inf_leave; }\n        /* falls through */\n      case COPY_:\n        state.mode = COPY;\n        /* falls through */\n      case COPY:\n        copy = state.length;\n        if (copy) {\n          if (copy > have) { copy = have; }\n          if (copy > left) { copy = left; }\n          if (copy === 0) { break inf_leave; }\n          //--- zmemcpy(put, next, copy); ---\n          utils.arraySet(output, input, next, copy, put);\n          //---//\n          have -= copy;\n          next += copy;\n          left -= copy;\n          put += copy;\n          state.length -= copy;\n          break;\n        }\n        //Tracev((stderr, \"inflate:       stored end\\n\"));\n        state.mode = TYPE;\n        break;\n      case TABLE:\n        //=== NEEDBITS(14); */\n        while (bits < 14) {\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n        }\n        //===//\n        state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n        //--- DROPBITS(5) ---//\n        hold >>>= 5;\n        bits -= 5;\n        //---//\n        state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n        //--- DROPBITS(5) ---//\n        hold >>>= 5;\n        bits -= 5;\n        //---//\n        state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n        //--- DROPBITS(4) ---//\n        hold >>>= 4;\n        bits -= 4;\n        //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n        if (state.nlen > 286 || state.ndist > 30) {\n          strm.msg = 'too many length or distance symbols';\n          state.mode = BAD;\n          break;\n        }\n//#endif\n        //Tracev((stderr, \"inflate:       table sizes ok\\n\"));\n        state.have = 0;\n        state.mode = LENLENS;\n        /* falls through */\n      case LENLENS:\n        while (state.have < state.ncode) {\n          //=== NEEDBITS(3);\n          while (bits < 3) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n          //--- DROPBITS(3) ---//\n          hold >>>= 3;\n          bits -= 3;\n          //---//\n        }\n        while (state.have < 19) {\n          state.lens[order[state.have++]] = 0;\n        }\n        // We have separate tables & no pointers. 2 commented lines below not needed.\n        //state.next = state.codes;\n        //state.lencode = state.next;\n        // Switch to use dynamic table\n        state.lencode = state.lendyn;\n        state.lenbits = 7;\n\n        opts = { bits: state.lenbits };\n        ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n        state.lenbits = opts.bits;\n\n        if (ret) {\n          strm.msg = 'invalid code lengths set';\n          state.mode = BAD;\n          break;\n        }\n        //Tracev((stderr, \"inflate:       code lengths ok\\n\"));\n        state.have = 0;\n        state.mode = CODELENS;\n        /* falls through */\n      case CODELENS:\n        while (state.have < state.nlen + state.ndist) {\n          for (;;) {\n            here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n            here_bits = here >>> 24;\n            here_op = (here >>> 16) & 0xff;\n            here_val = here & 0xffff;\n\n            if ((here_bits) <= bits) { break; }\n            //--- PULLBYTE() ---//\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n            //---//\n          }\n          if (here_val < 16) {\n            //--- DROPBITS(here.bits) ---//\n            hold >>>= here_bits;\n            bits -= here_bits;\n            //---//\n            state.lens[state.have++] = here_val;\n          }\n          else {\n            if (here_val === 16) {\n              //=== NEEDBITS(here.bits + 2);\n              n = here_bits + 2;\n              while (bits < n) {\n                if (have === 0) { break inf_leave; }\n                have--;\n                hold += input[next++] << bits;\n                bits += 8;\n              }\n              //===//\n              //--- DROPBITS(here.bits) ---//\n              hold >>>= here_bits;\n              bits -= here_bits;\n              //---//\n              if (state.have === 0) {\n                strm.msg = 'invalid bit length repeat';\n                state.mode = BAD;\n                break;\n              }\n              len = state.lens[state.have - 1];\n              copy = 3 + (hold & 0x03);//BITS(2);\n              //--- DROPBITS(2) ---//\n              hold >>>= 2;\n              bits -= 2;\n              //---//\n            }\n            else if (here_val === 17) {\n              //=== NEEDBITS(here.bits + 3);\n              n = here_bits + 3;\n              while (bits < n) {\n                if (have === 0) { break inf_leave; }\n                have--;\n                hold += input[next++] << bits;\n                bits += 8;\n              }\n              //===//\n              //--- DROPBITS(here.bits) ---//\n              hold >>>= here_bits;\n              bits -= here_bits;\n              //---//\n              len = 0;\n              copy = 3 + (hold & 0x07);//BITS(3);\n              //--- DROPBITS(3) ---//\n              hold >>>= 3;\n              bits -= 3;\n              //---//\n            }\n            else {\n              //=== NEEDBITS(here.bits + 7);\n              n = here_bits + 7;\n              while (bits < n) {\n                if (have === 0) { break inf_leave; }\n                have--;\n                hold += input[next++] << bits;\n                bits += 8;\n              }\n              //===//\n              //--- DROPBITS(here.bits) ---//\n              hold >>>= here_bits;\n              bits -= here_bits;\n              //---//\n              len = 0;\n              copy = 11 + (hold & 0x7f);//BITS(7);\n              //--- DROPBITS(7) ---//\n              hold >>>= 7;\n              bits -= 7;\n              //---//\n            }\n            if (state.have + copy > state.nlen + state.ndist) {\n              strm.msg = 'invalid bit length repeat';\n              state.mode = BAD;\n              break;\n            }\n            while (copy--) {\n              state.lens[state.have++] = len;\n            }\n          }\n        }\n\n        /* handle error breaks in while */\n        if (state.mode === BAD) { break; }\n\n        /* check for end-of-block code (better have one) */\n        if (state.lens[256] === 0) {\n          strm.msg = 'invalid code -- missing end-of-block';\n          state.mode = BAD;\n          break;\n        }\n\n        /* build code tables -- note: do not change the lenbits or distbits\n           values here (9 and 6) without reading the comments in inftrees.h\n           concerning the ENOUGH constants, which depend on those values */\n        state.lenbits = 9;\n\n        opts = { bits: state.lenbits };\n        ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n        // We have separate tables & no pointers. 2 commented lines below not needed.\n        // state.next_index = opts.table_index;\n        state.lenbits = opts.bits;\n        // state.lencode = state.next;\n\n        if (ret) {\n          strm.msg = 'invalid literal/lengths set';\n          state.mode = BAD;\n          break;\n        }\n\n        state.distbits = 6;\n        //state.distcode.copy(state.codes);\n        // Switch to use dynamic table\n        state.distcode = state.distdyn;\n        opts = { bits: state.distbits };\n        ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n        // We have separate tables & no pointers. 2 commented lines below not needed.\n        // state.next_index = opts.table_index;\n        state.distbits = opts.bits;\n        // state.distcode = state.next;\n\n        if (ret) {\n          strm.msg = 'invalid distances set';\n          state.mode = BAD;\n          break;\n        }\n        //Tracev((stderr, 'inflate:       codes ok\\n'));\n        state.mode = LEN_;\n        if (flush === Z_TREES) { break inf_leave; }\n        /* falls through */\n      case LEN_:\n        state.mode = LEN;\n        /* falls through */\n      case LEN:\n        if (have >= 6 && left >= 258) {\n          //--- RESTORE() ---\n          strm.next_out = put;\n          strm.avail_out = left;\n          strm.next_in = next;\n          strm.avail_in = have;\n          state.hold = hold;\n          state.bits = bits;\n          //---\n          inflate_fast(strm, _out);\n          //--- LOAD() ---\n          put = strm.next_out;\n          output = strm.output;\n          left = strm.avail_out;\n          next = strm.next_in;\n          input = strm.input;\n          have = strm.avail_in;\n          hold = state.hold;\n          bits = state.bits;\n          //---\n\n          if (state.mode === TYPE) {\n            state.back = -1;\n          }\n          break;\n        }\n        state.back = 0;\n        for (;;) {\n          here = state.lencode[hold & ((1 << state.lenbits) - 1)];  /*BITS(state.lenbits)*/\n          here_bits = here >>> 24;\n          here_op = (here >>> 16) & 0xff;\n          here_val = here & 0xffff;\n\n          if (here_bits <= bits) { break; }\n          //--- PULLBYTE() ---//\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n          //---//\n        }\n        if (here_op && (here_op & 0xf0) === 0) {\n          last_bits = here_bits;\n          last_op = here_op;\n          last_val = here_val;\n          for (;;) {\n            here = state.lencode[last_val +\n                    ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n            here_bits = here >>> 24;\n            here_op = (here >>> 16) & 0xff;\n            here_val = here & 0xffff;\n\n            if ((last_bits + here_bits) <= bits) { break; }\n            //--- PULLBYTE() ---//\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n            //---//\n          }\n          //--- DROPBITS(last.bits) ---//\n          hold >>>= last_bits;\n          bits -= last_bits;\n          //---//\n          state.back += last_bits;\n        }\n        //--- DROPBITS(here.bits) ---//\n        hold >>>= here_bits;\n        bits -= here_bits;\n        //---//\n        state.back += here_bits;\n        state.length = here_val;\n        if (here_op === 0) {\n          //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n          //        \"inflate:         literal '%c'\\n\" :\n          //        \"inflate:         literal 0x%02x\\n\", here.val));\n          state.mode = LIT;\n          break;\n        }\n        if (here_op & 32) {\n          //Tracevv((stderr, \"inflate:         end of block\\n\"));\n          state.back = -1;\n          state.mode = TYPE;\n          break;\n        }\n        if (here_op & 64) {\n          strm.msg = 'invalid literal/length code';\n          state.mode = BAD;\n          break;\n        }\n        state.extra = here_op & 15;\n        state.mode = LENEXT;\n        /* falls through */\n      case LENEXT:\n        if (state.extra) {\n          //=== NEEDBITS(state.extra);\n          n = state.extra;\n          while (bits < n) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n          //--- DROPBITS(state.extra) ---//\n          hold >>>= state.extra;\n          bits -= state.extra;\n          //---//\n          state.back += state.extra;\n        }\n        //Tracevv((stderr, \"inflate:         length %u\\n\", state.length));\n        state.was = state.length;\n        state.mode = DIST;\n        /* falls through */\n      case DIST:\n        for (;;) {\n          here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n          here_bits = here >>> 24;\n          here_op = (here >>> 16) & 0xff;\n          here_val = here & 0xffff;\n\n          if ((here_bits) <= bits) { break; }\n          //--- PULLBYTE() ---//\n          if (have === 0) { break inf_leave; }\n          have--;\n          hold += input[next++] << bits;\n          bits += 8;\n          //---//\n        }\n        if ((here_op & 0xf0) === 0) {\n          last_bits = here_bits;\n          last_op = here_op;\n          last_val = here_val;\n          for (;;) {\n            here = state.distcode[last_val +\n                    ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n            here_bits = here >>> 24;\n            here_op = (here >>> 16) & 0xff;\n            here_val = here & 0xffff;\n\n            if ((last_bits + here_bits) <= bits) { break; }\n            //--- PULLBYTE() ---//\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n            //---//\n          }\n          //--- DROPBITS(last.bits) ---//\n          hold >>>= last_bits;\n          bits -= last_bits;\n          //---//\n          state.back += last_bits;\n        }\n        //--- DROPBITS(here.bits) ---//\n        hold >>>= here_bits;\n        bits -= here_bits;\n        //---//\n        state.back += here_bits;\n        if (here_op & 64) {\n          strm.msg = 'invalid distance code';\n          state.mode = BAD;\n          break;\n        }\n        state.offset = here_val;\n        state.extra = (here_op) & 15;\n        state.mode = DISTEXT;\n        /* falls through */\n      case DISTEXT:\n        if (state.extra) {\n          //=== NEEDBITS(state.extra);\n          n = state.extra;\n          while (bits < n) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n          //--- DROPBITS(state.extra) ---//\n          hold >>>= state.extra;\n          bits -= state.extra;\n          //---//\n          state.back += state.extra;\n        }\n//#ifdef INFLATE_STRICT\n        if (state.offset > state.dmax) {\n          strm.msg = 'invalid distance too far back';\n          state.mode = BAD;\n          break;\n        }\n//#endif\n        //Tracevv((stderr, \"inflate:         distance %u\\n\", state.offset));\n        state.mode = MATCH;\n        /* falls through */\n      case MATCH:\n        if (left === 0) { break inf_leave; }\n        copy = _out - left;\n        if (state.offset > copy) {         /* copy from window */\n          copy = state.offset - copy;\n          if (copy > state.whave) {\n            if (state.sane) {\n              strm.msg = 'invalid distance too far back';\n              state.mode = BAD;\n              break;\n            }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n//          Trace((stderr, \"inflate.c too far\\n\"));\n//          copy -= state.whave;\n//          if (copy > state.length) { copy = state.length; }\n//          if (copy > left) { copy = left; }\n//          left -= copy;\n//          state.length -= copy;\n//          do {\n//            output[put++] = 0;\n//          } while (--copy);\n//          if (state.length === 0) { state.mode = LEN; }\n//          break;\n//#endif\n          }\n          if (copy > state.wnext) {\n            copy -= state.wnext;\n            from = state.wsize - copy;\n          }\n          else {\n            from = state.wnext - copy;\n          }\n          if (copy > state.length) { copy = state.length; }\n          from_source = state.window;\n        }\n        else {                              /* copy from output */\n          from_source = output;\n          from = put - state.offset;\n          copy = state.length;\n        }\n        if (copy > left) { copy = left; }\n        left -= copy;\n        state.length -= copy;\n        do {\n          output[put++] = from_source[from++];\n        } while (--copy);\n        if (state.length === 0) { state.mode = LEN; }\n        break;\n      case LIT:\n        if (left === 0) { break inf_leave; }\n        output[put++] = state.length;\n        left--;\n        state.mode = LEN;\n        break;\n      case CHECK:\n        if (state.wrap) {\n          //=== NEEDBITS(32);\n          while (bits < 32) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            // Use '|' instead of '+' to make sure that result is signed\n            hold |= input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          _out -= left;\n          strm.total_out += _out;\n          state.total += _out;\n          if (_out) {\n            strm.adler = state.check =\n                /*UPDATE(state.check, put - _out, _out);*/\n                (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n          }\n          _out = left;\n          // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n          if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n            strm.msg = 'incorrect data check';\n            state.mode = BAD;\n            break;\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n          //Tracev((stderr, \"inflate:   check matches trailer\\n\"));\n        }\n        state.mode = LENGTH;\n        /* falls through */\n      case LENGTH:\n        if (state.wrap && state.flags) {\n          //=== NEEDBITS(32);\n          while (bits < 32) {\n            if (have === 0) { break inf_leave; }\n            have--;\n            hold += input[next++] << bits;\n            bits += 8;\n          }\n          //===//\n          if (hold !== (state.total & 0xffffffff)) {\n            strm.msg = 'incorrect length check';\n            state.mode = BAD;\n            break;\n          }\n          //=== INITBITS();\n          hold = 0;\n          bits = 0;\n          //===//\n          //Tracev((stderr, \"inflate:   length matches trailer\\n\"));\n        }\n        state.mode = DONE;\n        /* falls through */\n      case DONE:\n        ret = Z_STREAM_END;\n        break inf_leave;\n      case BAD:\n        ret = Z_DATA_ERROR;\n        break inf_leave;\n      case MEM:\n        return Z_MEM_ERROR;\n      case SYNC:\n        /* falls through */\n      default:\n        return Z_STREAM_ERROR;\n    }\n  }\n\n  // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n  /*\n     Return from inflate(), updating the total counts and the check value.\n     If there was no progress during the inflate() call, return a buffer\n     error.  Call updatewindow() to create and/or update the window state.\n     Note: a memory error from inflate() is non-recoverable.\n   */\n\n  //--- RESTORE() ---\n  strm.next_out = put;\n  strm.avail_out = left;\n  strm.next_in = next;\n  strm.avail_in = have;\n  state.hold = hold;\n  state.bits = bits;\n  //---\n\n  if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n                      (state.mode < CHECK || flush !== Z_FINISH))) {\n    if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n      state.mode = MEM;\n      return Z_MEM_ERROR;\n    }\n  }\n  _in -= strm.avail_in;\n  _out -= strm.avail_out;\n  strm.total_in += _in;\n  strm.total_out += _out;\n  state.total += _out;\n  if (state.wrap && _out) {\n    strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n      (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n  }\n  strm.data_type = state.bits + (state.last ? 64 : 0) +\n                    (state.mode === TYPE ? 128 : 0) +\n                    (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n  if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n    ret = Z_BUF_ERROR;\n  }\n  return ret;\n}\n\nfunction inflateEnd(strm) {\n\n  if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n    return Z_STREAM_ERROR;\n  }\n\n  var state = strm.state;\n  if (state.window) {\n    state.window = null;\n  }\n  strm.state = null;\n  return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n  var state;\n\n  /* check state */\n  if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n  state = strm.state;\n  if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n  /* save header structure */\n  state.head = head;\n  head.done = false;\n  return Z_OK;\n}\n\nfunction inflateSetDictionary(strm, dictionary) {\n  var dictLength = dictionary.length;\n\n  var state;\n  var dictid;\n  var ret;\n\n  /* check state */\n  if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n  state = strm.state;\n\n  if (state.wrap !== 0 && state.mode !== DICT) {\n    return Z_STREAM_ERROR;\n  }\n\n  /* check for correct dictionary identifier */\n  if (state.mode === DICT) {\n    dictid = 1; /* adler32(0, null, 0)*/\n    /* dictid = adler32(dictid, dictionary, dictLength); */\n    dictid = adler32(dictid, dictionary, dictLength, 0);\n    if (dictid !== state.check) {\n      return Z_DATA_ERROR;\n    }\n  }\n  /* copy dictionary to window using updatewindow(), which will amend the\n   existing dictionary if appropriate */\n  ret = updatewindow(strm, dictionary, dictLength, dictLength);\n  if (ret) {\n    state.mode = MEM;\n    return Z_MEM_ERROR;\n  }\n  state.havedict = 1;\n  // Tracev((stderr, \"inflate:   dictionary set\\n\"));\n  return Z_OK;\n}\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction adler32(adler, buf, len, pos) {\n  var s1 = (adler & 0xffff) |0,\n      s2 = ((adler >>> 16) & 0xffff) |0,\n      n = 0;\n\n  while (len !== 0) {\n    // Set limit ~ twice less than 5552, to keep\n    // s2 in 31-bits, because we force signed ints.\n    // in other case %= will fail.\n    n = len > 2000 ? 2000 : len;\n    len -= n;\n\n    do {\n      s1 = (s1 + buf[pos++]) |0;\n      s2 = (s2 + s1) |0;\n    } while (--n);\n\n    s1 %= 65521;\n    s2 %= 65521;\n  }\n\n  return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n  var c, table = [];\n\n  for (var n = 0; n < 256; n++) {\n    c = n;\n    for (var k = 0; k < 8; k++) {\n      c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n    }\n    table[n] = c;\n  }\n\n  return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n  var t = crcTable,\n      end = pos + len;\n\n  crc ^= -1;\n\n  for (var i = pos; i < end; i++) {\n    crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n  }\n\n  return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nvar BAD = 30;       /* got a data error -- remain here until reset */\nvar TYPE = 12;      /* i: waiting for type bits, including last-flag bit */\n\n/*\n   Decode literal, length, and distance codes and write out the resulting\n   literal and match bytes until either not enough input or output is\n   available, an end-of-block is encountered, or a data error is encountered.\n   When large enough input and output buffers are supplied to inflate(), for\n   example, a 16K input buffer and a 64K output buffer, more than 95% of the\n   inflate execution time is spent in this routine.\n\n   Entry assumptions:\n\n        state.mode === LEN\n        strm.avail_in >= 6\n        strm.avail_out >= 258\n        start >= strm.avail_out\n        state.bits < 8\n\n   On return, state.mode is one of:\n\n        LEN -- ran out of enough output space or enough available input\n        TYPE -- reached end of block code, inflate() to interpret next block\n        BAD -- error in block data\n\n   Notes:\n\n    - The maximum input bits used by a length/distance pair is 15 bits for the\n      length code, 5 bits for the length extra, 15 bits for the distance code,\n      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.\n      Therefore if strm.avail_in >= 6, then there is enough input to avoid\n      checking for available input while decoding.\n\n    - The maximum bytes that a single length/distance pair can output is 258\n      bytes, which is the maximum length that can be coded.  inflate_fast()\n      requires strm.avail_out >= 258 for each loop to avoid checking for\n      output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n  var state;\n  var _in;                    /* local strm.input */\n  var last;                   /* have enough input while in < last */\n  var _out;                   /* local strm.output */\n  var beg;                    /* inflate()'s initial strm.output */\n  var end;                    /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n  var dmax;                   /* maximum distance from zlib header */\n//#endif\n  var wsize;                  /* window size or zero if not using window */\n  var whave;                  /* valid bytes in the window */\n  var wnext;                  /* window write index */\n  // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n  var s_window;               /* allocated sliding window, if wsize != 0 */\n  var hold;                   /* local strm.hold */\n  var bits;                   /* local strm.bits */\n  var lcode;                  /* local strm.lencode */\n  var dcode;                  /* local strm.distcode */\n  var lmask;                  /* mask for first level of length codes */\n  var dmask;                  /* mask for first level of distance codes */\n  var here;                   /* retrieved table entry */\n  var op;                     /* code bits, operation, extra bits, or */\n                              /*  window position, window bytes to copy */\n  var len;                    /* match length, unused bytes */\n  var dist;                   /* match distance */\n  var from;                   /* where to copy match from */\n  var from_source;\n\n\n  var input, output; // JS specific, because we have no pointers\n\n  /* copy state to local variables */\n  state = strm.state;\n  //here = state.here;\n  _in = strm.next_in;\n  input = strm.input;\n  last = _in + (strm.avail_in - 5);\n  _out = strm.next_out;\n  output = strm.output;\n  beg = _out - (start - strm.avail_out);\n  end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n  dmax = state.dmax;\n//#endif\n  wsize = state.wsize;\n  whave = state.whave;\n  wnext = state.wnext;\n  s_window = state.window;\n  hold = state.hold;\n  bits = state.bits;\n  lcode = state.lencode;\n  dcode = state.distcode;\n  lmask = (1 << state.lenbits) - 1;\n  dmask = (1 << state.distbits) - 1;\n\n\n  /* decode literals and length/distances until end-of-block or not enough\n     input data or output space */\n\n  top:\n  do {\n    if (bits < 15) {\n      hold += input[_in++] << bits;\n      bits += 8;\n      hold += input[_in++] << bits;\n      bits += 8;\n    }\n\n    here = lcode[hold & lmask];\n\n    dolen:\n    for (;;) { // Goto emulation\n      op = here >>> 24/*here.bits*/;\n      hold >>>= op;\n      bits -= op;\n      op = (here >>> 16) & 0xff/*here.op*/;\n      if (op === 0) {                          /* literal */\n        //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n        //        \"inflate:         literal '%c'\\n\" :\n        //        \"inflate:         literal 0x%02x\\n\", here.val));\n        output[_out++] = here & 0xffff/*here.val*/;\n      }\n      else if (op & 16) {                     /* length base */\n        len = here & 0xffff/*here.val*/;\n        op &= 15;                           /* number of extra bits */\n        if (op) {\n          if (bits < op) {\n            hold += input[_in++] << bits;\n            bits += 8;\n          }\n          len += hold & ((1 << op) - 1);\n          hold >>>= op;\n          bits -= op;\n        }\n        //Tracevv((stderr, \"inflate:         length %u\\n\", len));\n        if (bits < 15) {\n          hold += input[_in++] << bits;\n          bits += 8;\n          hold += input[_in++] << bits;\n          bits += 8;\n        }\n        here = dcode[hold & dmask];\n\n        dodist:\n        for (;;) { // goto emulation\n          op = here >>> 24/*here.bits*/;\n          hold >>>= op;\n          bits -= op;\n          op = (here >>> 16) & 0xff/*here.op*/;\n\n          if (op & 16) {                      /* distance base */\n            dist = here & 0xffff/*here.val*/;\n            op &= 15;                       /* number of extra bits */\n            if (bits < op) {\n              hold += input[_in++] << bits;\n              bits += 8;\n              if (bits < op) {\n                hold += input[_in++] << bits;\n                bits += 8;\n              }\n            }\n            dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n            if (dist > dmax) {\n              strm.msg = 'invalid distance too far back';\n              state.mode = BAD;\n              break top;\n            }\n//#endif\n            hold >>>= op;\n            bits -= op;\n            //Tracevv((stderr, \"inflate:         distance %u\\n\", dist));\n            op = _out - beg;                /* max distance in output */\n            if (dist > op) {                /* see if copy from window */\n              op = dist - op;               /* distance back in window */\n              if (op > whave) {\n                if (state.sane) {\n                  strm.msg = 'invalid distance too far back';\n                  state.mode = BAD;\n                  break top;\n                }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n//                if (len <= op - whave) {\n//                  do {\n//                    output[_out++] = 0;\n//                  } while (--len);\n//                  continue top;\n//                }\n//                len -= op - whave;\n//                do {\n//                  output[_out++] = 0;\n//                } while (--op > whave);\n//                if (op === 0) {\n//                  from = _out - dist;\n//                  do {\n//                    output[_out++] = output[from++];\n//                  } while (--len);\n//                  continue top;\n//                }\n//#endif\n              }\n              from = 0; // window index\n              from_source = s_window;\n              if (wnext === 0) {           /* very common case */\n                from += wsize - op;\n                if (op < len) {         /* some from window */\n                  len -= op;\n                  do {\n                    output[_out++] = s_window[from++];\n                  } while (--op);\n                  from = _out - dist;  /* rest from output */\n                  from_source = output;\n                }\n              }\n              else if (wnext < op) {      /* wrap around window */\n                from += wsize + wnext - op;\n                op -= wnext;\n                if (op < len) {         /* some from end of window */\n                  len -= op;\n                  do {\n                    output[_out++] = s_window[from++];\n                  } while (--op);\n                  from = 0;\n                  if (wnext < len) {  /* some from start of window */\n                    op = wnext;\n                    len -= op;\n                    do {\n                      output[_out++] = s_window[from++];\n                    } while (--op);\n                    from = _out - dist;      /* rest from output */\n                    from_source = output;\n                  }\n                }\n              }\n              else {                      /* contiguous in window */\n                from += wnext - op;\n                if (op < len) {         /* some from window */\n                  len -= op;\n                  do {\n                    output[_out++] = s_window[from++];\n                  } while (--op);\n                  from = _out - dist;  /* rest from output */\n                  from_source = output;\n                }\n              }\n              while (len > 2) {\n                output[_out++] = from_source[from++];\n                output[_out++] = from_source[from++];\n                output[_out++] = from_source[from++];\n                len -= 3;\n              }\n              if (len) {\n                output[_out++] = from_source[from++];\n                if (len > 1) {\n                  output[_out++] = from_source[from++];\n                }\n              }\n            }\n            else {\n              from = _out - dist;          /* copy direct from output */\n              do {                        /* minimum length is three */\n                output[_out++] = output[from++];\n                output[_out++] = output[from++];\n                output[_out++] = output[from++];\n                len -= 3;\n              } while (len > 2);\n              if (len) {\n                output[_out++] = output[from++];\n                if (len > 1) {\n                  output[_out++] = output[from++];\n                }\n              }\n            }\n          }\n          else if ((op & 64) === 0) {          /* 2nd level distance code */\n            here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n            continue dodist;\n          }\n          else {\n            strm.msg = 'invalid distance code';\n            state.mode = BAD;\n            break top;\n          }\n\n          break; // need to emulate goto via \"continue\"\n        }\n      }\n      else if ((op & 64) === 0) {              /* 2nd level length code */\n        here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n        continue dolen;\n      }\n      else if (op & 32) {                     /* end-of-block */\n        //Tracevv((stderr, \"inflate:         end of block\\n\"));\n        state.mode = TYPE;\n        break top;\n      }\n      else {\n        strm.msg = 'invalid literal/length code';\n        state.mode = BAD;\n        break top;\n      }\n\n      break; // need to emulate goto via \"continue\"\n    }\n  } while (_in < last && _out < end);\n\n  /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n  len = bits >> 3;\n  _in -= len;\n  bits -= len << 3;\n  hold &= (1 << bits) - 1;\n\n  /* update state and return */\n  strm.next_in = _in;\n  strm.next_out = _out;\n  strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n  strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n  state.hold = hold;\n  state.bits = bits;\n  return;\n};\n\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = __webpack_require__(12);\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n  3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n  35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n  16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n  19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n  1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n  257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n  8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n  16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n  23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n  28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n  var bits = opts.bits;\n      //here = opts.here; /* table entry for duplication */\n\n  var len = 0;               /* a code's length in bits */\n  var sym = 0;               /* index of code symbols */\n  var min = 0, max = 0;          /* minimum and maximum code lengths */\n  var root = 0;              /* number of index bits for root table */\n  var curr = 0;              /* number of index bits for current table */\n  var drop = 0;              /* code bits to drop for sub-table */\n  var left = 0;                   /* number of prefix codes available */\n  var used = 0;              /* code entries in table used */\n  var huff = 0;              /* Huffman code */\n  var incr;              /* for incrementing code, index */\n  var fill;              /* index for replicating entries */\n  var low;               /* low bits for current root entry */\n  var mask;              /* mask for low root bits */\n  var next;             /* next available space in table */\n  var base = null;     /* base value table to use */\n  var base_index = 0;\n//  var shoextra;    /* extra bits table to use */\n  var end;                    /* use base and extra for symbol > end */\n  var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1];    /* number of codes of each length */\n  var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1];     /* offsets in table for each length */\n  var extra = null;\n  var extra_index = 0;\n\n  var here_bits, here_op, here_val;\n\n  /*\n   Process a set of code lengths to create a canonical Huffman code.  The\n   code lengths are lens[0..codes-1].  Each length corresponds to the\n   symbols 0..codes-1.  The Huffman code is generated by first sorting the\n   symbols by length from short to long, and retaining the symbol order\n   for codes with equal lengths.  Then the code starts with all zero bits\n   for the first code of the shortest length, and the codes are integer\n   increments for the same length, and zeros are appended as the length\n   increases.  For the deflate format, these bits are stored backwards\n   from their more natural integer increment ordering, and so when the\n   decoding tables are built in the large loop below, the integer codes\n   are incremented backwards.\n\n   This routine assumes, but does not check, that all of the entries in\n   lens[] are in the range 0..MAXBITS.  The caller must assure this.\n   1..MAXBITS is interpreted as that code length.  zero means that that\n   symbol does not occur in this code.\n\n   The codes are sorted by computing a count of codes for each length,\n   creating from that a table of starting indices for each length in the\n   sorted table, and then entering the symbols in order in the sorted\n   table.  The sorted table is work[], with that space being provided by\n   the caller.\n\n   The length counts are used for other purposes as well, i.e. finding\n   the minimum and maximum length codes, determining if there are any\n   codes at all, checking for a valid set of lengths, and looking ahead\n   at length counts to determine sub-table sizes when building the\n   decoding tables.\n   */\n\n  /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n  for (len = 0; len <= MAXBITS; len++) {\n    count[len] = 0;\n  }\n  for (sym = 0; sym < codes; sym++) {\n    count[lens[lens_index + sym]]++;\n  }\n\n  /* bound code lengths, force root to be within code lengths */\n  root = bits;\n  for (max = MAXBITS; max >= 1; max--) {\n    if (count[max] !== 0) { break; }\n  }\n  if (root > max) {\n    root = max;\n  }\n  if (max === 0) {                     /* no symbols to code at all */\n    //table.op[opts.table_index] = 64;  //here.op = (var char)64;    /* invalid code marker */\n    //table.bits[opts.table_index] = 1;   //here.bits = (var char)1;\n    //table.val[opts.table_index++] = 0;   //here.val = (var short)0;\n    table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n    //table.op[opts.table_index] = 64;\n    //table.bits[opts.table_index] = 1;\n    //table.val[opts.table_index++] = 0;\n    table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n    opts.bits = 1;\n    return 0;     /* no symbols, but wait for decoding to report error */\n  }\n  for (min = 1; min < max; min++) {\n    if (count[min] !== 0) { break; }\n  }\n  if (root < min) {\n    root = min;\n  }\n\n  /* check for an over-subscribed or incomplete set of lengths */\n  left = 1;\n  for (len = 1; len <= MAXBITS; len++) {\n    left <<= 1;\n    left -= count[len];\n    if (left < 0) {\n      return -1;\n    }        /* over-subscribed */\n  }\n  if (left > 0 && (type === CODES || max !== 1)) {\n    return -1;                      /* incomplete set */\n  }\n\n  /* generate offsets into symbol table for each length for sorting */\n  offs[1] = 0;\n  for (len = 1; len < MAXBITS; len++) {\n    offs[len + 1] = offs[len] + count[len];\n  }\n\n  /* sort symbols by length, by symbol order within each length */\n  for (sym = 0; sym < codes; sym++) {\n    if (lens[lens_index + sym] !== 0) {\n      work[offs[lens[lens_index + sym]]++] = sym;\n    }\n  }\n\n  /*\n   Create and fill in decoding tables.  In this loop, the table being\n   filled is at next and has curr index bits.  The code being used is huff\n   with length len.  That code is converted to an index by dropping drop\n   bits off of the bottom.  For codes where len is less than drop + curr,\n   those top drop + curr - len bits are incremented through all values to\n   fill the table with replicated entries.\n\n   root is the number of index bits for the root table.  When len exceeds\n   root, sub-tables are created pointed to by the root entry with an index\n   of the low root bits of huff.  This is saved in low to check for when a\n   new sub-table should be started.  drop is zero when the root table is\n   being filled, and drop is root when sub-tables are being filled.\n\n   When a new sub-table is needed, it is necessary to look ahead in the\n   code lengths to determine what size sub-table is needed.  The length\n   counts are used for this, and so count[] is decremented as codes are\n   entered in the tables.\n\n   used keeps track of how many table entries have been allocated from the\n   provided *table space.  It is checked for LENS and DIST tables against\n   the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n   the initial root table size constants.  See the comments in inftrees.h\n   for more information.\n\n   sym increments through all symbols, and the loop terminates when\n   all codes of length max, i.e. all codes, have been processed.  This\n   routine permits incomplete codes, so another loop after this one fills\n   in the rest of the decoding tables with invalid code markers.\n   */\n\n  /* set up for code type */\n  // poor man optimization - use if-else instead of switch,\n  // to avoid deopts in old v8\n  if (type === CODES) {\n    base = extra = work;    /* dummy value--not used */\n    end = 19;\n\n  } else if (type === LENS) {\n    base = lbase;\n    base_index -= 257;\n    extra = lext;\n    extra_index -= 257;\n    end = 256;\n\n  } else {                    /* DISTS */\n    base = dbase;\n    extra = dext;\n    end = -1;\n  }\n\n  /* initialize opts for loop */\n  huff = 0;                   /* starting code */\n  sym = 0;                    /* starting code symbol */\n  len = min;                  /* starting code length */\n  next = table_index;              /* current table to fill in */\n  curr = root;                /* current table index bits */\n  drop = 0;                   /* current bits to drop from code for index */\n  low = -1;                   /* trigger new sub-table when len > root */\n  used = 1 << root;          /* use root table entries */\n  mask = used - 1;            /* mask for comparing low */\n\n  /* check available table space */\n  if ((type === LENS && used > ENOUGH_LENS) ||\n    (type === DISTS && used > ENOUGH_DISTS)) {\n    return 1;\n  }\n\n  /* process all codes and make table entries */\n  for (;;) {\n    /* create table entry */\n    here_bits = len - drop;\n    if (work[sym] < end) {\n      here_op = 0;\n      here_val = work[sym];\n    }\n    else if (work[sym] > end) {\n      here_op = extra[extra_index + work[sym]];\n      here_val = base[base_index + work[sym]];\n    }\n    else {\n      here_op = 32 + 64;         /* end of block */\n      here_val = 0;\n    }\n\n    /* replicate for those indices with low len bits equal to huff */\n    incr = 1 << (len - drop);\n    fill = 1 << curr;\n    min = fill;                 /* save offset to next table */\n    do {\n      fill -= incr;\n      table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n    } while (fill !== 0);\n\n    /* backwards increment the len-bit code huff */\n    incr = 1 << (len - 1);\n    while (huff & incr) {\n      incr >>= 1;\n    }\n    if (incr !== 0) {\n      huff &= incr - 1;\n      huff += incr;\n    } else {\n      huff = 0;\n    }\n\n    /* go to next symbol, update count, len */\n    sym++;\n    if (--count[len] === 0) {\n      if (len === max) { break; }\n      len = lens[lens_index + work[sym]];\n    }\n\n    /* create new sub-table if needed */\n    if (len > root && (huff & mask) !== low) {\n      /* if first time, transition to sub-tables */\n      if (drop === 0) {\n        drop = root;\n      }\n\n      /* increment past last table */\n      next += min;            /* here min is 1 << curr */\n\n      /* determine length of next table */\n      curr = len - drop;\n      left = 1 << curr;\n      while (curr + drop < max) {\n        left -= count[curr + drop];\n        if (left <= 0) { break; }\n        curr++;\n        left <<= 1;\n      }\n\n      /* check for enough space */\n      used += 1 << curr;\n      if ((type === LENS && used > ENOUGH_LENS) ||\n        (type === DISTS && used > ENOUGH_DISTS)) {\n        return 1;\n      }\n\n      /* point entry in root table to sub-table */\n      low = huff & mask;\n      /*table.op[low] = curr;\n      table.bits[low] = root;\n      table.val[low] = next - opts.table_index;*/\n      table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n    }\n  }\n\n  /* fill in remaining table entry if code is incomplete (guaranteed to have\n   at most one remaining entry, since if the code is incomplete, the\n   maximum code length that was allowed to get this far is one bit) */\n  if (huff !== 0) {\n    //table.op[next + huff] = 64;            /* invalid code marker */\n    //table.bits[next + huff] = len - drop;\n    //table.val[next + huff] = 0;\n    table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n  }\n\n  /* set return parameters */\n  //opts.table_index += used;\n  opts.bits = root;\n  return 0;\n};\n\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n// String encode/decode helpers\n\n\n\nvar utils = __webpack_require__(12);\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new utils.Buf8(256);\nfor (var q = 0; q < 256; q++) {\n  _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n  var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n  // count binary size\n  for (m_pos = 0; m_pos < str_len; m_pos++) {\n    c = str.charCodeAt(m_pos);\n    if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n      c2 = str.charCodeAt(m_pos + 1);\n      if ((c2 & 0xfc00) === 0xdc00) {\n        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n        m_pos++;\n      }\n    }\n    buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n  }\n\n  // allocate buffer\n  buf = new utils.Buf8(buf_len);\n\n  // convert\n  for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n    c = str.charCodeAt(m_pos);\n    if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n      c2 = str.charCodeAt(m_pos + 1);\n      if ((c2 & 0xfc00) === 0xdc00) {\n        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n        m_pos++;\n      }\n    }\n    if (c < 0x80) {\n      /* one byte */\n      buf[i++] = c;\n    } else if (c < 0x800) {\n      /* two bytes */\n      buf[i++] = 0xC0 | (c >>> 6);\n      buf[i++] = 0x80 | (c & 0x3f);\n    } else if (c < 0x10000) {\n      /* three bytes */\n      buf[i++] = 0xE0 | (c >>> 12);\n      buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n      buf[i++] = 0x80 | (c & 0x3f);\n    } else {\n      /* four bytes */\n      buf[i++] = 0xf0 | (c >>> 18);\n      buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n      buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n      buf[i++] = 0x80 | (c & 0x3f);\n    }\n  }\n\n  return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n  // On Chrome, the arguments in a function call that are allowed is `65534`.\n  // If the length of the buffer is smaller than that, we can use this optimization,\n  // otherwise we will take a slower path.\n  if (len < 65534) {\n    if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n      return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n    }\n  }\n\n  var result = '';\n  for (var i = 0; i < len; i++) {\n    result += String.fromCharCode(buf[i]);\n  }\n  return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function (buf) {\n  return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function (str) {\n  var buf = new utils.Buf8(str.length);\n  for (var i = 0, len = buf.length; i < len; i++) {\n    buf[i] = str.charCodeAt(i);\n  }\n  return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n  var i, out, c, c_len;\n  var len = max || buf.length;\n\n  // Reserve max possible length (2 words per char)\n  // NB: by unknown reasons, Array is significantly faster for\n  //     String.fromCharCode.apply than Uint16Array.\n  var utf16buf = new Array(len * 2);\n\n  for (out = 0, i = 0; i < len;) {\n    c = buf[i++];\n    // quick process ascii\n    if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n    c_len = _utf8len[c];\n    // skip 5 & 6 byte codes\n    if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n    // apply mask on first byte\n    c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n    // join the rest\n    while (c_len > 1 && i < len) {\n      c = (c << 6) | (buf[i++] & 0x3f);\n      c_len--;\n    }\n\n    // terminated by end of string?\n    if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n    if (c < 0x10000) {\n      utf16buf[out++] = c;\n    } else {\n      c -= 0x10000;\n      utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n      utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n    }\n  }\n\n  return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max   - length limit (mandatory);\nexports.utf8border = function (buf, max) {\n  var pos;\n\n  max = max || buf.length;\n  if (max > buf.length) { max = buf.length; }\n\n  // go back from last position, until start of sequence found\n  pos = max - 1;\n  while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n  // Very small and broken sequence,\n  // return max, because we should return something anyway.\n  if (pos < 0) { return max; }\n\n  // If we came to start of buffer - that means buffer is too small,\n  // return max too.\n  if (pos === 0) { return max; }\n\n  return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n  /* Allowed flush values; see deflate() and inflate() below for details */\n  Z_NO_FLUSH:         0,\n  Z_PARTIAL_FLUSH:    1,\n  Z_SYNC_FLUSH:       2,\n  Z_FULL_FLUSH:       3,\n  Z_FINISH:           4,\n  Z_BLOCK:            5,\n  Z_TREES:            6,\n\n  /* Return codes for the compression/decompression functions. Negative values\n  * are errors, positive values are used for special but normal events.\n  */\n  Z_OK:               0,\n  Z_STREAM_END:       1,\n  Z_NEED_DICT:        2,\n  Z_ERRNO:           -1,\n  Z_STREAM_ERROR:    -2,\n  Z_DATA_ERROR:      -3,\n  //Z_MEM_ERROR:     -4,\n  Z_BUF_ERROR:       -5,\n  //Z_VERSION_ERROR: -6,\n\n  /* compression levels */\n  Z_NO_COMPRESSION:         0,\n  Z_BEST_SPEED:             1,\n  Z_BEST_COMPRESSION:       9,\n  Z_DEFAULT_COMPRESSION:   -1,\n\n\n  Z_FILTERED:               1,\n  Z_HUFFMAN_ONLY:           2,\n  Z_RLE:                    3,\n  Z_FIXED:                  4,\n  Z_DEFAULT_STRATEGY:       0,\n\n  /* Possible values of the data_type field (though see inflate()) */\n  Z_BINARY:                 0,\n  Z_TEXT:                   1,\n  //Z_ASCII:                1, // = Z_TEXT (deprecated)\n  Z_UNKNOWN:                2,\n\n  /* The deflate compression method */\n  Z_DEFLATED:               8\n  //Z_NULL:                 null // Use -1 or null inline, depending on var type\n};\n\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n  2:      'need dictionary',     /* Z_NEED_DICT       2  */\n  1:      'stream end',          /* Z_STREAM_END      1  */\n  0:      '',                    /* Z_OK              0  */\n  '-1':   'file error',          /* Z_ERRNO         (-1) */\n  '-2':   'stream error',        /* Z_STREAM_ERROR  (-2) */\n  '-3':   'data error',          /* Z_DATA_ERROR    (-3) */\n  '-4':   'insufficient memory', /* Z_MEM_ERROR     (-4) */\n  '-5':   'buffer error',        /* Z_BUF_ERROR     (-5) */\n  '-6':   'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n  /* next input byte */\n  this.input = null; // JS specific, because we have no pointers\n  this.next_in = 0;\n  /* number of bytes available at input */\n  this.avail_in = 0;\n  /* total number of input bytes read so far */\n  this.total_in = 0;\n  /* next output byte should be put there */\n  this.output = null; // JS specific, because we have no pointers\n  this.next_out = 0;\n  /* remaining free space at output */\n  this.avail_out = 0;\n  /* total number of bytes output so far */\n  this.total_out = 0;\n  /* last error message, NULL if no error */\n  this.msg = ''/*Z_NULL*/;\n  /* not visible by applications */\n  this.state = null;\n  /* best guess about the data type: binary or text */\n  this.data_type = 2/*Z_UNKNOWN*/;\n  /* adler32 value of the uncompressed data */\n  this.adler = 0;\n}\n\nmodule.exports = ZStream;\n\n\n/***/ }),\n/* 63 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n//   claim that you wrote the original software. If you use this software\n//   in a product, an acknowledgment in the product documentation would be\n//   appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n//   misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n  /* true if compressed data believed to be text */\n  this.text       = 0;\n  /* modification time */\n  this.time       = 0;\n  /* extra flags (not used when writing a gzip file) */\n  this.xflags     = 0;\n  /* operating system */\n  this.os         = 0;\n  /* pointer to extra field or Z_NULL if none */\n  this.extra      = null;\n  /* extra field length (valid if extra != Z_NULL) */\n  this.extra_len  = 0; // Actually, we don't need it in JS,\n                       // but leave for few code modifications\n\n  //\n  // Setup limits is not necessary because in js we should not preallocate memory\n  // for inflate use constant limit in 65536 bytes\n  //\n\n  /* space at extra (only when reading header) */\n  // this.extra_max  = 0;\n  /* pointer to zero-terminated file name or Z_NULL */\n  this.name       = '';\n  /* space at name (only when reading header) */\n  // this.name_max   = 0;\n  /* pointer to zero-terminated comment or Z_NULL */\n  this.comment    = '';\n  /* space at comment (only when reading header) */\n  // this.comm_max   = 0;\n  /* true if there was or will be a header crc */\n  this.hcrc       = 0;\n  /* true when done reading gzip header (not used when writing a gzip file) */\n  this.done       = false;\n}\n\nmodule.exports = GZheader;\n\n\n/***/ }),\n/* 64 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = __webpack_require__(65);\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* Active `debug` instances.\n\t*/\n\tcreateDebug.instances = [];\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn match;\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.enabled = createDebug.enabled(namespace);\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = selectColor(namespace);\n\t\tdebug.destroy = destroy;\n\t\tdebug.extend = extend;\n\t\t// Debug.formatArgs = formatArgs;\n\t\t// debug.rawLog = rawLog;\n\n\t\t// env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\tcreateDebug.instances.push(debug);\n\n\t\treturn debug;\n\t}\n\n\tfunction destroy() {\n\t\tconst index = createDebug.instances.indexOf(this);\n\t\tif (index !== -1) {\n\t\t\tcreateDebug.instances.splice(index, 1);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0; i < createDebug.instances.length; i++) {\n\t\t\tconst instance = createDebug.instances[i];\n\t\t\tinstance.enabled = createDebug.enabled(instance.namespace);\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n\n\n/***/ }),\n/* 65 */\n/***/ (function(module, exports) {\n\n/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\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' && isFinite(val)) {\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|weeks?|w|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 'weeks':\n    case 'week':\n    case 'w':\n      return n * w;\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  var msAbs = Math.abs(ms);\n  if (msAbs >= d) {\n    return Math.round(ms / d) + 'd';\n  }\n  if (msAbs >= h) {\n    return Math.round(ms / h) + 'h';\n  }\n  if (msAbs >= m) {\n    return Math.round(ms / m) + 'm';\n  }\n  if (msAbs >= 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  var msAbs = Math.abs(ms);\n  if (msAbs >= d) {\n    return plural(ms, msAbs, d, 'day');\n  }\n  if (msAbs >= h) {\n    return plural(ms, msAbs, h, 'hour');\n  }\n  if (msAbs >= m) {\n    return plural(ms, msAbs, m, 'minute');\n  }\n  if (msAbs >= s) {\n    return plural(ms, msAbs, s, 'second');\n  }\n  return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n  var isPlural = msAbs >= n * 1.5;\n  return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n\n\n/***/ }),\n/* 66 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.1 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports =  true && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule =  true && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow new RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t    counter = 0,\n\t\t    length = string.length,\n\t\t    value,\n\t\t    extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t//  0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t    inputLength = input.length,\n\t\t    out,\n\t\t    i = 0,\n\t\t    n = initialN,\n\t\t    bias = initialBias,\n\t\t    basic,\n\t\t    j,\n\t\t    index,\n\t\t    oldi,\n\t\t    w,\n\t\t    k,\n\t\t    digit,\n\t\t    t,\n\t\t    /** Cached calculation results */\n\t\t    baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t    delta,\n\t\t    handledCPCount,\n\t\t    basicLength,\n\t\t    bias,\n\t\t    j,\n\t\t    m,\n\t\t    q,\n\t\t    k,\n\t\t    t,\n\t\t    currentValue,\n\t\t    output = [],\n\t\t    /** `inputLength` will hold the number of code points in `input`. */\n\t\t    inputLength,\n\t\t    /** Cached calculation results */\n\t\t    handledCPCountPlusOne,\n\t\t    baseMinusT,\n\t\t    qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.4.1',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttrue\n\t) {\n\t\t!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {\n\t\t\treturn punycode;\n\t\t}).call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else {}\n\n}(this));\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(67)(module), __webpack_require__(11)))\n\n/***/ }),\n/* 67 */\n/***/ (function(module, exports) {\n\nmodule.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/***/ }),\n/* 68 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = {\n  isString: function(arg) {\n    return typeof(arg) === 'string';\n  },\n  isObject: function(arg) {\n    return typeof(arg) === 'object' && arg !== null;\n  },\n  isNull: function(arg) {\n    return arg === null;\n  },\n  isNullOrUndefined: function(arg) {\n    return arg == null;\n  }\n};\n\n\n/***/ }),\n/* 69 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nexports.decode = exports.parse = __webpack_require__(70);\nexports.encode = exports.stringify = __webpack_require__(71);\n\n\n/***/ }),\n/* 70 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\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\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n  sep = sep || '&';\n  eq = eq || '=';\n  var obj = {};\n\n  if (typeof qs !== 'string' || qs.length === 0) {\n    return obj;\n  }\n\n  var regexp = /\\+/g;\n  qs = qs.split(sep);\n\n  var maxKeys = 1000;\n  if (options && typeof options.maxKeys === 'number') {\n    maxKeys = options.maxKeys;\n  }\n\n  var len = qs.length;\n  // maxKeys <= 0 means that we should not limit keys count\n  if (maxKeys > 0 && len > maxKeys) {\n    len = maxKeys;\n  }\n\n  for (var i = 0; i < len; ++i) {\n    var x = qs[i].replace(regexp, '%20'),\n        idx = x.indexOf(eq),\n        kstr, vstr, k, v;\n\n    if (idx >= 0) {\n      kstr = x.substr(0, idx);\n      vstr = x.substr(idx + 1);\n    } else {\n      kstr = x;\n      vstr = '';\n    }\n\n    k = decodeURIComponent(kstr);\n    v = decodeURIComponent(vstr);\n\n    if (!hasOwnProperty(obj, k)) {\n      obj[k] = v;\n    } else if (isArray(obj[k])) {\n      obj[k].push(v);\n    } else {\n      obj[k] = [obj[k], v];\n    }\n  }\n\n  return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n  return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\n\n/***/ }),\n/* 71 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\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\n\nvar stringifyPrimitive = function(v) {\n  switch (typeof v) {\n    case 'string':\n      return v;\n\n    case 'boolean':\n      return v ? 'true' : 'false';\n\n    case 'number':\n      return isFinite(v) ? v : '';\n\n    default:\n      return '';\n  }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n  sep = sep || '&';\n  eq = eq || '=';\n  if (obj === null) {\n    obj = undefined;\n  }\n\n  if (typeof obj === 'object') {\n    return map(objectKeys(obj), function(k) {\n      var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n      if (isArray(obj[k])) {\n        return map(obj[k], function(v) {\n          return ks + encodeURIComponent(stringifyPrimitive(v));\n        }).join(sep);\n      } else {\n        return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n      }\n    }).join(sep);\n\n  }\n\n  if (!name) return '';\n  return encodeURIComponent(stringifyPrimitive(name)) + eq +\n         encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n  return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n  if (xs.map) return xs.map(f);\n  var res = [];\n  for (var i = 0; i < xs.length; i++) {\n    res.push(f(xs[i], i));\n  }\n  return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n  var res = [];\n  for (var key in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n  }\n  return res;\n};\n\n\n/***/ }),\n/* 72 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js\nvar regenerator = __webpack_require__(16);\nvar regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js\nvar toConsumableArray = __webpack_require__(28);\nvar toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toArray.js\nvar toArray = __webpack_require__(29);\nvar toArray_default = /*#__PURE__*/__webpack_require__.n(toArray);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js\nvar asyncToGenerator = __webpack_require__(30);\nvar asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);\n\n// EXTERNAL MODULE: ./node_modules/txml/tXml.js\nvar tXml = __webpack_require__(31);\nvar tXml_default = /*#__PURE__*/__webpack_require__.n(tXml);\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/globals.js\nconst fieldTagNames = {\n  // TIFF Baseline\n  0x013B: 'Artist',\n  0x0102: 'BitsPerSample',\n  0x0109: 'CellLength',\n  0x0108: 'CellWidth',\n  0x0140: 'ColorMap',\n  0x0103: 'Compression',\n  0x8298: 'Copyright',\n  0x0132: 'DateTime',\n  0x0152: 'ExtraSamples',\n  0x010A: 'FillOrder',\n  0x0121: 'FreeByteCounts',\n  0x0120: 'FreeOffsets',\n  0x0123: 'GrayResponseCurve',\n  0x0122: 'GrayResponseUnit',\n  0x013C: 'HostComputer',\n  0x010E: 'ImageDescription',\n  0x0101: 'ImageLength',\n  0x0100: 'ImageWidth',\n  0x010F: 'Make',\n  0x0119: 'MaxSampleValue',\n  0x0118: 'MinSampleValue',\n  0x0110: 'Model',\n  0x00FE: 'NewSubfileType',\n  0x0112: 'Orientation',\n  0x0106: 'PhotometricInterpretation',\n  0x011C: 'PlanarConfiguration',\n  0x0128: 'ResolutionUnit',\n  0x0116: 'RowsPerStrip',\n  0x0115: 'SamplesPerPixel',\n  0x0131: 'Software',\n  0x0117: 'StripByteCounts',\n  0x0111: 'StripOffsets',\n  0x00FF: 'SubfileType',\n  0x0107: 'Threshholding',\n  0x011A: 'XResolution',\n  0x011B: 'YResolution',\n\n  // TIFF Extended\n  0x0146: 'BadFaxLines',\n  0x0147: 'CleanFaxData',\n  0x0157: 'ClipPath',\n  0x0148: 'ConsecutiveBadFaxLines',\n  0x01B1: 'Decode',\n  0x01B2: 'DefaultImageColor',\n  0x010D: 'DocumentName',\n  0x0150: 'DotRange',\n  0x0141: 'HalftoneHints',\n  0x015A: 'Indexed',\n  0x015B: 'JPEGTables',\n  0x011D: 'PageName',\n  0x0129: 'PageNumber',\n  0x013D: 'Predictor',\n  0x013F: 'PrimaryChromaticities',\n  0x0214: 'ReferenceBlackWhite',\n  0x0153: 'SampleFormat',\n  0x0154: 'SMinSampleValue',\n  0x0155: 'SMaxSampleValue',\n  0x022F: 'StripRowCounts',\n  0x014A: 'SubIFDs',\n  0x0124: 'T4Options',\n  0x0125: 'T6Options',\n  0x0145: 'TileByteCounts',\n  0x0143: 'TileLength',\n  0x0144: 'TileOffsets',\n  0x0142: 'TileWidth',\n  0x012D: 'TransferFunction',\n  0x013E: 'WhitePoint',\n  0x0158: 'XClipPathUnits',\n  0x011E: 'XPosition',\n  0x0211: 'YCbCrCoefficients',\n  0x0213: 'YCbCrPositioning',\n  0x0212: 'YCbCrSubSampling',\n  0x0159: 'YClipPathUnits',\n  0x011F: 'YPosition',\n\n  // EXIF\n  0x9202: 'ApertureValue',\n  0xA001: 'ColorSpace',\n  0x9004: 'DateTimeDigitized',\n  0x9003: 'DateTimeOriginal',\n  0x8769: 'Exif IFD',\n  0x9000: 'ExifVersion',\n  0x829A: 'ExposureTime',\n  0xA300: 'FileSource',\n  0x9209: 'Flash',\n  0xA000: 'FlashpixVersion',\n  0x829D: 'FNumber',\n  0xA420: 'ImageUniqueID',\n  0x9208: 'LightSource',\n  0x927C: 'MakerNote',\n  0x9201: 'ShutterSpeedValue',\n  0x9286: 'UserComment',\n\n  // IPTC\n  0x83BB: 'IPTC',\n\n  // ICC\n  0x8773: 'ICC Profile',\n\n  // XMP\n  0x02BC: 'XMP',\n\n  // GDAL\n  0xA480: 'GDAL_METADATA',\n  0xA481: 'GDAL_NODATA',\n\n  // Photoshop\n  0x8649: 'Photoshop',\n\n  // GeoTiff\n  0x830E: 'ModelPixelScale',\n  0x8482: 'ModelTiepoint',\n  0x85D8: 'ModelTransformation',\n  0x87AF: 'GeoKeyDirectory',\n  0x87B0: 'GeoDoubleParams',\n  0x87B1: 'GeoAsciiParams',\n};\n\nconst fieldTags = {};\nfor (const key in fieldTagNames) {\n  if (fieldTagNames.hasOwnProperty(key)) {\n    fieldTags[fieldTagNames[key]] = parseInt(key, 10);\n  }\n}\n\nconst fieldTagTypes = {\n  256: 'SHORT',\n  257: 'SHORT',\n  258: 'SHORT',\n  259: 'SHORT',\n  262: 'SHORT',\n  273: 'LONG',\n  274: 'SHORT',\n  277: 'SHORT',\n  278: 'LONG',\n  279: 'LONG',\n  282: 'RATIONAL',\n  283: 'RATIONAL',\n  284: 'SHORT',\n  286: 'SHORT',\n  287: 'RATIONAL',\n  296: 'SHORT',\n  305: 'ASCII',\n  306: 'ASCII',\n  338: 'SHORT',\n  339: 'SHORT',\n  513: 'LONG',\n  514: 'LONG',\n  1024: 'SHORT',\n  1025: 'SHORT',\n  2048: 'SHORT',\n  2049: 'ASCII',\n  33550: 'DOUBLE',\n  33922: 'DOUBLE',\n  34665: 'LONG',\n  34735: 'SHORT',\n  34737: 'ASCII',\n  42113: 'ASCII',\n};\n\nconst arrayFields = [\n  fieldTags.BitsPerSample,\n  fieldTags.ExtraSamples,\n  fieldTags.SampleFormat,\n  fieldTags.StripByteCounts,\n  fieldTags.StripOffsets,\n  fieldTags.StripRowCounts,\n  fieldTags.TileByteCounts,\n  fieldTags.TileOffsets,\n];\n\nconst fieldTypeNames = {\n  0x0001: 'BYTE',\n  0x0002: 'ASCII',\n  0x0003: 'SHORT',\n  0x0004: 'LONG',\n  0x0005: 'RATIONAL',\n  0x0006: 'SBYTE',\n  0x0007: 'UNDEFINED',\n  0x0008: 'SSHORT',\n  0x0009: 'SLONG',\n  0x000A: 'SRATIONAL',\n  0x000B: 'FLOAT',\n  0x000C: 'DOUBLE',\n  // IFD offset, suggested by https://owl.phy.queensu.ca/~phil/exiftool/standards.html\n  0x000D: 'IFD',\n  // introduced by BigTIFF\n  0x0010: 'LONG8',\n  0x0011: 'SLONG8',\n  0x0012: 'IFD8',\n};\n\nconst fieldTypes = {};\nfor (const key in fieldTypeNames) {\n  if (fieldTypeNames.hasOwnProperty(key)) {\n    fieldTypes[fieldTypeNames[key]] = parseInt(key, 10);\n  }\n}\n\nconst photometricInterpretations = {\n  WhiteIsZero: 0,\n  BlackIsZero: 1,\n  RGB: 2,\n  Palette: 3,\n  TransparencyMask: 4,\n  CMYK: 5,\n  YCbCr: 6,\n\n  CIELab: 8,\n  ICCLab: 9,\n};\n\nconst ExtraSamplesValues = {\n  Unspecified: 0,\n  Assocalpha: 1,\n  Unassalpha: 2,\n};\n\n\nconst geoKeyNames = {\n  1024: 'GTModelTypeGeoKey',\n  1025: 'GTRasterTypeGeoKey',\n  1026: 'GTCitationGeoKey',\n  2048: 'GeographicTypeGeoKey',\n  2049: 'GeogCitationGeoKey',\n  2050: 'GeogGeodeticDatumGeoKey',\n  2051: 'GeogPrimeMeridianGeoKey',\n  2052: 'GeogLinearUnitsGeoKey',\n  2053: 'GeogLinearUnitSizeGeoKey',\n  2054: 'GeogAngularUnitsGeoKey',\n  2055: 'GeogAngularUnitSizeGeoKey',\n  2056: 'GeogEllipsoidGeoKey',\n  2057: 'GeogSemiMajorAxisGeoKey',\n  2058: 'GeogSemiMinorAxisGeoKey',\n  2059: 'GeogInvFlatteningGeoKey',\n  2060: 'GeogAzimuthUnitsGeoKey',\n  2061: 'GeogPrimeMeridianLongGeoKey',\n  2062: 'GeogTOWGS84GeoKey',\n  3072: 'ProjectedCSTypeGeoKey',\n  3073: 'PCSCitationGeoKey',\n  3074: 'ProjectionGeoKey',\n  3075: 'ProjCoordTransGeoKey',\n  3076: 'ProjLinearUnitsGeoKey',\n  3077: 'ProjLinearUnitSizeGeoKey',\n  3078: 'ProjStdParallel1GeoKey',\n  3079: 'ProjStdParallel2GeoKey',\n  3080: 'ProjNatOriginLongGeoKey',\n  3081: 'ProjNatOriginLatGeoKey',\n  3082: 'ProjFalseEastingGeoKey',\n  3083: 'ProjFalseNorthingGeoKey',\n  3084: 'ProjFalseOriginLongGeoKey',\n  3085: 'ProjFalseOriginLatGeoKey',\n  3086: 'ProjFalseOriginEastingGeoKey',\n  3087: 'ProjFalseOriginNorthingGeoKey',\n  3088: 'ProjCenterLongGeoKey',\n  3089: 'ProjCenterLatGeoKey',\n  3090: 'ProjCenterEastingGeoKey',\n  3091: 'ProjCenterNorthingGeoKey',\n  3092: 'ProjScaleAtNatOriginGeoKey',\n  3093: 'ProjScaleAtCenterGeoKey',\n  3094: 'ProjAzimuthAngleGeoKey',\n  3095: 'ProjStraightVertPoleLongGeoKey',\n  3096: 'ProjRectifiedGridAngleGeoKey',\n  4096: 'VerticalCSTypeGeoKey',\n  4097: 'VerticalCitationGeoKey',\n  4098: 'VerticalDatumGeoKey',\n  4099: 'VerticalUnitsGeoKey',\n};\n\nconst globals_geoKeys = {};\nfor (const key in geoKeyNames) {\n  if (geoKeyNames.hasOwnProperty(key)) {\n    globals_geoKeys[geoKeyNames[key]] = parseInt(key, 10);\n  }\n}\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/rgb.js\nfunction fromWhiteIsZero(raster, max) {\n  const { width, height } = raster;\n  const rgbRaster = new Uint8Array(width * height * 3);\n  let value;\n  for (let i = 0, j = 0; i < raster.length; ++i, j += 3) {\n    value = 256 - (raster[i] / max * 256);\n    rgbRaster[j] = value;\n    rgbRaster[j + 1] = value;\n    rgbRaster[j + 2] = value;\n  }\n  return rgbRaster;\n}\n\nfunction fromBlackIsZero(raster, max) {\n  const { width, height } = raster;\n  const rgbRaster = new Uint8Array(width * height * 3);\n  let value;\n  for (let i = 0, j = 0; i < raster.length; ++i, j += 3) {\n    value = raster[i] / max * 256;\n    rgbRaster[j] = value;\n    rgbRaster[j + 1] = value;\n    rgbRaster[j + 2] = value;\n  }\n  return rgbRaster;\n}\n\nfunction fromPalette(raster, colorMap) {\n  const { width, height } = raster;\n  const rgbRaster = new Uint8Array(width * height * 3);\n  const greenOffset = colorMap.length / 3;\n  const blueOffset = colorMap.length / 3 * 2;\n  for (let i = 0, j = 0; i < raster.length; ++i, j += 3) {\n    const mapIndex = raster[i];\n    rgbRaster[j] = colorMap[mapIndex] / 65536 * 256;\n    rgbRaster[j + 1] = colorMap[mapIndex + greenOffset] / 65536 * 256;\n    rgbRaster[j + 2] = colorMap[mapIndex + blueOffset] / 65536 * 256;\n  }\n  return rgbRaster;\n}\n\nfunction fromCMYK(cmykRaster) {\n  const { width, height } = cmykRaster;\n  const rgbRaster = new Uint8Array(width * height * 3);\n  for (let i = 0, j = 0; i < cmykRaster.length; i += 4, j += 3) {\n    const c = cmykRaster[i];\n    const m = cmykRaster[i + 1];\n    const y = cmykRaster[i + 2];\n    const k = cmykRaster[i + 3];\n\n    rgbRaster[j] = 255 * ((255 - c) / 256) * ((255 - k) / 256);\n    rgbRaster[j + 1] = 255 * ((255 - m) / 256) * ((255 - k) / 256);\n    rgbRaster[j + 2] = 255 * ((255 - y) / 256) * ((255 - k) / 256);\n  }\n  return rgbRaster;\n}\n\nfunction fromYCbCr(yCbCrRaster) {\n  const { width, height } = yCbCrRaster;\n  const rgbRaster = new Uint8ClampedArray(width * height * 3);\n  for (let i = 0, j = 0; i < yCbCrRaster.length; i += 3, j += 3) {\n    const y = yCbCrRaster[i];\n    const cb = yCbCrRaster[i + 1];\n    const cr = yCbCrRaster[i + 2];\n\n    rgbRaster[j] = (y + (1.40200 * (cr - 0x80)));\n    rgbRaster[j + 1] = (y - (0.34414 * (cb - 0x80)) - (0.71414 * (cr - 0x80)));\n    rgbRaster[j + 2] = (y + (1.77200 * (cb - 0x80)));\n  }\n  return rgbRaster;\n}\n\nconst Xn = 0.95047;\nconst Yn = 1.00000;\nconst Zn = 1.08883;\n\n// from https://github.com/antimatter15/rgb-lab/blob/master/color.js\n\nfunction fromCIELab(cieLabRaster) {\n  const { width, height } = cieLabRaster;\n  const rgbRaster = new Uint8Array(width * height * 3);\n\n  for (let i = 0, j = 0; i < cieLabRaster.length; i += 3, j += 3) {\n    const L = cieLabRaster[i + 0];\n    const a_ = cieLabRaster[i + 1] << 24 >> 24; // conversion from uint8 to int8\n    const b_ = cieLabRaster[i + 2] << 24 >> 24; // same\n\n    let y = (L + 16) / 116;\n    let x = (a_ / 500) + y;\n    let z = y - (b_ / 200);\n    let r;\n    let g;\n    let b;\n\n    x = Xn * ((x * x * x > 0.008856) ? x * x * x : (x - (16 / 116)) / 7.787);\n    y = Yn * ((y * y * y > 0.008856) ? y * y * y : (y - (16 / 116)) / 7.787);\n    z = Zn * ((z * z * z > 0.008856) ? z * z * z : (z - (16 / 116)) / 7.787);\n\n    r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n    g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n    b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n    r = (r > 0.0031308) ? ((1.055 * (r ** (1 / 2.4))) - 0.055) : 12.92 * r;\n    g = (g > 0.0031308) ? ((1.055 * (g ** (1 / 2.4))) - 0.055) : 12.92 * g;\n    b = (b > 0.0031308) ? ((1.055 * (b ** (1 / 2.4))) - 0.055) : 12.92 * b;\n\n    rgbRaster[j] = Math.max(0, Math.min(1, r)) * 255;\n    rgbRaster[j + 1] = Math.max(0, Math.min(1, g)) * 255;\n    rgbRaster[j + 2] = Math.max(0, Math.min(1, b)) * 255;\n  }\n  return rgbRaster;\n}\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/predictor.js\n\nfunction decodeRowAcc(row, stride) {\n  let length = row.length - stride;\n  let offset = 0;\n  do {\n    for (let i = stride; i > 0; i--) {\n      row[offset + stride] += row[offset];\n      offset++;\n    }\n\n    length -= stride;\n  } while (length > 0);\n}\n\nfunction decodeRowFloatingPoint(row, stride, bytesPerSample) {\n  let index = 0;\n  let count = row.length;\n  const wc = count / bytesPerSample;\n\n  while (count > stride) {\n    for (let i = stride; i > 0; --i) {\n      row[index + stride] += row[index];\n      ++index;\n    }\n    count -= stride;\n  }\n\n  const copy = row.slice();\n  for (let i = 0; i < wc; ++i) {\n    for (let b = 0; b < bytesPerSample; ++b) {\n      row[(bytesPerSample * i) + b] = copy[((bytesPerSample - b - 1) * wc) + i];\n    }\n  }\n}\n\nfunction applyPredictor(block, predictor, width, height, bitsPerSample,\n  planarConfiguration) {\n  if (!predictor || predictor === 1) {\n    return block;\n  }\n\n  for (let i = 0; i < bitsPerSample.length; ++i) {\n    if (bitsPerSample[i] % 8 !== 0) {\n      throw new Error('When decoding with predictor, only multiple of 8 bits are supported.');\n    }\n    if (bitsPerSample[i] !== bitsPerSample[0]) {\n      throw new Error('When decoding with predictor, all samples must have the same size.');\n    }\n  }\n\n  const bytesPerSample = bitsPerSample[0] / 8;\n  const stride = planarConfiguration === 2 ? 1 : bitsPerSample.length;\n\n  for (let i = 0; i < height; ++i) {\n    // Last strip will be truncated if height % stripHeight != 0\n    if (i * stride * width * bytesPerSample >= block.byteLength) {\n      break;\n    }\n    let row;\n    if (predictor === 2) { // horizontal prediction\n      switch (bitsPerSample[0]) {\n        case 8:\n          row = new Uint8Array(\n            block, i * stride * width * bytesPerSample, stride * width * bytesPerSample,\n          );\n          break;\n        case 16:\n          row = new Uint16Array(\n            block, i * stride * width * bytesPerSample, stride * width * bytesPerSample / 2,\n          );\n          break;\n        case 32:\n          row = new Uint32Array(\n            block, i * stride * width * bytesPerSample, stride * width * bytesPerSample / 4,\n          );\n          break;\n        default:\n          throw new Error(`Predictor 2 not allowed with ${bitsPerSample[0]} bits per sample.`);\n      }\n      decodeRowAcc(row, stride, bytesPerSample);\n    } else if (predictor === 3) { // horizontal floating point\n      row = new Uint8Array(\n        block, i * stride * width * bytesPerSample, stride * width * bytesPerSample,\n      );\n      decodeRowFloatingPoint(row, stride, bytesPerSample);\n    }\n  }\n  return block;\n}\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/compression/basedecoder.js\n\n\nclass basedecoder_BaseDecoder {\n  async decode(fileDirectory, buffer) {\n    const decoded = await this.decodeBlock(buffer);\n    const predictor = fileDirectory.Predictor || 1;\n    if (predictor !== 1) {\n      const isTiled = !fileDirectory.StripOffsets;\n      const tileWidth = isTiled ? fileDirectory.TileWidth : fileDirectory.ImageWidth;\n      const tileHeight = isTiled ? fileDirectory.TileLength : (\n        fileDirectory.RowsPerStrip || fileDirectory.ImageLength\n      );\n      return applyPredictor(\n        decoded, predictor, tileWidth, tileHeight, fileDirectory.BitsPerSample,\n        fileDirectory.PlanarConfiguration,\n      );\n    }\n    return decoded;\n  }\n}\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/compression/raw.js\n\n\n\nclass raw_RawDecoder extends basedecoder_BaseDecoder {\n  decodeBlock(buffer) {\n    return buffer;\n  }\n}\n\n// CONCATENATED MODULE: ./node_modules/lzw-tiff-decoder/index.mjs\nlet A,I=null;function g(){return null!==I&&I.buffer===A.memory.buffer||(I=new Uint8Array(A.memory.buffer)),I}let B=0;let Q=null;function C(){return null!==Q&&Q.buffer===A.memory.buffer||(Q=new Int32Array(A.memory.buffer)),Q}async function E(I){void 0===I&&(I=\"\".replace(/\\.js$/,\"_bg.wasm\"));(\"string\"==typeof I||\"function\"==typeof Request&&I instanceof Request||\"function\"==typeof URL&&I instanceof URL)&&(I=fetch(I));const{instance:g,module:B}=await async function(A,I){if(\"function\"==typeof Response&&A instanceof Response){if(\"function\"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(A,I)}catch(I){if(\"application/wasm\"==A.headers.get(\"Content-Type\"))throw I;console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\",I)}const g=await A.arrayBuffer();return await WebAssembly.instantiate(g,I)}{const g=await WebAssembly.instantiate(A,I);return g instanceof WebAssembly.Instance?{instance:g,module:A}:g}}(await I,{});return A=g.exports,E.__wbindgen_wasm_module=B,A}var D=Object.freeze({__proto__:null,decompress:function(I,Q){try{const N=A.__wbindgen_export_0.value-16;A.__wbindgen_export_0.value=N;var E=function(A,I){const Q=I(1*A.length);return g().set(A,Q/1),B=A.length,Q}(I,A.__wbindgen_malloc),D=B;A.decompress(N,E,D,Q);var w=C()[N/4+0],i=C()[N/4+1],o=(G=w,F=i,g().subarray(G/1,G/1+F)).slice();return A.__wbindgen_free(w,1*i),o}finally{A.__wbindgen_export_0.value+=16}var G,F},default:E});const w=[62,0,0,0,63,52,53,54,55,56,57,58,59,60,61,0,0,0,0,0,0,0,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,0,0,0,0,0,0,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];function lzw_tiff_decoder_i(A){return w[A-43]}const o=function(A){let I,g=A.endsWith(\"==\")?2:A.endsWith(\"=\")?1:0,B=A.length,Q=new Uint8Array(B/4*3);for(let g=0,C=0;g<B;g+=4,C+=3)I=lzw_tiff_decoder_i(A.charCodeAt(g))<<18|lzw_tiff_decoder_i(A.charCodeAt(g+1))<<12|lzw_tiff_decoder_i(A.charCodeAt(g+2))<<6|lzw_tiff_decoder_i(A.charCodeAt(g+3)),Q[C]=I>>16,Q[C+1]=I>>8&255,Q[C+2]=255&I;return Q.subarray(0,Q.length-g)}(\" \");let G;async function F(A,I){G||(G=await(async()=>(await E(o),D))());const g=G.decompress(A,I);if(0===g.length)throw Error(\"Failed to decode with LZW decoder.\");return g}\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/compression/lzw.js\n\n\n\n\nclass lzw_LZWDecoder extends basedecoder_BaseDecoder {\n  constructor(fileDirectory) {\n    super();\n    const width = fileDirectory.TileWidth || fileDirectory.ImageWidth;\n    const height = fileDirectory.TileLength || fileDirectory.ImageLength;\n    const nbytes = fileDirectory.BitsPerSample[0] / 8;\n    this.maxUncompressedSize = width * height * nbytes;\n  }\n\n  async decodeBlock(buffer) {\n    const bytes = new Uint8Array(buffer);\n    const decoded = await F(bytes, this.maxUncompressedSize);\n    return decoded.buffer;\n  }\n}\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/compression/jpeg.js\n\n\n/* -*- tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\n/*\n   Copyright 2011 notmasteryet\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       http://www.apache.org/licenses/LICENSE-2.0\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// - The JPEG specification can be found in the ITU CCITT Recommendation T.81\n//   (www.w3.org/Graphics/JPEG/itu-t81.pdf)\n// - The JFIF specification can be found in the JPEG File Interchange Format\n//   (www.w3.org/Graphics/JPEG/jfif3.pdf)\n// - The Adobe Application-Specific JPEG markers in the Supporting the DCT Filters\n//   in PostScript Level 2, Technical Note #5116\n//   (partners.adobe.com/public/developer/en/ps/sdk/5116.DCT_Filter.pdf)\n\n\nconst dctZigZag = new Int32Array([\n  0,\n  1, 8,\n  16, 9, 2,\n  3, 10, 17, 24,\n  32, 25, 18, 11, 4,\n  5, 12, 19, 26, 33, 40,\n  48, 41, 34, 27, 20, 13, 6,\n  7, 14, 21, 28, 35, 42, 49, 56,\n  57, 50, 43, 36, 29, 22, 15,\n  23, 30, 37, 44, 51, 58,\n  59, 52, 45, 38, 31,\n  39, 46, 53, 60,\n  61, 54, 47,\n  55, 62,\n  63,\n]);\n\nconst dctCos1 = 4017; // cos(pi/16)\nconst dctSin1 = 799; // sin(pi/16)\nconst dctCos3 = 3406; // cos(3*pi/16)\nconst dctSin3 = 2276; // sin(3*pi/16)\nconst dctCos6 = 1567; // cos(6*pi/16)\nconst dctSin6 = 3784; // sin(6*pi/16)\nconst dctSqrt2 = 5793; // sqrt(2)\nconst dctSqrt1d2 = 2896;// sqrt(2) / 2\n\nfunction buildHuffmanTable(codeLengths, values) {\n  let k = 0;\n  const code = [];\n  let length = 16;\n  while (length > 0 && !codeLengths[length - 1]) {\n    --length;\n  }\n  code.push({ children: [], index: 0 });\n\n  let p = code[0];\n  let q;\n  for (let i = 0; i < length; i++) {\n    for (let j = 0; j < codeLengths[i]; j++) {\n      p = code.pop();\n      p.children[p.index] = values[k];\n      while (p.index > 0) {\n        p = code.pop();\n      }\n      p.index++;\n      code.push(p);\n      while (code.length <= i) {\n        code.push(q = { children: [], index: 0 });\n        p.children[p.index] = q.children;\n        p = q;\n      }\n      k++;\n    }\n    if (i + 1 < length) {\n      // p here points to last code\n      code.push(q = { children: [], index: 0 });\n      p.children[p.index] = q.children;\n      p = q;\n    }\n  }\n  return code[0].children;\n}\n\nfunction decodeScan(data, initialOffset,\n  frame, components, resetInterval,\n  spectralStart, spectralEnd,\n  successivePrev, successive) {\n  const { mcusPerLine, progressive } = frame;\n\n  const startOffset = initialOffset;\n  let offset = initialOffset;\n  let bitsData = 0;\n  let bitsCount = 0;\n  function readBit() {\n    if (bitsCount > 0) {\n      bitsCount--;\n      return (bitsData >> bitsCount) & 1;\n    }\n    bitsData = data[offset++];\n    if (bitsData === 0xFF) {\n      const nextByte = data[offset++];\n      if (nextByte) {\n        throw new Error(`unexpected marker: ${((bitsData << 8) | nextByte).toString(16)}`);\n      }\n      // unstuff 0\n    }\n    bitsCount = 7;\n    return bitsData >>> 7;\n  }\n  function decodeHuffman(tree) {\n    let node = tree;\n    let bit;\n    while ((bit = readBit()) !== null) { // eslint-disable-line no-cond-assign\n      node = node[bit];\n      if (typeof node === 'number') {\n        return node;\n      }\n      if (typeof node !== 'object') {\n        throw new Error('invalid huffman sequence');\n      }\n    }\n    return null;\n  }\n  function receive(initialLength) {\n    let length = initialLength;\n    let n = 0;\n    while (length > 0) {\n      const bit = readBit();\n      if (bit === null) {\n        return undefined;\n      }\n      n = (n << 1) | bit;\n      --length;\n    }\n    return n;\n  }\n  function receiveAndExtend(length) {\n    const n = receive(length);\n    if (n >= 1 << (length - 1)) {\n      return n;\n    }\n    return n + (-1 << length) + 1;\n  }\n  function decodeBaseline(component, zz) {\n    const t = decodeHuffman(component.huffmanTableDC);\n    const diff = t === 0 ? 0 : receiveAndExtend(t);\n    component.pred += diff;\n    zz[0] = component.pred;\n    let k = 1;\n    while (k < 64) {\n      const rs = decodeHuffman(component.huffmanTableAC);\n      const s = rs & 15;\n      const r = rs >> 4;\n      if (s === 0) {\n        if (r < 15) {\n          break;\n        }\n        k += 16;\n      } else {\n        k += r;\n        const z = dctZigZag[k];\n        zz[z] = receiveAndExtend(s);\n        k++;\n      }\n    }\n  }\n  function decodeDCFirst(component, zz) {\n    const t = decodeHuffman(component.huffmanTableDC);\n    const diff = t === 0 ? 0 : (receiveAndExtend(t) << successive);\n    component.pred += diff;\n    zz[0] = component.pred;\n  }\n  function decodeDCSuccessive(component, zz) {\n    zz[0] |= readBit() << successive;\n  }\n  let eobrun = 0;\n  function decodeACFirst(component, zz) {\n    if (eobrun > 0) {\n      eobrun--;\n      return;\n    }\n    let k = spectralStart;\n    const e = spectralEnd;\n    while (k <= e) {\n      const rs = decodeHuffman(component.huffmanTableAC);\n      const s = rs & 15;\n      const r = rs >> 4;\n      if (s === 0) {\n        if (r < 15) {\n          eobrun = receive(r) + (1 << r) - 1;\n          break;\n        }\n        k += 16;\n      } else {\n        k += r;\n        const z = dctZigZag[k];\n        zz[z] = receiveAndExtend(s) * (1 << successive);\n        k++;\n      }\n    }\n  }\n  let successiveACState = 0;\n  let successiveACNextValue;\n  function decodeACSuccessive(component, zz) {\n    let k = spectralStart;\n    const e = spectralEnd;\n    let r = 0;\n    while (k <= e) {\n      const z = dctZigZag[k];\n      const direction = zz[z] < 0 ? -1 : 1;\n      switch (successiveACState) {\n        case 0: { // initial state\n          const rs = decodeHuffman(component.huffmanTableAC);\n          const s = rs & 15;\n          r = rs >> 4;\n          if (s === 0) {\n            if (r < 15) {\n              eobrun = receive(r) + (1 << r);\n              successiveACState = 4;\n            } else {\n              r = 16;\n              successiveACState = 1;\n            }\n          } else {\n            if (s !== 1) {\n              throw new Error('invalid ACn encoding');\n            }\n            successiveACNextValue = receiveAndExtend(s);\n            successiveACState = r ? 2 : 3;\n          }\n          continue; // eslint-disable-line no-continue\n        }\n        case 1: // skipping r zero items\n        case 2:\n          if (zz[z]) {\n            zz[z] += (readBit() << successive) * direction;\n          } else {\n            r--;\n            if (r === 0) {\n              successiveACState = successiveACState === 2 ? 3 : 0;\n            }\n          }\n          break;\n        case 3: // set value for a zero item\n          if (zz[z]) {\n            zz[z] += (readBit() << successive) * direction;\n          } else {\n            zz[z] = successiveACNextValue << successive;\n            successiveACState = 0;\n          }\n          break;\n        case 4: // eob\n          if (zz[z]) {\n            zz[z] += (readBit() << successive) * direction;\n          }\n          break;\n        default:\n          break;\n      }\n      k++;\n    }\n    if (successiveACState === 4) {\n      eobrun--;\n      if (eobrun === 0) {\n        successiveACState = 0;\n      }\n    }\n  }\n  function decodeMcu(component, decodeFunction, mcu, row, col) {\n    const mcuRow = (mcu / mcusPerLine) | 0;\n    const mcuCol = mcu % mcusPerLine;\n    const blockRow = (mcuRow * component.v) + row;\n    const blockCol = (mcuCol * component.h) + col;\n    decodeFunction(component, component.blocks[blockRow][blockCol]);\n  }\n  function decodeBlock(component, decodeFunction, mcu) {\n    const blockRow = (mcu / component.blocksPerLine) | 0;\n    const blockCol = mcu % component.blocksPerLine;\n    decodeFunction(component, component.blocks[blockRow][blockCol]);\n  }\n\n  const componentsLength = components.length;\n  let component;\n  let i;\n  let j;\n  let k;\n  let n;\n  let decodeFn;\n  if (progressive) {\n    if (spectralStart === 0) {\n      decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive;\n    } else {\n      decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive;\n    }\n  } else {\n    decodeFn = decodeBaseline;\n  }\n\n  let mcu = 0;\n  let marker;\n  let mcuExpected;\n  if (componentsLength === 1) {\n    mcuExpected = components[0].blocksPerLine * components[0].blocksPerColumn;\n  } else {\n    mcuExpected = mcusPerLine * frame.mcusPerColumn;\n  }\n\n  const usedResetInterval = resetInterval || mcuExpected;\n\n  while (mcu < mcuExpected) {\n    // reset interval stuff\n    for (i = 0; i < componentsLength; i++) {\n      components[i].pred = 0;\n    }\n    eobrun = 0;\n\n    if (componentsLength === 1) {\n      component = components[0];\n      for (n = 0; n < usedResetInterval; n++) {\n        decodeBlock(component, decodeFn, mcu);\n        mcu++;\n      }\n    } else {\n      for (n = 0; n < usedResetInterval; n++) {\n        for (i = 0; i < componentsLength; i++) {\n          component = components[i];\n          const { h, v } = component;\n          for (j = 0; j < v; j++) {\n            for (k = 0; k < h; k++) {\n              decodeMcu(component, decodeFn, mcu, j, k);\n            }\n          }\n        }\n        mcu++;\n\n        // If we've reached our expected MCU's, stop decoding\n        if (mcu === mcuExpected) {\n          break;\n        }\n      }\n    }\n\n    // find marker\n    bitsCount = 0;\n    marker = (data[offset] << 8) | data[offset + 1];\n    if (marker < 0xFF00) {\n      throw new Error('marker was not found');\n    }\n\n    if (marker >= 0xFFD0 && marker <= 0xFFD7) { // RSTx\n      offset += 2;\n    } else {\n      break;\n    }\n  }\n\n  return offset - startOffset;\n}\n\nfunction buildComponentData(frame, component) {\n  const lines = [];\n  const { blocksPerLine, blocksPerColumn } = component;\n  const samplesPerLine = blocksPerLine << 3;\n  const R = new Int32Array(64);\n  const r = new Uint8Array(64);\n\n  // A port of poppler's IDCT method which in turn is taken from:\n  //   Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz,\n  //   \"Practical Fast 1-D DCT Algorithms with 11 Multiplications\",\n  //   IEEE Intl. Conf. on Acoustics, Speech & Signal Processing, 1989,\n  //   988-991.\n  function quantizeAndInverse(zz, dataOut, dataIn) {\n    const qt = component.quantizationTable;\n    let v0;\n    let v1;\n    let v2;\n    let v3;\n    let v4;\n    let v5;\n    let v6;\n    let v7;\n    let t;\n    const p = dataIn;\n    let i;\n\n    // dequant\n    for (i = 0; i < 64; i++) {\n      p[i] = zz[i] * qt[i];\n    }\n\n    // inverse DCT on rows\n    for (i = 0; i < 8; ++i) {\n      const row = 8 * i;\n\n      // check for all-zero AC coefficients\n      if (p[1 + row] === 0 && p[2 + row] === 0 && p[3 + row] === 0\n        && p[4 + row] === 0 && p[5 + row] === 0 && p[6 + row] === 0\n        && p[7 + row] === 0) {\n        t = ((dctSqrt2 * p[0 + row]) + 512) >> 10;\n        p[0 + row] = t;\n        p[1 + row] = t;\n        p[2 + row] = t;\n        p[3 + row] = t;\n        p[4 + row] = t;\n        p[5 + row] = t;\n        p[6 + row] = t;\n        p[7 + row] = t;\n        continue; // eslint-disable-line no-continue\n      }\n\n      // stage 4\n      v0 = ((dctSqrt2 * p[0 + row]) + 128) >> 8;\n      v1 = ((dctSqrt2 * p[4 + row]) + 128) >> 8;\n      v2 = p[2 + row];\n      v3 = p[6 + row];\n      v4 = ((dctSqrt1d2 * (p[1 + row] - p[7 + row])) + 128) >> 8;\n      v7 = ((dctSqrt1d2 * (p[1 + row] + p[7 + row])) + 128) >> 8;\n      v5 = p[3 + row] << 4;\n      v6 = p[5 + row] << 4;\n\n      // stage 3\n      t = (v0 - v1 + 1) >> 1;\n      v0 = (v0 + v1 + 1) >> 1;\n      v1 = t;\n      t = ((v2 * dctSin6) + (v3 * dctCos6) + 128) >> 8;\n      v2 = ((v2 * dctCos6) - (v3 * dctSin6) + 128) >> 8;\n      v3 = t;\n      t = (v4 - v6 + 1) >> 1;\n      v4 = (v4 + v6 + 1) >> 1;\n      v6 = t;\n      t = (v7 + v5 + 1) >> 1;\n      v5 = (v7 - v5 + 1) >> 1;\n      v7 = t;\n\n      // stage 2\n      t = (v0 - v3 + 1) >> 1;\n      v0 = (v0 + v3 + 1) >> 1;\n      v3 = t;\n      t = (v1 - v2 + 1) >> 1;\n      v1 = (v1 + v2 + 1) >> 1;\n      v2 = t;\n      t = ((v4 * dctSin3) + (v7 * dctCos3) + 2048) >> 12;\n      v4 = ((v4 * dctCos3) - (v7 * dctSin3) + 2048) >> 12;\n      v7 = t;\n      t = ((v5 * dctSin1) + (v6 * dctCos1) + 2048) >> 12;\n      v5 = ((v5 * dctCos1) - (v6 * dctSin1) + 2048) >> 12;\n      v6 = t;\n\n      // stage 1\n      p[0 + row] = v0 + v7;\n      p[7 + row] = v0 - v7;\n      p[1 + row] = v1 + v6;\n      p[6 + row] = v1 - v6;\n      p[2 + row] = v2 + v5;\n      p[5 + row] = v2 - v5;\n      p[3 + row] = v3 + v4;\n      p[4 + row] = v3 - v4;\n    }\n\n    // inverse DCT on columns\n    for (i = 0; i < 8; ++i) {\n      const col = i;\n\n      // check for all-zero AC coefficients\n      if (p[(1 * 8) + col] === 0 && p[(2 * 8) + col] === 0 && p[(3 * 8) + col] === 0\n        && p[(4 * 8) + col] === 0 && p[(5 * 8) + col] === 0 && p[(6 * 8) + col] === 0\n        && p[(7 * 8) + col] === 0) {\n        t = ((dctSqrt2 * dataIn[i + 0]) + 8192) >> 14;\n        p[(0 * 8) + col] = t;\n        p[(1 * 8) + col] = t;\n        p[(2 * 8) + col] = t;\n        p[(3 * 8) + col] = t;\n        p[(4 * 8) + col] = t;\n        p[(5 * 8) + col] = t;\n        p[(6 * 8) + col] = t;\n        p[(7 * 8) + col] = t;\n        continue; // eslint-disable-line no-continue\n      }\n\n      // stage 4\n      v0 = ((dctSqrt2 * p[(0 * 8) + col]) + 2048) >> 12;\n      v1 = ((dctSqrt2 * p[(4 * 8) + col]) + 2048) >> 12;\n      v2 = p[(2 * 8) + col];\n      v3 = p[(6 * 8) + col];\n      v4 = ((dctSqrt1d2 * (p[(1 * 8) + col] - p[(7 * 8) + col])) + 2048) >> 12;\n      v7 = ((dctSqrt1d2 * (p[(1 * 8) + col] + p[(7 * 8) + col])) + 2048) >> 12;\n      v5 = p[(3 * 8) + col];\n      v6 = p[(5 * 8) + col];\n\n      // stage 3\n      t = (v0 - v1 + 1) >> 1;\n      v0 = (v0 + v1 + 1) >> 1;\n      v1 = t;\n      t = ((v2 * dctSin6) + (v3 * dctCos6) + 2048) >> 12;\n      v2 = ((v2 * dctCos6) - (v3 * dctSin6) + 2048) >> 12;\n      v3 = t;\n      t = (v4 - v6 + 1) >> 1;\n      v4 = (v4 + v6 + 1) >> 1;\n      v6 = t;\n      t = (v7 + v5 + 1) >> 1;\n      v5 = (v7 - v5 + 1) >> 1;\n      v7 = t;\n\n      // stage 2\n      t = (v0 - v3 + 1) >> 1;\n      v0 = (v0 + v3 + 1) >> 1;\n      v3 = t;\n      t = (v1 - v2 + 1) >> 1;\n      v1 = (v1 + v2 + 1) >> 1;\n      v2 = t;\n      t = ((v4 * dctSin3) + (v7 * dctCos3) + 2048) >> 12;\n      v4 = ((v4 * dctCos3) - (v7 * dctSin3) + 2048) >> 12;\n      v7 = t;\n      t = ((v5 * dctSin1) + (v6 * dctCos1) + 2048) >> 12;\n      v5 = ((v5 * dctCos1) - (v6 * dctSin1) + 2048) >> 12;\n      v6 = t;\n\n      // stage 1\n      p[(0 * 8) + col] = v0 + v7;\n      p[(7 * 8) + col] = v0 - v7;\n      p[(1 * 8) + col] = v1 + v6;\n      p[(6 * 8) + col] = v1 - v6;\n      p[(2 * 8) + col] = v2 + v5;\n      p[(5 * 8) + col] = v2 - v5;\n      p[(3 * 8) + col] = v3 + v4;\n      p[(4 * 8) + col] = v3 - v4;\n    }\n\n    // convert to 8-bit integers\n    for (i = 0; i < 64; ++i) {\n      const sample = 128 + ((p[i] + 8) >> 4);\n      if (sample < 0) {\n        dataOut[i] = 0;\n      } else if (sample > 0XFF) {\n        dataOut[i] = 0xFF;\n      } else {\n        dataOut[i] = sample;\n      }\n    }\n  }\n\n  for (let blockRow = 0; blockRow < blocksPerColumn; blockRow++) {\n    const scanLine = blockRow << 3;\n    for (let i = 0; i < 8; i++) {\n      lines.push(new Uint8Array(samplesPerLine));\n    }\n    for (let blockCol = 0; blockCol < blocksPerLine; blockCol++) {\n      quantizeAndInverse(component.blocks[blockRow][blockCol], r, R);\n\n      let offset = 0;\n      const sample = blockCol << 3;\n      for (let j = 0; j < 8; j++) {\n        const line = lines[scanLine + j];\n        for (let i = 0; i < 8; i++) {\n          line[sample + i] = r[offset++];\n        }\n      }\n    }\n  }\n  return lines;\n}\n\nclass JpegStreamReader {\n  constructor() {\n    this.jfif = null;\n    this.adobe = null;\n\n    this.quantizationTables = [];\n    this.huffmanTablesAC = [];\n    this.huffmanTablesDC = [];\n    this.resetFrames();\n  }\n\n  resetFrames() {\n    this.frames = [];\n  }\n\n  parse(data) {\n    let offset = 0;\n    // const { length } = data;\n    function readUint16() {\n      const value = (data[offset] << 8) | data[offset + 1];\n      offset += 2;\n      return value;\n    }\n    function readDataBlock() {\n      const length = readUint16();\n      const array = data.subarray(offset, offset + length - 2);\n      offset += array.length;\n      return array;\n    }\n    function prepareComponents(frame) {\n      let maxH = 0;\n      let maxV = 0;\n      let component;\n      let componentId;\n      for (componentId in frame.components) {\n        if (frame.components.hasOwnProperty(componentId)) {\n          component = frame.components[componentId];\n          if (maxH < component.h) {\n            maxH = component.h;\n          }\n          if (maxV < component.v) {\n            maxV = component.v;\n          }\n        }\n      }\n      const mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / maxH);\n      const mcusPerColumn = Math.ceil(frame.scanLines / 8 / maxV);\n      for (componentId in frame.components) {\n        if (frame.components.hasOwnProperty(componentId)) {\n          component = frame.components[componentId];\n          const blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) * component.h / maxH);\n          const blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * component.v / maxV);\n          const blocksPerLineForMcu = mcusPerLine * component.h;\n          const blocksPerColumnForMcu = mcusPerColumn * component.v;\n          const blocks = [];\n          for (let i = 0; i < blocksPerColumnForMcu; i++) {\n            const row = [];\n            for (let j = 0; j < blocksPerLineForMcu; j++) {\n              row.push(new Int32Array(64));\n            }\n            blocks.push(row);\n          }\n          component.blocksPerLine = blocksPerLine;\n          component.blocksPerColumn = blocksPerColumn;\n          component.blocks = blocks;\n        }\n      }\n      frame.maxH = maxH;\n      frame.maxV = maxV;\n      frame.mcusPerLine = mcusPerLine;\n      frame.mcusPerColumn = mcusPerColumn;\n    }\n\n    let fileMarker = readUint16();\n    if (fileMarker !== 0xFFD8) { // SOI (Start of Image)\n      throw new Error('SOI not found');\n    }\n\n    fileMarker = readUint16();\n    while (fileMarker !== 0xFFD9) { // EOI (End of image)\n      switch (fileMarker) {\n        case 0xFF00: break;\n        case 0xFFE0: // APP0 (Application Specific)\n        case 0xFFE1: // APP1\n        case 0xFFE2: // APP2\n        case 0xFFE3: // APP3\n        case 0xFFE4: // APP4\n        case 0xFFE5: // APP5\n        case 0xFFE6: // APP6\n        case 0xFFE7: // APP7\n        case 0xFFE8: // APP8\n        case 0xFFE9: // APP9\n        case 0xFFEA: // APP10\n        case 0xFFEB: // APP11\n        case 0xFFEC: // APP12\n        case 0xFFED: // APP13\n        case 0xFFEE: // APP14\n        case 0xFFEF: // APP15\n        case 0xFFFE: { // COM (Comment)\n          const appData = readDataBlock();\n\n          if (fileMarker === 0xFFE0) {\n            if (appData[0] === 0x4A && appData[1] === 0x46 && appData[2] === 0x49\n              && appData[3] === 0x46 && appData[4] === 0) { // 'JFIF\\x00'\n              this.jfif = {\n                version: { major: appData[5], minor: appData[6] },\n                densityUnits: appData[7],\n                xDensity: (appData[8] << 8) | appData[9],\n                yDensity: (appData[10] << 8) | appData[11],\n                thumbWidth: appData[12],\n                thumbHeight: appData[13],\n                thumbData: appData.subarray(14, 14 + (3 * appData[12] * appData[13])),\n              };\n            }\n          }\n          // TODO APP1 - Exif\n          if (fileMarker === 0xFFEE) {\n            if (appData[0] === 0x41 && appData[1] === 0x64 && appData[2] === 0x6F\n              && appData[3] === 0x62 && appData[4] === 0x65 && appData[5] === 0) { // 'Adobe\\x00'\n              this.adobe = {\n                version: appData[6],\n                flags0: (appData[7] << 8) | appData[8],\n                flags1: (appData[9] << 8) | appData[10],\n                transformCode: appData[11],\n              };\n            }\n          }\n          break;\n        }\n\n        case 0xFFDB: { // DQT (Define Quantization Tables)\n          const quantizationTablesLength = readUint16();\n          const quantizationTablesEnd = quantizationTablesLength + offset - 2;\n          while (offset < quantizationTablesEnd) {\n            const quantizationTableSpec = data[offset++];\n            const tableData = new Int32Array(64);\n            if ((quantizationTableSpec >> 4) === 0) { // 8 bit values\n              for (let j = 0; j < 64; j++) {\n                const z = dctZigZag[j];\n                tableData[z] = data[offset++];\n              }\n            } else if ((quantizationTableSpec >> 4) === 1) { // 16 bit\n              for (let j = 0; j < 64; j++) {\n                const z = dctZigZag[j];\n                tableData[z] = readUint16();\n              }\n            } else {\n              throw new Error('DQT: invalid table spec');\n            }\n            this.quantizationTables[quantizationTableSpec & 15] = tableData;\n          }\n          break;\n        }\n\n        case 0xFFC0: // SOF0 (Start of Frame, Baseline DCT)\n        case 0xFFC1: // SOF1 (Start of Frame, Extended DCT)\n        case 0xFFC2: { // SOF2 (Start of Frame, Progressive DCT)\n          readUint16(); // skip data length\n          const frame = {\n            extended: (fileMarker === 0xFFC1),\n            progressive: (fileMarker === 0xFFC2),\n            precision: data[offset++],\n            scanLines: readUint16(),\n            samplesPerLine: readUint16(),\n            components: {},\n            componentsOrder: [],\n          };\n\n          const componentsCount = data[offset++];\n          let componentId;\n          // let maxH = 0;\n          // let maxV = 0;\n          for (let i = 0; i < componentsCount; i++) {\n            componentId = data[offset];\n            const h = data[offset + 1] >> 4;\n            const v = data[offset + 1] & 15;\n            const qId = data[offset + 2];\n            frame.componentsOrder.push(componentId);\n            frame.components[componentId] = {\n              h,\n              v,\n              quantizationIdx: qId,\n            };\n            offset += 3;\n          }\n          prepareComponents(frame);\n          this.frames.push(frame);\n          break;\n        }\n\n        case 0xFFC4: { // DHT (Define Huffman Tables)\n          const huffmanLength = readUint16();\n          for (let i = 2; i < huffmanLength;) {\n            const huffmanTableSpec = data[offset++];\n            const codeLengths = new Uint8Array(16);\n            let codeLengthSum = 0;\n            for (let j = 0; j < 16; j++, offset++) {\n              codeLengths[j] = data[offset];\n              codeLengthSum += codeLengths[j];\n            }\n            const huffmanValues = new Uint8Array(codeLengthSum);\n            for (let j = 0; j < codeLengthSum; j++, offset++) {\n              huffmanValues[j] = data[offset];\n            }\n            i += 17 + codeLengthSum;\n\n            if ((huffmanTableSpec >> 4) === 0) {\n              this.huffmanTablesDC[huffmanTableSpec & 15] = buildHuffmanTable(\n                codeLengths, huffmanValues,\n              );\n            } else {\n              this.huffmanTablesAC[huffmanTableSpec & 15] = buildHuffmanTable(\n                codeLengths, huffmanValues,\n              );\n            }\n          }\n          break;\n        }\n\n        case 0xFFDD: // DRI (Define Restart Interval)\n          readUint16(); // skip data length\n          this.resetInterval = readUint16();\n          break;\n\n        case 0xFFDA: { // SOS (Start of Scan)\n          readUint16(); // skip length\n          const selectorsCount = data[offset++];\n          const components = [];\n          const frame = this.frames[0];\n          for (let i = 0; i < selectorsCount; i++) {\n            const component = frame.components[data[offset++]];\n            const tableSpec = data[offset++];\n            component.huffmanTableDC = this.huffmanTablesDC[tableSpec >> 4];\n            component.huffmanTableAC = this.huffmanTablesAC[tableSpec & 15];\n            components.push(component);\n          }\n          const spectralStart = data[offset++];\n          const spectralEnd = data[offset++];\n          const successiveApproximation = data[offset++];\n          const processed = decodeScan(data, offset,\n            frame, components, this.resetInterval,\n            spectralStart, spectralEnd,\n            successiveApproximation >> 4, successiveApproximation & 15);\n          offset += processed;\n          break;\n        }\n\n        case 0xFFFF: // Fill bytes\n          if (data[offset] !== 0xFF) { // Avoid skipping a valid marker.\n            offset--;\n          }\n          break;\n\n        default:\n          if (data[offset - 3] === 0xFF\n            && data[offset - 2] >= 0xC0 && data[offset - 2] <= 0xFE) {\n            // could be incorrect encoding -- last 0xFF byte of the previous\n            // block was eaten by the encoder\n            offset -= 3;\n            break;\n          }\n          throw new Error(`unknown JPEG marker ${fileMarker.toString(16)}`);\n      }\n      fileMarker = readUint16();\n    }\n  }\n\n  getResult() {\n    const { frames } = this;\n    if (this.frames.length === 0) {\n      throw new Error('no frames were decoded');\n    } else if (this.frames.length > 1) {\n      console.warn('more than one frame is not supported');\n    }\n\n    // set each frame's components quantization table\n    for (let i = 0; i < this.frames.length; i++) {\n      const cp = this.frames[i].components;\n      for (const j of Object.keys(cp)) {\n        cp[j].quantizationTable = this.quantizationTables[cp[j].quantizationIdx];\n        delete cp[j].quantizationIdx;\n      }\n    }\n\n    const frame = frames[0];\n    const { components, componentsOrder } = frame;\n    const outComponents = [];\n    const width = frame.samplesPerLine;\n    const height = frame.scanLines;\n\n    for (let i = 0; i < componentsOrder.length; i++) {\n      const component = components[componentsOrder[i]];\n      outComponents.push({\n        lines: buildComponentData(frame, component),\n        scaleX: component.h / frame.maxH,\n        scaleY: component.v / frame.maxV,\n      });\n    }\n\n    const out = new Uint8Array(width * height * outComponents.length);\n    let oi = 0;\n    for (let y = 0; y < height; ++y) {\n      for (let x = 0; x < width; ++x) {\n        for (let i = 0; i < outComponents.length; ++i) {\n          const component = outComponents[i];\n          out[oi] = component.lines[0 | y * component.scaleY][0 | x * component.scaleX];\n          ++oi;\n        }\n      }\n    }\n    return out;\n  }\n}\n\nclass jpeg_JpegDecoder extends basedecoder_BaseDecoder {\n  constructor(fileDirectory) {\n    super();\n    this.reader = new JpegStreamReader();\n    if (fileDirectory.JPEGTables) {\n      this.reader.parse(fileDirectory.JPEGTables);\n    }\n  }\n\n  decodeBlock(buffer) {\n    this.reader.resetFrames();\n    this.reader.parse(new Uint8Array(buffer));\n    return this.reader.getResult().buffer;\n  }\n}\n\n// EXTERNAL MODULE: ./node_modules/pako/lib/inflate.js\nvar inflate = __webpack_require__(32);\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/compression/deflate.js\n\n\n\nclass deflate_DeflateDecoder extends basedecoder_BaseDecoder {\n  decodeBlock(buffer) {\n    return Object(inflate[\"inflate\"])(new Uint8Array(buffer)).buffer;\n  }\n}\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/compression/packbits.js\n\n\n\nclass packbits_PackbitsDecoder extends basedecoder_BaseDecoder {\n  decodeBlock(buffer) {\n    const dataView = new DataView(buffer);\n    const out = [];\n\n    for (let i = 0; i < buffer.byteLength; ++i) {\n      let header = dataView.getInt8(i);\n      if (header < 0) {\n        const next = dataView.getUint8(i + 1);\n        header = -header;\n        for (let j = 0; j <= header; ++j) {\n          out.push(next);\n        }\n        i += 1;\n      } else {\n        for (let j = 0; j <= header; ++j) {\n          out.push(dataView.getUint8(i + j + 1));\n        }\n        i += header + 1;\n      }\n    }\n    return new Uint8Array(out).buffer;\n  }\n}\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/compression/index.js\n\n\n\n\n\n\nfunction getDecoder(fileDirectory) {\n  switch (fileDirectory.Compression) {\n    case undefined:\n    case 1: // no compression\n      return new raw_RawDecoder();\n    case 5: // LZW\n      return new lzw_LZWDecoder(fileDirectory);\n    case 6: // JPEG\n      throw new Error('old style JPEG compression is not supported.');\n    case 7: // JPEG\n      return new jpeg_JpegDecoder(fileDirectory);\n    case 8: // Deflate as recognized by Adobe\n    case 32946: // Deflate GDAL default\n      return new deflate_DeflateDecoder();\n    case 32773: // packbits\n      return new packbits_PackbitsDecoder();\n    default:\n      throw new Error(`Unknown compression method identifier: ${fileDirectory.Compression}`);\n  }\n}\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/resample.js\n/**\n * @module resample\n */\n\nfunction copyNewSize(array, width, height, samplesPerPixel = 1) {\n  return new (Object.getPrototypeOf(array).constructor)(width * height * samplesPerPixel);\n}\n\n/**\n * Resample the input arrays using nearest neighbor value selection.\n * @param {TypedArray[]} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @returns {TypedArray[]} The resampled rasters\n */\nfunction resampleNearest(valueArrays, inWidth, inHeight, outWidth, outHeight) {\n  const relX = inWidth / outWidth;\n  const relY = inHeight / outHeight;\n  return valueArrays.map((array) => {\n    const newArray = copyNewSize(array, outWidth, outHeight);\n    for (let y = 0; y < outHeight; ++y) {\n      const cy = Math.min(Math.round(relY * y), inHeight - 1);\n      for (let x = 0; x < outWidth; ++x) {\n        const cx = Math.min(Math.round(relX * x), inWidth - 1);\n        const value = array[(cy * inWidth) + cx];\n        newArray[(y * outWidth) + x] = value;\n      }\n    }\n    return newArray;\n  });\n}\n\n// simple linear interpolation, code from:\n// https://en.wikipedia.org/wiki/Linear_interpolation#Programming_language_support\nfunction lerp(v0, v1, t) {\n  return ((1 - t) * v0) + (t * v1);\n}\n\n/**\n * Resample the input arrays using bilinear interpolation.\n * @param {TypedArray[]} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @returns {TypedArray[]} The resampled rasters\n */\nfunction resampleBilinear(valueArrays, inWidth, inHeight, outWidth, outHeight) {\n  const relX = inWidth / outWidth;\n  const relY = inHeight / outHeight;\n\n  return valueArrays.map((array) => {\n    const newArray = copyNewSize(array, outWidth, outHeight);\n    for (let y = 0; y < outHeight; ++y) {\n      const rawY = relY * y;\n\n      const yl = Math.floor(rawY);\n      const yh = Math.min(Math.ceil(rawY), (inHeight - 1));\n\n      for (let x = 0; x < outWidth; ++x) {\n        const rawX = relX * x;\n        const tx = rawX % 1;\n\n        const xl = Math.floor(rawX);\n        const xh = Math.min(Math.ceil(rawX), (inWidth - 1));\n\n        const ll = array[(yl * inWidth) + xl];\n        const hl = array[(yl * inWidth) + xh];\n        const lh = array[(yh * inWidth) + xl];\n        const hh = array[(yh * inWidth) + xh];\n\n        const value = lerp(\n          lerp(ll, hl, tx),\n          lerp(lh, hh, tx),\n          rawY % 1,\n        );\n        newArray[(y * outWidth) + x] = value;\n      }\n    }\n    return newArray;\n  });\n}\n\n/**\n * Resample the input arrays using the selected resampling method.\n * @param {TypedArray[]} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {string} [method = 'nearest'] The desired resampling method\n * @returns {TypedArray[]} The resampled rasters\n */\nfunction resample(valueArrays, inWidth, inHeight, outWidth, outHeight, method = 'nearest') {\n  switch (method.toLowerCase()) {\n    case 'nearest':\n      return resampleNearest(valueArrays, inWidth, inHeight, outWidth, outHeight);\n    case 'bilinear':\n    case 'linear':\n      return resampleBilinear(valueArrays, inWidth, inHeight, outWidth, outHeight);\n    default:\n      throw new Error(`Unsupported resampling method: '${method}'`);\n  }\n}\n\n/**\n * Resample the pixel interleaved input array using nearest neighbor value selection.\n * @param {TypedArray} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {number} samples The number of samples per pixel for pixel\n *                         interleaved data\n * @returns {TypedArray} The resampled raster\n */\nfunction resampleNearestInterleaved(\n  valueArray, inWidth, inHeight, outWidth, outHeight, samples) {\n  const relX = inWidth / outWidth;\n  const relY = inHeight / outHeight;\n\n  const newArray = copyNewSize(valueArray, outWidth, outHeight, samples);\n  for (let y = 0; y < outHeight; ++y) {\n    const cy = Math.min(Math.round(relY * y), inHeight - 1);\n    for (let x = 0; x < outWidth; ++x) {\n      const cx = Math.min(Math.round(relX * x), inWidth - 1);\n      for (let i = 0; i < samples; ++i) {\n        const value = valueArray[(cy * inWidth * samples) + (cx * samples) + i];\n        newArray[(y * outWidth * samples) + (x * samples) + i] = value;\n      }\n    }\n  }\n  return newArray;\n}\n\n/**\n * Resample the pixel interleaved input array using bilinear interpolation.\n * @param {TypedArray} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {number} samples The number of samples per pixel for pixel\n *                         interleaved data\n * @returns {TypedArray} The resampled raster\n */\nfunction resampleBilinearInterleaved(\n  valueArray, inWidth, inHeight, outWidth, outHeight, samples) {\n  const relX = inWidth / outWidth;\n  const relY = inHeight / outHeight;\n  const newArray = copyNewSize(valueArray, outWidth, outHeight, samples);\n  for (let y = 0; y < outHeight; ++y) {\n    const rawY = relY * y;\n\n    const yl = Math.floor(rawY);\n    const yh = Math.min(Math.ceil(rawY), (inHeight - 1));\n\n    for (let x = 0; x < outWidth; ++x) {\n      const rawX = relX * x;\n      const tx = rawX % 1;\n\n      const xl = Math.floor(rawX);\n      const xh = Math.min(Math.ceil(rawX), (inWidth - 1));\n\n      for (let i = 0; i < samples; ++i) {\n        const ll = valueArray[(yl * inWidth * samples) + (xl * samples) + i];\n        const hl = valueArray[(yl * inWidth * samples) + (xh * samples) + i];\n        const lh = valueArray[(yh * inWidth * samples) + (xl * samples) + i];\n        const hh = valueArray[(yh * inWidth * samples) + (xh * samples) + i];\n\n        const value = lerp(\n          lerp(ll, hl, tx),\n          lerp(lh, hh, tx),\n          rawY % 1,\n        );\n        newArray[(y * outWidth * samples) + (x * samples) + i] = value;\n      }\n    }\n  }\n  return newArray;\n}\n\n/**\n * Resample the pixel interleaved input array using the selected resampling method.\n * @param {TypedArray} valueArray The input array to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {number} samples The number of samples per pixel for pixel\n *                                 interleaved data\n * @param {string} [method = 'nearest'] The desired resampling method\n * @returns {TypedArray} The resampled rasters\n */\nfunction resampleInterleaved(valueArray, inWidth, inHeight, outWidth, outHeight, samples, method = 'nearest') {\n  switch (method.toLowerCase()) {\n    case 'nearest':\n      return resampleNearestInterleaved(\n        valueArray, inWidth, inHeight, outWidth, outHeight, samples,\n      );\n    case 'bilinear':\n    case 'linear':\n      return resampleBilinearInterleaved(\n        valueArray, inWidth, inHeight, outWidth, outHeight, samples,\n      );\n    default:\n      throw new Error(`Unsupported resampling method: '${method}'`);\n  }\n}\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/geotiffimage.js\n/* eslint max-len: [\"error\", { \"code\": 120 }] */\n\n\n\n\n\n\n\nfunction sum(array, start, end) {\n  let s = 0;\n  for (let i = start; i < end; ++i) {\n    s += array[i];\n  }\n  return s;\n}\n\nfunction arrayForType(format, bitsPerSample, size) {\n  switch (format) {\n    case 1: // unsigned integer data\n      switch (bitsPerSample) {\n        case 8:\n          return new Uint8Array(size);\n        case 16:\n          return new Uint16Array(size);\n        case 32:\n          return new Uint32Array(size);\n        default:\n          break;\n      }\n      break;\n    case 2: // twos complement signed integer data\n      switch (bitsPerSample) {\n        case 8:\n          return new Int8Array(size);\n        case 16:\n          return new Int16Array(size);\n        case 32:\n          return new Int32Array(size);\n        default:\n          break;\n      }\n      break;\n    case 3: // floating point data\n      switch (bitsPerSample) {\n        case 32:\n          return new Float32Array(size);\n        case 64:\n          return new Float64Array(size);\n        default:\n          break;\n      }\n      break;\n    default:\n      break;\n  }\n  throw Error('Unsupported data format/bitsPerSample');\n}\n\n/**\n * GeoTIFF sub-file image.\n */\nclass geotiffimage_GeoTIFFImage {\n  /**\n   * @constructor\n   * @param {Object} fileDirectory The parsed file directory\n   * @param {Object} geoKeys The parsed geo-keys\n   * @param {DataView} dataView The DataView for the underlying file.\n   * @param {Boolean} littleEndian Whether the file is encoded in little or big endian\n   * @param {Boolean} cache Whether or not decoded tiles shall be cached\n   * @param {Source} source The datasource to read from\n   */\n  constructor(fileDirectory, geoKeys, dataView, littleEndian, cache, source) {\n    this.fileDirectory = fileDirectory;\n    this.geoKeys = geoKeys;\n    this.dataView = dataView;\n    this.littleEndian = littleEndian;\n    this.tiles = cache ? {} : null;\n    this.isTiled = !fileDirectory.StripOffsets;\n    const planarConfiguration = fileDirectory.PlanarConfiguration;\n    this.planarConfiguration = (typeof planarConfiguration === 'undefined') ? 1 : planarConfiguration;\n    if (this.planarConfiguration !== 1 && this.planarConfiguration !== 2) {\n      throw new Error('Invalid planar configuration.');\n    }\n\n    this.source = source;\n  }\n\n  /**\n   * Returns the associated parsed file directory.\n   * @returns {Object} the parsed file directory\n   */\n  getFileDirectory() {\n    return this.fileDirectory;\n  }\n\n  /**\n   * Returns the associated parsed geo keys.\n   * @returns {Object} the parsed geo keys\n   */\n  getGeoKeys() {\n    return this.geoKeys;\n  }\n\n  /**\n   * Returns the width of the image.\n   * @returns {Number} the width of the image\n   */\n  getWidth() {\n    return this.fileDirectory.ImageWidth;\n  }\n\n  /**\n   * Returns the height of the image.\n   * @returns {Number} the height of the image\n   */\n  getHeight() {\n    return this.fileDirectory.ImageLength;\n  }\n\n  /**\n   * Returns the number of samples per pixel.\n   * @returns {Number} the number of samples per pixel\n   */\n  getSamplesPerPixel() {\n    return this.fileDirectory.SamplesPerPixel;\n  }\n\n  /**\n   * Returns the width of each tile.\n   * @returns {Number} the width of each tile\n   */\n  getTileWidth() {\n    return this.isTiled ? this.fileDirectory.TileWidth : this.getWidth();\n  }\n\n  /**\n   * Returns the height of each tile.\n   * @returns {Number} the height of each tile\n   */\n  getTileHeight() {\n    if (this.isTiled) {\n      return this.fileDirectory.TileLength;\n    }\n    if (typeof this.fileDirectory.RowsPerStrip !== 'undefined') {\n      return Math.min(this.fileDirectory.RowsPerStrip, this.getHeight());\n    }\n    return this.getHeight();\n  }\n\n  /**\n   * Calculates the number of bytes for each pixel across all samples. Only full\n   * bytes are supported, an exception is thrown when this is not the case.\n   * @returns {Number} the bytes per pixel\n   */\n  getBytesPerPixel() {\n    let bitsPerSample = 0;\n    for (let i = 0; i < this.fileDirectory.BitsPerSample.length; ++i) {\n      const bits = this.fileDirectory.BitsPerSample[i];\n      if ((bits % 8) !== 0) {\n        throw new Error(`Sample bit-width of ${bits} is not supported.`);\n      } else if (bits !== this.fileDirectory.BitsPerSample[0]) {\n        throw new Error('Differing size of samples in a pixel are not supported.');\n      }\n      bitsPerSample += bits;\n    }\n    return bitsPerSample / 8;\n  }\n\n  getSampleByteSize(i) {\n    if (i >= this.fileDirectory.BitsPerSample.length) {\n      throw new RangeError(`Sample index ${i} is out of range.`);\n    }\n    const bits = this.fileDirectory.BitsPerSample[i];\n    if ((bits % 8) !== 0) {\n      throw new Error(`Sample bit-width of ${bits} is not supported.`);\n    }\n    return (bits / 8);\n  }\n\n  getReaderForSample(sampleIndex) {\n    const format = this.fileDirectory.SampleFormat\n      ? this.fileDirectory.SampleFormat[sampleIndex] : 1;\n    const bitsPerSample = this.fileDirectory.BitsPerSample[sampleIndex];\n    switch (format) {\n      case 1: // unsigned integer data\n        switch (bitsPerSample) {\n          case 8:\n            return DataView.prototype.getUint8;\n          case 16:\n            return DataView.prototype.getUint16;\n          case 32:\n            return DataView.prototype.getUint32;\n          default:\n            break;\n        }\n        break;\n      case 2: // twos complement signed integer data\n        switch (bitsPerSample) {\n          case 8:\n            return DataView.prototype.getInt8;\n          case 16:\n            return DataView.prototype.getInt16;\n          case 32:\n            return DataView.prototype.getInt32;\n          default:\n            break;\n        }\n        break;\n      case 3:\n        switch (bitsPerSample) {\n          case 32:\n            return DataView.prototype.getFloat32;\n          case 64:\n            return DataView.prototype.getFloat64;\n          default:\n            break;\n        }\n        break;\n      default:\n        break;\n    }\n    throw Error('Unsupported data format/bitsPerSample');\n  }\n\n  getArrayForSample(sampleIndex, size) {\n    const format = this.fileDirectory.SampleFormat\n      ? this.fileDirectory.SampleFormat[sampleIndex] : 1;\n    const bitsPerSample = this.fileDirectory.BitsPerSample[sampleIndex];\n    return arrayForType(format, bitsPerSample, size);\n  }\n\n  /**\n   * Returns the decoded strip or tile.\n   * @param {Number} x the strip or tile x-offset\n   * @param {Number} y the tile y-offset (0 for stripped images)\n   * @param {Number} sample the sample to get for separated samples\n   * @param {Pool|AbstractDecoder} poolOrDecoder the decoder or decoder pool\n   * @returns {Promise.<ArrayBuffer>}\n   */\n  async getTileOrStrip(x, y, sample, poolOrDecoder, signal) {\n    const numTilesPerRow = Math.ceil(this.getWidth() / this.getTileWidth());\n    const numTilesPerCol = Math.ceil(this.getHeight() / this.getTileHeight());\n    let index;\n    const { tiles } = this;\n    if (this.planarConfiguration === 1) {\n      index = (y * numTilesPerRow) + x;\n    } else if (this.planarConfiguration === 2) {\n      index = (sample * numTilesPerRow * numTilesPerCol) + (y * numTilesPerRow) + x;\n    }\n\n    let offset;\n    let byteCount;\n    if (this.isTiled) {\n      offset = this.fileDirectory.TileOffsets[index];\n      byteCount = this.fileDirectory.TileByteCounts[index];\n    } else {\n      offset = this.fileDirectory.StripOffsets[index];\n      byteCount = this.fileDirectory.StripByteCounts[index];\n    }\n    const slice = await this.source.fetch(offset, byteCount, false, signal);\n    if (signal && signal.aborted) {\n      return { x, y, sample, data: [] };\n    }\n    // either use the provided pool or decoder to decode the data\n    let request;\n    if (tiles === null) {\n      request = poolOrDecoder.decode(this.fileDirectory, slice);\n    } else if (!tiles[index]) {\n      request = poolOrDecoder.decode(this.fileDirectory, slice);\n      tiles[index] = request;\n    }\n    return { x, y, sample, data: await request };\n  }\n\n  /**\n   * Internal read function.\n   * @private\n   * @param {Array} imageWindow The image window in pixel coordinates\n   * @param {Array} samples The selected samples (0-based indices)\n   * @param {TypedArray[]|TypedArray} valueArrays The array(s) to write into\n   * @param {Boolean} interleave Whether or not to write in an interleaved manner\n   * @param {Pool} pool The decoder pool\n   * @returns {Promise<TypedArray[]>|Promise<TypedArray>}\n   */\n  async _readRaster(imageWindow, samples, valueArrays, interleave, poolOrDecoder, width, height, resampleMethod) {\n    const tileWidth = this.getTileWidth();\n    const tileHeight = this.getTileHeight();\n\n    const minXTile = Math.max(Math.floor(imageWindow[0] / tileWidth), 0);\n    const maxXTile = Math.min(\n      Math.ceil(imageWindow[2] / tileWidth),\n      Math.ceil(this.getWidth() / this.getTileWidth()),\n    );\n    const minYTile = Math.max(Math.floor(imageWindow[1] / tileHeight), 0);\n    const maxYTile = Math.min(\n      Math.ceil(imageWindow[3] / tileHeight),\n      Math.ceil(this.getHeight() / this.getTileHeight()),\n    );\n    const windowWidth = imageWindow[2] - imageWindow[0];\n\n    let bytesPerPixel = this.getBytesPerPixel();\n\n    const srcSampleOffsets = [];\n    const sampleReaders = [];\n    for (let i = 0; i < samples.length; ++i) {\n      if (this.planarConfiguration === 1) {\n        srcSampleOffsets.push(sum(this.fileDirectory.BitsPerSample, 0, samples[i]) / 8);\n      } else {\n        srcSampleOffsets.push(0);\n      }\n      sampleReaders.push(this.getReaderForSample(samples[i]));\n    }\n\n    const promises = [];\n    const { littleEndian } = this;\n\n    for (let yTile = minYTile; yTile < maxYTile; ++yTile) {\n      for (let xTile = minXTile; xTile < maxXTile; ++xTile) {\n        for (let sampleIndex = 0; sampleIndex < samples.length; ++sampleIndex) {\n          const si = sampleIndex;\n          const sample = samples[sampleIndex];\n          if (this.planarConfiguration === 2) {\n            bytesPerPixel = this.getSampleByteSize(sample);\n          }\n          const promise = this.getTileOrStrip(xTile, yTile, sample, poolOrDecoder);\n          promises.push(promise);\n          promise.then((tile) => {\n            const buffer = tile.data;\n            const dataView = new DataView(buffer);\n            const firstLine = tile.y * tileHeight;\n            const firstCol = tile.x * tileWidth;\n            const lastLine = (tile.y + 1) * tileHeight;\n            const lastCol = (tile.x + 1) * tileWidth;\n            const reader = sampleReaders[si];\n\n            const ymax = Math.min(tileHeight, tileHeight - (lastLine - imageWindow[3]));\n            const xmax = Math.min(tileWidth, tileWidth - (lastCol - imageWindow[2]));\n\n            for (let y = Math.max(0, imageWindow[1] - firstLine); y < ymax; ++y) {\n              for (let x = Math.max(0, imageWindow[0] - firstCol); x < xmax; ++x) {\n                const pixelOffset = ((y * tileWidth) + x) * bytesPerPixel;\n                const value = reader.call(\n                  dataView, pixelOffset + srcSampleOffsets[si], littleEndian,\n                );\n                let windowCoordinate;\n                if (interleave) {\n                  windowCoordinate = ((y + firstLine - imageWindow[1]) * windowWidth * samples.length)\n                    + ((x + firstCol - imageWindow[0]) * samples.length)\n                    + si;\n                  valueArrays[windowCoordinate] = value;\n                } else {\n                  windowCoordinate = (\n                    (y + firstLine - imageWindow[1]) * windowWidth\n                  ) + x + firstCol - imageWindow[0];\n                  valueArrays[si][windowCoordinate] = value;\n                }\n              }\n            }\n          });\n        }\n      }\n    }\n    await Promise.all(promises);\n\n    if ((width && (imageWindow[2] - imageWindow[0]) !== width)\n        || (height && (imageWindow[3] - imageWindow[1]) !== height)) {\n      let resampled;\n      if (interleave) {\n        resampled = resampleInterleaved(\n          valueArrays,\n          imageWindow[2] - imageWindow[0],\n          imageWindow[3] - imageWindow[1],\n          width, height,\n          samples.length,\n          resampleMethod,\n        );\n      } else {\n        resampled = resample(\n          valueArrays,\n          imageWindow[2] - imageWindow[0],\n          imageWindow[3] - imageWindow[1],\n          width, height,\n          resampleMethod,\n        );\n      }\n      resampled.width = width;\n      resampled.height = height;\n      return resampled;\n    }\n\n    valueArrays.width = width || imageWindow[2] - imageWindow[0];\n    valueArrays.height = height || imageWindow[3] - imageWindow[1];\n\n    return valueArrays;\n  }\n\n  /**\n   * Reads raster data from the image. This function reads all selected samples\n   * into separate arrays of the correct type for that sample or into a single\n   * combined array when `interleave` is set. When provided, only a subset\n   * of the raster is read for each sample.\n   *\n   * @param {Object} [options={}] optional parameters\n   * @param {Array} [options.window=whole image] the subset to read data from.\n   * @param {Array} [options.samples=all samples] the selection of samples to read from.\n   * @param {Boolean} [options.interleave=false] whether the data shall be read\n   *                                             in one single array or separate\n   *                                             arrays.\n   * @param {Number} [options.pool=null] The optional decoder pool to use.\n   * @param {number} [options.width] The desired width of the output. When the width is\n   *                                 not the same as the images, resampling will be\n   *                                 performed.\n   * @param {number} [options.height] The desired height of the output. When the width\n   *                                  is not the same as the images, resampling will\n   *                                  be performed.\n   * @param {string} [options.resampleMethod='nearest'] The desired resampling method.\n   * @param {number|number[]} [options.fillValue] The value to use for parts of the image\n   *                                              outside of the images extent. When\n   *                                              multiple samples are requested, an\n   *                                              array of fill values can be passed.\n   * @returns {Promise.<(TypedArray|TypedArray[])>} the decoded arrays as a promise\n   */\n  async readRasters({\n    window: wnd, samples = [], interleave, pool = null,\n    width, height, resampleMethod, fillValue,\n  } = {}) {\n    const imageWindow = wnd || [0, 0, this.getWidth(), this.getHeight()];\n\n    // check parameters\n    if (imageWindow[0] > imageWindow[2] || imageWindow[1] > imageWindow[3]) {\n      throw new Error('Invalid subsets');\n    }\n\n    const imageWindowWidth = imageWindow[2] - imageWindow[0];\n    const imageWindowHeight = imageWindow[3] - imageWindow[1];\n    const numPixels = imageWindowWidth * imageWindowHeight;\n\n    if (!samples || !samples.length) {\n      for (let i = 0; i < this.fileDirectory.SamplesPerPixel; ++i) {\n        samples.push(i);\n      }\n    } else {\n      for (let i = 0; i < samples.length; ++i) {\n        if (samples[i] >= this.fileDirectory.SamplesPerPixel) {\n          return Promise.reject(new RangeError(`Invalid sample index '${samples[i]}'.`));\n        }\n      }\n    }\n    let valueArrays;\n    if (interleave) {\n      const format = this.fileDirectory.SampleFormat\n        ? Math.max.apply(null, this.fileDirectory.SampleFormat) : 1;\n      const bitsPerSample = Math.max.apply(null, this.fileDirectory.BitsPerSample);\n      valueArrays = arrayForType(format, bitsPerSample, numPixels * samples.length);\n      if (fillValue) {\n        valueArrays.fill(fillValue);\n      }\n    } else {\n      valueArrays = [];\n      for (let i = 0; i < samples.length; ++i) {\n        const valueArray = this.getArrayForSample(samples[i], numPixels);\n        if (Array.isArray(fillValue) && i < fillValue.length) {\n          valueArray.fill(fillValue[i]);\n        } else if (fillValue && !Array.isArray(fillValue)) {\n          valueArray.fill(fillValue);\n        }\n        valueArrays.push(valueArray);\n      }\n    }\n\n    const poolOrDecoder = pool || getDecoder(this.fileDirectory);\n\n    const result = await this._readRaster(\n      imageWindow, samples, valueArrays, interleave, poolOrDecoder, width, height, resampleMethod,\n    );\n    return result;\n  }\n\n  /**\n   * Reads raster data from the image as RGB. The result is always an\n   * interleaved typed array.\n   * Colorspaces other than RGB will be transformed to RGB, color maps expanded.\n   * When no other method is applicable, the first sample is used to produce a\n   * greayscale image.\n   * When provided, only a subset of the raster is read for each sample.\n   *\n   * @param {Object} [options] optional parameters\n   * @param {Array} [options.window=whole image] the subset to read data from.\n   * @param {Number} [pool=null] The optional decoder pool to use.\n   * @param {number} [width] The desired width of the output. When the width is no the\n   *                         same as the images, resampling will be performed.\n   * @param {number} [height] The desired height of the output. When the width is no the\n   *                          same as the images, resampling will be performed.\n   * @param {string} [resampleMethod='nearest'] The desired resampling method.\n   * @param {bool} [enableAlpha=false] Enable reading alpha channel if present.\n   * @returns {Promise.<TypedArray|TypedArray[]>} the RGB array as a Promise\n   */\n  async readRGB({ window, pool = null, width, height, resampleMethod, enableAlpha = false } = {}) {\n    const imageWindow = window || [0, 0, this.getWidth(), this.getHeight()];\n\n    // check parameters\n    if (imageWindow[0] > imageWindow[2] || imageWindow[1] > imageWindow[3]) {\n      throw new Error('Invalid subsets');\n    }\n\n    const pi = this.fileDirectory.PhotometricInterpretation;\n\n    if (pi === photometricInterpretations.RGB) {\n      let s = [0, 1, 2];\n      if ((!(this.fileDirectory.ExtraSamples === ExtraSamplesValues.Unspecified)) && enableAlpha) {\n        s = [];\n        for (let i = 0; i < this.fileDirectory.BitsPerSample.length; i += 1) {\n          s.push(i);\n        }\n      }\n      return this.readRasters({\n        window,\n        interleave: true,\n        samples: s,\n        pool,\n        width,\n        height,\n      });\n    }\n\n    let samples;\n    switch (pi) {\n      case photometricInterpretations.WhiteIsZero:\n      case photometricInterpretations.BlackIsZero:\n      case photometricInterpretations.Palette:\n        samples = [0];\n        break;\n      case photometricInterpretations.CMYK:\n        samples = [0, 1, 2, 3];\n        break;\n      case photometricInterpretations.YCbCr:\n      case photometricInterpretations.CIELab:\n        samples = [0, 1, 2];\n        break;\n      default:\n        throw new Error('Invalid or unsupported photometric interpretation.');\n    }\n\n    const subOptions = {\n      window: imageWindow,\n      interleave: true,\n      samples,\n      pool,\n      width,\n      height,\n      resampleMethod,\n    };\n    const { fileDirectory } = this;\n    const raster = await this.readRasters(subOptions);\n\n    const max = 2 ** this.fileDirectory.BitsPerSample[0];\n    let data;\n    switch (pi) {\n      case photometricInterpretations.WhiteIsZero:\n        data = fromWhiteIsZero(raster, max);\n        break;\n      case photometricInterpretations.BlackIsZero:\n        data = fromBlackIsZero(raster, max);\n        break;\n      case photometricInterpretations.Palette:\n        data = fromPalette(raster, fileDirectory.ColorMap);\n        break;\n      case photometricInterpretations.CMYK:\n        data = fromCMYK(raster);\n        break;\n      case photometricInterpretations.YCbCr:\n        data = fromYCbCr(raster);\n        break;\n      case photometricInterpretations.CIELab:\n        data = fromCIELab(raster);\n        break;\n      default:\n        throw new Error('Unsupported photometric interpretation.');\n    }\n    data.width = raster.width;\n    data.height = raster.height;\n    return data;\n  }\n\n  /**\n   * Returns an array of tiepoints.\n   * @returns {Object[]}\n   */\n  getTiePoints() {\n    if (!this.fileDirectory.ModelTiepoint) {\n      return [];\n    }\n\n    const tiePoints = [];\n    for (let i = 0; i < this.fileDirectory.ModelTiepoint.length; i += 6) {\n      tiePoints.push({\n        i: this.fileDirectory.ModelTiepoint[i],\n        j: this.fileDirectory.ModelTiepoint[i + 1],\n        k: this.fileDirectory.ModelTiepoint[i + 2],\n        x: this.fileDirectory.ModelTiepoint[i + 3],\n        y: this.fileDirectory.ModelTiepoint[i + 4],\n        z: this.fileDirectory.ModelTiepoint[i + 5],\n      });\n    }\n    return tiePoints;\n  }\n\n  /**\n   * Returns the parsed GDAL metadata items.\n   *\n   * If sample is passed to null, dataset-level metadata will be returned.\n   * Otherwise only metadata specific to the provided sample will be returned.\n   *\n   * @param {Number} [sample=null] The sample index.\n   * @returns {Object}\n   */\n  getGDALMetadata(sample = null) {\n    const metadata = {};\n    if (!this.fileDirectory.GDAL_METADATA) {\n      return null;\n    }\n    const string = this.fileDirectory.GDAL_METADATA;\n    const xmlDom = tXml_default()(string.substring(0, string.length - 1));\n\n    if (!xmlDom[0].tagName) {\n      throw new Error('Failed to parse GDAL metadata XML.');\n    }\n\n    const root = xmlDom[0];\n    if (root.tagName !== 'GDALMetadata') {\n      throw new Error('Unexpected GDAL metadata XML tag.');\n    }\n\n    let items = root.children\n      .filter((child) => child.tagName === 'Item');\n\n    if (sample !== null) {\n      items = items.filter((item) => Number(item.attributes.sample) === sample);\n    }\n\n    for (let i = 0; i < items.length; ++i) {\n      const item = items[i];\n      metadata[item.attributes.name] = item.children[0];\n    }\n    return metadata;\n  }\n\n  /**\n   * Returns the GDAL nodata value\n   * @returns {Number} or null\n   */\n  getGDALNoData() {\n    if (!this.fileDirectory.GDAL_NODATA) {\n      return null;\n    }\n    const string = this.fileDirectory.GDAL_NODATA;\n    return Number(string.substring(0, string.length - 1));\n  }\n\n  /**\n   * Returns the image origin as a XYZ-vector. When the image has no affine\n   * transformation, then an exception is thrown.\n   * @returns {Array} The origin as a vector\n   */\n  getOrigin() {\n    const tiePoints = this.fileDirectory.ModelTiepoint;\n    const modelTransformation = this.fileDirectory.ModelTransformation;\n    if (tiePoints && tiePoints.length === 6) {\n      return [\n        tiePoints[3],\n        tiePoints[4],\n        tiePoints[5],\n      ];\n    }\n    if (modelTransformation) {\n      return [\n        modelTransformation[3],\n        modelTransformation[7],\n        modelTransformation[11],\n      ];\n    }\n    throw new Error('The image does not have an affine transformation.');\n  }\n\n  /**\n   * Returns the image resolution as a XYZ-vector. When the image has no affine\n   * transformation, then an exception is thrown.\n   * @param {GeoTIFFImage} [referenceImage=null] A reference image to calculate the resolution from\n   *                                             in cases when the current image does not have the\n   *                                             required tags on its own.\n   * @returns {Array} The resolution as a vector\n   */\n  getResolution(referenceImage = null) {\n    const modelPixelScale = this.fileDirectory.ModelPixelScale;\n    const modelTransformation = this.fileDirectory.ModelTransformation;\n\n    if (modelPixelScale) {\n      return [\n        modelPixelScale[0],\n        -modelPixelScale[1],\n        modelPixelScale[2],\n      ];\n    }\n    if (modelTransformation) {\n      return [\n        modelTransformation[0],\n        modelTransformation[5],\n        modelTransformation[10],\n      ];\n    }\n\n    if (referenceImage) {\n      const [refResX, refResY, refResZ] = referenceImage.getResolution();\n      return [\n        refResX * referenceImage.getWidth() / this.getWidth(),\n        refResY * referenceImage.getHeight() / this.getHeight(),\n        refResZ * referenceImage.getWidth() / this.getWidth(),\n      ];\n    }\n\n    throw new Error('The image does not have an affine transformation.');\n  }\n\n  /**\n   * Returns whether or not the pixels of the image depict an area (or point).\n   * @returns {Boolean} Whether the pixels are a point\n   */\n  pixelIsArea() {\n    return this.geoKeys.GTRasterTypeGeoKey === 1;\n  }\n\n  /**\n   * Returns the image bounding box as an array of 4 values: min-x, min-y,\n   * max-x and max-y. When the image has no affine transformation, then an\n   * exception is thrown.\n   * @returns {Array} The bounding box\n   */\n  getBoundingBox() {\n    const origin = this.getOrigin();\n    const resolution = this.getResolution();\n\n    const x1 = origin[0];\n    const y1 = origin[1];\n\n    const x2 = x1 + (resolution[0] * this.getWidth());\n    const y2 = y1 + (resolution[1] * this.getHeight());\n\n    return [\n      Math.min(x1, x2),\n      Math.min(y1, y2),\n      Math.max(x1, x2),\n      Math.max(y1, y2),\n    ];\n  }\n}\n\n/* harmony default export */ var geotiffimage = (geotiffimage_GeoTIFFImage);\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/dataview64.js\nclass DataView64 {\n  constructor(arrayBuffer) {\n    this._dataView = new DataView(arrayBuffer);\n  }\n\n  get buffer() {\n    return this._dataView.buffer;\n  }\n\n  getUint64(offset, littleEndian) {\n    const left = this.getUint32(offset, littleEndian);\n    const right = this.getUint32(offset + 4, littleEndian);\n    let combined;\n    if (littleEndian) {\n      combined = left + 2 ** 32 * right;\n      if (!Number.isSafeInteger(combined)) {\n        throw new Error(\n          `${combined} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`\n        );\n      }\n      return combined;\n    }\n    combined = 2 ** 32 * left + right;\n    if (!Number.isSafeInteger(combined)) {\n      throw new Error(\n        `${combined} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`\n      );\n    }\n\n    return combined;\n  }\n\n  // adapted from https://stackoverflow.com/a/55338384/8060591\n  getInt64(offset, littleEndian) {\n    let value = 0;\n    const isNegative =\n      (this._dataView.getUint8(offset + (littleEndian ? 7 : 0)) & 0x80) > 0;\n    let carrying = true;\n    for (let i = 0; i < 8; i++) {\n      let byte = this._dataView.getUint8(offset + (littleEndian ? i : 7 - i));\n      if (isNegative) {\n        if (carrying) {\n          if (byte !== 0x00) {\n            byte = ~(byte - 1) & 0xff;\n            carrying = false;\n          }\n        } else {\n          byte = ~byte & 0xff;\n        }\n      }\n      value += byte * 256 ** i;\n    }\n    if (isNegative) {\n      value = -value;\n    }\n    return value;\n  }\n\n  getUint8(offset, littleEndian) {\n    return this._dataView.getUint8(offset, littleEndian);\n  }\n\n  getInt8(offset, littleEndian) {\n    return this._dataView.getInt8(offset, littleEndian);\n  }\n\n  getUint16(offset, littleEndian) {\n    return this._dataView.getUint16(offset, littleEndian);\n  }\n\n  getInt16(offset, littleEndian) {\n    return this._dataView.getInt16(offset, littleEndian);\n  }\n\n  getUint32(offset, littleEndian) {\n    return this._dataView.getUint32(offset, littleEndian);\n  }\n\n  getInt32(offset, littleEndian) {\n    return this._dataView.getInt32(offset, littleEndian);\n  }\n\n  getFloat32(offset, littleEndian) {\n    return this._dataView.getFloat32(offset, littleEndian);\n  }\n\n  getFloat64(offset, littleEndian) {\n    return this._dataView.getFloat64(offset, littleEndian);\n  }\n}\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/dataslice.js\nclass DataSlice {\n  constructor(arrayBuffer, sliceOffset, littleEndian, bigTiff) {\n    this._dataView = new DataView(arrayBuffer);\n    this._sliceOffset = sliceOffset;\n    this._littleEndian = littleEndian;\n    this._bigTiff = bigTiff;\n  }\n\n  get sliceOffset() {\n    return this._sliceOffset;\n  }\n\n  get sliceTop() {\n    return this._sliceOffset + this.buffer.byteLength;\n  }\n\n  get littleEndian() {\n    return this._littleEndian;\n  }\n\n  get bigTiff() {\n    return this._bigTiff;\n  }\n\n  get buffer() {\n    return this._dataView.buffer;\n  }\n\n  covers(offset, length) {\n    return this.sliceOffset <= offset && this.sliceTop >= offset + length;\n  }\n\n  readUint8(offset) {\n    return this._dataView.getUint8(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  readInt8(offset) {\n    return this._dataView.getInt8(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  readUint16(offset) {\n    return this._dataView.getUint16(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  readInt16(offset) {\n    return this._dataView.getInt16(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  readUint32(offset) {\n    return this._dataView.getUint32(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  readInt32(offset) {\n    return this._dataView.getInt32(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  readFloat32(offset) {\n    return this._dataView.getFloat32(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  readFloat64(offset) {\n    return this._dataView.getFloat64(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  readUint64(offset) {\n    const left = this.readUint32(offset);\n    const right = this.readUint32(offset + 4);\n    let combined;\n    if (this._littleEndian) {\n      combined = left + 2 ** 32 * right;\n      if (!Number.isSafeInteger(combined)) {\n        throw new Error(\n          `${combined} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`,\n        );\n      }\n      return combined;\n    }\n    combined = 2 ** 32 * left + right;\n    if (!Number.isSafeInteger(combined)) {\n      throw new Error(\n        `${combined} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`,\n      );\n    }\n\n    return combined;\n  }\n\n  // adapted from https://stackoverflow.com/a/55338384/8060591\n  readInt64(offset) {\n    let value = 0;\n    const isNegative =\n      (this._dataView.getUint8(offset + (this._littleEndian ? 7 : 0)) & 0x80) >\n      0;\n    let carrying = true;\n    for (let i = 0; i < 8; i++) {\n      let byte = this._dataView.getUint8(\n        offset + (this._littleEndian ? i : 7 - i)\n      );\n      if (isNegative) {\n        if (carrying) {\n          if (byte !== 0x00) {\n            byte = ~(byte - 1) & 0xff;\n            carrying = false;\n          }\n        } else {\n          byte = ~byte & 0xff;\n        }\n      }\n      value += byte * 256 ** i;\n    }\n    if (isNegative) {\n      value = -value;\n    }\n    return value\n  }\n\n  readOffset(offset) {\n    if (this._bigTiff) {\n      return this.readUint64(offset);\n    }\n    return this.readUint32(offset);\n  }\n}\n\n// CONCATENATED MODULE: ./node_modules/threads/dist-esm/master/get-bundle-url.browser.js\n// Source: <https://github.com/parcel-bundler/parcel/blob/master/packages/core/parcel-bundler/src/builtins/bundle-url.js>\nlet bundleURL;\nfunction getBundleURLCached() {\n    if (!bundleURL) {\n        bundleURL = getBundleURL();\n    }\n    return bundleURL;\n}\nfunction getBundleURL() {\n    // Attempt to find the URL of the current script and use that as the base URL\n    try {\n        throw new Error;\n    }\n    catch (err) {\n        const matches = (\"\" + err.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\\/\\/[^)\\n]+/g);\n        if (matches) {\n            return getBaseURL(matches[0]);\n        }\n    }\n    return \"/\";\n}\nfunction getBaseURL(url) {\n    return (\"\" + url).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\\/\\/.+)?\\/[^/]+(?:\\?.*)?$/, '$1') + '/';\n}\n\n\n// CONCATENATED MODULE: ./node_modules/threads/dist-esm/master/implementation.browser.js\n// tslint:disable max-classes-per-file\n\nconst defaultPoolSize = typeof navigator !== \"undefined\" && navigator.hardwareConcurrency\n    ? navigator.hardwareConcurrency\n    : 4;\nconst isAbsoluteURL = (value) => /^(file|https?:)?\\/\\//i.test(value);\nfunction createSourceBlobURL(code) {\n    const blob = new Blob([code], { type: \"application/javascript\" });\n    return URL.createObjectURL(blob);\n}\nfunction selectWorkerImplementation() {\n    if (typeof Worker === \"undefined\") {\n        // Might happen on Safari, for instance\n        // The idea is to only fail if the constructor is actually used\n        return class NoWebWorker {\n            constructor() {\n                throw Error(\"No web worker implementation available. You might have tried to spawn a worker within a worker in a browser that doesn't support workers in workers.\");\n            }\n        };\n    }\n    class WebWorker extends Worker {\n        constructor(url, options) {\n            if (typeof url === \"string\" && options && options._baseURL) {\n                url = new URL(url, options._baseURL);\n            }\n            else if (typeof url === \"string\" && !isAbsoluteURL(url) && getBundleURLCached().match(/^file:\\/\\//i)) {\n                url = new URL(url, getBundleURLCached().replace(/\\/[^\\/]+$/, \"/\"));\n                url = createSourceBlobURL(`importScripts(${JSON.stringify(url)});`);\n            }\n            if (typeof url === \"string\" && isAbsoluteURL(url)) {\n                // Create source code blob loading JS file via `importScripts()`\n                // to circumvent worker CORS restrictions\n                url = createSourceBlobURL(`importScripts(${JSON.stringify(url)});`);\n            }\n            super(url, options);\n        }\n    }\n    class BlobWorker extends WebWorker {\n        constructor(blob, options) {\n            const url = window.URL.createObjectURL(blob);\n            super(url, options);\n        }\n        static fromText(source, options) {\n            const blob = new window.Blob([source], { type: \"text/javascript\" });\n            return new BlobWorker(blob, options);\n        }\n    }\n    return {\n        blob: BlobWorker,\n        default: WebWorker\n    };\n}\nlet implementation;\nfunction getWorkerImplementation() {\n    if (!implementation) {\n        implementation = selectWorkerImplementation();\n    }\n    return implementation;\n}\nfunction isWorkerRuntime() {\n    const isWindowContext = typeof self !== \"undefined\" && typeof Window !== \"undefined\" && self instanceof Window;\n    return typeof self !== \"undefined\" && self.postMessage && !isWindowContext ? true : false;\n}\n\n// CONCATENATED MODULE: ./node_modules/threads/dist-esm/master/index.js\n\n\n\n\n\n/** Separate class to spawn workers from source code blobs or strings. */\nconst master_BlobWorker = getWorkerImplementation().blob;\n/** Worker implementation. Either web worker or a node.js Worker class. */\nconst master_Worker = getWorkerImplementation().default;\n\n// EXTERNAL MODULE: ./node_modules/debug/src/browser.js\nvar browser = __webpack_require__(3);\nvar browser_default = /*#__PURE__*/__webpack_require__.n(browser);\n\n// EXTERNAL MODULE: ./node_modules/observable-fns/dist.esm/subject.js\nvar subject = __webpack_require__(33);\n\n// EXTERNAL MODULE: ./node_modules/observable-fns/dist.esm/multicast.js + 1 modules\nvar multicast = __webpack_require__(74);\n\n// EXTERNAL MODULE: ./node_modules/observable-fns/dist.esm/observable.js + 1 modules\nvar observable = __webpack_require__(9);\n\n// CONCATENATED MODULE: ./node_modules/threads/dist-esm/ponyfills.js\n// Based on <https://github.com/es-shims/Promise.allSettled/blob/master/implementation.js>\nfunction allSettled(values) {\n    return Promise.all(values.map(item => {\n        const onFulfill = (value) => {\n            return { status: 'fulfilled', value };\n        };\n        const onReject = (reason) => {\n            return { status: 'rejected', reason };\n        };\n        const itemPromise = Promise.resolve(item);\n        try {\n            return itemPromise.then(onFulfill, onReject);\n        }\n        catch (error) {\n            return Promise.reject(error);\n        }\n    }));\n}\n\n// CONCATENATED MODULE: ./node_modules/threads/dist-esm/master/pool-types.js\n/** Pool event type. Specifies the type of each `PoolEvent`. */\nvar PoolEventType;\n(function (PoolEventType) {\n    PoolEventType[\"initialized\"] = \"initialized\";\n    PoolEventType[\"taskCanceled\"] = \"taskCanceled\";\n    PoolEventType[\"taskCompleted\"] = \"taskCompleted\";\n    PoolEventType[\"taskFailed\"] = \"taskFailed\";\n    PoolEventType[\"taskQueued\"] = \"taskQueued\";\n    PoolEventType[\"taskQueueDrained\"] = \"taskQueueDrained\";\n    PoolEventType[\"taskStart\"] = \"taskStart\";\n    PoolEventType[\"terminated\"] = \"terminated\";\n})(PoolEventType || (PoolEventType = {}));\n\n// EXTERNAL MODULE: ./node_modules/threads/dist-esm/symbols.js\nvar symbols = __webpack_require__(1);\n\n// CONCATENATED MODULE: ./node_modules/threads/dist-esm/master/thread.js\n\nfunction fail(message) {\n    throw Error(message);\n}\n/** Thread utility functions. Use them to manage or inspect a `spawn()`-ed thread. */\nconst Thread = {\n    /** Return an observable that can be used to subscribe to all errors happening in the thread. */\n    errors(thread) {\n        return thread[symbols[\"a\" /* $errors */]] || fail(\"Error observable not found. Make sure to pass a thread instance as returned by the spawn() promise.\");\n    },\n    /** Return an observable that can be used to subscribe to internal events happening in the thread. Useful for debugging. */\n    events(thread) {\n        return thread[symbols[\"b\" /* $events */]] || fail(\"Events observable not found. Make sure to pass a thread instance as returned by the spawn() promise.\");\n    },\n    /** Terminate a thread. Remember to terminate every thread when you are done using it. */\n    terminate(thread) {\n        return thread[symbols[\"c\" /* $terminate */]]();\n    }\n};\n\n// CONCATENATED MODULE: ./node_modules/threads/dist-esm/master/pool.js\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};\n\n\n\n\n\n\n\nlet nextPoolID = 1;\nfunction createArray(size) {\n    const array = [];\n    for (let index = 0; index < size; index++) {\n        array.push(index);\n    }\n    return array;\n}\nfunction delay(ms) {\n    return new Promise(resolve => setTimeout(resolve, ms));\n}\nfunction flatMap(array, mapper) {\n    return array.reduce((flattened, element) => [...flattened, ...mapper(element)], []);\n}\nfunction slugify(text) {\n    return text.replace(/\\W/g, \" \").trim().replace(/\\s+/g, \"-\");\n}\nfunction spawnWorkers(spawnWorker, count) {\n    return createArray(count).map(() => ({\n        init: spawnWorker(),\n        runningTasks: []\n    }));\n}\nclass pool_WorkerPool {\n    constructor(spawnWorker, optionsOrSize) {\n        this.eventSubject = new subject[\"a\" /* default */]();\n        this.initErrors = [];\n        this.isClosing = false;\n        this.nextTaskID = 1;\n        this.taskQueue = [];\n        const options = typeof optionsOrSize === \"number\"\n            ? { size: optionsOrSize }\n            : optionsOrSize || {};\n        const { size = defaultPoolSize } = options;\n        this.debug = browser_default()(`threads:pool:${slugify(options.name || String(nextPoolID++))}`);\n        this.options = options;\n        this.workers = spawnWorkers(spawnWorker, size);\n        this.eventObservable = Object(multicast[\"a\" /* default */])(observable[\"a\" /* default */].from(this.eventSubject));\n        Promise.all(this.workers.map(worker => worker.init)).then(() => this.eventSubject.next({\n            type: PoolEventType.initialized,\n            size: this.workers.length\n        }), error => {\n            this.debug(\"Error while initializing pool worker:\", error);\n            this.eventSubject.error(error);\n            this.initErrors.push(error);\n        });\n    }\n    findIdlingWorker() {\n        const { concurrency = 1 } = this.options;\n        return this.workers.find(worker => worker.runningTasks.length < concurrency);\n    }\n    runPoolTask(worker, task) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const workerID = this.workers.indexOf(worker) + 1;\n            this.debug(`Running task #${task.id} on worker #${workerID}...`);\n            this.eventSubject.next({\n                type: PoolEventType.taskStart,\n                taskID: task.id,\n                workerID\n            });\n            try {\n                const returnValue = yield task.run(yield worker.init);\n                this.debug(`Task #${task.id} completed successfully`);\n                this.eventSubject.next({\n                    type: PoolEventType.taskCompleted,\n                    returnValue,\n                    taskID: task.id,\n                    workerID\n                });\n            }\n            catch (error) {\n                this.debug(`Task #${task.id} failed`);\n                this.eventSubject.next({\n                    type: PoolEventType.taskFailed,\n                    taskID: task.id,\n                    error,\n                    workerID\n                });\n            }\n        });\n    }\n    run(worker, task) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const runPromise = (() => __awaiter(this, void 0, void 0, function* () {\n                const removeTaskFromWorkersRunningTasks = () => {\n                    worker.runningTasks = worker.runningTasks.filter(someRunPromise => someRunPromise !== runPromise);\n                };\n                // Defer task execution by one tick to give handlers time to subscribe\n                yield delay(0);\n                try {\n                    yield this.runPoolTask(worker, task);\n                }\n                finally {\n                    removeTaskFromWorkersRunningTasks();\n                    if (!this.isClosing) {\n                        this.scheduleWork();\n                    }\n                }\n            }))();\n            worker.runningTasks.push(runPromise);\n        });\n    }\n    scheduleWork() {\n        this.debug(`Attempt de-queueing a task in order to run it...`);\n        const availableWorker = this.findIdlingWorker();\n        if (!availableWorker)\n            return;\n        const nextTask = this.taskQueue.shift();\n        if (!nextTask) {\n            this.debug(`Task queue is empty`);\n            this.eventSubject.next({ type: PoolEventType.taskQueueDrained });\n            return;\n        }\n        this.run(availableWorker, nextTask);\n    }\n    taskCompletion(taskID) {\n        return new Promise((resolve, reject) => {\n            const eventSubscription = this.events().subscribe(event => {\n                if (event.type === PoolEventType.taskCompleted && event.taskID === taskID) {\n                    eventSubscription.unsubscribe();\n                    resolve(event.returnValue);\n                }\n                else if (event.type === PoolEventType.taskFailed && event.taskID === taskID) {\n                    eventSubscription.unsubscribe();\n                    reject(event.error);\n                }\n                else if (event.type === PoolEventType.terminated) {\n                    eventSubscription.unsubscribe();\n                    reject(Error(\"Pool has been terminated before task was run.\"));\n                }\n            });\n        });\n    }\n    settled(allowResolvingImmediately = false) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const getCurrentlyRunningTasks = () => flatMap(this.workers, worker => worker.runningTasks);\n            const taskFailures = [];\n            const failureSubscription = this.eventObservable.subscribe(event => {\n                if (event.type === PoolEventType.taskFailed) {\n                    taskFailures.push(event.error);\n                }\n            });\n            if (this.initErrors.length > 0) {\n                return Promise.reject(this.initErrors[0]);\n            }\n            if (allowResolvingImmediately && this.taskQueue.length === 0) {\n                yield allSettled(getCurrentlyRunningTasks());\n                return taskFailures;\n            }\n            yield new Promise((resolve, reject) => {\n                const subscription = this.eventObservable.subscribe({\n                    next(event) {\n                        if (event.type === PoolEventType.taskQueueDrained) {\n                            subscription.unsubscribe();\n                            resolve();\n                        }\n                    },\n                    error: reject // make a pool-wide error reject the completed() result promise\n                });\n            });\n            yield allSettled(getCurrentlyRunningTasks());\n            failureSubscription.unsubscribe();\n            return taskFailures;\n        });\n    }\n    completed(allowResolvingImmediately = false) {\n        return __awaiter(this, void 0, void 0, function* () {\n            const settlementPromise = this.settled(allowResolvingImmediately);\n            const earlyExitPromise = new Promise((resolve, reject) => {\n                const subscription = this.eventObservable.subscribe({\n                    next(event) {\n                        if (event.type === PoolEventType.taskQueueDrained) {\n                            subscription.unsubscribe();\n                            resolve(settlementPromise);\n                        }\n                        else if (event.type === PoolEventType.taskFailed) {\n                            subscription.unsubscribe();\n                            reject(event.error);\n                        }\n                    },\n                    error: reject // make a pool-wide error reject the completed() result promise\n                });\n            });\n            const errors = yield Promise.race([\n                settlementPromise,\n                earlyExitPromise\n            ]);\n            if (errors.length > 0) {\n                throw errors[0];\n            }\n        });\n    }\n    events() {\n        return this.eventObservable;\n    }\n    queue(taskFunction) {\n        const { maxQueuedJobs = Infinity } = this.options;\n        if (this.isClosing) {\n            throw Error(`Cannot schedule pool tasks after terminate() has been called.`);\n        }\n        if (this.initErrors.length > 0) {\n            throw this.initErrors[0];\n        }\n        const taskID = this.nextTaskID++;\n        const taskCompletion = this.taskCompletion(taskID);\n        taskCompletion.catch((error) => {\n            // Prevent unhandled rejections here as we assume the user will use\n            // `pool.completed()`, `pool.settled()` or `task.catch()` to handle errors\n            this.debug(`Task #${taskID} errored:`, error);\n        });\n        const task = {\n            id: taskID,\n            run: taskFunction,\n            cancel: () => {\n                if (this.taskQueue.indexOf(task) === -1)\n                    return;\n                this.taskQueue = this.taskQueue.filter(someTask => someTask !== task);\n                this.eventSubject.next({\n                    type: PoolEventType.taskCanceled,\n                    taskID: task.id\n                });\n            },\n            then: taskCompletion.then.bind(taskCompletion)\n        };\n        if (this.taskQueue.length >= maxQueuedJobs) {\n            throw Error(\"Maximum number of pool tasks queued. Refusing to queue another one.\\n\" +\n                \"This usually happens for one of two reasons: We are either at peak \" +\n                \"workload right now or some tasks just won't finish, thus blocking the pool.\");\n        }\n        this.debug(`Queueing task #${task.id}...`);\n        this.taskQueue.push(task);\n        this.eventSubject.next({\n            type: PoolEventType.taskQueued,\n            taskID: task.id\n        });\n        this.scheduleWork();\n        return task;\n    }\n    terminate(force) {\n        return __awaiter(this, void 0, void 0, function* () {\n            this.isClosing = true;\n            if (!force) {\n                yield this.completed(true);\n            }\n            this.eventSubject.next({\n                type: PoolEventType.terminated,\n                remainingQueue: [...this.taskQueue]\n            });\n            this.eventSubject.complete();\n            yield Promise.all(this.workers.map((worker) => __awaiter(this, void 0, void 0, function* () { return Thread.terminate(yield worker.init); })));\n        });\n    }\n}\npool_WorkerPool.EventType = PoolEventType;\n/**\n * Thread pool constructor. Creates a new pool and spawns its worker threads.\n */\nfunction PoolConstructor(spawnWorker, optionsOrSize) {\n    // The function exists only so we don't need to use `new` to create a pool (we still can, though).\n    // If the Pool is a class or not is an implementation detail that should not concern the user.\n    return new pool_WorkerPool(spawnWorker, optionsOrSize);\n}\nPoolConstructor.EventType = PoolEventType;\n/**\n * Thread pool constructor. Creates a new pool and spawns its worker threads.\n */\nconst pool_Pool = PoolConstructor;\n\n// EXTERNAL MODULE: ./node_modules/threads/dist-esm/master/spawn.js\nvar spawn = __webpack_require__(27);\n\n// EXTERNAL MODULE: ./node_modules/threads/dist-esm/transferable.js\nvar transferable = __webpack_require__(35);\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/pool.js\n\n\nconst pool_defaultPoolSize = typeof navigator !== 'undefined' ? navigator.hardwareConcurrency : null;\n\n/**\n * @module pool\n */\n\n/**\n * Pool for workers to decode chunks of the images.\n */\nclass src_pool_Pool {\n  /**\n   * @constructor\n   * @param {Number} size The size of the pool. Defaults to the number of CPUs\n   *                      available. When this parameter is `null` or 0, then the\n   *                      decoding will be done in the main thread.\n   */\n  constructor(size = pool_defaultPoolSize) {\n    const worker = new master_Worker('./decoder.worker.js');\n    this.pool = pool_Pool(() => Object(spawn[\"a\" /* spawn */])(worker), size);\n  }\n\n  /**\n   * Decode the given block of bytes with the set compression method.\n   * @param {ArrayBuffer} buffer the array buffer of bytes to decode.\n   * @returns {Promise.<ArrayBuffer>} the decoded result as a `Promise`\n   */\n  async decode(fileDirectory, buffer) {\n    return new Promise((resolve, reject) => {\n      this.pool.queue(async (decode) => {\n        try {\n          const data = await decode(fileDirectory, Object(transferable[\"a\" /* Transfer */])(buffer));\n          resolve(data);\n        } catch (err) {\n          reject(err);\n        }\n      });\n    });\n  }\n\n  destroy() {\n    this.pool.terminate(true);\n  }\n}\n\n/* harmony default export */ var src_pool = (src_pool_Pool);\n\n// EXTERNAL MODULE: ./node_modules/node-libs-browser/mock/empty.js\nvar empty = __webpack_require__(0);\nvar empty_default = /*#__PURE__*/__webpack_require__.n(empty);\n\n// EXTERNAL MODULE: ./node_modules/https-browserify/index.js\nvar https_browserify = __webpack_require__(36);\nvar https_browserify_default = /*#__PURE__*/__webpack_require__.n(https_browserify);\n\n// EXTERNAL MODULE: ./node_modules/url/url.js\nvar url_url = __webpack_require__(15);\nvar url_default = /*#__PURE__*/__webpack_require__.n(url_url);\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/source.js\n\n\n\n\n\n\n/**\n * Create a new AbortController whose signal depends on all input signals aborting.\n * Credit: https://github.com/whatwg/fetch/issues/905#issuecomment-491970649\n * @param {Array} signals An array of AbortSignals.\n * @returns {AbortSignal} The AbortSignal dependent on all input AbortSignals.\n */\nfunction allSignals(signals) {\n  if (!signals.every(Boolean)) {\n    return undefined;\n  }\n  const controller = new AbortController();\n  controller.count = signals.length;\n\n  function onAbort() {\n    controller.count -= 1;\n    if (controller.count === 0) {\n      controller.abort();\n\n      // Cleanup\n      for (const signal of signals) {\n        signal.removeEventListener('abort', onAbort);\n      }\n    }\n  }\n\n  for (const signal of signals) {\n    if (signal.aborted) {\n      onAbort();\n    } else {\n      signal.addEventListener('abort', onAbort);\n    }\n  }\n  return controller.signal;\n}\n\nfunction readRangeFromBlocks(blocks, rangeOffset, rangeLength) {\n  const rangeTop = rangeOffset + rangeLength;\n  const rangeData = new ArrayBuffer(rangeLength);\n  const rangeView = new Uint8Array(rangeData);\n\n  for (const block of blocks) {\n    const delta = block.offset - rangeOffset;\n    const topDelta = block.top - rangeTop;\n    let blockInnerOffset = 0;\n    let rangeInnerOffset = 0;\n    let usedBlockLength;\n\n    if (delta < 0) {\n      blockInnerOffset = -delta;\n    } else if (delta > 0) {\n      rangeInnerOffset = delta;\n    }\n\n    if (topDelta < 0) {\n      usedBlockLength = block.length - blockInnerOffset;\n    } else {\n      usedBlockLength = rangeTop - block.offset - blockInnerOffset;\n    }\n\n    const blockView = new Uint8Array(block.data, blockInnerOffset, usedBlockLength);\n    rangeView.set(blockView, rangeInnerOffset);\n  }\n\n  return rangeData;\n}\n\n/**\n * Interface for Source objects.\n * @interface Source\n */\n\n/**\n * @function Source#fetch\n * @summary The main method to retrieve the data from the source.\n * @param {number} offset The offset to read from in the source\n * @param {number} length The requested number of bytes\n */\n\n/**\n * @typedef {object} Block\n * @property {ArrayBuffer} data The actual data of the block.\n * @property {number} offset The actual offset of the block within the file.\n * @property {number} length The actual size of the block in bytes.\n */\n\n/**\n * Callback type for sources to request patches of data.\n * @callback requestCallback\n * @async\n * @param {number} offset The offset within the file.\n * @param {number} length The desired length of data to be read.\n * @returns {Promise<Block>} The block of data.\n */\n\n/**\n * @module source\n */\n\n/*\n * Split a list of identifiers to form groups of coherent ones\n */\nfunction getCoherentBlockGroups(blockIds) {\n  if (blockIds.length === 0) {\n    return [];\n  }\n\n  const groups = [];\n  let current = [];\n  groups.push(current);\n\n  for (let i = 0; i < blockIds.length; ++i) {\n    if (i === 0 || blockIds[i] === blockIds[i - 1] + 1) {\n      current.push(blockIds[i]);\n    } else {\n      current = [blockIds[i]];\n      groups.push(current);\n    }\n  }\n  return groups;\n}\n\n\n/*\n * Promisified wrapper around 'setTimeout' to allow 'await'\n */\nasync function wait(milliseconds) {\n  return new Promise((resolve) => setTimeout(resolve, milliseconds));\n}\n\n/**\n * BlockedSource - an abstraction of (remote) files.\n * @implements Source\n */\nclass BlockedSource {\n  /**\n   * @param {requestCallback} retrievalFunction Callback function to request data\n   * @param {object} options Additional options\n   * @param {object} options.blockSize Size of blocks to be fetched\n   */\n  constructor(retrievalFunction, { blockSize = 65536 } = {}) {\n    this.retrievalFunction = retrievalFunction;\n    this.blockSize = blockSize;\n\n    // currently running block requests\n    this.blockRequests = new Map();\n\n    // already retrieved blocks\n    this.blocks = new Map();\n\n    // A map of block ids to all potential signals\n    this.signals = new Map();\n\n    // Set of aborted block ids\n    this.abortedBlockIds = new Set();\n\n    // block ids waiting for a batched request. Either a Set or null\n    this.blockIdsAwaitingRequest = null;\n  }\n\n  /**\n   * Fetch a subset of the file.\n   * @param {number} offset The offset within the file to read from.\n   * @param {number} length The length in bytes to read from.\n   * @returns {ArrayBuffer} The subset of the file.\n   */\n  async fetch(offset, length, immediate = false, signal) {\n    const top = offset + length;\n\n    // calculate what blocks intersect the specified range (offset + length)\n    // determine what blocks are already stored or beeing requested\n    const firstBlockOffset = Math.floor(offset / this.blockSize) * this.blockSize;\n    const allBlockIds = [];\n    const missingBlockIds = [];\n    const blockRequests = [];\n\n    for (let current = firstBlockOffset; current < top; current += this.blockSize) {\n      const blockId = Math.floor(current / this.blockSize);\n      if (!this.blocks.has(blockId) && !this.blockRequests.has(blockId)) {\n        missingBlockIds.push(blockId);\n        if (this.signals.has(blockId)) {\n          this.signals.get(blockId).push(signal);\n        } else {\n          this.signals.set(blockId, [signal]);\n        }\n      }\n      if (this.blockRequests.has(blockId)) {\n        blockRequests.push(this.blockRequests.get(blockId));\n      }\n      allBlockIds.push(blockId);\n    }\n\n    // determine whether there are already blocks in the queue to be requested\n    // if so, add the missing blocks to this list\n    if (!this.blockIdsAwaitingRequest) {\n      this.blockIdsAwaitingRequest = new Set(missingBlockIds);\n    } else {\n      for (let i = 0; i < missingBlockIds.length; ++i) {\n        this.blockIdsAwaitingRequest.add(missingBlockIds[i]);\n      }\n    }\n\n    // in immediate mode, we don't want to wait for possible additional requests coming in\n    if (!immediate) {\n      await wait();\n    }\n\n    // determine if we are the thread to start the requests.\n    if (this.blockIdsAwaitingRequest) {\n      // get all coherent blocks as groups to be requested in a single request\n      const groups = getCoherentBlockGroups(\n        Array.from(this.blockIdsAwaitingRequest).sort(),\n      );\n\n      // iterate over all blocks\n      for (const group of groups) {\n        // Get all unique signals belonging to the group to use as one collective signal.\n        const signals = Array.from(new Set(group.map((id) => this.signals.get(id)).flat()));\n        // fetch a group as in a single request\n        const request = this.requestData(\n          group[0] * this.blockSize, group.length * this.blockSize, allSignals(signals),\n        );\n\n        // for each block in the request, make a small 'splitter',\n        // i.e: wait for the request to finish, then cut out the bytes for\n        // that block and store it there.\n        // we keep that as a promise in 'blockRequests' to allow waiting on\n        // a single block.\n        for (let i = 0; i < group.length; ++i) {\n          const id = group[i];\n          this.blockRequests.set(id, (async () => {\n            try {\n              const response = await request;\n              const o = i * this.blockSize;\n              const t = Math.min(o + this.blockSize, response.data.byteLength);\n              const data = response.data.slice(o, t);\n              this.blockRequests.delete(id);\n              this.signals.delete(id);\n              this.abortedBlockIds.delete(id);\n              this.blocks.set(id, {\n                data,\n                offset: response.offset + o,\n                length: data.byteLength,\n                top: response.offset + t,\n              });\n            }\n            catch (err) {\n              if (err.name === 'AbortError') {\n                this.blocks.delete(id);\n                this.blockRequests.delete(id);\n                this.signals.delete(id);\n                this.abortedBlockIds.add(id);\n              } else {\n                throw (err);\n              }\n            }\n          })());\n        }\n      }\n      this.blockIdsAwaitingRequest = null;\n    }\n\n    // get a list of currently running requests for the blocks still missing\n    const missingRequests = [];\n    for (const blockId of missingBlockIds) {\n      if (this.blockRequests.has(blockId)) {\n        missingRequests.push(this.blockRequests.get(blockId));\n      }\n    }\n\n    // wait for all missing requests to finish\n    await Promise.all(missingRequests);\n    await Promise.all(blockRequests);\n\n    // now get all blocks for the request and return a summary buffer\n    const blocks = allBlockIds.map((id) => this.blocks.get(id));\n    const abortedBlocksToBeRequested = [];\n    // Some of the blocks were cancelled by a signal (AbortController)\n    if (blocks.some((i) => !i)) {\n      // But not by this fetch's signal\n      if (!signal.aborted) {\n        allBlockIds.forEach((blockId) => {\n          if (this.abortedBlockIds.has(blockId)) {\n            const request = this.requestData(\n              blockId * this.blockSize, this.blockSize,\n            );\n            this.blockRequests.set(blockId, (async () => {\n              const response = await request;\n              const t = Math.min(this.blockSize, response.data.byteLength);\n              const data = response.data.slice(0, t);\n              this.abortedBlockIds.delete(blockId);\n              this.blocks.set(blockId, {\n                data,\n                offset: response.offset,\n                length: data.byteLength,\n                top: response.offset + t,\n              });\n            })());\n            abortedBlocksToBeRequested.push(this.blockRequests.get(blockId));\n          }\n        });\n      } else {\n        return [];\n      }\n      await Promise.all(abortedBlocksToBeRequested);\n      const blocksAndRefetchedBlocks = allBlockIds.map((id) => this.blocks.get(id));\n      return readRangeFromBlocks(blocksAndRefetchedBlocks, offset, length);\n    } else {\n      return readRangeFromBlocks(blocks, offset, length);\n    }\n  }\n\n  async requestData(requestedOffset, requestedLength, signal) {\n    const response = await this.retrievalFunction(requestedOffset, requestedLength, signal);\n    if (!response.length) {\n      response.length = response.data.byteLength;\n    } else if (response.length !== response.data.byteLength) {\n      response.data = response.data.slice(0, response.length);\n    }\n    response.top = response.offset + response.length;\n    return response;\n  }\n}\n\n/**\n * Create a new source to read from a remote file using the\n * [fetch]{@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API} API.\n * @param {string} url The URL to send requests to.\n * @param {Object} [options] Additional options.\n * @param {Number} [options.blockSize] The block size to use.\n * @param {object} [options.headers] Additional headers to be sent to the server.\n * @returns The constructed source\n */\nfunction makeFetchSource(url, { headers = {}, blockSize } = {}) {\n  return new BlockedSource(async (offset, length, signal) => {\n    const response = await fetch(url, {\n      headers: {\n        ...headers, Range: `bytes=${offset}-${offset + length - 1}`,\n      },\n      signal,\n    });\n\n    // check the response was okay and if the server actually understands range requests\n    if (!response.ok) {\n      throw new Error('Error fetching data.');\n    } else if (response.status === 206) {\n      const data = response.arrayBuffer\n        ? await response.arrayBuffer() : (await response.buffer()).buffer;\n      return {\n        data,\n        offset,\n        length,\n      };\n    } else {\n      const data = response.arrayBuffer\n        ? await response.arrayBuffer() : (await response.buffer()).buffer;\n      return {\n        data,\n        offset: 0,\n        length: data.byteLength,\n      };\n    }\n  }, { blockSize });\n}\n\n/**\n * Create a new source to read from a remote file using the\n * [XHR]{@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest} API.\n * @param {string} url The URL to send requests to.\n * @param {Object} [options] Additional options.\n * @param {Number} [options.blockSize] The block size to use.\n * @param {object} [options.headers] Additional headers to be sent to the server.\n * @returns The constructed source\n */\nfunction makeXHRSource(url, { headers = {}, blockSize } = {}) {\n  return new BlockedSource(async (offset, length) => {\n    return new Promise((resolve, reject) => {\n      const request = new XMLHttpRequest();\n      request.open('GET', url);\n      request.responseType = 'arraybuffer';\n      const requestHeaders = { ...headers, Range: `bytes=${offset}-${offset + length - 1}` };\n      for (const [key, value] of Object.entries(requestHeaders)) {\n        request.setRequestHeader(key, value);\n      }\n\n      request.onload = () => {\n        const data = request.response;\n        if (request.status === 206) {\n          resolve({\n            data,\n            offset,\n            length,\n          });\n        } else {\n          resolve({\n            data,\n            offset: 0,\n            length: data.byteLength,\n          });\n        }\n      };\n      request.onerror = reject;\n      request.send();\n    });\n  }, { blockSize });\n}\n\n/**\n * Create a new source to read from a remote file using the node\n * [http]{@link https://nodejs.org/api/http.html} API.\n * @param {string} url The URL to send requests to.\n * @param {Object} [options] Additional options.\n * @param {Number} [options.blockSize] The block size to use.\n * @param {object} [options.headers] Additional headers to be sent to the server.\n */\nfunction makeHttpSource(url, { headers = {}, blockSize } = {}) {\n  return new BlockedSource(async (offset, length) => new Promise((resolve, reject) => {\n    const parsed = url_default.a.parse(url);\n    const request = (parsed.protocol === 'http:' ? empty_default.a : https_browserify_default.a).get(\n      { ...parsed,\n        headers: {\n          ...headers, Range: `bytes=${offset}-${offset + length - 1}`,\n        } }, (result) => {\n        const chunks = [];\n        // collect chunks\n        result.on('data', (chunk) => {\n          chunks.push(chunk);\n        });\n\n        // concatenate all chunks and resolve the promise with the resulting buffer\n        result.on('end', () => {\n          const data = empty[\"Buffer\"].concat(chunks).buffer;\n          resolve({\n            data,\n            offset,\n            length: data.byteLength,\n          });\n        });\n      },\n    );\n    request.on('error', reject);\n  }), { blockSize });\n}\n\n/**\n * Create a new source to read from a remote file. Uses either XHR, fetch or nodes http API.\n * @param {string} url The URL to send requests to.\n * @param {Object} [options] Additional options.\n * @param {Boolean} [options.forceXHR] Force the usage of XMLHttpRequest.\n * @param {Number} [options.blockSize] The block size to use.\n * @param {object} [options.headers] Additional headers to be sent to the server.\n * @returns The constructed source\n */\nfunction makeRemoteSource(url, options) {\n  const { forceXHR } = options;\n  if (typeof fetch === 'function' && !forceXHR) {\n    return makeFetchSource(url, options);\n  }\n  if (typeof XMLHttpRequest !== 'undefined') {\n    return makeXHRSource(url, options);\n  }\n  if (empty_default.a.get) {\n    return makeHttpSource(url, options);\n  }\n  throw new Error('No remote source available');\n}\n\n/**\n * Create a new source to read from a local\n * [ArrayBuffer]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer}.\n * @param {ArrayBuffer} arrayBuffer The ArrayBuffer to parse the GeoTIFF from.\n * @returns The constructed source\n */\nfunction makeBufferSource(arrayBuffer) {\n  return {\n    async fetch(offset, length) {\n      return arrayBuffer.slice(offset, offset + length);\n    },\n  };\n}\n\nfunction closeAsync(fd) {\n  return new Promise((resolve, reject) => {\n    Object(empty[\"close\"])(fd, err => {\n      if (err) {\n        reject(err)\n      } else {\n        resolve()\n      }\n    });\n  });\n}\n\nfunction openAsync(path, flags, mode = undefined) {\n  return new Promise((resolve, reject) => {\n    Object(empty[\"open\"])(path, flags, mode, (err, fd) => {\n      if (err) {\n        reject(err);\n      } else {\n        resolve(fd);\n      }\n    });\n  });\n}\n\nfunction readAsync(...args) {\n  return new Promise((resolve, reject) => {\n    Object(empty[\"read\"])(...args, (err, bytesRead, buffer) => {\n      if (err) {\n        reject(err);\n      } else {\n        resolve({ bytesRead, buffer });\n      }\n    });\n  });\n}\n\n/**\n * Creates a new source using the node filesystem API.\n * @param {string} path The path to the file in the local filesystem.\n * @returns The constructed source\n */\nfunction makeFileSource(path) {\n  const fileOpen = openAsync(path, 'r');\n\n  return {\n    async fetch(offset, length) {\n      const fd = await fileOpen;\n      const { buffer } = await readAsync(fd, empty[\"Buffer\"].alloc(length), 0, length, offset);\n      return buffer.buffer;\n    },\n    async close() {\n      const fd = await fileOpen;\n      return await closeAsync(fd);\n    },\n  };\n}\n\n/**\n * Create a new source from a given file/blob.\n * @param {Blob} file The file or blob to read from.\n * @returns The constructed source\n */\nfunction makeFileReaderSource(file) {\n  return {\n    async fetch(offset, length) {\n      return new Promise((resolve, reject) => {\n        const blob = file.slice(offset, offset + length);\n        const reader = new FileReader();\n        reader.onload = (event) => resolve(event.target.result);\n        reader.onerror = reject;\n        reader.readAsArrayBuffer(blob);\n      });\n    },\n  };\n}\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/utils.js\nfunction utils_assign(target, source) {\n  for (const key in source) {\n    if (source.hasOwnProperty(key)) {\n      target[key] = source[key];\n    }\n  }\n}\n\nfunction chunk(iterable, length) {\n  const results = [];\n  const lengthOfIterable = iterable.length;\n  for (let i = 0; i < lengthOfIterable; i += length) {\n    const chunked = [];\n    for (let ci = i; ci < i + length; ci++) {\n      chunked.push(iterable[ci]);\n    }\n    results.push(chunked);\n  }\n  return results;\n}\n\nfunction endsWith(string, expectedEnding) {\n  if (string.length < expectedEnding.length) {\n    return false;\n  }\n  const actualEnding = string.substr(string.length - expectedEnding.length);\n  return actualEnding === expectedEnding;\n}\n\nfunction forEach(iterable, func) {\n  const { length } = iterable;\n  for (let i = 0; i < length; i++) {\n    func(iterable[i], i);\n  }\n}\n\nfunction invert(oldObj) {\n  const newObj = {};\n  for (const key in oldObj) {\n    if (oldObj.hasOwnProperty(key)) {\n      const value = oldObj[key];\n      newObj[value] = key;\n    }\n  }\n  return newObj;\n}\n\nfunction range(n) {\n  const results = [];\n  for (let i = 0; i < n; i++) {\n    results.push(i);\n  }\n  return results;\n}\n\nfunction times(numTimes, func) {\n  const results = [];\n  for (let i = 0; i < numTimes; i++) {\n    results.push(func(i));\n  }\n  return results;\n}\n\nfunction utils_toArray(iterable) {\n  const results = [];\n  const { length } = iterable;\n  for (let i = 0; i < length; i++) {\n    results.push(iterable[i]);\n  }\n  return results;\n}\n\nfunction toArrayRecursively(input) {\n  if (input.length) {\n    return utils_toArray(input).map(toArrayRecursively);\n  }\n  return input;\n}\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/geotiffwriter.js\n/*\n  Some parts of this file are based on UTIF.js,\n  which was released under the MIT License.\n  You can view that here:\n  https://github.com/photopea/UTIF.js/blob/master/LICENSE\n*/\n\n\n\nconst tagName2Code = invert(fieldTagNames);\nconst geoKeyName2Code = invert(geoKeyNames);\nconst name2code = {};\nutils_assign(name2code, tagName2Code);\nutils_assign(name2code, geoKeyName2Code);\nconst typeName2byte = invert(fieldTypeNames);\n\n// config variables\nconst numBytesInIfd = 1000;\n\nconst _binBE = {\n  nextZero: (data, o) => {\n    let oincr = o;\n    while (data[oincr] !== 0) {\n      oincr++;\n    }\n    return oincr;\n  },\n  readUshort: (buff, p) => {\n    return (buff[p] << 8) | buff[p + 1];\n  },\n  readShort: (buff, p) => {\n    const a = _binBE.ui8;\n    a[0] = buff[p + 1];\n    a[1] = buff[p + 0];\n    return _binBE.i16[0];\n  },\n  readInt: (buff, p) => {\n    const a = _binBE.ui8;\n    a[0] = buff[p + 3];\n    a[1] = buff[p + 2];\n    a[2] = buff[p + 1];\n    a[3] = buff[p + 0];\n    return _binBE.i32[0];\n  },\n  readUint: (buff, p) => {\n    const a = _binBE.ui8;\n    a[0] = buff[p + 3];\n    a[1] = buff[p + 2];\n    a[2] = buff[p + 1];\n    a[3] = buff[p + 0];\n    return _binBE.ui32[0];\n  },\n  readASCII: (buff, p, l) => {\n    return l.map((i) => String.fromCharCode(buff[p + i])).join('');\n  },\n  readFloat: (buff, p) => {\n    const a = _binBE.ui8;\n    times(4, (i) => {\n      a[i] = buff[p + 3 - i];\n    });\n    return _binBE.fl32[0];\n  },\n  readDouble: (buff, p) => {\n    const a = _binBE.ui8;\n    times(8, (i) => {\n      a[i] = buff[p + 7 - i];\n    });\n    return _binBE.fl64[0];\n  },\n  writeUshort: (buff, p, n) => {\n    buff[p] = (n >> 8) & 255;\n    buff[p + 1] = n & 255;\n  },\n  writeUint: (buff, p, n) => {\n    buff[p] = (n >> 24) & 255;\n    buff[p + 1] = (n >> 16) & 255;\n    buff[p + 2] = (n >> 8) & 255;\n    buff[p + 3] = (n >> 0) & 255;\n  },\n  writeASCII: (buff, p, s) => {\n    times(s.length, (i) => {\n      buff[p + i] = s.charCodeAt(i);\n    });\n  },\n  ui8: new Uint8Array(8),\n};\n\n_binBE.fl64 = new Float64Array(_binBE.ui8.buffer);\n\n_binBE.writeDouble = (buff, p, n) => {\n  _binBE.fl64[0] = n;\n  times(8, (i) => {\n    buff[p + i] = _binBE.ui8[7 - i];\n  });\n};\n\n\nconst _writeIFD = (bin, data, _offset, ifd) => {\n  let offset = _offset;\n\n  const keys = Object.keys(ifd).filter((key) => {\n    return key !== undefined && key !== null && key !== 'undefined';\n  });\n\n  bin.writeUshort(data, offset, keys.length);\n  offset += 2;\n\n  let eoff = offset + (12 * keys.length) + 4;\n\n  for (const key of keys) {\n    let tag = null;\n    if (typeof key === 'number') {\n      tag = key;\n    } else if (typeof key === 'string') {\n      tag = parseInt(key, 10);\n    }\n\n    const typeName = fieldTagTypes[tag];\n    const typeNum = typeName2byte[typeName];\n\n    if (typeName == null || typeName === undefined || typeof typeName === 'undefined') {\n      throw new Error(`unknown type of tag: ${tag}`);\n    }\n\n    let val = ifd[key];\n\n    if (typeof val === 'undefined') {\n      throw new Error(`failed to get value for key ${key}`);\n    }\n\n    // ASCIIZ format with trailing 0 character\n    // http://www.fileformat.info/format/tiff/corion.htm\n    // https://stackoverflow.com/questions/7783044/whats-the-difference-between-asciiz-vs-ascii\n    if (typeName === 'ASCII' && typeof val === 'string' && endsWith(val, '\\u0000') === false) {\n      val += '\\u0000';\n    }\n\n    const num = val.length;\n\n    bin.writeUshort(data, offset, tag);\n    offset += 2;\n\n    bin.writeUshort(data, offset, typeNum);\n    offset += 2;\n\n    bin.writeUint(data, offset, num);\n    offset += 4;\n\n    let dlen = [-1, 1, 1, 2, 4, 8, 0, 0, 0, 0, 0, 0, 8][typeNum] * num;\n    let toff = offset;\n\n    if (dlen > 4) {\n      bin.writeUint(data, offset, eoff);\n      toff = eoff;\n    }\n\n    if (typeName === 'ASCII') {\n      bin.writeASCII(data, toff, val);\n    } else if (typeName === 'SHORT') {\n      times(num, (i) => {\n        bin.writeUshort(data, toff + (2 * i), val[i]);\n      });\n    } else if (typeName === 'LONG') {\n      times(num, (i) => {\n        bin.writeUint(data, toff + (4 * i), val[i]);\n      });\n    } else if (typeName === 'RATIONAL') {\n      times(num, (i) => {\n        bin.writeUint(data, toff + (8 * i), Math.round(val[i] * 10000));\n        bin.writeUint(data, toff + (8 * i) + 4, 10000);\n      });\n    } else if (typeName === 'DOUBLE') {\n      times(num, (i) => {\n        bin.writeDouble(data, toff + (8 * i), val[i]);\n      });\n    }\n\n    if (dlen > 4) {\n      dlen += (dlen & 1);\n      eoff += dlen;\n    }\n\n    offset += 4;\n  }\n\n  return [offset, eoff];\n};\n\nconst encodeIfds = (ifds) => {\n  const data = new Uint8Array(numBytesInIfd);\n  let offset = 4;\n  const bin = _binBE;\n\n  // set big-endian byte-order\n  // https://en.wikipedia.org/wiki/TIFF#Byte_order\n  data[0] = 77;\n  data[1] = 77;\n\n  // set format-version number\n  // https://en.wikipedia.org/wiki/TIFF#Byte_order\n  data[3] = 42;\n\n  let ifdo = 8;\n\n  bin.writeUint(data, offset, ifdo);\n\n  offset += 4;\n\n  ifds.forEach((ifd, i) => {\n    const noffs = _writeIFD(bin, data, ifdo, ifd);\n    ifdo = noffs[1];\n    if (i < ifds.length - 1) {\n      bin.writeUint(data, noffs[0], ifdo);\n    }\n  });\n\n  if (data.slice) {\n    return data.slice(0, ifdo).buffer;\n  }\n\n  // node hasn't implemented slice on Uint8Array yet\n  const result = new Uint8Array(ifdo);\n  for (let i = 0; i < ifdo; i++) {\n    result[i] = data[i];\n  }\n  return result.buffer;\n};\n\nconst encodeImage = (values, width, height, metadata) => {\n  if (height === undefined || height === null) {\n    throw new Error(`you passed into encodeImage a width of type ${height}`);\n  }\n\n  if (width === undefined || width === null) {\n    throw new Error(`you passed into encodeImage a width of type ${width}`);\n  }\n\n  const ifd = {\n    256: [width], // ImageWidth\n    257: [height], // ImageLength\n    273: [numBytesInIfd], // strips offset\n    278: [height], // RowsPerStrip\n    305: 'geotiff.js', // no array for ASCII(Z)\n  };\n\n  if (metadata) {\n    for (const i in metadata) {\n      if (metadata.hasOwnProperty(i)) {\n        ifd[i] = metadata[i];\n      }\n    }\n  }\n\n  const prfx = new Uint8Array(encodeIfds([ifd]));\n\n  const img = new Uint8Array(values);\n\n  const samplesPerPixel = ifd[277];\n\n  const data = new Uint8Array(numBytesInIfd + (width * height * samplesPerPixel));\n  times(prfx.length, (i) => {\n    data[i] = prfx[i];\n  });\n  forEach(img, (value, i) => {\n    data[numBytesInIfd + i] = value;\n  });\n\n  return data.buffer;\n};\n\nconst convertToTids = (input) => {\n  const result = {};\n  for (const key in input) {\n    if (key !== 'StripOffsets') {\n      if (!name2code[key]) {\n        console.error(key, 'not in name2code:', Object.keys(name2code));\n      }\n      result[name2code[key]] = input[key];\n    }\n  }\n  return result;\n};\n\nconst geotiffwriter_toArray = (input) => {\n  if (Array.isArray(input)) {\n    return input;\n  }\n  return [input];\n};\n\nconst metadataDefaults = [\n  ['Compression', 1], // no compression\n  ['PlanarConfiguration', 1],\n  ['XPosition', 0],\n  ['YPosition', 0],\n  ['ResolutionUnit', 1], // Code 1 for actual pixel count or 2 for pixels per inch.\n  ['ExtraSamples', 0], // should this be an array??\n  ['GeoAsciiParams', 'WGS 84\\u0000'],\n  ['ModelTiepoint', [0, 0, 0, -180, 90, 0]], // raster fits whole globe\n  ['GTModelTypeGeoKey', 2],\n  ['GTRasterTypeGeoKey', 1],\n  ['GeographicTypeGeoKey', 4326],\n  ['GeogCitationGeoKey', 'WGS 84'],\n];\n\nfunction writeGeotiff(data, metadata) {\n  const isFlattened = typeof data[0] === 'number';\n\n  let height;\n  let numBands;\n  let width;\n  let flattenedValues;\n\n  if (isFlattened) {\n    height = metadata.height || metadata.ImageLength;\n    width = metadata.width || metadata.ImageWidth;\n    numBands = data.length / (height * width);\n    flattenedValues = data;\n  } else {\n    numBands = data.length;\n    height = data[0].length;\n    width = data[0][0].length;\n    flattenedValues = [];\n    times(height, (rowIndex) => {\n      times(width, (columnIndex) => {\n        times(numBands, (bandIndex) => {\n          flattenedValues.push(data[bandIndex][rowIndex][columnIndex]);\n        });\n      });\n    });\n  }\n\n  metadata.ImageLength = height;\n  delete metadata.height;\n  metadata.ImageWidth = width;\n  delete metadata.width;\n\n  // consult https://www.loc.gov/preservation/digital/formats/content/tiff_tags.shtml\n\n  if (!metadata.BitsPerSample) {\n    metadata.BitsPerSample = times(numBands, () => 8);\n  }\n\n  metadataDefaults.forEach((tag) => {\n    const key = tag[0];\n    if (!metadata[key]) {\n      const value = tag[1];\n      metadata[key] = value;\n    }\n  });\n\n  // The color space of the image data.\n  // 1=black is zero and 2=RGB.\n  if (!metadata.PhotometricInterpretation) {\n    metadata.PhotometricInterpretation = metadata.BitsPerSample.length === 3 ? 2 : 1;\n  }\n\n  // The number of components per pixel.\n  if (!metadata.SamplesPerPixel) {\n    metadata.SamplesPerPixel = [numBands];\n  }\n\n  if (!metadata.StripByteCounts) {\n    // we are only writing one strip\n    metadata.StripByteCounts = [numBands * height * width];\n  }\n\n  if (!metadata.ModelPixelScale) {\n    // assumes raster takes up exactly the whole globe\n    metadata.ModelPixelScale = [360 / width, 180 / height, 0];\n  }\n\n  if (!metadata.SampleFormat) {\n    metadata.SampleFormat = times(numBands, () => 1);\n  }\n\n\n  const geoKeys = Object.keys(metadata)\n    .filter((key) => endsWith(key, 'GeoKey'))\n    .sort((a, b) => name2code[a] - name2code[b]);\n\n  if (!metadata.GeoKeyDirectory) {\n    const NumberOfKeys = geoKeys.length;\n\n    const GeoKeyDirectory = [1, 1, 0, NumberOfKeys];\n    geoKeys.forEach((geoKey) => {\n      const KeyID = Number(name2code[geoKey]);\n      GeoKeyDirectory.push(KeyID);\n\n      let Count;\n      let TIFFTagLocation;\n      let valueOffset;\n      if (fieldTagTypes[KeyID] === 'SHORT') {\n        Count = 1;\n        TIFFTagLocation = 0;\n        valueOffset = metadata[geoKey];\n      } else if (geoKey === 'GeogCitationGeoKey') {\n        Count = metadata.GeoAsciiParams.length;\n        TIFFTagLocation = Number(name2code.GeoAsciiParams);\n        valueOffset = 0;\n      } else {\n        console.log(`[geotiff.js] couldn't get TIFFTagLocation for ${geoKey}`);\n      }\n      GeoKeyDirectory.push(TIFFTagLocation);\n      GeoKeyDirectory.push(Count);\n      GeoKeyDirectory.push(valueOffset);\n    });\n    metadata.GeoKeyDirectory = GeoKeyDirectory;\n  }\n\n  // delete GeoKeys from metadata, because stored in GeoKeyDirectory tag\n  for (const geoKey in geoKeys) {\n    if (geoKeys.hasOwnProperty(geoKey)) {\n      delete metadata[geoKey];\n    }\n  }\n\n  [\n    'Compression',\n    'ExtraSamples',\n    'GeographicTypeGeoKey',\n    'GTModelTypeGeoKey',\n    'GTRasterTypeGeoKey',\n    'ImageLength', // synonym of ImageHeight\n    'ImageWidth',\n    'PhotometricInterpretation',\n    'PlanarConfiguration',\n    'ResolutionUnit',\n    'SamplesPerPixel',\n    'XPosition',\n    'YPosition',\n  ].forEach((name) => {\n    if (metadata[name]) {\n      metadata[name] = geotiffwriter_toArray(metadata[name]);\n    }\n  });\n\n\n  const encodedMetadata = convertToTids(metadata);\n\n  const outputImage = encodeImage(flattenedValues, width, height, encodedMetadata);\n\n  return outputImage;\n}\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/logging.js\n\n/**\n * A no-op logger\n */\nclass DummyLogger {\n  log() {}\n\n  info() {}\n\n  warn() {}\n\n  error() {}\n\n  time() {}\n\n  timeEnd() {}\n}\n\nlet LOGGER = new DummyLogger();\n\n/**\n *\n * @param {object} logger the new logger. e.g `console`\n */\nfunction setLogger(logger = new DummyLogger()) {\n  LOGGER = logger;\n}\n\nfunction log(...args) {\n  return LOGGER.log(...args);\n}\n\nfunction info(...args) {\n  return LOGGER.info(...args);\n}\n\nfunction warn(...args) {\n  return LOGGER.warn(...args);\n}\n\nfunction logging_error(...args) {\n  return LOGGER.error(...args);\n}\n\nfunction time(...args) {\n  return LOGGER.time(...args);\n}\n\nfunction timeEnd(...args) {\n  return LOGGER.timeEnd(...args);\n}\n\n// CONCATENATED MODULE: ./node_modules/geotiff/src/geotiff.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction getFieldTypeLength(fieldType) {\n  switch (fieldType) {\n    case fieldTypes.BYTE: case fieldTypes.ASCII: case fieldTypes.SBYTE: case fieldTypes.UNDEFINED:\n      return 1;\n    case fieldTypes.SHORT: case fieldTypes.SSHORT:\n      return 2;\n    case fieldTypes.LONG: case fieldTypes.SLONG: case fieldTypes.FLOAT: case fieldTypes.IFD:\n      return 4;\n    case fieldTypes.RATIONAL: case fieldTypes.SRATIONAL: case fieldTypes.DOUBLE:\n    case fieldTypes.LONG8: case fieldTypes.SLONG8: case fieldTypes.IFD8:\n      return 8;\n    default:\n      throw new RangeError(`Invalid field type: ${fieldType}`);\n  }\n}\n\nfunction parseGeoKeyDirectory(fileDirectory) {\n  const rawGeoKeyDirectory = fileDirectory.GeoKeyDirectory;\n  if (!rawGeoKeyDirectory) {\n    return null;\n  }\n\n  const geoKeyDirectory = {};\n  for (let i = 4; i <= rawGeoKeyDirectory[3] * 4; i += 4) {\n    const key = geoKeyNames[rawGeoKeyDirectory[i]];\n    const location = (rawGeoKeyDirectory[i + 1])\n      ? (fieldTagNames[rawGeoKeyDirectory[i + 1]]) : null;\n    const count = rawGeoKeyDirectory[i + 2];\n    const offset = rawGeoKeyDirectory[i + 3];\n\n    let value = null;\n    if (!location) {\n      value = offset;\n    } else {\n      value = fileDirectory[location];\n      if (typeof value === 'undefined' || value === null) {\n        throw new Error(`Could not get value of geoKey '${key}'.`);\n      } else if (typeof value === 'string') {\n        value = value.substring(offset, offset + count - 1);\n      } else if (value.subarray) {\n        value = value.subarray(offset, offset + count);\n        if (count === 1) {\n          value = value[0];\n        }\n      }\n    }\n    geoKeyDirectory[key] = value;\n  }\n  return geoKeyDirectory;\n}\n\nfunction getValues(dataSlice, fieldType, count, offset) {\n  let values = null;\n  let readMethod = null;\n  const fieldTypeLength = getFieldTypeLength(fieldType);\n\n  switch (fieldType) {\n    case fieldTypes.BYTE: case fieldTypes.ASCII: case fieldTypes.UNDEFINED:\n      values = new Uint8Array(count); readMethod = dataSlice.readUint8;\n      break;\n    case fieldTypes.SBYTE:\n      values = new Int8Array(count); readMethod = dataSlice.readInt8;\n      break;\n    case fieldTypes.SHORT:\n      values = new Uint16Array(count); readMethod = dataSlice.readUint16;\n      break;\n    case fieldTypes.SSHORT:\n      values = new Int16Array(count); readMethod = dataSlice.readInt16;\n      break;\n    case fieldTypes.LONG: case fieldTypes.IFD:\n      values = new Uint32Array(count); readMethod = dataSlice.readUint32;\n      break;\n    case fieldTypes.SLONG:\n      values = new Int32Array(count); readMethod = dataSlice.readInt32;\n      break;\n    case fieldTypes.LONG8: case fieldTypes.IFD8:\n      values = new Array(count); readMethod = dataSlice.readUint64;\n      break;\n    case fieldTypes.SLONG8:\n      values = new Array(count); readMethod = dataSlice.readInt64;\n      break;\n    case fieldTypes.RATIONAL:\n      values = new Uint32Array(count * 2); readMethod = dataSlice.readUint32;\n      break;\n    case fieldTypes.SRATIONAL:\n      values = new Int32Array(count * 2); readMethod = dataSlice.readInt32;\n      break;\n    case fieldTypes.FLOAT:\n      values = new Float32Array(count); readMethod = dataSlice.readFloat32;\n      break;\n    case fieldTypes.DOUBLE:\n      values = new Float64Array(count); readMethod = dataSlice.readFloat64;\n      break;\n    default:\n      throw new RangeError(`Invalid field type: ${fieldType}`);\n  }\n\n  // normal fields\n  if (!(fieldType === fieldTypes.RATIONAL || fieldType === fieldTypes.SRATIONAL)) {\n    for (let i = 0; i < count; ++i) {\n      values[i] = readMethod.call(\n        dataSlice, offset + (i * fieldTypeLength),\n      );\n    }\n  } else { // RATIONAL or SRATIONAL\n    for (let i = 0; i < count; i += 2) {\n      values[i] = readMethod.call(\n        dataSlice, offset + (i * fieldTypeLength),\n      );\n      values[i + 1] = readMethod.call(\n        dataSlice, offset + ((i * fieldTypeLength) + 4),\n      );\n    }\n  }\n\n  if (fieldType === fieldTypes.ASCII) {\n    return new TextDecoder('utf-8').decode(values);\n  }\n  return values;\n}\n\n/**\n * Data class to store the parsed file directory, geo key directory and\n * offset to the next IFD\n */\nclass ImageFileDirectory {\n  constructor(fileDirectory, geoKeyDirectory, nextIFDByteOffset) {\n    this.fileDirectory = fileDirectory;\n    this.geoKeyDirectory = geoKeyDirectory;\n    this.nextIFDByteOffset = nextIFDByteOffset;\n  }\n}\n\n/**\n * Error class for cases when an IFD index was requested, that does not exist\n * in the file.\n */\nclass GeoTIFFImageIndexError extends Error {\n  constructor(index) {\n    super(`No image at index ${index}`);\n    this.index = index;\n  }\n}\n\n\nclass GeoTIFFBase {\n  /**\n   * (experimental) Reads raster data from the best fitting image. This function uses\n   * the image with the lowest resolution that is still a higher resolution than the\n   * requested resolution.\n   * When specified, the `bbox` option is translated to the `window` option and the\n   * `resX` and `resY` to `width` and `height` respectively.\n   * Then, the [readRasters]{@link GeoTIFFImage#readRasters} method of the selected\n   * image is called and the result returned.\n   * @see GeoTIFFImage.readRasters\n   * @param {Object} [options={}] optional parameters\n   * @param {Array} [options.window=whole image] the subset to read data from.\n   * @param {Array} [options.bbox=whole image] the subset to read data from in\n   *                                           geographical coordinates.\n   * @param {Array} [options.samples=all samples] the selection of samples to read from.\n   * @param {Boolean} [options.interleave=false] whether the data shall be read\n   *                                             in one single array or separate\n   *                                             arrays.\n   * @param {Number} [options.pool=null] The optional decoder pool to use.\n   * @param {Number} [options.width] The desired width of the output. When the width is not the\n   *                                 same as the images, resampling will be performed.\n   * @param {Number} [options.height] The desired height of the output. When the width is not the\n   *                                  same as the images, resampling will be performed.\n   * @param {String} [options.resampleMethod='nearest'] The desired resampling method.\n   * @param {Number|Number[]} [options.fillValue] The value to use for parts of the image\n   *                                              outside of the images extent. When multiple\n   *                                              samples are requested, an array of fill values\n   *                                              can be passed.\n   * @returns {Promise.<(TypedArray|TypedArray[])>} the decoded arrays as a promise\n   */\n  async readRasters(options = {}) {\n    const { window: imageWindow, width, height } = options;\n    let { resX, resY, bbox } = options;\n\n    const firstImage = await this.getImage();\n    let usedImage = firstImage;\n    const imageCount = await this.getImageCount();\n    const imgBBox = firstImage.getBoundingBox();\n\n    if (imageWindow && bbox) {\n      throw new Error('Both \"bbox\" and \"window\" passed.');\n    }\n\n    // if width/height is passed, transform it to resolution\n    if (width || height) {\n      // if we have an image window (pixel coordinates), transform it to a BBox\n      // using the origin/resolution of the first image.\n      if (imageWindow) {\n        const [oX, oY] = firstImage.getOrigin();\n        const [rX, rY] = firstImage.getResolution();\n\n        bbox = [\n          oX + (imageWindow[0] * rX),\n          oY + (imageWindow[1] * rY),\n          oX + (imageWindow[2] * rX),\n          oY + (imageWindow[3] * rY),\n        ];\n      }\n\n      // if we have a bbox (or calculated one)\n\n      const usedBBox = bbox || imgBBox;\n\n      if (width) {\n        if (resX) {\n          throw new Error('Both width and resX passed');\n        }\n        resX = (usedBBox[2] - usedBBox[0]) / width;\n      }\n      if (height) {\n        if (resY) {\n          throw new Error('Both width and resY passed');\n        }\n        resY = (usedBBox[3] - usedBBox[1]) / height;\n      }\n    }\n\n    // if resolution is set or calculated, try to get the image with the worst acceptable resolution\n    if (resX || resY) {\n      const allImages = [];\n      for (let i = 0; i < imageCount; ++i) {\n        const image = await this.getImage(i);\n        const { SubfileType: subfileType, NewSubfileType: newSubfileType } = image.fileDirectory;\n        if (i === 0 || subfileType === 2 || newSubfileType & 1) {\n          allImages.push(image);\n        }\n      }\n\n      allImages.sort((a, b) => a.getWidth() - b.getWidth());\n      for (let i = 0; i < allImages.length; ++i) {\n        const image = allImages[i];\n        const imgResX = (imgBBox[2] - imgBBox[0]) / image.getWidth();\n        const imgResY = (imgBBox[3] - imgBBox[1]) / image.getHeight();\n\n        usedImage = image;\n        if ((resX && resX > imgResX) || (resY && resY > imgResY)) {\n          break;\n        }\n      }\n    }\n\n    let wnd = imageWindow;\n    if (bbox) {\n      const [oX, oY] = firstImage.getOrigin();\n      const [imageResX, imageResY] = usedImage.getResolution(firstImage);\n\n      wnd = [\n        Math.round((bbox[0] - oX) / imageResX),\n        Math.round((bbox[1] - oY) / imageResY),\n        Math.round((bbox[2] - oX) / imageResX),\n        Math.round((bbox[3] - oY) / imageResY),\n      ];\n      wnd = [\n        Math.min(wnd[0], wnd[2]),\n        Math.min(wnd[1], wnd[3]),\n        Math.max(wnd[0], wnd[2]),\n        Math.max(wnd[1], wnd[3]),\n      ];\n    }\n\n    return usedImage.readRasters({ ...options, window: wnd });\n  }\n}\n\n\n/**\n * The abstraction for a whole GeoTIFF file.\n * @augments GeoTIFFBase\n */\nclass geotiff_GeoTIFF extends GeoTIFFBase {\n  /**\n   * @constructor\n   * @param {Source} source The datasource to read from.\n   * @param {Boolean} littleEndian Whether the image uses little endian.\n   * @param {Boolean} bigTiff Whether the image uses bigTIFF conventions.\n   * @param {Number} firstIFDOffset The numeric byte-offset from the start of the image\n   *                                to the first IFD.\n   * @param {Object} [options] further options.\n   * @param {Boolean} [options.cache=false] whether or not decoded tiles shall be cached.\n   */\n  constructor(source, littleEndian, bigTiff, firstIFDOffset, options = {}) {\n    super();\n    this.source = source;\n    this.littleEndian = littleEndian;\n    this.bigTiff = bigTiff;\n    this.firstIFDOffset = firstIFDOffset;\n    this.cache = options.cache || false;\n    this.ifdRequests = [];\n    this.ghostValues = null;\n  }\n\n  async getSlice(offset, size) {\n    const fallbackSize = this.bigTiff ? 4048 : 1024;\n    return new DataSlice(\n      await this.source.fetch(\n        offset, typeof size !== 'undefined' ? size : fallbackSize,\n      ), offset, this.littleEndian, this.bigTiff,\n    );\n  }\n\n  /**\n   * Instructs to parse an image file directory at the given file offset.\n   * As there is no way to ensure that a location is indeed the start of an IFD,\n   * this function must be called with caution (e.g only using the IFD offsets from\n   * the headers or other IFDs).\n   * @param {number} offset the offset to parse the IFD at\n   * @returns {ImageFileDirectory} the parsed IFD\n   */\n  async parseFileDirectoryAt(offset) {\n    const entrySize = this.bigTiff ? 20 : 12;\n    const offsetSize = this.bigTiff ? 8 : 2;\n\n    let dataSlice = await this.getSlice(offset);\n    const numDirEntries = this.bigTiff ?\n      dataSlice.readUint64(offset) :\n      dataSlice.readUint16(offset);\n\n    // if the slice does not cover the whole IFD, request a bigger slice, where the\n    // whole IFD fits: num of entries + n x tag length + offset to next IFD\n    const byteSize = (numDirEntries * entrySize) + (this.bigTiff ? 16 : 6);\n    if (!dataSlice.covers(offset, byteSize)) {\n      dataSlice = await this.getSlice(offset, byteSize);\n    }\n\n    const fileDirectory = {};\n\n    // loop over the IFD and create a file directory object\n    let i = offset + (this.bigTiff ? 8 : 2);\n    for (let entryCount = 0; entryCount < numDirEntries; i += entrySize, ++entryCount) {\n      const fieldTag = dataSlice.readUint16(i);\n      const fieldType = dataSlice.readUint16(i + 2);\n      const typeCount = this.bigTiff ?\n        dataSlice.readUint64(i + 4) :\n        dataSlice.readUint32(i + 4);\n\n      let fieldValues;\n      let value;\n      const fieldTypeLength = getFieldTypeLength(fieldType);\n      const valueOffset = i + (this.bigTiff ? 12 : 8);\n\n      // check whether the value is directly encoded in the tag or refers to a\n      // different external byte range\n      if (fieldTypeLength * typeCount <= (this.bigTiff ? 8 : 4)) {\n        fieldValues = getValues(dataSlice, fieldType, typeCount, valueOffset);\n      } else {\n        // resolve the reference to the actual byte range\n        const actualOffset = dataSlice.readOffset(valueOffset);\n        const length = getFieldTypeLength(fieldType) * typeCount;\n\n        // check, whether we actually cover the referenced byte range; if not,\n        // request a new slice of bytes to read from it\n        if (dataSlice.covers(actualOffset, length)) {\n          fieldValues = getValues(dataSlice, fieldType, typeCount, actualOffset);\n        } else {\n          const fieldDataSlice = await this.getSlice(actualOffset, length);\n          fieldValues = getValues(fieldDataSlice, fieldType, typeCount, actualOffset);\n        }\n      }\n\n      // unpack single values from the array\n      if (typeCount === 1 && arrayFields.indexOf(fieldTag) === -1 &&\n        !(fieldType === fieldTypes.RATIONAL || fieldType === fieldTypes.SRATIONAL)) {\n        value = fieldValues[0];\n      } else {\n        value = fieldValues;\n      }\n\n      // write the tags value to the file directly\n      fileDirectory[fieldTagNames[fieldTag]] = value;\n    }\n    const geoKeyDirectory = parseGeoKeyDirectory(fileDirectory);\n    const nextIFDByteOffset = dataSlice.readOffset(\n      offset + offsetSize + (entrySize * numDirEntries),\n    );\n\n    return new ImageFileDirectory(\n      fileDirectory,\n      geoKeyDirectory,\n      nextIFDByteOffset,\n    );\n  }\n\n  async requestIFD(index) {\n    // see if we already have that IFD index requested.\n    if (this.ifdRequests[index]) {\n      // attach to an already requested IFD\n      return this.ifdRequests[index];\n    } else if (index === 0) {\n      // special case for index 0\n      this.ifdRequests[index] = this.parseFileDirectoryAt(this.firstIFDOffset);\n      return this.ifdRequests[index];\n    } else if (!this.ifdRequests[index - 1]) {\n      // if the previous IFD was not yet loaded, load that one first\n      // this is the recursive call.\n      try {\n        this.ifdRequests[index - 1] = this.requestIFD(index - 1);\n      } catch (e) {\n        // if the previous one already was an index error, rethrow\n        // with the current index\n        if (e instanceof GeoTIFFImageIndexError) {\n          throw new GeoTIFFImageIndexError(index);\n        }\n        // rethrow anything else\n        throw e;\n      }\n    }\n    // if the previous IFD was loaded, we can finally fetch the one we are interested in.\n    // we need to wrap this in an IIFE, otherwise this.ifdRequests[index] would be delayed\n    this.ifdRequests[index] = (async () => {\n      const previousIfd = await this.ifdRequests[index - 1];\n      if (previousIfd.nextIFDByteOffset === 0) {\n        throw new GeoTIFFImageIndexError(index);\n      }\n      return this.parseFileDirectoryAt(previousIfd.nextIFDByteOffset);\n    })();\n    return this.ifdRequests[index];\n  }\n\n  /**\n   * Get the n-th internal subfile of an image. By default, the first is returned.\n   *\n   * @param {Number} [index=0] the index of the image to return.\n   * @returns {GeoTIFFImage} the image at the given index\n   */\n  async getImage(index = 0) {\n    const ifd = await this.requestIFD(index);\n    return new geotiffimage(\n      ifd.fileDirectory, ifd.geoKeyDirectory,\n      this.dataView, this.littleEndian, this.cache, this.source,\n    );\n  }\n\n  /**\n   * Returns the count of the internal subfiles.\n   *\n   * @returns {Number} the number of internal subfile images\n   */\n  async getImageCount() {\n    let index = 0;\n    // loop until we run out of IFDs\n    let hasNext = true;\n    while (hasNext) {\n      try {\n        await this.requestIFD(index);\n        ++index;\n      } catch (e) {\n        if (e instanceof GeoTIFFImageIndexError) {\n          hasNext = false;\n        } else {\n          throw e;\n        }\n      }\n    }\n    return index;\n  }\n\n  /**\n   * Get the values of the COG ghost area as a parsed map.\n   * See https://gdal.org/drivers/raster/cog.html#header-ghost-area for reference\n   * @returns {Object} the parsed ghost area or null, if no such area was found\n   */\n  async getGhostValues() {\n    const offset = this.bigTiff ? 16 : 8;\n    if (this.ghostValues) {\n      return this.ghostValues;\n    }\n    const detectionString = 'GDAL_STRUCTURAL_METADATA_SIZE=';\n    const heuristicAreaSize = detectionString.length + 100;\n    let slice = await this.getSlice(offset, heuristicAreaSize);\n    if (detectionString === getValues(slice, fieldTypes.ASCII, detectionString.length, offset)) {\n      const valuesString = getValues(slice, fieldTypes.ASCII, heuristicAreaSize, offset);\n      const firstLine = valuesString.split('\\n')[0];\n      const metadataSize = Number(firstLine.split('=')[1].split(' ')[0]) + firstLine.length;\n      if (metadataSize > heuristicAreaSize) {\n        slice = await this.getSlice(offset, metadataSize);\n      }\n      const fullString = getValues(slice, fieldTypes.ASCII, metadataSize, offset);\n      this.ghostValues = {};\n      fullString\n        .split('\\n')\n        .filter(line => line.length > 0)\n        .map(line => line.split('='))\n        .forEach(([key, value]) => {\n          this.ghostValues[key] = value;\n        });\n    }\n    return this.ghostValues;\n  }\n\n  /**\n   * Parse a (Geo)TIFF file from the given source.\n   *\n   * @param {source~Source} source The source of data to parse from.\n   * @param {object} options Additional options.\n   */\n  static async fromSource(source, options) {\n    const headerData = await source.fetch(0, 1024);\n    const dataView = new DataView64(headerData);\n\n    const BOM = dataView.getUint16(0, 0);\n    let littleEndian;\n    if (BOM === 0x4949) {\n      littleEndian = true;\n    } else if (BOM === 0x4D4D) {\n      littleEndian = false;\n    } else {\n      throw new TypeError('Invalid byte order value.');\n    }\n\n    const magicNumber = dataView.getUint16(2, littleEndian);\n    let bigTiff;\n    if (magicNumber === 42) {\n      bigTiff = false;\n    } else if (magicNumber === 43) {\n      bigTiff = true;\n      const offsetByteSize = dataView.getUint16(4, littleEndian);\n      if (offsetByteSize !== 8) {\n        throw new Error('Unsupported offset byte-size.');\n      }\n    } else {\n      throw new TypeError('Invalid magic number.');\n    }\n\n    const firstIFDOffset = bigTiff\n      ? dataView.getUint64(8, littleEndian)\n      : dataView.getUint32(4, littleEndian);\n    return new geotiff_GeoTIFF(source, littleEndian, bigTiff, firstIFDOffset, options);\n  }\n\n  /**\n   * Closes the underlying file buffer\n   * N.B. After the GeoTIFF has been completely processed it needs\n   * to be closed but only if it has been constructed from a file.\n   */\n  close() {\n    if (typeof this.source.close === 'function') {\n      return this.source.close();\n    }\n    return false;\n  }\n}\n\n\n/* harmony default export */ var geotiff = (geotiff_GeoTIFF);\n\n/**\n * Wrapper for GeoTIFF files that have external overviews.\n * @augments GeoTIFFBase\n */\nclass geotiff_MultiGeoTIFF extends GeoTIFFBase {\n  /**\n   * Construct a new MultiGeoTIFF from a main and several overview files.\n   * @param {GeoTIFF} mainFile The main GeoTIFF file.\n   * @param {GeoTIFF[]} overviewFiles An array of overview files.\n   */\n  constructor(mainFile, overviewFiles) {\n    super();\n    this.mainFile = mainFile;\n    this.overviewFiles = overviewFiles;\n    this.imageFiles = [mainFile].concat(overviewFiles);\n\n    this.fileDirectoriesPerFile = null;\n    this.fileDirectoriesPerFileParsing = null;\n    this.imageCount = null;\n  }\n\n  async parseFileDirectoriesPerFile() {\n    const requests = [this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)]\n      .concat(this.overviewFiles.map((file) => file.parseFileDirectoryAt(file.firstIFDOffset)));\n\n    this.fileDirectoriesPerFile = await Promise.all(requests);\n    return this.fileDirectoriesPerFile;\n  }\n\n  /**\n   * Get the n-th internal subfile of an image. By default, the first is returned.\n   *\n   * @param {Number} [index=0] the index of the image to return.\n   * @returns {GeoTIFFImage} the image at the given index\n   */\n  async getImage(index = 0) {\n    await this.getImageCount();\n    await this.parseFileDirectoriesPerFile();\n    let visited = 0;\n    let relativeIndex = 0;\n    for (let i = 0; i < this.imageFiles.length; i++) {\n      const imageFile = this.imageFiles[i];\n      for (let ii = 0; ii < this.imageCounts[i]; ii++) {\n        if (index === visited) {\n          const ifd = await imageFile.requestIFD(relativeIndex);\n          return new geotiffimage(\n            ifd.fileDirectory, imageFile.geoKeyDirectory,\n            imageFile.dataView, imageFile.littleEndian, imageFile.cache, imageFile.source,\n          );\n        }\n        visited++;\n        relativeIndex++;\n      }\n      relativeIndex = 0;\n    }\n\n    throw new RangeError('Invalid image index');\n  }\n\n  /**\n   * Returns the count of the internal subfiles.\n   *\n   * @returns {Number} the number of internal subfile images\n   */\n  async getImageCount() {\n    if (this.imageCount !== null) {\n      return this.imageCount;\n    }\n    const requests = [this.mainFile.getImageCount()]\n      .concat(this.overviewFiles.map((file) => file.getImageCount()));\n    this.imageCounts = await Promise.all(requests);\n    this.imageCount = this.imageCounts.reduce((count, ifds) => count + ifds, 0);\n    return this.imageCount;\n  }\n}\n\n\n\n/**\n * Creates a new GeoTIFF from a remote URL.\n * @param {string} url The URL to access the image from\n * @param {object} [options] Additional options to pass to the source.\n *                           See {@link makeRemoteSource} for details.\n * @returns {Promise.<GeoTIFF>} The resulting GeoTIFF file.\n */\nasync function fromUrl(url, options = {}) {\n  return geotiff_GeoTIFF.fromSource(makeRemoteSource(url, options));\n}\n\n/**\n * Construct a new GeoTIFF from an\n * [ArrayBuffer]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer}.\n * @param {ArrayBuffer} arrayBuffer The data to read the file from.\n * @returns {Promise.<GeoTIFF>} The resulting GeoTIFF file.\n */\nasync function fromArrayBuffer(arrayBuffer) {\n  return geotiff_GeoTIFF.fromSource(makeBufferSource(arrayBuffer));\n}\n\n/**\n * Construct a GeoTIFF from a local file path. This uses the node\n * [filesystem API]{@link https://nodejs.org/api/fs.html} and is\n * not available on browsers.\n *\n * N.B. After the GeoTIFF has been completely processed it needs\n * to be closed but only if it has been constructed from a file.\n * @param {string} path The file path to read from.\n * @returns {Promise.<GeoTIFF>} The resulting GeoTIFF file.\n */\nasync function fromFile(path) {\n  return geotiff_GeoTIFF.fromSource(makeFileSource(path));\n}\n\n/**\n * Construct a GeoTIFF from an HTML\n * [Blob]{@link https://developer.mozilla.org/en-US/docs/Web/API/Blob} or\n * [File]{@link https://developer.mozilla.org/en-US/docs/Web/API/File}\n * object.\n * @param {Blob|File} blob The Blob or File object to read from.\n * @returns {Promise.<GeoTIFF>} The resulting GeoTIFF file.\n */\nasync function fromBlob(blob) {\n  return geotiff_GeoTIFF.fromSource(makeFileReaderSource(blob));\n}\n\n/**\n * Construct a MultiGeoTIFF from the given URLs.\n * @param {string} mainUrl The URL for the main file.\n * @param {string[]} overviewUrls An array of URLs for the overview images.\n * @param {object} [options] Additional options to pass to the source.\n *                           See [makeRemoteSource]{@link module:source.makeRemoteSource}\n *                           for details.\n * @returns {Promise.<MultiGeoTIFF>} The resulting MultiGeoTIFF file.\n */\nasync function fromUrls(mainUrl, overviewUrls = [], options = {}) {\n  const mainFile = await geotiff_GeoTIFF.fromSource(makeRemoteSource(mainUrl, options));\n  const overviewFiles = await Promise.all(\n    overviewUrls.map((url) => geotiff_GeoTIFF.fromSource(makeRemoteSource(url, options))),\n  );\n\n  return new geotiff_MultiGeoTIFF(mainFile, overviewFiles);\n}\n\n/**\n * Main creating function for GeoTIFF files.\n * @param {(Array)} array of pixel values\n * @returns {metadata} metadata\n */\nasync function writeArrayBuffer(values, metadata) {\n  return writeGeotiff(values, metadata);\n}\n\n\n\n// CONCATENATED MODULE: ./src/loaders/decoder.js\n\nfunction getTiffDecoder(fileDirectory) {\n  return getDecoder(fileDirectory);\n}\n// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./src/loaders/viv.worker.js\n\n\n\n\n\n/* eslint-disable no-restricted-globals */\n\n\nfunction viv_worker_decode(_x, _x2, _x3) {\n  return _decode.apply(this, arguments);\n}\n\nfunction _decode() {\n  _decode = asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee(self, fileDirectory, buffer) {\n    var decoder, result;\n    return regenerator_default.a.wrap(function _callee$(_context) {\n      while (1) {\n        switch (_context.prev = _context.next) {\n          case 0:\n            decoder = getTiffDecoder(fileDirectory);\n            _context.next = 3;\n            return decoder.decode(fileDirectory, buffer);\n\n          case 3:\n            result = _context.sent;\n            self.postMessage([result], [result]);\n\n          case 5:\n          case \"end\":\n            return _context.stop();\n        }\n      }\n    }, _callee);\n  }));\n  return _decode.apply(this, arguments);\n}\n\nif (typeof self !== 'undefined') {\n  self.addEventListener('message', function (event) {\n    var _event$data = toArray_default()(event.data),\n        name = _event$data[0],\n        args = _event$data.slice(1);\n\n    switch (name) {\n      case 'decode':\n        viv_worker_decode.apply(void 0, [self].concat(toConsumableArray_default()(args)));\n        break;\n\n      default:\n        break;\n    }\n  });\n}\n\n/***/ }),\n/* 73 */,\n/* 74 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXTERNAL MODULE: ./node_modules/observable-fns/dist.esm/observable.js + 1 modules\nvar observable = __webpack_require__(9);\n\n// EXTERNAL MODULE: ./node_modules/observable-fns/dist.esm/subject.js\nvar dist_esm_subject = __webpack_require__(33);\n\n// CONCATENATED MODULE: ./node_modules/observable-fns/dist.esm/unsubscribe.js\n/**\n * Unsubscribe from a subscription returned by something that looks like an observable,\n * but is not necessarily our observable implementation.\n */\nfunction unsubscribe(subscription) {\n    if (typeof subscription === \"function\") {\n        subscription();\n    }\n    else if (subscription && typeof subscription.unsubscribe === \"function\") {\n        subscription.unsubscribe();\n    }\n}\n/* harmony default export */ var dist_esm_unsubscribe = (unsubscribe);\n\n// CONCATENATED MODULE: ./node_modules/observable-fns/dist.esm/multicast.js\n\n\n\n// TODO: Subject already creates additional observables \"under the hood\",\n//       now we introduce even more. A true native MulticastObservable\n//       would be preferable.\n/**\n * Takes a \"cold\" observable and returns a wrapping \"hot\" observable that\n * proxies the input observable's values and errors.\n *\n * An observable is called \"cold\" when its initialization function is run\n * for each new subscriber. This is how observable-fns's `Observable`\n * implementation works.\n *\n * A hot observable is an observable where new subscribers subscribe to\n * the upcoming values of an already-initialiazed observable.\n *\n * The multicast observable will lazily subscribe to the source observable\n * once it has its first own subscriber and will unsubscribe from the\n * source observable when its last own subscriber unsubscribed.\n */\nfunction multicast(coldObservable) {\n    const subject = new dist_esm_subject[\"a\" /* default */]();\n    let sourceSubscription;\n    let subscriberCount = 0;\n    return new observable[\"a\" /* default */](observer => {\n        // Init source subscription lazily\n        if (!sourceSubscription) {\n            sourceSubscription = coldObservable.subscribe(subject);\n        }\n        // Pipe all events from `subject` into this observable\n        const subscription = subject.subscribe(observer);\n        subscriberCount++;\n        return () => {\n            subscriberCount--;\n            subscription.unsubscribe();\n            // Close source subscription once last subscriber has unsubscribed\n            if (subscriberCount === 0) {\n                dist_esm_unsubscribe(sourceSubscription);\n                sourceSubscription = undefined;\n            }\n        };\n    });\n}\n/* harmony default export */ var dist_esm_multicast = __webpack_exports__[\"a\"] = (multicast);\n\n\n/***/ })\n/******/ ]);\n//# sourceMappingURL=d76760a725223475d798.decoder.worker.js.map",null)}},function(e,t){e.exports=n(206)},function(e,t){e.exports=n(666)},function(e,t,n){"use strict";var r=window.URL||window.webkitURL;e.exports=function(e,t){try{try{var n;try{(n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(e),n=n.getBlob()}catch(i){n=new Blob([e])}return new Worker(r.createObjectURL(n))}catch(i){return new Worker("data:application/javascript,"+encodeURIComponent(e))}}catch(i){if(!t)throw Error("Inline worker is not supported");return new Worker(t)}}},function(e,t,n){"use strict";n.r(t),n.d(t,"DTYPE_VALUES",(function(){return G})),n.d(t,"MAX_SLIDERS_AND_CHANNELS",(function(){return U})),n.d(t,"ScaleBarLayer",(function(){return Oe})),n.d(t,"MultiscaleImageLayer",(function(){return Ce})),n.d(t,"XRLayer",(function(){return te})),n.d(t,"VivViewer",(function(){return Ue})),n.d(t,"VivView",(function(){return Ge})),n.d(t,"OverviewView",(function(){return Ke})),n.d(t,"PictureInPictureViewer",(function(){return $e})),n.d(t,"SideBySideView",(function(){return Ve})),n.d(t,"getChannelStats",(function(){return le})),n.d(t,"SideBySideViewer",(function(){return nt})),n.d(t,"DetailView",(function(){return He})),n.d(t,"ImageLayer",(function(){return Ie})),n.d(t,"ZarrLoader",(function(){return Vn})),n.d(t,"OMETiffLoader",(function(){return rr})),n.d(t,"createOMETiffLoader",(function(){return Ar})),n.d(t,"createZarrLoader",(function(){return ar})),n.d(t,"createBioformatsZarrLoader",(function(){return sr}));var h=n(0),g=n.n(h),d=n(3),p=n.n(d),v=n(1),y=n.n(v),m=n(2),I=n.n(m),b=n(8),E=n.n(b),C=n(9),B=n.n(C),w=n(4),Q=n.n(w),k=n(5),_=n(13),x=n(17),S=n.n(x),O=n(7),D=n.n(O),R=n(22),j=n(11),M=n.n(j),N=n(10),F=n.n(N),T=n(6),L=n.n(T),P=[0,0,0],U=6,G={"<u1":{format:L.a.R8UI,dataFormat:L.a.RED_INTEGER,type:L.a.UNSIGNED_BYTE,max:Math.pow(2,8)-1,TypedArray:Uint8Array},"<u2":{format:L.a.R16UI,dataFormat:L.a.RED_INTEGER,type:L.a.UNSIGNED_SHORT,max:Math.pow(2,16)-1,TypedArray:Uint16Array},"<u4":{format:L.a.R32UI,dataFormat:L.a.RED_INTEGER,type:L.a.UNSIGNED_INT,max:Math.pow(2,32)-1,TypedArray:Uint32Array},"<f4":{format:L.a.R32F,dataFormat:L.a.RED,type:L.a.FLOAT,max:3.4*Math.pow(10,38),TypedArray:Float32Array}};function q(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 H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){D()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Y(e){return M()(Array(e).keys())}function J(e,t,n){for(var r=0;r<n;r+=1)e.push(t);return e}function z(e){return e.map((function(e){return new Float32Array(e)}))}function K(e,t){return Math.pow(2,Math.ceil(Math.log2(Math.max(e,t))))}function W(e){var t=e.props,n=t.viewportId,r=t.lensRadius;if(n){var i=e.context.mousePosition,a=e.context.deck.viewManager.views.filter((function(e){return e.id===n}))[0],o=e.context.deck.viewManager.viewState[n],s=a.makeViewport(H(H({},o),{},{viewState:o}));if(i&&s.containsPixel(i)){var u={x:i.x-s.x,y:i.y-s.y},A=[[u.x-r,u.y],[u.x,u.y+r],[u.x+r,u.y],[u.x,u.y-r]].map((function(e,t){return s.unproject(e)[t%2]}));e.setState({unprojectLensBounds:A})}else e.setState({unprojectLensBounds:[0,0,0,0]})}else e.setState({unprojectLensBounds:[0,0,0,0]})}function V(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 X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach((function(t){D()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Z(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q()(e);if(t){var i=Q()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var $={pickable:!0,coordinateSystem:k.COORDINATE_SYSTEM.CARTESIAN,channelData:{type:"array",value:{},compare:!0},bounds:{type:"array",value:[0,0,1,1],compare:!0},colorValues:{type:"array",value:[],compare:!0},sliderValues:{type:"array",value:[],compare:!0},channelIsOn:{type:"array",value:[],compare:!0},opacity:{type:"number",value:1,compare:!0},dtype:{type:"string",value:"<u2",compare:!0},colormap:{type:"string",value:"",compare:!0},isLensOn:{type:"boolean",value:!1,compare:!0},lensSelection:{type:"number",value:0,compare:!0},lensBorderColor:{type:"array",value:[255,255,255],compare:!0},lensBorderRadius:{type:"number",value:.02,compare:!0},unprojectLensBounds:{type:"array",value:[0,0,0,0],compare:!0}},ee=function(e){E()(n,e);var t=Z(n);function n(){return y()(this,n),t.apply(this,arguments)}return I()(n,[{key:"getShaders",value:function(){var e=this.context.gl,t=!Object(_.isWebGL2)(e),r=this.props,i=r.colormap,a=r.dtype,o=t?'#define SHADER_NAME xr-layer-fragment-shader\nprecision highp float;\n#define GLSLIFY 1\n\n// our texture\nuniform sampler2D channel0;\nuniform sampler2D channel1;\nuniform sampler2D channel2;\nuniform sampler2D channel3;\nuniform sampler2D channel4;\nuniform sampler2D channel5;\n\n// range\nuniform vec2 sliderValues[6];\n\n// color\nuniform vec3 colorValues[6];\nuniform float intensityArray[6];\n\n// opacity\nuniform float opacity;\n\n// lens bounds\nuniform float majorLensAxis;\nuniform float minorLensAxis;\nuniform vec2 lensCenter;\n\n// lens uniforms\nuniform bool isLensOn;\nuniform int lensSelection;\nuniform vec3 lensBorderColor;\nuniform float lensBorderRadius;\n\nvarying vec2 vTexCoord;\n\nbool fragInLensBounds() {\n  // Check membership in what is (not visually, but effectively) an ellipse.\n  // Since the fragment space is a unit square and the real coordinates could be longer than tall,\n  // to get a circle visually we have to treat the check as that of an ellipse to get the effect of a circle.\n  \n  // Check membership in ellipse.\n  return pow((lensCenter.x - vTexCoord.x) / majorLensAxis, 2.0) + pow((lensCenter.y - vTexCoord.y) / minorLensAxis, 2.0) < (1.0 - lensBorderRadius);\n}\n\nbool fragOnLensBounds() {\n  // Same as the above, except this checks the boundary.\n\n  float ellipseDistance = pow((lensCenter.x - vTexCoord.x) / majorLensAxis, 2.0) + pow((lensCenter.y - vTexCoord.y) / minorLensAxis, 2.0);\n  \n  // Check membership on "bourndary" of ellipse.\n  return ellipseDistance <= 1.0 && ellipseDistance >= (1.0 - lensBorderRadius);\n}\n\nvec3 hsv2rgb(vec3 c)\n{\n    vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n    vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n    return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvec3 rgb2hsv(vec3 rgb) {\n \tfloat Cmax = max(rgb.r, max(rgb.g, rgb.b));\n \tfloat Cmin = min(rgb.r, min(rgb.g, rgb.b));\n \tfloat delta = Cmax - Cmin;\n\n \tvec3 hsv = vec3(0., 0., Cmax);\n\n \tif (Cmax > Cmin) {\n \t\thsv.y = delta / Cmax;\n\n \t\tif (rgb.r == Cmax) {\n      hsv.x = (rgb.g - rgb.b) / delta;\n    }\n \t\telse {\n \t\t\tif (rgb.g == Cmax){\n        hsv.x = 2. + (rgb.b - rgb.r) / delta;\n      }\n \t\t\telse {\n        hsv.x = 4. + (rgb.r - rgb.g) / delta;\n      }\n \t\t}\n \t\thsv.x = fract(hsv.x / 6.);\n \t}\n \treturn hsv;\n }\n\nvoid main() {\n  float intensityValue0 = (float(texture(channel0, vTexCoord).r) - sliderValues[0][0]) / max(0.0005, (sliderValues[0][1] - sliderValues[0][0]));\n  float intensityValue1 = (float(texture(channel1, vTexCoord).r) - sliderValues[1][0]) / max(0.0005, (sliderValues[1][1] - sliderValues[1][0]));\n  float intensityValue2 = (float(texture(channel2, vTexCoord).r) - sliderValues[2][0]) / max(0.0005, (sliderValues[2][1] - sliderValues[2][0]));\n  float intensityValue3 = (float(texture(channel3, vTexCoord).r) - sliderValues[3][0]) / max(0.0005, (sliderValues[3][1] - sliderValues[3][0]));\n  float intensityValue4 = (float(texture(channel4, vTexCoord).r) - sliderValues[4][0]) / max(0.0005, (sliderValues[4][1] - sliderValues[4][0]));\n  float intensityValue5 = (float(texture(channel5, vTexCoord).r) - sliderValues[5][0]) / max(0.0005, (sliderValues[5][1] - sliderValues[5][0]));\n  \n  // Find out if the frag is in bounds of the lens.\n  bool isFragInLensBounds = fragInLensBounds();\n  bool isFragOnLensBounds = fragOnLensBounds();\n\n  vec3 rgbCombo = vec3(0.0);\n  vec3 hsvCombo = vec3(0.0);\n\n  bool inLensAndUseLens = isLensOn && isFragInLensBounds;\n\n  float useColorValue = float(int((inLensAndUseLens && 0 == lensSelection) || (!inLensAndUseLens)));\n  // Max is faster than ternaries/if-else for turning on/off channels.\n  hsvCombo = rgb2hsv(max(vec3(colorValues[0]), (1.0 - useColorValue) * vec3(255, 255, 255)));\n  hsvCombo = vec3(hsvCombo.xy, max(0.0,intensityValue0));\n  rgbCombo += hsv2rgb(hsvCombo);\n\n  useColorValue = float(int((inLensAndUseLens && 1 == lensSelection) || (!inLensAndUseLens)));\n  // Max is faster than ternaries/if-else for turning on/off channels.\n  hsvCombo = rgb2hsv(max(vec3(colorValues[1]), (1.0 - useColorValue) * vec3(255, 255, 255)));  hsvCombo = vec3(hsvCombo.xy, max(0.0,intensityValue1));\n  rgbCombo += hsv2rgb(hsvCombo);\n\n  useColorValue = float(int((inLensAndUseLens && 2 == lensSelection) || (!inLensAndUseLens)));\n  // Max is faster than ternaries/if-else for turning on/off channels.\n  hsvCombo = rgb2hsv(max(vec3(colorValues[2]), (1.0 - useColorValue) * vec3(255, 255, 255)));  hsvCombo = vec3(hsvCombo.xy, max(0.0,intensityValue2));\n  rgbCombo += hsv2rgb(hsvCombo);\n\n  useColorValue = float(int((inLensAndUseLens && 3 == lensSelection) || (!inLensAndUseLens)));\n  // Max is faster than ternaries/if-else for turning on/off channels.\n  hsvCombo = rgb2hsv(max(vec3(colorValues[3]), (1.0 - useColorValue) * vec3(255, 255, 255)));  hsvCombo = vec3(hsvCombo.xy, max(0.0,intensityValue3));\n  rgbCombo += hsv2rgb(hsvCombo);\n\n  useColorValue = float(int((inLensAndUseLens && 4 == lensSelection) || (!inLensAndUseLens)));\n  // Max is faster than ternaries/if-else for turning on/off channels.\n  hsvCombo = rgb2hsv(max(vec3(colorValues[4]), (1.0 - useColorValue) * vec3(255, 255, 255)));  hsvCombo = vec3(hsvCombo.xy, max(0.0,intensityValue4));\n  rgbCombo += hsv2rgb(hsvCombo);\n\n  useColorValue = float(int((inLensAndUseLens && 5 == lensSelection) || (!inLensAndUseLens)));\n  // Max is faster than ternaries/if-else for turning on/off channels.\n  hsvCombo = rgb2hsv(max(vec3(colorValues[5]), (1.0 - useColorValue) * vec3(255, 255, 255)));  hsvCombo = vec3(hsvCombo.xy, max(0.0,intensityValue5));\n  rgbCombo += hsv2rgb(hsvCombo);\n\n  // Ternaries are faster than checking this first and then returning/breaking out of shader.\n  rgbCombo = (isLensOn && isFragOnLensBounds) ? lensBorderColor : rgbCombo;\n\n  gl_FragColor = vec4(rgbCombo, opacity);\n  geometry.uv = vTexCoord;\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n':'#version 300 es\n#define SHADER_NAME xr-layer-fragment-shader\nprecision highp float;\nprecision highp int;\nprecision highp usampler2D;\n#define GLSLIFY 1\n\n// our texture\nuniform usampler2D channel0;\nuniform usampler2D channel1;\nuniform usampler2D channel2;\nuniform usampler2D channel3;\nuniform usampler2D channel4;\nuniform usampler2D channel5;\n\n// range\nuniform vec2 sliderValues[6];\n\n// color\nuniform vec3 colorValues[6];\n\n// opacity\nuniform float opacity;\n\n// lens bounds for ellipse\nuniform float majorLensAxis;\nuniform float minorLensAxis;\nuniform vec2 lensCenter;\n\n// lens uniforms\nuniform bool isLensOn;\nuniform int lensSelection;\nuniform vec3 lensBorderColor;\nuniform float lensBorderRadius;\n\nin vec2 vTexCoord;\n\nout vec4 color;\n\nbool fragInLensBounds() {\n  // Check membership in what is (not visually, but effectively) an ellipse.\n  // Since the fragment space is a unit square and the real coordinates could be longer than tall,\n  // to get a circle visually we have to treat the check as that of an ellipse to get the effect of a circle.\n  \n  // Check membership in ellipse.\n  return pow((lensCenter.x - vTexCoord.x) / majorLensAxis, 2.0) + pow((lensCenter.y - vTexCoord.y) / minorLensAxis, 2.0) < (1.0 - lensBorderRadius);\n}\n\nbool fragOnLensBounds() {\n  // Same as the above, except this checks the boundary.\n\n  float ellipseDistance = pow((lensCenter.x - vTexCoord.x) / majorLensAxis, 2.0) + pow((lensCenter.y - vTexCoord.y) / minorLensAxis, 2.0);\n  \n  // Check membership on "bourndary" of ellipse.\n  return ellipseDistance <= 1.0 && ellipseDistance >= (1.0 - lensBorderRadius);\n}\n\nvec3 hsv2rgb(vec3 c)\n{\n    vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n    vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n    return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\n\nvec3 rgb2hsv(vec3 rgb) {\n \tfloat Cmax = max(rgb.r, max(rgb.g, rgb.b));\n \tfloat Cmin = min(rgb.r, min(rgb.g, rgb.b));\n \tfloat delta = Cmax - Cmin;\n\n \tvec3 hsv = vec3(0., 0., Cmax);\n\n \tif (Cmax > Cmin) {\n \t\thsv.y = delta / Cmax;\n\n \t\tif (rgb.r == Cmax) {\n      hsv.x = (rgb.g - rgb.b) / delta;\n    }\n \t\telse {\n \t\t\tif (rgb.g == Cmax){\n        hsv.x = 2. + (rgb.b - rgb.r) / delta;\n      }\n \t\t\telse {\n        hsv.x = 4. + (rgb.r - rgb.g) / delta;\n      }\n \t\t}\n \t\thsv.x = fract(hsv.x / 6.);\n \t}\n \treturn hsv;\n }\n\nvoid main() {\n  // Scale intesities.\n  float intensityValue0 = (float(texture(channel0, vTexCoord).r) - sliderValues[0][0]) / max(0.0005, (sliderValues[0][1] - sliderValues[0][0]));\n  float intensityValue1 = (float(texture(channel1, vTexCoord).r) - sliderValues[1][0]) / max(0.0005, (sliderValues[1][1] - sliderValues[1][0]));\n  float intensityValue2 = (float(texture(channel2, vTexCoord).r) - sliderValues[2][0]) / max(0.0005, (sliderValues[2][1] - sliderValues[2][0]));\n  float intensityValue3 = (float(texture(channel3, vTexCoord).r) - sliderValues[3][0]) / max(0.0005, (sliderValues[3][1] - sliderValues[3][0]));\n  float intensityValue4 = (float(texture(channel4, vTexCoord).r) - sliderValues[4][0]) / max(0.0005, (sliderValues[4][1] - sliderValues[4][0]));\n  float intensityValue5 = (float(texture(channel5, vTexCoord).r) - sliderValues[5][0]) / max(0.0005, (sliderValues[5][1] - sliderValues[5][0]));\n\n  // Find out if the frag is in bounds of the lens.\n  bool isFragInLensBounds = fragInLensBounds();\n  bool isFragOnLensBounds = fragOnLensBounds();\n\n  // Declare variables.\n  vec3 rgbCombo = vec3(0.0);\n  vec3 hsvCombo = vec3(0.0);\n  float intensityArray[6] = float[6](intensityValue0, intensityValue1, intensityValue2, intensityValue3, intensityValue4, intensityValue5);\n\n  for(int i = 0; i < 6; i++) {\n    // If we are using the lens and this frag is in bounds, focus on only the selection.\n    // Otherwise, use the props color value.\n    bool inLensAndUseLens = isLensOn && isFragInLensBounds;\n    float useColorValue = float(int((inLensAndUseLens && i == lensSelection) || (!inLensAndUseLens)));\n    // Ternaries are much faster than if-then statements.\n    hsvCombo = rgb2hsv(max(vec3(colorValues[i]), (1.0 - useColorValue) * vec3(255, 255, 255)));\n    // Sum up the intesitiies in additive blending.\n    hsvCombo = vec3(hsvCombo.xy, max(0.0, intensityArray[i]));\n    rgbCombo += hsv2rgb(hsvCombo);\n  }\n\n  // Ternaries are faster than checking this first and then returning/breaking out of shader.\n  rgbCombo = (isLensOn && isFragOnLensBounds) ? lensBorderColor : rgbCombo;\n\n  color = vec4(rgbCombo, opacity);\n  geometry.uv = vTexCoord;\n  DECKGL_FILTER_COLOR(color, geometry);\n}',s=i?(t?"#define SHADER_NAME xr-layer-fragment-shader-colormap\nprecision highp float;\n#define GLSLIFY 1\n\nvec4 jet (float x_17) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.5137254901960784,1);\n  const float e1 = 0.125;\n  const vec4 v1 = vec4(0,0.23529411764705882,0.6666666666666666,1);\n  const float e2 = 0.375;\n  const vec4 v2 = vec4(0.0196078431372549,1,1,1);\n  const float e3 = 0.625;\n  const vec4 v3 = vec4(1,1,0,1);\n  const float e4 = 0.875;\n  const vec4 v4 = vec4(0.9803921568627451,0,0,1);\n  const float e5 = 1.0;\n  const vec4 v5 = vec4(0.5019607843137255,0,0,1);\n  float a0 = smoothstep(e0,e1,x_17);\n  float a1 = smoothstep(e1,e2,x_17);\n  float a2 = smoothstep(e2,e3,x_17);\n  float a3 = smoothstep(e3,e4,x_17);\n  float a4 = smoothstep(e4,e5,x_17);\n  return max(mix(v0,v1,a0)*step(e0,x_17)*step(x_17,e1),\n    max(mix(v1,v2,a1)*step(e1,x_17)*step(x_17,e2),\n    max(mix(v2,v3,a2)*step(e2,x_17)*step(x_17,e3),\n    max(mix(v3,v4,a3)*step(e3,x_17)*step(x_17,e4),mix(v4,v5,a4)*step(e4,x_17)*step(x_17,e5)\n  ))));\n}\n\nvec4 hsv (float x_18) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(1,0,0,1);\n  const float e1 = 0.169;\n  const vec4 v1 = vec4(0.9921568627450981,1,0.00784313725490196,1);\n  const float e2 = 0.173;\n  const vec4 v2 = vec4(0.9686274509803922,1,0.00784313725490196,1);\n  const float e3 = 0.337;\n  const vec4 v3 = vec4(0,0.9882352941176471,0.01568627450980392,1);\n  const float e4 = 0.341;\n  const vec4 v4 = vec4(0,0.9882352941176471,0.0392156862745098,1);\n  const float e5 = 0.506;\n  const vec4 v5 = vec4(0.00392156862745098,0.9764705882352941,1,1);\n  const float e6 = 0.671;\n  const vec4 v6 = vec4(0.00784313725490196,0,0.9921568627450981,1);\n  const float e7 = 0.675;\n  const vec4 v7 = vec4(0.03137254901960784,0,0.9921568627450981,1);\n  const float e8 = 0.839;\n  const vec4 v8 = vec4(1,0,0.984313725490196,1);\n  const float e9 = 0.843;\n  const vec4 v9 = vec4(1,0,0.9607843137254902,1);\n  const float e10 = 1.0;\n  const vec4 v10 = vec4(1,0,0.023529411764705882,1);\n  float a0 = smoothstep(e0,e1,x_18);\n  float a1 = smoothstep(e1,e2,x_18);\n  float a2 = smoothstep(e2,e3,x_18);\n  float a3 = smoothstep(e3,e4,x_18);\n  float a4 = smoothstep(e4,e5,x_18);\n  float a5 = smoothstep(e5,e6,x_18);\n  float a6 = smoothstep(e6,e7,x_18);\n  float a7 = smoothstep(e7,e8,x_18);\n  float a8 = smoothstep(e8,e9,x_18);\n  float a9 = smoothstep(e9,e10,x_18);\n  return max(mix(v0,v1,a0)*step(e0,x_18)*step(x_18,e1),\n    max(mix(v1,v2,a1)*step(e1,x_18)*step(x_18,e2),\n    max(mix(v2,v3,a2)*step(e2,x_18)*step(x_18,e3),\n    max(mix(v3,v4,a3)*step(e3,x_18)*step(x_18,e4),\n    max(mix(v4,v5,a4)*step(e4,x_18)*step(x_18,e5),\n    max(mix(v5,v6,a5)*step(e5,x_18)*step(x_18,e6),\n    max(mix(v6,v7,a6)*step(e6,x_18)*step(x_18,e7),\n    max(mix(v7,v8,a7)*step(e7,x_18)*step(x_18,e8),\n    max(mix(v8,v9,a8)*step(e8,x_18)*step(x_18,e9),mix(v9,v10,a9)*step(e9,x_18)*step(x_18,e10)\n  )))))))));\n}\n\nvec4 hot (float x_24) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.3;\n  const vec4 v1 = vec4(0.9019607843137255,0,0,1);\n  const float e2 = 0.6;\n  const vec4 v2 = vec4(1,0.8235294117647058,0,1);\n  const float e3 = 1.0;\n  const vec4 v3 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_24);\n  float a1 = smoothstep(e1,e2,x_24);\n  float a2 = smoothstep(e2,e3,x_24);\n  return max(mix(v0,v1,a0)*step(e0,x_24)*step(x_24,e1),\n    max(mix(v1,v2,a1)*step(e1,x_24)*step(x_24,e2),mix(v2,v3,a2)*step(e2,x_24)*step(x_24,e3)\n  ));\n}\n\nvec4 cool (float x_25) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.49019607843137253,0,0.7019607843137254,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.4549019607843137,0,0.8549019607843137,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.3843137254901961,0.2901960784313726,0.9294117647058824,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.26666666666666666,0.5725490196078431,0.9058823529411765,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0,0.8,0.7725490196078432,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0,0.9686274509803922,0.5725490196078431,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0,1,0.34509803921568627,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.1568627450980392,1,0.03137254901960784,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.5764705882352941,1,0,1);\n  float a0 = smoothstep(e0,e1,x_25);\n  float a1 = smoothstep(e1,e2,x_25);\n  float a2 = smoothstep(e2,e3,x_25);\n  float a3 = smoothstep(e3,e4,x_25);\n  float a4 = smoothstep(e4,e5,x_25);\n  float a5 = smoothstep(e5,e6,x_25);\n  float a6 = smoothstep(e6,e7,x_25);\n  float a7 = smoothstep(e7,e8,x_25);\n  return max(mix(v0,v1,a0)*step(e0,x_25)*step(x_25,e1),\n    max(mix(v1,v2,a1)*step(e1,x_25)*step(x_25,e2),\n    max(mix(v2,v3,a2)*step(e2,x_25)*step(x_25,e3),\n    max(mix(v3,v4,a3)*step(e3,x_25)*step(x_25,e4),\n    max(mix(v4,v5,a4)*step(e4,x_25)*step(x_25,e5),\n    max(mix(v5,v6,a5)*step(e5,x_25)*step(x_25,e6),\n    max(mix(v6,v7,a6)*step(e6,x_25)*step(x_25,e7),mix(v7,v8,a7)*step(e7,x_25)*step(x_25,e8)\n  )))))));\n}\n\nvec4 spring (float x_16) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(1,0,1,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,0,1);\n  float a0 = smoothstep(e0,e1,x_16);\n  return mix(v0,v1,a0)*step(e0,x_16)*step(x_16,e1);\n}\n\nvec4 summer (float x_13) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0.5019607843137255,0.4,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,0.4,1);\n  float a0 = smoothstep(e0,e1,x_13);\n  return mix(v0,v1,a0)*step(e0,x_13)*step(x_13,e1);\n}\n\nvec4 autumn (float x_12) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(1,0,0,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,0,1);\n  float a0 = smoothstep(e0,e1,x_12);\n  return mix(v0,v1,a0)*step(e0,x_12)*step(x_12,e1);\n}\n\nvec4 winter (float x_15) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,1,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(0,1,0.5019607843137255,1);\n  float a0 = smoothstep(e0,e1,x_15);\n  return mix(v0,v1,a0)*step(e0,x_15)*step(x_15,e1);\n}\n\nvec4 bone (float x_10) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.376;\n  const vec4 v1 = vec4(0.32941176470588235,0.32941176470588235,0.4549019607843137,1);\n  const float e2 = 0.753;\n  const vec4 v2 = vec4(0.6627450980392157,0.7843137254901961,0.7843137254901961,1);\n  const float e3 = 1.0;\n  const vec4 v3 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_10);\n  float a1 = smoothstep(e1,e2,x_10);\n  float a2 = smoothstep(e2,e3,x_10);\n  return max(mix(v0,v1,a0)*step(e0,x_10)*step(x_10,e1),\n    max(mix(v1,v2,a1)*step(e1,x_10)*step(x_10,e2),mix(v2,v3,a2)*step(e2,x_10)*step(x_10,e3)\n  ));\n}\n\nvec4 copper (float x_5) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.804;\n  const vec4 v1 = vec4(1,0.6274509803921569,0.4,1);\n  const float e2 = 1.0;\n  const vec4 v2 = vec4(1,0.7803921568627451,0.4980392156862745,1);\n  float a0 = smoothstep(e0,e1,x_5);\n  float a1 = smoothstep(e1,e2,x_5);\n  return max(mix(v0,v1,a0)*step(e0,x_5)*step(x_5,e1),mix(v1,v2,a1)*step(e1,x_5)*step(x_5,e2)\n  );\n}\n\nvec4 greys (float x_41) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_41);\n  return mix(v0,v1,a0)*step(e0,x_41)*step(x_41,e1);\n}\n\nvec4 yignbu (float x_32) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.03137254901960784,0.11372549019607843,0.34509803921568627,1);\n  const float e1 = 0.125;\n  const vec4 v1 = vec4(0.1450980392156863,0.20392156862745098,0.5803921568627451,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.13333333333333333,0.3686274509803922,0.6588235294117647,1);\n  const float e3 = 0.375;\n  const vec4 v3 = vec4(0.11372549019607843,0.5686274509803921,0.7529411764705882,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.2549019607843137,0.7137254901960784,0.7686274509803922,1);\n  const float e5 = 0.625;\n  const vec4 v5 = vec4(0.4980392156862745,0.803921568627451,0.7333333333333333,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.7803921568627451,0.9137254901960784,0.7058823529411765,1);\n  const float e7 = 0.875;\n  const vec4 v7 = vec4(0.9294117647058824,0.9725490196078431,0.8509803921568627,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(1,1,0.8509803921568627,1);\n  float a0 = smoothstep(e0,e1,x_32);\n  float a1 = smoothstep(e1,e2,x_32);\n  float a2 = smoothstep(e2,e3,x_32);\n  float a3 = smoothstep(e3,e4,x_32);\n  float a4 = smoothstep(e4,e5,x_32);\n  float a5 = smoothstep(e5,e6,x_32);\n  float a6 = smoothstep(e6,e7,x_32);\n  float a7 = smoothstep(e7,e8,x_32);\n  return max(mix(v0,v1,a0)*step(e0,x_32)*step(x_32,e1),\n    max(mix(v1,v2,a1)*step(e1,x_32)*step(x_32,e2),\n    max(mix(v2,v3,a2)*step(e2,x_32)*step(x_32,e3),\n    max(mix(v3,v4,a3)*step(e3,x_32)*step(x_32,e4),\n    max(mix(v4,v5,a4)*step(e4,x_32)*step(x_32,e5),\n    max(mix(v5,v6,a5)*step(e5,x_32)*step(x_32,e6),\n    max(mix(v6,v7,a6)*step(e6,x_32)*step(x_32,e7),mix(v7,v8,a7)*step(e7,x_32)*step(x_32,e8)\n  )))))));\n}\n\nvec4 greens (float x_4) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0.26666666666666666,0.10588235294117647,1);\n  const float e1 = 0.125;\n  const vec4 v1 = vec4(0,0.42745098039215684,0.17254901960784313,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.13725490196078433,0.5450980392156862,0.27058823529411763,1);\n  const float e3 = 0.375;\n  const vec4 v3 = vec4(0.2549019607843137,0.6705882352941176,0.36470588235294116,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.4549019607843137,0.7686274509803922,0.4627450980392157,1);\n  const float e5 = 0.625;\n  const vec4 v5 = vec4(0.6313725490196078,0.8509803921568627,0.6078431372549019,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.7803921568627451,0.9137254901960784,0.7529411764705882,1);\n  const float e7 = 0.875;\n  const vec4 v7 = vec4(0.8980392156862745,0.9607843137254902,0.8784313725490196,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9686274509803922,0.9882352941176471,0.9607843137254902,1);\n  float a0 = smoothstep(e0,e1,x_4);\n  float a1 = smoothstep(e1,e2,x_4);\n  float a2 = smoothstep(e2,e3,x_4);\n  float a3 = smoothstep(e3,e4,x_4);\n  float a4 = smoothstep(e4,e5,x_4);\n  float a5 = smoothstep(e5,e6,x_4);\n  float a6 = smoothstep(e6,e7,x_4);\n  float a7 = smoothstep(e7,e8,x_4);\n  return max(mix(v0,v1,a0)*step(e0,x_4)*step(x_4,e1),\n    max(mix(v1,v2,a1)*step(e1,x_4)*step(x_4,e2),\n    max(mix(v2,v3,a2)*step(e2,x_4)*step(x_4,e3),\n    max(mix(v3,v4,a3)*step(e3,x_4)*step(x_4,e4),\n    max(mix(v4,v5,a4)*step(e4,x_4)*step(x_4,e5),\n    max(mix(v5,v6,a5)*step(e5,x_4)*step(x_4,e6),\n    max(mix(v6,v7,a6)*step(e6,x_4)*step(x_4,e7),mix(v7,v8,a7)*step(e7,x_4)*step(x_4,e8)\n  )))))));\n}\n\nvec4 yiorrd (float x_34) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.5019607843137255,0,0.14901960784313725,1);\n  const float e1 = 0.125;\n  const vec4 v1 = vec4(0.7411764705882353,0,0.14901960784313725,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.8901960784313725,0.10196078431372549,0.10980392156862745,1);\n  const float e3 = 0.375;\n  const vec4 v3 = vec4(0.9882352941176471,0.3058823529411765,0.16470588235294117,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.9921568627450981,0.5529411764705883,0.23529411764705882,1);\n  const float e5 = 0.625;\n  const vec4 v5 = vec4(0.996078431372549,0.6980392156862745,0.2980392156862745,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.996078431372549,0.8509803921568627,0.4627450980392157,1);\n  const float e7 = 0.875;\n  const vec4 v7 = vec4(1,0.9294117647058824,0.6274509803921569,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(1,1,0.8,1);\n  float a0 = smoothstep(e0,e1,x_34);\n  float a1 = smoothstep(e1,e2,x_34);\n  float a2 = smoothstep(e2,e3,x_34);\n  float a3 = smoothstep(e3,e4,x_34);\n  float a4 = smoothstep(e4,e5,x_34);\n  float a5 = smoothstep(e5,e6,x_34);\n  float a6 = smoothstep(e6,e7,x_34);\n  float a7 = smoothstep(e7,e8,x_34);\n  return max(mix(v0,v1,a0)*step(e0,x_34)*step(x_34,e1),\n    max(mix(v1,v2,a1)*step(e1,x_34)*step(x_34,e2),\n    max(mix(v2,v3,a2)*step(e2,x_34)*step(x_34,e3),\n    max(mix(v3,v4,a3)*step(e3,x_34)*step(x_34,e4),\n    max(mix(v4,v5,a4)*step(e4,x_34)*step(x_34,e5),\n    max(mix(v5,v6,a5)*step(e5,x_34)*step(x_34,e6),\n    max(mix(v6,v7,a6)*step(e6,x_34)*step(x_34,e7),mix(v7,v8,a7)*step(e7,x_34)*step(x_34,e8)\n  )))))));\n}\n\nvec4 bluered (float x_21) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,1,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,0,0,1);\n  float a0 = smoothstep(e0,e1,x_21);\n  return mix(v0,v1,a0)*step(e0,x_21)*step(x_21,e1);\n}\n\nvec4 rdbu (float x_23) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.0196078431372549,0.0392156862745098,0.6745098039215687,1);\n  const float e1 = 0.35;\n  const vec4 v1 = vec4(0.41568627450980394,0.5372549019607843,0.9686274509803922,1);\n  const float e2 = 0.5;\n  const vec4 v2 = vec4(0.7450980392156863,0.7450980392156863,0.7450980392156863,1);\n  const float e3 = 0.6;\n  const vec4 v3 = vec4(0.8627450980392157,0.6666666666666666,0.5176470588235295,1);\n  const float e4 = 0.7;\n  const vec4 v4 = vec4(0.9019607843137255,0.5686274509803921,0.35294117647058826,1);\n  const float e5 = 1.0;\n  const vec4 v5 = vec4(0.6980392156862745,0.0392156862745098,0.10980392156862745,1);\n  float a0 = smoothstep(e0,e1,x_23);\n  float a1 = smoothstep(e1,e2,x_23);\n  float a2 = smoothstep(e2,e3,x_23);\n  float a3 = smoothstep(e3,e4,x_23);\n  float a4 = smoothstep(e4,e5,x_23);\n  return max(mix(v0,v1,a0)*step(e0,x_23)*step(x_23,e1),\n    max(mix(v1,v2,a1)*step(e1,x_23)*step(x_23,e2),\n    max(mix(v2,v3,a2)*step(e2,x_23)*step(x_23,e3),\n    max(mix(v3,v4,a3)*step(e3,x_23)*step(x_23,e4),mix(v4,v5,a4)*step(e4,x_23)*step(x_23,e5)\n  ))));\n}\n\nvec4 picnic (float x_42) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,1,1);\n  const float e1 = 0.1;\n  const vec4 v1 = vec4(0.2,0.6,1,1);\n  const float e2 = 0.2;\n  const vec4 v2 = vec4(0.4,0.8,1,1);\n  const float e3 = 0.3;\n  const vec4 v3 = vec4(0.6,0.8,1,1);\n  const float e4 = 0.4;\n  const vec4 v4 = vec4(0.8,0.8,1,1);\n  const float e5 = 0.5;\n  const vec4 v5 = vec4(1,1,1,1);\n  const float e6 = 0.6;\n  const vec4 v6 = vec4(1,0.8,1,1);\n  const float e7 = 0.7;\n  const vec4 v7 = vec4(1,0.6,1,1);\n  const float e8 = 0.8;\n  const vec4 v8 = vec4(1,0.4,0.8,1);\n  const float e9 = 0.9;\n  const vec4 v9 = vec4(1,0.4,0.4,1);\n  const float e10 = 1.0;\n  const vec4 v10 = vec4(1,0,0,1);\n  float a0 = smoothstep(e0,e1,x_42);\n  float a1 = smoothstep(e1,e2,x_42);\n  float a2 = smoothstep(e2,e3,x_42);\n  float a3 = smoothstep(e3,e4,x_42);\n  float a4 = smoothstep(e4,e5,x_42);\n  float a5 = smoothstep(e5,e6,x_42);\n  float a6 = smoothstep(e6,e7,x_42);\n  float a7 = smoothstep(e7,e8,x_42);\n  float a8 = smoothstep(e8,e9,x_42);\n  float a9 = smoothstep(e9,e10,x_42);\n  return max(mix(v0,v1,a0)*step(e0,x_42)*step(x_42,e1),\n    max(mix(v1,v2,a1)*step(e1,x_42)*step(x_42,e2),\n    max(mix(v2,v3,a2)*step(e2,x_42)*step(x_42,e3),\n    max(mix(v3,v4,a3)*step(e3,x_42)*step(x_42,e4),\n    max(mix(v4,v5,a4)*step(e4,x_42)*step(x_42,e5),\n    max(mix(v5,v6,a5)*step(e5,x_42)*step(x_42,e6),\n    max(mix(v6,v7,a6)*step(e6,x_42)*step(x_42,e7),\n    max(mix(v7,v8,a7)*step(e7,x_42)*step(x_42,e8),\n    max(mix(v8,v9,a8)*step(e8,x_42)*step(x_42,e9),mix(v9,v10,a9)*step(e9,x_42)*step(x_42,e10)\n  )))))))));\n}\n\nvec4 rainbow (float x_31) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.5882352941176471,0,0.35294117647058826,1);\n  const float e1 = 0.125;\n  const vec4 v1 = vec4(0,0,0.7843137254901961,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0,0.09803921568627451,1,1);\n  const float e3 = 0.375;\n  const vec4 v3 = vec4(0,0.596078431372549,1,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.17254901960784313,1,0.5882352941176471,1);\n  const float e5 = 0.625;\n  const vec4 v5 = vec4(0.592156862745098,1,0,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(1,0.9176470588235294,0,1);\n  const float e7 = 0.875;\n  const vec4 v7 = vec4(1,0.43529411764705883,0,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(1,0,0,1);\n  float a0 = smoothstep(e0,e1,x_31);\n  float a1 = smoothstep(e1,e2,x_31);\n  float a2 = smoothstep(e2,e3,x_31);\n  float a3 = smoothstep(e3,e4,x_31);\n  float a4 = smoothstep(e4,e5,x_31);\n  float a5 = smoothstep(e5,e6,x_31);\n  float a6 = smoothstep(e6,e7,x_31);\n  float a7 = smoothstep(e7,e8,x_31);\n  return max(mix(v0,v1,a0)*step(e0,x_31)*step(x_31,e1),\n    max(mix(v1,v2,a1)*step(e1,x_31)*step(x_31,e2),\n    max(mix(v2,v3,a2)*step(e2,x_31)*step(x_31,e3),\n    max(mix(v3,v4,a3)*step(e3,x_31)*step(x_31,e4),\n    max(mix(v4,v5,a4)*step(e4,x_31)*step(x_31,e5),\n    max(mix(v5,v6,a5)*step(e5,x_31)*step(x_31,e6),\n    max(mix(v6,v7,a6)*step(e6,x_31)*step(x_31,e7),mix(v7,v8,a7)*step(e7,x_31)*step(x_31,e8)\n  )))))));\n}\n\nvec4 portland (float x_38) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.047058823529411764,0.2,0.5137254901960784,1);\n  const float e1 = 0.25;\n  const vec4 v1 = vec4(0.0392156862745098,0.5333333333333333,0.7294117647058823,1);\n  const float e2 = 0.5;\n  const vec4 v2 = vec4(0.9490196078431372,0.8274509803921568,0.2196078431372549,1);\n  const float e3 = 0.75;\n  const vec4 v3 = vec4(0.9490196078431372,0.5607843137254902,0.2196078431372549,1);\n  const float e4 = 1.0;\n  const vec4 v4 = vec4(0.8509803921568627,0.11764705882352941,0.11764705882352941,1);\n  float a0 = smoothstep(e0,e1,x_38);\n  float a1 = smoothstep(e1,e2,x_38);\n  float a2 = smoothstep(e2,e3,x_38);\n  float a3 = smoothstep(e3,e4,x_38);\n  return max(mix(v0,v1,a0)*step(e0,x_38)*step(x_38,e1),\n    max(mix(v1,v2,a1)*step(e1,x_38)*step(x_38,e2),\n    max(mix(v2,v3,a2)*step(e2,x_38)*step(x_38,e3),mix(v3,v4,a3)*step(e3,x_38)*step(x_38,e4)\n  )));\n}\n\nvec4 blackbody (float x_1) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.2;\n  const vec4 v1 = vec4(0.9019607843137255,0,0,1);\n  const float e2 = 0.4;\n  const vec4 v2 = vec4(0.9019607843137255,0.8235294117647058,0,1);\n  const float e3 = 0.7;\n  const vec4 v3 = vec4(1,1,1,1);\n  const float e4 = 1.0;\n  const vec4 v4 = vec4(0.6274509803921569,0.7843137254901961,1,1);\n  float a0 = smoothstep(e0,e1,x_1);\n  float a1 = smoothstep(e1,e2,x_1);\n  float a2 = smoothstep(e2,e3,x_1);\n  float a3 = smoothstep(e3,e4,x_1);\n  return max(mix(v0,v1,a0)*step(e0,x_1)*step(x_1,e1),\n    max(mix(v1,v2,a1)*step(e1,x_1)*step(x_1,e2),\n    max(mix(v2,v3,a2)*step(e2,x_1)*step(x_1,e3),mix(v3,v4,a3)*step(e3,x_1)*step(x_1,e4)\n  )));\n}\n\nvec4 earth (float x_9) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.5098039215686274,1);\n  const float e1 = 0.1;\n  const vec4 v1 = vec4(0,0.7058823529411765,0.7058823529411765,1);\n  const float e2 = 0.2;\n  const vec4 v2 = vec4(0.1568627450980392,0.8235294117647058,0.1568627450980392,1);\n  const float e3 = 0.4;\n  const vec4 v3 = vec4(0.9019607843137255,0.9019607843137255,0.19607843137254902,1);\n  const float e4 = 0.6;\n  const vec4 v4 = vec4(0.47058823529411764,0.27450980392156865,0.0784313725490196,1);\n  const float e5 = 1.0;\n  const vec4 v5 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_9);\n  float a1 = smoothstep(e1,e2,x_9);\n  float a2 = smoothstep(e2,e3,x_9);\n  float a3 = smoothstep(e3,e4,x_9);\n  float a4 = smoothstep(e4,e5,x_9);\n  return max(mix(v0,v1,a0)*step(e0,x_9)*step(x_9,e1),\n    max(mix(v1,v2,a1)*step(e1,x_9)*step(x_9,e2),\n    max(mix(v2,v3,a2)*step(e2,x_9)*step(x_9,e3),\n    max(mix(v3,v4,a3)*step(e3,x_9)*step(x_9,e4),mix(v4,v5,a4)*step(e4,x_9)*step(x_9,e5)\n  ))));\n}\n\nvec4 electric (float x_3) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.15;\n  const vec4 v1 = vec4(0.11764705882352941,0,0.39215686274509803,1);\n  const float e2 = 0.4;\n  const vec4 v2 = vec4(0.47058823529411764,0,0.39215686274509803,1);\n  const float e3 = 0.6;\n  const vec4 v3 = vec4(0.6274509803921569,0.35294117647058826,0,1);\n  const float e4 = 0.8;\n  const vec4 v4 = vec4(0.9019607843137255,0.7843137254901961,0,1);\n  const float e5 = 1.0;\n  const vec4 v5 = vec4(1,0.9803921568627451,0.8627450980392157,1);\n  float a0 = smoothstep(e0,e1,x_3);\n  float a1 = smoothstep(e1,e2,x_3);\n  float a2 = smoothstep(e2,e3,x_3);\n  float a3 = smoothstep(e3,e4,x_3);\n  float a4 = smoothstep(e4,e5,x_3);\n  return max(mix(v0,v1,a0)*step(e0,x_3)*step(x_3,e1),\n    max(mix(v1,v2,a1)*step(e1,x_3)*step(x_3,e2),\n    max(mix(v2,v3,a2)*step(e2,x_3)*step(x_3,e3),\n    max(mix(v3,v4,a3)*step(e3,x_3)*step(x_3,e4),mix(v4,v5,a4)*step(e4,x_3)*step(x_3,e5)\n  ))));\n}\n\nvec4 alpha (float x_0) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(1,1,1,0);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_0);\n  return mix(v0,v1,a0)*step(e0,x_0)*step(x_0,e1);\n}\n\nvec4 viridis (float x_29) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.26666666666666666,0.00392156862745098,0.32941176470588235,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.2784313725490196,0.17254901960784313,0.47843137254901963,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.23137254901960785,0.3176470588235294,0.5450980392156862,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.17254901960784313,0.44313725490196076,0.5568627450980392,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.12941176470588237,0.5647058823529412,0.5529411764705883,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.15294117647058825,0.6784313725490196,0.5058823529411764,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.3607843137254902,0.7843137254901961,0.38823529411764707,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.6666666666666666,0.8627450980392157,0.19607843137254902,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9921568627450981,0.9058823529411765,0.1450980392156863,1);\n  float a0 = smoothstep(e0,e1,x_29);\n  float a1 = smoothstep(e1,e2,x_29);\n  float a2 = smoothstep(e2,e3,x_29);\n  float a3 = smoothstep(e3,e4,x_29);\n  float a4 = smoothstep(e4,e5,x_29);\n  float a5 = smoothstep(e5,e6,x_29);\n  float a6 = smoothstep(e6,e7,x_29);\n  float a7 = smoothstep(e7,e8,x_29);\n  return max(mix(v0,v1,a0)*step(e0,x_29)*step(x_29,e1),\n    max(mix(v1,v2,a1)*step(e1,x_29)*step(x_29,e2),\n    max(mix(v2,v3,a2)*step(e2,x_29)*step(x_29,e3),\n    max(mix(v3,v4,a3)*step(e3,x_29)*step(x_29,e4),\n    max(mix(v4,v5,a4)*step(e4,x_29)*step(x_29,e5),\n    max(mix(v5,v6,a5)*step(e5,x_29)*step(x_29,e6),\n    max(mix(v6,v7,a6)*step(e6,x_29)*step(x_29,e7),mix(v7,v8,a7)*step(e7,x_29)*step(x_29,e8)\n  )))))));\n}\n\nvec4 inferno (float x_14) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.12156862745098039,0.047058823529411764,0.2823529411764706,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.3333333333333333,0.058823529411764705,0.42745098039215684,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.5333333333333333,0.13333333333333333,0.41568627450980394,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.7294117647058823,0.21176470588235294,0.3333333333333333,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8901960784313725,0.34901960784313724,0.2,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.9764705882352941,0.5490196078431373,0.0392156862745098,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9764705882352941,0.788235294117647,0.19607843137254902,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9882352941176471,1,0.6431372549019608,1);\n  float a0 = smoothstep(e0,e1,x_14);\n  float a1 = smoothstep(e1,e2,x_14);\n  float a2 = smoothstep(e2,e3,x_14);\n  float a3 = smoothstep(e3,e4,x_14);\n  float a4 = smoothstep(e4,e5,x_14);\n  float a5 = smoothstep(e5,e6,x_14);\n  float a6 = smoothstep(e6,e7,x_14);\n  float a7 = smoothstep(e7,e8,x_14);\n  return max(mix(v0,v1,a0)*step(e0,x_14)*step(x_14,e1),\n    max(mix(v1,v2,a1)*step(e1,x_14)*step(x_14,e2),\n    max(mix(v2,v3,a2)*step(e2,x_14)*step(x_14,e3),\n    max(mix(v3,v4,a3)*step(e3,x_14)*step(x_14,e4),\n    max(mix(v4,v5,a4)*step(e4,x_14)*step(x_14,e5),\n    max(mix(v5,v6,a5)*step(e5,x_14)*step(x_14,e6),\n    max(mix(v6,v7,a6)*step(e6,x_14)*step(x_14,e7),mix(v7,v8,a7)*step(e7,x_14)*step(x_14,e8)\n  )))))));\n}\n\nvec4 magma (float x_22) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.10980392156862745,0.06274509803921569,0.26666666666666666,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.30980392156862746,0.07058823529411765,0.4823529411764706,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.5058823529411764,0.1450980392156863,0.5058823529411764,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.7098039215686275,0.21176470588235294,0.47843137254901963,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8980392156862745,0.3137254901960784,0.39215686274509803,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.984313725490196,0.5294117647058824,0.3803921568627451,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.996078431372549,0.7607843137254902,0.5294117647058824,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9882352941176471,0.9921568627450981,0.7490196078431373,1);\n  float a0 = smoothstep(e0,e1,x_22);\n  float a1 = smoothstep(e1,e2,x_22);\n  float a2 = smoothstep(e2,e3,x_22);\n  float a3 = smoothstep(e3,e4,x_22);\n  float a4 = smoothstep(e4,e5,x_22);\n  float a5 = smoothstep(e5,e6,x_22);\n  float a6 = smoothstep(e6,e7,x_22);\n  float a7 = smoothstep(e7,e8,x_22);\n  return max(mix(v0,v1,a0)*step(e0,x_22)*step(x_22,e1),\n    max(mix(v1,v2,a1)*step(e1,x_22)*step(x_22,e2),\n    max(mix(v2,v3,a2)*step(e2,x_22)*step(x_22,e3),\n    max(mix(v3,v4,a3)*step(e3,x_22)*step(x_22,e4),\n    max(mix(v4,v5,a4)*step(e4,x_22)*step(x_22,e5),\n    max(mix(v5,v6,a5)*step(e5,x_22)*step(x_22,e6),\n    max(mix(v6,v7,a6)*step(e6,x_22)*step(x_22,e7),mix(v7,v8,a7)*step(e7,x_22)*step(x_22,e8)\n  )))))));\n}\n\nvec4 plasma (float x_33) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.050980392156862744,0.03137254901960784,0.5294117647058824,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.29411764705882354,0.011764705882352941,0.6313725490196078,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.49019607843137253,0.011764705882352941,0.6588235294117647,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.6588235294117647,0.13333333333333333,0.5882352941176471,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.796078431372549,0.27450980392156865,0.4745098039215686,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8980392156862745,0.4196078431372549,0.36470588235294116,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.9725490196078431,0.5803921568627451,0.2549019607843137,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9921568627450981,0.7647058823529411,0.1568627450980392,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9411764705882353,0.9764705882352941,0.12941176470588237,1);\n  float a0 = smoothstep(e0,e1,x_33);\n  float a1 = smoothstep(e1,e2,x_33);\n  float a2 = smoothstep(e2,e3,x_33);\n  float a3 = smoothstep(e3,e4,x_33);\n  float a4 = smoothstep(e4,e5,x_33);\n  float a5 = smoothstep(e5,e6,x_33);\n  float a6 = smoothstep(e6,e7,x_33);\n  float a7 = smoothstep(e7,e8,x_33);\n  return max(mix(v0,v1,a0)*step(e0,x_33)*step(x_33,e1),\n    max(mix(v1,v2,a1)*step(e1,x_33)*step(x_33,e2),\n    max(mix(v2,v3,a2)*step(e2,x_33)*step(x_33,e3),\n    max(mix(v3,v4,a3)*step(e3,x_33)*step(x_33,e4),\n    max(mix(v4,v5,a4)*step(e4,x_33)*step(x_33,e5),\n    max(mix(v5,v6,a5)*step(e5,x_33)*step(x_33,e6),\n    max(mix(v6,v7,a6)*step(e6,x_33)*step(x_33,e7),mix(v7,v8,a7)*step(e7,x_33)*step(x_33,e8)\n  )))))));\n}\n\nvec4 warm (float x_30) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.49019607843137253,0,0.7019607843137254,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.6745098039215687,0,0.7333333333333333,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.8588235294117647,0,0.6666666666666666,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(1,0,0.5098039215686274,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(1,0.24705882352941178,0.2901960784313726,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(1,0.4823529411764706,0,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.9176470588235294,0.6901960784313725,0,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.7450980392156863,0.8941176470588236,0,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.5764705882352941,1,0,1);\n  float a0 = smoothstep(e0,e1,x_30);\n  float a1 = smoothstep(e1,e2,x_30);\n  float a2 = smoothstep(e2,e3,x_30);\n  float a3 = smoothstep(e3,e4,x_30);\n  float a4 = smoothstep(e4,e5,x_30);\n  float a5 = smoothstep(e5,e6,x_30);\n  float a6 = smoothstep(e6,e7,x_30);\n  float a7 = smoothstep(e7,e8,x_30);\n  return max(mix(v0,v1,a0)*step(e0,x_30)*step(x_30,e1),\n    max(mix(v1,v2,a1)*step(e1,x_30)*step(x_30,e2),\n    max(mix(v2,v3,a2)*step(e2,x_30)*step(x_30,e3),\n    max(mix(v3,v4,a3)*step(e3,x_30)*step(x_30,e4),\n    max(mix(v4,v5,a4)*step(e4,x_30)*step(x_30,e5),\n    max(mix(v5,v6,a5)*step(e5,x_30)*step(x_30,e6),\n    max(mix(v6,v7,a6)*step(e6,x_30)*step(x_30,e7),mix(v7,v8,a7)*step(e7,x_30)*step(x_30,e8)\n  )))))));\n}\n\nvec4 rainbow_soft_3159362690 (float x_36) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.49019607843137253,0,0.7019607843137254,1);\n  const float e1 = 0.1;\n  const vec4 v1 = vec4(0.7803921568627451,0,0.7058823529411765,1);\n  const float e2 = 0.2;\n  const vec4 v2 = vec4(1,0,0.4745098039215686,1);\n  const float e3 = 0.3;\n  const vec4 v3 = vec4(1,0.4235294117647059,0,1);\n  const float e4 = 0.4;\n  const vec4 v4 = vec4(0.8705882352941177,0.7607843137254902,0,1);\n  const float e5 = 0.5;\n  const vec4 v5 = vec4(0.5882352941176471,1,0,1);\n  const float e6 = 0.6;\n  const vec4 v6 = vec4(0,1,0.21568627450980393,1);\n  const float e7 = 0.7;\n  const vec4 v7 = vec4(0,0.9647058823529412,0.5882352941176471,1);\n  const float e8 = 0.8;\n  const vec4 v8 = vec4(0.19607843137254902,0.6549019607843137,0.8705882352941177,1);\n  const float e9 = 0.9;\n  const vec4 v9 = vec4(0.403921568627451,0.2,0.9215686274509803,1);\n  const float e10 = 1.0;\n  const vec4 v10 = vec4(0.48627450980392156,0,0.7294117647058823,1);\n  float a0 = smoothstep(e0,e1,x_36);\n  float a1 = smoothstep(e1,e2,x_36);\n  float a2 = smoothstep(e2,e3,x_36);\n  float a3 = smoothstep(e3,e4,x_36);\n  float a4 = smoothstep(e4,e5,x_36);\n  float a5 = smoothstep(e5,e6,x_36);\n  float a6 = smoothstep(e6,e7,x_36);\n  float a7 = smoothstep(e7,e8,x_36);\n  float a8 = smoothstep(e8,e9,x_36);\n  float a9 = smoothstep(e9,e10,x_36);\n  return max(mix(v0,v1,a0)*step(e0,x_36)*step(x_36,e1),\n    max(mix(v1,v2,a1)*step(e1,x_36)*step(x_36,e2),\n    max(mix(v2,v3,a2)*step(e2,x_36)*step(x_36,e3),\n    max(mix(v3,v4,a3)*step(e3,x_36)*step(x_36,e4),\n    max(mix(v4,v5,a4)*step(e4,x_36)*step(x_36,e5),\n    max(mix(v5,v6,a5)*step(e5,x_36)*step(x_36,e6),\n    max(mix(v6,v7,a6)*step(e6,x_36)*step(x_36,e7),\n    max(mix(v7,v8,a7)*step(e7,x_36)*step(x_36,e8),\n    max(mix(v8,v9,a8)*step(e8,x_36)*step(x_36,e9),mix(v9,v10,a9)*step(e9,x_36)*step(x_36,e10)\n  )))))))));\n}\n\nvec4 bathymetry (float x_43) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.1568627450980392,0.10196078431372549,0.17254901960784313,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.23137254901960785,0.19215686274509805,0.35294117647058826,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.25098039215686274,0.2980392156862745,0.5450980392156862,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.24705882352941178,0.43137254901960786,0.592156862745098,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.2823529411764706,0.5568627450980392,0.6196078431372549,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.3333333333333333,0.6823529411764706,0.6392156862745098,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.47058823529411764,0.807843137254902,0.6392156862745098,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.7333333333333333,0.9019607843137255,0.6745098039215687,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9921568627450981,0.996078431372549,0.8,1);\n  float a0 = smoothstep(e0,e1,x_43);\n  float a1 = smoothstep(e1,e2,x_43);\n  float a2 = smoothstep(e2,e3,x_43);\n  float a3 = smoothstep(e3,e4,x_43);\n  float a4 = smoothstep(e4,e5,x_43);\n  float a5 = smoothstep(e5,e6,x_43);\n  float a6 = smoothstep(e6,e7,x_43);\n  float a7 = smoothstep(e7,e8,x_43);\n  return max(mix(v0,v1,a0)*step(e0,x_43)*step(x_43,e1),\n    max(mix(v1,v2,a1)*step(e1,x_43)*step(x_43,e2),\n    max(mix(v2,v3,a2)*step(e2,x_43)*step(x_43,e3),\n    max(mix(v3,v4,a3)*step(e3,x_43)*step(x_43,e4),\n    max(mix(v4,v5,a4)*step(e4,x_43)*step(x_43,e5),\n    max(mix(v5,v6,a5)*step(e5,x_43)*step(x_43,e6),\n    max(mix(v6,v7,a6)*step(e6,x_43)*step(x_43,e7),mix(v7,v8,a7)*step(e7,x_43)*step(x_43,e8)\n  )))))));\n}\n\nvec4 cdom (float x_7) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.1843137254901961,0.058823529411764705,0.24313725490196078,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.3411764705882353,0.09019607843137255,0.33725490196078434,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.5098039215686274,0.10980392156862745,0.38823529411764707,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.6705882352941176,0.1607843137254902,0.3764705882352941,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.807843137254902,0.2627450980392157,0.33725490196078434,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.9019607843137255,0.41568627450980394,0.32941176470588235,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.9490196078431372,0.5843137254901961,0.403921568627451,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9764705882352941,0.7568627450980392,0.5294117647058824,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.996078431372549,0.9294117647058824,0.6901960784313725,1);\n  float a0 = smoothstep(e0,e1,x_7);\n  float a1 = smoothstep(e1,e2,x_7);\n  float a2 = smoothstep(e2,e3,x_7);\n  float a3 = smoothstep(e3,e4,x_7);\n  float a4 = smoothstep(e4,e5,x_7);\n  float a5 = smoothstep(e5,e6,x_7);\n  float a6 = smoothstep(e6,e7,x_7);\n  float a7 = smoothstep(e7,e8,x_7);\n  return max(mix(v0,v1,a0)*step(e0,x_7)*step(x_7,e1),\n    max(mix(v1,v2,a1)*step(e1,x_7)*step(x_7,e2),\n    max(mix(v2,v3,a2)*step(e2,x_7)*step(x_7,e3),\n    max(mix(v3,v4,a3)*step(e3,x_7)*step(x_7,e4),\n    max(mix(v4,v5,a4)*step(e4,x_7)*step(x_7,e5),\n    max(mix(v5,v6,a5)*step(e5,x_7)*step(x_7,e6),\n    max(mix(v6,v7,a6)*step(e6,x_7)*step(x_7,e7),mix(v7,v8,a7)*step(e7,x_7)*step(x_7,e8)\n  )))))));\n}\n\nvec4 chlorophyll (float x_6) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.07058823529411765,0.1411764705882353,0.0784313725490196,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.09803921568627451,0.24705882352941178,0.1607843137254902,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.09411764705882353,0.3568627450980392,0.23137254901960785,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.050980392156862744,0.4666666666666667,0.2823529411764706,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.07058823529411765,0.5803921568627451,0.3137254901960784,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.3137254901960784,0.6784313725490196,0.34901960784313724,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.5176470588235295,0.7686274509803922,0.47843137254901963,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.6862745098039216,0.8666666666666667,0.6352941176470588,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.8431372549019608,0.9764705882352941,0.8156862745098039,1);\n  float a0 = smoothstep(e0,e1,x_6);\n  float a1 = smoothstep(e1,e2,x_6);\n  float a2 = smoothstep(e2,e3,x_6);\n  float a3 = smoothstep(e3,e4,x_6);\n  float a4 = smoothstep(e4,e5,x_6);\n  float a5 = smoothstep(e5,e6,x_6);\n  float a6 = smoothstep(e6,e7,x_6);\n  float a7 = smoothstep(e7,e8,x_6);\n  return max(mix(v0,v1,a0)*step(e0,x_6)*step(x_6,e1),\n    max(mix(v1,v2,a1)*step(e1,x_6)*step(x_6,e2),\n    max(mix(v2,v3,a2)*step(e2,x_6)*step(x_6,e3),\n    max(mix(v3,v4,a3)*step(e3,x_6)*step(x_6,e4),\n    max(mix(v4,v5,a4)*step(e4,x_6)*step(x_6,e5),\n    max(mix(v5,v6,a5)*step(e5,x_6)*step(x_6,e6),\n    max(mix(v6,v7,a6)*step(e6,x_6)*step(x_6,e7),mix(v7,v8,a7)*step(e7,x_6)*step(x_6,e8)\n  )))))));\n}\n\nvec4 density (float x_35) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.21176470588235294,0.054901960784313725,0.1411764705882353,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.34901960784313724,0.09019607843137255,0.3137254901960784,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.43137254901960786,0.17647058823529413,0.5176470588235295,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.47058823529411764,0.30196078431372547,0.6980392156862745,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.47058823529411764,0.44313725490196076,0.8352941176470589,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.45098039215686275,0.592156862745098,0.8941176470588236,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.5254901960784314,0.7254901960784313,0.8901960784313725,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.6941176470588235,0.8392156862745098,0.8901960784313725,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9019607843137255,0.9450980392156862,0.9450980392156862,1);\n  float a0 = smoothstep(e0,e1,x_35);\n  float a1 = smoothstep(e1,e2,x_35);\n  float a2 = smoothstep(e2,e3,x_35);\n  float a3 = smoothstep(e3,e4,x_35);\n  float a4 = smoothstep(e4,e5,x_35);\n  float a5 = smoothstep(e5,e6,x_35);\n  float a6 = smoothstep(e6,e7,x_35);\n  float a7 = smoothstep(e7,e8,x_35);\n  return max(mix(v0,v1,a0)*step(e0,x_35)*step(x_35,e1),\n    max(mix(v1,v2,a1)*step(e1,x_35)*step(x_35,e2),\n    max(mix(v2,v3,a2)*step(e2,x_35)*step(x_35,e3),\n    max(mix(v3,v4,a3)*step(e3,x_35)*step(x_35,e4),\n    max(mix(v4,v5,a4)*step(e4,x_35)*step(x_35,e5),\n    max(mix(v5,v6,a5)*step(e5,x_35)*step(x_35,e6),\n    max(mix(v6,v7,a6)*step(e6,x_35)*step(x_35,e7),mix(v7,v8,a7)*step(e7,x_35)*step(x_35,e8)\n  )))))));\n}\n\nvec4 freesurface_blue_1632212877 (float x_19) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.11764705882352941,0.01568627450980392,0.43137254901960786,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.1843137254901961,0.054901960784313725,0.6901960784313725,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.1607843137254902,0.17647058823529413,0.9254901960784314,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.09803921568627451,0.38823529411764707,0.8313725490196079,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.26666666666666666,0.5137254901960784,0.7843137254901961,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.4470588235294118,0.611764705882353,0.7725490196078432,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.615686274509804,0.7098039215686275,0.796078431372549,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.7843137254901961,0.8156862745098039,0.8470588235294118,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9450980392156862,0.9294117647058824,0.9254901960784314,1);\n  float a0 = smoothstep(e0,e1,x_19);\n  float a1 = smoothstep(e1,e2,x_19);\n  float a2 = smoothstep(e2,e3,x_19);\n  float a3 = smoothstep(e3,e4,x_19);\n  float a4 = smoothstep(e4,e5,x_19);\n  float a5 = smoothstep(e5,e6,x_19);\n  float a6 = smoothstep(e6,e7,x_19);\n  float a7 = smoothstep(e7,e8,x_19);\n  return max(mix(v0,v1,a0)*step(e0,x_19)*step(x_19,e1),\n    max(mix(v1,v2,a1)*step(e1,x_19)*step(x_19,e2),\n    max(mix(v2,v3,a2)*step(e2,x_19)*step(x_19,e3),\n    max(mix(v3,v4,a3)*step(e3,x_19)*step(x_19,e4),\n    max(mix(v4,v5,a4)*step(e4,x_19)*step(x_19,e5),\n    max(mix(v5,v6,a5)*step(e5,x_19)*step(x_19,e6),\n    max(mix(v6,v7,a6)*step(e6,x_19)*step(x_19,e7),mix(v7,v8,a7)*step(e7,x_19)*step(x_19,e8)\n  )))))));\n}\n\nvec4 freesurface_red_1679163293 (float x_20) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.23529411764705882,0.03529411764705882,0.07058823529411765,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.39215686274509803,0.06666666666666667,0.10588235294117647,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.5568627450980392,0.0784313725490196,0.11372549019607843,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.6941176470588235,0.16862745098039217,0.10588235294117647,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.7529411764705882,0.3411764705882353,0.24705882352941178,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.803921568627451,0.49019607843137253,0.4117647058823529,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.8470588235294118,0.6352941176470588,0.5803921568627451,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.8901960784313725,0.7803921568627451,0.7568627450980392,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9450980392156862,0.9294117647058824,0.9254901960784314,1);\n  float a0 = smoothstep(e0,e1,x_20);\n  float a1 = smoothstep(e1,e2,x_20);\n  float a2 = smoothstep(e2,e3,x_20);\n  float a3 = smoothstep(e3,e4,x_20);\n  float a4 = smoothstep(e4,e5,x_20);\n  float a5 = smoothstep(e5,e6,x_20);\n  float a6 = smoothstep(e6,e7,x_20);\n  float a7 = smoothstep(e7,e8,x_20);\n  return max(mix(v0,v1,a0)*step(e0,x_20)*step(x_20,e1),\n    max(mix(v1,v2,a1)*step(e1,x_20)*step(x_20,e2),\n    max(mix(v2,v3,a2)*step(e2,x_20)*step(x_20,e3),\n    max(mix(v3,v4,a3)*step(e3,x_20)*step(x_20,e4),\n    max(mix(v4,v5,a4)*step(e4,x_20)*step(x_20,e5),\n    max(mix(v5,v6,a5)*step(e5,x_20)*step(x_20,e6),\n    max(mix(v6,v7,a6)*step(e6,x_20)*step(x_20,e7),mix(v7,v8,a7)*step(e7,x_20)*step(x_20,e8)\n  )))))));\n}\n\nvec4 oxygen (float x_28) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.25098039215686274,0.0196078431372549,0.0196078431372549,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.41568627450980394,0.023529411764705882,0.058823529411764705,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.5647058823529412,0.10196078431372549,0.027450980392156862,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.6588235294117647,0.25098039215686274,0.011764705882352941,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.7372549019607844,0.39215686274509803,0.01568627450980392,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.807843137254902,0.5333333333333333,0.043137254901960784,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.8627450980392157,0.6823529411764706,0.09803921568627451,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9058823529411765,0.8431372549019608,0.17254901960784313,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9725490196078431,0.996078431372549,0.4117647058823529,1);\n  float a0 = smoothstep(e0,e1,x_28);\n  float a1 = smoothstep(e1,e2,x_28);\n  float a2 = smoothstep(e2,e3,x_28);\n  float a3 = smoothstep(e3,e4,x_28);\n  float a4 = smoothstep(e4,e5,x_28);\n  float a5 = smoothstep(e5,e6,x_28);\n  float a6 = smoothstep(e6,e7,x_28);\n  float a7 = smoothstep(e7,e8,x_28);\n  return max(mix(v0,v1,a0)*step(e0,x_28)*step(x_28,e1),\n    max(mix(v1,v2,a1)*step(e1,x_28)*step(x_28,e2),\n    max(mix(v2,v3,a2)*step(e2,x_28)*step(x_28,e3),\n    max(mix(v3,v4,a3)*step(e3,x_28)*step(x_28,e4),\n    max(mix(v4,v5,a4)*step(e4,x_28)*step(x_28,e5),\n    max(mix(v5,v6,a5)*step(e5,x_28)*step(x_28,e6),\n    max(mix(v6,v7,a6)*step(e6,x_28)*step(x_28,e7),mix(v7,v8,a7)*step(e7,x_28)*step(x_28,e8)\n  )))))));\n}\n\nvec4 par (float x_11) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.2,0.0784313725490196,0.09411764705882353,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.35294117647058826,0.12549019607843137,0.13725490196078433,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.5058823529411764,0.17254901960784313,0.13333333333333333,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.6235294117647059,0.26666666666666666,0.09803921568627451,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.7137254901960784,0.38823529411764707,0.07450980392156863,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.7803921568627451,0.5254901960784314,0.08627450980392157,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.8313725490196079,0.6705882352941176,0.13725490196078433,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.8666666666666667,0.8235294117647058,0.21176470588235294,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.8823529411764706,0.9921568627450981,0.29411764705882354,1);\n  float a0 = smoothstep(e0,e1,x_11);\n  float a1 = smoothstep(e1,e2,x_11);\n  float a2 = smoothstep(e2,e3,x_11);\n  float a3 = smoothstep(e3,e4,x_11);\n  float a4 = smoothstep(e4,e5,x_11);\n  float a5 = smoothstep(e5,e6,x_11);\n  float a6 = smoothstep(e6,e7,x_11);\n  float a7 = smoothstep(e7,e8,x_11);\n  return max(mix(v0,v1,a0)*step(e0,x_11)*step(x_11,e1),\n    max(mix(v1,v2,a1)*step(e1,x_11)*step(x_11,e2),\n    max(mix(v2,v3,a2)*step(e2,x_11)*step(x_11,e3),\n    max(mix(v3,v4,a3)*step(e3,x_11)*step(x_11,e4),\n    max(mix(v4,v5,a4)*step(e4,x_11)*step(x_11,e5),\n    max(mix(v5,v6,a5)*step(e5,x_11)*step(x_11,e6),\n    max(mix(v6,v7,a6)*step(e6,x_11)*step(x_11,e7),mix(v7,v8,a7)*step(e7,x_11)*step(x_11,e8)\n  )))))));\n}\n\nvec4 phase (float x_39) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.5686274509803921,0.4117647058823529,0.07058823529411765,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.7215686274509804,0.2784313725490196,0.14901960784313725,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.7294117647058823,0.22745098039215686,0.45098039215686275,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.6274509803921569,0.2784313725490196,0.7254901960784313,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.43137254901960786,0.3803921568627451,0.8549019607843137,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.19607843137254902,0.4823529411764706,0.6431372549019608,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.12156862745098039,0.5137254901960784,0.43137254901960786,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.30196078431372547,0.5058823529411764,0.13333333333333333,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.5686274509803921,0.4117647058823529,0.07058823529411765,1);\n  float a0 = smoothstep(e0,e1,x_39);\n  float a1 = smoothstep(e1,e2,x_39);\n  float a2 = smoothstep(e2,e3,x_39);\n  float a3 = smoothstep(e3,e4,x_39);\n  float a4 = smoothstep(e4,e5,x_39);\n  float a5 = smoothstep(e5,e6,x_39);\n  float a6 = smoothstep(e6,e7,x_39);\n  float a7 = smoothstep(e7,e8,x_39);\n  return max(mix(v0,v1,a0)*step(e0,x_39)*step(x_39,e1),\n    max(mix(v1,v2,a1)*step(e1,x_39)*step(x_39,e2),\n    max(mix(v2,v3,a2)*step(e2,x_39)*step(x_39,e3),\n    max(mix(v3,v4,a3)*step(e3,x_39)*step(x_39,e4),\n    max(mix(v4,v5,a4)*step(e4,x_39)*step(x_39,e5),\n    max(mix(v5,v6,a5)*step(e5,x_39)*step(x_39,e6),\n    max(mix(v6,v7,a6)*step(e6,x_39)*step(x_39,e7),mix(v7,v8,a7)*step(e7,x_39)*step(x_39,e8)\n  )))))));\n}\n\nvec4 salinity (float x_26) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.16470588235294117,0.09411764705882353,0.4235294117647059,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.12941176470588237,0.19607843137254902,0.6352941176470588,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.058823529411764705,0.35294117647058826,0.5686274509803921,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.1568627450980392,0.4627450980392157,0.5372549019607843,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.23137254901960785,0.5725490196078431,0.5294117647058824,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.30980392156862746,0.6862745098039216,0.49411764705882355,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.47058823529411764,0.796078431372549,0.40784313725490196,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.7568627450980392,0.8666666666666667,0.39215686274509803,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9921568627450981,0.9372549019607843,0.6039215686274509,1);\n  float a0 = smoothstep(e0,e1,x_26);\n  float a1 = smoothstep(e1,e2,x_26);\n  float a2 = smoothstep(e2,e3,x_26);\n  float a3 = smoothstep(e3,e4,x_26);\n  float a4 = smoothstep(e4,e5,x_26);\n  float a5 = smoothstep(e5,e6,x_26);\n  float a6 = smoothstep(e6,e7,x_26);\n  float a7 = smoothstep(e7,e8,x_26);\n  return max(mix(v0,v1,a0)*step(e0,x_26)*step(x_26,e1),\n    max(mix(v1,v2,a1)*step(e1,x_26)*step(x_26,e2),\n    max(mix(v2,v3,a2)*step(e2,x_26)*step(x_26,e3),\n    max(mix(v3,v4,a3)*step(e3,x_26)*step(x_26,e4),\n    max(mix(v4,v5,a4)*step(e4,x_26)*step(x_26,e5),\n    max(mix(v5,v6,a5)*step(e5,x_26)*step(x_26,e6),\n    max(mix(v6,v7,a6)*step(e6,x_26)*step(x_26,e7),mix(v7,v8,a7)*step(e7,x_26)*step(x_26,e8)\n  )))))));\n}\n\nvec4 temperature (float x_8) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.01568627450980392,0.13725490196078433,0.2,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.09019607843137255,0.2,0.47843137254901963,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.3333333333333333,0.23137254901960785,0.615686274509804,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.5058823529411764,0.30980392156862746,0.5607843137254902,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.6862745098039216,0.37254901960784315,0.5098039215686274,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8705882352941177,0.4392156862745098,0.396078431372549,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.9764705882352941,0.5725490196078431,0.25882352941176473,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9764705882352941,0.7686274509803922,0.2549019607843137,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9098039215686274,0.9803921568627451,0.3568627450980392,1);\n  float a0 = smoothstep(e0,e1,x_8);\n  float a1 = smoothstep(e1,e2,x_8);\n  float a2 = smoothstep(e2,e3,x_8);\n  float a3 = smoothstep(e3,e4,x_8);\n  float a4 = smoothstep(e4,e5,x_8);\n  float a5 = smoothstep(e5,e6,x_8);\n  float a6 = smoothstep(e6,e7,x_8);\n  float a7 = smoothstep(e7,e8,x_8);\n  return max(mix(v0,v1,a0)*step(e0,x_8)*step(x_8,e1),\n    max(mix(v1,v2,a1)*step(e1,x_8)*step(x_8,e2),\n    max(mix(v2,v3,a2)*step(e2,x_8)*step(x_8,e3),\n    max(mix(v3,v4,a3)*step(e3,x_8)*step(x_8,e4),\n    max(mix(v4,v5,a4)*step(e4,x_8)*step(x_8,e5),\n    max(mix(v5,v6,a5)*step(e5,x_8)*step(x_8,e6),\n    max(mix(v6,v7,a6)*step(e6,x_8)*step(x_8,e7),mix(v7,v8,a7)*step(e7,x_8)*step(x_8,e8)\n  )))))));\n}\n\nvec4 turbidity (float x_27) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.13333333333333333,0.12156862745098039,0.10588235294117647,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.2549019607843137,0.19607843137254902,0.1607843137254902,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.3843137254901961,0.27058823529411763,0.20392156862745098,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.5137254901960784,0.34901960784313724,0.2235294117647059,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.6313725490196078,0.4392156862745098,0.23137254901960785,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.7254901960784313,0.5490196078431373,0.25882352941176473,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.792156862745098,0.6823529411764706,0.34509803921568627,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.8470588235294118,0.8196078431372549,0.49411764705882355,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9137254901960784,0.9647058823529412,0.6705882352941176,1);\n  float a0 = smoothstep(e0,e1,x_27);\n  float a1 = smoothstep(e1,e2,x_27);\n  float a2 = smoothstep(e2,e3,x_27);\n  float a3 = smoothstep(e3,e4,x_27);\n  float a4 = smoothstep(e4,e5,x_27);\n  float a5 = smoothstep(e5,e6,x_27);\n  float a6 = smoothstep(e6,e7,x_27);\n  float a7 = smoothstep(e7,e8,x_27);\n  return max(mix(v0,v1,a0)*step(e0,x_27)*step(x_27,e1),\n    max(mix(v1,v2,a1)*step(e1,x_27)*step(x_27,e2),\n    max(mix(v2,v3,a2)*step(e2,x_27)*step(x_27,e3),\n    max(mix(v3,v4,a3)*step(e3,x_27)*step(x_27,e4),\n    max(mix(v4,v5,a4)*step(e4,x_27)*step(x_27,e5),\n    max(mix(v5,v6,a5)*step(e5,x_27)*step(x_27,e6),\n    max(mix(v6,v7,a6)*step(e6,x_27)*step(x_27,e7),mix(v7,v8,a7)*step(e7,x_27)*step(x_27,e8)\n  )))))));\n}\n\nvec4 velocity_blue_297387650 (float x_2) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.06666666666666667,0.12549019607843137,0.25098039215686274,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.13725490196078433,0.20392156862745098,0.4549019607843137,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.11372549019607843,0.3176470588235294,0.611764705882353,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.12156862745098039,0.44313725490196076,0.6352941176470588,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.19607843137254902,0.5647058823529412,0.6627450980392157,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.3411764705882353,0.6784313725490196,0.6901960784313725,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.5843137254901961,0.7686274509803922,0.7411764705882353,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.796078431372549,0.8666666666666667,0.8274509803921568,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.996078431372549,0.984313725490196,0.9019607843137255,1);\n  float a0 = smoothstep(e0,e1,x_2);\n  float a1 = smoothstep(e1,e2,x_2);\n  float a2 = smoothstep(e2,e3,x_2);\n  float a3 = smoothstep(e3,e4,x_2);\n  float a4 = smoothstep(e4,e5,x_2);\n  float a5 = smoothstep(e5,e6,x_2);\n  float a6 = smoothstep(e6,e7,x_2);\n  float a7 = smoothstep(e7,e8,x_2);\n  return max(mix(v0,v1,a0)*step(e0,x_2)*step(x_2,e1),\n    max(mix(v1,v2,a1)*step(e1,x_2)*step(x_2,e2),\n    max(mix(v2,v3,a2)*step(e2,x_2)*step(x_2,e3),\n    max(mix(v3,v4,a3)*step(e3,x_2)*step(x_2,e4),\n    max(mix(v4,v5,a4)*step(e4,x_2)*step(x_2,e5),\n    max(mix(v5,v6,a5)*step(e5,x_2)*step(x_2,e6),\n    max(mix(v6,v7,a6)*step(e6,x_2)*step(x_2,e7),mix(v7,v8,a7)*step(e7,x_2)*step(x_2,e8)\n  )))))));\n}\n\nvec4 velocity_green_3888592876 (float x_40) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.09019607843137255,0.13725490196078433,0.07450980392156863,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.09411764705882353,0.25098039215686274,0.14901960784313725,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.043137254901960784,0.37254901960784315,0.17647058823529413,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.15294117647058825,0.4823529411764706,0.13725490196078433,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.37254901960784315,0.5725490196078431,0.047058823529411764,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.596078431372549,0.6470588235294118,0.07058823529411765,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.788235294117647,0.7294117647058823,0.27058823529411763,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9137254901960784,0.8470588235294118,0.5372549019607843,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(1,0.9921568627450981,0.803921568627451,1);\n  float a0 = smoothstep(e0,e1,x_40);\n  float a1 = smoothstep(e1,e2,x_40);\n  float a2 = smoothstep(e2,e3,x_40);\n  float a3 = smoothstep(e3,e4,x_40);\n  float a4 = smoothstep(e4,e5,x_40);\n  float a5 = smoothstep(e5,e6,x_40);\n  float a6 = smoothstep(e6,e7,x_40);\n  float a7 = smoothstep(e7,e8,x_40);\n  return max(mix(v0,v1,a0)*step(e0,x_40)*step(x_40,e1),\n    max(mix(v1,v2,a1)*step(e1,x_40)*step(x_40,e2),\n    max(mix(v2,v3,a2)*step(e2,x_40)*step(x_40,e3),\n    max(mix(v3,v4,a3)*step(e3,x_40)*step(x_40,e4),\n    max(mix(v4,v5,a4)*step(e4,x_40)*step(x_40,e5),\n    max(mix(v5,v6,a5)*step(e5,x_40)*step(x_40,e6),\n    max(mix(v6,v7,a6)*step(e6,x_40)*step(x_40,e7),mix(v7,v8,a7)*step(e7,x_40)*step(x_40,e8)\n  )))))));\n}\n\nvec4 cubehelix (float x_37) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.07;\n  const vec4 v1 = vec4(0.08627450980392157,0.0196078431372549,0.23137254901960785,1);\n  const float e2 = 0.13;\n  const vec4 v2 = vec4(0.23529411764705882,0.01568627450980392,0.4117647058823529,1);\n  const float e3 = 0.2;\n  const vec4 v3 = vec4(0.42745098039215684,0.00392156862745098,0.5294117647058824,1);\n  const float e4 = 0.27;\n  const vec4 v4 = vec4(0.6313725490196078,0,0.5764705882352941,1);\n  const float e5 = 0.33;\n  const vec4 v5 = vec4(0.8235294117647058,0.00784313725490196,0.5568627450980392,1);\n  const float e6 = 0.4;\n  const vec4 v6 = vec4(0.984313725490196,0.043137254901960784,0.4823529411764706,1);\n  const float e7 = 0.47;\n  const vec4 v7 = vec4(1,0.11372549019607843,0.3803921568627451,1);\n  const float e8 = 0.53;\n  const vec4 v8 = vec4(1,0.21176470588235294,0.27058823529411763,1);\n  const float e9 = 0.6;\n  const vec4 v9 = vec4(1,0.3333333333333333,0.1803921568627451,1);\n  const float e10 = 0.67;\n  const vec4 v10 = vec4(1,0.47058823529411764,0.13333333333333333,1);\n  const float e11 = 0.73;\n  const vec4 v11 = vec4(1,0.615686274509804,0.1450980392156863,1);\n  const float e12 = 0.8;\n  const vec4 v12 = vec4(0.9450980392156862,0.7490196078431373,0.2235294117647059,1);\n  const float e13 = 0.87;\n  const vec4 v13 = vec4(0.8784313725490196,0.8627450980392157,0.36470588235294116,1);\n  const float e14 = 0.93;\n  const vec4 v14 = vec4(0.8549019607843137,0.9450980392156862,0.5568627450980392,1);\n  const float e15 = 1.0;\n  const vec4 v15 = vec4(0.8901960784313725,0.9921568627450981,0.7764705882352941,1);\n  float a0 = smoothstep(e0,e1,x_37);\n  float a1 = smoothstep(e1,e2,x_37);\n  float a2 = smoothstep(e2,e3,x_37);\n  float a3 = smoothstep(e3,e4,x_37);\n  float a4 = smoothstep(e4,e5,x_37);\n  float a5 = smoothstep(e5,e6,x_37);\n  float a6 = smoothstep(e6,e7,x_37);\n  float a7 = smoothstep(e7,e8,x_37);\n  float a8 = smoothstep(e8,e9,x_37);\n  float a9 = smoothstep(e9,e10,x_37);\n  float a10 = smoothstep(e10,e11,x_37);\n  float a11 = smoothstep(e11,e12,x_37);\n  float a12 = smoothstep(e12,e13,x_37);\n  float a13 = smoothstep(e13,e14,x_37);\n  float a14 = smoothstep(e14,e15,x_37);\n  return max(mix(v0,v1,a0)*step(e0,x_37)*step(x_37,e1),\n    max(mix(v1,v2,a1)*step(e1,x_37)*step(x_37,e2),\n    max(mix(v2,v3,a2)*step(e2,x_37)*step(x_37,e3),\n    max(mix(v3,v4,a3)*step(e3,x_37)*step(x_37,e4),\n    max(mix(v4,v5,a4)*step(e4,x_37)*step(x_37,e5),\n    max(mix(v5,v6,a5)*step(e5,x_37)*step(x_37,e6),\n    max(mix(v6,v7,a6)*step(e6,x_37)*step(x_37,e7),\n    max(mix(v7,v8,a7)*step(e7,x_37)*step(x_37,e8),\n    max(mix(v8,v9,a8)*step(e8,x_37)*step(x_37,e9),\n    max(mix(v9,v10,a9)*step(e9,x_37)*step(x_37,e10),\n    max(mix(v10,v11,a10)*step(e10,x_37)*step(x_37,e11),\n    max(mix(v11,v12,a11)*step(e11,x_37)*step(x_37,e12),\n    max(mix(v12,v13,a12)*step(e12,x_37)*step(x_37,e13),\n    max(mix(v13,v14,a13)*step(e13,x_37)*step(x_37,e14),mix(v14,v15,a14)*step(e14,x_37)*step(x_37,e15)\n  ))))))))))))));\n}\n\n// our texture\nuniform sampler2D channel0;\nuniform sampler2D channel1;\nuniform sampler2D channel2;\nuniform sampler2D channel3;\nuniform sampler2D channel4;\nuniform sampler2D channel5;\n\n// range\nuniform vec2 sliderValues[6];\n\n// opacity\nuniform float opacity;\nuniform float divisor;\n\nvarying vec2 vTexCoord;\n\nvoid main() {\n  float intensityValue0 = (float(texture(channel0, vTexCoord).r) - sliderValues[0][0]) / max(0.0005, (sliderValues[0][1] - sliderValues[0][0]));\n  float intensityValue1 = (float(texture(channel1, vTexCoord).r) - sliderValues[1][0]) / max(0.0005, (sliderValues[1][1] - sliderValues[1][0]));\n  float intensityValue2 = (float(texture(channel2, vTexCoord).r) - sliderValues[2][0]) / max(0.0005, (sliderValues[2][1] - sliderValues[2][0]));\n  float intensityValue3 = (float(texture(channel3, vTexCoord).r) - sliderValues[3][0]) / max(0.0005, (sliderValues[3][1] - sliderValues[3][0]));\n  float intensityValue4 = (float(texture(channel4, vTexCoord).r) - sliderValues[4][0]) / max(0.0005, (sliderValues[4][1] - sliderValues[4][0]));\n  float intensityValue5 = (float(texture(channel5, vTexCoord).r) - sliderValues[5][0]) / max(0.0005, (sliderValues[5][1] - sliderValues[5][0]));\n\n  float intensityCombo = 0.0;\n  \n  intensityCombo += max(0.0,intensityValue0);\n  intensityCombo += max(0.0,intensityValue1);\n  intensityCombo += max(0.0,intensityValue2);\n  intensityCombo += max(0.0,intensityValue3);\n  intensityCombo += max(0.0,intensityValue4);\n  intensityCombo += max(0.0,intensityValue5);\n\n  gl_FragColor = vec4(colormapFunction(min(1.0,intensityCombo)).xyz, opacity);\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n":"#version 300 es\n#define SHADER_NAME xr-layer-fragment-shader\nprecision highp float;\nprecision highp int;\nprecision highp usampler2D;\n#define GLSLIFY 1\n\nvec4 jet (float x_18) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.5137254901960784,1);\n  const float e1 = 0.125;\n  const vec4 v1 = vec4(0,0.23529411764705882,0.6666666666666666,1);\n  const float e2 = 0.375;\n  const vec4 v2 = vec4(0.0196078431372549,1,1,1);\n  const float e3 = 0.625;\n  const vec4 v3 = vec4(1,1,0,1);\n  const float e4 = 0.875;\n  const vec4 v4 = vec4(0.9803921568627451,0,0,1);\n  const float e5 = 1.0;\n  const vec4 v5 = vec4(0.5019607843137255,0,0,1);\n  float a0 = smoothstep(e0,e1,x_18);\n  float a1 = smoothstep(e1,e2,x_18);\n  float a2 = smoothstep(e2,e3,x_18);\n  float a3 = smoothstep(e3,e4,x_18);\n  float a4 = smoothstep(e4,e5,x_18);\n  return max(mix(v0,v1,a0)*step(e0,x_18)*step(x_18,e1),\n    max(mix(v1,v2,a1)*step(e1,x_18)*step(x_18,e2),\n    max(mix(v2,v3,a2)*step(e2,x_18)*step(x_18,e3),\n    max(mix(v3,v4,a3)*step(e3,x_18)*step(x_18,e4),mix(v4,v5,a4)*step(e4,x_18)*step(x_18,e5)\n  ))));\n}\n\nvec4 hsv (float x_5) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(1,0,0,1);\n  const float e1 = 0.169;\n  const vec4 v1 = vec4(0.9921568627450981,1,0.00784313725490196,1);\n  const float e2 = 0.173;\n  const vec4 v2 = vec4(0.9686274509803922,1,0.00784313725490196,1);\n  const float e3 = 0.337;\n  const vec4 v3 = vec4(0,0.9882352941176471,0.01568627450980392,1);\n  const float e4 = 0.341;\n  const vec4 v4 = vec4(0,0.9882352941176471,0.0392156862745098,1);\n  const float e5 = 0.506;\n  const vec4 v5 = vec4(0.00392156862745098,0.9764705882352941,1,1);\n  const float e6 = 0.671;\n  const vec4 v6 = vec4(0.00784313725490196,0,0.9921568627450981,1);\n  const float e7 = 0.675;\n  const vec4 v7 = vec4(0.03137254901960784,0,0.9921568627450981,1);\n  const float e8 = 0.839;\n  const vec4 v8 = vec4(1,0,0.984313725490196,1);\n  const float e9 = 0.843;\n  const vec4 v9 = vec4(1,0,0.9607843137254902,1);\n  const float e10 = 1.0;\n  const vec4 v10 = vec4(1,0,0.023529411764705882,1);\n  float a0 = smoothstep(e0,e1,x_5);\n  float a1 = smoothstep(e1,e2,x_5);\n  float a2 = smoothstep(e2,e3,x_5);\n  float a3 = smoothstep(e3,e4,x_5);\n  float a4 = smoothstep(e4,e5,x_5);\n  float a5 = smoothstep(e5,e6,x_5);\n  float a6 = smoothstep(e6,e7,x_5);\n  float a7 = smoothstep(e7,e8,x_5);\n  float a8 = smoothstep(e8,e9,x_5);\n  float a9 = smoothstep(e9,e10,x_5);\n  return max(mix(v0,v1,a0)*step(e0,x_5)*step(x_5,e1),\n    max(mix(v1,v2,a1)*step(e1,x_5)*step(x_5,e2),\n    max(mix(v2,v3,a2)*step(e2,x_5)*step(x_5,e3),\n    max(mix(v3,v4,a3)*step(e3,x_5)*step(x_5,e4),\n    max(mix(v4,v5,a4)*step(e4,x_5)*step(x_5,e5),\n    max(mix(v5,v6,a5)*step(e5,x_5)*step(x_5,e6),\n    max(mix(v6,v7,a6)*step(e6,x_5)*step(x_5,e7),\n    max(mix(v7,v8,a7)*step(e7,x_5)*step(x_5,e8),\n    max(mix(v8,v9,a8)*step(e8,x_5)*step(x_5,e9),mix(v9,v10,a9)*step(e9,x_5)*step(x_5,e10)\n  )))))))));\n}\n\nvec4 hot (float x_17) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.3;\n  const vec4 v1 = vec4(0.9019607843137255,0,0,1);\n  const float e2 = 0.6;\n  const vec4 v2 = vec4(1,0.8235294117647058,0,1);\n  const float e3 = 1.0;\n  const vec4 v3 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_17);\n  float a1 = smoothstep(e1,e2,x_17);\n  float a2 = smoothstep(e2,e3,x_17);\n  return max(mix(v0,v1,a0)*step(e0,x_17)*step(x_17,e1),\n    max(mix(v1,v2,a1)*step(e1,x_17)*step(x_17,e2),mix(v2,v3,a2)*step(e2,x_17)*step(x_17,e3)\n  ));\n}\n\nvec4 cool (float x_24) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.49019607843137253,0,0.7019607843137254,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.4549019607843137,0,0.8549019607843137,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.3843137254901961,0.2901960784313726,0.9294117647058824,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.26666666666666666,0.5725490196078431,0.9058823529411765,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0,0.8,0.7725490196078432,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0,0.9686274509803922,0.5725490196078431,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0,1,0.34509803921568627,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.1568627450980392,1,0.03137254901960784,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.5764705882352941,1,0,1);\n  float a0 = smoothstep(e0,e1,x_24);\n  float a1 = smoothstep(e1,e2,x_24);\n  float a2 = smoothstep(e2,e3,x_24);\n  float a3 = smoothstep(e3,e4,x_24);\n  float a4 = smoothstep(e4,e5,x_24);\n  float a5 = smoothstep(e5,e6,x_24);\n  float a6 = smoothstep(e6,e7,x_24);\n  float a7 = smoothstep(e7,e8,x_24);\n  return max(mix(v0,v1,a0)*step(e0,x_24)*step(x_24,e1),\n    max(mix(v1,v2,a1)*step(e1,x_24)*step(x_24,e2),\n    max(mix(v2,v3,a2)*step(e2,x_24)*step(x_24,e3),\n    max(mix(v3,v4,a3)*step(e3,x_24)*step(x_24,e4),\n    max(mix(v4,v5,a4)*step(e4,x_24)*step(x_24,e5),\n    max(mix(v5,v6,a5)*step(e5,x_24)*step(x_24,e6),\n    max(mix(v6,v7,a6)*step(e6,x_24)*step(x_24,e7),mix(v7,v8,a7)*step(e7,x_24)*step(x_24,e8)\n  )))))));\n}\n\nvec4 spring (float x_25) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(1,0,1,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,0,1);\n  float a0 = smoothstep(e0,e1,x_25);\n  return mix(v0,v1,a0)*step(e0,x_25)*step(x_25,e1);\n}\n\nvec4 summer (float x_13) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0.5019607843137255,0.4,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,0.4,1);\n  float a0 = smoothstep(e0,e1,x_13);\n  return mix(v0,v1,a0)*step(e0,x_13)*step(x_13,e1);\n}\n\nvec4 autumn (float x_15) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(1,0,0,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,0,1);\n  float a0 = smoothstep(e0,e1,x_15);\n  return mix(v0,v1,a0)*step(e0,x_15)*step(x_15,e1);\n}\n\nvec4 winter (float x_12) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,1,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(0,1,0.5019607843137255,1);\n  float a0 = smoothstep(e0,e1,x_12);\n  return mix(v0,v1,a0)*step(e0,x_12)*step(x_12,e1);\n}\n\nvec4 bone (float x_10) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.376;\n  const vec4 v1 = vec4(0.32941176470588235,0.32941176470588235,0.4549019607843137,1);\n  const float e2 = 0.753;\n  const vec4 v2 = vec4(0.6627450980392157,0.7843137254901961,0.7843137254901961,1);\n  const float e3 = 1.0;\n  const vec4 v3 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_10);\n  float a1 = smoothstep(e1,e2,x_10);\n  float a2 = smoothstep(e2,e3,x_10);\n  return max(mix(v0,v1,a0)*step(e0,x_10)*step(x_10,e1),\n    max(mix(v1,v2,a1)*step(e1,x_10)*step(x_10,e2),mix(v2,v3,a2)*step(e2,x_10)*step(x_10,e3)\n  ));\n}\n\nvec4 copper (float x_16) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.804;\n  const vec4 v1 = vec4(1,0.6274509803921569,0.4,1);\n  const float e2 = 1.0;\n  const vec4 v2 = vec4(1,0.7803921568627451,0.4980392156862745,1);\n  float a0 = smoothstep(e0,e1,x_16);\n  float a1 = smoothstep(e1,e2,x_16);\n  return max(mix(v0,v1,a0)*step(e0,x_16)*step(x_16,e1),mix(v1,v2,a1)*step(e1,x_16)*step(x_16,e2)\n  );\n}\n\nvec4 greys (float x_4) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_4);\n  return mix(v0,v1,a0)*step(e0,x_4)*step(x_4,e1);\n}\n\nvec4 yignbu (float x_34) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.03137254901960784,0.11372549019607843,0.34509803921568627,1);\n  const float e1 = 0.125;\n  const vec4 v1 = vec4(0.1450980392156863,0.20392156862745098,0.5803921568627451,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.13333333333333333,0.3686274509803922,0.6588235294117647,1);\n  const float e3 = 0.375;\n  const vec4 v3 = vec4(0.11372549019607843,0.5686274509803921,0.7529411764705882,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.2549019607843137,0.7137254901960784,0.7686274509803922,1);\n  const float e5 = 0.625;\n  const vec4 v5 = vec4(0.4980392156862745,0.803921568627451,0.7333333333333333,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.7803921568627451,0.9137254901960784,0.7058823529411765,1);\n  const float e7 = 0.875;\n  const vec4 v7 = vec4(0.9294117647058824,0.9725490196078431,0.8509803921568627,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(1,1,0.8509803921568627,1);\n  float a0 = smoothstep(e0,e1,x_34);\n  float a1 = smoothstep(e1,e2,x_34);\n  float a2 = smoothstep(e2,e3,x_34);\n  float a3 = smoothstep(e3,e4,x_34);\n  float a4 = smoothstep(e4,e5,x_34);\n  float a5 = smoothstep(e5,e6,x_34);\n  float a6 = smoothstep(e6,e7,x_34);\n  float a7 = smoothstep(e7,e8,x_34);\n  return max(mix(v0,v1,a0)*step(e0,x_34)*step(x_34,e1),\n    max(mix(v1,v2,a1)*step(e1,x_34)*step(x_34,e2),\n    max(mix(v2,v3,a2)*step(e2,x_34)*step(x_34,e3),\n    max(mix(v3,v4,a3)*step(e3,x_34)*step(x_34,e4),\n    max(mix(v4,v5,a4)*step(e4,x_34)*step(x_34,e5),\n    max(mix(v5,v6,a5)*step(e5,x_34)*step(x_34,e6),\n    max(mix(v6,v7,a6)*step(e6,x_34)*step(x_34,e7),mix(v7,v8,a7)*step(e7,x_34)*step(x_34,e8)\n  )))))));\n}\n\nvec4 greens (float x_41) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0.26666666666666666,0.10588235294117647,1);\n  const float e1 = 0.125;\n  const vec4 v1 = vec4(0,0.42745098039215684,0.17254901960784313,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.13725490196078433,0.5450980392156862,0.27058823529411763,1);\n  const float e3 = 0.375;\n  const vec4 v3 = vec4(0.2549019607843137,0.6705882352941176,0.36470588235294116,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.4549019607843137,0.7686274509803922,0.4627450980392157,1);\n  const float e5 = 0.625;\n  const vec4 v5 = vec4(0.6313725490196078,0.8509803921568627,0.6078431372549019,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.7803921568627451,0.9137254901960784,0.7529411764705882,1);\n  const float e7 = 0.875;\n  const vec4 v7 = vec4(0.8980392156862745,0.9607843137254902,0.8784313725490196,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9686274509803922,0.9882352941176471,0.9607843137254902,1);\n  float a0 = smoothstep(e0,e1,x_41);\n  float a1 = smoothstep(e1,e2,x_41);\n  float a2 = smoothstep(e2,e3,x_41);\n  float a3 = smoothstep(e3,e4,x_41);\n  float a4 = smoothstep(e4,e5,x_41);\n  float a5 = smoothstep(e5,e6,x_41);\n  float a6 = smoothstep(e6,e7,x_41);\n  float a7 = smoothstep(e7,e8,x_41);\n  return max(mix(v0,v1,a0)*step(e0,x_41)*step(x_41,e1),\n    max(mix(v1,v2,a1)*step(e1,x_41)*step(x_41,e2),\n    max(mix(v2,v3,a2)*step(e2,x_41)*step(x_41,e3),\n    max(mix(v3,v4,a3)*step(e3,x_41)*step(x_41,e4),\n    max(mix(v4,v5,a4)*step(e4,x_41)*step(x_41,e5),\n    max(mix(v5,v6,a5)*step(e5,x_41)*step(x_41,e6),\n    max(mix(v6,v7,a6)*step(e6,x_41)*step(x_41,e7),mix(v7,v8,a7)*step(e7,x_41)*step(x_41,e8)\n  )))))));\n}\n\nvec4 yiorrd (float x_32) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.5019607843137255,0,0.14901960784313725,1);\n  const float e1 = 0.125;\n  const vec4 v1 = vec4(0.7411764705882353,0,0.14901960784313725,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.8901960784313725,0.10196078431372549,0.10980392156862745,1);\n  const float e3 = 0.375;\n  const vec4 v3 = vec4(0.9882352941176471,0.3058823529411765,0.16470588235294117,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.9921568627450981,0.5529411764705883,0.23529411764705882,1);\n  const float e5 = 0.625;\n  const vec4 v5 = vec4(0.996078431372549,0.6980392156862745,0.2980392156862745,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.996078431372549,0.8509803921568627,0.4627450980392157,1);\n  const float e7 = 0.875;\n  const vec4 v7 = vec4(1,0.9294117647058824,0.6274509803921569,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(1,1,0.8,1);\n  float a0 = smoothstep(e0,e1,x_32);\n  float a1 = smoothstep(e1,e2,x_32);\n  float a2 = smoothstep(e2,e3,x_32);\n  float a3 = smoothstep(e3,e4,x_32);\n  float a4 = smoothstep(e4,e5,x_32);\n  float a5 = smoothstep(e5,e6,x_32);\n  float a6 = smoothstep(e6,e7,x_32);\n  float a7 = smoothstep(e7,e8,x_32);\n  return max(mix(v0,v1,a0)*step(e0,x_32)*step(x_32,e1),\n    max(mix(v1,v2,a1)*step(e1,x_32)*step(x_32,e2),\n    max(mix(v2,v3,a2)*step(e2,x_32)*step(x_32,e3),\n    max(mix(v3,v4,a3)*step(e3,x_32)*step(x_32,e4),\n    max(mix(v4,v5,a4)*step(e4,x_32)*step(x_32,e5),\n    max(mix(v5,v6,a5)*step(e5,x_32)*step(x_32,e6),\n    max(mix(v6,v7,a6)*step(e6,x_32)*step(x_32,e7),mix(v7,v8,a7)*step(e7,x_32)*step(x_32,e8)\n  )))))));\n}\n\nvec4 bluered (float x_1) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,1,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,0,0,1);\n  float a0 = smoothstep(e0,e1,x_1);\n  return mix(v0,v1,a0)*step(e0,x_1)*step(x_1,e1);\n}\n\nvec4 rdbu (float x_23) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.0196078431372549,0.0392156862745098,0.6745098039215687,1);\n  const float e1 = 0.35;\n  const vec4 v1 = vec4(0.41568627450980394,0.5372549019607843,0.9686274509803922,1);\n  const float e2 = 0.5;\n  const vec4 v2 = vec4(0.7450980392156863,0.7450980392156863,0.7450980392156863,1);\n  const float e3 = 0.6;\n  const vec4 v3 = vec4(0.8627450980392157,0.6666666666666666,0.5176470588235295,1);\n  const float e4 = 0.7;\n  const vec4 v4 = vec4(0.9019607843137255,0.5686274509803921,0.35294117647058826,1);\n  const float e5 = 1.0;\n  const vec4 v5 = vec4(0.6980392156862745,0.0392156862745098,0.10980392156862745,1);\n  float a0 = smoothstep(e0,e1,x_23);\n  float a1 = smoothstep(e1,e2,x_23);\n  float a2 = smoothstep(e2,e3,x_23);\n  float a3 = smoothstep(e3,e4,x_23);\n  float a4 = smoothstep(e4,e5,x_23);\n  return max(mix(v0,v1,a0)*step(e0,x_23)*step(x_23,e1),\n    max(mix(v1,v2,a1)*step(e1,x_23)*step(x_23,e2),\n    max(mix(v2,v3,a2)*step(e2,x_23)*step(x_23,e3),\n    max(mix(v3,v4,a3)*step(e3,x_23)*step(x_23,e4),mix(v4,v5,a4)*step(e4,x_23)*step(x_23,e5)\n  ))));\n}\n\nvec4 picnic (float x_42) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,1,1);\n  const float e1 = 0.1;\n  const vec4 v1 = vec4(0.2,0.6,1,1);\n  const float e2 = 0.2;\n  const vec4 v2 = vec4(0.4,0.8,1,1);\n  const float e3 = 0.3;\n  const vec4 v3 = vec4(0.6,0.8,1,1);\n  const float e4 = 0.4;\n  const vec4 v4 = vec4(0.8,0.8,1,1);\n  const float e5 = 0.5;\n  const vec4 v5 = vec4(1,1,1,1);\n  const float e6 = 0.6;\n  const vec4 v6 = vec4(1,0.8,1,1);\n  const float e7 = 0.7;\n  const vec4 v7 = vec4(1,0.6,1,1);\n  const float e8 = 0.8;\n  const vec4 v8 = vec4(1,0.4,0.8,1);\n  const float e9 = 0.9;\n  const vec4 v9 = vec4(1,0.4,0.4,1);\n  const float e10 = 1.0;\n  const vec4 v10 = vec4(1,0,0,1);\n  float a0 = smoothstep(e0,e1,x_42);\n  float a1 = smoothstep(e1,e2,x_42);\n  float a2 = smoothstep(e2,e3,x_42);\n  float a3 = smoothstep(e3,e4,x_42);\n  float a4 = smoothstep(e4,e5,x_42);\n  float a5 = smoothstep(e5,e6,x_42);\n  float a6 = smoothstep(e6,e7,x_42);\n  float a7 = smoothstep(e7,e8,x_42);\n  float a8 = smoothstep(e8,e9,x_42);\n  float a9 = smoothstep(e9,e10,x_42);\n  return max(mix(v0,v1,a0)*step(e0,x_42)*step(x_42,e1),\n    max(mix(v1,v2,a1)*step(e1,x_42)*step(x_42,e2),\n    max(mix(v2,v3,a2)*step(e2,x_42)*step(x_42,e3),\n    max(mix(v3,v4,a3)*step(e3,x_42)*step(x_42,e4),\n    max(mix(v4,v5,a4)*step(e4,x_42)*step(x_42,e5),\n    max(mix(v5,v6,a5)*step(e5,x_42)*step(x_42,e6),\n    max(mix(v6,v7,a6)*step(e6,x_42)*step(x_42,e7),\n    max(mix(v7,v8,a7)*step(e7,x_42)*step(x_42,e8),\n    max(mix(v8,v9,a8)*step(e8,x_42)*step(x_42,e9),mix(v9,v10,a9)*step(e9,x_42)*step(x_42,e10)\n  )))))))));\n}\n\nvec4 rainbow (float x_31) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.5882352941176471,0,0.35294117647058826,1);\n  const float e1 = 0.125;\n  const vec4 v1 = vec4(0,0,0.7843137254901961,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0,0.09803921568627451,1,1);\n  const float e3 = 0.375;\n  const vec4 v3 = vec4(0,0.596078431372549,1,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.17254901960784313,1,0.5882352941176471,1);\n  const float e5 = 0.625;\n  const vec4 v5 = vec4(0.592156862745098,1,0,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(1,0.9176470588235294,0,1);\n  const float e7 = 0.875;\n  const vec4 v7 = vec4(1,0.43529411764705883,0,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(1,0,0,1);\n  float a0 = smoothstep(e0,e1,x_31);\n  float a1 = smoothstep(e1,e2,x_31);\n  float a2 = smoothstep(e2,e3,x_31);\n  float a3 = smoothstep(e3,e4,x_31);\n  float a4 = smoothstep(e4,e5,x_31);\n  float a5 = smoothstep(e5,e6,x_31);\n  float a6 = smoothstep(e6,e7,x_31);\n  float a7 = smoothstep(e7,e8,x_31);\n  return max(mix(v0,v1,a0)*step(e0,x_31)*step(x_31,e1),\n    max(mix(v1,v2,a1)*step(e1,x_31)*step(x_31,e2),\n    max(mix(v2,v3,a2)*step(e2,x_31)*step(x_31,e3),\n    max(mix(v3,v4,a3)*step(e3,x_31)*step(x_31,e4),\n    max(mix(v4,v5,a4)*step(e4,x_31)*step(x_31,e5),\n    max(mix(v5,v6,a5)*step(e5,x_31)*step(x_31,e6),\n    max(mix(v6,v7,a6)*step(e6,x_31)*step(x_31,e7),mix(v7,v8,a7)*step(e7,x_31)*step(x_31,e8)\n  )))))));\n}\n\nvec4 portland (float x_21) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.047058823529411764,0.2,0.5137254901960784,1);\n  const float e1 = 0.25;\n  const vec4 v1 = vec4(0.0392156862745098,0.5333333333333333,0.7294117647058823,1);\n  const float e2 = 0.5;\n  const vec4 v2 = vec4(0.9490196078431372,0.8274509803921568,0.2196078431372549,1);\n  const float e3 = 0.75;\n  const vec4 v3 = vec4(0.9490196078431372,0.5607843137254902,0.2196078431372549,1);\n  const float e4 = 1.0;\n  const vec4 v4 = vec4(0.8509803921568627,0.11764705882352941,0.11764705882352941,1);\n  float a0 = smoothstep(e0,e1,x_21);\n  float a1 = smoothstep(e1,e2,x_21);\n  float a2 = smoothstep(e2,e3,x_21);\n  float a3 = smoothstep(e3,e4,x_21);\n  return max(mix(v0,v1,a0)*step(e0,x_21)*step(x_21,e1),\n    max(mix(v1,v2,a1)*step(e1,x_21)*step(x_21,e2),\n    max(mix(v2,v3,a2)*step(e2,x_21)*step(x_21,e3),mix(v3,v4,a3)*step(e3,x_21)*step(x_21,e4)\n  )));\n}\n\nvec4 blackbody (float x_38) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.2;\n  const vec4 v1 = vec4(0.9019607843137255,0,0,1);\n  const float e2 = 0.4;\n  const vec4 v2 = vec4(0.9019607843137255,0.8235294117647058,0,1);\n  const float e3 = 0.7;\n  const vec4 v3 = vec4(1,1,1,1);\n  const float e4 = 1.0;\n  const vec4 v4 = vec4(0.6274509803921569,0.7843137254901961,1,1);\n  float a0 = smoothstep(e0,e1,x_38);\n  float a1 = smoothstep(e1,e2,x_38);\n  float a2 = smoothstep(e2,e3,x_38);\n  float a3 = smoothstep(e3,e4,x_38);\n  return max(mix(v0,v1,a0)*step(e0,x_38)*step(x_38,e1),\n    max(mix(v1,v2,a1)*step(e1,x_38)*step(x_38,e2),\n    max(mix(v2,v3,a2)*step(e2,x_38)*step(x_38,e3),mix(v3,v4,a3)*step(e3,x_38)*step(x_38,e4)\n  )));\n}\n\nvec4 earth (float x_29) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.5098039215686274,1);\n  const float e1 = 0.1;\n  const vec4 v1 = vec4(0,0.7058823529411765,0.7058823529411765,1);\n  const float e2 = 0.2;\n  const vec4 v2 = vec4(0.1568627450980392,0.8235294117647058,0.1568627450980392,1);\n  const float e3 = 0.4;\n  const vec4 v3 = vec4(0.9019607843137255,0.9019607843137255,0.19607843137254902,1);\n  const float e4 = 0.6;\n  const vec4 v4 = vec4(0.47058823529411764,0.27450980392156865,0.0784313725490196,1);\n  const float e5 = 1.0;\n  const vec4 v5 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_29);\n  float a1 = smoothstep(e1,e2,x_29);\n  float a2 = smoothstep(e2,e3,x_29);\n  float a3 = smoothstep(e3,e4,x_29);\n  float a4 = smoothstep(e4,e5,x_29);\n  return max(mix(v0,v1,a0)*step(e0,x_29)*step(x_29,e1),\n    max(mix(v1,v2,a1)*step(e1,x_29)*step(x_29,e2),\n    max(mix(v2,v3,a2)*step(e2,x_29)*step(x_29,e3),\n    max(mix(v3,v4,a3)*step(e3,x_29)*step(x_29,e4),mix(v4,v5,a4)*step(e4,x_29)*step(x_29,e5)\n  ))));\n}\n\nvec4 electric (float x_9) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.15;\n  const vec4 v1 = vec4(0.11764705882352941,0,0.39215686274509803,1);\n  const float e2 = 0.4;\n  const vec4 v2 = vec4(0.47058823529411764,0,0.39215686274509803,1);\n  const float e3 = 0.6;\n  const vec4 v3 = vec4(0.6274509803921569,0.35294117647058826,0,1);\n  const float e4 = 0.8;\n  const vec4 v4 = vec4(0.9019607843137255,0.7843137254901961,0,1);\n  const float e5 = 1.0;\n  const vec4 v5 = vec4(1,0.9803921568627451,0.8627450980392157,1);\n  float a0 = smoothstep(e0,e1,x_9);\n  float a1 = smoothstep(e1,e2,x_9);\n  float a2 = smoothstep(e2,e3,x_9);\n  float a3 = smoothstep(e3,e4,x_9);\n  float a4 = smoothstep(e4,e5,x_9);\n  return max(mix(v0,v1,a0)*step(e0,x_9)*step(x_9,e1),\n    max(mix(v1,v2,a1)*step(e1,x_9)*step(x_9,e2),\n    max(mix(v2,v3,a2)*step(e2,x_9)*step(x_9,e3),\n    max(mix(v3,v4,a3)*step(e3,x_9)*step(x_9,e4),mix(v4,v5,a4)*step(e4,x_9)*step(x_9,e5)\n  ))));\n}\n\nvec4 alpha (float x_0) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(1,1,1,0);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_0);\n  return mix(v0,v1,a0)*step(e0,x_0)*step(x_0,e1);\n}\n\nvec4 viridis (float x_3) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.26666666666666666,0.00392156862745098,0.32941176470588235,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.2784313725490196,0.17254901960784313,0.47843137254901963,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.23137254901960785,0.3176470588235294,0.5450980392156862,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.17254901960784313,0.44313725490196076,0.5568627450980392,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.12941176470588237,0.5647058823529412,0.5529411764705883,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.15294117647058825,0.6784313725490196,0.5058823529411764,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.3607843137254902,0.7843137254901961,0.38823529411764707,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.6666666666666666,0.8627450980392157,0.19607843137254902,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9921568627450981,0.9058823529411765,0.1450980392156863,1);\n  float a0 = smoothstep(e0,e1,x_3);\n  float a1 = smoothstep(e1,e2,x_3);\n  float a2 = smoothstep(e2,e3,x_3);\n  float a3 = smoothstep(e3,e4,x_3);\n  float a4 = smoothstep(e4,e5,x_3);\n  float a5 = smoothstep(e5,e6,x_3);\n  float a6 = smoothstep(e6,e7,x_3);\n  float a7 = smoothstep(e7,e8,x_3);\n  return max(mix(v0,v1,a0)*step(e0,x_3)*step(x_3,e1),\n    max(mix(v1,v2,a1)*step(e1,x_3)*step(x_3,e2),\n    max(mix(v2,v3,a2)*step(e2,x_3)*step(x_3,e3),\n    max(mix(v3,v4,a3)*step(e3,x_3)*step(x_3,e4),\n    max(mix(v4,v5,a4)*step(e4,x_3)*step(x_3,e5),\n    max(mix(v5,v6,a5)*step(e5,x_3)*step(x_3,e6),\n    max(mix(v6,v7,a6)*step(e6,x_3)*step(x_3,e7),mix(v7,v8,a7)*step(e7,x_3)*step(x_3,e8)\n  )))))));\n}\n\nvec4 inferno (float x_22) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.12156862745098039,0.047058823529411764,0.2823529411764706,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.3333333333333333,0.058823529411764705,0.42745098039215684,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.5333333333333333,0.13333333333333333,0.41568627450980394,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.7294117647058823,0.21176470588235294,0.3333333333333333,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8901960784313725,0.34901960784313724,0.2,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.9764705882352941,0.5490196078431373,0.0392156862745098,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9764705882352941,0.788235294117647,0.19607843137254902,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9882352941176471,1,0.6431372549019608,1);\n  float a0 = smoothstep(e0,e1,x_22);\n  float a1 = smoothstep(e1,e2,x_22);\n  float a2 = smoothstep(e2,e3,x_22);\n  float a3 = smoothstep(e3,e4,x_22);\n  float a4 = smoothstep(e4,e5,x_22);\n  float a5 = smoothstep(e5,e6,x_22);\n  float a6 = smoothstep(e6,e7,x_22);\n  float a7 = smoothstep(e7,e8,x_22);\n  return max(mix(v0,v1,a0)*step(e0,x_22)*step(x_22,e1),\n    max(mix(v1,v2,a1)*step(e1,x_22)*step(x_22,e2),\n    max(mix(v2,v3,a2)*step(e2,x_22)*step(x_22,e3),\n    max(mix(v3,v4,a3)*step(e3,x_22)*step(x_22,e4),\n    max(mix(v4,v5,a4)*step(e4,x_22)*step(x_22,e5),\n    max(mix(v5,v6,a5)*step(e5,x_22)*step(x_22,e6),\n    max(mix(v6,v7,a6)*step(e6,x_22)*step(x_22,e7),mix(v7,v8,a7)*step(e7,x_22)*step(x_22,e8)\n  )))))));\n}\n\nvec4 magma (float x_33) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.10980392156862745,0.06274509803921569,0.26666666666666666,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.30980392156862746,0.07058823529411765,0.4823529411764706,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.5058823529411764,0.1450980392156863,0.5058823529411764,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.7098039215686275,0.21176470588235294,0.47843137254901963,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8980392156862745,0.3137254901960784,0.39215686274509803,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.984313725490196,0.5294117647058824,0.3803921568627451,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.996078431372549,0.7607843137254902,0.5294117647058824,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9882352941176471,0.9921568627450981,0.7490196078431373,1);\n  float a0 = smoothstep(e0,e1,x_33);\n  float a1 = smoothstep(e1,e2,x_33);\n  float a2 = smoothstep(e2,e3,x_33);\n  float a3 = smoothstep(e3,e4,x_33);\n  float a4 = smoothstep(e4,e5,x_33);\n  float a5 = smoothstep(e5,e6,x_33);\n  float a6 = smoothstep(e6,e7,x_33);\n  float a7 = smoothstep(e7,e8,x_33);\n  return max(mix(v0,v1,a0)*step(e0,x_33)*step(x_33,e1),\n    max(mix(v1,v2,a1)*step(e1,x_33)*step(x_33,e2),\n    max(mix(v2,v3,a2)*step(e2,x_33)*step(x_33,e3),\n    max(mix(v3,v4,a3)*step(e3,x_33)*step(x_33,e4),\n    max(mix(v4,v5,a4)*step(e4,x_33)*step(x_33,e5),\n    max(mix(v5,v6,a5)*step(e5,x_33)*step(x_33,e6),\n    max(mix(v6,v7,a6)*step(e6,x_33)*step(x_33,e7),mix(v7,v8,a7)*step(e7,x_33)*step(x_33,e8)\n  )))))));\n}\n\nvec4 plasma (float x_30) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.050980392156862744,0.03137254901960784,0.5294117647058824,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.29411764705882354,0.011764705882352941,0.6313725490196078,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.49019607843137253,0.011764705882352941,0.6588235294117647,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.6588235294117647,0.13333333333333333,0.5882352941176471,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.796078431372549,0.27450980392156865,0.4745098039215686,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8980392156862745,0.4196078431372549,0.36470588235294116,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.9725490196078431,0.5803921568627451,0.2549019607843137,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9921568627450981,0.7647058823529411,0.1568627450980392,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9411764705882353,0.9764705882352941,0.12941176470588237,1);\n  float a0 = smoothstep(e0,e1,x_30);\n  float a1 = smoothstep(e1,e2,x_30);\n  float a2 = smoothstep(e2,e3,x_30);\n  float a3 = smoothstep(e3,e4,x_30);\n  float a4 = smoothstep(e4,e5,x_30);\n  float a5 = smoothstep(e5,e6,x_30);\n  float a6 = smoothstep(e6,e7,x_30);\n  float a7 = smoothstep(e7,e8,x_30);\n  return max(mix(v0,v1,a0)*step(e0,x_30)*step(x_30,e1),\n    max(mix(v1,v2,a1)*step(e1,x_30)*step(x_30,e2),\n    max(mix(v2,v3,a2)*step(e2,x_30)*step(x_30,e3),\n    max(mix(v3,v4,a3)*step(e3,x_30)*step(x_30,e4),\n    max(mix(v4,v5,a4)*step(e4,x_30)*step(x_30,e5),\n    max(mix(v5,v6,a5)*step(e5,x_30)*step(x_30,e6),\n    max(mix(v6,v7,a6)*step(e6,x_30)*step(x_30,e7),mix(v7,v8,a7)*step(e7,x_30)*step(x_30,e8)\n  )))))));\n}\n\nvec4 warm (float x_14) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.49019607843137253,0,0.7019607843137254,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.6745098039215687,0,0.7333333333333333,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.8588235294117647,0,0.6666666666666666,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(1,0,0.5098039215686274,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(1,0.24705882352941178,0.2901960784313726,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(1,0.4823529411764706,0,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.9176470588235294,0.6901960784313725,0,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.7450980392156863,0.8941176470588236,0,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.5764705882352941,1,0,1);\n  float a0 = smoothstep(e0,e1,x_14);\n  float a1 = smoothstep(e1,e2,x_14);\n  float a2 = smoothstep(e2,e3,x_14);\n  float a3 = smoothstep(e3,e4,x_14);\n  float a4 = smoothstep(e4,e5,x_14);\n  float a5 = smoothstep(e5,e6,x_14);\n  float a6 = smoothstep(e6,e7,x_14);\n  float a7 = smoothstep(e7,e8,x_14);\n  return max(mix(v0,v1,a0)*step(e0,x_14)*step(x_14,e1),\n    max(mix(v1,v2,a1)*step(e1,x_14)*step(x_14,e2),\n    max(mix(v2,v3,a2)*step(e2,x_14)*step(x_14,e3),\n    max(mix(v3,v4,a3)*step(e3,x_14)*step(x_14,e4),\n    max(mix(v4,v5,a4)*step(e4,x_14)*step(x_14,e5),\n    max(mix(v5,v6,a5)*step(e5,x_14)*step(x_14,e6),\n    max(mix(v6,v7,a6)*step(e6,x_14)*step(x_14,e7),mix(v7,v8,a7)*step(e7,x_14)*step(x_14,e8)\n  )))))));\n}\n\nvec4 rainbow_soft_4276763523 (float x_43) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.49019607843137253,0,0.7019607843137254,1);\n  const float e1 = 0.1;\n  const vec4 v1 = vec4(0.7803921568627451,0,0.7058823529411765,1);\n  const float e2 = 0.2;\n  const vec4 v2 = vec4(1,0,0.4745098039215686,1);\n  const float e3 = 0.3;\n  const vec4 v3 = vec4(1,0.4235294117647059,0,1);\n  const float e4 = 0.4;\n  const vec4 v4 = vec4(0.8705882352941177,0.7607843137254902,0,1);\n  const float e5 = 0.5;\n  const vec4 v5 = vec4(0.5882352941176471,1,0,1);\n  const float e6 = 0.6;\n  const vec4 v6 = vec4(0,1,0.21568627450980393,1);\n  const float e7 = 0.7;\n  const vec4 v7 = vec4(0,0.9647058823529412,0.5882352941176471,1);\n  const float e8 = 0.8;\n  const vec4 v8 = vec4(0.19607843137254902,0.6549019607843137,0.8705882352941177,1);\n  const float e9 = 0.9;\n  const vec4 v9 = vec4(0.403921568627451,0.2,0.9215686274509803,1);\n  const float e10 = 1.0;\n  const vec4 v10 = vec4(0.48627450980392156,0,0.7294117647058823,1);\n  float a0 = smoothstep(e0,e1,x_43);\n  float a1 = smoothstep(e1,e2,x_43);\n  float a2 = smoothstep(e2,e3,x_43);\n  float a3 = smoothstep(e3,e4,x_43);\n  float a4 = smoothstep(e4,e5,x_43);\n  float a5 = smoothstep(e5,e6,x_43);\n  float a6 = smoothstep(e6,e7,x_43);\n  float a7 = smoothstep(e7,e8,x_43);\n  float a8 = smoothstep(e8,e9,x_43);\n  float a9 = smoothstep(e9,e10,x_43);\n  return max(mix(v0,v1,a0)*step(e0,x_43)*step(x_43,e1),\n    max(mix(v1,v2,a1)*step(e1,x_43)*step(x_43,e2),\n    max(mix(v2,v3,a2)*step(e2,x_43)*step(x_43,e3),\n    max(mix(v3,v4,a3)*step(e3,x_43)*step(x_43,e4),\n    max(mix(v4,v5,a4)*step(e4,x_43)*step(x_43,e5),\n    max(mix(v5,v6,a5)*step(e5,x_43)*step(x_43,e6),\n    max(mix(v6,v7,a6)*step(e6,x_43)*step(x_43,e7),\n    max(mix(v7,v8,a7)*step(e7,x_43)*step(x_43,e8),\n    max(mix(v8,v9,a8)*step(e8,x_43)*step(x_43,e9),mix(v9,v10,a9)*step(e9,x_43)*step(x_43,e10)\n  )))))))));\n}\n\nvec4 bathymetry (float x_36) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.1568627450980392,0.10196078431372549,0.17254901960784313,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.23137254901960785,0.19215686274509805,0.35294117647058826,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.25098039215686274,0.2980392156862745,0.5450980392156862,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.24705882352941178,0.43137254901960786,0.592156862745098,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.2823529411764706,0.5568627450980392,0.6196078431372549,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.3333333333333333,0.6823529411764706,0.6392156862745098,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.47058823529411764,0.807843137254902,0.6392156862745098,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.7333333333333333,0.9019607843137255,0.6745098039215687,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9921568627450981,0.996078431372549,0.8,1);\n  float a0 = smoothstep(e0,e1,x_36);\n  float a1 = smoothstep(e1,e2,x_36);\n  float a2 = smoothstep(e2,e3,x_36);\n  float a3 = smoothstep(e3,e4,x_36);\n  float a4 = smoothstep(e4,e5,x_36);\n  float a5 = smoothstep(e5,e6,x_36);\n  float a6 = smoothstep(e6,e7,x_36);\n  float a7 = smoothstep(e7,e8,x_36);\n  return max(mix(v0,v1,a0)*step(e0,x_36)*step(x_36,e1),\n    max(mix(v1,v2,a1)*step(e1,x_36)*step(x_36,e2),\n    max(mix(v2,v3,a2)*step(e2,x_36)*step(x_36,e3),\n    max(mix(v3,v4,a3)*step(e3,x_36)*step(x_36,e4),\n    max(mix(v4,v5,a4)*step(e4,x_36)*step(x_36,e5),\n    max(mix(v5,v6,a5)*step(e5,x_36)*step(x_36,e6),\n    max(mix(v6,v7,a6)*step(e6,x_36)*step(x_36,e7),mix(v7,v8,a7)*step(e7,x_36)*step(x_36,e8)\n  )))))));\n}\n\nvec4 cdom (float x_7) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.1843137254901961,0.058823529411764705,0.24313725490196078,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.3411764705882353,0.09019607843137255,0.33725490196078434,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.5098039215686274,0.10980392156862745,0.38823529411764707,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.6705882352941176,0.1607843137254902,0.3764705882352941,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.807843137254902,0.2627450980392157,0.33725490196078434,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.9019607843137255,0.41568627450980394,0.32941176470588235,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.9490196078431372,0.5843137254901961,0.403921568627451,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9764705882352941,0.7568627450980392,0.5294117647058824,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.996078431372549,0.9294117647058824,0.6901960784313725,1);\n  float a0 = smoothstep(e0,e1,x_7);\n  float a1 = smoothstep(e1,e2,x_7);\n  float a2 = smoothstep(e2,e3,x_7);\n  float a3 = smoothstep(e3,e4,x_7);\n  float a4 = smoothstep(e4,e5,x_7);\n  float a5 = smoothstep(e5,e6,x_7);\n  float a6 = smoothstep(e6,e7,x_7);\n  float a7 = smoothstep(e7,e8,x_7);\n  return max(mix(v0,v1,a0)*step(e0,x_7)*step(x_7,e1),\n    max(mix(v1,v2,a1)*step(e1,x_7)*step(x_7,e2),\n    max(mix(v2,v3,a2)*step(e2,x_7)*step(x_7,e3),\n    max(mix(v3,v4,a3)*step(e3,x_7)*step(x_7,e4),\n    max(mix(v4,v5,a4)*step(e4,x_7)*step(x_7,e5),\n    max(mix(v5,v6,a5)*step(e5,x_7)*step(x_7,e6),\n    max(mix(v6,v7,a6)*step(e6,x_7)*step(x_7,e7),mix(v7,v8,a7)*step(e7,x_7)*step(x_7,e8)\n  )))))));\n}\n\nvec4 chlorophyll (float x_6) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.07058823529411765,0.1411764705882353,0.0784313725490196,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.09803921568627451,0.24705882352941178,0.1607843137254902,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.09411764705882353,0.3568627450980392,0.23137254901960785,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.050980392156862744,0.4666666666666667,0.2823529411764706,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.07058823529411765,0.5803921568627451,0.3137254901960784,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.3137254901960784,0.6784313725490196,0.34901960784313724,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.5176470588235295,0.7686274509803922,0.47843137254901963,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.6862745098039216,0.8666666666666667,0.6352941176470588,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.8431372549019608,0.9764705882352941,0.8156862745098039,1);\n  float a0 = smoothstep(e0,e1,x_6);\n  float a1 = smoothstep(e1,e2,x_6);\n  float a2 = smoothstep(e2,e3,x_6);\n  float a3 = smoothstep(e3,e4,x_6);\n  float a4 = smoothstep(e4,e5,x_6);\n  float a5 = smoothstep(e5,e6,x_6);\n  float a6 = smoothstep(e6,e7,x_6);\n  float a7 = smoothstep(e7,e8,x_6);\n  return max(mix(v0,v1,a0)*step(e0,x_6)*step(x_6,e1),\n    max(mix(v1,v2,a1)*step(e1,x_6)*step(x_6,e2),\n    max(mix(v2,v3,a2)*step(e2,x_6)*step(x_6,e3),\n    max(mix(v3,v4,a3)*step(e3,x_6)*step(x_6,e4),\n    max(mix(v4,v5,a4)*step(e4,x_6)*step(x_6,e5),\n    max(mix(v5,v6,a5)*step(e5,x_6)*step(x_6,e6),\n    max(mix(v6,v7,a6)*step(e6,x_6)*step(x_6,e7),mix(v7,v8,a7)*step(e7,x_6)*step(x_6,e8)\n  )))))));\n}\n\nvec4 density (float x_19) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.21176470588235294,0.054901960784313725,0.1411764705882353,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.34901960784313724,0.09019607843137255,0.3137254901960784,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.43137254901960786,0.17647058823529413,0.5176470588235295,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.47058823529411764,0.30196078431372547,0.6980392156862745,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.47058823529411764,0.44313725490196076,0.8352941176470589,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.45098039215686275,0.592156862745098,0.8941176470588236,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.5254901960784314,0.7254901960784313,0.8901960784313725,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.6941176470588235,0.8392156862745098,0.8901960784313725,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9019607843137255,0.9450980392156862,0.9450980392156862,1);\n  float a0 = smoothstep(e0,e1,x_19);\n  float a1 = smoothstep(e1,e2,x_19);\n  float a2 = smoothstep(e2,e3,x_19);\n  float a3 = smoothstep(e3,e4,x_19);\n  float a4 = smoothstep(e4,e5,x_19);\n  float a5 = smoothstep(e5,e6,x_19);\n  float a6 = smoothstep(e6,e7,x_19);\n  float a7 = smoothstep(e7,e8,x_19);\n  return max(mix(v0,v1,a0)*step(e0,x_19)*step(x_19,e1),\n    max(mix(v1,v2,a1)*step(e1,x_19)*step(x_19,e2),\n    max(mix(v2,v3,a2)*step(e2,x_19)*step(x_19,e3),\n    max(mix(v3,v4,a3)*step(e3,x_19)*step(x_19,e4),\n    max(mix(v4,v5,a4)*step(e4,x_19)*step(x_19,e5),\n    max(mix(v5,v6,a5)*step(e5,x_19)*step(x_19,e6),\n    max(mix(v6,v7,a6)*step(e6,x_19)*step(x_19,e7),mix(v7,v8,a7)*step(e7,x_19)*step(x_19,e8)\n  )))))));\n}\n\nvec4 freesurface_blue_1679163293 (float x_20) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.11764705882352941,0.01568627450980392,0.43137254901960786,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.1843137254901961,0.054901960784313725,0.6901960784313725,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.1607843137254902,0.17647058823529413,0.9254901960784314,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.09803921568627451,0.38823529411764707,0.8313725490196079,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.26666666666666666,0.5137254901960784,0.7843137254901961,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.4470588235294118,0.611764705882353,0.7725490196078432,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.615686274509804,0.7098039215686275,0.796078431372549,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.7843137254901961,0.8156862745098039,0.8470588235294118,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9450980392156862,0.9294117647058824,0.9254901960784314,1);\n  float a0 = smoothstep(e0,e1,x_20);\n  float a1 = smoothstep(e1,e2,x_20);\n  float a2 = smoothstep(e2,e3,x_20);\n  float a3 = smoothstep(e3,e4,x_20);\n  float a4 = smoothstep(e4,e5,x_20);\n  float a5 = smoothstep(e5,e6,x_20);\n  float a6 = smoothstep(e6,e7,x_20);\n  float a7 = smoothstep(e7,e8,x_20);\n  return max(mix(v0,v1,a0)*step(e0,x_20)*step(x_20,e1),\n    max(mix(v1,v2,a1)*step(e1,x_20)*step(x_20,e2),\n    max(mix(v2,v3,a2)*step(e2,x_20)*step(x_20,e3),\n    max(mix(v3,v4,a3)*step(e3,x_20)*step(x_20,e4),\n    max(mix(v4,v5,a4)*step(e4,x_20)*step(x_20,e5),\n    max(mix(v5,v6,a5)*step(e5,x_20)*step(x_20,e6),\n    max(mix(v6,v7,a6)*step(e6,x_20)*step(x_20,e7),mix(v7,v8,a7)*step(e7,x_20)*step(x_20,e8)\n  )))))));\n}\n\nvec4 freesurface_red_3154355989 (float x_35) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.23529411764705882,0.03529411764705882,0.07058823529411765,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.39215686274509803,0.06666666666666667,0.10588235294117647,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.5568627450980392,0.0784313725490196,0.11372549019607843,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.6941176470588235,0.16862745098039217,0.10588235294117647,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.7529411764705882,0.3411764705882353,0.24705882352941178,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.803921568627451,0.49019607843137253,0.4117647058823529,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.8470588235294118,0.6352941176470588,0.5803921568627451,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.8901960784313725,0.7803921568627451,0.7568627450980392,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9450980392156862,0.9294117647058824,0.9254901960784314,1);\n  float a0 = smoothstep(e0,e1,x_35);\n  float a1 = smoothstep(e1,e2,x_35);\n  float a2 = smoothstep(e2,e3,x_35);\n  float a3 = smoothstep(e3,e4,x_35);\n  float a4 = smoothstep(e4,e5,x_35);\n  float a5 = smoothstep(e5,e6,x_35);\n  float a6 = smoothstep(e6,e7,x_35);\n  float a7 = smoothstep(e7,e8,x_35);\n  return max(mix(v0,v1,a0)*step(e0,x_35)*step(x_35,e1),\n    max(mix(v1,v2,a1)*step(e1,x_35)*step(x_35,e2),\n    max(mix(v2,v3,a2)*step(e2,x_35)*step(x_35,e3),\n    max(mix(v3,v4,a3)*step(e3,x_35)*step(x_35,e4),\n    max(mix(v4,v5,a4)*step(e4,x_35)*step(x_35,e5),\n    max(mix(v5,v6,a5)*step(e5,x_35)*step(x_35,e6),\n    max(mix(v6,v7,a6)*step(e6,x_35)*step(x_35,e7),mix(v7,v8,a7)*step(e7,x_35)*step(x_35,e8)\n  )))))));\n}\n\nvec4 oxygen (float x_28) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.25098039215686274,0.0196078431372549,0.0196078431372549,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.41568627450980394,0.023529411764705882,0.058823529411764705,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.5647058823529412,0.10196078431372549,0.027450980392156862,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.6588235294117647,0.25098039215686274,0.011764705882352941,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.7372549019607844,0.39215686274509803,0.01568627450980392,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.807843137254902,0.5333333333333333,0.043137254901960784,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.8627450980392157,0.6823529411764706,0.09803921568627451,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9058823529411765,0.8431372549019608,0.17254901960784313,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9725490196078431,0.996078431372549,0.4117647058823529,1);\n  float a0 = smoothstep(e0,e1,x_28);\n  float a1 = smoothstep(e1,e2,x_28);\n  float a2 = smoothstep(e2,e3,x_28);\n  float a3 = smoothstep(e3,e4,x_28);\n  float a4 = smoothstep(e4,e5,x_28);\n  float a5 = smoothstep(e5,e6,x_28);\n  float a6 = smoothstep(e6,e7,x_28);\n  float a7 = smoothstep(e7,e8,x_28);\n  return max(mix(v0,v1,a0)*step(e0,x_28)*step(x_28,e1),\n    max(mix(v1,v2,a1)*step(e1,x_28)*step(x_28,e2),\n    max(mix(v2,v3,a2)*step(e2,x_28)*step(x_28,e3),\n    max(mix(v3,v4,a3)*step(e3,x_28)*step(x_28,e4),\n    max(mix(v4,v5,a4)*step(e4,x_28)*step(x_28,e5),\n    max(mix(v5,v6,a5)*step(e5,x_28)*step(x_28,e6),\n    max(mix(v6,v7,a6)*step(e6,x_28)*step(x_28,e7),mix(v7,v8,a7)*step(e7,x_28)*step(x_28,e8)\n  )))))));\n}\n\nvec4 par (float x_39) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.2,0.0784313725490196,0.09411764705882353,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.35294117647058826,0.12549019607843137,0.13725490196078433,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.5058823529411764,0.17254901960784313,0.13333333333333333,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.6235294117647059,0.26666666666666666,0.09803921568627451,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.7137254901960784,0.38823529411764707,0.07450980392156863,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.7803921568627451,0.5254901960784314,0.08627450980392157,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.8313725490196079,0.6705882352941176,0.13725490196078433,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.8666666666666667,0.8235294117647058,0.21176470588235294,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.8823529411764706,0.9921568627450981,0.29411764705882354,1);\n  float a0 = smoothstep(e0,e1,x_39);\n  float a1 = smoothstep(e1,e2,x_39);\n  float a2 = smoothstep(e2,e3,x_39);\n  float a3 = smoothstep(e3,e4,x_39);\n  float a4 = smoothstep(e4,e5,x_39);\n  float a5 = smoothstep(e5,e6,x_39);\n  float a6 = smoothstep(e6,e7,x_39);\n  float a7 = smoothstep(e7,e8,x_39);\n  return max(mix(v0,v1,a0)*step(e0,x_39)*step(x_39,e1),\n    max(mix(v1,v2,a1)*step(e1,x_39)*step(x_39,e2),\n    max(mix(v2,v3,a2)*step(e2,x_39)*step(x_39,e3),\n    max(mix(v3,v4,a3)*step(e3,x_39)*step(x_39,e4),\n    max(mix(v4,v5,a4)*step(e4,x_39)*step(x_39,e5),\n    max(mix(v5,v6,a5)*step(e5,x_39)*step(x_39,e6),\n    max(mix(v6,v7,a6)*step(e6,x_39)*step(x_39,e7),mix(v7,v8,a7)*step(e7,x_39)*step(x_39,e8)\n  )))))));\n}\n\nvec4 phase (float x_11) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.5686274509803921,0.4117647058823529,0.07058823529411765,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.7215686274509804,0.2784313725490196,0.14901960784313725,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.7294117647058823,0.22745098039215686,0.45098039215686275,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.6274509803921569,0.2784313725490196,0.7254901960784313,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.43137254901960786,0.3803921568627451,0.8549019607843137,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.19607843137254902,0.4823529411764706,0.6431372549019608,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.12156862745098039,0.5137254901960784,0.43137254901960786,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.30196078431372547,0.5058823529411764,0.13333333333333333,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.5686274509803921,0.4117647058823529,0.07058823529411765,1);\n  float a0 = smoothstep(e0,e1,x_11);\n  float a1 = smoothstep(e1,e2,x_11);\n  float a2 = smoothstep(e2,e3,x_11);\n  float a3 = smoothstep(e3,e4,x_11);\n  float a4 = smoothstep(e4,e5,x_11);\n  float a5 = smoothstep(e5,e6,x_11);\n  float a6 = smoothstep(e6,e7,x_11);\n  float a7 = smoothstep(e7,e8,x_11);\n  return max(mix(v0,v1,a0)*step(e0,x_11)*step(x_11,e1),\n    max(mix(v1,v2,a1)*step(e1,x_11)*step(x_11,e2),\n    max(mix(v2,v3,a2)*step(e2,x_11)*step(x_11,e3),\n    max(mix(v3,v4,a3)*step(e3,x_11)*step(x_11,e4),\n    max(mix(v4,v5,a4)*step(e4,x_11)*step(x_11,e5),\n    max(mix(v5,v6,a5)*step(e5,x_11)*step(x_11,e6),\n    max(mix(v6,v7,a6)*step(e6,x_11)*step(x_11,e7),mix(v7,v8,a7)*step(e7,x_11)*step(x_11,e8)\n  )))))));\n}\n\nvec4 salinity (float x_26) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.16470588235294117,0.09411764705882353,0.4235294117647059,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.12941176470588237,0.19607843137254902,0.6352941176470588,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.058823529411764705,0.35294117647058826,0.5686274509803921,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.1568627450980392,0.4627450980392157,0.5372549019607843,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.23137254901960785,0.5725490196078431,0.5294117647058824,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.30980392156862746,0.6862745098039216,0.49411764705882355,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.47058823529411764,0.796078431372549,0.40784313725490196,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.7568627450980392,0.8666666666666667,0.39215686274509803,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9921568627450981,0.9372549019607843,0.6039215686274509,1);\n  float a0 = smoothstep(e0,e1,x_26);\n  float a1 = smoothstep(e1,e2,x_26);\n  float a2 = smoothstep(e2,e3,x_26);\n  float a3 = smoothstep(e3,e4,x_26);\n  float a4 = smoothstep(e4,e5,x_26);\n  float a5 = smoothstep(e5,e6,x_26);\n  float a6 = smoothstep(e6,e7,x_26);\n  float a7 = smoothstep(e7,e8,x_26);\n  return max(mix(v0,v1,a0)*step(e0,x_26)*step(x_26,e1),\n    max(mix(v1,v2,a1)*step(e1,x_26)*step(x_26,e2),\n    max(mix(v2,v3,a2)*step(e2,x_26)*step(x_26,e3),\n    max(mix(v3,v4,a3)*step(e3,x_26)*step(x_26,e4),\n    max(mix(v4,v5,a4)*step(e4,x_26)*step(x_26,e5),\n    max(mix(v5,v6,a5)*step(e5,x_26)*step(x_26,e6),\n    max(mix(v6,v7,a6)*step(e6,x_26)*step(x_26,e7),mix(v7,v8,a7)*step(e7,x_26)*step(x_26,e8)\n  )))))));\n}\n\nvec4 temperature (float x_8) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.01568627450980392,0.13725490196078433,0.2,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.09019607843137255,0.2,0.47843137254901963,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.3333333333333333,0.23137254901960785,0.615686274509804,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.5058823529411764,0.30980392156862746,0.5607843137254902,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.6862745098039216,0.37254901960784315,0.5098039215686274,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8705882352941177,0.4392156862745098,0.396078431372549,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.9764705882352941,0.5725490196078431,0.25882352941176473,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9764705882352941,0.7686274509803922,0.2549019607843137,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9098039215686274,0.9803921568627451,0.3568627450980392,1);\n  float a0 = smoothstep(e0,e1,x_8);\n  float a1 = smoothstep(e1,e2,x_8);\n  float a2 = smoothstep(e2,e3,x_8);\n  float a3 = smoothstep(e3,e4,x_8);\n  float a4 = smoothstep(e4,e5,x_8);\n  float a5 = smoothstep(e5,e6,x_8);\n  float a6 = smoothstep(e6,e7,x_8);\n  float a7 = smoothstep(e7,e8,x_8);\n  return max(mix(v0,v1,a0)*step(e0,x_8)*step(x_8,e1),\n    max(mix(v1,v2,a1)*step(e1,x_8)*step(x_8,e2),\n    max(mix(v2,v3,a2)*step(e2,x_8)*step(x_8,e3),\n    max(mix(v3,v4,a3)*step(e3,x_8)*step(x_8,e4),\n    max(mix(v4,v5,a4)*step(e4,x_8)*step(x_8,e5),\n    max(mix(v5,v6,a5)*step(e5,x_8)*step(x_8,e6),\n    max(mix(v6,v7,a6)*step(e6,x_8)*step(x_8,e7),mix(v7,v8,a7)*step(e7,x_8)*step(x_8,e8)\n  )))))));\n}\n\nvec4 turbidity (float x_2) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.13333333333333333,0.12156862745098039,0.10588235294117647,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.2549019607843137,0.19607843137254902,0.1607843137254902,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.3843137254901961,0.27058823529411763,0.20392156862745098,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.5137254901960784,0.34901960784313724,0.2235294117647059,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.6313725490196078,0.4392156862745098,0.23137254901960785,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.7254901960784313,0.5490196078431373,0.25882352941176473,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.792156862745098,0.6823529411764706,0.34509803921568627,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.8470588235294118,0.8196078431372549,0.49411764705882355,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9137254901960784,0.9647058823529412,0.6705882352941176,1);\n  float a0 = smoothstep(e0,e1,x_2);\n  float a1 = smoothstep(e1,e2,x_2);\n  float a2 = smoothstep(e2,e3,x_2);\n  float a3 = smoothstep(e3,e4,x_2);\n  float a4 = smoothstep(e4,e5,x_2);\n  float a5 = smoothstep(e5,e6,x_2);\n  float a6 = smoothstep(e6,e7,x_2);\n  float a7 = smoothstep(e7,e8,x_2);\n  return max(mix(v0,v1,a0)*step(e0,x_2)*step(x_2,e1),\n    max(mix(v1,v2,a1)*step(e1,x_2)*step(x_2,e2),\n    max(mix(v2,v3,a2)*step(e2,x_2)*step(x_2,e3),\n    max(mix(v3,v4,a3)*step(e3,x_2)*step(x_2,e4),\n    max(mix(v4,v5,a4)*step(e4,x_2)*step(x_2,e5),\n    max(mix(v5,v6,a5)*step(e5,x_2)*step(x_2,e6),\n    max(mix(v6,v7,a6)*step(e6,x_2)*step(x_2,e7),mix(v7,v8,a7)*step(e7,x_2)*step(x_2,e8)\n  )))))));\n}\n\nvec4 velocity_blue_3888592876 (float x_40) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.06666666666666667,0.12549019607843137,0.25098039215686274,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.13725490196078433,0.20392156862745098,0.4549019607843137,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.11372549019607843,0.3176470588235294,0.611764705882353,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.12156862745098039,0.44313725490196076,0.6352941176470588,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.19607843137254902,0.5647058823529412,0.6627450980392157,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.3411764705882353,0.6784313725490196,0.6901960784313725,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.5843137254901961,0.7686274509803922,0.7411764705882353,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.796078431372549,0.8666666666666667,0.8274509803921568,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.996078431372549,0.984313725490196,0.9019607843137255,1);\n  float a0 = smoothstep(e0,e1,x_40);\n  float a1 = smoothstep(e1,e2,x_40);\n  float a2 = smoothstep(e2,e3,x_40);\n  float a3 = smoothstep(e3,e4,x_40);\n  float a4 = smoothstep(e4,e5,x_40);\n  float a5 = smoothstep(e5,e6,x_40);\n  float a6 = smoothstep(e6,e7,x_40);\n  float a7 = smoothstep(e7,e8,x_40);\n  return max(mix(v0,v1,a0)*step(e0,x_40)*step(x_40,e1),\n    max(mix(v1,v2,a1)*step(e1,x_40)*step(x_40,e2),\n    max(mix(v2,v3,a2)*step(e2,x_40)*step(x_40,e3),\n    max(mix(v3,v4,a3)*step(e3,x_40)*step(x_40,e4),\n    max(mix(v4,v5,a4)*step(e4,x_40)*step(x_40,e5),\n    max(mix(v5,v6,a5)*step(e5,x_40)*step(x_40,e6),\n    max(mix(v6,v7,a6)*step(e6,x_40)*step(x_40,e7),mix(v7,v8,a7)*step(e7,x_40)*step(x_40,e8)\n  )))))));\n}\n\nvec4 velocity_green_2558432129 (float x_27) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.09019607843137255,0.13725490196078433,0.07450980392156863,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.09411764705882353,0.25098039215686274,0.14901960784313725,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.043137254901960784,0.37254901960784315,0.17647058823529413,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.15294117647058825,0.4823529411764706,0.13725490196078433,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.37254901960784315,0.5725490196078431,0.047058823529411764,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.596078431372549,0.6470588235294118,0.07058823529411765,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.788235294117647,0.7294117647058823,0.27058823529411763,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9137254901960784,0.8470588235294118,0.5372549019607843,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(1,0.9921568627450981,0.803921568627451,1);\n  float a0 = smoothstep(e0,e1,x_27);\n  float a1 = smoothstep(e1,e2,x_27);\n  float a2 = smoothstep(e2,e3,x_27);\n  float a3 = smoothstep(e3,e4,x_27);\n  float a4 = smoothstep(e4,e5,x_27);\n  float a5 = smoothstep(e5,e6,x_27);\n  float a6 = smoothstep(e6,e7,x_27);\n  float a7 = smoothstep(e7,e8,x_27);\n  return max(mix(v0,v1,a0)*step(e0,x_27)*step(x_27,e1),\n    max(mix(v1,v2,a1)*step(e1,x_27)*step(x_27,e2),\n    max(mix(v2,v3,a2)*step(e2,x_27)*step(x_27,e3),\n    max(mix(v3,v4,a3)*step(e3,x_27)*step(x_27,e4),\n    max(mix(v4,v5,a4)*step(e4,x_27)*step(x_27,e5),\n    max(mix(v5,v6,a5)*step(e5,x_27)*step(x_27,e6),\n    max(mix(v6,v7,a6)*step(e6,x_27)*step(x_27,e7),mix(v7,v8,a7)*step(e7,x_27)*step(x_27,e8)\n  )))))));\n}\n\nvec4 cubehelix (float x_37) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.07;\n  const vec4 v1 = vec4(0.08627450980392157,0.0196078431372549,0.23137254901960785,1);\n  const float e2 = 0.13;\n  const vec4 v2 = vec4(0.23529411764705882,0.01568627450980392,0.4117647058823529,1);\n  const float e3 = 0.2;\n  const vec4 v3 = vec4(0.42745098039215684,0.00392156862745098,0.5294117647058824,1);\n  const float e4 = 0.27;\n  const vec4 v4 = vec4(0.6313725490196078,0,0.5764705882352941,1);\n  const float e5 = 0.33;\n  const vec4 v5 = vec4(0.8235294117647058,0.00784313725490196,0.5568627450980392,1);\n  const float e6 = 0.4;\n  const vec4 v6 = vec4(0.984313725490196,0.043137254901960784,0.4823529411764706,1);\n  const float e7 = 0.47;\n  const vec4 v7 = vec4(1,0.11372549019607843,0.3803921568627451,1);\n  const float e8 = 0.53;\n  const vec4 v8 = vec4(1,0.21176470588235294,0.27058823529411763,1);\n  const float e9 = 0.6;\n  const vec4 v9 = vec4(1,0.3333333333333333,0.1803921568627451,1);\n  const float e10 = 0.67;\n  const vec4 v10 = vec4(1,0.47058823529411764,0.13333333333333333,1);\n  const float e11 = 0.73;\n  const vec4 v11 = vec4(1,0.615686274509804,0.1450980392156863,1);\n  const float e12 = 0.8;\n  const vec4 v12 = vec4(0.9450980392156862,0.7490196078431373,0.2235294117647059,1);\n  const float e13 = 0.87;\n  const vec4 v13 = vec4(0.8784313725490196,0.8627450980392157,0.36470588235294116,1);\n  const float e14 = 0.93;\n  const vec4 v14 = vec4(0.8549019607843137,0.9450980392156862,0.5568627450980392,1);\n  const float e15 = 1.0;\n  const vec4 v15 = vec4(0.8901960784313725,0.9921568627450981,0.7764705882352941,1);\n  float a0 = smoothstep(e0,e1,x_37);\n  float a1 = smoothstep(e1,e2,x_37);\n  float a2 = smoothstep(e2,e3,x_37);\n  float a3 = smoothstep(e3,e4,x_37);\n  float a4 = smoothstep(e4,e5,x_37);\n  float a5 = smoothstep(e5,e6,x_37);\n  float a6 = smoothstep(e6,e7,x_37);\n  float a7 = smoothstep(e7,e8,x_37);\n  float a8 = smoothstep(e8,e9,x_37);\n  float a9 = smoothstep(e9,e10,x_37);\n  float a10 = smoothstep(e10,e11,x_37);\n  float a11 = smoothstep(e11,e12,x_37);\n  float a12 = smoothstep(e12,e13,x_37);\n  float a13 = smoothstep(e13,e14,x_37);\n  float a14 = smoothstep(e14,e15,x_37);\n  return max(mix(v0,v1,a0)*step(e0,x_37)*step(x_37,e1),\n    max(mix(v1,v2,a1)*step(e1,x_37)*step(x_37,e2),\n    max(mix(v2,v3,a2)*step(e2,x_37)*step(x_37,e3),\n    max(mix(v3,v4,a3)*step(e3,x_37)*step(x_37,e4),\n    max(mix(v4,v5,a4)*step(e4,x_37)*step(x_37,e5),\n    max(mix(v5,v6,a5)*step(e5,x_37)*step(x_37,e6),\n    max(mix(v6,v7,a6)*step(e6,x_37)*step(x_37,e7),\n    max(mix(v7,v8,a7)*step(e7,x_37)*step(x_37,e8),\n    max(mix(v8,v9,a8)*step(e8,x_37)*step(x_37,e9),\n    max(mix(v9,v10,a9)*step(e9,x_37)*step(x_37,e10),\n    max(mix(v10,v11,a10)*step(e10,x_37)*step(x_37,e11),\n    max(mix(v11,v12,a11)*step(e11,x_37)*step(x_37,e12),\n    max(mix(v12,v13,a12)*step(e12,x_37)*step(x_37,e13),\n    max(mix(v13,v14,a13)*step(e13,x_37)*step(x_37,e14),mix(v14,v15,a14)*step(e14,x_37)*step(x_37,e15)\n  ))))))))))))));\n}\n\n// our texture\nuniform usampler2D channel0;\nuniform usampler2D channel1;\nuniform usampler2D channel2;\nuniform usampler2D channel3;\nuniform usampler2D channel4;\nuniform usampler2D channel5;\n\n// range\nuniform vec2 sliderValues[6];\n\n// opacity\nuniform float opacity;\nuniform float divisor;\n\nin vec2 vTexCoord;\n\nout vec4 color;\n\nvoid main() {\n  float intensityValue0 = (float(texture(channel0, vTexCoord).r) - sliderValues[0][0]) / max(0.0005, (sliderValues[0][1] - sliderValues[0][0]));\n  float intensityValue1 = (float(texture(channel1, vTexCoord).r) - sliderValues[1][0]) / max(0.0005, (sliderValues[1][1] - sliderValues[1][0]));\n  float intensityValue2 = (float(texture(channel2, vTexCoord).r) - sliderValues[2][0]) / max(0.0005, (sliderValues[2][1] - sliderValues[2][0]));\n  float intensityValue3 = (float(texture(channel3, vTexCoord).r) - sliderValues[3][0]) / max(0.0005, (sliderValues[3][1] - sliderValues[3][0]));\n  float intensityValue4 = (float(texture(channel4, vTexCoord).r) - sliderValues[4][0]) / max(0.0005, (sliderValues[4][1] - sliderValues[4][0]));\n  float intensityValue5 = (float(texture(channel5, vTexCoord).r) - sliderValues[5][0]) / max(0.0005, (sliderValues[5][1] - sliderValues[5][0]));\n\n  float intensityArray[6] = float[6](intensityValue0, intensityValue1, intensityValue2, intensityValue3, intensityValue4, intensityValue5);\n  float intensityCombo = 0.0;\n  for(int i = 0; i < 6; i++) {\n    intensityCombo += max(0.0,intensityArray[i]);\n  }\n  color = vec4(colormapFunction(min(1.0,intensityCombo)).xyz, opacity);\n  geometry.uv = vTexCoord;\n  DECKGL_FILTER_COLOR(color, geometry);\n}\n").replace("colormapFunction",i):o,u="<f4"===a?s.replace(/usampler/g,"sampler"):s;return S()(Q()(n.prototype),"getShaders",this).call(this,{vs:t?"#define GLSLIFY 1\n#define SHADER_NAME xr-layer-vertex-shader\n\nattribute vec2 texCoords;\nattribute vec3 positions;\nattribute vec3 positions64Low;\nattribute vec3 instancePickingColors;\n\nvarying vec2 vTexCoord;\n\nvoid main(void) {\n  geometry.worldPosition = positions;\n  geometry.uv = texCoords;\n  geometry.pickingColor = instancePickingColors;\n  gl_Position = project_position_to_clipspace(positions, positions64Low, vec3(0.0), geometry.position);\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n  vTexCoord = texCoords;\n  vec4 color = vec4(0.0);\n  DECKGL_FILTER_COLOR(color, geometry);\n}\n":"#version 300 es\n#define GLSLIFY 1\n#define SHADER_NAME xr-layer-vertex-shader\n\nin vec2 texCoords;\nin vec3 positions;\nin vec3 positions64Low;\nin vec3 instancePickingColors;\n\nout vec2 vTexCoord;\n\nvoid main(void) {\n  geometry.worldPosition = positions;\n  geometry.uv = texCoords;\n  geometry.pickingColor = instancePickingColors;\n  gl_Position = project_position_to_clipspace(positions, positions64Low, vec3(0.0), geometry.position);\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n  vTexCoord = texCoords;\n  vec4 color = vec4(0.0);\n  DECKGL_FILTER_COLOR(color, geometry);\n}",fs:u,modules:[k.project32,k.picking]})}},{key:"initializeState",value:function(){this.getAttributeManager().add({positions:{size:3,type:L.a.DOUBLE,fp64:this.use64bitPositions(),update:this.calculatePositions,noAlloc:!0}}),this.setState({numInstances:1,positions:new Float64Array(12)})}},{key:"finalizeState",value:function(){S()(Q()(n.prototype),"finalizeState",this).call(this),this.state.textures&&Object.values(this.state.textures).forEach((function(e){return e&&e.delete()}))}},{key:"updateState",value:function(e){var t=e.props,n=e.oldProps;if(e.changeFlags.extensionsChanged||t.colormap!==n.colormap){var r=this.context.gl;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(r)}),this.getAttributeManager().invalidateAll()}t.channelData!==n.channelData&&this.loadTexture(t.channelData);var i=this.getAttributeManager();t.bounds!==n.bounds&&i.invalidate("positions")}},{key:"_getModel",value:function(e){return e?new _.Model(e,X(X({},this.getShaders()),{},{id:this.props.id,geometry:new _.Geometry({drawMode:L.a.TRIANGLE_FAN,vertexCount:4,attributes:{texCoords:new Float32Array([0,1,0,0,1,0,1,1])}}),isInstanced:!1})):null}},{key:"calculatePositions",value:function(e){var t=this.state.positions,n=this.props.bounds;t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[0],t[4]=n[3],t[5]=0,t[6]=n[2],t[7]=n[3],t[8]=0,t[9]=n[2],t[10]=n[1],t[11]=0,e.value=t}},{key:"draw",value:function(e){var t=e.uniforms,n=this.state,r=n.textures,i=n.model;if(r&&i){var a=this.props,o=a.sliderValues,s=a.colorValues,u=a.opacity,A=a.domain,c=a.dtype,l=a.channelIsOn,f=a.unprojectLensBounds,h=a.bounds,g=a.isLensOn,d=a.lensSelection,p=a.lensBorderColor,v=a.lensBorderRadius,y=Object.values(r).filter((function(e){return e})).length,m=function(e){var t=e.sliderValues,n=e.colorValues,r=e.channelIsOn,i=e.domain,a=e.dtype,o=[t.length,n.length];if(o.every((function(e){return e!==o[0]})))throw Error("Inconsistent number of slider values and colors provided");var s=n.map((function(e,t){return r[t]?e.map((function(e){return e/255})):P})),u=i&&i[1]||G[a].max,A=t.map((function(e,t){return r[t]?e:[u,u]})),c=U-s.length;if(c<0)throw Error("".concat(o," channels passed in, but only 6 are allowed."));var l=J(s,P,c);return{paddedSliderValues:J(A,[u,u],c).reduce((function(e,t){return e.concat(t)}),[]),paddedColorValues:l.reduce((function(e,t){return e.concat(t)}),[])}}({sliderValues:o.slice(0,y),colorValues:s.slice(0,y),channelIsOn:l.slice(0,y),domain:A,dtype:c}),I=m.paddedSliderValues,b=m.paddedColorValues,E=F()(f,4),C=E[0],B=E[1],w=E[2],Q=E[3],k=F()(h,4),_=k[0],x=k[1],S=k[2],O=k[3],D=(C-_)/(S-_),R=(B-O)/(x-O),j=(w-_)/(S-_),M=(Q-O)/(x-O);i.setUniforms(X(X({},t),{},{colorValues:b,sliderValues:I,opacity:u,majorLensAxis:(j-D)/2,minorLensAxis:(R-M)/2,lensCenter:[(j+D)/2,(R+M)/2],isLensOn:g,lensSelection:d,lensBorderColor:p,lensBorderRadius:v},r)).draw()}}},{key:"loadTexture",value:function(e){var t=this,n={channel0:null,channel1:null,channel2:null,channel3:null,channel4:null,channel5:null};this.state.textures&&Object.values(this.state.textures).forEach((function(e){return e&&e.delete()})),e&&Object.keys(e).length>0&&e.data&&(e.data.forEach((function(r,i){n["channel".concat(i)]=t.dataToTexture(r,e.width,e.height)}),this),this.setState({textures:n}))}},{key:"dataToTexture",value:function(e,t,n){var r,i=this.context.gl,a=!Object(_.isWebGL2)(i),o=this.props.dtype,s=G[o],u=s.format,A=s.dataFormat,c=s.type;return new _.Texture2D(this.context.gl,{width:t,height:n,data:e,mipmaps:!1,parameters:(r={},D()(r,L.a.TEXTURE_MIN_FILTER,L.a.NEAREST),D()(r,L.a.TEXTURE_MAG_FILTER,L.a.NEAREST),D()(r,L.a.TEXTURE_WRAP_S,L.a.CLAMP_TO_EDGE),D()(r,L.a.TEXTURE_WRAP_T,L.a.CLAMP_TO_EDGE),r),format:a?L.a.LUMINANCE:u,dataFormat:a?L.a.LUMINANCE:A,type:a?L.a.FLOAT:c})}}]),n}(k.Layer);ee.layerName="XRLayer",ee.defaultProps=$;var te=ee;function ne(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q()(e);if(t){var i=Q()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}function re(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 ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach((function(t){D()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ae=ie(ie({},R.TileLayer.defaultProps),{},{pickable:!0,coordinateSystem:k.COORDINATE_SYSTEM.CARTESIAN,sliderValues:{type:"array",value:[],compare:!0},colorValues:{type:"array",value:[],compare:!0},channelIsOn:{type:"array",value:[],compare:!0},minZoom:{type:"number",value:0,compare:!0},maxZoom:{type:"number",value:0,compare:!0},renderSubLayers:{type:"function",value:function(e){var t=e.tile,n=t.bbox,r=n.left,i=n.top,a=n.right,o=n.bottom,s=t.x,u=t.y,A=t.z,c=e.colorValues,l=e.sliderValues,f=e.channelIsOn,h=e.visible,g=e.opacity,d=e.data,p=e.colormap,v=e.dtype,y=e.id,m=e.onHover,I=e.pickable,b=e.unprojectLensBounds,E=e.isLensOn,C=e.lensSelection,B=e.onClick;return[r,o,a,i].some((function(e){return e<0}))?null:new te(e,{id:"XRLayer-".concat(r,"-").concat(o,"-").concat(a,"-").concat(i,"-").concat(y),bounds:[r,o,a,i],channelData:d,pickable:I,data:null,sliderValues:l,colorValues:c,channelIsOn:f,opacity:g,visible:h,dtype:v,colormap:p,onHover:m,unprojectLensBounds:b,isLensOn:E,lensSelection:C,tileId:{x:s,y:u,z:A},onClick:B})},compare:!1},opacity:{type:"number",value:1,compare:!0},colormap:{type:"string",value:"",compare:!0},dtype:{type:"string",value:"<u2",compare:!0},domain:{type:"array",value:[],compare:!0},viewportId:{type:"string",value:"",compare:!0},unprojectLensBounds:{type:"array",value:[0,0,0,0],compare:!0},isLensOn:{type:"boolean",value:!1,compare:!0},lensSelection:{type:"number",value:0,compare:!0},lensRadius:{type:"number",value:100,compare:!0},lensBorderColor:{type:"array",value:[255,255,255],compare:!0},lensBorderRadius:{type:"number",value:.02,compare:!0}}),oe=function(e){E()(n,e);var t=ne(n);function n(){return y()(this,n),t.apply(this,arguments)}return I()(n,[{key:"_updateTileset",value:function(){this.props.viewportId||S()(Q()(n.prototype),"_updateTileset",this).call(this),(this.props.viewportId&&this.context.viewport.id===this.props.viewportId||!this.state.tileset._viewport)&&S()(Q()(n.prototype),"_updateTileset",this).call(this)}}]),n}(R.TileLayer);oe.layerName="MultiscaleImageLayerBase",oe.defaultProps=ae;var se=n(18),ue=n.n(se);function Ae(e,t,n){for(var r=e.data,i=e.width,a=e.height,o=new r.constructor(t*n),s=0;s<a;s+=1){var u=s*i,A=r.subarray(u,u+i);o.set(A,s*t)}return o}function ce(e){for(var t=e.BYTES_PER_ELEMENT,n=new Uint8Array(e.buffer,e.byteOffset,e.length*t),r=t/2,i=t-1,a=0,o=0;o<n.length;o+=t)for(var s=0;s<r;s+=1)a=n[o+s],n[o+s]=n[o+i-s],n[o+i-s]=a}function le(e){return fe.apply(this,arguments)}function fe(){return(fe=p()(g.a.mark((function e(t){var n,r,i,a,o,s;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.loader,r=t.loaderSelection,i=n.isPyramid?n.numLevels-1:0,e.next=4,n.getRaster({z:i,loaderSelection:r});case 4:return a=e.sent,o=a.data,s=o.map((function(e){for(var t=e.length,n=1/0,r=-1/0,i=0;t--;)e[t]<n&&(n=e[t]),e[t]>r&&(r=e[t]),i+=e[t];var a=i/e.length;t=e.length;for(var o=0;t--;)o+=Math.pow(e[t]-a,2);var s=Math.pow(o/e.length,.5),u=Math.floor(e.length/2),A=Math.floor(e.length/4),c=3*Math.floor(e.length/4);ue()(e,u);var l=e[u];ue()(e,A,0,u);var f=e[A];ue()(e,c,u,e.length-1);var h=e[c],g=e.filter((function(e){return e>=1})),d=Math.floor(.9995*g.length),p=Math.floor(5e-4*g.length);return ue()(g,d),ue()(g,p,0,d),{mean:a,sd:s,q1:f,q3:h,median:l,data:e,domain:[n,r],autoSliders:[g[p],g[d]]}})),e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function he(e,t){return ge.apply(this,arguments)}function ge(){return(ge=p()(g.a.mark((function e(t,n){var r,i,a;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=Uint8Array,e.next=3,t.getItem(n);case 3:return e.t1=e.sent,r=new e.t0(e.t1),i=new TextDecoder("utf-8"),a=JSON.parse(i.decode(r)),e.abrupt("return",a);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function de(e){var t=e.SizeZ,n=e.SizeT;return e.DimensionOrder.toLowerCase().split("").slice().reverse().map((function(r){if("x"===r||"y"===r)return{field:r,type:"quantitative",values:null};if("c"===r)return{field:"channel",type:"nominal",values:e.getChannelNames()};return"t"===r?{field:"time",type:"ordinal",values:Y(n)}:{field:r,type:"ordinal",values:Y(t)}}))}function pe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.map((function(e,t){return 0===t?e.trim().replace(/[/]*$/g,""):e.trim().replace(/(^[/]*|[/]*$)/g,"")})).filter((function(e){return e.length})).join("/")}function ve(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q()(e);if(t){var i=Q()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var ye={pickable:!0,coordinateSystem:k.COORDINATE_SYSTEM.CARTESIAN,sliderValues:{type:"array",value:[],compare:!0},channelIsOn:{type:"array",value:[],compare:!0},colorValues:{type:"array",value:[],compare:!0},loaderSelection:{type:"array",value:[],compare:!0},colormap:{type:"string",value:"",compare:!0},domain:{type:"array",value:[],compare:!0},translate:{type:"array",value:[0,0],compare:!0},scale:{type:"number",value:1,compare:!0},boxSize:{type:"number",value:0,compare:!0},viewportId:{type:"string",value:"",compare:!0},loader:{type:"object",value:{getRaster:function(){var e=p()(g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{data:[],height:0,width:0});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),dtype:"<u2"},compare:!0},z:{type:"number",value:0,compare:!0},isLensOn:{type:"boolean",value:!1,compare:!0},lensSelection:{type:"number",value:0,compare:!0},lensRadius:{type:"number",value:100,compare:!0},lensBorderColor:{type:"array",value:[255,255,255],compare:!0},lensBorderRadius:{type:"number",value:.02,compare:!0},onClick:{type:"function",value:null,compare:!0}};function me(e,t,n,r){var i=r||(t%2===0?t:t+1),a=r||n;return{data:e.map((function(e){return Ae({data:e,width:t,height:n},i,a)})),width:i,height:a}}var Ie=function(e){E()(n,e);var t=ve(n);function n(){return y()(this,n),t.apply(this,arguments)}return I()(n,[{key:"initializeState",value:function(){var e=this;this.state={unprojectLensBounds:[0,0,0,0],width:0,height:0,data:[]};var t=this.props,n=t.loader,r=t.z,i=t.loaderSelection,a=t.boxSize;n.getRaster({z:r,loaderSelection:i}).then((function(t){var n=t.data,r=t.width,i=t.height;e.setState(me(Object(_.isWebGL2)(e.context.gl)?n:z(n),r,i,a))})),this.context.deck&&this.context.deck.eventManager.on({pointermove:function(){return W(e)},pointerleave:function(){return W(e)},wheel:function(){return W(e)}})}},{key:"updateState",value:function(e){var t=this,n=e.changeFlags,r=e.props,i=e.oldProps,a=n.propsChanged,o="string"===typeof a&&a.includes("props.loader"),s=r.loaderSelection!==i.loaderSelection;if(o||s){var u=this.props,A=u.loader,c=u.z,l=u.loaderSelection,f=u.boxSize;A.getRaster({z:c,loaderSelection:l}).then((function(e){var n=e.data,r=e.width,i=e.height;t.setState(me(Object(_.isWebGL2)(t.context.gl)?n:z(n),r,i,f))}))}}},{key:"getPickingInfo",value:function(e){var t=e.info,n=e.sourceLayer;return t.sourceLayer=n,t.tile=n.props.tile,t}},{key:"renderLayers",value:function(){var e=this.props,t=e.loader,n=e.visible,r=e.opacity,i=e.colormap,a=e.sliderValues,o=e.colorValues,s=e.channelIsOn,u=e.translate,A=e.scale,c=e.z,l=e.domain,f=e.pickable,h=e.isLensOn,g=e.lensSelection,d=e.lensBorderColor,p=e.lensRadius,v=e.id,y=e.onClick,m=e.onHover,I=t.dtype,b=this.state,E=b.data,C=b.width,B=b.height,w=b.unprojectLensBounds;if(!C||!B)return null;var Q=function(e){var t=e.width,n=e.height,r=e.translate,i=e.scale,a=F()(r,2),o=a[0],s=a[1];return[o,n*i+s,t*i+o,s]}({width:C,height:B,translate:u,scale:A});return new te(this.props,{channelData:{data:E,width:C,height:B},pickable:f,bounds:Q,sliderValues:a,colorValues:o,channelIsOn:s,domain:l,id:"XR-Static-Layer-".concat(0,"-",B,"-").concat(C,"-",0,"-").concat(c,"-").concat(v),coordinateSystem:k.COORDINATE_SYSTEM.CARTESIAN,opacity:r,visible:n,dtype:I,colormap:i,unprojectLensBounds:w,isLensOn:h,lensSelection:g,lensBorderColor:d,lensRadius:p,onClick:y,onHover:m})}}]),n}(k.CompositeLayer);function be(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q()(e);if(t){var i=Q()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}Ie.layerName="ImageLayer",Ie.defaultProps=ye;var Ee=function(e){E()(n,e);var t=be(n);function n(){return y()(this,n),t.apply(this,arguments)}return I()(n,[{key:"initializeState",value:function(){var e=this;this.state={unprojectLensBounds:[0,0,0,0]},this.context.deck&&this.context.deck.eventManager.on({pointermove:function(){return W(e)},pointerleave:function(){return W(e)},wheel:function(){return W(e)}})}},{key:"renderLayers",value:function(){var e=this.props,t=e.loader,n=e.sliderValues,r=e.colorValues,i=e.channelIsOn,a=e.loaderSelection,o=e.domain,s=e.opacity,u=e.colormap,A=e.viewportId,c=e.onTileError,l=e.onHover,f=e.pickable,h=e.id,d=e.isLensOn,v=e.lensSelection,y=e.lensBorderColor,m=e.lensBorderRadius,I=e.maxRequests,b=e.onClick,E=t.tileSize,C=t.numLevels,B=t.dtype,w=this.state.unprojectLensBounds,Q=!Object(_.isWebGL2)(this.context.gl),k=function(){var e=p()(g.a.mark((function e(n){var r,i,o,s,u;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.x,i=n.y,o=n.z,s=n.signal,e.next=3,t.getTile({x:r,y:i,z:Math.round(-o+Math.log2(512/E)),loaderSelection:a,signal:s});case 3:return(u=e.sent)&&(u.data=Q?z(u.data):u.data,u.width===E&&u.height===E||console.warn("Tile data  { width: ".concat(u.width,", height: ").concat(u.height," } does not match tilesize: ").concat(E))),e.abrupt("return",u);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=t.getRasterSize({z:0}),S=x.height,O=x.width,D=new oe(this.props,{id:"Tiled-Image-".concat(h),getTileData:k,dtype:B,tileSize:E,onClick:b,extent:[0,0,O,S],minZoom:-(C-1),maxZoom:Math.min(0,Math.round(Math.log2(512/E))),colorValues:r,sliderValues:n,channelIsOn:i,maxRequests:I,domain:o,refinementStrategy:1===s?"best-available":"no-overlap",updateTriggers:{getTileData:[t,a]},onTileError:c||t.onTileError,opacity:s,colormap:u,viewportId:A,onHover:l,pickable:f,unprojectLensBounds:w,isLensOn:d,lensSelection:v,lensBorderColor:y,lensBorderRadius:m}),R="function"===typeof t.getRaster,j=t.getRasterSize({z:C-1}),M=j.width,N=j.height;return[R&&new Ie(this.props,{id:"Background-Image-".concat(h),scale:Math.pow(2,C-1),visible:1===s||-C>this.context.viewport.zoom&&(!A||this.context.viewport.id===A),z:C-1,pickable:!0,onHover:l,onClick:b,boxSize:K(M,N)}),D]}}]),n}(k.CompositeLayer);Ee.layerName="MultiscaleImageLayer",Ee.defaultProps={pickable:!0,onHover:{type:"function",value:null,compare:!1},sliderValues:{type:"array",value:[],compare:!0},colorValues:{type:"array",value:[],compare:!0},channelIsOn:{type:"array",value:[],compare:!0},opacity:{type:"number",value:1,compare:!0},colormap:{type:"string",value:"",compare:!0},domain:{type:"array",value:[],compare:!0},viewportId:{type:"string",value:"",compare:!0},isLensOn:{type:"boolean",value:!1,compare:!0},lensSelection:{type:"number",value:0,compare:!0},lensRadius:{type:"number",value:100,compare:!0},lensBorderColor:{type:"array",value:[255,255,255],compare:!0},lensBorderRadius:{type:"number",value:.02,compare:!0},maxRequests:{type:"number",value:10,compare:!0},onClick:{type:"function",value:null,compare:!0}};var Ce=Ee,Be=n(14);function we(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q()(e);if(t){var i=Q()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var Qe={pickable:!0,loader:{type:"object",value:{getRaster:function(){var e=p()(g.a.mark((function e(){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{data:[],height:0,width:0});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),getRasterSize:function(){return{height:0,width:0}},dtype:"<u2"},compare:!0},id:{type:"string",value:"",compare:!0},boundingBox:{type:"array",value:[[0,0],[0,1],[1,1],[1,0]],compare:!0},boundingBoxColor:{type:"array",value:[255,0,0],compare:!0},boundingBoxOutlineWidth:{type:"number",value:1,compare:!0},viewportOutlineColor:{type:"array",value:[255,190,0],compare:!0},viewportOutlineWidth:{type:"number",value:2,compare:!0},overviewScale:{type:"number",value:1,compare:!0},zoom:{type:"number",value:1,compare:!0}},ke=function(e){E()(n,e);var t=we(n);function n(){return y()(this,n),t.apply(this,arguments)}return I()(n,[{key:"renderLayers",value:function(){var e=this.props,t=e.loader,n=e.id,r=e.zoom,i=e.boundingBox,a=e.boundingBoxColor,o=e.boundingBoxOutlineWidth,s=e.viewportOutlineColor,u=e.viewportOutlineWidth,A=e.overviewScale,c=t.numLevels,l=t.getRasterSize({z:0}),f=l.width,h=l.height,g=t.getRasterSize({z:c-1}),d=g.width,p=g.height;return[new Ie(this.props,{id:"viewport-".concat(n),scale:Math.pow(2,c-1)*A,z:c-1,boxSize:K(d,p)}),new Be.PolygonLayer({id:"bounding-box-overview-".concat(n),coordinateSystem:k.COORDINATE_SYSTEM.CARTESIAN,data:[i],getPolygon:function(e){return e},filled:!1,stroked:!0,getLineColor:a,getLineWidth:o*Math.pow(2,r)}),new Be.PolygonLayer({id:"viewport-outline-".concat(n),coordinateSystem:k.COORDINATE_SYSTEM.CARTESIAN,data:[[[0,0],[f*A,0],[f*A,h*A],[0,h*A]]],getPolygon:function(e){return e},filled:!1,stroked:!0,getLineColor:s,getLineWidth:u*Math.pow(2,r)})]}}]),n}(k.CompositeLayer);function _e(e){return"-#".concat(e,"#")}function xe(e){var t=(new k.OrthographicView).makeViewport({viewState:e,height:e.height,width:e.width});return[t.unproject([0,0]),t.unproject([t.width,0]),t.unproject([t.width,t.height]),t.unproject([0,t.height])]}function Se(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q()(e);if(t){var i=Q()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}ke.layerName="OverviewLayer",ke.defaultProps=Qe;var Oe=function(e){E()(n,e);var t=Se(n);function n(){return y()(this,n),t.apply(this,arguments)}return I()(n,[{key:"renderLayers",value:function(){var e=this.props,t=e.id,n=e.unit,r=e.size,i=e.position,a=e.viewState,o=e.length,s=xe(a),u=a.zoom,A=.05*(s[2][0]-s[0][0]),c=Math.max(Math.pow(2,1.5-u),.007*(s[2][1]-s[0][1])),l=A*r,f=function(e,t,n){var r=e[2][0]-e[0][0];switch(t){case"bottom-right":return[e[2][1]-(e[2][1]-e[0][1])*n,e[2][0]-r*n];case"top-right":return[(e[2][1]-e[0][1])*n,e[2][0]-r*n];case"top-left":return[(e[2][1]-e[0][1])*n,r*n];case"bottom-left":return[e[2][1]-(e[2][1]-e[0][1])*n,r*n];default:throw new Error("Position ".concat(t," not found"))}}(s,i,o),h=F()(f,2),g=h[0],d=h[1];return[new Be.LineLayer({id:"scale-bar-length-".concat(t),coordinateSystem:k.COORDINATE_SYSTEM.CARTESIAN,data:[[[d,g],[d+A,g]]],getSourcePosition:function(e){return e[0]},getTargetPosition:function(e){return e[1]},getWidth:2,getColor:[220,220,220]}),new Be.LineLayer({id:"scale-bar-height-left-".concat(t),coordinateSystem:k.COORDINATE_SYSTEM.CARTESIAN,data:[[[d,g-c],[d,g+c]]],getSourcePosition:function(e){return e[0]},getTargetPosition:function(e){return e[1]},getWidth:2,getColor:[220,220,220]}),new Be.LineLayer({id:"scale-bar-height-right-".concat(t),coordinateSystem:k.COORDINATE_SYSTEM.CARTESIAN,data:[[[d+A,g-c],[d+A,g+c]]],getSourcePosition:function(e){return e[0]},getTargetPosition:function(e){return e[1]},getWidth:2,getColor:[220,220,220]}),new Be.TextLayer({id:"units-label-layer-".concat(t),coordinateSystem:k.COORDINATE_SYSTEM.CARTESIAN,data:[{text:String(l).slice(0,5).replace(/\.$/,"")+n,position:[d+.5*A,g+4*c]}],getColor:[220,220,220,255],getSize:12,fontFamily:"-apple-system, 'Helvetica Neue', Arial, sans-serif",sizeUnits:"meters",sizeScale:Math.pow(2,-u),characterSet:[].concat(M()(n.split("")),M()(Y(10).map((function(e){return String(e)}))),["."])})]}}]),n}(k.CompositeLayer);Oe.layerName="ScaleBarLayer",Oe.defaultProps={pickable:!0,viewState:{type:"object",value:{zoom:0,target:[0,0,0]},compare:!0},unit:{type:"string",value:"",compare:!0},size:{type:"number",value:1,compare:!0},position:{type:"string",value:"bottom-right",compare:!0},length:{type:"number",value:.085,compare:!0}};var De=n(20),Re=n.n(De),je=n(16),Me=n.n(je),Ne=n(24),Fe=n.n(Ne);function Te(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 Le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(n),!0).forEach((function(t){D()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pe(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q()(e);if(t){var i=Q()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var Ue=function(e){E()(n,e);var t=Pe(n);function n(e){var r;y()(this,n),(r=t.call(this,e)).state={viewStates:{},initialViewStates:{}};var i=r.state,a=i.viewStates,o=i.initialViewStates;return r.props.views.forEach((function(e){a[e.id]=e.filterViewState({viewState:e.initialViewState}),o[e.id]=e.filterViewState({viewState:e.initialViewState})})),r._onViewStateChange=r._onViewStateChange.bind(Re()(r)),r.layerFilter=r.layerFilter.bind(Re()(r)),r.onHover=r.onHover.bind(Re()(r)),r}return I()(n,[{key:"layerFilter",value:function(e){var t=e.layer,n=e.viewport;return t.id.includes(_e(n.id))}},{key:"_onViewStateChange",value:function(e){var t=e.viewId,n=e.viewState,r=e.oldViewState,i=this.props.views;this.setState((function(e){var a={};return i.forEach((function(i){var o=e.viewStates[i.id];a[i.id]=i.filterViewState({viewState:Le(Le({},n),{},{id:t}),oldViewState:r,currentViewState:o})})),{viewStates:a}}))}},{key:"onHover",value:function(e){var t=e.sourceLayer,n=e.coordinate,r=e.layer;if(!n)return null;var i=this.props.hoverHooks;if(!i)return null;var a=i.handleValue;if(!a)return null;var o=t.props,s=o.channelData,u=o.bounds;if(!s)return null;var A,c=s.data,l=s.width;if(!c)return null;if(t.id.includes("Tiled")){var f=r.props.loader.tileSize,h=t.props.tileId.z,g=Math.max(1,Math.pow(2,Math.round(-h+Math.log2(512/f))));A=[Math.floor((n[0]-u[0])/g),Math.floor((n[1]-u[3])/g)]}else{var d=r.context.viewport.zoom,p=Math.max(1,Math.pow(2,Math.floor(-d)));A=[Math.floor((n[0]-u[0])/p),Math.floor((n[1]-u[3])/p)]}var v=A[1]*l+A[0];a(c.map((function(e){return e[v]})))}},{key:"_renderLayers",value:function(){var e=this.onHover,t=this.state.viewStates,n=this.props,r=n.views,i=n.layerProps;return r.map((function(n,r){return n.getLayers({viewStates:t,props:Le(Le({},i[r]),{},{onHover:e})})}))}},{key:"render",value:function(){var e=this.props,t=e.views,n=e.randomize,r=this.state.viewStates,i=t.map((function(e){return e.getDeckGlView()}));if(n){var a=Math.random(),o=i[0],s=1.49*a,u=Math.round(s*(t.length-1));i[0]=i[u],i[u]=o}return Me.a.createElement(Fe.a,{glOptions:{webgl2:!0},layerFilter:this.layerFilter,layers:this._renderLayers(),onViewStateChange:this._onViewStateChange,views:i,viewState:r,getCursor:function(e){return e.isDragging?"grabbing":"crosshair"}})}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.views;if(n.some((function(e){return!t.viewStates[e.id]||e.initialViewState.height!==t.viewStates[e.id].height||e.initialViewState.width!==t.viewStates[e.id].width}))){var r={};return n.forEach((function(e){var n=e.initialViewState,i=n.height,a=n.width,o=t.viewStates[e.id];r[e.id]=e.filterViewState({viewState:Le(Le({},o||e.initialViewState),{},{height:i,width:a,id:e.id})})})),{viewStates:r}}if(n.some((function(e){return e.initialViewState.target!==t.initialViewStates[e.id].target||e.initialViewState.zoom!==t.initialViewStates[e.id].zoom}))){var i={},a={};return n.forEach((function(e){a[e.id]=e.filterViewState({viewState:e.initialViewState}),i[e.id]=e.filterViewState({viewState:e.initialViewState})})),{initialViewStates:i,viewStates:a}}return t}}]),n}(je.PureComponent),Ge=function(){function e(t){var n=t.initialViewState,r=t.x,i=void 0===r?0:r,a=t.y,o=void 0===a?0:a;y()(this,e);var s=n.height,u=n.width,A=n.id;this.width=u,this.height=s,this.initialViewState=n,this.id=A,this.x=i,this.y=o}return I()(e,[{key:"getDeckGlView",value:function(){var e=this.height,t=this.width,n=this.id,r=this.x,i=this.y;return new k.OrthographicView({id:n,controller:!0,height:e,width:t,x:r,y:i})}},{key:"filterViewState",value:function(e){var t=e.viewState,n=this.id;return t.id===n?t:null}},{key:"getLayers",value:function(e){e.viewStates,e.props}}]),e}();function qe(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q()(e);if(t){var i=Q()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var He=function(e){E()(n,e);var t=qe(n);function n(){return y()(this,n),t.apply(this,arguments)}return I()(n,[{key:"getLayers",value:function(e){var t=e.props,n=e.viewStates,r=t.loader,i=this.id,a=n[i],o=[],s=r.isPyramid?new Ce(t,{id:"".concat(r.type).concat(_e(i)),viewportId:i}):new Ie(t,{id:"".concat(r.type).concat(_e(i)),viewportId:i});o.push(s);var u=r.physicalSizes;if(u){var A=u.x,c=A.unit,l=A.value;c&&l&&o.push(new Oe({id:_e(i),loader:r,unit:c,size:l,viewState:a}))}return o}}]),n}(Ge);function Ye(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 Je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(n),!0).forEach((function(t){D()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ze(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q()(e);if(t){var i=Q()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var Ke=function(e){E()(n,e);var t=ze(n);function n(e){var r,i=e.initialViewState,a=e.loader,o=e.detailHeight,s=e.detailWidth,u=e.scale,A=void 0===u?.2:u,c=e.margin,l=void 0===c?25:c,f=e.position,h=void 0===f?"bottom-right":f,g=e.minimumWidth,d=void 0===g?150:g,p=e.maximumWidth,v=void 0===p?350:p,m=e.minimumHeight,I=void 0===m?150:m,b=e.maximumHeight,E=void 0===b?350:b;return y()(this,n),(r=t.call(this,{initialViewState:i})).margin=l,r.loader=a,r.position=h,r.detailHeight=o,r.detailWidth=s,r._setHeightWidthScale({detailWidth:s,detailHeight:o,scale:A,minimumWidth:d,maximumWidth:v,minimumHeight:I,maximumHeight:E}),r._setXY(),r}return I()(n,[{key:"_setHeightWidthScale",value:function(e){var t=e.detailWidth,n=e.detailHeight,r=e.scale,i=e.minimumWidth,a=e.maximumWidth,o=e.minimumHeight,s=e.maximumHeight,u=this.loader,A=u.numLevels,c=u.getRasterSize({z:0}),l=c.width,f=c.height;if(this._imageWidth=l,this._imageHeight=f,l>f){var h=f/l;this.width=Math.min(a,Math.max(t*r,i)),this.height=this.width*h,this.scale=Math.pow(2,A-1)/l*this.width}else{var g=l/f;this.height=Math.min(s,Math.max(n*r,o)),this.width=this.height*g,this.scale=Math.pow(2,A-1)/f*this.height}}},{key:"_setXY",value:function(){var e=this.height,t=this.width,n=this.margin,r=this.position,i=this.detailWidth,a=this.detailHeight;switch(r){case"bottom-right":this.x=i-t-n,this.y=a-e-n;break;case"top-right":this.x=i-t-n,this.y=n;break;case"top-left":this.x=n,this.y=n;break;case"bottom-left":this.x=n,this.y=a-e-n;break;default:throw new Error("overviewLocation prop needs to be one of ['bottom-right', 'top-right', 'top-left', 'bottom-left']")}}},{key:"getDeckGlView",value:function(){var e=this.x,t=this.y,n=this.id,r=this.height,i=this.width;return new k.OrthographicView({id:n,controller:!1,height:r,width:i,x:e,y:t,clear:!0})}},{key:"filterViewState",value:function(e){var t=e.viewState,n=this._imageWidth,r=this._imageHeight,i=this.scale,a=this.id,o=this.loader,s=this.height,u=this.width,A=o.numLevels;return Je(Je({},t),{},{height:s,width:u,id:a,target:[n*i/2,r*i/2,0],zoom:-(A-1)})}},{key:"getLayers",value:function(e){var t=e.viewStates,n=e.props,r=t.detail,i=t.overview;if(!r)throw new Error("Overview requires a viewState with id detail");var a=this.id,o=this.scale,s=this.loader,u=xe(r).map((function(e){return e.map((function(e){return e*o}))}));return[new ke(n,{id:"".concat(s.type).concat(_e(a)),boundingBox:u,overviewScale:o,zoom:-i.zoom})]}}]),n}(Ge);function We(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q()(e);if(t){var i=Q()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return B()(this,n)}}var Ve=function(e){E()(n,e);var t=We(n);function n(e){var r,i=e.initialViewState,a=e.x,o=e.y,s=e.linkedIds,u=void 0===s?[]:s,A=e.panLock,c=void 0===A||A,l=e.zoomLock,f=void 0===l||l,h=e.viewportOutlineColor,g=void 0===h?[255,255,255]:h,d=e.viewportOutlineWidth,p=void 0===d?10:d;return y()(this,n),(r=t.call(this,{initialViewState:i,x:a,y:o})).linkedIds=u,r.panLock=c,r.zoomLock=f,r.viewportOutlineColor=g,r.viewportOutlineWidth=p,r}return I()(n,[{key:"filterViewState",value:function(e){var t=e.viewState,n=e.oldViewState,r=e.currentViewState,i=t.id,a=this.id,o=this.linkedIds,s=this.panLock,u=this.zoomLock;if(n&&-1!==o.indexOf(i)&&(u||s)){var A={height:r.height,width:r.width,target:[],zoom:null},c=F()(r.target,2),l=c[0],f=c[1];if(u){var h=t.zoom-n.zoom;A.zoom=r.zoom+h}else A.zoom=r.zoom;if(s){var g=F()(n.target,2),d=g[0],p=g[1],v=F()(t.target,2),y=v[0]-d,m=v[1]-p;A.target.push(l+y),A.target.push(f+m)}else A.target.push(l),A.target.push(f);return{id:a,target:A.target,zoom:A.zoom,height:A.height,width:A.width}}return t.id===a?{id:a,target:t.target,zoom:t.zoom,height:t.height,width:t.width}:{id:a,target:r.target,zoom:r.zoom,height:r.height,width:r.width}}},{key:"getLayers",value:function(e){var t=e.props,n=e.viewStates,r=t.loader,i=this.id,a=this.viewportOutlineColor,o=this.viewportOutlineWidth,s=n[i],u=xe(s),A=[],c=r.isPyramid?new Ce(t,{id:"".concat(r.type).concat(_e(i)),viewportId:i}):new Ie(t,{id:"".concat(r.type).concat(_e(i)),viewportId:i});A.push(c);var l=new Be.PolygonLayer({id:"viewport-outline-".concat(r.type).concat(_e(i)),coordinateSystem:k.COORDINATE_SYSTEM.CARTESIAN,data:[u],getPolygon:function(e){return e},filled:!1,stroked:!0,getLineColor:a,getLineWidth:o*Math.pow(2,-s.zoom)});A.push(l);var f=r.physicalSizes;if(f){var h=f.x,g=h.unit,d=h.value;g&&d&&A.push(new Oe({id:_e(i),loader:r,unit:g,size:d,viewState:s}))}return A}}]),n}(Ge);function Xe(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 Ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(n),!0).forEach((function(t){D()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $e=function(e){var t=e.loader,n=e.sliderValues,r=e.colorValues,i=e.channelIsOn,a=e.initialViewState,o=e.colormap,s=e.overview,u=e.overviewOn,A=e.loaderSelection,c=e.hoverHooks,l=e.isLensOn,f=void 0!==l&&l,h=e.lensSelection,g=e.lensRadius,d=void 0===g?100:g,p=e.lensBorderColor,v=void 0===p?[255,255,255]:p,y=e.lensBorderRadius,m=void 0===y?.02:y,I=Ze(Ze({},a),{},{id:"detail"}),b={loader:t,sliderValues:n,colorValues:r,channelIsOn:i,loaderSelection:A,colormap:o,isLensOn:f,lensSelection:h,lensRadius:d,lensBorderColor:v,lensBorderRadius:m},E=[new He({initialViewState:I})],C=[b];if(u&&t){var B=Ze(Ze({},a),{},{id:"overview"}),w=new Ke(Ze({initialViewState:B,loader:t,detailHeight:a.height,detailWidth:a.width},s));E.push(w),C.push(b)}return t?Me.a.createElement(Ue,{layerProps:C,views:E,hoverHooks:c}):null};function et(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 tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){D()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nt=function(e){var t=e.loader,n=e.sliderValues,r=e.colorValues,i=e.channelIsOn,a=e.initialViewState,o=e.colormap,s=e.panLock,u=e.loaderSelection,A=e.zoomLock,c=e.isLensOn,l=void 0!==c&&c,f=e.lensSelection,h=e.lensRadius,g=void 0===h?100:h,d=e.lensBorderColor,p=void 0===d?[255,255,255]:d,v=e.lensBorderRadius,y=void 0===v?.02:v,m=new Ve({initialViewState:tt(tt({},a),{},{id:"left"}),linkedIds:["right"],panLock:s,zoomLock:A}),I={loader:t,sliderValues:n,colorValues:r,channelIsOn:i,loaderSelection:u,colormap:o,isLensOn:l,lensSelection:f,lensRadius:g,lensBorderColor:p,lensBorderRadius:y},b=[new Ve({initialViewState:tt(tt({},a),{},{id:"right"}),x:a.width,linkedIds:["left"],panLock:s,zoomLock:A}),m],E=[I,I];return t?Me.a.createElement(Ue,{layerProps:E,views:b,randomize:!0}):null},rt=n(12),it=n(25),at=n.n(it),ot={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams"},st={};for(var ut in ot)ot.hasOwnProperty(ut)&&(st[ot[ut]]=parseInt(ut,10));var At=[st.BitsPerSample,st.ExtraSamples,st.SampleFormat,st.StripByteCounts,st.StripOffsets,st.StripRowCounts,st.TileByteCounts,st.TileOffsets],ct={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",13:"IFD",16:"LONG8",17:"SLONG8",18:"IFD8"},lt={};for(var ft in ct)ct.hasOwnProperty(ft)&&(lt[ct[ft]]=parseInt(ft,10));var ht=0,gt=1,dt=2,pt=3,vt=5,yt=6,mt=8,It=0,bt={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"},Et={};for(var Ct in bt)bt.hasOwnProperty(Ct)&&(Et[bt[Ct]]=parseInt(Ct,10));function Bt(e,t){for(var n,r=e.width,i=e.height,a=new Uint8Array(r*i*3),o=0,s=0;o<e.length;++o,s+=3)n=256-e[o]/t*256,a[s]=n,a[s+1]=n,a[s+2]=n;return a}function wt(e,t){for(var n,r=e.width,i=e.height,a=new Uint8Array(r*i*3),o=0,s=0;o<e.length;++o,s+=3)n=e[o]/t*256,a[s]=n,a[s+1]=n,a[s+2]=n;return a}function Qt(e,t){for(var n=e.width,r=e.height,i=new Uint8Array(n*r*3),a=t.length/3,o=t.length/3*2,s=0,u=0;s<e.length;++s,u+=3){var A=e[s];i[u]=t[A]/65536*256,i[u+1]=t[A+a]/65536*256,i[u+2]=t[A+o]/65536*256}return i}function kt(e){for(var t=e.width,n=e.height,r=new Uint8Array(t*n*3),i=0,a=0;i<e.length;i+=4,a+=3){var o=e[i],s=e[i+1],u=e[i+2],A=e[i+3];r[a]=(255-o)/256*255*((255-A)/256),r[a+1]=(255-s)/256*255*((255-A)/256),r[a+2]=(255-u)/256*255*((255-A)/256)}return r}function _t(e){for(var t=e.width,n=e.height,r=new Uint8ClampedArray(t*n*3),i=0,a=0;i<e.length;i+=3,a+=3){var o=e[i],s=e[i+1],u=e[i+2];r[a]=o+1.402*(u-128),r[a+1]=o-.34414*(s-128)-.71414*(u-128),r[a+2]=o+1.772*(s-128)}return r}function xt(e){for(var t=e.width,n=e.height,r=new Uint8Array(t*n*3),i=0,a=0;i<e.length;i+=3,a+=3){var o=(e[i+0]+16)/116,s=(e[i+1]<<24>>24)/500+o,u=o-(e[i+2]<<24>>24)/200,A=void 0,c=void 0,l=void 0;c=-.9689*(s=.95047*(s*s*s>.008856?s*s*s:(s-16/116)/7.787))+1.8758*(o=1*(o*o*o>.008856?o*o*o:(o-16/116)/7.787))+.0415*(u=1.08883*(u*u*u>.008856?u*u*u:(u-16/116)/7.787)),l=.0557*s+-.204*o+1.057*u,A=(A=3.2406*s+-1.5372*o+-.4986*u)>.0031308?1.055*Math.pow(A,1/2.4)-.055:12.92*A,c=c>.0031308?1.055*Math.pow(c,1/2.4)-.055:12.92*c,l=l>.0031308?1.055*Math.pow(l,1/2.4)-.055:12.92*l,r[a]=255*Math.max(0,Math.min(1,A)),r[a+1]=255*Math.max(0,Math.min(1,c)),r[a+2]=255*Math.max(0,Math.min(1,l))}return r}function St(e,t){var n=e.length-t,r=0;do{for(var i=t;i>0;i--)e[r+t]+=e[r],r++;n-=t}while(n>0)}function Ot(e,t,n){for(var r=0,i=e.length,a=i/n;i>t;){for(var o=t;o>0;--o)e[r+t]+=e[r],++r;i-=t}for(var s=e.slice(),u=0;u<a;++u)for(var A=0;A<n;++A)e[n*u+A]=s[(n-A-1)*a+u]}function Dt(e,t,n,r,i,a){if(!t||1===t)return e;for(var o=0;o<i.length;++o){if(i[o]%8!==0)throw new Error("When decoding with predictor, only multiple of 8 bits are supported.");if(i[o]!==i[0])throw new Error("When decoding with predictor, all samples must have the same size.")}for(var s=i[0]/8,u=2===a?1:i.length,A=0;A<r&&!(A*u*n*s>=e.byteLength);++A){var c=void 0;if(2===t){switch(i[0]){case 8:c=new Uint8Array(e,A*u*n*s,u*n*s);break;case 16:c=new Uint16Array(e,A*u*n*s,u*n*s/2);break;case 32:c=new Uint32Array(e,A*u*n*s,u*n*s/4);break;default:throw new Error("Predictor 2 not allowed with ".concat(i[0]," bits per sample."))}St(c,u)}else 3===t&&Ot(c=new Uint8Array(e,A*u*n*s,u*n*s),u,s)}return e}var Rt=function(){function e(){l(this,e)}return f(e,[{key:"decode",value:function(){var e=c(A.mark((function e(t,n){var r,i,a,o,s;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.decodeBlock(n);case 2:if(r=e.sent,1===(i=t.Predictor||1)){e.next=9;break}return a=!t.StripOffsets,o=a?t.TileWidth:t.ImageWidth,s=a?t.TileLength:t.RowsPerStrip||t.ImageLength,e.abrupt("return",Dt(r,i,o,s,t.BitsPerSample,t.PlanarConfiguration));case 9:return e.abrupt("return",r);case 10:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}(),jt=function(e){s(n,e);var t=u(n);function n(){return l(this,n),t.apply(this,arguments)}return f(n,[{key:"decodeBlock",value:function(e){return e}}]),n}(Rt),Mt=n(26),Nt=function(e){s(n,e);var t=u(n);function n(e){var r;l(this,n),r=t.call(this);var i=e.TileWidth||e.ImageWidth,a=e.TileLength||e.ImageLength,o=e.BitsPerSample[0]/8;return r.maxUncompressedSize=i*a*o,r}return f(n,[{key:"decodeBlock",value:function(){var e=c(A.mark((function e(t){var n,r;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new Uint8Array(t),e.next=3,Object(Mt.decompress)(n,this.maxUncompressedSize);case 3:return r=e.sent,e.abrupt("return",r.buffer);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),n}(Rt),Ft=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);function Tt(e,t){for(var n=0,r=[],i=16;i>0&&!e[i-1];)--i;r.push({children:[],index:0});for(var a,o=r[0],s=0;s<i;s++){for(var u=0;u<e[s];u++){for((o=r.pop()).children[o.index]=t[n];o.index>0;)o=r.pop();for(o.index++,r.push(o);r.length<=s;)r.push(a={children:[],index:0}),o.children[o.index]=a.children,o=a;n++}s+1<i&&(r.push(a={children:[],index:0}),o.children[o.index]=a.children,o=a)}return r[0].children}function Lt(e,t,n,r,i,a,o,s,u){var A=n.mcusPerLine,c=n.progressive,l=t,f=t,h=0,g=0;function d(){if(g>0)return g--,h>>g&1;if(255===(h=e[f++])){var t=e[f++];if(t)throw new Error("unexpected marker: ".concat((h<<8|t).toString(16)))}return g=7,h>>>7}function p(e){for(var t,n=e;null!==(t=d());){if("number"===typeof(n=n[t]))return n;if("object"!==typeof n)throw new Error("invalid huffman sequence")}return null}function v(e){for(var t=e,n=0;t>0;){var r=d();if(null===r)return;n=n<<1|r,--t}return n}function y(e){var t=v(e);return t>=1<<e-1?t:t+(-1<<e)+1}var m=0;var I,b=0;function E(e,t,n,r,i){var a=n%A,o=(n/A|0)*e.v+r,s=a*e.h+i;t(e,e.blocks[o][s])}function C(e,t,n){var r=n/e.blocksPerLine|0,i=n%e.blocksPerLine;t(e,e.blocks[r][i])}var B,w,Q,k,_,x,S=r.length;x=c?0===a?0===s?function(e,t){var n=p(e.huffmanTableDC),r=0===n?0:y(n)<<u;e.pred+=r,t[0]=e.pred}:function(e,t){t[0]|=d()<<u}:0===s?function(e,t){if(m>0)m--;else for(var n=a,r=o;n<=r;){var i=p(e.huffmanTableAC),s=15&i,A=i>>4;if(0===s){if(A<15){m=v(A)+(1<<A)-1;break}n+=16}else{t[Ft[n+=A]]=y(s)*(1<<u),n++}}}:function(e,t){for(var n=a,r=o,i=0;n<=r;){var s=Ft[n],A=t[s]<0?-1:1;switch(b){case 0:var c=p(e.huffmanTableAC),l=15&c;if(i=c>>4,0===l)i<15?(m=v(i)+(1<<i),b=4):(i=16,b=1);else{if(1!==l)throw new Error("invalid ACn encoding");I=y(l),b=i?2:3}continue;case 1:case 2:t[s]?t[s]+=(d()<<u)*A:0===--i&&(b=2===b?3:0);break;case 3:t[s]?t[s]+=(d()<<u)*A:(t[s]=I<<u,b=0);break;case 4:t[s]&&(t[s]+=(d()<<u)*A)}n++}4===b&&0===--m&&(b=0)}:function(e,t){var n=p(e.huffmanTableDC),r=0===n?0:y(n);e.pred+=r,t[0]=e.pred;for(var i=1;i<64;){var a=p(e.huffmanTableAC),o=15&a,s=a>>4;if(0===o){if(s<15)break;i+=16}else{t[Ft[i+=s]]=y(o),i++}}};var O,D,R=0;D=1===S?r[0].blocksPerLine*r[0].blocksPerColumn:A*n.mcusPerColumn;for(var j=i||D;R<D;){for(w=0;w<S;w++)r[w].pred=0;if(m=0,1===S)for(B=r[0],_=0;_<j;_++)C(B,x,R),R++;else for(_=0;_<j;_++){for(w=0;w<S;w++){var M=B=r[w],N=M.h,F=M.v;for(Q=0;Q<F;Q++)for(k=0;k<N;k++)E(B,x,R,Q,k)}if(++R===D)break}if(g=0,(O=e[f]<<8|e[f+1])<65280)throw new Error("marker was not found");if(!(O>=65488&&O<=65495))break;f+=2}return f-l}function Pt(e,t){var n=[],r=t.blocksPerLine,i=t.blocksPerColumn,a=r<<3,o=new Int32Array(64),s=new Uint8Array(64);function u(e,n,r){var i,a,o,s,u,A,c,l,f,h,g=t.quantizationTable,d=r;for(h=0;h<64;h++)d[h]=e[h]*g[h];for(h=0;h<8;++h){var p=8*h;0!==d[1+p]||0!==d[2+p]||0!==d[3+p]||0!==d[4+p]||0!==d[5+p]||0!==d[6+p]||0!==d[7+p]?(i=5793*d[0+p]+128>>8,a=5793*d[4+p]+128>>8,o=d[2+p],s=d[6+p],u=2896*(d[1+p]-d[7+p])+128>>8,l=2896*(d[1+p]+d[7+p])+128>>8,A=d[3+p]<<4,f=i-a+1>>1,i=i+a+1>>1,a=f,f=3784*o+1567*s+128>>8,o=1567*o-3784*s+128>>8,s=f,f=u-(c=d[5+p]<<4)+1>>1,u=u+c+1>>1,c=f,f=l+A+1>>1,A=l-A+1>>1,l=f,f=i-s+1>>1,i=i+s+1>>1,s=f,f=a-o+1>>1,a=a+o+1>>1,o=f,f=2276*u+3406*l+2048>>12,u=3406*u-2276*l+2048>>12,l=f,f=799*A+4017*c+2048>>12,A=4017*A-799*c+2048>>12,c=f,d[0+p]=i+l,d[7+p]=i-l,d[1+p]=a+c,d[6+p]=a-c,d[2+p]=o+A,d[5+p]=o-A,d[3+p]=s+u,d[4+p]=s-u):(f=5793*d[0+p]+512>>10,d[0+p]=f,d[1+p]=f,d[2+p]=f,d[3+p]=f,d[4+p]=f,d[5+p]=f,d[6+p]=f,d[7+p]=f)}for(h=0;h<8;++h){var v=h;0!==d[8+v]||0!==d[16+v]||0!==d[24+v]||0!==d[32+v]||0!==d[40+v]||0!==d[48+v]||0!==d[56+v]?(i=5793*d[0+v]+2048>>12,a=5793*d[32+v]+2048>>12,o=d[16+v],s=d[48+v],u=2896*(d[8+v]-d[56+v])+2048>>12,l=2896*(d[8+v]+d[56+v])+2048>>12,A=d[24+v],f=i-a+1>>1,i=i+a+1>>1,a=f,f=3784*o+1567*s+2048>>12,o=1567*o-3784*s+2048>>12,s=f,f=u-(c=d[40+v])+1>>1,u=u+c+1>>1,c=f,f=l+A+1>>1,A=l-A+1>>1,l=f,f=i-s+1>>1,i=i+s+1>>1,s=f,f=a-o+1>>1,a=a+o+1>>1,o=f,f=2276*u+3406*l+2048>>12,u=3406*u-2276*l+2048>>12,l=f,f=799*A+4017*c+2048>>12,A=4017*A-799*c+2048>>12,c=f,d[0+v]=i+l,d[56+v]=i-l,d[8+v]=a+c,d[48+v]=a-c,d[16+v]=o+A,d[40+v]=o-A,d[24+v]=s+u,d[32+v]=s-u):(f=5793*r[h+0]+8192>>14,d[0+v]=f,d[8+v]=f,d[16+v]=f,d[24+v]=f,d[32+v]=f,d[40+v]=f,d[48+v]=f,d[56+v]=f)}for(h=0;h<64;++h){var y=128+(d[h]+8>>4);n[h]=y<0?0:y>255?255:y}}for(var A=0;A<i;A++){for(var c=A<<3,l=0;l<8;l++)n.push(new Uint8Array(a));for(var f=0;f<r;f++){u(t.blocks[A][f],s,o);for(var h=0,g=f<<3,d=0;d<8;d++)for(var p=n[c+d],v=0;v<8;v++)p[g+v]=s[h++]}}return n}var Ut=function(){function e(){l(this,e),this.jfif=null,this.adobe=null,this.quantizationTables=[],this.huffmanTablesAC=[],this.huffmanTablesDC=[],this.resetFrames()}return f(e,[{key:"resetFrames",value:function(){this.frames=[]}},{key:"parse",value:function(e){var t=0;function n(){var n=e[t]<<8|e[t+1];return t+=2,n}function r(){var r=n(),i=e.subarray(t,t+r-2);return t+=i.length,i}function i(e){var t,n,r=0,i=0;for(n in e.components)e.components.hasOwnProperty(n)&&(r<(t=e.components[n]).h&&(r=t.h),i<t.v&&(i=t.v));var a=Math.ceil(e.samplesPerLine/8/r),o=Math.ceil(e.scanLines/8/i);for(n in e.components)if(e.components.hasOwnProperty(n)){t=e.components[n];for(var s=Math.ceil(Math.ceil(e.samplesPerLine/8)*t.h/r),u=Math.ceil(Math.ceil(e.scanLines/8)*t.v/i),A=a*t.h,c=o*t.v,l=[],f=0;f<c;f++){for(var h=[],g=0;g<A;g++)h.push(new Int32Array(64));l.push(h)}t.blocksPerLine=s,t.blocksPerColumn=u,t.blocks=l}e.maxH=r,e.maxV=i,e.mcusPerLine=a,e.mcusPerColumn=o}var a=n();if(65496!==a)throw new Error("SOI not found");for(a=n();65497!==a;){switch(a){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var o=r();65504===a&&74===o[0]&&70===o[1]&&73===o[2]&&70===o[3]&&0===o[4]&&(this.jfif={version:{major:o[5],minor:o[6]},densityUnits:o[7],xDensity:o[8]<<8|o[9],yDensity:o[10]<<8|o[11],thumbWidth:o[12],thumbHeight:o[13],thumbData:o.subarray(14,14+3*o[12]*o[13])}),65518===a&&65===o[0]&&100===o[1]&&111===o[2]&&98===o[3]&&101===o[4]&&0===o[5]&&(this.adobe={version:o[6],flags0:o[7]<<8|o[8],flags1:o[9]<<8|o[10],transformCode:o[11]});break;case 65499:for(var s=n()+t-2;t<s;){var u=e[t++],A=new Int32Array(64);if(u>>4===0)for(var c=0;c<64;c++){A[Ft[c]]=e[t++]}else{if(u>>4!==1)throw new Error("DQT: invalid table spec");for(var l=0;l<64;l++){A[Ft[l]]=n()}}this.quantizationTables[15&u]=A}break;case 65472:case 65473:case 65474:n();for(var f={extended:65473===a,progressive:65474===a,precision:e[t++],scanLines:n(),samplesPerLine:n(),components:{},componentsOrder:[]},h=e[t++],g=void 0,d=0;d<h;d++){g=e[t];var p=e[t+1]>>4,v=15&e[t+1],y=e[t+2];f.componentsOrder.push(g),f.components[g]={h:p,v:v,quantizationIdx:y},t+=3}i(f),this.frames.push(f);break;case 65476:for(var m=n(),I=2;I<m;){for(var b=e[t++],E=new Uint8Array(16),C=0,B=0;B<16;B++,t++)E[B]=e[t],C+=E[B];for(var w=new Uint8Array(C),Q=0;Q<C;Q++,t++)w[Q]=e[t];I+=17+C,b>>4===0?this.huffmanTablesDC[15&b]=Tt(E,w):this.huffmanTablesAC[15&b]=Tt(E,w)}break;case 65501:n(),this.resetInterval=n();break;case 65498:n();for(var k=e[t++],_=[],x=this.frames[0],S=0;S<k;S++){var O=x.components[e[t++]],D=e[t++];O.huffmanTableDC=this.huffmanTablesDC[D>>4],O.huffmanTableAC=this.huffmanTablesAC[15&D],_.push(O)}var R=e[t++],j=e[t++],M=e[t++],N=Lt(e,t,x,_,this.resetInterval,R,j,M>>4,15&M);t+=N;break;case 65535:255!==e[t]&&t--;break;default:if(255===e[t-3]&&e[t-2]>=192&&e[t-2]<=254){t-=3;break}throw new Error("unknown JPEG marker ".concat(a.toString(16)))}a=n()}}},{key:"getResult",value:function(){var e=this.frames;if(0===this.frames.length)throw new Error("no frames were decoded");this.frames.length>1&&console.warn("more than one frame is not supported");for(var t=0;t<this.frames.length;t++)for(var n=this.frames[t].components,r=0,i=Object.keys(n);r<i.length;r++){var a=i[r];n[a].quantizationTable=this.quantizationTables[n[a].quantizationIdx],delete n[a].quantizationIdx}for(var o=e[0],s=o.components,u=o.componentsOrder,A=[],c=o.samplesPerLine,l=o.scanLines,f=0;f<u.length;f++){var h=s[u[f]];A.push({lines:Pt(0,h),scaleX:h.h/o.maxH,scaleY:h.v/o.maxV})}for(var g=new Uint8Array(c*l*A.length),d=0,p=0;p<l;++p)for(var v=0;v<c;++v)for(var y=0;y<A.length;++y){var m=A[y];g[d]=m.lines[0|p*m.scaleY][0|v*m.scaleX],++d}return g}}]),e}(),Gt=function(e){s(n,e);var t=u(n);function n(e){var r;return l(this,n),(r=t.call(this)).reader=new Ut,e.JPEGTables&&r.reader.parse(e.JPEGTables),r}return f(n,[{key:"decodeBlock",value:function(e){return this.reader.resetFrames(),this.reader.parse(new Uint8Array(e)),this.reader.getResult().buffer}}]),n}(Rt),qt=n(27),Ht=function(e){s(n,e);var t=u(n);function n(){return l(this,n),t.apply(this,arguments)}return f(n,[{key:"decodeBlock",value:function(e){return Object(qt.inflate)(new Uint8Array(e)).buffer}}]),n}(Rt),Yt=function(e){s(n,e);var t=u(n);function n(){return l(this,n),t.apply(this,arguments)}return f(n,[{key:"decodeBlock",value:function(e){for(var t=new DataView(e),n=[],r=0;r<e.byteLength;++r){var i=t.getInt8(r);if(i<0){var a=t.getUint8(r+1);i=-i;for(var o=0;o<=i;++o)n.push(a);r+=1}else{for(var s=0;s<=i;++s)n.push(t.getUint8(r+s+1));r+=i+1}}return new Uint8Array(n).buffer}}]),n}(Rt);function Jt(e){switch(e.Compression){case void 0:case 1:return new jt;case 5:return new Nt(e);case 6:throw new Error("old style JPEG compression is not supported.");case 7:return new Gt(e);case 8:case 32946:return new Ht;case 32773:return new Yt;default:throw new Error("Unknown compression method identifier: ".concat(e.Compression))}}function zt(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return new(Object.getPrototypeOf(e).constructor)(t*n*r)}function Kt(e,t,n,r,i){var a=t/r,o=n/i;return e.map((function(e){for(var s=zt(e,r,i),u=0;u<i;++u)for(var A=Math.min(Math.round(o*u),n-1),c=0;c<r;++c){var l=Math.min(Math.round(a*c),t-1),f=e[A*t+l];s[u*r+c]=f}return s}))}function Wt(e,t,n){return(1-n)*e+n*t}function Vt(e,t,n,r,i){var a=t/r,o=n/i;return e.map((function(e){for(var s=zt(e,r,i),u=0;u<i;++u)for(var A=o*u,c=Math.floor(A),l=Math.min(Math.ceil(A),n-1),f=0;f<r;++f){var h=a*f,g=h%1,d=Math.floor(h),p=Math.min(Math.ceil(h),t-1),v=e[c*t+d],y=e[c*t+p],m=e[l*t+d],I=e[l*t+p],b=Wt(Wt(v,y,g),Wt(m,I,g),A%1);s[u*r+f]=b}return s}))}function Xt(e,t,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"nearest";switch(a.toLowerCase()){case"nearest":return Kt(e,t,n,r,i);case"bilinear":case"linear":return Vt(e,t,n,r,i);default:throw new Error("Unsupported resampling method: '".concat(a,"'"))}}function Zt(e,t,n,r,i,a){for(var o=t/r,s=n/i,u=zt(e,r,i,a),A=0;A<i;++A)for(var c=Math.min(Math.round(s*A),n-1),l=0;l<r;++l)for(var f=Math.min(Math.round(o*l),t-1),h=0;h<a;++h){var g=e[c*t*a+f*a+h];u[A*r*a+l*a+h]=g}return u}function $t(e,t,n,r,i,a){for(var o=t/r,s=n/i,u=zt(e,r,i,a),A=0;A<i;++A)for(var c=s*A,l=Math.floor(c),f=Math.min(Math.ceil(c),n-1),h=0;h<r;++h)for(var g=o*h,d=g%1,p=Math.floor(g),v=Math.min(Math.ceil(g),t-1),y=0;y<a;++y){var m=e[l*t*a+p*a+y],I=e[l*t*a+v*a+y],b=e[f*t*a+p*a+y],E=e[f*t*a+v*a+y],C=Wt(Wt(m,I,d),Wt(b,E,d),c%1);u[A*r*a+h*a+y]=C}return u}function en(e,t,n,r,i,a){var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"nearest";switch(o.toLowerCase()){case"nearest":return Zt(e,t,n,r,i,a);case"bilinear":case"linear":return $t(e,t,n,r,i,a);default:throw new Error("Unsupported resampling method: '".concat(o,"'"))}}function tn(e,t,n){for(var r=0,i=t;i<n;++i)r+=e[i];return r}function nn(e,t,n){switch(e){case 1:switch(t){case 8:return new Uint8Array(n);case 16:return new Uint16Array(n);case 32:return new Uint32Array(n)}break;case 2:switch(t){case 8:return new Int8Array(n);case 16:return new Int16Array(n);case 32:return new Int32Array(n)}break;case 3:switch(t){case 32:return new Float32Array(n);case 64:return new Float64Array(n)}}throw Error("Unsupported data format/bitsPerSample")}var rn=function(){function e(t,n,r,i,a,o){l(this,e),this.fileDirectory=t,this.geoKeys=n,this.dataView=r,this.littleEndian=i,this.tiles=a?{}:null,this.isTiled=!t.StripOffsets;var s=t.PlanarConfiguration;if(this.planarConfiguration="undefined"===typeof s?1:s,1!==this.planarConfiguration&&2!==this.planarConfiguration)throw new Error("Invalid planar configuration.");this.source=o}return f(e,[{key:"getFileDirectory",value:function(){return this.fileDirectory}},{key:"getGeoKeys",value:function(){return this.geoKeys}},{key:"getWidth",value:function(){return this.fileDirectory.ImageWidth}},{key:"getHeight",value:function(){return this.fileDirectory.ImageLength}},{key:"getSamplesPerPixel",value:function(){return this.fileDirectory.SamplesPerPixel}},{key:"getTileWidth",value:function(){return this.isTiled?this.fileDirectory.TileWidth:this.getWidth()}},{key:"getTileHeight",value:function(){return this.isTiled?this.fileDirectory.TileLength:"undefined"!==typeof this.fileDirectory.RowsPerStrip?Math.min(this.fileDirectory.RowsPerStrip,this.getHeight()):this.getHeight()}},{key:"getBytesPerPixel",value:function(){for(var e=0,t=0;t<this.fileDirectory.BitsPerSample.length;++t){var n=this.fileDirectory.BitsPerSample[t];if(n%8!==0)throw new Error("Sample bit-width of ".concat(n," is not supported."));if(n!==this.fileDirectory.BitsPerSample[0])throw new Error("Differing size of samples in a pixel are not supported.");e+=n}return e/8}},{key:"getSampleByteSize",value:function(e){if(e>=this.fileDirectory.BitsPerSample.length)throw new RangeError("Sample index ".concat(e," is out of range."));var t=this.fileDirectory.BitsPerSample[e];if(t%8!==0)throw new Error("Sample bit-width of ".concat(t," is not supported."));return t/8}},{key:"getReaderForSample",value:function(e){var t=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[e]:1,n=this.fileDirectory.BitsPerSample[e];switch(t){case 1:switch(n){case 8:return DataView.prototype.getUint8;case 16:return DataView.prototype.getUint16;case 32:return DataView.prototype.getUint32}break;case 2:switch(n){case 8:return DataView.prototype.getInt8;case 16:return DataView.prototype.getInt16;case 32:return DataView.prototype.getInt32}break;case 3:switch(n){case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}throw Error("Unsupported data format/bitsPerSample")}},{key:"getArrayForSample",value:function(e,t){return nn(this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[e]:1,this.fileDirectory.BitsPerSample[e],t)}},{key:"getTileOrStrip",value:function(){var e=c(A.mark((function e(t,n,r,i,a){var o,s,u,c,l,f,h,g;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=Math.ceil(this.getWidth()/this.getTileWidth()),s=Math.ceil(this.getHeight()/this.getTileHeight()),c=this.tiles,1===this.planarConfiguration?u=n*o+t:2===this.planarConfiguration&&(u=r*o*s+n*o+t),this.isTiled?(l=this.fileDirectory.TileOffsets[u],f=this.fileDirectory.TileByteCounts[u]):(l=this.fileDirectory.StripOffsets[u],f=this.fileDirectory.StripByteCounts[u]),e.next=7,this.source.fetch(l,f,!1,a);case 7:if(h=e.sent,!a||!a.aborted){e.next=10;break}return e.abrupt("return",{x:t,y:n,sample:r,data:[]});case 10:return null===c?g=i.decode(this.fileDirectory,h):c[u]||(g=i.decode(this.fileDirectory,h),c[u]=g),e.t0=t,e.t1=n,e.t2=r,e.next=16,g;case 16:return e.t3=e.sent,e.abrupt("return",{x:e.t0,y:e.t1,sample:e.t2,data:e.t3});case 18:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i,a){return e.apply(this,arguments)}}()},{key:"_readRaster",value:function(){var e=c(A.mark((function e(t,n,r,i,a,o,s,u){var c,l,f,h,g,d,p,v,y,m,I,b,E,C,B,w,Q,k,_=this;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(c=this.getTileWidth(),l=this.getTileHeight(),f=Math.max(Math.floor(t[0]/c),0),h=Math.min(Math.ceil(t[2]/c),Math.ceil(this.getWidth()/this.getTileWidth())),g=Math.max(Math.floor(t[1]/l),0),d=Math.min(Math.ceil(t[3]/l),Math.ceil(this.getHeight()/this.getTileHeight())),p=t[2]-t[0],v=this.getBytesPerPixel(),y=[],m=[],I=0;I<n.length;++I)1===this.planarConfiguration?y.push(tn(this.fileDirectory.BitsPerSample,0,n[I])/8):y.push(0),m.push(this.getReaderForSample(n[I]));for(b=[],E=this.littleEndian,C=g;C<d;++C)for(B=f;B<h;++B)for(w=function(e){var o=e,s=n[e];2===_.planarConfiguration&&(v=_.getSampleByteSize(s));var u=_.getTileOrStrip(B,C,s,a);b.push(u),u.then((function(e){for(var a=e.data,s=new DataView(a),u=e.y*l,A=e.x*c,f=(e.y+1)*l,h=(e.x+1)*c,g=m[o],d=Math.min(l,l-(f-t[3])),I=Math.min(c,c-(h-t[2])),b=Math.max(0,t[1]-u);b<d;++b)for(var C=Math.max(0,t[0]-A);C<I;++C){var B=(b*c+C)*v,w=g.call(s,B+y[o],E),Q=void 0;i?(Q=(b+u-t[1])*p*n.length+(C+A-t[0])*n.length+o,r[Q]=w):(Q=(b+u-t[1])*p+C+A-t[0],r[o][Q]=w)}}))},Q=0;Q<n.length;++Q)w(Q);return e.next=16,Promise.all(b);case 16:if(!(o&&t[2]-t[0]!==o||s&&t[3]-t[1]!==s)){e.next=21;break}return(k=i?en(r,t[2]-t[0],t[3]-t[1],o,s,n.length,u):Xt(r,t[2]-t[0],t[3]-t[1],o,s,u)).width=o,k.height=s,e.abrupt("return",k);case 21:return r.width=o||t[2]-t[0],r.height=s||t[3]-t[1],e.abrupt("return",r);case 24:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i,a,o,s,u){return e.apply(this,arguments)}}()},{key:"readRasters",value:function(){var e=c(A.mark((function e(){var t,n,r,i,a,o,s,u,c,l,f,h,g,d,p,v,y,m,I,b,E,C,B,w,Q=arguments;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Q.length>0&&void 0!==Q[0]?Q[0]:{},n=t.window,r=t.samples,i=void 0===r?[]:r,a=t.interleave,o=t.pool,s=void 0===o?null:o,u=t.width,c=t.height,l=t.resampleMethod,f=t.fillValue,!((h=n||[0,0,this.getWidth(),this.getHeight()])[0]>h[2]||h[1]>h[3])){e.next=4;break}throw new Error("Invalid subsets");case 4:if(g=h[2]-h[0],d=h[3]-h[1],p=g*d,i&&i.length){e.next=11;break}for(v=0;v<this.fileDirectory.SamplesPerPixel;++v)i.push(v);e.next=18;break;case 11:y=0;case 12:if(!(y<i.length)){e.next=18;break}if(!(i[y]>=this.fileDirectory.SamplesPerPixel)){e.next=15;break}return e.abrupt("return",Promise.reject(new RangeError("Invalid sample index '".concat(i[y],"'."))));case 15:++y,e.next=12;break;case 18:if(a)I=this.fileDirectory.SampleFormat?Math.max.apply(null,this.fileDirectory.SampleFormat):1,b=Math.max.apply(null,this.fileDirectory.BitsPerSample),m=nn(I,b,p*i.length),f&&m.fill(f);else for(m=[],E=0;E<i.length;++E)C=this.getArrayForSample(i[E],p),Array.isArray(f)&&E<f.length?C.fill(f[E]):f&&!Array.isArray(f)&&C.fill(f),m.push(C);return B=s||Jt(this.fileDirectory),e.next=22,this._readRaster(h,i,m,a,B,u,c,l);case 22:return w=e.sent,e.abrupt("return",w);case 24:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"readRGB",value:function(){var e=c(A.mark((function e(){var t,n,r,i,a,o,s,u,c,l,f,h,g,d,p,v,y,m,I,b=arguments;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=b.length>0&&void 0!==b[0]?b[0]:{},n=t.window,r=t.pool,i=void 0===r?null:r,a=t.width,o=t.height,s=t.resampleMethod,u=t.enableAlpha,c=void 0!==u&&u,!((l=n||[0,0,this.getWidth(),this.getHeight()])[0]>l[2]||l[1]>l[3])){e.next=4;break}throw new Error("Invalid subsets");case 4:if((f=this.fileDirectory.PhotometricInterpretation)!==dt){e.next=9;break}if(h=[0,1,2],this.fileDirectory.ExtraSamples!==It&&c)for(h=[],g=0;g<this.fileDirectory.BitsPerSample.length;g+=1)h.push(g);return e.abrupt("return",this.readRasters({window:n,interleave:!0,samples:h,pool:i,width:a,height:o}));case 9:e.t0=f,e.next=e.t0===ht||e.t0===gt||e.t0===pt?12:e.t0===vt?14:e.t0===yt||e.t0===mt?16:18;break;case 12:return d=[0],e.abrupt("break",19);case 14:return d=[0,1,2,3],e.abrupt("break",19);case 16:return d=[0,1,2],e.abrupt("break",19);case 18:throw new Error("Invalid or unsupported photometric interpretation.");case 19:return p={window:l,interleave:!0,samples:d,pool:i,width:a,height:o,resampleMethod:s},v=this.fileDirectory,e.next=23,this.readRasters(p);case 23:y=e.sent,m=Math.pow(2,this.fileDirectory.BitsPerSample[0]),e.t1=f,e.next=e.t1===ht?28:e.t1===gt?30:e.t1===pt?32:e.t1===vt?34:e.t1===yt?36:e.t1===mt?38:40;break;case 28:return I=Bt(y,m),e.abrupt("break",41);case 30:return I=wt(y,m),e.abrupt("break",41);case 32:return I=Qt(y,v.ColorMap),e.abrupt("break",41);case 34:return I=kt(y),e.abrupt("break",41);case 36:return I=_t(y),e.abrupt("break",41);case 38:return I=xt(y),e.abrupt("break",41);case 40:throw new Error("Unsupported photometric interpretation.");case 41:return I.width=y.width,I.height=y.height,e.abrupt("return",I);case 44:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getTiePoints",value:function(){if(!this.fileDirectory.ModelTiepoint)return[];for(var e=[],t=0;t<this.fileDirectory.ModelTiepoint.length;t+=6)e.push({i:this.fileDirectory.ModelTiepoint[t],j:this.fileDirectory.ModelTiepoint[t+1],k:this.fileDirectory.ModelTiepoint[t+2],x:this.fileDirectory.ModelTiepoint[t+3],y:this.fileDirectory.ModelTiepoint[t+4],z:this.fileDirectory.ModelTiepoint[t+5]});return e}},{key:"getGDALMetadata",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t={};if(!this.fileDirectory.GDAL_METADATA)return null;var n=this.fileDirectory.GDAL_METADATA,r=at()(n.substring(0,n.length-1));if(!r[0].tagName)throw new Error("Failed to parse GDAL metadata XML.");var i=r[0];if("GDALMetadata"!==i.tagName)throw new Error("Unexpected GDAL metadata XML tag.");var a=i.children.filter((function(e){return"Item"===e.tagName}));null!==e&&(a=a.filter((function(t){return Number(t.attributes.sample)===e})));for(var o=0;o<a.length;++o){var s=a[o];t[s.attributes.name]=s.children[0]}return t}},{key:"getGDALNoData",value:function(){if(!this.fileDirectory.GDAL_NODATA)return null;var e=this.fileDirectory.GDAL_NODATA;return Number(e.substring(0,e.length-1))}},{key:"getOrigin",value:function(){var e=this.fileDirectory.ModelTiepoint,t=this.fileDirectory.ModelTransformation;if(e&&6===e.length)return[e[3],e[4],e[5]];if(t)return[t[3],t[7],t[11]];throw new Error("The image does not have an affine transformation.")}},{key:"getResolution",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.fileDirectory.ModelPixelScale,n=this.fileDirectory.ModelTransformation;if(t)return[t[0],-t[1],t[2]];if(n)return[n[0],n[5],n[10]];if(e){var r=e.getResolution(),i=o(r,3),a=i[0],s=i[1],u=i[2];return[a*e.getWidth()/this.getWidth(),s*e.getHeight()/this.getHeight(),u*e.getWidth()/this.getWidth()]}throw new Error("The image does not have an affine transformation.")}},{key:"pixelIsArea",value:function(){return 1===this.geoKeys.GTRasterTypeGeoKey}},{key:"getBoundingBox",value:function(){var e=this.getOrigin(),t=this.getResolution(),n=e[0],r=e[1],i=n+t[0]*this.getWidth(),a=r+t[1]*this.getHeight();return[Math.min(n,i),Math.min(r,a),Math.max(n,i),Math.max(r,a)]}}]),e}(),an=function(){function e(t){l(this,e),this._dataView=new DataView(t)}return f(e,[{key:"getUint64",value:function(e,t){var n,r=this.getUint32(e,t),i=this.getUint32(e+4,t);if(t){if(n=r+Math.pow(2,32)*i,!Number.isSafeInteger(n))throw new Error("".concat(n," exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues"));return n}if(n=Math.pow(2,32)*r+i,!Number.isSafeInteger(n))throw new Error("".concat(n," exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues"));return n}},{key:"getInt64",value:function(e,t){for(var n=0,r=(128&this._dataView.getUint8(e+(t?7:0)))>0,i=!0,a=0;a<8;a++){var o=this._dataView.getUint8(e+(t?a:7-a));r&&(i?0!==o&&(o=255&~(o-1),i=!1):o=255&~o),n+=o*Math.pow(256,a)}return r&&(n=-n),n}},{key:"getUint8",value:function(e,t){return this._dataView.getUint8(e,t)}},{key:"getInt8",value:function(e,t){return this._dataView.getInt8(e,t)}},{key:"getUint16",value:function(e,t){return this._dataView.getUint16(e,t)}},{key:"getInt16",value:function(e,t){return this._dataView.getInt16(e,t)}},{key:"getUint32",value:function(e,t){return this._dataView.getUint32(e,t)}},{key:"getInt32",value:function(e,t){return this._dataView.getInt32(e,t)}},{key:"getFloat32",value:function(e,t){return this._dataView.getFloat32(e,t)}},{key:"getFloat64",value:function(e,t){return this._dataView.getFloat64(e,t)}},{key:"buffer",get:function(){return this._dataView.buffer}}]),e}(),on=function(){function e(t,n,r,i){l(this,e),this._dataView=new DataView(t),this._sliceOffset=n,this._littleEndian=r,this._bigTiff=i}return f(e,[{key:"covers",value:function(e,t){return this.sliceOffset<=e&&this.sliceTop>=e+t}},{key:"readUint8",value:function(e){return this._dataView.getUint8(e-this._sliceOffset,this._littleEndian)}},{key:"readInt8",value:function(e){return this._dataView.getInt8(e-this._sliceOffset,this._littleEndian)}},{key:"readUint16",value:function(e){return this._dataView.getUint16(e-this._sliceOffset,this._littleEndian)}},{key:"readInt16",value:function(e){return this._dataView.getInt16(e-this._sliceOffset,this._littleEndian)}},{key:"readUint32",value:function(e){return this._dataView.getUint32(e-this._sliceOffset,this._littleEndian)}},{key:"readInt32",value:function(e){return this._dataView.getInt32(e-this._sliceOffset,this._littleEndian)}},{key:"readFloat32",value:function(e){return this._dataView.getFloat32(e-this._sliceOffset,this._littleEndian)}},{key:"readFloat64",value:function(e){return this._dataView.getFloat64(e-this._sliceOffset,this._littleEndian)}},{key:"readUint64",value:function(e){var t,n=this.readUint32(e),r=this.readUint32(e+4);if(this._littleEndian){if(t=n+Math.pow(2,32)*r,!Number.isSafeInteger(t))throw new Error("".concat(t," exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues"));return t}if(t=Math.pow(2,32)*n+r,!Number.isSafeInteger(t))throw new Error("".concat(t," exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues"));return t}},{key:"readInt64",value:function(e){for(var t=0,n=(128&this._dataView.getUint8(e+(this._littleEndian?7:0)))>0,r=!0,i=0;i<8;i++){var a=this._dataView.getUint8(e+(this._littleEndian?i:7-i));n&&(r?0!==a&&(a=255&~(a-1),r=!1):a=255&~a),t+=a*Math.pow(256,i)}return n&&(t=-t),t}},{key:"readOffset",value:function(e){return this._bigTiff?this.readUint64(e):this.readUint32(e)}},{key:"sliceOffset",get:function(){return this._sliceOffset}},{key:"sliceTop",get:function(){return this._sliceOffset+this.buffer.byteLength}},{key:"littleEndian",get:function(){return this._littleEndian}},{key:"bigTiff",get:function(){return this._bigTiff}},{key:"buffer",get:function(){return this._dataView.buffer}}]),e}(),sn=(n(19),"undefined"!==typeof navigator&&navigator.hardwareConcurrency,n(23)),un=n(15),An=n.n(un),cn=n(28),ln=n.n(cn),fn=n(21),hn=n.n(fn);function gn(e){if(e.every(Boolean)){var t=new AbortController;t.count=e.length;var n,r=a(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.aborted?o():i.addEventListener("abort",o)}}catch(s){r.e(s)}finally{r.f()}return t.signal}function o(){if(t.count-=1,0===t.count){t.abort();var n,r=a(e);try{for(r.s();!(n=r.n()).done;){n.value.removeEventListener("abort",o)}}catch(s){r.e(s)}finally{r.f()}}}}function dn(e,t,n){var r,i=t+n,o=new ArrayBuffer(n),s=new Uint8Array(o),u=a(e);try{for(u.s();!(r=u.n()).done;){var A=r.value,c=A.offset-t,l=A.top-i,f=0,h=0,g=void 0;c<0?f=-c:c>0&&(h=c),g=l<0?A.length-f:i-A.offset-f;var d=new Uint8Array(A.data,f,g);s.set(d,h)}}catch(p){u.e(p)}finally{u.f()}return o}function pn(e){if(0===e.length)return[];var t=[],n=[];t.push(n);for(var r=0;r<e.length;++r)0===r||e[r]===e[r-1]+1?n.push(e[r]):(n=[e[r]],t.push(n));return t}function vn(e){return yn.apply(this,arguments)}function yn(){return(yn=c(A.mark((function e(t){return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){return setTimeout(e,t)})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var mn=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.blockSize,i=void 0===r?65536:r;l(this,e),this.retrievalFunction=t,this.blockSize=i,this.blockRequests=new Map,this.blocks=new Map,this.signals=new Map,this.abortedBlockIds=new Set,this.blockIdsAwaitingRequest=null}return f(e,[{key:"fetch",value:function(){var e=c(A.mark((function e(t,n){var r,i,o,s,u,l,f,h,g,d,p,v,y,m,I,b,E,C,B,w,Q,k=this,_=arguments;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(r=_.length>2&&void 0!==_[2]&&_[2],i=_.length>3?_[3]:void 0,o=t+n,s=Math.floor(t/this.blockSize)*this.blockSize,u=[],l=[],f=[],h=s;h<o;h+=this.blockSize)g=Math.floor(h/this.blockSize),this.blocks.has(g)||this.blockRequests.has(g)||(l.push(g),this.signals.has(g)?this.signals.get(g).push(i):this.signals.set(g,[i])),this.blockRequests.has(g)&&f.push(this.blockRequests.get(g)),u.push(g);if(this.blockIdsAwaitingRequest)for(d=0;d<l.length;++d)this.blockIdsAwaitingRequest.add(l[d]);else this.blockIdsAwaitingRequest=new Set(l);if(r){e.next=12;break}return e.next=12,vn();case 12:if(this.blockIdsAwaitingRequest){p=pn(Array.from(this.blockIdsAwaitingRequest).sort()),v=a(p);try{for(m=function(){for(var e=y.value,t=Array.from(new Set(e.map((function(e){return k.signals.get(e)})).flat())),n=k.requestData(e[0]*k.blockSize,e.length*k.blockSize,gn(t)),r=function(t){var r=e[t];k.blockRequests.set(r,c(A.mark((function e(){var i,a,o,s;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n;case 3:i=e.sent,a=t*k.blockSize,o=Math.min(a+k.blockSize,i.data.byteLength),s=i.data.slice(a,o),k.blockRequests.delete(r),k.signals.delete(r),k.abortedBlockIds.delete(r),k.blocks.set(r,{data:s,offset:i.offset+a,length:s.byteLength,top:i.offset+o}),e.next=23;break;case 13:if(e.prev=13,e.t0=e.catch(0),"AbortError"!==e.t0.name){e.next=22;break}k.blocks.delete(r),k.blockRequests.delete(r),k.signals.delete(r),k.abortedBlockIds.add(r),e.next=23;break;case 22:throw e.t0;case 23:case"end":return e.stop()}}),e,null,[[0,13]])})))())},i=0;i<e.length;++i)r(i)},v.s();!(y=v.n()).done;)m()}catch(x){v.e(x)}finally{v.f()}this.blockIdsAwaitingRequest=null}for(I=[],b=0,E=l;b<E.length;b++)C=E[b],this.blockRequests.has(C)&&I.push(this.blockRequests.get(C));return e.next=17,Promise.all(I);case 17:return e.next=19,Promise.all(f);case 19:if(B=u.map((function(e){return k.blocks.get(e)})),w=[],!B.some((function(e){return!e}))){e.next=33;break}if(i.aborted){e.next=26;break}u.forEach((function(e){if(k.abortedBlockIds.has(e)){var t=k.requestData(e*k.blockSize,k.blockSize);k.blockRequests.set(e,c(A.mark((function n(){var r,i,a;return A.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t;case 2:r=n.sent,i=Math.min(k.blockSize,r.data.byteLength),a=r.data.slice(0,i),k.abortedBlockIds.delete(e),k.blocks.set(e,{data:a,offset:r.offset,length:a.byteLength,top:r.offset+i});case 7:case"end":return n.stop()}}),n)})))()),w.push(k.blockRequests.get(e))}})),e.next=27;break;case 26:return e.abrupt("return",[]);case 27:return e.next=29,Promise.all(w);case 29:return Q=u.map((function(e){return k.blocks.get(e)})),e.abrupt("return",dn(Q,t,n));case 33:return e.abrupt("return",dn(B,t,n));case 34:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"requestData",value:function(){var e=c(A.mark((function e(t,n,r){var i;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.retrievalFunction(t,n,r);case 2:return(i=e.sent).length?i.length!==i.data.byteLength&&(i.data=i.data.slice(0,i.length)):i.length=i.data.byteLength,i.top=i.offset+i.length,e.abrupt("return",i);case 6:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()}]),e}();function In(e,t){var n=t.forceXHR;if("function"===typeof fetch&&!n)return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.headers,r=void 0===n?{}:n,a=t.blockSize;return new mn(function(){var t=c(A.mark((function t(n,a,o){var s,u,c;return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch(e,{headers:i({},r,{Range:"bytes=".concat(n,"-").concat(n+a-1)}),signal:o});case 2:if((s=t.sent).ok){t.next=7;break}throw new Error("Error fetching data.");case 7:if(206!==s.status){t.next=21;break}if(!s.arrayBuffer){t.next=14;break}return t.next=11,s.arrayBuffer();case 11:t.t0=t.sent,t.next=17;break;case 14:return t.next=16,s.buffer();case 16:t.t0=t.sent.buffer;case 17:return u=t.t0,t.abrupt("return",{data:u,offset:n,length:a});case 21:if(!s.arrayBuffer){t.next=27;break}return t.next=24,s.arrayBuffer();case 24:t.t1=t.sent,t.next=30;break;case 27:return t.next=29,s.buffer();case 29:t.t1=t.sent.buffer;case 30:return c=t.t1,t.abrupt("return",{data:c,offset:0,length:c.byteLength});case 32:case"end":return t.stop()}}),t)})));return function(e,n,r){return t.apply(this,arguments)}}(),{blockSize:a})}(e,t);if("undefined"!==typeof XMLHttpRequest)return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.headers,r=void 0===n?{}:n,a=t.blockSize;return new mn(function(){var t=c(A.mark((function t(n,a){return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,s){var u=new XMLHttpRequest;u.open("GET",e),u.responseType="arraybuffer";for(var A=i({},r,{Range:"bytes=".concat(n,"-").concat(n+a-1)}),c=0,l=Object.entries(A);c<l.length;c++){var f=o(l[c],2),h=f[0],g=f[1];u.setRequestHeader(h,g)}u.onload=function(){var e=u.response;206===u.status?t({data:e,offset:n,length:a}):t({data:e,offset:0,length:e.byteLength})},u.onerror=s,u.send()})));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),{blockSize:a})}(e,t);if(An.a.get)return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.headers,r=void 0===n?{}:n,a=t.blockSize;return new mn(function(){var t=c(A.mark((function t(n,a){return A.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,o){var s=hn.a.parse(e);("http:"===s.protocol?An.a:ln.a).get(i({},s,{headers:i({},r,{Range:"bytes=".concat(n,"-").concat(n+a-1)})}),(function(e){var r=[];e.on("data",(function(e){r.push(e)})),e.on("end",(function(){var e=sn.Buffer.concat(r).buffer;t({data:e,offset:n,length:e.byteLength})}))})).on("error",o)})));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),{blockSize:a})}(e,t);throw new Error("No remote source available")}function bn(e){return{fetch:function(t,n){return c(A.mark((function r(){return A.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",new Promise((function(r,i){var a=e.slice(t,t+n),o=new FileReader;o.onload=function(e){return r(e.target.result)},o.onerror=i,o.readAsArrayBuffer(a)})));case 1:case"end":return r.stop()}}),r)})))()}}}function En(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}function Cn(e){var t={};for(var n in e){if(e.hasOwnProperty(n))t[e[n]]=n}return t}function Bn(e,t){for(var n=[],r=0;r<e;r++)n.push(t(r));return n}var wn=Cn(ot),Qn=Cn(bt),kn={};En(kn,wn),En(kn,Qn);Cn(ct);var _n={nextZero:function(e,t){for(var n=t;0!==e[n];)n++;return n},readUshort:function(e,t){return e[t]<<8|e[t+1]},readShort:function(e,t){var n=_n.ui8;return n[0]=e[t+1],n[1]=e[t+0],_n.i16[0]},readInt:function(e,t){var n=_n.ui8;return n[0]=e[t+3],n[1]=e[t+2],n[2]=e[t+1],n[3]=e[t+0],_n.i32[0]},readUint:function(e,t){var n=_n.ui8;return n[0]=e[t+3],n[1]=e[t+2],n[2]=e[t+1],n[3]=e[t+0],_n.ui32[0]},readASCII:function(e,t,n){return n.map((function(n){return String.fromCharCode(e[t+n])})).join("")},readFloat:function(e,t){var n=_n.ui8;return Bn(4,(function(r){n[r]=e[t+3-r]})),_n.fl32[0]},readDouble:function(e,t){var n=_n.ui8;return Bn(8,(function(r){n[r]=e[t+7-r]})),_n.fl64[0]},writeUshort:function(e,t,n){e[t]=n>>8&255,e[t+1]=255&n},writeUint:function(e,t,n){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=n>>0&255},writeASCII:function(e,t,n){Bn(n.length,(function(r){e[t+r]=n.charCodeAt(r)}))},ui8:new Uint8Array(8)};_n.fl64=new Float64Array(_n.ui8.buffer),_n.writeDouble=function(e,t,n){_n.fl64[0]=n,Bn(8,(function(n){e[t+n]=_n.ui8[7-n]}))};var xn=function(){function e(){l(this,e)}return f(e,[{key:"log",value:function(){}},{key:"info",value:function(){}},{key:"warn",value:function(){}},{key:"error",value:function(){}},{key:"time",value:function(){}},{key:"timeEnd",value:function(){}}]),e}();new xn;function Sn(e){switch(e){case lt.BYTE:case lt.ASCII:case lt.SBYTE:case lt.UNDEFINED:return 1;case lt.SHORT:case lt.SSHORT:return 2;case lt.LONG:case lt.SLONG:case lt.FLOAT:case lt.IFD:return 4;case lt.RATIONAL:case lt.SRATIONAL:case lt.DOUBLE:case lt.LONG8:case lt.SLONG8:case lt.IFD8:return 8;default:throw new RangeError("Invalid field type: ".concat(e))}}function On(e){var t=e.GeoKeyDirectory;if(!t)return null;for(var n={},r=4;r<=4*t[3];r+=4){var i=bt[t[r]],a=t[r+1]?ot[t[r+1]]:null,o=t[r+2],s=t[r+3],u=null;if(a){if("undefined"===typeof(u=e[a])||null===u)throw new Error("Could not get value of geoKey '".concat(i,"'."));"string"===typeof u?u=u.substring(s,s+o-1):u.subarray&&(u=u.subarray(s,s+o),1===o&&(u=u[0]))}else u=s;n[i]=u}return n}function Dn(e,t,n,r){var i=null,a=null,o=Sn(t);switch(t){case lt.BYTE:case lt.ASCII:case lt.UNDEFINED:i=new Uint8Array(n),a=e.readUint8;break;case lt.SBYTE:i=new Int8Array(n),a=e.readInt8;break;case lt.SHORT:i=new Uint16Array(n),a=e.readUint16;break;case lt.SSHORT:i=new Int16Array(n),a=e.readInt16;break;case lt.LONG:case lt.IFD:i=new Uint32Array(n),a=e.readUint32;break;case lt.SLONG:i=new Int32Array(n),a=e.readInt32;break;case lt.LONG8:case lt.IFD8:i=new Array(n),a=e.readUint64;break;case lt.SLONG8:i=new Array(n),a=e.readInt64;break;case lt.RATIONAL:i=new Uint32Array(2*n),a=e.readUint32;break;case lt.SRATIONAL:i=new Int32Array(2*n),a=e.readInt32;break;case lt.FLOAT:i=new Float32Array(n),a=e.readFloat32;break;case lt.DOUBLE:i=new Float64Array(n),a=e.readFloat64;break;default:throw new RangeError("Invalid field type: ".concat(t))}if(t!==lt.RATIONAL&&t!==lt.SRATIONAL)for(var s=0;s<n;++s)i[s]=a.call(e,r+s*o);else for(var u=0;u<n;u+=2)i[u]=a.call(e,r+u*o),i[u+1]=a.call(e,r+(u*o+4));return t===lt.ASCII?new TextDecoder("utf-8").decode(i):i}var Rn=function e(t,n,r){l(this,e),this.fileDirectory=t,this.geoKeyDirectory=n,this.nextIFDByteOffset=r},jn=function(e){s(n,e);var t=u(n);function n(e){var r;return l(this,n),(r=t.call(this,"No image at index ".concat(e))).index=e,r}return n}(r(Error)),Mn=function(){function e(){l(this,e)}return f(e,[{key:"readRasters",value:function(){var e=c(A.mark((function e(){var t,n,r,a,s,u,c,l,f,h,g,d,p,v,y,m,I,b,E,C,B,w,Q,k,_,x,S,O,D,R,j,M,N,F,T,L,P,U,G,q=arguments;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=q.length>0&&void 0!==q[0]?q[0]:{},n=t.window,r=t.width,a=t.height,s=t.resX,u=t.resY,c=t.bbox,e.next=5,this.getImage();case 5:return l=e.sent,f=l,e.next=9,this.getImageCount();case 9:if(h=e.sent,g=l.getBoundingBox(),!n||!c){e.next=13;break}throw new Error('Both "bbox" and "window" passed.');case 13:if(!r&&!a){e.next=24;break}if(n&&(d=l.getOrigin(),p=o(d,2),v=p[0],y=p[1],m=l.getResolution(),I=o(m,2),b=I[0],E=I[1],c=[v+n[0]*b,y+n[1]*E,v+n[2]*b,y+n[3]*E]),C=c||g,!r){e.next=20;break}if(!s){e.next=19;break}throw new Error("Both width and resX passed");case 19:s=(C[2]-C[0])/r;case 20:if(!a){e.next=24;break}if(!u){e.next=23;break}throw new Error("Both width and resY passed");case 23:u=(C[3]-C[1])/a;case 24:if(!s&&!u){e.next=48;break}B=[],w=0;case 27:if(!(w<h)){e.next=36;break}return e.next=30,this.getImage(w);case 30:Q=e.sent,k=Q.fileDirectory,_=k.SubfileType,x=k.NewSubfileType,(0===w||2===_||1&x)&&B.push(Q);case 33:++w,e.next=27;break;case 36:B.sort((function(e,t){return e.getWidth()-t.getWidth()})),S=0;case 38:if(!(S<B.length)){e.next=48;break}if(O=B[S],D=(g[2]-g[0])/O.getWidth(),R=(g[3]-g[1])/O.getHeight(),f=O,!(s&&s>D||u&&u>R)){e.next=45;break}return e.abrupt("break",48);case 45:++S,e.next=38;break;case 48:return j=n,c&&(M=l.getOrigin(),N=o(M,2),F=N[0],T=N[1],L=f.getResolution(l),P=o(L,2),U=P[0],G=P[1],j=[Math.round((c[0]-F)/U),Math.round((c[1]-T)/G),Math.round((c[2]-F)/U),Math.round((c[3]-T)/G)],j=[Math.min(j[0],j[2]),Math.min(j[1],j[3]),Math.max(j[0],j[2]),Math.max(j[1],j[3])]),e.abrupt("return",f.readRasters(i({},t,{window:j})));case 51:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),Nn=function(e){s(n,e);var t=u(n);function n(e,r,i,a){var o,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return l(this,n),(o=t.call(this)).source=e,o.littleEndian=r,o.bigTiff=i,o.firstIFDOffset=a,o.cache=s.cache||!1,o.ifdRequests=[],o.ghostValues=null,o}return f(n,[{key:"getSlice",value:function(){var e=c(A.mark((function e(t,n){var r;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.bigTiff?4048:1024,e.t0=on,e.next=4,this.source.fetch(t,"undefined"!==typeof n?n:r);case 4:return e.t1=e.sent,e.t2=t,e.t3=this.littleEndian,e.t4=this.bigTiff,e.abrupt("return",new e.t0(e.t1,e.t2,e.t3,e.t4));case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"parseFileDirectoryAt",value:function(){var e=c(A.mark((function e(t){var n,r,i,a,o,s,u,c,l,f,h,g,d,p,v,y,m,I,b,E;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.bigTiff?20:12,r=this.bigTiff?8:2,e.next=4,this.getSlice(t);case 4:if(i=e.sent,a=this.bigTiff?i.readUint64(t):i.readUint16(t),o=a*n+(this.bigTiff?16:6),i.covers(t,o)){e.next=11;break}return e.next=10,this.getSlice(t,o);case 10:i=e.sent;case 11:s={},u=t+(this.bigTiff?8:2),c=0;case 14:if(!(c<a)){e.next=41;break}if(l=i.readUint16(u),f=i.readUint16(u+2),h=this.bigTiff?i.readUint64(u+4):i.readUint32(u+4),g=void 0,d=void 0,p=Sn(f),v=u+(this.bigTiff?12:8),!(p*h<=(this.bigTiff?8:4))){e.next=26;break}g=Dn(i,f,h,v),e.next=36;break;case 26:if(y=i.readOffset(v),m=Sn(f)*h,!i.covers(y,m)){e.next=32;break}g=Dn(i,f,h,y),e.next=36;break;case 32:return e.next=34,this.getSlice(y,m);case 34:I=e.sent,g=Dn(I,f,h,y);case 36:d=1===h&&-1===At.indexOf(l)&&f!==lt.RATIONAL&&f!==lt.SRATIONAL?g[0]:g,s[ot[l]]=d;case 38:u+=n,++c,e.next=14;break;case 41:return b=On(s),E=i.readOffset(t+r+n*a),e.abrupt("return",new Rn(s,b,E));case 44:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"requestIFD",value:function(){var e=c(A.mark((function e(t){var n=this;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.ifdRequests[t]){e.next=4;break}return e.abrupt("return",this.ifdRequests[t]);case 4:if(0!==t){e.next=9;break}return this.ifdRequests[t]=this.parseFileDirectoryAt(this.firstIFDOffset),e.abrupt("return",this.ifdRequests[t]);case 9:if(this.ifdRequests[t-1]){e.next=19;break}e.prev=10,this.ifdRequests[t-1]=this.requestIFD(t-1),e.next=19;break;case 14:if(e.prev=14,e.t0=e.catch(10),!(e.t0 instanceof jn)){e.next=18;break}throw new jn(t);case 18:throw e.t0;case 19:return this.ifdRequests[t]=c(A.mark((function e(){var r;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.ifdRequests[t-1];case 2:if(0!==(r=e.sent).nextIFDByteOffset){e.next=5;break}throw new jn(t);case 5:return e.abrupt("return",n.parseFileDirectoryAt(r.nextIFDByteOffset));case 6:case"end":return e.stop()}}),e)})))(),e.abrupt("return",this.ifdRequests[t]);case 21:case"end":return e.stop()}}),e,this,[[10,14]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getImage",value:function(){var e=c(A.mark((function e(){var t,n,r=arguments;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:0,e.next=3,this.requestIFD(t);case 3:return n=e.sent,e.abrupt("return",new rn(n.fileDirectory,n.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source));case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getImageCount",value:function(){var e=c(A.mark((function e(){var t,n;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0,n=!0;case 2:if(!n){e.next=18;break}return e.prev=3,e.next=6,this.requestIFD(t);case 6:++t,e.next=16;break;case 9:if(e.prev=9,e.t0=e.catch(3),!(e.t0 instanceof jn)){e.next=15;break}n=!1,e.next=16;break;case 15:throw e.t0;case 16:e.next=2;break;case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,this,[[3,9]])})));return function(){return e.apply(this,arguments)}}()},{key:"getGhostValues",value:function(){var e=c(A.mark((function e(){var t,n,r,i,a,s,u,c,l=this;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.bigTiff?16:8,!this.ghostValues){e.next=3;break}return e.abrupt("return",this.ghostValues);case 3:return r=(n="GDAL_STRUCTURAL_METADATA_SIZE=").length+100,e.next=7,this.getSlice(t,r);case 7:if(i=e.sent,n!==Dn(i,lt.ASCII,n.length,t)){e.next=19;break}if(a=Dn(i,lt.ASCII,r,t),s=a.split("\n")[0],!((u=Number(s.split("=")[1].split(" ")[0])+s.length)>r)){e.next=16;break}return e.next=15,this.getSlice(t,u);case 15:i=e.sent;case 16:c=Dn(i,lt.ASCII,u,t),this.ghostValues={},c.split("\n").filter((function(e){return e.length>0})).map((function(e){return e.split("=")})).forEach((function(e){var t=o(e,2),n=t[0],r=t[1];l.ghostValues[n]=r}));case 19:return e.abrupt("return",this.ghostValues);case 20:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"close",value:function(){return"function"===typeof this.source.close&&this.source.close()}}],[{key:"fromSource",value:function(){var e=c(A.mark((function e(t,r){var i,a,o,s,u,c,l;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.fetch(0,1024);case 2:if(i=e.sent,a=new an(i),18761!==(o=a.getUint16(0,0))){e.next=9;break}s=!0,e.next=14;break;case 9:if(19789!==o){e.next=13;break}s=!1,e.next=14;break;case 13:throw new TypeError("Invalid byte order value.");case 14:if(42!==(u=a.getUint16(2,s))){e.next=19;break}c=!1,e.next=27;break;case 19:if(43!==u){e.next=26;break}if(c=!0,8===a.getUint16(4,s)){e.next=24;break}throw new Error("Unsupported offset byte-size.");case 24:e.next=27;break;case 26:throw new TypeError("Invalid magic number.");case 27:return l=c?a.getUint64(8,s):a.getUint32(4,s),e.abrupt("return",new n(t,s,c,l,r));case 29:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}]),n}(Mn);function Fn(e){return Tn.apply(this,arguments)}function Tn(){return(Tn=c(A.mark((function e(t){var n,r=arguments;return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:{},e.abrupt("return",Nn.fromSource(In(t,n)));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ln(e){return Pn.apply(this,arguments)}function Pn(){return(Pn=c(A.mark((function e(t){return A.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Nn.fromSource(bn(t)));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Un=n(29),Gn=n.n(Un),qn="undefined"!==typeof navigator?navigator.hardwareConcurrency||4:null,Hn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qn;y()(this,e),this.workers=[],this.idleWorkers=[],this.waitQueue=[],this.decoder=null;for(var n=0;n<t;++n){var r=new Gn.a;this.workers.push(r),this.idleWorkers.push(r)}}return I()(e,[{key:"decode",value:function(){var e=p()(g.a.mark((function e(t,n){var r,i=this;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.waitForWorker();case 2:return r=e.sent,e.abrupt("return",new Promise((function(e,a){r.onmessage=function(t){i.finishTask(r),e(t.data[0])},r.onerror=function(e){i.finishTask(r),a(e)},r.postMessage(["decode",t,n],[n])})));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"waitForWorker",value:function(){var e=p()(g.a.mark((function e(){var t,n,r;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.idleWorkers.pop())){e.next=3;break}return e.abrupt("return",t);case 3:return n={},r=new Promise((function(e){n.resolve=e})),this.waitQueue.push(n),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"finishTask",value:function(){var e=p()(g.a.mark((function e(t){var n;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=this.waitQueue.pop())?n.resolve(t):this.idleWorkers.push(t);case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"destroy",value:function(){for(var e=0;e<this.workers.length;++e)this.workers[e].terminate()}}]),e}(),Yn=n(30),Jn=n.n(Yn);function zn(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 Kn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zn(Object(n),!0).forEach((function(t){D()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Wn=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y()(this,e),this.url=t,this.options=n}return I()(e,[{key:"getItem",value:function(){var e=p()(g.a.mark((function e(t){var n,r,i,a=arguments;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},r=pe(this.url,t),e.next=4,fetch(r,Kn(Kn({},this.options),n));case 4:if(404!==(i=e.sent).status){e.next=9;break}throw new rt.KeyError(t);case 9:if(200===i.status){e.next=11;break}throw new rt.HTTPError(String(i.status));case 11:return e.abrupt("return",i.arrayBuffer());case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"containsItem",value:function(){var e=p()(g.a.mark((function e(t){var n,r,i,a=arguments;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},r=pe(this.url,t),e.next=4,fetch(r,Kn(Kn({},this.options),n));case 4:return i=e.sent,e.abrupt("return",200===i.status);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),Vn=function(){function e(t){var n,r=this,i=t.data,a=t.dimensions,o=t.isRgb,s=t.scale,u=void 0===s?1:s,A=t.translate,c=void 0===A?{x:0,y:0}:A;(y()(this,e),Array.isArray(i))?(n=F()(i,1)[0],this.numLevels=i.length):(n=i,this.numLevels=1);this.type="zarr",this.scale=u,this.translate=c,this.isRgb=o||function(e){var t=e[e.length-1];return e.length>2&&(3===t||4===t)}(n.shape),this.dimensions=a,this._data=i,this._dimIndices=new Map,a.forEach((function(e,t){var n=e.field;return r._dimIndices.set(n,t)}));var l=n,f=l.dtype,h=l.chunks;this.dtype="<".concat(f.slice(1)),this.tileSize=h[this._dimIndices.get("x")]}return I()(e,[{key:"getTile",value:function(){var e=p()(g.a.mark((function e(t){var n,r,i,a,o,s,u,A,c,l,f,h,d,v,y=this;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.x,r=t.y,i=t.z,a=t.loaderSelection,o=void 0===a?[]:a,s=t.signal,u=G[this.dtype].TypedArray,A=this._getSource(i),c=["x","y"].map((function(e){return y._dimIndices.get(e)})),l=F()(c,2),f=l[0],h=l[1],d=o.map(function(){var e=p()(g.a.mark((function e(t){var i,a,o,c,l,d,p;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=y._serializeSelection(t))[h]=r,i[f]=n,a=A.keyPrefix+i.join("."),e.prev=4,e.next=7,A.store.getItem(a,{signal:s});case 7:o=e.sent,e.next=15;break;case 10:if(e.prev=10,e.t0=e.catch(4),"AbortError"===e.t0.name){e.next=14;break}throw e.t0;case 14:return e.abrupt("return",null);case 15:if(c=new Uint8Array(o),!A.compressor){e.next=20;break}return e.next=19,A.compressor.decode(c);case 19:c=e.sent;case 20:if(l=new u(c.buffer),">"===A.dtype[0]&&ce(l),d=A.chunks[f],!((p=A.chunks[h])<y.tileSize||d<y.tileSize)){e.next=26;break}return e.abrupt("return",Ae({data:l,width:d,height:p},y.tileSize,y.tileSize));case 26:return e.abrupt("return",l);case 27:case"end":return e.stop()}}),e,null,[[4,10]])})));return function(t){return e.apply(this,arguments)}}()),e.next=7,Promise.all(d);case 7:if(v=e.sent,!(A.store instanceof Wn&&(null===s||void 0===s?void 0:s.aborted))){e.next=10;break}return e.abrupt("return",null);case 10:return e.abrupt("return",{data:v,width:this.tileSize,height:this.tileSize});case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getRaster",value:function(){var e=p()(g.a.mark((function e(t){var n,r,i,a,o,s,u,A,c,l,f,h,d,v=this;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.z,r=t.loaderSelection,i=void 0===r?[]:r,a=this._getSource(n),o=["x","y"].map((function(e){return v._dimIndices.get(e)})),s=F()(o,2),u=s[0],A=s[1],c=i.map(function(){var e=p()(g.a.mark((function e(t){var n,r,i;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=v._serializeSelection(t))[A]=null,n[u]=null,v.isRgb&&(n[n.length-1]=null),e.next=6,a.getRaw(n);case 6:return r=e.sent,i=r.data,e.abrupt("return",i);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=6,Promise.all(c);case 6:return l=e.sent,f=a.shape,h=f[u],d=f[A],e.abrupt("return",{data:l,width:h,height:d});case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"onTileError",value:function(e){if(!(e instanceof rt.BoundsCheckError))throw e}},{key:"getRasterSize",value:function(e){var t=this,n=e.z,r=this._getSource(n).shape,i=["y","x"].map((function(e){return r[t._dimIndices.get(e)]})),a=F()(i,2);return{height:a[0],width:a[1]}}},{key:"getMetadata",value:function(){return{}}},{key:"_getSource",value:function(e){return"number"===typeof e&&this.isPyramid?this._data[e]:this._data}},{key:"_serializeSelection",value:function(e){var t=this;if(Array.isArray(e))return M()(e);var n=Array(this.dimensions.length).fill(0);return Object.entries(e).forEach((function(e){var r=F()(e,2),i=r[0],a=r[1];if(!t._dimIndices.has(i))throw Error('Dimension "'.concat(i,'" does not exist on loader.\n           Must be one of "').concat(t.dimensions.map((function(e){return e.field})),'."'));var o=t._dimIndices.get(i);switch(Jn()(a)){case"number":n[o]=a;break;case"string":var s=t.dimensions[o],u=s.values,A=s.type;if("nominal"===A||"ordinal"===A){n[o]=u.indexOf(a);break}throw Error('Cannot use selection "'.concat(a,'" for dimension "').concat(i,'" with type "').concat(A,'".'));default:throw Error("Named selection must be a string or number. Got ".concat(a," for ").concat(i,"."))}})),n}},{key:"isPyramid",get:function(){return Array.isArray(this._data)}},{key:"base",get:function(){return this.isPyramid?this._data[0]:this._data}}]),e}(),Xn=n(31),Zn=n.n(Xn),$n=function(){function e(t){y()(this,e);this.metadataOMEXML=Zn.a.parse(t,{ignoreAttributes:!1,attributeNamePrefix:"@_",trimValues:!0,allowBooleanAttributes:!0}).OME;var n=(this.metadataOMEXML.Image.length?this.metadataOMEXML.Image[0]:this.metadataOMEXML.Image).Pixels;this._Pixels=n,this.SizeZ=Number.parseInt(n["@_SizeZ"]),this.SizeT=Number.parseInt(n["@_SizeT"]),this.SizeC=Number.parseInt(n["@_SizeC"]),this.SizeX=Number.parseInt(n["@_SizeX"]),this.SizeY=Number.parseInt(n["@_SizeY"]),this.DimensionOrder=n["@_DimensionOrder"],this.Type=n["@_Type"];var r=n["@_PhysicalSizeYUnit"];this.PhysicalSizeYUnit=r&&r.includes("\xb5m")?"\xb5m":r;var i=n["@_PhysicalSizeXUnit"];this.PhysicalSizeXUnit=i&&i.includes("\xb5m")?"\xb5m":i,this.PhysicalSizeY=n["@_PhysicalSizeY"],this.PhysicalSizeX=n["@_PhysicalSizeX"]}return I()(e,[{key:"getChannelNames",value:function(){var e=this._Pixels.Channel;return Array.isArray(e)?e.map((function(e,t){return e["@_Name"]||"Channel ".concat(t)})):[e["@_Name"]||"Channel ".concat(0)]}},{key:"getNumberOfImages",value:function(){return this.metadataOMEXML.Image.length||0}},{key:"SamplesPerPixel",get:function(){var e=this._Pixels.Channel;return Array.isArray(e)?e.map((function(e){return e["@_SamplesPerPixel"]}))[0]:[e["@_SamplesPerPixel"]]}}]),e}();function er(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 tr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?er(Object(n),!0).forEach((function(t){D()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):er(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nr={uint8:"<u1",uint16:"<u2",uint32:"<u4",float:"<f4",int8:"<u1",int16:"<u2",int32:"<u4"},rr=function(){function e(t){var n=t.tiff,r=t.pool,i=t.firstImage,a=t.omexmlString,o=t.offsets;y()(this,e),this.pool=r,this.tiff=n,this.type="ome-tiff",this.omexml=new $n(a),this.physicalSizes={x:{value:this.omexml.PhysicalSizeX,unit:this.omexml.PhysicalSizeXUnit},y:{value:this.omexml.PhysicalSizeY,unit:this.omexml.PhysicalSizeYUnit}},this.software=i.fileDirectory.Software,this.offsets=o||[],this.channelNames=this.omexml.getChannelNames(),this.width=this.omexml.SizeX,this.height=this.omexml.SizeY,this.tileSize=i.getTileWidth();var s=i.fileDirectory.SubIFDs;this.numLevels=(null===s||void 0===s?void 0:s.length)||this.omexml.getNumberOfImages(),this.isBioFormats6Pyramid=s,this.isPyramid=this.numLevels>1,this.dimensions=de(this.omexml),this.dtype=nr[this.omexml.Type],this.isRgb=3===this.omexml.SamplesPerPixel||3===this.channelNames.length&&"uint8"===this.omexml.Type}return I()(e,[{key:"_getIFDIndex",value:function(e){var t,n=e.z,r=void 0===n?0:n,i=e.channel,a=e.time,o=void 0===a?0:a;if(this.channelNames.every((function(e){return!e})))console.warn("No channel names found in OMEXML.  Please be sure to use numeric indexing."),t=i;else if("string"===typeof i)t=this.channelNames.indexOf(i);else{if("number"!==typeof i)throw new Error("Channel selection must be numeric index or string");t=i}var s=this.omexml,u=s.SizeZ,A=s.SizeT,c=s.SizeC;switch(s.DimensionOrder){case"XYZCT":return o*u*c+t*u+r;case"XYZTC":return t*u*A+o*u+r;case"XYCTZ":return r*c*A+o*c+t;case"XYCZT":return o*c*u+r*c+t;case"XYTCZ":return r*A*c+t*A+o;case"XYTZC":return t*A*u+r*A+o;default:throw new Error("Dimension order is required for OMETIFF")}}},{key:"onTileError",value:function(e){console.error(e)}},{key:"getTile",value:function(){var e=p()(g.a.mark((function e(t){var n,r,i,a,o,s,u,A,c,l,f,h,d,v,y,m,I,b=this;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.x,r=t.y,i=t.z,a=t.loaderSelection,o=void 0===a?[]:a,s=t.signal,this._tileInBounds({x:n,y:r,z:i})){e.next=3;break}return e.abrupt("return",null);case 3:return u=this.tiff,A=this.isBioFormats6Pyramid,c=this.omexml,l=this.tileSize,f=c.SizeZ,h=c.SizeT,d=c.SizeC,v=i*f*h*d,m=o.map(function(){var e=p()(g.a.mark((function e(t){var a,o,c;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=b._getIFDIndex(t),o=v+a,A){e.next=6;break}b._parseIFD(o),e.next=11;break;case 6:return b._parseIFD(a),e.next=9,u.getImage(a);case 9:c=e.sent,0!==i&&(u.ifdRequests[o]=u.parseFileDirectoryAt(c.fileDirectory.SubIFDs[i-1]));case 11:return e.next=13,u.getImage(o);case 13:return y=e.sent,e.abrupt("return",b._getChannel({image:y,x:n,y:r,z:i,signal:s}));case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=9,Promise.all(m);case 9:if(I=e.sent,!(null===s||void 0===s?void 0:s.aborted)){e.next=12;break}return e.abrupt("return",null);case 12:return e.abrupt("return",{data:I,width:l,height:l});case 13:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getRaster",value:function(){var e=p()(g.a.mark((function e(t){var n,r,i,a,o,s,u,A,c,l,f,h,d,v,y,m,I=this;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.z,r=t.loaderSelection,i=this.tiff,a=this.omexml,o=this.isBioFormats6Pyramid,s=this.pool,u=a.SizeZ,A=a.SizeT,c=a.SizeC,e.next=5,Promise.all(r.map(function(){var e=p()(g.a.mark((function e(t){var r,a,l,f,h;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=I._getIFDIndex(t),a=n*u*A*c+r,o){e.next=6;break}I._parseIFD(a),e.next=11;break;case 6:return I._parseIFD(r),e.next=9,i.getImage(r);case 9:l=e.sent,0!==n&&(i.ifdRequests[a]=i.parseFileDirectoryAt(l.fileDirectory.SubIFDs[n-1]));case 11:return e.next=13,i.getImage(a);case 13:return f=e.sent,e.next=16,f.readRasters({pool:s});case 16:return h=e.sent,e.abrupt("return",h[0]);case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:if(l=e.sent,r&&0!==r.length){e.next=8;break}return e.abrupt("return",tr({data:[]},this.getRasterSize({z:n})));case 8:return e.next=10,i.getImage(n*u*A*c+this._getIFDIndex(r[0]));case 10:return f=e.sent,h=f.getWidth(),d=f.getHeight(),"<f4"===this.dtype?v=l.map((function(e){return new Float32Array(e.buffer)})):this.omexml.Type.startsWith("int")?(y=l[0].BYTES_PER_ELEMENT,m=1===y?Uint8Array:2===y?Uint16Array:Uint32Array,v=l.map((function(e){return new m(e)}))):v=l,e.abrupt("return",{data:v,width:h,height:d});case 15:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getRasterSize",value:function(e){var t=e.z,n=this.width;return{height:this.height>>t,width:n>>t}}},{key:"getMetadata",value:function(){var e,t=this.omexml,n=t.metadataOMEXML,r=n.Image.AcquisitionDate,i=n.StructuredAnnotations,a=t.SizeX,o=t.SizeY,s=t.SizeZ,u=t.SizeT,A=t.SizeC,c=t.Type,l=t.PhysicalSizeX,f=t.PhysicalSizeXUnit,h=t.PhysicalSizeY,g=t.PhysicalSizeYUnit,d=t.PhysicalSizeZ,p=t.PhysicalSizeZUnit,v=l&&f?"".concat(l," (").concat(f,")"):"-",y=h&&g?"".concat(h," (").concat(g,")"):"-",m=d&&p?"".concat(d," (").concat(p,")"):"-";if(i){var I=i.MapAnnotation;e=I&&I.Value?Object.entries(I.Value).length:0}return{"Acquisition Date":r,"Dimensions (XY)":"".concat(a," x ").concat(o),"Pixels Type":c,"Pixels Size (XYZ)":"".concat(v," x ").concat(y," x ").concat(m),"Z-sections/Timepoints":"".concat(s," x ").concat(u),Channels:A,"ROI Count":e}}},{key:"_getChannel",value:function(){var e=p()(g.a.mark((function e(t){var n,r,i,a,o,s,u,A,c,l,f,h,d,p;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.image,r=t.x,i=t.y,a=t.z,o=t.signal,s=this.dtype,u=G[s].TypedArray,e.next=5,n.getTileOrStrip(r,i,0,this.pool,o);case 5:if(A=e.sent,c=new u(A.data),!(null===o||void 0===o?void 0:o.aborted)){e.next=9;break}return e.abrupt("return",null);case 9:if(n.littleEndian||ce(c),!(c.length<this.tileSize*this.tileSize)){e.next=17;break}return l=this.getRasterSize({z:a}),f=l.height,h=l.width,d=f,p=h,c.length/f===this.tileSize&&(p=this.tileSize),c.length/h===this.tileSize&&(d=this.tileSize),e.abrupt("return",Ae({data:c,width:p,height:d},this.tileSize,this.tileSize));case 17:if(!this.omexml.Type.startsWith("int")){e.next=23;break}if(1!==c.BYTES_PER_ELEMENT){e.next=20;break}return e.abrupt("return",new Uint8Array(new Int8Array(c.buffer)));case 20:if(2!==c.BYTES_PER_ELEMENT){e.next=22;break}return e.abrupt("return",new Uint16Array(new Int16Array(c.buffer)));case 22:return e.abrupt("return",new Uint32Array(new Int32Array(c.buffer)));case 23:return e.abrupt("return",c);case 24:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_tileInBounds",value:function(e){return function(e){var t=e.x,n=e.y,r=e.z,i=e.width,a=e.height,o=e.tileSize,s=e.numLevels,u=t<Math.ceil(i/(o*Math.pow(2,r)))&&t>=0,A=n<Math.ceil(a/(o*Math.pow(2,r)))&&n>=0;return u&&A&&(r>=0&&r<s)}({x:e.x,y:e.y,z:e.z,width:this.width,height:this.height,tileSize:this.tileSize,numLevels:this.numLevels})}},{key:"_parseIFD",value:function(e){var t=this.tiff,n=this.offsets;n.length>0&&(t.ifdRequests[e]=t.parseFileDirectoryAt(n[e]))}}]),e}(),ir=function(){function e(t){y()(this,e),this._store=t}return I()(e,[{key:"getItem",value:function(){var e=p()(g.a.mark((function e(t){var n,r;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this._store.get(t)){e.next=3;break}throw new rt.KeyError(t);case 3:return e.next=5,n.arrayBuffer();case 5:return r=e.sent,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"containsItem",value:function(){var e=p()(g.a.mark((function e(t){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._store.has(t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();function ar(e){return or.apply(this,arguments)}function or(){return(or=p()(g.a.mark((function e(t){var n,r,i,a,o,s,u,A,c,l,f,h;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.url,r=t.dimensions,i=t.isPyramid,a=t.isRgb,o=t.scale,s=t.translate,!i){e.next=14;break}return A="".concat(n).concat("/"===n.slice(-1)?"":"/",".zmetadata"),e.next=5,fetch(A);case 5:return c=e.sent,e.next=8,c.json();case 8:l=e.sent,f=l.metadata,h=Object.keys(f).filter((function(e){return e.includes(".zarray")})).map((function(e){return e.slice(0,-7)})),u=Promise.all(h.map((function(e){return Object(rt.openArray)({store:n,path:e})}))),e.next=15;break;case 14:u=Object(rt.openArray)({store:n});case 15:return e.t0=Vn,e.next=18,u;case 18:return e.t1=e.sent,e.t2=r,e.t3=o,e.t4=s,e.t5=a,e.t6={data:e.t1,dimensions:e.t2,scale:e.t3,translate:e.t4,isRgb:e.t5},e.abrupt("return",new e.t0(e.t6));case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function sr(e){return ur.apply(this,arguments)}function ur(){return(ur=p()(g.a.mark((function e(t){var n,r,i,a,o,s,u,A,c,l,f,h,d,p,v,y,m,I,b,E,C,B,w,Q,k,_,x,S,O,D,R;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.source,r=t.fetchOptions,i=void 0===r?{}:r,a="METADATA.ome.xml",o="data.zarr/","string"!==typeof n){e.next=12;break}return A=n.endsWith("/")?n:"".concat(n,"/"),c="".concat(A).concat(a),s=new Wn("".concat(A).concat(o),i),e.next=9,fetch(c).then((function(e){return e.arrayBuffer()}));case 9:u=e.sent,e.next=29;break;case 12:l=new Map,h=0;case 14:if(!(h<n.length)){e.next=28;break}if((d=n[h]).name!==a){e.next=22;break}return e.next=19,d.arrayBuffer();case 19:u=e.sent,e.next=25;break;case 22:f||(f=d.path.indexOf(o)+o.length),p=d.path.slice(f),l.set(p,d);case 25:h+=1,e.next=14;break;case 28:s=new ir(l);case 29:return e.next=31,he(s,"0/.zattrs");case 31:return v=e.sent,y=["0"],"multiscales"in v&&(m=v.multiscales[0].datasets,y=m.map((function(e){return"0/".concat(e.path)}))),I=y.map((function(e){return Object(rt.openArray)({store:s,path:e})})),e.next=37,Promise.all(I);case 37:if(b=e.sent,E=b[0],C=E.chunks,B=E.shape,w=C[-1]!==C[-2],Q=b.length>1||w?b:b[0],k=(new TextDecoder).decode(new Uint8Array(u)),_=new $n(k),x=de(_),S=B.slice(0,-2),O=x.filter((function(e){return e.values})),S.every((function(e,t){return e===O[t].values.length}))){e.next=53;break}if((D=[O.filter((function(e){return"time"===e.field}))[0],O.filter((function(e){return"channel"===e.field}))[0],O.filter((function(e){return"z"===e.field}))[0]]).every((function(e,t){return e.values.length===S[t]}))){e.next=51;break}throw Error("Dimension order is different from METADATA.ome.xml and isn't OME-Zarr.");case 51:return R=[].concat(D,M()(x.slice(-2))),e.abrupt("return",new Vn({data:Q,dimensions:R}));case 53:return e.abrupt("return",new Vn({data:Q,dimensions:x}));case 54:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ar(e){return cr.apply(this,arguments)}function cr(){return(cr=p()(g.a.mark((function e(t){var n,r,i,a,o,s,u,A,c;return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.urlOrFile,r=t.offsets,i=void 0===r?[]:r,a=t.headers,o=void 0===a?{}:a,!(n instanceof File)){e.next=7;break}return e.next=4,Ln(n);case 4:s=e.sent,e.next=10;break;case 7:return e.next=9,Fn(n,o);case 9:s=e.sent;case 10:return e.next=12,s.getImage(0);case 12:return u=e.sent,A=new Hn,c=u.fileDirectory.ImageDescription,e.abrupt("return",new rr({tiff:s,pool:A,firstImage:u,omexmlString:c,offsets:i}));case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}}])},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return c}));var r=n(12),i=n.n(r),a=n(26),o=n(55),s=n(172);function u(e){return A.apply(this,arguments)}function A(){return(A=Object(a.a)(i.a.mark((function e(t){var n,r,a,u,A,c,l;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Object(o.i)(t)){e.next=2;break}return e.abrupt("return",t);case 2:return n={},(r=Object(s.a)(t))>=0&&(n["content-length"]=String(r)),a=Object(s.b)(t),u=a.url,(A=a.type)&&(n["content-type"]=A),e.next=9,g(t);case 9:return(c=e.sent)&&(n["x-first-bytes"]=c),"string"===typeof t&&(t=(new TextEncoder).encode(t)),l=new Response(t,{headers:n}),Object.defineProperty(l,"url",{value:u}),e.abrupt("return",l);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function c(e){return l.apply(this,arguments)}function l(){return(l=Object(a.a)(i.a.mark((function e(t){var n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.ok){e.next=5;break}return e.next=3,f(t);case 3:throw n=e.sent,new Error(n);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return h.apply(this,arguments)}function h(){return(h=Object(a.a)(i.a.mark((function e(t){var n,r,a;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n="Failed to fetch resource ".concat(t.url," (").concat(t.status,"): "),e.prev=1,r=t.headers.get("Content-Type"),a=t.statusText,!r.includes("application/json")){e.next=11;break}return e.t0=a,e.t1=" ",e.next=9,t.text();case 9:e.t2=e.sent,a=e.t0+=e.t1.concat.call(e.t1,e.t2);case 11:n=(n+=a).length>60?"".concat(n.slice(60),"..."):n,e.next=17;break;case 15:e.prev=15,e.t3=e.catch(1);case 17:return e.abrupt("return",n);case 18:case"end":return e.stop()}}),e,null,[[1,15]])})))).apply(this,arguments)}function g(e){return d.apply(this,arguments)}function d(){return(d=Object(a.a)(i.a.mark((function e(t){var n,r,a,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=5,"string"!==typeof t){e.next=3;break}return e.abrupt("return","data:,".concat(t.slice(0,n)));case 3:if(!(t instanceof Blob)){e.next=8;break}return r=t.slice(0,5),e.next=7,new Promise((function(e){var t=new FileReader;t.onload=function(t){return e(t.target&&t.target.result)},t.readAsDataURL(r)}));case 7:return e.abrupt("return",e.sent);case 8:if(!(t instanceof ArrayBuffer)){e.next=12;break}return a=t.slice(0,n),o=p(a),e.abrupt("return","data:base64,".concat(o));case 12:return e.abrupt("return",null);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){for(var t="",n=new Uint8Array(e),r=0;r<n.byteLength;r++)t+=String.fromCharCode(n[r]);return btoa(t)}},function(e,t,n){"use strict";var r,i=n(3),a=n(7),o=n(4),s=n(58),u=n(2),A=n(6),c=n(89),l=n(1),f="EXT_color_buffer_float",h=(r={},Object(l.a)(r,33189,{bpp:2}),Object(l.a)(r,33190,{gl2:!0,bpp:3}),Object(l.a)(r,36012,{gl2:!0,bpp:4}),Object(l.a)(r,36168,{bpp:1}),Object(l.a)(r,34041,{bpp:4}),Object(l.a)(r,35056,{gl2:!0,bpp:4}),Object(l.a)(r,36013,{gl2:!0,bpp:5}),Object(l.a)(r,32854,{bpp:2}),Object(l.a)(r,36194,{bpp:2}),Object(l.a)(r,32855,{bpp:2}),Object(l.a)(r,33321,{gl2:!0,bpp:1}),Object(l.a)(r,33330,{gl2:!0,bpp:1}),Object(l.a)(r,33329,{gl2:!0,bpp:1}),Object(l.a)(r,33332,{gl2:!0,bpp:2}),Object(l.a)(r,33331,{gl2:!0,bpp:2}),Object(l.a)(r,33334,{gl2:!0,bpp:4}),Object(l.a)(r,33333,{gl2:!0,bpp:4}),Object(l.a)(r,33323,{gl2:!0,bpp:2}),Object(l.a)(r,33336,{gl2:!0,bpp:2}),Object(l.a)(r,33335,{gl2:!0,bpp:2}),Object(l.a)(r,33338,{gl2:!0,bpp:4}),Object(l.a)(r,33337,{gl2:!0,bpp:4}),Object(l.a)(r,33340,{gl2:!0,bpp:8}),Object(l.a)(r,33339,{gl2:!0,bpp:8}),Object(l.a)(r,32849,{gl2:!0,bpp:3}),Object(l.a)(r,32856,{gl2:!0,bpp:4}),Object(l.a)(r,32857,{gl2:!0,bpp:4}),Object(l.a)(r,36220,{gl2:!0,bpp:4}),Object(l.a)(r,36238,{gl2:!0,bpp:4}),Object(l.a)(r,36975,{gl2:!0,bpp:4}),Object(l.a)(r,36214,{gl2:!0,bpp:8}),Object(l.a)(r,36232,{gl2:!0,bpp:8}),Object(l.a)(r,36226,{gl2:!0,bpp:16}),Object(l.a)(r,36208,{gl2:!0,bpp:16}),Object(l.a)(r,33325,{gl2:f,bpp:2}),Object(l.a)(r,33327,{gl2:f,bpp:4}),Object(l.a)(r,34842,{gl2:f,bpp:8}),Object(l.a)(r,33326,{gl2:f,bpp:4}),Object(l.a)(r,33328,{gl2:f,bpp:8}),Object(l.a)(r,34836,{gl2:f,bpp:16}),Object(l.a)(r,35898,{gl2:f,bpp:4}),r),g=n(21),d=n(51);function p(e,t,n){var r=n[t];if(!r)return!1;var i=Object(g.g)(e)&&r.gl2||r.gl1;return"string"===typeof i?e.getExtension(i):i}n.d(t,"a",(function(){return v}));var v=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(i.a)(this,t),(n=Object(a.a)(this,Object(o.a)(t).call(this,e,r))).initialize(r),Object.seal(Object(s.a)(n)),n}return Object(A.a)(t,e),Object(u.a)(t,null,[{key:"isSupported",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{format:null},n=t.format;return!n||p(e,n,h)}},{key:"getSamplesForFormat",value:function(e,t){var n=t.format;return e.getInternalformatParameter(36161,n,32937)}}]),Object(u.a)(t,[{key:"initialize",value:function(e){var t=e.format,n=e.width,r=void 0===n?1:n,i=e.height,a=void 0===i?1:i,o=e.samples,s=void 0===o?0:o;return Object(d.a)(t,"Needs format"),this._trackDeallocatedMemory(),this.gl.bindRenderbuffer(36161,this.handle),0!==s&&Object(g.g)(this.gl)?this.gl.renderbufferStorageMultisample(36161,s,t,r,a):this.gl.renderbufferStorage(36161,t,r,a),this.format=t,this.width=r,this.height=a,this.samples=s,this._trackAllocatedMemory(this.width*this.height*(this.samples||1)*h[this.format].bpp),this}},{key:"resize",value:function(e){var t=e.width,n=e.height;return t!==this.width||n!==this.height?this.initialize({width:t,height:n,format:this.format,samples:this.samples}):this}},{key:"_createHandle",value:function(){return this.gl.createRenderbuffer()}},{key:"_deleteHandle",value:function(){this.gl.deleteRenderbuffer(this.handle),this._trackDeallocatedMemory()}},{key:"_bindHandle",value:function(e){this.gl.bindRenderbuffer(36161,e)}},{key:"_syncHandle",value:function(e){this.format=this.getParameter(36164),this.width=this.getParameter(36162),this.height=this.getParameter(36163),this.samples=this.getParameter(36011)}},{key:"_getParameter",value:function(e){return this.gl.bindRenderbuffer(36161,this.handle),this.gl.getRenderbufferParameter(36161,e)}}]),t}(c.a)},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return a}));var r="undefined"!==typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",i="undefined"!==typeof window?window:e,a=("undefined"!==typeof e||window,"undefined"!==typeof document&&document,!1);try{var o={get passive(){return a=!0,!0}};i.addEventListener("test",o,o),i.removeEventListener("test",o,o)}catch(s){}}).call(this,n(70))},function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s}));var r=n(51),i={};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";i[e]=i[e]||1;var t=i[e]++;return"".concat(e,"-").concat(t)}function o(e){return Object(r.a)("number"===typeof e,"Input must be a number"),e&&0===(e&e-1)}function s(e){var t=!0;for(var n in e){t=!1;break}return t}},function(e,t,n){"use strict";n.r(t);var r=n(419);n.d(t,"Vector2",(function(){return r.d})),n.d(t,"Vector3",(function(){return r.e})),n.d(t,"Vector4",(function(){return r.f})),n.d(t,"Matrix3",(function(){return r.a})),n.d(t,"Matrix4",(function(){return r.b})),n.d(t,"Quaternion",(function(){return r.c})),n.d(t,"config",(function(){return r.t})),n.d(t,"configure",(function(){return r.u})),n.d(t,"formatValue",(function(){return r.z})),n.d(t,"isArray",(function(){return r.A})),n.d(t,"clone",(function(){return r.s})),n.d(t,"equals",(function(){return r.x})),n.d(t,"exactEquals",(function(){return r.y})),n.d(t,"toRadians",(function(){return r.G})),n.d(t,"toDegrees",(function(){return r.F})),n.d(t,"radians",(function(){return r.C})),n.d(t,"degrees",(function(){return r.w})),n.d(t,"sin",(function(){return r.D})),n.d(t,"cos",(function(){return r.v})),n.d(t,"tan",(function(){return r.E})),n.d(t,"asin",(function(){return r.n})),n.d(t,"acos",(function(){return r.m})),n.d(t,"atan",(function(){return r.p})),n.d(t,"clamp",(function(){return r.r})),n.d(t,"lerp",(function(){return r.B})),n.d(t,"_withEpsilon",(function(){return r.l})),n.d(t,"checkNumber",(function(){return r.q})),n.d(t,"_MathUtils",(function(){return r.h})),n.d(t,"_SphericalCoordinates",(function(){return r.k})),n.d(t,"_Pose",(function(){return r.j})),n.d(t,"_Euler",(function(){return r.g})),n.d(t,"_Polygon",(function(){return r.i})),n.d(t,"assert",(function(){return r.o}))},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";var r=n(263),i=Object(r.a)();t.a=i},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";(function(e){var r=n(621),i=n(416),a=n(622);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,n){if(!u.TYPED_ARRAY_SUPPORT&&!(this instanceof u))return new u(e,t,n);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return A(this,e,t,n)}function A(e,t,n,r){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=f(e,t);return e}(e,t,n,r):"string"===typeof t?function(e,t,n){"string"===typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|g(t,n),i=(e=s(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|h(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||(r=t.length)!==r?s(e,0):f(e,t);if("Buffer"===t.type&&a(t.data))return f(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(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 l(e,t){if(c(t),e=s(e,t<0?0:0|h(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|h(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function h(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function g(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 n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(r)return P(e).length;t=(""+t).toLowerCase(),r=!0}}function d(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return Q(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return _(this,t,n);case"base64":return w(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function p(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"===typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var a,o=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,n/=2}function A(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=n;a<s;a++)if(A(e,a)===A(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===u)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(n+u>s&&(n=s-u),a=n;a>=0;a--){for(var l=!0,f=0;f<u;f++)if(A(e,a+f)!==A(t,f)){l=!1;break}if(l)return a}return-1}function m(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function I(e,t,n,r){return G(P(t,e.length-n),e,n,r)}function b(e,t,n,r){return G(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function E(e,t,n,r){return b(e,t,n,r)}function C(e,t,n,r){return G(U(t),e,n,r)}function B(e,t,n,r){return G(function(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function w(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function Q(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,o,s,u,A=e[i],c=null,l=A>239?4:A>223?3:A>191?2:1;if(i+l<=n)switch(l){case 1:A<128&&(c=A);break;case 2:128===(192&(a=e[i+1]))&&(u=(31&A)<<6|63&a)>127&&(c=u);break;case 3:a=e[i+1],o=e[i+2],128===(192&a)&&128===(192&o)&&(u=(15&A)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(c=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&A)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,l=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=l}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}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(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}(),t.kMaxLength=o(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return A(null,e,t,n)},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,n){return function(e,t,n,r){return c(t),t<=0?s(e,t):void 0!==n?"string"===typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return l(null,e)},u.allocUnsafeSlow=function(e){return l(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 n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?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 n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},u.byteLength=g,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)p(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)p(this,t,t+3),p(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)p(this,t,t+7),p(this,t+1,t+6),p(this,t+2,t+5),p(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?Q(this,0,e):d.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="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),A=this.slice(r,i),c=e.slice(t,n),l=0;l<s;++l)if(A[l]!==c[l]){a=A[l],o=c[l];break}return a<o?-1:o<a?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"===typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return m(this,e,t,n);case"utf8":case"utf-8":return I(this,e,t,n);case"ascii":return b(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function _(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function x(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=L(e[a]);return i}function S(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function O(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,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(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function j(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function M(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,a){return a||M(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,a){return a||M(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||O(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||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||O(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||O(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||O(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||O(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(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,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(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):j(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(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):j(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var a=n-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+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(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,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(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):j(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(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):j(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&n<t&&t<r)for(i=a-1;i>=0;--i)e[i+t]=this[i+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},u.prototype.fill=function(e,t,n,r){if("string"===typeof e){if("string"===typeof t?(r=t,t=0,n=this.length):"string"===typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!==typeof r)throw new TypeError("encoding must be a string");if("string"===typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(a=t;a<n;++a)this[a]=e;else{var o=u.isBuffer(e)?e:P(new u(e,r).toString()),s=o.length;for(a=0;a<n-t;++a)this[a+t]=o[a%s]}return this};var T=/[^+\/0-9A-Za-z-_]/g;function L(e){return e<16?"0"+e.toString(16):e.toString(16)}function P(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function U(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(T,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function G(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(70))},function(e,t,n){var r=n(684),i=n(687);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t,n){"use strict";var r=n(529);t.a=function(e,t){return t?Object(r.a)(e,t,{clone:!1}):e}},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",(function(){return r}))},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s}));var r=n(396),i=n(263),a=n(149),o=Object(r.a)((function(){return{paper:{maxHeight:200,overflow:"auto",zIndex:1500},span:{width:"70px",textAlign:"center",paddingLeft:"2px",paddingRight:"2px"},popper:{zIndex:4}}})),s={dark:Object(i.a)({palette:{type:"dark",primary:a.a,secondary:a.a,primaryBackground:"#222222",primaryBackgroundHighlight:"#000000",primaryBackgroundInput:"#D3D3D3",primaryBackgroundDim:"#333333",primaryBackgroundLight:"#757575",primaryForeground:"#D3D3D3",primaryForegroundDim:"#000000",primaryForegroundActive:"#9bb7d6",secondaryBackground:"#000000",secondaryBackgroundDim:"#444444",secondaryForeground:"#D3D3D3"},props:{MuiButtonBase:{disableRipple:!0}}}),light:Object(i.a)({palette:{type:"light",primary:a.a,secondary:a.a,primaryBackground:"#F1F1F1",primaryBackgroundHighlight:"#FFFFFF",primaryBackgroundInput:"#FFFFFF",primaryBackgroundDim:"#8A8A8A",primaryBackgroundLight:"#e0e0e0",primaryForeground:"#333333",primaryForegroundDim:"#808080",primaryForegroundActive:"#0074D9",secondaryBackground:"#F1F1F1",secondaryBackgroundDim:"#C0C0C0",secondaryForeground:"#222222"},props:{MuiButtonBase:{disableRipple:!0}}})}},,function(e,t){function n(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r="",i={};function a(e){for(var t in i)if(e.startsWith(t)){var n=i[t];e=e.replace(t,n)}return e.startsWith("http://")||e.startsWith("https://")||(e="".concat(r).concat(e)),e}},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o}));var r=n(154);function i(e){return e+3&-4}function a(e,t,n){return Object(r.c)(e,t,n)}function o(e,t,n){var r;if(e instanceof ArrayBuffer)r=new Uint8Array(e);else{var a=e.byteOffset,o=e.byteLength;r=new Uint8Array(e.buffer,a,o)}return t.set(r,n),n+i(r.byteLength)}},function(e,t,n){"use strict";var r={};function i(e,t,n){n||(n=Error);var i=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"===typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=e,r[e]=i}function a(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,o,s,u;if("string"===typeof t&&function(e,t,n){return e.substr(!n||n<0?0:+n,t.length)===t}(t,"not ")?(r="must not be",t=t.replace(/^not /,"")):r="must be",o=e,s=" argument",(void 0===u||u>o.length)&&(u=o.length),o.substring(u-s.length,u)===s)i="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var A=function(e,t,n){return"number"!==typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(A," ").concat(r," ").concat(a(t,"type"))}return i+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},function(e,t){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=A;var i=n(434),a=n(438);n(210)(A,i);for(var o=r(a.prototype),s=0;s<o.length;s++){var u=o[s];A.prototype[u]||(A.prototype[u]=a.prototype[u])}function A(e){if(!(this instanceof A))return new A(e);i.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",c)))}function c(){this._writableState.ended||t.nextTick(l,this)}function l(e){e.end()}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,n(86))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(114),i=n(72);t.default=function(e,t,n){void 0===n&&(n={});var a=r.getCoord(e),o=r.getCoord(t),s=i.degreesToRadians(o[1]-a[1]),u=i.degreesToRadians(o[0]-a[0]),A=i.degreesToRadians(a[1]),c=i.degreesToRadians(o[1]),l=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(A)*Math.cos(c);return i.radiansToLength(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),n.units)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(1),i=n(3),a=n(2),o=n(58),s=n(6),u=n(7),A=n(4),c=n(90),l=n(66),f=n(32),h=n(35);function g(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 d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(A.a)(e);if(t){var i=Object(A.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(u.a)(this,n)}}var v=function(e){Object(s.a)(n,e);var t=p(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(i.a)(this,n);var a=r.latitude,s=void 0===a?0:a,u=r.longitude,A=void 0===u?0:u,c=r.zoom,f=void 0===c?11:c,g=r.pitch,d=void 0===g?0:g,p=r.bearing,v=void 0===p?0:p,y=r.nearZMultiplier,m=void 0===y?.1:y,I=r.farZMultiplier,b=void 0===I?1.01:I,E=r.orthographic,C=void 0!==E&&E,B=r.repeat,w=void 0!==B&&B,Q=r.worldOffset,k=void 0===Q?0:Q,_=r.width,x=r.height,S=r.altitude,O=void 0===S?1.5:S,D=Math.pow(2,f);_=_||1,x=x||1,O=Math.max(.75,O);var R=Object(l.h)({width:_,height:x,pitch:d,altitude:O,nearZMultiplier:m,farZMultiplier:b}),j=R.fov,M=R.aspect,N=R.focalDistance,F=R.near,T=R.far,L=Object(l.i)({height:x,pitch:d,bearing:v,scale:D,altitude:O});if(k){var P=(new h.a).translate([512*k,0,0]);L=P.multiplyLeft(L)}var U=Object.assign({},r,{width:_,height:x,viewMatrix:L,longitude:A,latitude:s,zoom:f,orthographic:C,fovyRadians:j,aspect:M,focalDistance:C?N:1,near:F,far:T});return(e=t.call(this,U)).latitude=s,e.longitude=A,e.zoom=f,e.pitch=d,e.bearing=v,e.altitude=O,e.orthographic=C,e._subViewports=w?[]:null,Object.freeze(Object(o.a)(e)),e}return Object(a.a)(n,[{key:"addMetersToLngLat",value:function(e,t){return Object(l.a)(e,t)}},{key:"getMapCenterByLngLatPosition",value:function(e){var t=e.lngLat,n=e.pos,r=Object(l.l)(n,this.pixelUnprojectionMatrix),i=this.projectFlat(t),a=f.a([],i,f.d([],r)),o=f.a([],this.center,a);return this.unprojectFlat(o)}},{key:"getBounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(l.d)(this,e.z||0);return[Math.min(t[0][0],t[1][0],t[2][0],t[3][0]),Math.min(t[0][1],t[1][1],t[2][1],t[3][1]),Math.max(t[0][0],t[1][0],t[2][0],t[3][0]),Math.max(t[0][1],t[1][1],t[2][1],t[3][1])]}},{key:"fitBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.width,i=this.height,a=Object(l.b)(Object.assign({width:r,height:i,bounds:e},t)),o=a.longitude,s=a.latitude,u=a.zoom;return new n({width:r,height:i,longitude:o,latitude:s,zoom:u})}},{key:"subViewports",get:function(){if(this._subViewports&&!this._subViewports.length)for(var e=this.getBounds(),t=Math.floor((e[0]+180)/360),r=Math.ceil((e[2]-180)/360),i=t;i<=r;i++){var a=i?new n(d(d({},this),{},{worldOffset:i})):this;this._subViewports.push(a)}return this._subViewports}}]),n}(c.a);v.displayName="WebMercatorViewport"},function(e,t,n){"use strict";n.d(t,"a",(function(){return x})),n.d(t,"b",(function(){return S}));var r=n(1),i=n(16),a=n(3),o=n(2),s=n(6),u=n(7),A=n(4),c=n(35),l=n(119),f=n(223),h=n(66),g=n(57),d=n(117),p=n(118);function v(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 y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(A.a)(e);if(t){var i=Object(A.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(u.a)(this,n)}}var I={transitionDuration:300,transitionEasing:function(e){return e},transitionInterpolator:new d.a,transitionInterruption:p.a.BREAK},b={transitionDuration:0},E=0,C=20,B=0,w=60,Q=0,k=0,_=1.5,x=function(e){Object(s.a)(n,e);var t=m(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.makeViewport,o=r.width,s=r.height,u=r.latitude,A=r.longitude,c=r.zoom,l=r.bearing,f=void 0===l?k:l,h=r.pitch,d=void 0===h?Q:h,p=r.altitude,v=void 0===p?_:p,y=r.maxZoom,m=void 0===y?C:y,I=r.minZoom,b=void 0===I?E:I,x=r.maxPitch,S=void 0===x?w:x,O=r.minPitch,D=void 0===O?B:O,R=r.startPanLngLat,j=r.startZoomLngLat,M=r.startBearing,N=r.startPitch,F=r.startZoom;return Object(a.a)(this,n),Object(g.a)(Number.isFinite(A),"`longitude` must be supplied"),Object(g.a)(Number.isFinite(u),"`latitude` must be supplied"),Object(g.a)(Number.isFinite(c),"`zoom` must be supplied"),(e=t.call(this,{width:o,height:s,latitude:u,longitude:A,zoom:c,bearing:f,pitch:d,altitude:v,maxZoom:m,minZoom:b,maxPitch:S,minPitch:D}))._interactiveState={startPanLngLat:R,startZoomLngLat:j,startBearing:M,startPitch:N,startZoom:F},e.makeViewport=i,e}return Object(o.a)(n,[{key:"getViewportProps",value:function(){return this._viewportProps}},{key:"getInteractiveState",value:function(){return this._interactiveState}},{key:"panStart",value:function(e){var t=e.pos;return this._getUpdatedState({startPanLngLat:this._unproject(t)})}},{key:"pan",value:function(e){var t=e.pos,n=e.startPos,r=this._interactiveState.startPanLngLat||this._unproject(n);if(!r)return this;var a=this._calculateNewLngLat({startPanLngLat:r,pos:t}),o=Object(i.a)(a,2),s=o[0],u=o[1];return this._getUpdatedState({longitude:s,latitude:u})}},{key:"panEnd",value:function(){return this._getUpdatedState({startPanLngLat:null})}},{key:"rotateStart",value:function(e){e.pos;return this._getUpdatedState({startBearing:this._viewportProps.bearing,startPitch:this._viewportProps.pitch})}},{key:"rotate",value:function(e){var t=e.deltaScaleX,n=void 0===t?0:t,r=e.deltaScaleY,i=void 0===r?0:r,a=this._interactiveState,o=a.startBearing,s=a.startPitch;if(!Number.isFinite(o)||!Number.isFinite(s))return this;var u=this._calculateNewPitchAndBearing({deltaScaleX:n,deltaScaleY:i,startBearing:o,startPitch:s}),A=u.pitch,c=u.bearing;return this._getUpdatedState({bearing:c,pitch:A})}},{key:"rotateEnd",value:function(){return this._getUpdatedState({startBearing:null,startPitch:null})}},{key:"zoomStart",value:function(e){var t=e.pos;return this._getUpdatedState({startZoomLngLat:this._unproject(t),startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(e){var t=e.pos,n=e.startPos,r=e.scale,a=this._interactiveState,o=a.startZoom,s=a.startZoomLngLat;Number.isFinite(o)||(o=this._viewportProps.zoom,s=this._unproject(n)||this._unproject(t));var u=this._calculateNewZoom({scale:r,startZoom:o}),A=this.makeViewport(y(y({},this._viewportProps),{},{zoom:u})).getMapCenterByLngLatPosition({lngLat:s,pos:t}),c=Object(i.a)(A,2),l=c[0],f=c[1];return this._getUpdatedState({zoom:u,longitude:l,latitude:f})}},{key:"zoomEnd",value:function(){return this._getUpdatedState({startZoomLngLat:null,startZoom:null})}},{key:"zoomIn",value:function(){return this._zoomFromCenter(2)}},{key:"zoomOut",value:function(){return this._zoomFromCenter(.5)}},{key:"moveLeft",value:function(){return this._panFromCenter([100,0])}},{key:"moveRight",value:function(){return this._panFromCenter([-100,0])}},{key:"moveUp",value:function(){return this._panFromCenter([0,100])}},{key:"moveDown",value:function(){return this._panFromCenter([0,-100])}},{key:"rotateLeft",value:function(){return this._getUpdatedState({bearing:this._viewportProps.bearing-15})}},{key:"rotateRight",value:function(){return this._getUpdatedState({bearing:this._viewportProps.bearing+15})}},{key:"rotateUp",value:function(){return this._getUpdatedState({pitch:this._viewportProps.pitch+10})}},{key:"rotateDown",value:function(){return this._getUpdatedState({pitch:this._viewportProps.pitch-10})}},{key:"shortestPathFrom",value:function(e){var t=e.getViewportProps(),n=Object.assign({},this._viewportProps),r=n.bearing,i=n.longitude;return Math.abs(r-t.bearing)>180&&(n.bearing=r<0?r+360:r-360),Math.abs(i-t.longitude)>180&&(n.longitude=i<0?i+360:i-360),n}},{key:"_zoomFromCenter",value:function(e){var t=this._viewportProps,n=t.width,r=t.height;return this.zoom({pos:[n/2,r/2],scale:e})}},{key:"_panFromCenter",value:function(e){var t=this._viewportProps,n=t.width,r=t.height;return this.pan({startPos:[n/2,r/2],pos:[n/2+e[0],r/2+e[1]]})}},{key:"_getUpdatedState",value:function(e){return new this.constructor(y(y(y({makeViewport:this.makeViewport},this._viewportProps),this._interactiveState),e))}},{key:"_applyConstraints",value:function(e){var t=e.maxZoom,n=e.minZoom,r=e.zoom;e.zoom=Object(c.e)(r,n,t);var i=e.maxPitch,a=e.minPitch,o=e.pitch;return e.pitch=Object(c.e)(o,a,i),Object.assign(e,Object(h.k)(e)),e}},{key:"_unproject",value:function(e){var t=this.makeViewport(this._viewportProps);return e&&t.unproject(e)}},{key:"_calculateNewLngLat",value:function(e){var t=e.startPanLngLat,n=e.pos;return this.makeViewport(this._viewportProps).getMapCenterByLngLatPosition({lngLat:t,pos:n})}},{key:"_calculateNewZoom",value:function(e){var t=e.scale,n=e.startZoom,r=this._viewportProps,i=r.maxZoom,a=r.minZoom,o=n+Math.log2(t);return Object(c.e)(o,a,i)}},{key:"_calculateNewPitchAndBearing",value:function(e){var t=e.deltaScaleX,n=e.deltaScaleY,r=e.startBearing,i=e.startPitch;n=Object(c.e)(n,-1,1);var a=this._viewportProps,o=a.minPitch,s=a.maxPitch,u=i;return n>0?u=i+n*(s-i):n<0&&(u=i-n*(o-i)),{pitch:u,bearing:r+180*t}}}]),n}(f.a),S=function(e){Object(s.a)(n,e);var t=m(n);function n(e){var r;return Object(a.a)(this,n),(r=t.call(this,x,e)).invertPan=!0,r}return Object(o.a)(n,[{key:"_getTransitionProps",value:function(){return I}},{key:"_onPanRotate",value:function(e){if(!this.dragRotate)return!1;var t=e.deltaX,n=e.deltaY,r=this.getCenter(e),a=Object(i.a)(r,2)[1],o=a-n,s=this.controllerState.getViewportProps(),u=s.width,A=s.height,c=t/u,l=0;n>0?Math.abs(A-o)>5&&(l=n/(o-A)*1.2):n<0&&o>5&&(l=1-a/o),l=Math.min(1,Math.max(-1,l));var f=this.controllerState.rotate({deltaScaleX:c,deltaScaleY:l});return this.updateViewport(f,b,{isDragging:!0,isRotating:!0})}}]),n}(l.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r=n(3),i=n(2),a=n(35),o=n(57);function s(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var A=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r.a)(this,e),Array.isArray(t)&&(t={compare:t,extract:t,required:t});var n=t,i=n.compare,a=n.extract,o=n.required;this._propsToCompare=i,this._propsToExtract=a,this._requiredProps=o}return Object(i.a)(e,[{key:"arePropsEqual",value:function(e,t){var n,r=s(this._propsToCompare||Object.keys(t));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!(i in e)||!(i in t)||!Object(a.f)(e[i],t[i]))return!1}}catch(o){r.e(o)}finally{r.f()}return!0}},{key:"initializeProps",value:function(e,t){var n;if(this._propsToExtract){var r,i={},a={},o=s(this._propsToExtract);try{for(o.s();!(r=o.n()).done;){var u=r.value;i[u]=e[u],a[u]=t[u]}}catch(A){o.e(A)}finally{o.f()}n={start:i,end:a}}else n={start:e,end:t};return this._checkRequiredProps(n.start),this._checkRequiredProps(n.end),n}},{key:"interpolateProps",value:function(e,t,n){return t}},{key:"getDuration",value:function(e,t){return t.transitionDuration}},{key:"_checkRequiredProps",value:function(e){this._requiredProps&&this._requiredProps.forEach((function(t){var n=e[t];Object(o.a)(Number.isFinite(n)||Array.isArray(n),"".concat(t," is required for transition"))}))}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return m}));var r=n(3),i=n(2),a=n(6),o=n(7),s=n(4),u=n(35),A=n(119),c=n(223),l=n(117),f=n(118),h=n(83);function g(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var d={orbitAxis:"Z",rotationX:0,rotationOrbit:0,zoom:0,target:[0,0,0],minRotationX:-90,maxRotationX:90,minZoom:-1/0,maxZoom:1/0},p={transitionDuration:300,transitionEasing:function(e){return e},transitionInterpolator:new l.a(["target","zoom","rotationX","rotationOrbit"]),transitionInterruption:f.a.BREAK},v=function(e){return Math.pow(2,e)},y=function(e){Object(a.a)(n,e);var t=g(n);function n(e){var i,a=e.makeViewport,o=e.width,s=e.height,u=e.orbitAxis,A=void 0===u?d.orbitAxis:u,c=e.rotationX,l=void 0===c?d.rotationX:c,f=e.rotationOrbit,h=void 0===f?d.rotationOrbit:f,g=e.target,p=void 0===g?d.target:g,v=e.zoom,y=void 0===v?d.zoom:v,m=e.minRotationX,I=void 0===m?d.minRotationX:m,b=e.maxRotationX,E=void 0===b?d.maxRotationX:b,C=e.minZoom,B=void 0===C?d.minZoom:C,w=e.maxZoom,Q=void 0===w?d.maxZoom:w,k=e.startPanPosition,_=e.startTarget,x=e.startRotationX,S=e.startRotationOrbit,O=e.startZoomPosition,D=e.startZoom;return Object(r.a)(this,n),(i=t.call(this,{width:o,height:s,orbitAxis:A,rotationX:l,rotationOrbit:h,target:p,zoom:y,minRotationX:I,maxRotationX:E,minZoom:B,maxZoom:Q}))._interactiveState={startPanPosition:k,startTarget:_,startRotationX:x,startRotationOrbit:S,startZoomPosition:O,startZoom:D},i.makeViewport=a,i}return Object(i.a)(n,[{key:"getViewportProps",value:function(){return this._viewportProps}},{key:"getInteractiveState",value:function(){return this._interactiveState}},{key:"panStart",value:function(e){var t=e.pos,n=this._viewportProps.target;return this._getUpdatedState({startPanPosition:t,startTarget:n})}},{key:"pan",value:function(e){var t=e.pos,n=(e.startPos,this._interactiveState),r=n.startPanPosition,i=n.startTarget,a=new u.b(t).subtract(r);return this._getUpdatedState({target:this._calculateNewTarget({startTarget:i,pixelOffset:a})})}},{key:"panEnd",value:function(){return this._getUpdatedState({startPanPosition:null,startTarget:null})}},{key:"rotateStart",value:function(e){e.pos;return this._getUpdatedState({startRotationX:this._viewportProps.rotationX,startRotationOrbit:this._viewportProps.rotationOrbit})}},{key:"rotate",value:function(e){var t=e.deltaScaleX,n=e.deltaScaleY,r=this._interactiveState,i=r.startRotationX,a=r.startRotationOrbit;return Number.isFinite(i)&&Number.isFinite(a)?((i<-90||i>90)&&(t*=-1),this._getUpdatedState({rotationX:i+180*n,rotationOrbit:a+180*t,isRotating:!0})):this}},{key:"rotateEnd",value:function(){return this._getUpdatedState({startRotationX:null,startRotationOrbit:null})}},{key:"shortestPathFrom",value:function(e){var t=e.getViewportProps(),n=Object.assign({},this._viewportProps),r=n.rotationOrbit;return Math.abs(r-t.rotationOrbit)>180&&(n.rotationOrbit=r<0?r+360:r-360),n}},{key:"zoomStart",value:function(e){var t=e.pos;return this._getUpdatedState({startZoomPosition:t,startTarget:this._viewportProps.target,startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(e){var t=e.pos,n=e.startPos,r=e.scale,i=this._viewportProps,a=i.zoom,o=i.width,s=i.height,u=i.target,A=this._interactiveState,c=A.startZoom,l=A.startZoomPosition,f=A.startTarget;Number.isFinite(c)||(c=a,f=u,l=n||t);var h=this._calculateNewZoom({scale:r,startZoom:c}),g=v(c),d=v(h),p=(o/2-l[0])*(d/g-1),y=(s/2-l[1])*(d/g-1);return this._getUpdatedState({zoom:h,target:this._calculateNewTarget({startTarget:f,zoom:h,pixelOffset:[p,y]})})}},{key:"zoomEnd",value:function(){return this._getUpdatedState({startZoomPosition:null,startTarget:null,startZoom:null})}},{key:"zoomIn",value:function(){return this._getUpdatedState({zoom:this._calculateNewZoom({scale:2})})}},{key:"zoomOut",value:function(){return this._getUpdatedState({zoom:this._calculateNewZoom({scale:.5})})}},{key:"moveLeft",value:function(){var e=[-50,0];return this._getUpdatedState({target:this._calculateNewTarget({pixelOffset:e})})}},{key:"moveRight",value:function(){var e=[50,0];return this._getUpdatedState({target:this._calculateNewTarget({pixelOffset:e})})}},{key:"moveUp",value:function(){var e=[0,-50];return this._getUpdatedState({target:this._calculateNewTarget({pixelOffset:e})})}},{key:"moveDown",value:function(){var e=[0,50];return this._getUpdatedState({target:this._calculateNewTarget({pixelOffset:e})})}},{key:"rotateLeft",value:function(){return this._getUpdatedState({rotationOrbit:this._viewportProps.rotationOrbit-15})}},{key:"rotateRight",value:function(){return this._getUpdatedState({rotationOrbit:this._viewportProps.rotationOrbit+15})}},{key:"rotateUp",value:function(){return this._getUpdatedState({rotationX:this._viewportProps.rotationX-10})}},{key:"rotateDown",value:function(){return this._getUpdatedState({rotationX:this._viewportProps.rotationX+10})}},{key:"_calculateNewZoom",value:function(e){var t=e.scale,n=e.startZoom,r=this._viewportProps,i=r.maxZoom,a=r.minZoom;Number.isFinite(n)||(n=this._viewportProps.zoom);var o=n+Math.log2(t);return Object(u.e)(o,a,i)}},{key:"_calculateNewTarget",value:function(e){var t=e.startTarget,n=e.zoom,r=e.pixelOffset,i=Object.assign({},this._viewportProps);Number.isFinite(n)&&(i.zoom=n),t&&(i.target=t);var a=this.makeViewport(i),o=a.project(i.target);return a.unproject([o[0]-r[0],o[1]-r[1],o[2]])}},{key:"_getUpdatedState",value:function(e){return new n(Object.assign({},this._viewportProps,this._interactiveState,e))}},{key:"_applyConstraints",value:function(e){var t=e.maxZoom,n=e.minZoom,r=e.zoom,i=e.maxRotationX,a=e.minRotationX,o=e.rotationOrbit;return e.zoom=Object(u.e)(r,n,t),e.rotationX=Object(u.e)(e.rotationX,a,i),(o<-180||o>180)&&(e.rotationOrbit=Object(h.e)(o+180,360)-180),e}}]),n}(c.a),m=function(e){Object(a.a)(n,e);var t=g(n);function n(e){return Object(r.a)(this,n),t.call(this,y,e)}return Object(i.a)(n,[{key:"_getTransitionProps",value:function(){return p}}]),n}(A.a)},function(e,t,n){"use strict";var r=n(16),i=n(3),a=n(2),o=n(6),s=n(7),u=n(4),A=n(39),c=n(293),l=n(1),f=n(96),h=n(35),g=n(142);function d(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}var p=function(e){Object(o.a)(n,e);var t=d(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"_onUpdate",value:function(){var e=this.time,t=this.settings,n=t.fromValue,r=t.toValue,i=t.duration,a=(0,t.easing)(e/i);this._value=Object(h.g)(n,r,a)}},{key:"value",get:function(){return this._value}}]),n}(g.a);function v(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}function y(e,t,n,r,i){var a=t-e;return(n-t)*i+-a*r+a+t}function m(e,t){if(Array.isArray(e)){for(var n=0,r=0;r<e.length;r++){var i=e[r]-t[r];n+=i*i}return Math.sqrt(n)}return Math.abs(e-t)}var I=function(e){Object(o.a)(n,e);var t=v(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"_onUpdate",value:function(){var e=this.settings,t=e.fromValue,n=e.toValue,r=e.damping,i=e.stiffness,a=this._prevValue,o=void 0===a?t:a,s=this._currValue,u=void 0===s?t:s,A=function(e,t,n,r,i){if(Array.isArray(n)){for(var a=[],o=0;o<n.length;o++)a[o]=y(e[o],t[o],n[o],r,i);return a}return y(e,t,n,r,i)}(o,u,n,r,i),c=m(A,n),l=m(A,u);c<1e-5&&l<1e-5&&(A=n,this.end()),this._prevValue=u,this._currValue=A}},{key:"value",get:function(){return this._currValue}}]),n}(g.a),b=n(44);function E(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B(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 w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){Object(l.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Q={interpolation:p,spring:I},k=function(){function e(t){Object(i.a)(this,e),this.transitions=new Map,this.timeline=t}return Object(a.a)(e,[{key:"add",value:function(e,t,n,r){var i=this.transitions;if(i.has(e)){var a=i.get(e),o=a.value;t=void 0===o?a.settings.fromValue:o,this.remove(e)}if(r=Object(f.e)(r)){var s=Q[r.type];if(s){var u=new s(this.timeline);u.start(w(w({},r),{},{fromValue:t,toValue:n})),i.set(e,u)}else b.a.error("unsupported transition type '".concat(r.type,"'"))()}}},{key:"remove",value:function(e){var t=this.transitions;t.has(e)&&(t.get(e).cancel(),t.delete(e))}},{key:"update",value:function(){var e,t={},n=E(this.transitions);try{for(n.s();!(e=n.n()).done;){var i=Object(r.a)(e.value,2),a=i[0],o=i[1];o.update(),t[a]=o.value,o.inProgress||this.remove(a)}}catch(s){n.e(s)}finally{n.f()}return t}},{key:"clear",value:function(){var e,t=E(this.transitions.keys());try{for(t.s();!(e=t.n()).done;){var n=e.value;this.remove(n)}}catch(r){t.e(r)}finally{t.f()}}},{key:"active",get:function(){return this.transitions.size>0}}]),e}(),_=n(246),x=n(291),S=n(79),O=n(21),D=n(57),R=n(155),j=n(290),M=n(250),N=n(128),F=n(80),T=n(101),L=n(25),P={boolean:{validate:function(e,t){return!0},equal:function(e,t,n){return Boolean(e)===Boolean(t)}},number:{validate:function(e,t){return Number.isFinite(e)&&(!("max"in t)||e<=t.max)&&(!("min"in t)||e>=t.min)}},color:{validate:function(e,t){return t.optional&&!e||H(e)&&(3===e.length||4===e.length)},equal:function(e,t,n){return U(e,t)}},accessor:{validate:function(e,t){var n=Y(e);return"function"===n||n===Y(t.value)},equal:function(e,t,n){return"function"===typeof t||U(e,t)}},array:{validate:function(e,t){return t.optional&&!e||H(e)},equal:function(e,t,n){return n.compare?U(e,t):e===t}},function:{validate:function(e,t){return t.optional&&!e||"function"===typeof e},equal:function(e,t,n){return!n.compare||e===t}}};function U(e,t){if(e===t)return!0;if(!H(e)||!H(t))return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function G(e,t){switch(Y(t)){case"object":return q(e,t);case"array":return q(e,{type:"array",value:t,compare:!1});case"boolean":return q(e,{type:"boolean",value:t});case"number":return q(e,{type:"number",value:t});case"function":return q(e,{type:"function",value:t,compare:!0});default:return{name:e,type:"unknown",value:t}}}function q(e,t){return"type"in t?Object.assign({name:e},P[t.type],t):"value"in t?Object.assign({name:e,type:Y(t.value)},t):{name:e,type:"object",value:t}}function H(e){return Array.isArray(e)||ArrayBuffer.isView(e)}function Y(e){return H(e)?"array":null===e?"null":Object(L.a)(e)}function J(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var K=F.b.COMPONENT,W=F.b.ASYNC_ORIGINAL,V=F.b.ASYNC_RESOLVED,X=F.b.ASYNC_DEFAULTS;function Z(){var e=this,t=$(e.constructor),n=Object.create(t);n[K]=e,n[W]={},n[V]={};for(var r=0;r<arguments.length;++r){var i=arguments[r];for(var a in i)n[a]=i[a]}return Object.freeze(n),n}function $(e){var t=ne(e,"_mergedDefaultProps");return t||(function(e){if(!e.prototype)return;var t=Object.getPrototypeOf(e),n=$(t),i=function(e){for(var t={},n={},i={},a=0,o=Object.entries(e);a<o.length;a++){var s=Object(r.a)(o[a],2),u=s[0],A=s[1];if(A&&A.deprecatedFor)i[u]=Array.isArray(A.deprecatedFor)?A.deprecatedFor:[A.deprecatedFor];else{var c=G(u,A);t[u]=c,n[u]=c.value}}return{propTypes:t,defaultProps:n,deprecatedProps:i}}(ne(e,"defaultProps")||{}),a=function(e,t,n){var r=Object.create(null);Object.assign(r,t,e);var i=function(e){var t=ne(e,"layerName")||ne(e,"componentName");t||b.a.once(0,"".concat(e.name,".componentName not specified"))();return t||e.name}(n);return delete e.id,Object.defineProperties(r,{id:{writable:!0,value:i}}),r}(i.defaultProps,n,e),o=Object.assign({},t._propTypes,i.propTypes);!function(e,t){var n={},r={};for(var i in t){var a=t[i],o=a.name,s=a.value;a.async&&(n[o]=s,r[o]=ee(o))}e[X]=n,e[W]={},Object.defineProperties(e,r)}(a,o);var s=Object.assign({},t._deprecatedProps,i.deprecatedProps);(function(e,t){var n=function(n){Object.defineProperty(e,n,{enumerable:!1,set:function(e){var r,i="".concat(this.id,": ").concat(n),a=J(t[n]);try{for(a.s();!(r=a.n()).done;){var o=r.value;te(this,o)||(this[o]=e)}}catch(s){a.e(s)}finally{a.f()}b.a.deprecated(i,t[n].join("/"))()}})};for(var r in t)n(r)})(a,s),e._mergedDefaultProps=a,e._propTypes=o,e._deprecatedProps=s}(e),e._mergedDefaultProps)}function ee(e){return{enumerable:!0,set:function(t){"string"===typeof t||t instanceof Promise||Object(T.c)(t)?this[W][e]=t:this[V][e]=t},get:function(){if(this[V]){if(e in this[V])return this[V][e]||this[X][e];if(e in this[W]){var t=this[K]&&this[K].internalState;if(t&&t.hasAsyncProp(e))return t.getAsyncProp(e)||this[X][e]}}return this[X][e]}}}function te(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ne(e,t){return te(e,t)&&e[t]}var re=n(12),ie=n.n(re),ae=n(26),oe=n(224),se=F.b.ASYNC_ORIGINAL,ue=F.b.ASYNC_RESOLVED,Ae=F.b.ASYNC_DEFAULTS,ce=Object.freeze({}),le=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(i.a)(this,e),this.component=t,this.asyncProps={},this.onAsyncPropUpdated=function(){},this.oldProps=ce,this.oldAsyncProps=null}return Object(a.a)(e,[{key:"getOldProps",value:function(){return this.oldAsyncProps||this.oldProps}},{key:"resetOldProps",value:function(){this.oldAsyncProps=null,this.oldProps=this.component.props}},{key:"freezeAsyncOldProps",value:function(){if(!this.oldAsyncProps)for(var e in this.oldProps=this.oldProps||this.component.props,this.oldAsyncProps=Object.create(this.oldProps),this.asyncProps)Object.defineProperty(this.oldAsyncProps,e,{enumerable:!0,value:this.oldProps[e]})}},{key:"hasAsyncProp",value:function(e){return e in this.asyncProps}},{key:"getAsyncProp",value:function(e){var t=this.asyncProps[e];return t&&t.resolvedValue}},{key:"isAsyncPropLoading",value:function(e){if(e){var t=this.asyncProps[e];return Boolean(t&&t.pendingLoadCount>0&&t.pendingLoadCount!==t.resolvedLoadCount)}for(var n in this.asyncProps)if(this.isAsyncPropLoading(n))return!0;return!1}},{key:"reloadAsyncProp",value:function(e,t){this._watchPromise(e,Promise.resolve(t))}},{key:"setAsyncProps",value:function(e){var t=e[ue]||{},n=e[se]||e,r=e[Ae]||{};for(var i in t){var a=t[i];this._createAsyncPropData(i,a,r[i]),this._updateAsyncProp(i,a)}for(var o in n){var s=n[o];this._createAsyncPropData(o,s,r[o]),this._updateAsyncProp(o,s)}}},{key:"_updateAsyncProp",value:function(e,t){if(this._didAsyncInputValueChange(e,t)){if("string"===typeof t){var n=this.layer&&this.layer.props.fetch;n&&(t=n(t,{propName:e,layer:this.layer}))}t instanceof Promise?this._watchPromise(e,t):Object(T.c)(t)?this._resolveAsyncIterable(e,t):this._setPropValue(e,t)}}},{key:"_didAsyncInputValueChange",value:function(e,t){var n=this.asyncProps[e];return t!==n.lastValue&&(n.lastValue=t,!0)}},{key:"_setPropValue",value:function(e,t){var n=this.asyncProps[e];n.value=t,n.resolvedValue=t,n.pendingLoadCount++,n.resolvedLoadCount=n.pendingLoadCount}},{key:"_setAsyncPropValue",value:function(e,t,n){var r=this.asyncProps[e];r&&n>=r.resolvedLoadCount&&void 0!==t&&(this.freezeAsyncOldProps(),r.resolvedValue=t,r.resolvedLoadCount=n,this.onAsyncPropUpdated(e,t))}},{key:"_watchPromise",value:function(e,t){var n=this,r=this.asyncProps[e];r.pendingLoadCount++;var i=r.pendingLoadCount;t.then((function(t){t=n._postProcessValue(e,t),n._setAsyncPropValue(e,t,i);var r=n.layer&&n.layer.props.onDataLoad;"data"===e&&r&&r(t,{propName:e,layer:n.layer})})).catch((function(e){return b.a.error(e)()}))}},{key:"_resolveAsyncIterable",value:function(){var e=Object(ae.a)(ie.a.mark((function e(t,n){var r,i,a,o,s,u,A,c,l,f,h,g;return ie.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:"data"!==t&&this._setPropValue(t,n),(r=this.asyncProps[t]).pendingLoadCount++,i=r.pendingLoadCount,a=[],o=0,s=!0,u=!1,e.prev=8,c=Object(oe.a)(n);case 10:return e.next=12,c.next();case 12:return l=e.sent,s=l.done,e.next=16,l.value;case 16:if(f=e.sent,s){e.next=26;break}h=f,a=this._postProcessValue(t,h,a),Object.defineProperty(a,"__diff",{enumerable:!1,value:[{startRow:o,endRow:a.length}]}),o=a.length,this._setAsyncPropValue(t,a,i);case 23:s=!0,e.next=10;break;case 26:e.next=32;break;case 28:e.prev=28,e.t0=e.catch(8),u=!0,A=e.t0;case 32:if(e.prev=32,e.prev=33,s||null==c.return){e.next=37;break}return e.next=37,c.return();case 37:if(e.prev=37,!u){e.next=40;break}throw A;case 40:return e.finish(37);case 41:return e.finish(32);case 42:(g=this.layer&&this.layer.props.onDataLoad)&&g(a,{propName:t,layer:this.layer});case 44:case"end":return e.stop()}}),e,this,[[8,28,32,42],[33,,37,41]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_postProcessValue",value:function(e,t,n){var r=(this.component?this.component.props:{}).dataTransform;return"data"!==e?t:r?r(t,n):n?n.concat(t):t}},{key:"_createAsyncPropData",value:function(e,t,n){this.asyncProps[e]||(this.asyncProps[e]={lastValue:null,resolvedValue:n,pendingLoadCount:0,resolvedLoadCount:0})}}]),e}(),fe=F.b.ASYNC_ORIGINAL,he=F.b.ASYNC_RESOLVED,ge=F.b.ASYNC_DEFAULTS,de=0,pe=function(){function e(){Object(i.a)(this,e),this.props=Z.apply(this,arguments),this.id=this.props.id,this.count=de++,this.lifecycle=F.a.NO_STATE,this.parent=null,this.context=null,this.state=null,this.internalState=null,Object.seal(this)}return Object(a.a)(e,[{key:"clone",value:function(e){var t=this.props,n={};for(var r in t[ge])r in t[he]?n[r]=t[he][r]:r in t[fe]&&(n[r]=t[fe][r]);return new this.constructor(Object.assign({},t,n,e))}},{key:"_initState",value:function(){this.internalState=new le({})}},{key:"stats",get:function(){return this.internalState.stats}}]),e}();function ve(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}pe.componentName="Component",pe.defaultProps={};var ye=function(e){Object(o.a)(n,e);var t=ve(n);function n(e){var r,a=e.attributeManager,o=e.layer;return Object(i.a)(this,n),(r=t.call(this,o)).attributeManager=a,r.model=null,r.needsRedraw=!0,r.subLayers=null,r}return Object(a.a)(n,[{key:"layer",get:function(){return this.component},set:function(e){this.component=e}}]),n}(le),me=n(66),Ie=n(925);function be(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return Ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ee(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ce(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}n.d(t,"a",(function(){return _e}));var Be=Object.freeze([]),we=Object(R.a)((function(e){var t=e.oldViewport,n=e.viewport;return t.equals(n)})),Qe=new Uint8ClampedArray(0),ke={data:{type:"data",value:Be,async:!0},dataComparator:null,_dataDiff:{type:"function",value:function(e){return e&&e.__diff},compare:!1,optional:!0},dataTransform:{type:"function",value:null,compare:!1,optional:!0},onDataLoad:{type:"function",value:null,compare:!1,optional:!0},fetch:{type:"function",value:function(e,t){var n=t.propName,r=t.layer,i=r.context.resourceManager,a=r.getLoadOptions(),o=i.contains(e);return o||a||(i.add({resourceId:e,data:e,persistent:!1}),o=!0),o?i.subscribe({resourceId:e,onChange:function(e){return r.internalState.reloadAsyncProp(n,e)},consumerId:r.id,requestId:n}):Object(Ie.a)(e,a)},compare:!1},updateTriggers:{},visible:!0,pickable:!1,opacity:{type:"number",min:0,max:1,value:1},onHover:{type:"function",value:null,compare:!1,optional:!0},onClick:{type:"function",value:null,compare:!1,optional:!0},onDragStart:{type:"function",value:null,compare:!1,optional:!0},onDrag:{type:"function",value:null,compare:!1,optional:!0},onDragEnd:{type:"function",value:null,compare:!1,optional:!0},coordinateSystem:A.a.DEFAULT,coordinateOrigin:{type:"array",value:[0,0,0],compare:!0},modelMatrix:{type:"array",value:null,compare:!0,optional:!0},wrapLongitude:!1,positionFormat:"XYZ",colorFormat:"RGBA",parameters:{},uniforms:{},extensions:[],getPolygonOffset:{type:"function",value:function(e){return[0,100*-e.layerIndex]},compare:!1},highlightedObjectIndex:-1,autoHighlight:!1,highlightColor:{type:"accessor",value:[0,0,128,128]}},_e=function(e){Object(o.a)(n,e);var t=Ce(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"toString",value:function(){var e=this.constructor.layerName||this.constructor.name;return"".concat(e,"({id: '").concat(this.props.id,"'})")}},{key:"setState",value:function(e){this.setChangeFlags({stateChanged:!0}),Object.assign(this.state,e),this.setNeedsRedraw()}},{key:"setNeedsRedraw",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.internalState&&(this.internalState.needsRedraw=e)}},{key:"setNeedsUpdate",value:function(){this.context.layerManager.setNeedsUpdate(String(this)),this.internalState.needsUpdate=!0}},{key:"getNeedsRedraw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};return this._getNeedsRedraw(e)}},{key:"needsUpdate",value:function(){return this.internalState.needsUpdate||this.hasUniformTransition()||this.shouldUpdateState(this._getUpdateParams())}},{key:"hasUniformTransition",value:function(){return this.internalState.uniformTransitions.active}},{key:"isPickable",value:function(){return this.props.pickable&&this.props.visible}},{key:"getModels",value:function(){return this.state&&(this.state.models||(this.state.model?[this.state.model]:[]))}},{key:"getAttributeManager",value:function(){return this.internalState&&this.internalState.attributeManager}},{key:"getCurrentLayer",value:function(){return this.internalState&&this.internalState.layer}},{key:"getLoadOptions",value:function(){return this.props.loadOptions}},{key:"project",value:function(e){var t=this.context.viewport,n=Object(M.a)(e,{viewport:t,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem}),i=Object(me.n)(n,t.pixelProjectionMatrix),a=Object(r.a)(i,3),o=a[0],s=a[1],u=a[2];return 2===e.length?[o,s]:[o,s,u]}},{key:"unproject",value:function(e){return this.context.viewport.unproject(e)}},{key:"projectPosition",value:function(e){return Object(M.b)(e,{viewport:this.context.viewport,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem})}},{key:"use64bitPositions",value:function(){var e=this.props.coordinateSystem;return e===A.a.DEFAULT||e===A.a.LNGLAT||e===A.a.CARTESIAN}},{key:"onHover",value:function(e,t){return!!this.props.onHover&&this.props.onHover(e,t)}},{key:"onClick",value:function(e,t){return!!this.props.onClick&&this.props.onClick(e,t)}},{key:"nullPickingColor",value:function(){return[0,0,0]}},{key:"encodePickingColor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t[0]=e+1&255,t[1]=e+1>>8&255,t[2]=e+1>>8>>8&255,t}},{key:"decodePickingColor",value:function(e){Object(D.a)(e instanceof Uint8Array);var t=Object(r.a)(e,3);return t[0]+256*t[1]+65536*t[2]-1}},{key:"initializeState",value:function(){throw new Error("Layer ".concat(this," has not defined initializeState"))}},{key:"getShaders",value:function(e){var t,n=be(this.props.extensions);try{for(n.s();!(t=n.n()).done;){var r=t.value;e=Object(j.a)(e,r.getShaders.call(this,r))}}catch(i){n.e(i)}finally{n.f()}return e}},{key:"shouldUpdateState",value:function(e){e.oldProps,e.props,e.context;return e.changeFlags.propsOrDataChanged}},{key:"updateState",value:function(e){var t=e.oldProps,n=e.props,r=(e.context,e.changeFlags),i=this.getAttributeManager();if(r.dataChanged&&i){var a=r.dataChanged;if(Array.isArray(a)){var o,s=be(a);try{for(s.s();!(o=s.n()).done;){var u=o.value;i.invalidateAll(u)}}catch(d){s.e(d)}finally{s.f()}}else i.invalidateAll()}var A=t.highlightedObjectIndex>=0||t.pickable,c=n.highlightedObjectIndex>=0||n.pickable;if(A!==c&&i){var l=i.attributes,f=l.pickingColors,h=l.instancePickingColors,g=f||h;g&&(c&&g.constant&&(g.constant=!1,i.invalidate(g.id)),g.value||c||(g.constant=!0,g.value=[0,0,0]))}}},{key:"finalizeState",value:function(){var e,t=be(this.getModels());try{for(t.s();!(e=t.n()).done;){e.value.delete()}}catch(r){t.e(r)}finally{t.f()}var n=this.getAttributeManager();n&&n.finalize(),this.context.resourceManager.unsubscribe({consumerId:this.id}),this.internalState.uniformTransitions.clear()}},{key:"draw",value:function(e){var t,n=be(this.getModels());try{for(n.s();!(t=n.n()).done;){t.value.draw(e)}}catch(r){n.e(r)}finally{n.f()}}},{key:"getPickingInfo",value:function(e){var t=e.info,n=(e.mode,t.index);return n>=0&&Array.isArray(this.props.data)&&(t.object=this.props.data[n]),t}},{key:"activateViewport",value:function(e){var t=this.internalState.viewport;this.internalState.viewport=e,t&&we({oldViewport:t,viewport:e})||(this.setChangeFlags({viewportChanged:!0}),this._update())}},{key:"invalidateAttribute",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all",t=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.getAttributeManager());t&&("all"===e?t.invalidateAll():t.invalidate(e))}},{key:"updateAttributes",value:function(e){var t,n=be(this.getModels());try{for(n.s();!(t=n.n()).done;){var r=t.value;this._setModelAttributes(r,e)}}catch(i){n.e(i)}finally{n.f()}}},{key:"_updateAttributes",value:function(e){var t=this.getAttributeManager();if(t){var n=this.getNumInstances(e),r=this.getStartIndices(e);t.update({data:e.data,numInstances:n,startIndices:r,props:e,transitions:e.transitions,buffers:e.data.attributes,context:this,ignoreUnknownAttributes:!0});var i=t.getChangedAttributes({clearChangedFlags:!0});this.updateAttributes(i)}}},{key:"_updateAttributeTransition",value:function(){var e=this.getAttributeManager();e&&e.updateTransition()}},{key:"_updateUniformTransition",value:function(){var e=this.internalState.uniformTransitions;if(e.active){var t=e.update(),n=Object.create(this.props);for(var r in t)Object.defineProperty(n,r,{value:t[r]});return n}return this.props}},{key:"calculateInstancePickingColors",value:function(e,t){var n=t.numInstances;if(!e.constant){var r=Qe.length/3;if(r<n){var i=(Qe=N.a.allocate(Qe,n,{size:3,copy:!0})).length/3,a=[];Object(D.a)(i<16777215,"index out of picking color range");for(var o=r;o<i;o++)this.encodePickingColor(o,a),Qe[3*o+0]=a[0],Qe[3*o+1]=a[1],Qe[3*o+2]=a[2]}e.value=Qe.subarray(0,3*n)}}},{key:"_setModelAttributes",value:function(e,t){var n=this.getAttributeManager(),r=e.userData.excludeAttributes||{},i=n.getShaderAttributes(t,r);e.setAttributes(i)}},{key:"clearPickingColor",value:function(e){var t=this.getAttributeManager().attributes,n=t.pickingColors,r=t.instancePickingColors,i=n||r,a=this.decodePickingColor(e),o=i.getVertexOffset(a),s=i.getVertexOffset(a+1);i.buffer.subData({data:new Uint8Array(s-o),offset:o})}},{key:"restorePickingColors",value:function(){var e=this.getAttributeManager().attributes,t=e.pickingColors,n=e.instancePickingColors;(t||n).updateSubBuffer({startOffset:0})}},{key:"getNumInstances",value:function(e){return void 0!==(e=e||this.props).numInstances?e.numInstances:this.state&&void 0!==this.state.numInstances?this.state.numInstances:Object(x.a)(e.data)}},{key:"getStartIndices",value:function(e){return void 0!==(e=e||this.props).startIndices?e.startIndices:this.state&&this.state.startIndices?this.state.startIndices:null}},{key:"_initialize",value:function(){Object(S.a)("layer.initialize",this),this._initState(),this.initializeState(this.context);var e,t=be(this.props.extensions);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.initializeState.call(this,this.context,n)}}catch(r){t.e(r)}finally{t.f()}this.setChangeFlags({dataChanged:!0,propsChanged:!0,viewportChanged:!0,extensionsChanged:!0}),this._updateState()}},{key:"_update",value:function(){var e=this.needsUpdate();Object(S.a)("layer.update",this,e),e&&this._updateState()}},{key:"_updateState",value:function(){var e=this.props,t=this.context.viewport,n=this._updateUniformTransition();this.internalState.propsInTransition=n,this.context.viewport=this.internalState.viewport||t,this.props=n;var r=this._getUpdateParams(),i=this.getModels();if(this.context.gl)this.updateState(r);else try{this.updateState(r)}catch(A){}var a,o=be(this.props.extensions);try{for(o.s();!(a=o.n()).done;){var s=a.value;s.updateState.call(this,r,s)}}catch(c){o.e(c)}finally{o.f()}var u=this.getModels()[0]!==i[0];this._updateModules(r,u),this.isComposite?this._renderLayers(r):(this.setNeedsRedraw(),this._updateAttributes(this.props),this.state.model&&this.state.model.setInstanceCount(this.getNumInstances())),this.context.viewport=t,this.props=e,this.clearChangeFlags(),this.internalState.needsUpdate=!1,this.internalState.resetOldProps()}},{key:"_finalize",value:function(){Object(S.a)("layer.finalize",this),Object(D.a)(this.internalState&&this.state),this.finalizeState(this.context);var e,t=be(this.props.extensions);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.finalizeState.call(this,n)}}catch(r){t.e(r)}finally{t.f()}}},{key:"drawLayer",value:function(e){var t=this,n=e.moduleParameters,r=void 0===n?null:n,i=e.uniforms,a=void 0===i?{}:i,o=e.parameters,s=void 0===o?{}:o;this._updateAttributeTransition();var u=this.props;this.props=this.internalState.propsInTransition||u;var A=this.props.opacity;a.opacity=Math.pow(A,1/2.2),r&&this.setModuleParameters(r);var c=this.props.getPolygonOffset,l=c&&c(a)||[0,0];Object(O.k)(this.context.gl,{polygonOffset:l}),Object(O.l)(this.context.gl,s,(function(){var e,n={moduleParameters:r,uniforms:a,parameters:s,context:t.context},i=be(t.props.extensions);try{for(i.s();!(e=i.n()).done;){var o=e.value;o.draw.call(t,n,o)}}catch(u){i.e(u)}finally{i.f()}t.draw(n)})),this.props=u}},{key:"getChangeFlags",value:function(){return this.internalState.changeFlags}},{key:"setChangeFlags",value:function(e){var t=this.internalState.changeFlags;for(var n in e)if(e[n]){var r=!1;switch(n){case"dataChanged":Array.isArray(t[n])&&(t[n]=Array.isArray(e[n])?t[n].concat(e[n]):e[n],r=!0);default:t[n]||(t[n]=e[n],r=!0)}r&&Object(S.a)("layer.changeFlag",this,n,e)}var i=t.dataChanged||t.updateTriggersChanged||t.propsChanged||t.extensionsChanged;t.propsOrDataChanged=i,t.somethingChanged=i||e.viewportChanged||e.stateChanged}},{key:"clearChangeFlags",value:function(){this.internalState.changeFlags={dataChanged:!1,propsChanged:!1,updateTriggersChanged:!1,viewportChanged:!1,stateChanged:!1,extensionsChanged:!1,propsOrDataChanged:!1,somethingChanged:!1}}},{key:"diffProps",value:function(e,t){var n=Object(_.b)(e,t);if(n.updateTriggersChanged)for(var r in n.updateTriggersChanged)n.updateTriggersChanged[r]&&this.invalidateAttribute(r);if(n.transitionsChanged)for(var i in n.transitionsChanged)this.internalState.uniformTransitions.add(i,t[i],e[i],e.transitions[i]);return this.setChangeFlags(n)}},{key:"validateProps",value:function(){Object(_.c)(this.props)}},{key:"setModuleParameters",value:function(e){var t,n=be(this.getModels());try{for(n.s();!(t=n.n()).done;){t.value.updateModuleSettings(e)}}catch(r){n.e(r)}finally{n.f()}}},{key:"_updateModules",value:function(e,t){var n=e.props,r=e.oldProps,i=n.autoHighlight,a=n.highlightedObjectIndex,o=n.highlightColor;if(t||r.autoHighlight!==i||r.highlightedObjectIndex!==a||r.highlightColor!==o){var s={};i||(s.pickingSelectedColor=null),Array.isArray(o)&&(s.pickingHighlightColor=o),Number.isInteger(a)&&(s.pickingSelectedColor=a>=0?this.encodePickingColor(a):null),this.setModuleParameters(s)}}},{key:"_getUpdateParams",value:function(){return{props:this.props,oldProps:this.internalState.getOldProps(),context:this.context,changeFlags:this.internalState.changeFlags}}},{key:"_getNeedsRedraw",value:function(e){if(!this.internalState)return!1;var t=!1;t=t||this.internalState.needsRedraw&&this.id,this.internalState.needsRedraw=this.internalState.needsRedraw&&!e.clearRedrawFlags;var n=this.getAttributeManager(),r=n&&n.getNeedsRedraw(e);return t=t||r}},{key:"_getAttributeManager",value:function(){return new c.a(this.context.gl,{id:this.props.id,stats:this.context.stats,timeline:this.context.timeline})}},{key:"_initState",value:function(){Object(D.a)(!this.internalState&&!this.state),Object(D.a)(isFinite(this.props.coordinateSystem),"".concat(this.id,": invalid coordinateSystem"));var e=this._getAttributeManager();e&&e.addInstanced({instancePickingColors:{type:5121,size:3,noAlloc:!0,update:this.calculateInstancePickingColors}}),this.internalState=new ye({attributeManager:e,layer:this}),this.clearChangeFlags(),this.state={},Object.defineProperty(this.state,"attributeManager",{get:function(){return b.a.deprecated("layer.state.attributeManager","layer.getAttributeManager()"),e}}),this.internalState.layer=this,this.internalState.uniformTransitions=new k(this.context.timeline),this.internalState.onAsyncPropUpdated=this._onAsyncPropUpdated.bind(this),this.internalState.setAsyncProps(this.props)}},{key:"_transferState",value:function(e){Object(S.a)("layer.matched",this,this===e);var t=e.state,n=e.internalState;Object(D.a)(t&&n),this!==e&&(this.internalState=n,this.internalState.layer=this,this.state=t,this.internalState.setAsyncProps(this.props),this.diffProps(this.props,this.internalState.getOldProps()))}},{key:"_onAsyncPropUpdated",value:function(){this.diffProps(this.props,this.internalState.getOldProps()),this.setNeedsUpdate()}},{key:"isLoaded",get:function(){return this.internalState&&!this.internalState.isAsyncPropLoading()}},{key:"wrapLongitude",get:function(){return this.props.wrapLongitude}}]),n}(pe);_e.layerName="Layer",_e.defaultProps=ke},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(29),o=n(6),s=n(7),u=n(4),A=n(412),c=n(931),l=n(411),f=n(39),h=n(217),g=n(734),d=n(359),p=n(311),v=n(121),y=n(1),m=n(252),I=n(415),b=n(233);function E(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B(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 w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){Object(y.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Q(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}var k=function(e){Object(o.a)(n,e);var t=Q(n);function n(e){Object(r.a)(this,n);var i=e.fp64,a=e.IndexType,o=void 0===a?Uint32Array:a;return t.call(this,w(w({},e),{},{attributes:{positions:{size:3,type:i?Float64Array:Float32Array},vertexValid:{type:Uint8ClampedArray,size:1},indices:{type:o,size:1}}}))}return Object(i.a)(n,[{key:"get",value:function(e){var t=this.attributes;return"indices"===e?t.indices&&t.indices.subarray(0,this.vertexCount):t[e]}},{key:"updateGeometry",value:function(e){Object(a.a)(Object(u.a)(n.prototype),"updateGeometry",this).call(this,e);var t=this.buffers.indices;t&&(this.vertexCount=(t.value||t).length)}},{key:"normalizeGeometry",value:function(e){if(this.normalize){if(e=m.b(e,this.positionSize),this.opts.resolution)return Object(b.a)(e.positions||e,e.holeIndices,{size:this.positionSize,gridResolution:this.opts.resolution,edgeTypes:!0});if(this.opts.wrapLongitude)return Object(b.b)(e.positions||e,e.holeIndices,{size:this.positionSize,maxLatitude:86,edgeTypes:!0})}return e}},{key:"getGeometrySize",value:function(e){if(Array.isArray(e)&&!Number.isFinite(e[0])){var t,n=0,r=E(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;n+=this.getGeometrySize(i)}}catch(a){r.e(a)}finally{r.f()}return n}return(e.positions||e).length/this.positionSize}},{key:"getGeometryFromBuffer",value:function(e){return this.normalize||!this.buffers.indices?Object(a.a)(Object(u.a)(n.prototype),"getGeometryFromBuffer",this).call(this,e):function(){return null}}},{key:"updateGeometryAttributes",value:function(e,t){if(Array.isArray(e)&&!Number.isFinite(e[0])){var n,r=E(e);try{for(r.s();!(n=r.n()).done;){var i=n.value,a=this.getGeometrySize(i);t.geometrySize=a,this.updateGeometryAttributes(i,t),t.vertexStart+=a,t.indexStart=this.indexStarts[t.geometryIndex+1]}}catch(o){r.e(o)}finally{r.f()}}else this._updateIndices(e,t),this._updatePositions(e,t),this._updateVertexValid(e,t)}},{key:"_updateIndices",value:function(e,t){var n=t.geometryIndex,r=t.vertexStart,i=t.indexStart,a=this.attributes,o=this.indexStarts,s=this.typedArrayManager,u=a.indices;if(u){var A=i,c=m.a(e,this.positionSize,this.opts.preproject);u=s.allocate(u,i+c.length,{copy:!0});for(var l=0;l<c.length;l++)u[A++]=c[l]+r;o[n+1]=i+c.length,a.indices=u}}},{key:"_updatePositions",value:function(e,t){var n=t.vertexStart,r=t.geometrySize,i=this.attributes.positions,a=this.positionSize;if(i)for(var o=e.positions||e,s=n,u=0;u<r;s++,u++){var A=o[u*a],c=o[u*a+1],l=a>2?o[u*a+2]:0;i[3*s]=A,i[3*s+1]=c,i[3*s+2]=l}}},{key:"_updateVertexValid",value:function(e,t){var n=t.vertexStart,r=t.geometrySize,i=this.attributes.vertexValid,a=this.positionSize,o=e&&e.holeIndices;if(e&&e.edgeTypes?i.set(e.edgeTypes,n):i.fill(1,n,n+r),o)for(var s=0;s<o.length;s++)i[n+o[s]/a-1]=0;i[n+r-1]=0}}]),n}(I.a),_="\nattribute vec2 vertexPositions;\nattribute float vertexValid;\n\nuniform bool extruded;\nuniform bool isWireframe;\nuniform float elevationScale;\nuniform float opacity;\n\nvarying vec4 vColor;\nvarying float isValid;\n\nstruct PolygonProps {\n  vec4 fillColors;\n  vec4 lineColors;\n  vec3 positions;\n  vec3 nextPositions;\n  vec3 pickingColors;\n  vec3 positions64Low;\n  vec3 nextPositions64Low;\n  float elevations;\n};\n\nvec3 project_offset_normal(vec3 vector) {\n  if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n    project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSETS) {\n    return normalize(vector * project_uCommonUnitsPerWorldUnit);\n  }\n  return project_normal(vector);\n}\n\nvoid calculatePosition(PolygonProps props) {\n  vec3 pos;\n  vec3 pos64Low;\n  vec3 normal;\n  vec4 colors = isWireframe ? props.lineColors : props.fillColors;\n\n  geometry.worldPosition = props.positions;\n  geometry.worldPositionAlt = props.nextPositions;\n  geometry.pickingColor = props.pickingColors;\n\n#ifdef IS_SIDE_VERTEX\n  pos = mix(props.positions, props.nextPositions, vertexPositions.x);\n  pos64Low = mix(props.positions64Low, props.nextPositions64Low, vertexPositions.x);\n  isValid = vertexValid;\n#else\n  pos = props.positions;\n  pos64Low = props.positions64Low;\n  isValid = 1.0;\n#endif\n\n  if (extruded) {\n    pos.z += props.elevations * vertexPositions.y * elevationScale;\n\n#ifdef IS_SIDE_VERTEX\n    normal = vec3(\n      props.positions.y - props.nextPositions.y + (props.positions64Low.y - props.nextPositions64Low.y),\n      props.nextPositions.x - props.positions.x + (props.nextPositions64Low.x - props.positions64Low.x),\n      0.0);\n    normal = project_offset_normal(normal);\n#else\n    normal = vec3(0.0, 0.0, 1.0);\n#endif\n    geometry.normal = normal;\n  }\n\n  gl_Position = project_position_to_clipspace(pos, pos64Low, vec3(0.), geometry.position);\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  if (extruded) {\n    vec3 lightColor = lighting_getLightColor(colors.rgb, project_uCameraPosition, geometry.position.xyz, normal);\n    vColor = vec4(lightColor, colors.a * opacity);\n  } else {\n    vColor = vec4(colors.rgb, colors.a * opacity);\n  }\n  DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",x="#define SHADER_NAME solid-polygon-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 positions64Low;\nattribute float elevations;\nattribute vec4 fillColors;\nattribute vec4 lineColors;\nattribute vec3 pickingColors;\n\n".concat(_,"\n\nvoid main(void) {\n  PolygonProps props;\n\n  props.positions = positions;\n  props.positions64Low = positions64Low;\n  props.elevations = elevations;\n  props.fillColors = fillColors;\n  props.lineColors = lineColors;\n  props.pickingColors = pickingColors;\n\n  calculatePosition(props);\n}\n"),S="#define SHADER_NAME solid-polygon-layer-vertex-shader-side\n#define IS_SIDE_VERTEX\n\n\nattribute vec3 instancePositions;\nattribute vec3 nextPositions;\nattribute vec3 instancePositions64Low;\nattribute vec3 nextPositions64Low;\nattribute float instanceElevations;\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute vec3 instancePickingColors;\n\n".concat(_,"\n\nvoid main(void) {\n  PolygonProps props;\n\n  props.positions = instancePositions;\n  props.positions64Low = instancePositions64Low;\n  props.elevations = instanceElevations;\n  props.fillColors = instanceFillColors;\n  props.lineColors = instanceLineColors;\n  props.pickingColors = instancePickingColors;\n  props.nextPositions = nextPositions;\n  props.nextPositions64Low = nextPositions64Low;\n\n  calculatePosition(props);\n}\n");function O(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}n.d(t,"a",(function(){return M}));var D=[0,0,0,255],R={filled:!0,extruded:!1,wireframe:!1,_normalize:!0,elevationScale:{type:"number",min:0,value:1},getPolygon:{type:"accessor",value:function(e){return e.polygon}},getElevation:{type:"accessor",value:1e3},getFillColor:{type:"accessor",value:D},getLineColor:{type:"accessor",value:D},material:!0},j={enter:function(e,t){return t.length?t.subarray(t.length-e.length):e}},M=function(e){Object(o.a)(n,e);var t=O(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"getShaders",value:function(e){return Object(a.a)(Object(u.a)(n.prototype),"getShaders",this).call(this,{vs:e,fs:"#define SHADER_NAME solid-polygon-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying float isValid;\n\nvoid main(void) {\n  if (isValid < 0.5) {\n    discard;\n  }\n\n  gl_FragColor = vColor;\n\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",defines:{},modules:[A.a,c.a,l.a]})}},{key:"initializeState",value:function(){var e=this,t=this.context,n=t.gl,r=t.viewport,i=this.props.coordinateSystem;r.isGeospatial&&i===f.a.DEFAULT&&(i=f.a.LNGLAT),this.setState({numInstances:0,polygonTesselator:new k({preproject:i===f.a.LNGLAT&&r.projectFlat,fp64:this.use64bitPositions(),IndexType:!n||Object(g.c)(n,d.a.ELEMENT_INDEX_UINT32)?Uint32Array:Uint16Array})});var a=this.getAttributeManager();a.remove(["instancePickingColors"]),a.add({indices:{size:1,isIndexed:!0,update:this.calculateIndices,noAlloc:!0},positions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:j,accessor:"getPolygon",update:this.calculatePositions,noAlloc:!0,shaderAttributes:{positions:{vertexOffset:0,divisor:0},instancePositions:{vertexOffset:0,divisor:1},nextPositions:{vertexOffset:1,divisor:1}}},vertexValid:{size:1,divisor:1,type:5121,update:this.calculateVertexValid,noAlloc:!0},elevations:{size:1,transition:j,accessor:"getElevation",shaderAttributes:{elevations:{divisor:0},instanceElevations:{divisor:1}}},fillColors:{alias:"colors",size:this.props.colorFormat.length,type:5121,normalized:!0,transition:j,accessor:"getFillColor",defaultValue:D,shaderAttributes:{fillColors:{divisor:0},instanceFillColors:{divisor:1}}},lineColors:{alias:"colors",size:this.props.colorFormat.length,type:5121,normalized:!0,transition:j,accessor:"getLineColor",defaultValue:D,shaderAttributes:{lineColors:{divisor:0},instanceLineColors:{divisor:1}}},pickingColors:{size:3,type:5121,accessor:function(t,n){var r=n.index,i=n.target;return e.encodePickingColor(t&&t.__source?t.__source.index:r,i)},shaderAttributes:{pickingColors:{divisor:0},instancePickingColors:{divisor:1}}}})}},{key:"getPickingInfo",value:function(e){var t=Object(a.a)(Object(u.a)(n.prototype),"getPickingInfo",this).call(this,e),r=t.index,i=this.props.data;return i[0]&&i[0].__source&&(t.object=i.find((function(e){return e.__source.index===r}))),t}},{key:"draw",value:function(e){var t=e.uniforms,n=this.props,r=n.extruded,i=n.filled,a=n.wireframe,o=n.elevationScale,s=this.state,u=s.topModel,A=s.sideModel,c=s.polygonTesselator,l=Object.assign({},t,{extruded:Boolean(r),elevationScale:o});A&&(A.setInstanceCount(c.instanceCount-1),A.setUniforms(l),a&&(A.setDrawMode(3),A.setUniforms({isWireframe:!0}).draw()),i&&(A.setDrawMode(6),A.setUniforms({isWireframe:!1}).draw())),u&&(u.setVertexCount(c.vertexCount),u.setUniforms(l).draw())}},{key:"updateState",value:function(e){Object(a.a)(Object(u.a)(n.prototype),"updateState",this).call(this,e),this.updateGeometry(e);var t=e.props,r=e.oldProps,i=e.changeFlags,o=this.getAttributeManager();(i.extensionsChanged||t.filled!==r.filled||t.extruded!==r.extruded)&&(this.state.models&&this.state.models.forEach((function(e){return e.delete()})),this.setState(this._getModels(this.context.gl)),o.invalidateAll())}},{key:"updateGeometry",value:function(e){var t=e.props,n=(e.oldProps,e.changeFlags);if(n.dataChanged||n.updateTriggersChanged&&(n.updateTriggersChanged.all||n.updateTriggersChanged.getPolygon)){var r=this.state.polygonTesselator,i=t.data.attributes||{};r.updateGeometry({data:t.data,normalize:t._normalize,geometryBuffer:i.getPolygon,buffers:i,getGeometry:t.getPolygon,positionFormat:t.positionFormat,wrapLongitude:t.wrapLongitude,resolution:this.context.viewport.resolution,fp64:this.use64bitPositions(),dataChanged:n.dataChanged}),this.setState({numInstances:r.instanceCount,startIndices:r.vertexStarts}),n.dataChanged||this.getAttributeManager().invalidateAll()}}},{key:"_getModels",value:function(e){var t,n,r=this.props,i=r.id,a=r.filled,o=r.extruded;if(a){var s=this.getShaders(x);s.defines.NON_INSTANCED_MODEL=1,t=new p.a(e,Object.assign({},s,{id:"".concat(i,"-top"),drawMode:4,attributes:{vertexPositions:new Float32Array([0,1])},uniforms:{isWireframe:!1,isSideVertex:!1},vertexCount:0,isIndexed:!0}))}return o&&((n=new p.a(e,Object.assign({},this.getShaders(S),{id:"".concat(i,"-side"),geometry:new v.a({drawMode:1,vertexCount:4,attributes:{vertexPositions:{size:2,value:new Float32Array([1,0,0,0,0,1,1,1])}}}),instanceCount:0,isInstanced:1}))).userData.excludeAttributes={indices:!0}),{models:[n,t].filter(Boolean),topModel:t,sideModel:n}}},{key:"calculateIndices",value:function(e){var t=this.state.polygonTesselator;e.startIndices=t.indexStarts,e.value=t.get("indices")}},{key:"calculatePositions",value:function(e){var t=this.state.polygonTesselator;e.startIndices=t.vertexStarts,e.value=t.get("positions")}},{key:"calculateVertexValid",value:function(e){e.value=this.state.polygonTesselator.get("vertexValid")}},{key:"wrapLongitude",get:function(){return!1}}]),n}(h.a);M.layerName="SolidPolygonLayer",M.defaultProps=R},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(23),i=n(16),a=n(39),o=n(187),s=n(35),u=n(155),A=n(66);function c(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f=Object(u.a)((function(e){var t=e.viewport,n=e.center;return new s.a(t.viewProjectionMatrix).invert().transform(n)})),h=Object(u.a)((function(e){var t,n=e.viewport,a=e.shadowMatrices,o=[],u=n.pixelUnprojectionMatrix,l=n.isGeospatial?void 0:1,f=[[0,0,l],[n.width,0,l],[0,n.height,l],[n.width,n.height,l],[0,0,-1],[n.width,0,-1],[0,n.height,-1],[n.width,n.height,-1]].map((function(e){return function(e,t){var n=Object(i.a)(e,3),r=n[0],a=n[1],o=n[2],s=Object(A.l)([r,a,o],t);if(Number.isFinite(o))return s;return[s[0],s[1],0]}(e,u)})),h=c(a);try{var g=function(){var e=t.value,i=e.clone().translate(new s.c(n.center).negate()),a=f.map((function(e){return i.transform(e)})),u=(new s.a).ortho({left:Math.min.apply(Math,Object(r.a)(a.map((function(e){return e[0]})))),right:Math.max.apply(Math,Object(r.a)(a.map((function(e){return e[0]})))),bottom:Math.min.apply(Math,Object(r.a)(a.map((function(e){return e[1]})))),top:Math.max.apply(Math,Object(r.a)(a.map((function(e){return e[1]})))),near:Math.min.apply(Math,Object(r.a)(a.map((function(e){return-e[2]})))),far:Math.max.apply(Math,Object(r.a)(a.map((function(e){return-e[2]}))))});o.push(u.multiplyRight(e))};for(h.s();!(t=h.n()).done;)g()}catch(d){h.e(d)}finally{h.f()}return o})),g=[0,0,0,1],d=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0];function p(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={shadow_uDrawShadowMap:Boolean(e.drawToShadowMap),shadow_uUseShadowMap:!!e.shadowMaps&&e.shadowMaps.length>0,shadow_uColor:e.shadowColor||g,shadow_uLightId:e.shadowLightId||0,shadow_uLightCount:e.shadowMatrices.length},r=f({viewport:e.viewport,center:t.project_uCenter}),i=[],o=h({shadowMatrices:e.shadowMatrices,viewport:e.viewport}).slice(),u=0;u<e.shadowMatrices.length;u++){var A=o[u],c=A.clone().translate(new s.c(e.viewport.center).negate());t.project_uCoordinateSystem===a.a.LNGLAT&&t.project_uProjectionMode===a.c.WEB_MERCATOR?(o[u]=c,i[u]=r):(o[u]=A.clone().multiplyRight(d),i[u]=c.transform(r))}for(var l=0;l<o.length;l++)n["shadow_uViewProjectionMatrices[".concat(l,"]")]=o[l],n["shadow_uProjectCenters[".concat(l,"]")]=i[l],e.shadowMaps&&e.shadowMaps.length>0?n["shadow_uShadowMap".concat(l)]=e.shadowMaps[l]:n["shadow_uShadowMap".concat(l)]=e.dummyShadowMap;return n}t.a={name:"shadow",dependencies:[o.a],vs:"\nconst int max_lights = 2;\nuniform mat4 shadow_uViewProjectionMatrices[max_lights];\nuniform vec4 shadow_uProjectCenters[max_lights];\nuniform bool shadow_uDrawShadowMap;\nuniform bool shadow_uUseShadowMap;\nuniform int shadow_uLightId;\nuniform float shadow_uLightCount;\n\nvarying vec3 shadow_vPosition[max_lights];\n\nvec4 shadow_setVertexPosition(vec4 position_commonspace) {\n  if (shadow_uDrawShadowMap) {\n    return project_common_position_to_clipspace(position_commonspace, shadow_uViewProjectionMatrices[shadow_uLightId], shadow_uProjectCenters[shadow_uLightId]);\n  }\n  if (shadow_uUseShadowMap) {\n    for (int i = 0; i < max_lights; i++) {\n      if(i < int(shadow_uLightCount)) {\n        vec4 shadowMap_position = project_common_position_to_clipspace(position_commonspace, shadow_uViewProjectionMatrices[i], shadow_uProjectCenters[i]);\n        shadow_vPosition[i] = (shadowMap_position.xyz / shadowMap_position.w + 1.0) / 2.0;\n      }\n    }\n  }\n  return gl_Position;\n}\n",fs:"\nconst int max_lights = 2;\nuniform bool shadow_uDrawShadowMap;\nuniform bool shadow_uUseShadowMap;\nuniform sampler2D shadow_uShadowMap0;\nuniform sampler2D shadow_uShadowMap1;\nuniform vec4 shadow_uColor;\nuniform float shadow_uLightCount;\n\nvarying vec3 shadow_vPosition[max_lights];\n\nconst vec4 bitPackShift = vec4(1.0, 255.0, 65025.0, 16581375.0);\nconst vec4 bitUnpackShift = 1.0 / bitPackShift;\nconst vec4 bitMask = vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0,  0.0);\n\nfloat shadow_getShadowWeight(vec3 position, sampler2D shadowMap) {\n  vec4 rgbaDepth = texture2D(shadowMap, position.xy);\n\n  float z = dot(rgbaDepth, bitUnpackShift);\n  return smoothstep(0.001, 0.01, position.z - z);\n}\n\nvec4 shadow_filterShadowColor(vec4 color) {\n  if (shadow_uDrawShadowMap) {\n    vec4 rgbaDepth = fract(gl_FragCoord.z * bitPackShift);\n    rgbaDepth -= rgbaDepth.gbaa * bitMask;\n    return rgbaDepth;\n  }\n  if (shadow_uUseShadowMap) {\n    float shadowAlpha = 0.0;\n    shadowAlpha += shadow_getShadowWeight(shadow_vPosition[0], shadow_uShadowMap0);\n    if(shadow_uLightCount > 1.0) {\n      shadowAlpha += shadow_getShadowWeight(shadow_vPosition[1], shadow_uShadowMap1);\n    }\n    shadowAlpha *= shadow_uColor.a / shadow_uLightCount;\n    float blendedAlpha = shadowAlpha + color.a * (1.0 - shadowAlpha);\n\n    return vec4(\n      mix(color.rgb, shadow_uColor.rgb, shadowAlpha / blendedAlpha),\n      blendedAlpha\n    );\n  }\n  return color;\n}\n",inject:{"vs:DECKGL_FILTER_GL_POSITION":"\n    position = shadow_setVertexPosition(geometry.position);\n    ","fs:DECKGL_FILTER_COLOR":"\n    color = shadow_filterShadowColor(color);\n    "},getUniforms:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.drawToShadowMap||e.shadowMaps&&e.shadowMaps.length>0){var n={},r=e.shadowEnabled,i=void 0===r||r;return i&&e.shadowMatrices&&e.shadowMatrices.length>0?Object.assign(n,p(e,t)):Object.assign(n,{shadow_uDrawShadowMap:!1,shadow_uUseShadowMap:!1}),n}return{}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return d}));var r=n(10),i=n(40),a=n(39),o=n(155),s=n(57),u=[0,0,0,0],A=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0],c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],l=[0,0,0],f=[0,0,0],h=Object(o.a)((function(e){var t=e.viewport,n=e.devicePixelRatio,o=e.coordinateSystem,s=e.coordinateOrigin,c=function(e,t,n){var a=e.viewMatrixUncentered,o=e.projectionMatrix,s=e.viewMatrix,c=e.viewProjectionMatrix,l=u,f=e.cameraPosition,h=g(e,t,n),d=h.geospatialOrigin,p=h.shaderCoordinateOrigin;if(h.offsetMode){var v=e.projectPosition(d||p);f=[f[0]-v[0],f[1]-v[1],f[2]-v[2]],v[3]=1,l=i.n([],v,c),s=a||s,c=r.h([],o,s),c=r.h([],c,A)}return{viewMatrix:s,viewProjectionMatrix:c,projectionCenter:l,cameraPosCommon:f,shaderCoordinateOrigin:p,geospatialOrigin:d}}(t,o,s),f=c.projectionCenter,h=c.viewProjectionMatrix,d=c.cameraPosCommon,p=c.shaderCoordinateOrigin,v=c.geospatialOrigin,y=t.getDistanceScales(),m=[t.width*n,t.height*n],I={project_uCoordinateSystem:o,project_uProjectionMode:t.projectionMode,project_uCoordinateOrigin:p,project_uCenter:f,project_uAntimeridian:(t.longitude||0)-180,project_uViewportSize:m,project_uDevicePixelRatio:n,project_uFocalDistance:t.focalDistance||1,project_uCommonUnitsPerMeter:y.unitsPerMeter,project_uCommonUnitsPerWorldUnit:y.unitsPerMeter,project_uCommonUnitsPerWorldUnit2:l,project_uScale:t.scale,project_uViewProjectionMatrix:h,project_uCameraPosition:d};if(v){var b=t.getDistanceScales(v);switch(o){case a.a.METER_OFFSETS:I.project_uCommonUnitsPerWorldUnit=b.unitsPerMeter,I.project_uCommonUnitsPerWorldUnit2=b.unitsPerMeter2;break;case a.a.LNGLAT:case a.a.LNGLAT_OFFSETS:I.project_uCommonUnitsPerWorldUnit=b.unitsPerDegree,I.project_uCommonUnitsPerWorldUnit2=b.unitsPerDegree2;break;case a.a.CARTESIAN:I.project_uCommonUnitsPerWorldUnit=[1,1,b.unitsPerMeter[2]],I.project_uCommonUnitsPerWorldUnit2=[0,0,b.unitsPerMeter2[2]]}}return I}));function g(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f,i=r,o=!0;switch(n=t===a.a.LNGLAT_OFFSETS||t===a.a.METER_OFFSETS?r:e.isGeospatial?[Math.fround(e.longitude),Math.fround(e.latitude),0]:null,e.projectionMode){case a.c.WEB_MERCATOR:t!==a.a.LNGLAT&&t!==a.a.CARTESIAN||(o=!1);break;case a.c.WEB_MERCATOR_AUTO_OFFSET:t===a.a.LNGLAT?i=n:t===a.a.CARTESIAN&&(i=[Math.fround(e.center[0]),Math.fround(e.center[1]),0],n=e.unprojectPosition(i),i[0]-=r[0],i[1]-=r[1],i[2]-=r[2]);break;case a.c.IDENTITY:i=e.position.map(Math.fround);break;case a.c.GLOBE:o=!1;break;default:o=!1}return i[2]=i[2]||0,{geospatialOrigin:n,shaderCoordinateOrigin:i,offsetMode:o}}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.viewport,n=e.devicePixelRatio,r=void 0===n?1:n,i=e.modelMatrix,o=void 0===i?null:i,u=e.coordinateSystem,A=void 0===u?a.a.DEFAULT:u,l=e.coordinateOrigin,f=e.autoWrapLongitude,g=void 0!==f&&f;e.projectionMode,e.positionOrigin;Object(s.a)(t),A===a.a.DEFAULT&&(A=t.isGeospatial?a.a.LNGLAT:a.a.CARTESIAN);var d=h({viewport:t,devicePixelRatio:r,coordinateSystem:A,coordinateOrigin:l});return d.project_uWrapLongitude=g,d.project_uModelMatrix=o||c,d}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),i=n(2),a=n(57),o=function(){function e(t){Object(r.a)(this,e),Object(a.a)(Number.isFinite(t.width),"`width` must be supplied"),Object(a.a)(Number.isFinite(t.height),"`height` must be supplied"),this._viewportProps=this._applyConstraints(t)}return Object(i.a)(e,[{key:"getViewportProps",value:function(){return this._viewportProps}},{key:"shortestPathFrom",value:function(e){return this._viewportProps}},{key:"_applyConstraints",value:function(e){return e}}]),e}()},function(e,t,n){"use strict";function r(e){var t;if("undefined"!==typeof Symbol){if(Symbol.asyncIterator&&null!=(t=e[Symbol.asyncIterator]))return t.call(e);if(Symbol.iterator&&null!=(t=e[Symbol.iterator]))return t.call(e)}throw new TypeError("Object is not async iterable")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(3),i=n(2),a=n(7),o=n(4),s=n(6),u=n(168),A=n(36),c=n(143),l=function(e){function t(){return Object(r.a)(this,t),Object(a.a)(this,Object(o.a)(t).apply(this,arguments))}return Object(s.a)(t,e),Object(i.a)(t,[{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var e=0,t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(e){return Math.sqrt(this.distanceSquared(e))}},{key:"distanceSquared",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n){var r=this[n]-e[n];t+=r*r}return Object(A.a)(t)}},{key:"dot",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n)t+=this[n]*e[n];return Object(A.a)(t)}},{key:"normalize",value:function(){var e=this.magnitude();if(0!==e)for(var t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}},{key:"multiply",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]*=a[o];return this.check()}},{key:"divide",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]/=a[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(e){return this.distance(e)}},{key:"distanceToSquared",value:function(e){return this.distanceSquared(e)}},{key:"getComponent",value:function(e){return Object(c.a)(e>=0&&e<this.ELEMENTS,"index is out of range"),Object(A.a)(this[e])}},{key:"setComponent",value:function(e,t){return Object(c.a)(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=t,this.check()}},{key:"addVectors",value:function(e,t){return this.copy(e).add(t)}},{key:"subVectors",value:function(e,t){return this.copy(e).subtract(t)}},{key:"multiplyVectors",value:function(e,t){return this.copy(e).multiply(t)}},{key:"addScaledVector",value:function(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}},{key:"x",get:function(){return this[0]},set:function(e){return this[0]=Object(A.a)(e)}},{key:"y",get:function(){return this[1]},set:function(e){return this[1]=Object(A.a)(e)}}]),t}(u.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return I}));var r=n(16),i=n(3),a=n(7),o=n(4),s=n(2),u=n(6),A=n(36),c=n(308),l=n(112),f=n(10),h=n(32),g=n(17),d=n(40),p=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),v=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),y=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),m={},I=function(e){function t(e){var n;return Object(i.a)(this,t),n=Object(a.a)(this,Object(o.a)(t).call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0)),1===arguments.length&&Array.isArray(e)?n.copy(e):n.identity(),n}return Object(u.a)(t,e),Object(s.a)(t,[{key:"INDICES",get:function(){return y}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}}],[{key:"IDENTITY",get:function(){return m.IDENTITY=m.IDENTITY||Object.freeze(new t(p)),m.IDENTITY}},{key:"ZERO",get:function(){return m.ZERO=m.ZERO||Object.freeze(new t(v)),m.ZERO}}]),Object(s.a)(t,[{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this[9]=e[9],this[10]=e[10],this[11]=e[11],this[12]=e[12],this[13]=e[13],this[14]=e[14],this[15]=e[15],this.check()}},{key:"set",value:function(e,t,n,r,i,a,o,s,u,A,c,l,f,h,g,d){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this[4]=i,this[5]=a,this[6]=o,this[7]=s,this[8]=u,this[9]=A,this[10]=c,this[11]=l,this[12]=f,this[13]=h,this[14]=g,this[15]=d,this.check()}},{key:"setRowMajor",value:function(e,t,n,r,i,a,o,s,u,A,c,l,f,h,g,d){return this[0]=e,this[1]=i,this[2]=u,this[3]=f,this[4]=t,this[5]=a,this[6]=A,this[7]=h,this[8]=n,this[9]=o,this[10]=c,this[11]=g,this[12]=r,this[13]=s,this[14]=l,this[15]=d,this.check()}},{key:"toRowMajor",value:function(e){return e[0]=this[0],e[1]=this[4],e[2]=this[8],e[3]=this[12],e[4]=this[1],e[5]=this[5],e[6]=this[9],e[7]=this[13],e[8]=this[2],e[9]=this[6],e[10]=this[10],e[11]=this[14],e[12]=this[3],e[13]=this[7],e[14]=this[11],e[15]=this[15],e}},{key:"identity",value:function(){return this.copy(p)}},{key:"fromQuaternion",value:function(e){return f.c(this,e),this.check()}},{key:"frustum",value:function(e){var n=e.left,r=e.right,i=e.bottom,a=e.top,o=e.near,s=e.far;return s===1/0?t._computeInfinitePerspectiveOffCenter(this,n,r,i,a,o):f.d(this,n,r,i,a,o,s),this.check()}},{key:"lookAt",value:function(e,t,n){if(1===arguments.length){var r=e;e=r.eye,t=r.center,n=r.up}return t=t||[0,0,0],n=n||[0,1,0],f.g(this,e,t,n),this.check()}},{key:"ortho",value:function(e){var t=e.left,n=e.right,r=e.bottom,i=e.top,a=e.near,o=void 0===a?.1:a,s=e.far,u=void 0===s?500:s;return f.i(this,t,n,r,i,o,u),this.check()}},{key:"orthographic",value:function(e){var n=e.fovy,r=void 0===n?45*Math.PI/180:n,i=e.aspect,a=void 0===i?1:i,o=e.focalDistance,s=void 0===o?1:o,u=e.near,A=void 0===u?.1:u,c=e.far,l=void 0===c?500:c;if(r>2*Math.PI)throw Error("radians");var f=r/2,h=s*Math.tan(f),g=h*a;return(new t).ortho({left:-g,right:g,bottom:-h,top:h,near:A,far:l})}},{key:"perspective",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fovy,n=e.fov,r=void 0===n?45*Math.PI/180:n,i=e.aspect,a=void 0===i?1:i,o=e.near,s=void 0===o?.1:o,u=e.far,A=void 0===u?500:u;if((t=t||r)>2*Math.PI)throw Error("radians");return f.j(this,t,a,s,A),this.check()}},{key:"determinant",value:function(){return f.a(this)}},{key:"getScale",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),e[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),e[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),e}},{key:"getTranslation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=this[12],e[1]=this[13],e[2]=this[14],e}},{key:"getRotation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(t||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=0,e[4]=this[4]*r,e[5]=this[5]*i,e[6]=this[6]*a,e[7]=0,e[8]=this[8]*r,e[9]=this[9]*i,e[10]=this[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{key:"getRotationMatrix3",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(t||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=this[4]*r,e[4]=this[5]*i,e[5]=this[6]*a,e[6]=this[8]*r,e[7]=this[9]*i,e[8]=this[10]*a,e}},{key:"transpose",value:function(){return f.q(this,this),this.check()}},{key:"invert",value:function(){return f.f(this,this),this.check()}},{key:"multiplyLeft",value:function(e){return f.h(this,e,this),this.check()}},{key:"multiplyRight",value:function(e){return f.h(this,this,e),this.check()}},{key:"rotateX",value:function(e){return f.l(this,this,e),this.check()}},{key:"rotateY",value:function(e){return f.m(this,this,e),this.check()}},{key:"rotateZ",value:function(e){return f.n(this,this,e),this.check()}},{key:"rotateXYZ",value:function(e){var t=Object(r.a)(e,3),n=t[0],i=t[1],a=t[2];return this.rotateX(n).rotateY(i).rotateZ(a)}},{key:"rotateAxis",value:function(e,t){return f.k(this,this,e,t),this.check()}},{key:"scale",value:function(e){return Array.isArray(e)?f.o(this,this,e):f.o(this,this,[e,e,e]),this.check()}},{key:"translate",value:function(e){return f.p(this,this,e),this.check()}},{key:"transform",value:function(e,t){return 4===e.length?(t=d.n(t||[-0,-0,-0,-0],e,this),Object(A.b)(t,4),t):this.transformAsPoint(e,t)}},{key:"transformAsPoint",value:function(e,t){switch(e.length){case 2:t=h.j(t||[-0,-0],e,this);break;case 3:t=g.q(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return Object(A.b)(t,e.length),t}},{key:"transformAsVector",value:function(e,t){switch(e.length){case 2:t=Object(l.a)(t||[-0,-0],e,this);break;case 3:t=Object(l.c)(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return Object(A.b)(t,e.length),t}},{key:"makeRotationX",value:function(e){return this.identity().rotateX(e)}},{key:"makeTranslation",value:function(e,t,n){return this.identity().translate([e,t,n])}},{key:"transformPoint",value:function(e,t){return Object(A.c)("Matrix4.transformPoint","3.0"),this.transformAsPoint(e,t)}},{key:"transformVector",value:function(e,t){return Object(A.c)("Matrix4.transformVector","3.0"),this.transformAsPoint(e,t)}},{key:"transformDirection",value:function(e,t){return Object(A.c)("Matrix4.transformDirection","3.0"),this.transformAsVector(e,t)}}],[{key:"_computeInfinitePerspectiveOffCenter",value:function(e,t,n,r,i,a){var o=2*a/(n-t),s=2*a/(i-r),u=(n+t)/(n-t),A=(i+r)/(i-r),c=-2*a;return e[0]=o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=u,e[9]=A,e[10]=-1,e[11]=-1,e[12]=0,e[13]=0,e[14]=c,e[15]=0,e}}]),t}(c.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(16),i=n(3),a=n(7),o=n(4),s=n(2),u=n(6),A=n(168),c=n(34),l=n(36),f=n(247),h="Unknown Euler angle order";var g=function(e){function t(){var e,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,A=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.DefaultOrder;(Object(i.a)(this,t),e=Object(a.a)(this,Object(o.a)(t).call(this,-0,-0,-0,-0)),arguments.length>0&&Array.isArray(arguments[0]))?(n=e).fromVector3.apply(n,arguments):e.set(r,s,u,A);return e}return Object(u.a)(t,e),Object(s.a)(t,[{key:"ELEMENTS",get:function(){return 4}}],[{key:"rotationOrder",value:function(e){return t.RotationOrders[e]}},{key:"ZYX",get:function(){return 0}},{key:"YXZ",get:function(){return 1}},{key:"XZY",get:function(){return 2}},{key:"ZXY",get:function(){return 3}},{key:"YZX",get:function(){return 4}},{key:"XYZ",get:function(){return 5}},{key:"RollPitchYaw",get:function(){return 0}},{key:"DefaultOrder",get:function(){return t.ZYX}},{key:"RotationOrders",get:function(){return["ZYX","YXZ","XZY","ZXY","YZX","XYZ"]}}]),Object(s.a)(t,[{key:"fromQuaternion",value:function(e){var n=Object(r.a)(e,4),i=n[0],a=n[1],o=n[2],s=n[3],u=a*a,A=-2*(u+o*o)+1,c=2*(i*a+s*o),l=-2*(i*o-s*a),f=2*(a*o+s*i),h=-2*(i*i+u)+1;return l=(l=l>1?1:l)<-1?-1:l,new t(Math.atan2(f,h),Math.asin(l),Math.atan2(c,A),t.RollPitchYaw)}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=Number.isFinite(e[3])||this.order,this.check()}},{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;return this[0]=e,this[1]=t,this[2]=n,this[3]=Number.isFinite(r)?r:this[3],this.check()}},{key:"validate",value:function(){return(e=this[3])>=0&&e<6&&Number.isFinite(this[0])&&Number.isFinite(this[1])&&Number.isFinite(this[2]);var e}},{key:"toArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this[0],e[t+1]=this[1],e[t+2]=this[2],e}},{key:"toArray4",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e[t]=this[0],e[t+1]=this[1],e[t+2]=this[2],e[t+3]=this[3],e}},{key:"toVector3",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=this[0],e[1]=this[1],e[2]=this[2],e}},{key:"fromVector3",value:function(e,t){return this.set(e[0],e[1],e[2],Number.isFinite(t)?t:this[3])}},{key:"fromArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this[0]=e[0+t],this[1]=e[1+t],this[2]=e[2+t],void 0!==e[3]&&(this[3]=e[3]),this.check()}},{key:"fromRollPitchYaw",value:function(e,n,r){return this.set(e,n,r,t.ZYX)}},{key:"fromRotationMatrix",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.DefaultOrder;return this._fromRotationMatrix(e,n),this.check()}},{key:"getRotationMatrix",value:function(e){return this._getRotationMatrix(e)}},{key:"getQuaternion",value:function(){var e=new f.a;switch(this[4]){case t.XYZ:return e.rotateX(this[0]).rotateY(this[1]).rotateZ(this[2]);case t.YXZ:return e.rotateY(this[0]).rotateX(this[1]).rotateZ(this[2]);case t.ZXY:return e.rotateZ(this[0]).rotateX(this[1]).rotateY(this[2]);case t.ZYX:return e.rotateZ(this[0]).rotateY(this[1]).rotateX(this[2]);case t.YZX:return e.rotateY(this[0]).rotateZ(this[1]).rotateX(this[2]);case t.XZY:return e.rotateX(this[0]).rotateZ(this[1]).rotateY(this[2]);default:throw new Error(h)}}},{key:"_fromRotationMatrix",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.DefaultOrder,r=e.elements,i=r[0],a=r[4],o=r[8],s=r[1],u=r[5],A=r[9],l=r[2],f=r[6],g=r[10];switch(n=n||this[3]){case t.XYZ:this[1]=Math.asin(Object(c.d)(o,-1,1)),Math.abs(o)<.99999?(this[0]=Math.atan2(-A,g),this[2]=Math.atan2(-a,i)):(this[0]=Math.atan2(f,u),this[2]=0);break;case t.YXZ:this[0]=Math.asin(-Object(c.d)(A,-1,1)),Math.abs(A)<.99999?(this[1]=Math.atan2(o,g),this[2]=Math.atan2(s,u)):(this[1]=Math.atan2(-l,i),this[2]=0);break;case t.ZXY:this[0]=Math.asin(Object(c.d)(f,-1,1)),Math.abs(f)<.99999?(this[1]=Math.atan2(-l,g),this[2]=Math.atan2(-a,u)):(this[1]=0,this[2]=Math.atan2(s,i));break;case t.ZYX:this[1]=Math.asin(-Object(c.d)(l,-1,1)),Math.abs(l)<.99999?(this[0]=Math.atan2(f,g),this[2]=Math.atan2(s,i)):(this[0]=0,this[2]=Math.atan2(-a,u));break;case t.YZX:this[2]=Math.asin(Object(c.d)(s,-1,1)),Math.abs(s)<.99999?(this[0]=Math.atan2(-A,u),this[1]=Math.atan2(-l,i)):(this[0]=0,this[1]=Math.atan2(o,g));break;case t.XZY:this[2]=Math.asin(-Object(c.d)(a,-1,1)),Math.abs(a)<.99999?(this[0]=Math.atan2(f,u),this[1]=Math.atan2(o,i)):(this[0]=Math.atan2(-A,g),this[1]=0);break;default:throw new Error(h)}return this[3]=n,this}},{key:"_getRotationMatrix",value:function(e){var n=e||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],r=this.x,i=this.y,a=this.z,o=Math.cos(r),s=Math.cos(i),u=Math.cos(a),A=Math.sin(r),c=Math.sin(i),l=Math.sin(a);switch(this[3]){case t.XYZ:var f=o*u,g=o*l,d=A*u,p=A*l;n[0]=s*u,n[4]=-s*l,n[8]=c,n[1]=g+d*c,n[5]=f-p*c,n[9]=-A*s,n[2]=p-f*c,n[6]=d+g*c,n[10]=o*s;break;case t.YXZ:var v=s*u,y=s*l,m=c*u,I=c*l;n[0]=v+I*A,n[4]=m*A-y,n[8]=o*c,n[1]=o*l,n[5]=o*u,n[9]=-A,n[2]=y*A-m,n[6]=I+v*A,n[10]=o*s;break;case t.ZXY:var b=s*u,E=s*l,C=c*u,B=c*l;n[0]=b-B*A,n[4]=-o*l,n[8]=C+E*A,n[1]=E+C*A,n[5]=o*u,n[9]=B-b*A,n[2]=-o*c,n[6]=A,n[10]=o*s;break;case t.ZYX:var w=o*u,Q=o*l,k=A*u,_=A*l;n[0]=s*u,n[4]=k*c-Q,n[8]=w*c+_,n[1]=s*l,n[5]=_*c+w,n[9]=Q*c-k,n[2]=-c,n[6]=A*s,n[10]=o*s;break;case t.YZX:var x=o*s,S=o*c,O=A*s,D=A*c;n[0]=s*u,n[4]=D-x*l,n[8]=O*l+S,n[1]=l,n[5]=o*u,n[9]=-A*u,n[2]=-c*u,n[6]=S*l+O,n[10]=x-D*l;break;case t.XZY:var R=o*s,j=o*c,M=A*s,N=A*c;n[0]=s*u,n[4]=-l,n[8]=c*u,n[1]=R*l+N,n[5]=o*u,n[9]=j*l-M,n[2]=M*l-j,n[6]=A*u,n[10]=N*l+R;break;default:throw new Error(h)}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}},{key:"toQuaternion",value:function(){var e=Math.cos(.5*this.yaw),t=Math.sin(.5*this.yaw),n=Math.cos(.5*this.roll),r=Math.sin(.5*this.roll),i=Math.cos(.5*this.pitch),a=Math.sin(.5*this.pitch),o=e*n*i+t*r*a,s=e*r*i-t*n*a,u=e*n*a+t*r*i,A=t*n*i-e*r*a;return new f.a(s,u,A,o)}},{key:"x",get:function(){return this[0]},set:function(e){return this[0]=Object(l.a)(e)}},{key:"y",get:function(){return this[1]},set:function(e){return this[1]=Object(l.a)(e)}},{key:"z",get:function(){return this[2]},set:function(e){return this[2]=Object(l.a)(e)}},{key:"alpha",get:function(){return this[0]},set:function(e){return this[0]=Object(l.a)(e)}},{key:"beta",get:function(){return this[1]},set:function(e){return this[1]=Object(l.a)(e)}},{key:"gamma",get:function(){return this[2]},set:function(e){return this[2]=Object(l.a)(e)}},{key:"phi",get:function(){return this[0]},set:function(e){return this[0]=Object(l.a)(e)}},{key:"theta",get:function(){return this[1]},set:function(e){return this[1]=Object(l.a)(e)}},{key:"psi",get:function(){return this[2]},set:function(e){return this[2]=Object(l.a)(e)}},{key:"roll",get:function(){return this[0]},set:function(e){return this[0]=Object(l.a)(e)}},{key:"pitch",get:function(){return this[1]},set:function(e){return this[1]=Object(l.a)(e)}},{key:"yaw",get:function(){return this[2]},set:function(e){return this[2]=Object(l.a)(e)}},{key:"order",get:function(){return this[3]},set:function(e){return this[3]=function(e){if(e<0&&e>=6)throw new Error(h);return e}(e)}}]),t}(A.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(3),i=n(2),a=n(6),o=n(7),s=n(4),u=n(81),A=n(54),c=n(102);function l(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var f=function(e){Object(a.a)(n,e);var t=l(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}},{key:"fromArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)this[n]=e[n+t];return this.check()}},{key:"to",value:function(e){return e===this?this:Object(A.d)(e)?this.toArray(e):this.toObject(e)}},{key:"toTarget",value:function(e){return e?this.to(e):this}},{key:"toArray",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)e[t+n]=this[n];return e}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(A.a)}},{key:"formatString",value:function(e){for(var t="",n=0;n<this.ELEMENTS;++n)t+=(n>0?", ":"")+Object(A.c)(this[n],e);return"".concat(e.printTypes?this.constructor.name:"","[").concat(t,"]")}},{key:"equals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(!Object(A.b)(this[t],e[t]))return!1;return!0}},{key:"exactEquals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(this[t]!==e[t])return!1;return!0}},{key:"negate",value:function(){for(var e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}},{key:"lerp",value:function(e,t,n){void 0===n&&(n=t,t=e,e=this);for(var r=0;r<this.ELEMENTS;++r){var i=e[r];this[r]=i+n*(t[r]-i)}return this.check()}},{key:"min",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}},{key:"max",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}},{key:"clamp",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e[n]),t[n]);return this.check()}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]+=a[o];return this.check()}},{key:"subtract",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]-=a[o];return this.check()}},{key:"scale",value:function(e){if(Array.isArray(e))return this.multiply(e);for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"sub",value:function(e){return this.subtract(e)}},{key:"setScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}},{key:"addScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}},{key:"subScalar",value:function(e){return this.addScalar(-e)}},{key:"multiplyScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"divideScalar",value:function(e){return this.scale(1/e)}},{key:"clampScalar",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e),t);return this.check()}},{key:"multiplyByScalar",value:function(e){return this.scale(e)}},{key:"check",value:function(){if(A.a.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}},{key:"validate",value:function(){for(var e=this.length===this.ELEMENTS,t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}},{key:"ELEMENTS",get:function(){return Object(c.a)(!1),0}},{key:"RANK",get:function(){return Object(c.a)(!1),0}},{key:"elements",get:function(){return this}}]),n}(Object(u.a)(Array))},function(e,t,n){var r,i,a;i=[],void 0===(a="function"===typeof(r=function(){"use strict";function e(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function t(e){return!0===(e&&e.__isLong__)}e.prototype.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),e.isLong=t;var n={},r={};function i(e,t){var i,a,s;return t?(s=0<=(e>>>=0)&&e<256)&&(a=r[e])?a:(i=o(e,(0|e)<0?-1:0,!0),s&&(r[e]=i),i):(s=-128<=(e|=0)&&e<128)&&(a=n[e])?a:(i=o(e,e<0?-1:0,!1),s&&(n[e]=i),i)}function a(e,t){if(isNaN(e)||!isFinite(e))return t?d:g;if(t){if(e<0)return d;if(e>=l)return I}else{if(e<=-f)return b;if(e+1>=f)return m}return e<0?a(-e,t).neg():o(e%c|0,e/c|0,t)}function o(t,n,r){return new e(t,n,r)}e.fromInt=i,e.fromNumber=a,e.fromBits=o;var s=Math.pow;function u(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return g;if("number"===typeof t?(n=t,t=!1):t=!!t,(n=n||10)<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return u(e.substring(1),t,n).neg();for(var i=a(s(n,8)),o=g,A=0;A<e.length;A+=8){var c=Math.min(8,e.length-A),l=parseInt(e.substring(A,A+c),n);if(c<8){var f=a(s(n,c));o=o.mul(f).add(a(l))}else o=(o=o.mul(i)).add(a(l))}return o.unsigned=t,o}function A(t){return t instanceof e?t:"number"===typeof t?a(t):"string"===typeof t?u(t):o(t.low,t.high,t.unsigned)}e.fromString=u,e.fromValue=A;var c=4294967296,l=c*c,f=l/2,h=i(1<<24),g=i(0);e.ZERO=g;var d=i(0,!0);e.UZERO=d;var p=i(1);e.ONE=p;var v=i(1,!0);e.UONE=v;var y=i(-1);e.NEG_ONE=y;var m=o(-1,2147483647,!1);e.MAX_VALUE=m;var I=o(-1,-1,!0);e.MAX_UNSIGNED_VALUE=I;var b=o(0,-2147483648,!1);e.MIN_VALUE=b;var E=e.prototype;return E.toInt=function(){return this.unsigned?this.low>>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},E.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(b)){var t=a(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var i=a(s(e,6),this.unsigned),o=this,u="";;){var A=o.div(i),c=(o.sub(A.mul(i)).toInt()>>>0).toString(e);if((o=A).isZero())return c+u;for(;c.length<6;)c="0"+c;u=""+c+u}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(b)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},E.isZero=function(){return 0===this.high&&0===this.low},E.isNegative=function(){return!this.unsigned&&this.high<0},E.isPositive=function(){return this.unsigned||this.high>=0},E.isOdd=function(){return 1===(1&this.low)},E.isEven=function(){return 0===(1&this.low)},E.equals=function(e){return t(e)||(e=A(e)),(this.unsigned===e.unsigned||this.high>>>31!==1||e.high>>>31!==1)&&this.high===e.high&&this.low===e.low},E.eq=E.equals,E.notEquals=function(e){return!this.eq(e)},E.neq=E.notEquals,E.lessThan=function(e){return this.comp(e)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(e){return this.comp(e)<=0},E.lte=E.lessThanOrEqual,E.greaterThan=function(e){return this.comp(e)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(e){return this.comp(e)>=0},E.gte=E.greaterThanOrEqual,E.compare=function(e){if(t(e)||(e=A(e)),this.eq(e))return 0;var n=this.isNegative(),r=e.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(b)?b:this.not().add(p)},E.neg=E.negate,E.add=function(e){t(e)||(e=A(e));var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,a=65535&this.low,s=e.high>>>16,u=65535&e.high,c=e.low>>>16,l=0,f=0,h=0,g=0;return h+=(g+=a+(65535&e.low))>>>16,f+=(h+=i+c)>>>16,l+=(f+=r+u)>>>16,l+=n+s,o((h&=65535)<<16|(g&=65535),(l&=65535)<<16|(f&=65535),this.unsigned)},E.subtract=function(e){return t(e)||(e=A(e)),this.add(e.neg())},E.sub=E.subtract,E.multiply=function(e){if(this.isZero())return g;if(t(e)||(e=A(e)),e.isZero())return g;if(this.eq(b))return e.isOdd()?b:g;if(e.eq(b))return this.isOdd()?b:g;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(h)&&e.lt(h))return a(this.toNumber()*e.toNumber(),this.unsigned);var n=this.high>>>16,r=65535&this.high,i=this.low>>>16,s=65535&this.low,u=e.high>>>16,c=65535&e.high,l=e.low>>>16,f=65535&e.low,d=0,p=0,v=0,y=0;return v+=(y+=s*f)>>>16,p+=(v+=i*f)>>>16,v&=65535,p+=(v+=s*l)>>>16,d+=(p+=r*f)>>>16,p&=65535,d+=(p+=i*l)>>>16,p&=65535,d+=(p+=s*c)>>>16,d+=n*f+r*l+i*c+s*u,o((v&=65535)<<16|(y&=65535),(d&=65535)<<16|(p&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(e){if(t(e)||(e=A(e)),e.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?d:g;var n,r,i;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return d;if(e.gt(this.shru(1)))return v;i=d}else{if(this.eq(b))return e.eq(p)||e.eq(y)?b:e.eq(b)?p:(n=this.shr(1).div(e).shl(1)).eq(g)?e.isNegative()?p:y:(r=this.sub(e.mul(n)),i=n.add(r.div(e)));if(e.eq(b))return this.unsigned?d:g;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();i=g}for(r=this;r.gte(e);){n=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var o=Math.ceil(Math.log(n)/Math.LN2),u=o<=48?1:s(2,o-48),c=a(n),l=c.mul(e);l.isNegative()||l.gt(r);)l=(c=a(n-=u,this.unsigned)).mul(e);c.isZero()&&(c=p),i=i.add(c),r=r.sub(l)}return i},E.div=E.divide,E.modulo=function(e){return t(e)||(e=A(e)),this.sub(this.div(e).mul(e))},E.mod=E.modulo,E.not=function(){return o(~this.low,~this.high,this.unsigned)},E.and=function(e){return t(e)||(e=A(e)),o(this.low&e.low,this.high&e.high,this.unsigned)},E.or=function(e){return t(e)||(e=A(e)),o(this.low|e.low,this.high|e.high,this.unsigned)},E.xor=function(e){return t(e)||(e=A(e)),o(this.low^e.low,this.high^e.high,this.unsigned)},E.shiftLeft=function(e){return t(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?o(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):o(0,this.low<<e-32,this.unsigned)},E.shl=E.shiftLeft,E.shiftRight=function(e){return t(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?o(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):o(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(e){if(t(e)&&(e=e.toInt()),0===(e&=63))return this;var n=this.high;return e<32?o(this.low>>>e|n<<32-e,n>>>e,this.unsigned):o(32===e?n:n>>>e-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?o(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:o(this.low,this.high,!0)},E.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},E.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24&255,255&e,e>>>8&255,e>>>16&255,e>>>24&255]},E.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t]},e})?r.apply(t,i):r)||(e.exports=a)},function(e,t,n){"use strict";function r(e,t,n){var r=t[0],i=t[1],a=n[3]*r+n[7]*i||1;return e[0]=(n[0]*r+n[4]*i)/a,e[1]=(n[1]*r+n[5]*i)/a,e}function i(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[3]*r+n[7]*i+n[11]*a||1;return e[0]=(n[0]*r+n[4]*i+n[8]*a)/o,e[1]=(n[1]*r+n[5]*i+n[9]*a)/o,e[2]=(n[2]*r+n[6]*i+n[10]*a)/o,e}function a(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2],e}n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return a}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return h}));var r=n(101),i=n(39);function a(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,s=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s=Math.PI/180,u=new Float32Array(16),A=new Float32Array(12);function c(e,t,n){var r=t[0]*s,i=t[1]*s,a=t[2]*s,o=Math.sin(a),u=Math.sin(r),A=Math.sin(i),c=Math.cos(a),l=Math.cos(r),f=Math.cos(i),h=n[0],g=n[1],d=n[2];e[0]=h*f*l,e[1]=h*A*l,e[2]=h*-u,e[3]=g*(-A*c+f*u*o),e[4]=g*(f*c+A*u*o),e[5]=g*l*o,e[6]=d*(A*o+f*u*c),e[7]=d*(-f*o+A*u*c),e[8]=d*l*c}function l(e){return e[0]=e[0],e[1]=e[1],e[2]=e[2],e[3]=e[4],e[4]=e[5],e[5]=e[6],e[6]=e[8],e[7]=e[9],e[8]=e[10],e[9]=e[12],e[10]=e[13],e[11]=e[14],e.subarray(0,12)}var f={size:12,accessor:["getOrientation","getScale","getTranslation","getTransformMatrix"],shaderAttributes:{instanceModelMatrix__LOCATION_0:{size:3,elementOffset:0},instanceModelMatrix__LOCATION_1:{size:3,elementOffset:3},instanceModelMatrix__LOCATION_2:{size:3,elementOffset:6},instanceTranslation:{size:3,elementOffset:9}},update:function(e,t){var n=t.startRow,i=t.endRow,o=this.props,s=o.data,f=o.getOrientation,h=o.getScale,g=o.getTranslation,d=o.getTransformMatrix,p=Array.isArray(d),v=p&&16===d.length,y=Array.isArray(h),m=Array.isArray(f),I=Array.isArray(g),b=v||!p&&Boolean(d(s[0]));e.constant=b?v:m&&y&&I;var E=e.value;if(e.constant){var C;if(b)u.set(d),C=l(u);else c(C=A,f,h),C.set(g,9);e.value=new Float32Array(C)}else{var B,w=n*e.size,Q=Object(r.a)(s,n,i),k=Q.iterable,_=Q.objectInfo,x=a(k);try{for(x.s();!(B=x.n()).done;){var S=B.value;_.index++;var O=void 0;if(b)u.set(v?d:d(S,_)),O=l(u);else c(O=A,m?f:f(S,_),y?h:h(S,_)),O.set(I?g:g(S,_),9);E[w++]=O[0],E[w++]=O[1],E[w++]=O[2],E[w++]=O[3],E[w++]=O[4],E[w++]=O[5],E[w++]=O[6],E[w++]=O[7],E[w++]=O[8],E[w++]=O[9],E[w++]=O[10],E[w++]=O[11]}}catch(D){x.e(D)}finally{x.f()}}}};function h(e,t){return t===i.a.CARTESIAN||t===i.a.METER_OFFSETS||t===i.a.DEFAULT&&!e.isGeospatial}},function(e,t,n){"use strict";function r(e,t,n){var r=t[0],i=t[1],a=n[3]*r+n[7]*i||1;return e[0]=(n[0]*r+n[4]*i)/a,e[1]=(n[1]*r+n[5]*i)/a,e}function i(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[3]*r+n[7]*i+n[11]*a||1;return e[0]=(n[0]*r+n[4]*i+n[8]*a)/o,e[1]=(n[1]*r+n[5]*i+n[9]*a)/o,e[2]=(n[2]*r+n[6]*i+n[10]*a)/o,e}function a(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2],e}n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return a}))},function(e,t,n){"use strict";var r=n(3),i=n(2);n(25),n(65),n(23);Math.PI,Math.PI;var a={};function o(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}a.EPSILON=1e-12,a.debug=!1,a.precision=4,a.printTypes=!1,a.printDegrees=!1,a.printRowMajor=!0;!function(){function e(t){Object(r.a)(this,e),this.points=t,this.isClosed=function e(t,n,r){var i=a.EPSILON;r&&(a.EPSILON=r);try{if(t===n)return!0;if(o(t)&&o(n)){if(t.length!==n.length)return!1;for(var s=0;s<t.length;++s)if(!e(t[s],n[s]))return!1;return!0}return t&&t.equals?t.equals(n):n&&n.equals?n.equals(t):!(!Number.isFinite(t)||!Number.isFinite(n))&&Math.abs(t-n)<=a.EPSILON*Math.max(1,Math.abs(t),Math.abs(n))}finally{a.EPSILON=i}}(this.points[this.points.length-1],this.points[0]),Object.freeze(this)}Object(i.a)(e,[{key:"getSignedArea",value:function(){var e=0;return this.forEachSegment((function(t,n){e+=(t[0]+n[0])*(t[1]-n[1])})),e/2}},{key:"getArea",value:function(){return Math.abs(this.getSignedArea())}},{key:"getWindingDirection",value:function(){return Math.sign(this.getSignedArea())}},{key:"forEachSegment",value:function(e){for(var t=this.points.length,n=0;n<t-1;n++)e(this.points[n],this.points[n+1],n,n+1);this.isClosed||e(this.points[t-1],this.points[0],t-1,0)}}])}();function s(e,t){var n=t.length,r=e.length;if(r>0){for(var i=!0,a=0;a<n;a++)if(e[r-n+a]!==t[a]){i=!1;break}if(i)return!1}for(var o=0;o<n;o++)e[r+o]=t[o];return!0}function u(e,t){for(var n=t.length,r=0;r<n;r++)e[r]=t[r]}function A(e,t,n,r){for(var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=r+t*n,o=0;o<n;o++)i[o]=e[a+o];return i}function c(e,t,n,r){var i,a,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];if(8&n)i=(r[3]-e[1])/(t[1]-e[1]),a=3;else if(4&n)i=(r[1]-e[1])/(t[1]-e[1]),a=1;else if(2&n)i=(r[2]-e[0])/(t[0]-e[0]),a=2;else{if(!(1&n))return null;i=(r[0]-e[0])/(t[0]-e[0]),a=0}for(var s=0;s<e.length;s++)o[s]=(1&a)===s?r[a]:i*t[s]+(1-i)*e[s];return o}function l(e,t){var n=0;return e[0]<t[0]?n|=1:e[0]>t[2]&&(n|=2),e[1]<t[1]?n|=4:e[1]>t[3]&&(n|=8),n}function f(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,a=void 0===i?2:i,o=r.broken,f=void 0!==o&&o,h=r.gridResolution,g=void 0===h?10:h,v=r.gridOffset,y=void 0===v?[0,0]:v,m=r.startIndex,I=void 0===m?0:m,b=r.endIndex,E=void 0===b?e.length:b,C=(E-I)/a,B=[],w=[B],Q=A(e,0,a,I),k=d(Q,g,y,[]),_=[];s(B,Q);for(var x=1;x<C;x++){for(n=l(t=A(e,x,a,I,t),k);n;){c(Q,t,n,k,_);var S=l(_,k);S&&(c(Q,_,S,k,_),n=S),s(B,_),u(Q,_),p(k,g,n),f&&B.length>a&&(B=[],w.push(B),s(B,Q)),n=l(t,k)}s(B,t),u(Q,t)}return f?w:w[0]}function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e.length)return[];for(var r=n.size,i=void 0===r?2:r,a=n.gridResolution,o=void 0===a?10:a,s=n.gridOffset,u=void 0===s?[0,0]:s,A=n.edgeTypes,c=void 0!==A&&A,f=[],h=[{pos:e,types:c&&new Array(e.length/i).fill(1),holes:t||[]}],p=[[],[]],y=[];h.length;){var m=h.shift(),I=m.pos,b=m.types,E=m.holes;v(I,i,E[0]||I.length,p),y=d(p[0],o,u,y);var C=l(p[1],y);if(C){var B=g(I,b,i,0,E[0]||I.length,y,C),w={pos:B[0].pos,types:B[0].types,holes:[]},Q={pos:B[1].pos,types:B[1].types,holes:[]};h.push(w,Q);for(var k=0;k<E.length;k++)(B=g(I,b,i,E[k],E[k+1]||I.length,y,C))[0]&&(w.holes.push(w.pos.length),w.pos=w.pos.concat(B[0].pos),c&&(w.types=w.types.concat(B[0].types))),B[1]&&(Q.holes.push(Q.pos.length),Q.pos=Q.pos.concat(B[1].pos),c&&(Q.types=Q.types.concat(B[1].types)))}else{var _={positions:I};c&&(_.edgeTypes=b),E.length&&(_.holeIndices=E),f.push(_)}}return f}function g(e,t,n,r,i,a,o){for(var l,f,h,g=(i-r)/n,d=[],p=[],v=[],y=[],m=[],I=A(e,g-1,n,r),b=Math.sign(8&o?I[1]-a[3]:I[0]-a[2]),E=t&&t[g-1],C=0,B=0,w=0;w<g;w++)l=A(e,w,n,r,l),f=Math.sign(8&o?l[1]-a[3]:l[0]-a[2]),h=t&&t[r/n+w],f&&b&&b!==f&&(c(I,l,o,a,m),s(d,m)&&v.push(E),s(p,m)&&y.push(E)),f<=0?(s(d,l)&&v.push(h),C-=f):v.length&&(v[v.length-1]=0),f>=0?(s(p,l)&&y.push(h),B+=f):y.length&&(y[y.length-1]=0),u(I,l),b=f,E=h;return[C?{pos:d,types:t&&v}:null,B?{pos:p,types:t&&y}:null]}function d(e,t,n,r){var i=Math.floor((e[0]-n[0])/t)*t+n[0],a=Math.floor((e[1]-n[1])/t)*t+n[1];return r[0]=i,r[1]=a,r[2]=i+t,r[3]=a+t,r}function p(e,t,n){8&n?(e[1]+=t,e[3]+=t):4&n?(e[1]-=t,e[3]-=t):2&n?(e[0]+=t,e[2]+=t):1&n&&(e[0]-=t,e[2]-=t)}function v(e,t,n,r){for(var i=1/0,a=-1/0,o=1/0,s=-1/0,u=0;u<n;u+=t){var A=e[u],c=e[u+1];i=A<i?A:i,a=A>a?A:a,o=c<o?c:o,s=c>s?c:s}return r[0][0]=i,r[0][1]=o,r[1][0]=a,r[1][1]=s,r}function y(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.size,r=void 0===n?2:n,i=t.startIndex,a=void 0===i?0:i,o=t.endIndex,s=void 0===o?e.length:o,u=t.normalize,A=void 0===u||u,c=e.slice(a,s);B(c,r,0,s-a);var l=f(c,{size:r,broken:!0,gridResolution:360,gridOffset:[-180,-180]});if(A){var h,g=y(l);try{for(g.s();!(h=g.n()).done;){var d=h.value;w(d,r)}}catch(p){g.e(p)}finally{g.f()}}return l}function b(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.size,i=void 0===r?2:r,a=n.normalize,o=void 0===a||a,s=n.edgeTypes,u=void 0!==s&&s;t=t||[];for(var A=[],c=[],l=0,f=0,g=0;g<=t.length;g++){for(var d=t[g]||e.length,p=f,v=E(e,i,l,d),m=v;m<d;m++)A[f++]=e[m];for(var I=l;I<v;I++)A[f++]=e[I];B(A,i,p,f),C(A,i,p,f,n.maxLatitude),l=d,c[g]=f}c.pop();var b=h(A,c,{size:i,gridResolution:360,gridOffset:[-180,-180],edgeTypes:u});if(o){var Q,k=y(b);try{for(k.s();!(Q=k.n()).done;){var _=Q.value;w(_.positions,i)}}catch(x){k.e(x)}finally{k.f()}}return b}function E(e,t,n,r){for(var i=-1,a=-1,o=n+1;o<r;o+=t){var s=Math.abs(e[o]);s>i&&(i=s,a=o-1)}return a}function C(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:85.051129,a=e[n],o=e[r-t];if(Math.abs(a-o)>180){var u=A(e,0,t,n);u[0]+=360*Math.round((o-a)/360),s(e,u),u[1]=Math.sign(u[1])*i,s(e,u),u[0]=a,s(e,u)}}function B(e,t,n,r){for(var i,a=e[0],o=n;o<r;o+=t){var s=(i=e[o])-a;(s>180||s<-180)&&(i-=360*Math.round(s/360)),e[o]=a=i}}function w(e,t){for(var n,r=e.length/t,i=0;i<r&&((n=e[i*t])+180)%360===0;i++);var a=360*-Math.round(n/360);if(0!==a)for(var o=0;o<r;o++)e[o*t]+=a}n.d(t,"a",(function(){return h})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return I})),n.d(t,"b",(function(){return b}))},function(e,t,n){"use strict";var r,i,a=n(1),o=n(43),s=function(e){return Object(o.h)(e)?void 0:0},u=(r={},Object(a.a)(r,3074,(function(e){return Object(o.h)(e)?void 0:36064})),Object(a.a)(r,35723,(function(e){return Object(o.h)(e)?void 0:4352})),Object(a.a)(r,35977,s),Object(a.a)(r,32937,s),Object(a.a)(r,36795,(function(e,t){var n=Object(o.h)(e)?e.getExtension("EXT_disjoint_timer_query_webgl2"):e.getExtension("EXT_disjoint_timer_query");return n&&n.GPU_DISJOINT_EXT?t(n.GPU_DISJOINT_EXT):0})),Object(a.a)(r,37445,(function(e,t){var n=e.getExtension("WEBGL_debug_renderer_info");return t(n&&n.UNMASKED_VENDOR_WEBGL||7936)})),Object(a.a)(r,37446,(function(e,t){var n=e.getExtension("WEBGL_debug_renderer_info");return t(n&&n.UNMASKED_RENDERER_WEBGL||7937)})),Object(a.a)(r,34047,(function(e,t){var n=e.luma.extensions.EXT_texture_filter_anisotropic;return n?t(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1})),Object(a.a)(r,32883,s),Object(a.a)(r,35071,s),Object(a.a)(r,37447,s),Object(a.a)(r,36063,(function(e,t){if(!Object(o.h)(e)){var n=e.getExtension("WEBGL_draw_buffers");return n?t(n.MAX_COLOR_ATTACHMENTS_WEBGL):0}})),Object(a.a)(r,35379,s),Object(a.a)(r,35374,s),Object(a.a)(r,35377,s),Object(a.a)(r,34852,(function(e){if(!Object(o.h)(e)){var t=e.getExtension("WEBGL_draw_buffers");return t?t.MAX_DRAW_BUFFERS_WEBGL:0}})),Object(a.a)(r,36203,(function(e){return e.getExtension("OES_element_index")?2147483647:65535})),Object(a.a)(r,33001,(function(e){return e.getExtension("OES_element_index")?16777216:65535})),Object(a.a)(r,33e3,(function(e){return 16777216})),Object(a.a)(r,37157,s),Object(a.a)(r,35373,s),Object(a.a)(r,35657,s),Object(a.a)(r,36183,s),Object(a.a)(r,37137,s),Object(a.a)(r,34045,s),Object(a.a)(r,35978,s),Object(a.a)(r,35979,s),Object(a.a)(r,35968,s),Object(a.a)(r,35376,s),Object(a.a)(r,35375,s),Object(a.a)(r,35659,s),Object(a.a)(r,37154,s),Object(a.a)(r,35371,s),Object(a.a)(r,35658,s),Object(a.a)(r,35076,s),Object(a.a)(r,35077,s),Object(a.a)(r,35380,s),r);n.d(t,"b",(function(){return A})),n.d(t,"a",(function(){return c}));var A=(i={},Object(a.a)(i,"OES_vertex_array_object",{meta:{suffix:"OES"},createVertexArray:function(){Object(o.a)(!1,"VertexArray requires WebGL2 or OES_vertex_array_object extension")},deleteVertexArray:function(){},bindVertexArray:function(){},isVertexArray:function(){return!1}}),Object(a.a)(i,"ANGLE_instanced_arrays",{meta:{suffix:"ANGLE"},vertexAttribDivisor:function(e,t){Object(o.a)(0===t,"WebGL instanced rendering not supported")},drawElementsInstanced:function(){},drawArraysInstanced:function(){}}),Object(a.a)(i,"WEBGL_draw_buffers",{meta:{suffix:"WEBGL"},drawBuffers:function(){Object(o.a)(!1)}}),Object(a.a)(i,"EXT_disjoint_timer_query",{meta:{suffix:"EXT"},createQuery:function(){Object(o.a)(!1)},deleteQuery:function(){Object(o.a)(!1)},beginQuery:function(){Object(o.a)(!1)},endQuery:function(){},getQuery:function(e,t){return this.getQueryObject(e,t)},getQueryParameter:function(e,t){return this.getQueryObject(e,t)},getQueryObject:function(){}}),i),c={readBuffer:function(e,t,n){Object(o.h)(e)&&t(n)},getVertexAttrib:function(e,t,n,r){var i,a=function(e,t){return{webgl2:Object(o.h)(e),ext:e.getExtension(t)}}(e,"ANGLE_instanced_arrays"),s=a.webgl2,u=a.ext;switch(r){case 35069:i=!!s&&void 0;break;case 35070:i=s||u?void 0:0}return void 0!==i?i:t(n,r)},getProgramParameter:function(e,t,n,r){if(!Object(o.h)(e))switch(r){case 35967:return 35981;case 35971:case 35382:return 0}return t(n,r)},getInternalformatParameter:function(e,t,n,r,i){if(!Object(o.h)(e))switch(i){case 32937:return new Int32Array([0])}return e.getInternalformatParameter(n,r,i)},getTexParameter:function(e,t,n,r){switch(r){case 34046:var i=e.luma.extensions.EXT_texture_filter_anisotropic;r=i&&i.TEXTURE_MAX_ANISOTROPY_EXT||34046}return t(n,r)},getParameter:function(e,t,n){var r=u[n],i="function"===typeof r?r(e,t,n):r;return void 0!==i?i:t(n)},hint:function(e,t,n,r){return t(n,r)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1226);Object.defineProperty(t,"Alpha",{enumerable:!0,get:function(){return l(r).default}});var i=n(885);Object.defineProperty(t,"Checkboard",{enumerable:!0,get:function(){return l(i).default}});var a=n(1229);Object.defineProperty(t,"EditableInput",{enumerable:!0,get:function(){return l(a).default}});var o=n(1230);Object.defineProperty(t,"Hue",{enumerable:!0,get:function(){return l(o).default}});var s=n(1232);Object.defineProperty(t,"Raised",{enumerable:!0,get:function(){return l(s).default}});var u=n(1237);Object.defineProperty(t,"Saturation",{enumerable:!0,get:function(){return l(u).default}});var A=n(1047);Object.defineProperty(t,"ColorWrap",{enumerable:!0,get:function(){return l(A).default}});var c=n(1242);function l(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"Swatch",{enumerable:!0,get:function(){return l(c).default}})},function(e,t,n){"use strict";t.a=function(e,t){}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(0),i=n(75),a=!0,o=!1,s=null,u={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function A(e){e.metaKey||e.altKey||e.ctrlKey||(a=!0)}function c(){a=!1}function l(){"hidden"===this.visibilityState&&o&&(a=!0)}function f(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return a||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!u[t]||e.readOnly)||("TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable)}(t)}function h(){o=!0,window.clearTimeout(s),s=window.setTimeout((function(){o=!1}),100)}function g(){return{isFocusVisible:f,onBlurVisible:h,ref:r.useCallback((function(e){var t,n=i.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",A,!0),t.addEventListener("mousedown",c,!0),t.addEventListener("pointerdown",c,!0),t.addEventListener("touchstart",c,!0),t.addEventListener("visibilitychange",l,!0))}),[])}}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){var r=n(316),i=n(593),a=n(594),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?i(e):a(e)}},function(e,t,n){"use strict";var r=n(24),i=n(0),a=n.n(i),o=n(396),s=n(383),u=n.n(s),A=n(894),c=n(862),l=n(18),f=n(33),h=(n(28),n(37)),g=n(73),d=n(48),p=n(237),v=n(68),y=n(799),m=i.forwardRef((function(e,t){var n=e.classes,r=e.className,a=e.color,o=void 0===a?"primary":a,s=e.component,u=void 0===s?"a":s,A=e.onBlur,c=e.onFocus,d=e.TypographyClasses,m=e.underline,I=void 0===m?"hover":m,b=e.variant,E=void 0===b?"inherit":b,C=Object(f.a)(e,["classes","className","color","component","onBlur","onFocus","TypographyClasses","underline","variant"]),B=Object(p.a)(),w=B.isFocusVisible,Q=B.onBlurVisible,k=B.ref,_=i.useState(!1),x=_[0],S=_[1],O=Object(v.a)(t,k);return i.createElement(y.a,Object(l.a)({className:Object(h.a)(n.root,n["underline".concat(Object(g.a)(I))],r,x&&n.focusVisible,"button"===u&&n.button),classes:d,color:o,component:u,onBlur:function(e){x&&(Q(),S(!1)),A&&A(e)},onFocus:function(e){w(e)&&S(!0),c&&c(e)},ref:O,variant:E},C))})),I=Object(d.a)({root:{},underlineNone:{textDecoration:"none"},underlineHover:{textDecoration:"none","&:hover":{textDecoration:"underline"}},underlineAlways:{textDecoration:"underline"},button:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none","&::-moz-focus-inner":{borderStyle:"none"},"&$focusVisible":{outline:"auto"}},focusVisible:{}},{name:"MuiLink"})(m),b=n(324),E=n.n(b),C=n(323),B=n.n(C),w=n(382),Q=n.n(w),k=n(384),_=n.n(k),x=n(177);function S(e){var t,n,r;return t=e,n=0,r=1,e=(Math.min(Math.max(n,t),r)-n)/(r-n),e=(e-=1)*e*e+1}var O=i.forwardRef((function(e,t){var n,r=e.classes,a=e.className,o=e.color,s=void 0===o?"primary":o,u=e.disableShrink,A=void 0!==u&&u,c=e.size,d=void 0===c?40:c,p=e.style,v=e.thickness,y=void 0===v?3.6:v,m=e.value,I=void 0===m?0:m,b=e.variant,E=void 0===b?"indeterminate":b,C=Object(f.a)(e,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),B={},w={},Q={};if("determinate"===E||"static"===E){var k=2*Math.PI*((44-y)/2);B.strokeDasharray=k.toFixed(3),Q["aria-valuenow"]=Math.round(I),"static"===E?(B.strokeDashoffset="".concat(((100-I)/100*k).toFixed(3),"px"),w.transform="rotate(-90deg)"):(B.strokeDashoffset="".concat((n=(100-I)/100,n*n*k).toFixed(3),"px"),w.transform="rotate(".concat((270*S(I/70)).toFixed(3),"deg)"))}return i.createElement("div",Object(l.a)({className:Object(h.a)(r.root,a,"inherit"!==s&&r["color".concat(Object(g.a)(s))],{indeterminate:r.indeterminate,static:r.static}[E]),style:Object(l.a)({width:d,height:d},w,{},p),ref:t,role:"progressbar"},Q,C),i.createElement("svg",{className:r.svg,viewBox:"".concat(22," ").concat(22," ").concat(44," ").concat(44)},i.createElement("circle",{className:Object(h.a)(r.circle,A&&r.circleDisableShrink,{indeterminate:r.circleIndeterminate,static:r.circleStatic}[E]),style:B,cx:44,cy:44,r:(44-y)/2,fill:"none",strokeWidth:y})))})),D=Object(d.a)((function(e){return{root:{display:"inline-block"},static:{transition:e.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:e.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},"@keyframes circular-rotate":{"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}}),{name:"MuiCircularProgress",flip:!1})(O);function R(){return a.a.createElement("div",{className:"loading-indicator-backdrop"},a.a.createElement("div",{className:"loading-indicator-container"},a.a.createElement(D,null)))}var j=n(242);n.d(t,"a",(function(){return U}));var M=Object(o.a)((function(e){return{iconButton:{border:"none",marginLeft:0,background:"none",color:e.palette.primaryForeground,paddingLeft:"0.25em",paddingRight:"0.25em",borderRadius:"2px","&:hover":{backgroundColor:e.palette.primaryBackgroundLight},"&:first-child":{marginLeft:"0.75em"},"&:last-child":{marginRight:"0.25em"},"& svg":{width:"0.7em",height:"0.7em",verticalAlign:"middle"}},downloadLink:{color:e.palette.primaryForeground}}}));function N(e){var t=e.open;return a.a.createElement(a.a.Fragment,null,a.a.createElement(Q.a,null),t?a.a.createElement(B.a,null):a.a.createElement(E.a,null))}function F(e){var t=e.options,n=Object(i.useReducer)((function(e){return!e}),!1),o=Object(r.a)(n,2),s=o[0],u=o[1],A=M();return a.a.createElement(j.b,{open:s,toggle:u,buttonIcon:a.a.createElement(N,{open:s}),buttonClassName:A.iconButton,placement:"bottom-end"},t)}function T(e){var t=e.open;return a.a.createElement(a.a.Fragment,null,a.a.createElement(u.a,null),t?a.a.createElement(B.a,null):a.a.createElement(E.a,null))}function L(e){var t=e.urls,n=Object(i.useReducer)((function(e){return!e}),!1),o=Object(r.a)(n,2),s=o[0],u=o[1],c=M();return a.a.createElement(j.b,{open:s,toggle:u,buttonIcon:a.a.createElement(T,{open:s}),buttonClassName:c.iconButton,placement:"bottom-end"},t.map((function(e){var t=e.url,n=e.name;return a.a.createElement(A.a,{dense:!0,key:t},a.a.createElement(I,{underline:"none",href:t,target:"_blank",rel:"noopener",className:c.downloadLink},"Download ",n))})))}function P(e){var t=e.removeGridComponent,n=M();return a.a.createElement(c.a,{onClick:t,size:"small",className:n.iconButton,title:"close"},a.a.createElement(_.a,null))}function U(e){var t=e.title,n=e.info,r=e.children,i=e.isScroll,o=e.isSpatial,s=e.removeGridComponent,u=e.urls,A=e.isReady,c=e.options,l=i?x.c:o?x.a:x.d;return a.a.createElement(a.a.Fragment,null,a.a.createElement("div",{className:"title d-flex justify-content-between align-items-baseline"},a.a.createElement("div",{className:"justify-content-between d-flex align-items-end"},a.a.createElement("span",null,t)),a.a.createElement("span",{className:"details pl-2 align-items-end"},a.a.createElement("span",{className:"d-flex justify-content-between"},n,c&&a.a.createElement(F,{options:c}),u&&u.length>0&&a.a.createElement(L,{urls:u}),a.a.createElement(P,{removeGridComponent:s})))),a.a.createElement("div",{className:l},!A&&a.a.createElement(R,null),r))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toDeckColor=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[255,0,0,255];if(!Array.isArray(e))return t;return[255*e[0],255*e[1],255*e[2],255*e[3]]},t.recursivelyTraverseNestedArrays=function e(t,n,r){if(!Array.isArray(t[0]))return!0;for(var i=0;i<t.length;i++)if(e(t[i],[].concat(c(n),[i]),r)){r(t,n);break}return!1},t.generatePointsParallelToLinePoints=function(e,t,n){var s={type:"LineString",coordinates:[e,t]},u=(0,o.point)(n),A=(0,a.default)(u,s),c=(0,i.default)(e,t),l=(n[0]-e[0])*(t[1]-e[1])-(n[1]-e[1])*(t[0]-e[0])<0?c-90:c-270,f=(0,r.default)(t,A,l),h=(0,r.default)(e,A,l);return[f.geometry.coordinates,h.geometry.coordinates]},t.distance2d=h,t.mix=g,t.nearestPointOnProjectedLine=function(e,t,n){var r=new s.default(n),i=e.geometry.coordinates.map((function(e){var t=A(e,3),n=t[0],i=t[1],a=t[2],o=void 0===a?0:a;return r.project([n,i,o])})),a=A(r.project(t.geometry.coordinates),2),o=a[0],u=a[1],c=1/0,l={};i.forEach((function(e,t){var n=A(e,2),r=n[0],a=n[1];if(0!==t){var s=A(i[t-1],2),f=s[0],h=s[1],g=h-a,d=r-f,p=f*a-r*h,v=g*g+d*d,y=Math.abs(g*o+d*u+p)/Math.sqrt(v);y<c&&(c=y,l={index:t,x0:(d*(d*o-g*u)-g*p)/v,y0:(g*(-d*o+g*u)-d*p)/v})}}));var f=l,d=f.index,p=f.x0,v=f.y0,y=A(i[d-1],3),m=y[0],I=y[1],b=y[2],E=void 0===b?0:b,C=A(i[d],3),B=C[0],w=C[1],Q=C[2],k=void 0===Q?0:Q,_=h(m,I,B,w),x=h(m,I,p,v),S=g(E,k,x/_);return{type:"Feature",geometry:{type:"Point",coordinates:r.unproject([p,v,S])},properties:{dist:c,index:d-1}}},t.getPickedEditHandle=function(e){var t=d(e);return t.length?t[0]:null},t.getPickedSnapSourceEditHandle=function(e){return d(e).find((function(e){return"snap-source"===e.properties.editHandleType}))},t.getNonGuidePicks=function(e){return e&&e.filter((function(e){return!e.isGuide}))},t.getPickedExistingEditHandle=function(e){return d(e).find((function(e){var t=e.properties;return t.featureIndex>=0&&"existing"===t.editHandleType}))},t.getPickedIntermediateEditHandle=function(e){return d(e).find((function(e){var t=e.properties;return t.featureIndex>=0&&"intermediate"===t.editHandleType}))},t.getPickedEditHandles=d,t.getEditHandlesForGeometry=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"existing",r=[];switch(e.type){case"Point":r=[{type:"Feature",properties:{guideType:"editHandle",editHandleType:n,positionIndexes:[],featureIndex:t},geometry:{type:"Point",coordinates:e.coordinates}}];break;case"MultiPoint":case"LineString":r=r.concat(p(e.coordinates,[],t,n));break;case"Polygon":case"MultiLineString":for(var i=0;i<e.coordinates.length;i++)r=r.concat(p(e.coordinates[i],[i],t,n)),"Polygon"===e.type&&(r=r.slice(0,-1));break;case"MultiPolygon":for(var a=0;a<e.coordinates.length;a++)for(var o=0;o<e.coordinates[a].length;o++)r=(r=r.concat(p(e.coordinates[a][o],[a,o],t,n))).slice(0,-1);break;default:throw Error("Unhandled geometry type: ".concat(e.type))}return r};var r=u(n(444)),i=u(n(272)),a=u(n(822)),o=n(72),s=u(n(833));function u(e){return e&&e.__esModule?e:{default:e}}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"===typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t,n,r){var i=e-n,a=t-r;return Math.sqrt(i*i+a*a)}function g(e,t,n){return t*n+e*(1-n)}function d(e){return e&&e.filter((function(e){return e.isGuide&&"editHandle"===e.object.properties.guideType})).map((function(e){return e.object}))||[]}function p(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"existing",i=[],a=0;a<e.length;a++){var o=e[a];i.push({type:"Feature",properties:{guideType:"editHandle",positionIndexes:[].concat(c(t),[a]),featureIndex:n,editHandleType:r},geometry:{type:"Point",coordinates:o}})}return i}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),a=n(798),o=n(18),s=n(33),u=(n(28),n(381)),A=n(765),c=n(861),l=n(256),f=n(115),h=n(68);function g(e){return"function"===typeof e?e():e}var d="undefined"!==typeof window?r.useLayoutEffect:r.useEffect,p={},v=r.forwardRef((function(e,t){var n=e.anchorEl,i=e.children,a=e.container,v=e.disablePortal,y=void 0!==v&&v,m=e.keepMounted,I=void 0!==m&&m,b=e.modifiers,E=e.open,C=e.placement,B=void 0===C?"bottom":C,w=e.popperOptions,Q=void 0===w?p:w,k=e.popperRef,_=e.transition,x=void 0!==_&&_,S=Object(s.a)(e,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition"]),O=r.useRef(null),D=Object(h.a)(O,t),R=r.useRef(null),j=Object(h.a)(R,k),M=r.useRef(j);d((function(){M.current=j}),[j]),r.useImperativeHandle(k,(function(){return R.current}),[]);var N=r.useState(!0),F=N[0],T=N[1],L=function(e,t){if("ltr"===(t&&t.direction||"ltr"))return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(B,Object(A.a)()),P=r.useState(L),U=P[0],G=P[1];r.useEffect((function(){R.current&&R.current.update()}));var q=r.useCallback((function(){if(O.current&&n&&E){R.current&&(R.current.destroy(),M.current(null));var e=function(e){G(e.placement)},t=(g(n),new u.a(g(n),O.current,Object(o.a)({placement:L},Q,{modifiers:Object(o.a)({},y?{}:{preventOverflow:{boundariesElement:"window"}},{},b,{},Q.modifiers),onCreate:Object(l.a)(e,Q.onCreate),onUpdate:Object(l.a)(e,Q.onUpdate)})));M.current(t)}}),[n,y,b,E,L,Q]),H=r.useCallback((function(e){Object(f.a)(D,e),q()}),[D,q]),Y=function(){R.current&&(R.current.destroy(),M.current(null))};if(r.useEffect((function(){q()}),[q]),r.useEffect((function(){return function(){Y()}}),[]),r.useEffect((function(){E||x||Y()}),[E,x]),!I&&!E&&(!x||F))return null;var J={placement:U};return x&&(J.TransitionProps={in:E,onEnter:function(){T(!1)},onExited:function(){T(!0),Y()}}),r.createElement(c.a,{disablePortal:y,container:a},r.createElement("div",Object(o.a)({ref:H,role:"tooltip"},S,{style:Object(o.a)({position:"fixed",top:0,left:0},S.style)}),"function"===typeof i?i(J):i))})),y=n(862),m=n(895),I=n(75),b=n(107),E=n(92);function C(e){return e.substring(2).toLowerCase()}var B=r.forwardRef((function(e,t){var n=e.children,i=e.mouseEvent,a=void 0===i?"onClick":i,o=e.touchEvent,s=void 0===o?"onTouchEnd":o,u=e.onClickAway,A=r.useRef(!1),c=r.useRef(null),l=r.useRef(!1);r.useEffect((function(){return l.current=!0,function(){l.current=!1}}),[]);var g=Object(h.a)(c,t),d=r.useCallback((function(e){Object(f.a)(g,I.findDOMNode(e))}),[g]),p=Object(h.a)(n.ref,d),v=Object(E.a)((function(e){if(l.current)if(A.current)A.current=!1;else if(c.current){var t=Object(b.a)(c.current);t.documentElement&&t.documentElement.contains(e.target)&&!c.current.contains(e.target)&&u(e)}})),y=r.useCallback((function(){A.current=!0}),[]);return r.useEffect((function(){if(!1!==s){var e=C(s),t=Object(b.a)(c.current);return t.addEventListener(e,v),t.addEventListener("touchmove",y),function(){t.removeEventListener(e,v),t.removeEventListener("touchmove",y)}}}),[v,y,s]),r.useEffect((function(){if(!1!==a){var e=C(a),t=Object(b.a)(c.current);return t.addEventListener(e,v),function(){t.removeEventListener(e,v)}}}),[v,a]),r.createElement(r.Fragment,null,r.cloneElement(n,{ref:p}))})),w=n(204);function Q(e){var t=Object(w.b)(),n=e.anchorEl,r=e.open,a=e.placement,o=void 0===a?"bottom-start":a,s=e.children;return i.a.createElement(v,{className:t.popper,open:r,anchorEl:n.current,placement:o},s)}function k(e){var t=e.children,n=Object(w.b)();return i.a.createElement(a.a,{className:n.paper,elevation:4},t)}function _(e){var t=e.children,n=Object(w.b)();return i.a.createElement("span",{className:n.span},t)}function x(e){var t=e.buttonIcon,n=e.open,a=e.toggle,o=e.children,s=e.placement,u=e.buttonClassName,A=Object(r.useRef)(null),c=Object(w.b)();return i.a.createElement(i.a.Fragment,null,i.a.createElement(y.a,{onClick:a,size:"small",ref:A,className:u},t),i.a.createElement(Q,{className:c.popper,open:n,anchorEl:A,placement:s},i.a.createElement(k,null,i.a.createElement(B,{onClickAway:a},i.a.createElement(m.a,null,o)))))}n.d(t,"a",(function(){return _})),n.d(t,"b",(function(){return x}))},,function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"===typeof e)return e.slice(0,t);if(ArrayBuffer.isView(e))return i(e.buffer,e.byteOffset,t);if(e instanceof ArrayBuffer){var n=0;return i(e,n,t)}return""}function i(e,t,n){if(e.byteLength<=t+n)return"";for(var r=new DataView(e),i="",a=0;a<n;a++)i+=String.fromCharCode(r.getUint8(t+a));return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e){function r(){var t;if("undefined"!==typeof window&&window.performance)t=window.performance.now();else if("undefined"!==typeof e&&e.hrtime){var n=e.hrtime();t=1e3*n[0]+n[1]/1e6}else t=Date.now();return t}n.d(t,"a",(function(){return r}))}).call(this,n(86))},function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return u}));var r=n(25),i=n(80).b.COMPONENT;function a(e){var t=f(e);for(var n in t){var r=t[n],i=r.validate;if(i&&!i(e[n],r))throw new Error("Invalid prop ".concat(n,": ").concat(e[n]))}}function o(e,t){var n=u({newProps:e,oldProps:t,propTypes:f(e),ignoreProps:{data:null,updateTriggers:null,extensions:null,transitions:null}}),r=function(e,t){if(null===t)return"oldProps is null, initial diff";var n=null,r=e.dataComparator,i=e._dataDiff;r?r(e.data,t.data)||(n="Data comparator detected a change"):e.data!==t.data&&(n="A new data container was supplied");n&&i&&(n=i(e.data,t.data)||n);return n}(e,t),i=!1;return r||(i=function(e,t){if(null===t)return"oldProps is null, initial diff";if("all"in e.updateTriggers){if(l(e,t,"all"))return{all:!0}}var n={},r=!1;for(var i in e.updateTriggers){if("all"!==i)l(e,t,i)&&(n[i]=!0,r=n)}return r}(e,t)),{dataChanged:r,propsChanged:n,updateTriggersChanged:i,extensionsChanged:c(e,t),transitionsChanged:s(e,t)}}function s(e,t){if(!e.transitions)return null;var n={},r=f(e);for(var i in e.transitions){var a=r[i],o=a&&a.type;("number"===o||"color"===o||"array"===o)&&A(e[i],t[i],a)&&(n[i]=!0)}return n}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.newProps,n=e.oldProps,i=e.ignoreProps,a=void 0===i?{}:i,o=e.propTypes,s=void 0===o?{}:o,u=e.triggerName,c=void 0===u?"props":u;if(n===t)return null;if("object"!==Object(r.a)(t)||null===t)return"".concat(c," changed shallowly");if("object"!==Object(r.a)(n)||null===n)return"".concat(c," changed shallowly");for(var l=0,f=Object.keys(t);l<f.length;l++){var h=f[l];if(!(h in a)){if(!(h in n))return"".concat(c,".").concat(h," added");var g=A(t[h],n[h],s[h]);if(g)return"".concat(c,".").concat(h," ").concat(g)}}for(var d=0,p=Object.keys(n);d<p.length;d++){var v=p[d];if(!(v in a)){if(!(v in t))return"".concat(c,".").concat(v," dropped");if(!Object.hasOwnProperty.call(t,v)){var y=A(t[v],n[v],s[v]);if(y)return"".concat(c,".").concat(v," ").concat(y)}}}return null}function A(e,t,n){var r=n&&n.equal;return r&&!r(e,t,n)?"changed deeply":r||!(r=e&&t&&e.equals)||r.call(e,t)?r||t===e?null:"changed shallowly":"changed deeply"}function c(e,t){if(null===t)return"oldProps is null, initial diff";var n=t.extensions,r=e.extensions;if(r===n)return!1;if(r.length!==n.length)return!0;for(var i=0;i<r.length;i++)if(!r[i].equals(n[i]))return!0;return!1}function l(e,t,n){var r=e.updateTriggers[n];r=void 0===r||null===r?{}:r;var i=t.updateTriggers[n];return u({oldProps:i=void 0===i||null===i?{}:i,newProps:r,triggerName:n})}function f(e){var t=e[i],n=t&&t.constructor;return n?n._propTypes:{}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(3),i=n(2),a=n(7),o=n(4),s=n(6),u=n(168),A=n(36),c=n(143),l=n(31),f=n(40),h=[0,0,0,1],g=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return Object(r.a)(this,t),e=Object(a.a)(this,Object(o.a)(t).call(this,-0,-0,-0,-0)),Array.isArray(n)&&1===arguments.length?e.copy(n):e.set(n,i,s,u),e}return Object(s.a)(t,e),Object(i.a)(t,[{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this.check()}},{key:"set",value:function(e,t,n,r){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this.check()}},{key:"fromMatrix3",value:function(e){return l.e(this,e),this.check()}},{key:"identity",value:function(){return l.f(this),this.check()}},{key:"fromAxisRotation",value:function(e,t){return l.p(this,e,t),this.check()}},{key:"setAxisAngle",value:function(e,t){return this.fromAxisRotation(e,t)}},{key:"len",value:function(){return l.h(this)}},{key:"lengthSquared",value:function(e){return l.r(this)}},{key:"dot",value:function(e,t){if(void 0!==t)throw new Error("Quaternion.dot only takes one argument");return l.d(this,e)}},{key:"rotationTo",value:function(e,t){return l.n(this,e,t),this.check()}},{key:"add",value:function(e,t){if(void 0!==t)throw new Error("Quaternion.add only takes one argument");return l.a(this,this,e),this.check()}},{key:"calculateW",value:function(){return l.b(this,this),this.check()}},{key:"conjugate",value:function(){return l.c(this,this),this.check()}},{key:"invert",value:function(){return l.g(this,this),this.check()}},{key:"lerp",value:function(e,t,n){return l.i(this,e,t,n),this.check()}},{key:"multiplyRight",value:function(e,t){return Object(c.a)(!t),l.j(this,this,e),this.check()}},{key:"multiplyLeft",value:function(e,t){return Object(c.a)(!t),l.j(this,e,this),this.check()}},{key:"normalize",value:function(){var e=this.len(),t=e>0?1/e:0;return this[0]=this[0]*t,this[1]=this[1]*t,this[2]=this[2]*t,this[3]=this[3]*t,0===e&&(this[3]=1),this.check()}},{key:"rotateX",value:function(e){return l.k(this,this,e),this.check()}},{key:"rotateY",value:function(e){return l.l(this,this,e),this.check()}},{key:"rotateZ",value:function(e){return l.m(this,this,e),this.check()}},{key:"scale",value:function(e){return l.o(this,this,e),this.check()}},{key:"slerp",value:function(e,t,n){switch(arguments.length){case 1:var r=arguments[0],i=r.start;e=void 0===i?h:i,t=r.target,n=r.ratio;break;case 2:var a=Array.prototype.slice.call(arguments);t=a[0],n=a[1],e=this}return l.q(this,e,t,n),this.check()}},{key:"transformVector4",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return f.o(t,e,this),Object(A.b)(t,4)}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"setFromAxisAngle",value:function(e,t){return this.setAxisAngle(e,t)}},{key:"premultiply",value:function(e,t){return this.multiplyLeft(e,t)}},{key:"multiply",value:function(e,t){return this.multiplyRight(e,t)}},{key:"ELEMENTS",get:function(){return 4}},{key:"x",get:function(){return this[0]},set:function(e){return this[0]=Object(A.a)(e)}},{key:"y",get:function(){return this[1]},set:function(e){return this[1]=Object(A.a)(e)}},{key:"z",get:function(){return this[2]},set:function(e){return this[2]=Object(A.a)(e)}},{key:"w",get:function(){return this[3]},set:function(e){return this[3]=Object(A.a)(e)}}]),t}(u.a)},function(e,t,n){"use strict";function r(e,t){var n=e.deserialize.bind(e),r=e.serialize.bind(e);return{deserialize:function(e){return t.deserialize(e,n)},serialize:function(e){return t.serialize(e,r)}}}n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}));var i=function(e){return Object.assign(Error(e.message),{name:e.name,stack:e.stack})},a=function(e){return{__error_marker:"$$error",message:e.message,name:e.name,stack:e.stack}},o={deserialize:function(e){return(t=e)&&"object"===typeof t&&"__error_marker"in t&&"$$error"===t.__error_marker?i(e):e;var t},serialize:function(e){return e instanceof Error?a(e):e}}},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(6),o=n(7),s=n(4),u=n(474),A=n(179),c=n(286),l=n(183),f=n(167),h=n(35),g=n(1),d=n(29),p=n(166),v=n(191),y=n(140),m=n(21);function I(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 b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){Object(g.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var C=function(e){Object(a.a)(n,e);var t=E(n);function n(e,i){var a,o,s;return Object(r.a)(this,n),(s=t.call(this,e,i)).shadowMap=new A.a(e,{width:1,height:1,parameters:(a={},Object(g.a)(a,10241,9729),Object(g.a)(a,10240,9729),Object(g.a)(a,10242,33071),Object(g.a)(a,10243,33071),a)}),s.depthBuffer=new v.a(e,{format:33189,width:1,height:1}),s.fbo=new y.a(e,{id:"shadowmap",width:1,height:1,attachments:(o={},Object(g.a)(o,36064,s.shadowMap),Object(g.a)(o,36096,s.depthBuffer),o)}),s}return Object(i.a)(n,[{key:"render",value:function(e){var t=this,r=this.fbo;Object(m.l)(this.gl,{depthRange:[0,1],depthTest:!0,blend:!1,clearColor:[1,1,1,1]},(function(){var i=e.viewports[0],a=Object(m.c)(t.gl),o=i.width*a,u=i.height*a;o===r.width&&u===r.height||r.resize({width:o,height:u}),Object(d.a)(Object(s.a)(n.prototype),"render",t).call(t,b(b({},e),{},{target:r,pass:"shadow"}))}))}},{key:"shouldDrawLayer",value:function(e){return!1!==e.props.shadowEnabled}},{key:"getModuleParameters",value:function(){return{drawToShadowMap:!0}}},{key:"delete",value:function(){this.fbo&&(this.fbo.delete(),this.fbo=null),this.shadowMap&&(this.shadowMap.delete(),this.shadowMap=null),this.depthBuffer&&(this.depthBuffer.delete(),this.depthBuffer=null)}}]),n}(p.a),B=n(221);function w(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return Q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Q(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}n.d(t,"a",(function(){return O}));var _={color:[255,255,255],intensity:1},x=[{color:[255,255,255],intensity:1,direction:[-1,3,-1]},{color:[255,255,255],intensity:.9,direction:[1,-8,-2.5]}],S=[0,0,0,200/255],O=function(e){Object(a.a)(n,e);var t=k(n);function n(e){var i;for(var a in Object(r.a)(this,n),(i=t.call(this,e)).ambientLight=null,i.directionalLights=[],i.pointLights=[],i.shadowColor=S,i.shadowPasses=[],i.shadowMaps=[],i.dummyShadowMap=null,i.shadow=!1,i.programManager=null,e){var o=e[a];switch(o.type){case"ambient":i.ambientLight=o;break;case"directional":i.directionalLights.push(o);break;case"point":i.pointLights.push(o)}}return i._applyDefaultLights(),i.shadow=i.directionalLights.some((function(e){return e.shadow})),i}return Object(i.a)(n,[{key:"preRender",value:function(e,t){var n=t.layers,r=t.layerFilter,i=t.viewports,a=t.onViewportActive,o=t.views;if(this.shadow){this.shadowMatrices=this._createLightMatrix(),0===this.shadowPasses.length&&this._createShadowPasses(e),this.programManager||(this.programManager=u.a.getDefaultProgramManager(e),B.a&&this.programManager.addDefaultModule(B.a)),this.dummyShadowMap||(this.dummyShadowMap=new A.a(e,{width:1,height:1}));for(var s=0;s<this.shadowPasses.length;s++){this.shadowPasses[s].render({layers:n,layerFilter:r,viewports:i,onViewportActive:a,views:o,moduleParameters:{shadowLightId:s,dummyShadowMap:this.dummyShadowMap,shadowMatrices:this.shadowMatrices}})}}}},{key:"getModuleParameters",value:function(e){var t=this.shadow?{shadowMaps:this.shadowMaps,dummyShadowMap:this.dummyShadowMap,shadowColor:this.shadowColor,shadowMatrices:this.shadowMatrices}:{};return t.lightSources={ambientLight:this.ambientLight,directionalLights:this.directionalLights.map((function(t){return t.getProjectedLight({layer:e})})),pointLights:this.pointLights.map((function(t){return t.getProjectedLight({layer:e})}))},t}},{key:"cleanup",value:function(){var e,t=w(this.shadowPasses);try{for(t.s();!(e=t.n()).done;){e.value.delete()}}catch(n){t.e(n)}finally{t.f()}this.shadowPasses.length=0,this.shadowMaps.length=0,this.dummyShadowMap&&(this.dummyShadowMap.delete(),this.dummyShadowMap=null),this.shadow&&this.programManager&&(this.programManager.removeDefaultModule(B.a),this.programManager=null)}},{key:"_createLightMatrix",value:function(){var e,t=[],n=w(this.directionalLights);try{for(n.s();!(e=n.n()).done;){var r=e.value,i=(new h.a).lookAt({eye:new h.c(r.direction).negate()});t.push(i)}}catch(a){n.e(a)}finally{n.f()}return t}},{key:"_createShadowPasses",value:function(e){for(var t=0;t<this.directionalLights.length;t++){var n=new C(e);this.shadowPasses[t]=n,this.shadowMaps[t]=n.shadowMap}}},{key:"_applyDefaultLights",value:function(){var e=this.ambientLight,t=this.pointLights,n=this.directionalLights;e||0!==t.length||0!==n.length||(this.ambientLight=new c.a(_),this.directionalLights.push(new l.a(x[0]),new l.a(x[1])))}}]),n}(f.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return f}));var r=n(16),i=n(39),a=n(222),o=n(213),s=n(40),u=n(17),A=n(66);function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.projectPosition(e);if(n&&t instanceof o.a){var a=Object(r.a)(e,3),s=a[0],u=a[1],A=a[2],c=void 0===A?0:A,l=t.getDistanceScales([s,u]);i[2]=c*l.unitsPerMeter[2]}return i}function l(e,t){var n=t.viewport,a=t.modelMatrix,o=t.coordinateSystem,u=t.coordinateOrigin,l=t.offsetMode,f=Object(r.a)(e,3),h=f[0],g=f[1],d=f[2],p=void 0===d?0:d;if(a){var v=s.n([],[h,g,p,1],a),y=Object(r.a)(v,3);h=y[0],g=y[1],p=y[2]}switch(o){case i.a.LNGLAT:return c([h,g,p],n,l);case i.a.LNGLAT_OFFSETS:return c([h+u[0],g+u[1],p+(u[2]||0)],n,l);case i.a.METER_OFFSETS:return c(Object(A.a)(u,[h,g,p]),n,l);case i.a.CARTESIAN:default:return n.isGeospatial?[h+u[0],g+u[1],p+u[2]]:n.projectPosition([h,g,p])}}function f(e,t){var n=function(e){var t=Object.assign({},e),n=e.coordinateSystem,r=e.viewport,a=e.coordinateOrigin,o=e.fromCoordinateSystem,s=e.fromCoordinateOrigin;return n===i.a.DEFAULT&&(n=r.isGeospatial?i.a.LNGLAT:i.a.CARTESIAN),void 0===o&&(t.fromCoordinateSystem=n),void 0===s&&(t.fromCoordinateOrigin=a),t.coordinateSystem=n,t}(t),r=n.viewport,o=n.coordinateSystem,s=n.coordinateOrigin,A=n.modelMatrix,c=n.fromCoordinateSystem,f=n.fromCoordinateOrigin,h=Object(a.a)(r,o,s),g=h.geospatialOrigin,d=h.shaderCoordinateOrigin,p=h.offsetMode,v=l(e,{viewport:r,modelMatrix:A,coordinateSystem:c,coordinateOrigin:f,offsetMode:p});if(p){var y=r.projectPosition(g||d);u.o(v,v,y)}return v}},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var i=n(25),a={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof e&&e,document:"undefined"!==typeof document&&document},o=a.global||a.self||a.window,s="object"!==("undefined"===typeof r?"undefined":Object(i.a)(r))||"[object process]"!==String(r)||r.browser,u="undefined"!==typeof r&&r.version&&r.version.match(/v([0-9]*)/);u&&parseFloat(u[1])}).call(this,n(70),n(86))},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l}));var r=n(466),i=n.n(r);function a(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,s=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t,n,r){for(var i=0;i<t;i++)if(e[n+i]!==e[r-t+i])return!1;return!0}function u(e,t,n,r){for(var i=t,a=n.length,o=0;o<a;o++)for(var s=0;s<r;s++)e[i++]=n[o][s]||0;if(!function(e){var t=e[0],n=e[e.length-1];return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}(n))for(var u=0;u<r;u++)e[i++]=n[0][u]||0;return i}function A(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5?arguments[5]:void 0,o=(a=a||n.length)-i;if(o<=0)return t;for(var u=t,A=0;A<o;A++)e[u++]=n[i+A];if(!s(n,r,i,a))for(var c=0;c<r;c++)e[u++]=n[i+c];return u}function c(e,t){!function(e){if(e=e&&e.positions||e,!Array.isArray(e)&&!ArrayBuffer.isView(e))throw new Error("invalid polygon")}(e);var n=[],r=[];if(e.positions){var i=e,o=i.positions,s=i.holeIndices;if(s){for(var c=0,l=0;l<=s.length;l++)c=A(n,c,o,t,s[l-1],s[l]),r.push(c);return r.pop(),{positions:n,holeIndices:r}}e=o}if(Number.isFinite(e[0]))return A(n,0,e,t),n;if(!function(e){return e.length>=1&&e[0].length>=2&&Number.isFinite(e[0][0])}(e)){var f,h=0,g=a(e);try{for(g.s();!(f=g.n()).done;){h=u(n,h,f.value,t),r.push(h)}}catch(d){g.e(d)}finally{g.f()}return r.pop(),{positions:n,holeIndices:r}}return u(n,0,e,t),n}function l(e,t,n){var r=null;e.holeIndices&&(r=e.holeIndices.map((function(e){return e/t})));var a=e.positions||e;if(n){var o=a.length;a=a.slice();for(var s=[],u=0;u<o;u+=t){s[0]=a[u],s[1]=a[u+1];var A=n(s);a[u]=A[0],a[u+1]=A[1]}}return i()(a,r,t)}},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(245),o=function(){function e(t,n){Object(r.a)(this,e),this.name=t,this.type=n,this.sampleSize=1,this.reset()}return Object(i.a)(e,[{key:"setSampleSize",value:function(e){return this.sampleSize=e,this}},{key:"incrementCount",value:function(){return this.addCount(1),this}},{key:"decrementCount",value:function(){return this.subtractCount(1),this}},{key:"addCount",value:function(e){return this._count+=e,this._samples++,this._checkSampling(),this}},{key:"subtractCount",value:function(e){return this._count-=e,this._samples++,this._checkSampling(),this}},{key:"addTime",value:function(e){return this._time+=e,this.lastTiming=e,this._samples++,this._checkSampling(),this}},{key:"timeStart",value:function(){return this._startTime=Object(a.a)(),this._timerPending=!0,this}},{key:"timeEnd",value:function(){return this._timerPending?(this.addTime(Object(a.a)()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}},{key:"getSampleAverageCount",value:function(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}},{key:"getSampleAverageTime",value:function(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}},{key:"getSampleHz",value:function(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}},{key:"getAverageCount",value:function(){return this.samples>0?this.count/this.samples:0}},{key:"getAverageTime",value:function(){return this.samples>0?this.time/this.samples:0}},{key:"getHz",value:function(){return this.time>0?this.samples/(this.time/1e3):0}},{key:"reset",value:function(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}},{key:"_checkSampling",value:function(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}}]),e}(),s=function(){function e(t){var n=t.id,i=t.stats;Object(r.a)(this,e),this.id=n,this.stats={},this._initializeStats(i),Object.seal(this)}return Object(i.a)(e,[{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"count";return this._getOrCreate({name:e,type:t})}},{key:"reset",value:function(){for(var e in this.stats)this.stats[e].reset();return this}},{key:"forEach",value:function(e){for(var t in this.stats)e(this.stats[t])}},{key:"getTable",value:function(){var e={};return this.forEach((function(t){e[t.name]={time:t.time||0,count:t.count||0,average:t.getAverageTime()||0,hz:t.getHz()||0}})),e}},{key:"_initializeStats",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.forEach((function(t){return e._getOrCreate(t)}))}},{key:"_getOrCreate",value:function(e){if(!e||!e.name)return null;var t=e.name,n=e.type;return this.stats[t]||(this.stats[t]=e instanceof o?e:new o(t,n)),this.stats[t]}},{key:"size",get:function(){return Object.keys(this.stats).length}}]),e}();n.d(t,"a",(function(){return s}))},function(e,t,n){"use strict";var r="#if (defined(SHADER_TYPE_FRAGMENT) && defined(LIGHTING_FRAGMENT)) || (defined(SHADER_TYPE_VERTEX) && defined(LIGHTING_VERTEX))\n\nstruct AmbientLight {\n vec3 color;\n};\n\nstruct PointLight {\n vec3 color;\n vec3 position;\n vec3 attenuation;\n};\n\nstruct DirectionalLight {\n  vec3 color;\n  vec3 direction;\n};\n\nuniform AmbientLight lighting_uAmbientLight;\nuniform PointLight lighting_uPointLight[MAX_LIGHTS];\nuniform DirectionalLight lighting_uDirectionalLight[MAX_LIGHTS];\nuniform int lighting_uPointLightCount;\nuniform int lighting_uDirectionalLightCount;\n\nuniform bool lighting_uEnabled;\n\nfloat getPointLightAttenuation(PointLight pointLight, float distance) {\n  return pointLight.attenuation.x\n       + pointLight.attenuation.y * distance\n       + pointLight.attenuation.z * distance * distance;\n}\n\n#endif\n",i=(t.a={name:"lights",vs:r,fs:r,getUniforms:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;if("lightSources"in t){var n=t.lightSources||{},r=n.ambientLight,a=n.pointLights,s=n.directionalLights,u=r||a&&a.length>0||s&&s.length>0;return u?Object.assign({},o({ambientLight:r,pointLights:a,directionalLights:s}),{lighting_uEnabled:!0}):{lighting_uEnabled:!1}}if("lights"in t){var A={pointLights:[],directionalLights:[]},c=!0,l=!1,f=void 0;try{for(var h,g=(t.lights||[])[Symbol.iterator]();!(c=(h=g.next()).done);c=!0){var d=h.value;switch(d.type){case"ambient":A.ambientLight=d;break;case"directional":A.directionalLights.push(d);break;case"point":A.pointLights.push(d)}}}catch(p){l=!0,f=p}finally{try{c||null==g.return||g.return()}finally{if(l)throw f}}return e({lightSources:A})}return{}},defines:{MAX_LIGHTS:3}},{});function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.color,n=void 0===t?[0,0,0]:t,r=e.intensity,i=void 0===r?1:r;return n.map((function(e){return e*i/255}))}function o(e){var t=e.ambientLight,n=e.pointLights,r=void 0===n?[]:n,i=e.directionalLights,o=void 0===i?[]:i,s={};return s["lighting_uAmbientLight.color"]=t?a(t):[0,0,0],r.forEach((function(e,t){s["lighting_uPointLight[".concat(t,"].color")]=a(e),s["lighting_uPointLight[".concat(t,"].position")]=e.position,s["lighting_uPointLight[".concat(t,"].attenuation")]=e.attenuation||[1,0,0]})),s.lighting_uPointLightCount=r.length,o.forEach((function(e,t){s["lighting_uDirectionalLight[".concat(t,"].color")]=a(e),s["lighting_uDirectionalLight[".concat(t,"].direction")]=e.direction})),s.lighting_uDirectionalLightCount=o.length,s}},function(e,t,n){"use strict";var r=n(11),i=n(13),a=n(19),o=function(){return"function"===typeof Symbol},s=function(e){return o()&&Boolean(Symbol[e])},u=function(e){return s(e)?Symbol[e]:"@@"+e};s("asyncIterator")||(Symbol.asyncIterator=Symbol.asyncIterator||Symbol.for("Symbol.asyncIterator"));var A=u("iterator"),c=u("observable"),l=u("species");function f(e,t){var n=e[t];if(null!=n){if("function"!==typeof n)throw new TypeError(n+" is not a function");return n}}function h(e){var t=e.constructor;return void 0!==t&&null===(t=t[l])&&(t=void 0),void 0!==t?t:E}function g(e){g.log?g.log(e):setTimeout((function(){throw e}),0)}function d(e){Promise.resolve().then((function(){try{e()}catch(t){g(t)}}))}function p(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"===typeof t)t();else{var n=f(t,"unsubscribe");n&&n.call(t)}}catch(r){g(r)}}function v(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function y(e,t,n){e._state="running";var r=e._observer;try{var i=r?f(r,t):void 0;switch(t){case"next":i&&i.call(r,n);break;case"error":if(v(e),!i)throw n;i.call(r,n);break;case"complete":v(e),i&&i.call(r)}}catch(a){g(a)}"closed"===e._state?p(e):"running"===e._state&&(e._state="ready")}function m(e,t,n){if("closed"!==e._state)return"buffering"===e._state?(e._queue=e._queue||[],void e._queue.push({type:t,value:n})):"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void d((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";var n,r=Object(a.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(y(e,i.type,i.value),"closed"===e._state)break}}catch(o){r.e(o)}finally{r.f()}}}(e)}))):void y(e,t,n)}var I=function(){function e(t,n){Object(r.a)(this,e),this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";var i=new b(this);try{this._cleanup=n.call(void 0,i)}catch(a){i.error(a)}"initializing"===this._state&&(this._state="ready")}return Object(i.a)(e,[{key:"unsubscribe",value:function(){"closed"!==this._state&&(v(this),p(this))}},{key:"closed",get:function(){return"closed"===this._state}}]),e}(),b=function(){function e(t){Object(r.a)(this,e),this._subscription=t}return Object(i.a)(e,[{key:"next",value:function(e){m(this._subscription,"next",e)}},{key:"error",value:function(e){m(this._subscription,"error",e)}},{key:"complete",value:function(){m(this._subscription,"complete")}},{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),E=function(){function e(t){if(Object(r.a)(this,e),!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!==typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}return Object(i.a)(e,[{key:"subscribe",value:function(e,t,n){return"object"===typeof e&&null!==e||(e={next:e,error:t,complete:n}),new I(e,this._subscriber)}},{key:"pipe",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(var a=0,o=[e].concat(r);a<o.length;a++){var s=o[a];t=s(t)}return t}},{key:"tap",value:function(t,n,r){var i=this,a="object"!==typeof t||null===t?{next:t,error:n,complete:r}:t;return new e((function(e){return i.subscribe({next:function(t){a.next&&a.next(t),e.next(t)},error:function(t){a.error&&a.error(t),e.error(t)},complete:function(){a.complete&&a.complete(),e.complete()},start:function(e){a.start&&a.start(e)}})}))}},{key:"forEach",value:function(e){var t=this;return new Promise((function(n,r){if("function"===typeof e)var i=t.subscribe({next:function(t){try{e(t,a)}catch(n){r(n),i.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"));function a(){i.unsubscribe(),n()}}))}},{key:"map",value:function(e){var t=this;if("function"!==typeof e)throw new TypeError(e+" is not a function");return new(h(this))((function(n){return t.subscribe({next:function(t){var r=t;try{r=e(t)}catch(i){return n.error(i)}n.next(r)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))}},{key:"filter",value:function(e){var t=this;if("function"!==typeof e)throw new TypeError(e+" is not a function");return new(h(this))((function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(r){return n.error(r)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))}},{key:"reduce",value:function(e,t){var n=this;if("function"!==typeof e)throw new TypeError(e+" is not a function");var r=h(this),i=arguments.length>1,a=!1,o=t;return new r((function(t){return n.subscribe({next:function(n){var r=!a;if(a=!0,!r||i)try{o=e(o,n)}catch(s){return t.error(s)}else o=n},error:function(e){t.error(e)},complete:function(){if(!a&&!i)return t.error(new TypeError("Cannot reduce an empty sequence"));t.next(o),t.complete()}})}))}},{key:"concat",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=h(this);return new i((function(t){var r,a=0;return function e(o){r=o.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){a===n.length?(r=void 0,t.complete()):e(i.from(n[a++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}}))}},{key:"flatMap",value:function(e){var t=this;if("function"!==typeof e)throw new TypeError(e+" is not a function");var n=h(this);return new n((function(r){var i=[],a=t.subscribe({next:function(t){var a;if(e)try{a=e(t)}catch(u){return r.error(u)}else a=t;var s=n.from(a).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=i.indexOf(s);e>=0&&i.splice(e,1),o()}});i.push(s)},error:function(e){r.error(e)},complete:function(){o()}});function o(){a.closed&&0===i.length&&r.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),a.unsubscribe()}}))}},{key:c,value:function(){return this}}],[{key:"from",value:function(t){var n="function"===typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var r=f(t,c);if(r){var i=r.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return function(e){return e instanceof E}(i)&&i.constructor===n?i:new n((function(e){return i.subscribe(e)}))}if(s("iterator")){var o=f(t,A);if(o)return new n((function(e){d((function(){if(!e.closed){var n,r=Object(a.a)(o.call(t));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(e.next(i),e.closed)return}}catch(s){r.e(s)}finally{r.f()}e.complete()}}))}))}if(Array.isArray(t))return new n((function(e){d((function(){if(!e.closed){var n,r=Object(a.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(e.next(i),e.closed)return}}catch(o){r.e(o)}finally{r.f()}e.complete()}}))}));throw new TypeError(t+" is not observable")}},{key:"of",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i="function"===typeof this?this:e;return new i((function(e){d((function(){if(!e.closed){var t,r=Object(a.a)(n);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(e.next(i),e.closed)return}}catch(o){r.e(o)}finally{r.f()}e.complete()}}))}))}},{key:l,get:function(){return this}}]),e}();o()&&Object.defineProperty(E,Symbol("extensions"),{value:{symbol:c,hostReportError:g},configurable:!0});t.a=E},function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}}),(function(){}))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(3),i=n(2),a=n(21),o=n(253),s=n(61),u=new(function(){function e(){Object(r.a)(this,e),this.stats=new Map}return Object(i.a)(e,[{key:"get",value:function(e){return this.stats.has(e)||this.stats.set(e,new o.a({id:e})),this.stats.get(e)}}]),e}());if(s.global.luma&&"8.3.1"!==s.global.luma.VERSION)throw new Error("luma.gl - multiple VERSIONs detected: ".concat(s.global.luma.VERSION," vs ").concat("8.3.1"));s.global.luma||(Object(s.isBrowser)()&&a.h.log(1,"luma.gl ".concat("8.3.1"," - ").concat("set luma.log.level=1 (or higher) to trace rendering"))(),s.global.luma=s.global.luma||{VERSION:"8.3.1",version:"8.3.1",log:a.h,stats:u,globals:{modules:{},nodeIO:{}}});s.global.luma},function(e,t,n){var r;!function(i,a,o,s){"use strict";var u,A=["","webkit","Moz","MS","ms","o"],c=a.createElement("div"),l=Math.round,f=Math.abs,h=Date.now;function g(e,t,n){return setTimeout(b(e,n),t)}function d(e,t,n){return!!Array.isArray(e)&&(p(e,n[t],n),!0)}function p(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(void 0!==e.length)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function v(e,t,n){var r="DEPRECATED METHOD: "+t+"\n"+n+" AT \n";return function(){var t=new Error("get-stack-trace"),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=i.console&&(i.console.warn||i.console.log);return a&&a.call(i.console,r,n),e.apply(this,arguments)}}u="function"!==typeof Object.assign?function(e){if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(void 0!==r&&null!==r)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t}:Object.assign;var y=v((function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&void 0===e[r[i]])&&(e[r[i]]=t[r[i]]),i++;return e}),"extend","Use `assign`."),m=v((function(e,t){return y(e,t,!0)}),"merge","Use `assign`.");function I(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&u(r,n)}function b(e,t){return function(){return e.apply(t,arguments)}}function E(e,t){return"function"==typeof e?e.apply(t&&t[0]||void 0,t):e}function C(e,t){return void 0===e?t:e}function B(e,t,n){p(_(t),(function(t){e.addEventListener(t,n,!1)}))}function w(e,t,n){p(_(t),(function(t){e.removeEventListener(t,n,!1)}))}function Q(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function k(e,t){return e.indexOf(t)>-1}function _(e){return e.trim().split(/\s+/g)}function x(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}function S(e){return Array.prototype.slice.call(e,0)}function O(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];x(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort((function(e,n){return e[t]>n[t]})):r.sort()),r}function D(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<A.length;){if((r=(n=A[a])?n+i:t)in e)return r;a++}}var R=1;function j(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||i}var M="ontouchstart"in i,N=void 0!==D(i,"PointerEvent"),F=M&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),T=["x","y"],L=["clientX","clientY"];function P(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){E(e.options.enable,[e])&&n.handler(t)},this.init()}function U(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=1&t&&r-i===0,o=12&t&&r-i===0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||(n.firstInput=G(t));i>1&&!n.firstMultiple?n.firstMultiple=G(t):1===i&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,u=t.center=q(r);t.timeStamp=h(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=z(s,u),t.distance=J(s,u),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};1!==t.eventType&&4!==a.eventType||(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y});t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=Y(t.deltaX,t.deltaY);var A=H(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=A.x,t.overallVelocityY=A.y,t.overallVelocity=f(A.x)>f(A.y)?A.x:A.y,t.scale=o?(c=o.pointers,l=r,J(l[0],l[1],L)/J(c[0],c[1],L)):1,t.rotation=o?function(e,t){return z(t[1],t[0],L)+z(e[1],e[0],L)}(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,i,a,o=e.lastInterval||t,s=t.timeStamp-o.timeStamp;if(8!=t.eventType&&(s>25||void 0===o.velocity)){var u=t.deltaX-o.deltaX,A=t.deltaY-o.deltaY,c=H(s,u,A);r=c.x,i=c.y,n=f(c.x)>f(c.y)?c.x:c.y,a=Y(u,A),e.lastInterval=t}else n=o.velocity,r=o.velocityX,i=o.velocityY,a=o.direction;t.velocity=n,t.velocityX=r,t.velocityY=i,t.direction=a}(n,t);var c,l;var g=e.element;Q(t.srcEvent.target,g)&&(g=t.srcEvent.target);t.target=g}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function G(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:l(e.pointers[n].clientX),clientY:l(e.pointers[n].clientY)},n++;return{timeStamp:h(),pointers:t,center:q(t),deltaX:e.deltaX,deltaY:e.deltaY}}function q(e){var t=e.length;if(1===t)return{x:l(e[0].clientX),y:l(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:l(n/t),y:l(r/t)}}function H(e,t,n){return{x:t/e||0,y:n/e||0}}function Y(e,t){return e===t?1:f(e)>=f(t)?e<0?2:4:t<0?8:16}function J(e,t,n){n||(n=T);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function z(e,t,n){n||(n=T);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}P.prototype={handler:function(){},init:function(){this.evEl&&B(this.element,this.evEl,this.domHandler),this.evTarget&&B(this.target,this.evTarget,this.domHandler),this.evWin&&B(j(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(j(this.element),this.evWin,this.domHandler)}};var K={mousedown:1,mousemove:2,mouseup:4};function W(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,P.apply(this,arguments)}I(W,P,{handler:function(e){var t=K[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))}});var V={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},X={2:"touch",3:"pen",4:"mouse",5:"kinect"},Z="pointerdown",$="pointermove pointerup pointercancel";function ee(){this.evEl=Z,this.evWin=$,P.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(Z="MSPointerDown",$="MSPointerMove MSPointerUp MSPointerCancel"),I(ee,P,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=V[r],a=X[e.pointerType]||e.pointerType,o="touch"==a,s=x(t,e.pointerId,"pointerId");1&i&&(0===e.button||o)?s<0&&(t.push(e),s=t.length-1):12&i&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:a,srcEvent:e}),n&&t.splice(s,1))}});var te={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ne(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,P.apply(this,arguments)}function re(e,t){var n=S(e.touches),r=S(e.changedTouches);return 12&t&&(n=O(n.concat(r),"identifier",!0)),[n,r]}I(ne,P,{handler:function(e){var t=te[e.type];if(1===t&&(this.started=!0),this.started){var n=re.call(this,e,t);12&t&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:e})}}});var ie={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ae(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},P.apply(this,arguments)}function oe(e,t){var n=S(e.touches),r=this.targetIds;if(3&t&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,a,o=S(e.changedTouches),s=[],u=this.target;if(a=n.filter((function(e){return Q(e.target,u)})),1===t)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),12&t&&delete r[o[i].identifier],i++;return s.length?[O(a.concat(s),"identifier",!0),s]:void 0}I(ae,P,{handler:function(e){var t=ie[e.type],n=oe.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:e})}});function se(){P.apply(this,arguments);var e=b(this.handler,this);this.touch=new ae(this.manager,e),this.mouse=new W(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function ue(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,Ae.call(this,t)):12&e&&Ae.call(this,t)}function Ae(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout((function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)}),2500)}}function ce(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=25&&o<=25)return!0}return!1}I(se,P,{handler:function(e,t,n){var r="touch"==n.pointerType,i="mouse"==n.pointerType;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)ue.call(this,t,n);else if(i&&ce.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var le=D(c.style,"touchAction"),fe=void 0!==le,he=function(){if(!fe)return!1;var e={},t=i.CSS&&i.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){e[n]=!t||i.CSS.supports("touch-action",n)})),e}();function ge(e,t){this.manager=e,this.set(t)}ge.prototype={set:function(e){"compute"==e&&(e=this.compute()),fe&&this.manager.element.style&&he[e]&&(this.manager.element.style[le]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return p(this.manager.recognizers,(function(t){E(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(k(e,"none"))return"none";var t=k(e,"pan-x"),n=k(e,"pan-y");if(t&&n)return"none";if(t||n)return t?"pan-x":"pan-y";if(k(e,"manipulation"))return"manipulation";return"auto"}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=k(r,"none")&&!he.none,a=k(r,"pan-y")&&!he["pan-y"],o=k(r,"pan-x")&&!he["pan-x"];if(i){var s=1===e.pointers.length,u=e.distance<2,A=e.deltaTime<250;if(s&&u&&A)return}if(!o||!a)return i||a&&6&n||o&&24&n?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};function de(e){this.options=u({},this.defaults,e||{}),this.id=R++,this.manager=null,this.options.enable=C(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function pe(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function ve(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function ye(e,t){var n=t.manager;return n?n.get(e):e}function me(){de.apply(this,arguments)}function Ie(){me.apply(this,arguments),this.pX=null,this.pY=null}function be(){me.apply(this,arguments)}function Ee(){de.apply(this,arguments),this._timer=null,this._input=null}function Ce(){me.apply(this,arguments)}function Be(){me.apply(this,arguments)}function we(){de.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Qe(e,t){return(t=t||{}).recognizers=C(t.recognizers,Qe.defaults.preset),new ke(e,t)}de.prototype={defaults:{},set:function(e){return u(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(d(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=ye(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return d(e,"dropRecognizeWith",this)||(e=ye(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(d(e,"requireFailure",this))return this;var t=this.requireFail;return-1===x(t,e=ye(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(d(e,"dropRequireFailure",this))return this;e=ye(e,this);var t=x(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+pe(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+pe(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=32},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},recognize:function(e){var t=u({},e);if(!E(this.options.enable,[this,t]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},I(me,de,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,r=6&t,i=this.attrTest(e);return r&&(8&n||!i)?16|t:r||i?4&n?8|t:2&t?4|t:2:32}}),I(Ie,me,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push("pan-y"),24&e&&t.push("pan-x"),t},directionTest:function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(6&t.direction?(i=0===a?1:a<0?2:4,n=a!=this.pX,r=Math.abs(e.deltaX)):(i=0===o?1:o<0?8:16,n=o!=this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},attrTest:function(e){return me.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=ve(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),I(be,me,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),I(Ee,de,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime>t.time;if(this._input=e,!r||!n||12&e.eventType&&!i)this.reset();else if(1&e.eventType)this.reset(),this._timer=g((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=h(),this.manager.emit(this.options.event,this._input)))}}),I(Ce,me,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),I(Be,me,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Ie.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:24&n&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&f(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=ve(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),I(we,de,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(r&&i&&n){if(4!=e.eventType)return this.failTimeout();var a=!this.pTime||e.timeStamp-this.pTime<t.interval,o=!this.pCenter||J(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,o&&a?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=g((function(){this.state=8,this.tryEmit()}),t.interval,this),2):8}return 32},failTimeout:function(){return this._timer=g((function(){this.state=32}),this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Qe.VERSION="2.0.7",Qe.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[Ce,{enable:!1}],[be,{enable:!1},["rotate"]],[Be,{direction:6}],[Ie,{direction:6},["swipe"]],[we],[we,{event:"doubletap",taps:2},["tap"]],[Ee]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function ke(e,t){this.options=u({},Qe.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=function(e){var t=e.options.inputClass;return new(t||(N?ee:F?ae:M?se:W))(e,U)}(this),this.touchAction=new ge(this,this.options.touchAction),_e(this,!0),p(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function _e(e,t){var n,r=e.element;r.style&&(p(e.options.cssProps,(function(i,a){n=D(r.style,a),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}ke.prototype={set:function(e){return u(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var r=this.recognizers,i=t.curRecognizer;(!i||i&&8&i.state)&&(i=t.curRecognizer=null);for(var a=0;a<r.length;)n=r[a],2===t.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(e),!i&&14&n.state&&(i=t.curRecognizer=n),a++}},get:function(e){if(e instanceof de)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(d(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(d(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=x(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(void 0!==e&&void 0!==t){var n=this.handlers;return p(_(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(void 0!==e){var n=this.handlers;return p(_(e),(function(e){t?n[e]&&n[e].splice(x(n[e],t),1):delete n[e]})),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var n=a.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},destroy:function(){this.element&&_e(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},u(Qe,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:ke,Input:P,TouchAction:ge,TouchInput:ae,MouseInput:W,PointerEventInput:ee,TouchMouseInput:se,SingleTouchInput:ne,Recognizer:de,AttrRecognizer:me,Tap:we,Pan:Ie,Swipe:Be,Pinch:be,Rotate:Ce,Press:Ee,on:B,off:w,each:p,merge:m,extend:y,assign:u,inherit:I,bindFn:b,prefixed:D}),("undefined"!==typeof i?i:"undefined"!==typeof self?self:{}).Hammer=Qe,void 0===(r=function(){return Qe}.call(t,n,t,e))||(e.exports=r)}(window,document)},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.internalError="internalError",e.message="message",e.termination="termination"}(r||(r={}))},function(e,t){},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){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.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(1),i=n(33),a=n(529),o=n(18),s=["xs","sm","md","lg","xl"];function u(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,a=void 0===r?"px":r,u=e.step,A=void 0===u?5:u,c=Object(i.a)(e,["values","unit","step"]);function l(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(a,")")}function f(e,t){var r=s.indexOf(t);return r===s.length-1?l(e):"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(a,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[s[r+1]]?n[s[r+1]]:t)-A/100).concat(a,")")}return Object(o.a)({keys:s,values:n,up:l,down:function(e){var t=s.indexOf(e)+1,r=n[s[t]];return t===s.length?l("xs"):"@media (max-width:".concat(("number"===typeof r&&t>0?r:e)-A/100).concat(a,")")},between:f,only:function(e){return f(e,e)},width:function(e){return n[e]}},c)}function A(e,t,n){var i;return Object(o.a)({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(o.a)({paddingLeft:t(2),paddingRight:t(2)},n,Object(r.a)({},e.up("sm"),Object(o.a)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(i={minHeight:56},Object(r.a)(i,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Object(r.a)(i,e.up("sm"),{minHeight:64}),i)},n)}var c={black:"#000",white:"#fff"},l=n(149),f={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},h={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},g={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},d={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},p={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},v={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},y=n(87),m={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:c.white,default:l.a[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},I={text:{primary:c.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:l.a[800],default:"#303030"},action:{active:c.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function b(e,t,n,r){e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Object(y.d)(e.main,r):"dark"===t&&(e.dark=Object(y.a)(e.main,1.5*r)))}function E(e){var t=e.primary,n=void 0===t?{light:f[300],main:f[500],dark:f[700]}:t,r=e.secondary,s=void 0===r?{light:h.A200,main:h.A400,dark:h.A700}:r,u=e.error,A=void 0===u?{light:g[300],main:g[500],dark:g[700]}:u,E=e.warning,C=void 0===E?{light:d[300],main:d[500],dark:d[700]}:E,B=e.info,w=void 0===B?{light:p[300],main:p[500],dark:p[700]}:B,Q=e.success,k=void 0===Q?{light:v[300],main:v[500],dark:v[700]}:Q,_=e.type,x=void 0===_?"light":_,S=e.contrastThreshold,O=void 0===S?3:S,D=e.tonalOffset,R=void 0===D?.2:D,j=Object(i.a)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function M(e){if(!e)throw new TypeError("Material-UI: missing background argument in getContrastText(".concat(e,")."));return Object(y.c)(e,I.text.primary)>=O?I.text.primary:m.text.primary}function N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=Object(o.a)({},e)).main&&e[t]&&(e.main=e[t]),b(e,"light",n,R),b(e,"dark",r,R),e.contrastText||(e.contrastText=M(e.main)),e}var F={dark:I,light:m};return Object(a.a)(Object(o.a)({common:c,type:x,primary:N(n),secondary:N(s,"A400","A200","A700"),error:N(A),warning:N(C),info:N(w),success:N(k),grey:l.a,contrastThreshold:O,getContrastText:M,augmentColor:N,tonalOffset:R},F[x]),j)}function C(e){return Math.round(1e5*e)/1e5}var B={textTransform:"uppercase"};function w(e,t){var n="function"===typeof t?t(e):t,r=n.fontFamily,s=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,u=n.fontSize,A=void 0===u?14:u,c=n.fontWeightLight,l=void 0===c?300:c,f=n.fontWeightRegular,h=void 0===f?400:f,g=n.fontWeightMedium,d=void 0===g?500:g,p=n.fontWeightBold,v=void 0===p?700:p,y=n.htmlFontSize,m=void 0===y?16:y,I=n.allVariants,b=n.pxToRem,E=Object(i.a)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var w=A/14,Q=b||function(e){return"".concat(e/m*w,"rem")},k=function(e,t,n,r,i){return Object(o.a)({fontFamily:s,fontWeight:e,fontSize:Q(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===s?{letterSpacing:"".concat(C(r/t),"em")}:{},{},i,{},I)},_={h1:k(l,96,1.167,-1.5),h2:k(l,60,1.2,-.5),h3:k(h,48,1.167,0),h4:k(h,34,1.235,.25),h5:k(h,24,1.334,0),h6:k(d,20,1.6,.15),subtitle1:k(h,16,1.75,.15),subtitle2:k(d,14,1.57,.1),body1:k(h,16,1.5,.15),body2:k(h,14,1.43,.15),button:k(d,14,1.75,.4,B),caption:k(h,12,1.66,.4),overline:k(h,12,2.66,1,B)};return Object(a.a)(Object(o.a)({htmlFontSize:m,pxToRem:Q,round:C,fontFamily:s,fontSize:A,fontWeightLight:l,fontWeightRegular:h,fontWeightMedium:d,fontWeightBold:v},_),E,{clone:!1})}function Q(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var k=["none",Q(0,2,1,-1,0,1,1,0,0,1,3,0),Q(0,3,1,-2,0,2,2,0,0,1,5,0),Q(0,3,3,-2,0,3,4,0,0,1,8,0),Q(0,2,4,-1,0,4,5,0,0,1,10,0),Q(0,3,5,-1,0,5,8,0,0,1,14,0),Q(0,3,5,-1,0,6,10,0,0,1,18,0),Q(0,4,5,-2,0,7,10,1,0,2,16,1),Q(0,5,5,-3,0,8,10,1,0,3,14,2),Q(0,5,6,-3,0,9,12,1,0,3,16,2),Q(0,6,6,-3,0,10,14,1,0,4,18,3),Q(0,6,7,-4,0,11,15,1,0,4,20,3),Q(0,7,8,-4,0,12,17,2,0,5,22,4),Q(0,7,8,-4,0,13,19,2,0,5,24,4),Q(0,7,9,-4,0,14,21,2,0,5,26,4),Q(0,8,9,-5,0,15,22,2,0,6,28,5),Q(0,8,10,-5,0,16,24,2,0,6,30,5),Q(0,8,11,-5,0,17,26,2,0,6,32,5),Q(0,9,11,-5,0,18,28,2,0,7,34,6),Q(0,9,12,-6,0,19,29,2,0,7,36,6),Q(0,10,13,-6,0,20,31,3,0,8,38,7),Q(0,10,13,-6,0,21,33,3,0,8,40,7),Q(0,10,14,-6,0,22,35,3,0,8,42,7),Q(0,11,14,-7,0,23,36,3,0,9,44,8),Q(0,11,15,-7,0,24,38,3,0,9,46,8)],_={borderRadius:4},x=n(896);function S(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=Object(x.a)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){var n=t(e);return"number"===typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var O=n(355),D=n(356);t.a=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,o=void 0===r?{}:r,s=e.palette,c=void 0===s?{}:s,l=e.spacing,f=e.typography,h=void 0===f?{}:f,g=Object(i.a)(e,["breakpoints","mixins","palette","spacing","typography"]),d=E(c),p=u(n),v=S(l),y=Object(a.a)({breakpoints:p,direction:"ltr",mixins:A(p,v,o),overrides:{},palette:d,props:{},shadows:k,typography:w(d,h),spacing:v,shape:_,transitions:O.a,zIndex:D.a},g),m=arguments.length,I=new Array(m>1?m-1:0),b=1;b<m;b++)I[b-1]=arguments[b];return y=I.reduce((function(e,t){return Object(a.a)(e,t)}),y)}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t),function(e,r,i){n.d(t,"ArrayNotFoundError",(function(){return N})),n.d(t,"BoundsCheckError",(function(){return G})),n.d(t,"ContainsArrayError",(function(){return j})),n.d(t,"ContainsGroupError",(function(){return M})),n.d(t,"DTYPE_TYPEDARRAY_MAPPING",(function(){return Oe})),n.d(t,"Group",(function(){return hr})),n.d(t,"GroupNotFoundError",(function(){return F})),n.d(t,"HTTPError",(function(){return J})),n.d(t,"HTTPStore",(function(){return ir})),n.d(t,"InvalidSliceError",(function(){return q})),n.d(t,"KeyError",(function(){return P})),n.d(t,"MemoryStore",(function(){return rr})),n.d(t,"NegativeStepError",(function(){return H})),n.d(t,"NestedArray",(function(){return Le})),n.d(t,"ObjectStore",(function(){return pr})),n.d(t,"PathNotFoundError",(function(){return T})),n.d(t,"PermissionError",(function(){return L})),n.d(t,"TooManyIndicesError",(function(){return U})),n.d(t,"ValueError",(function(){return Y})),n.d(t,"ZarrArray",(function(){return nr})),n.d(t,"array",(function(){return cr})),n.d(t,"create",(function(){return ar})),n.d(t,"createProxy",(function(){return m})),n.d(t,"empty",(function(){return or})),n.d(t,"full",(function(){return Ar})),n.d(t,"getTypedArrayDtypeString",(function(){return De})),n.d(t,"group",(function(){return gr})),n.d(t,"normalizeStoreArgument",(function(){return fr})),n.d(t,"ones",(function(){return ur})),n.d(t,"openArray",(function(){return lr})),n.d(t,"openGroup",(function(){return dr})),n.d(t,"rangeTypedArray",(function(){return Pe})),n.d(t,"slice",(function(){return z})),n.d(t,"sliceIndices",(function(){return K})),n.d(t,"zeros",(function(){return sr}));var a=n(60),o=n(137),s=n(24),u=n(22),A=n(13),c=n(9),l=n.n(c),f=n(19),h=n(11),g=n(8),d=n(14),p=n(15),v=n(93),y=l.a.mark(ie);function m(e){return new Proxy(e,{set:function(e,t,n,r){return e.setItem(t,n)},get:function(e,t,n){return e.getItem(t)},deleteProperty:function(e,t){return e.deleteItem(t)},has:function(e,t){return e.containsItem(t)}})}function I(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(o,s)}u((r=r.apply(e,t||[])).next())}))}var b="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{};function E(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function C(e,t){return e(t={exports:{}},t.exports),t.exports}var B=C((function(e,t){var n=b&&b.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t,n){var r=e.call(this,n)||this;return r.path=t,r}return n(t,e),t}(Error);t.VError=r;var i=function(){function e(){}return e.prototype.fail=function(e,t,n){return!1},e.prototype.unionResolver=function(){return this},e.prototype.createContext=function(){return this},e.prototype.resolveUnion=function(e){},e}();t.NoopContext=i;var a=function(){function e(){this._propNames=[""],this._messages=[null],this._score=0}return e.prototype.fail=function(e,t,n){return this._propNames.push(e),this._messages.push(t),this._score+=n,!1},e.prototype.unionResolver=function(){return new o},e.prototype.resolveUnion=function(e){for(var t,n,r=null,i=0,a=e.contexts;i<a.length;i++){var o=a[i];(!r||o._score>=r._score)&&(r=o)}r&&r._score>0&&((t=this._propNames).push.apply(t,r._propNames),(n=this._messages).push.apply(n,r._messages))},e.prototype.getError=function(e){for(var t=[],n=this._propNames.length-1;n>=0;n--){var i=this._propNames[n];e+="number"===typeof i?"["+i+"]":i?"."+i:"";var a=this._messages[n];a&&t.push(e+" "+a)}return new r(e,t.join("; "))},e.prototype.getErrorDetail=function(e){for(var t=[],n=this._propNames.length-1;n>=0;n--){var r=this._propNames[n];e+="number"===typeof r?"["+r+"]":r?"."+r:"";var i=this._messages[n];i&&t.push({path:e,message:i})}var a=null;for(n=t.length-1;n>=0;n--)a&&(t[n].nested=[a]),a=t[n];return a},e}();t.DetailContext=a;var o=function(){function e(){this.contexts=[]}return e.prototype.createContext=function(){var e=new a;return this.contexts.push(e),e},e}()}));E(B);B.VError,B.NoopContext,B.DetailContext;var w=C((function(e,t){var n=b&&b.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){};function a(e){return"string"===typeof e?s(e):e}function o(e,t){var n=e[t];if(!n)throw new Error("Unknown type "+t);return n}function s(e){return new u(e)}t.TType=i,t.name=s;var u=function(e){function t(t){var n=e.call(this)||this;return n.name=t,n._failMsg="is not a "+t,n}return n(t,e),t.prototype.getChecker=function(e,n){var r=this,i=o(e,this.name),a=i.getChecker(e,n);return i instanceof C||i instanceof t?a:function(e,t){return!!a(e,t)||t.fail(null,r._failMsg,0)}},t}(i);t.TName=u,t.lit=function(e){return new A(e)};var A=function(e){function t(t){var n=e.call(this)||this;return n.value=t,n.name=JSON.stringify(t),n._failMsg="is not "+n.name,n}return n(t,e),t.prototype.getChecker=function(e,t){var n=this;return function(e,t){return e===n.value||t.fail(null,n._failMsg,-1)}},t}(i);t.TLiteral=A,t.array=function(e){return new c(a(e))};var c=function(e){function t(t){var n=e.call(this)||this;return n.ttype=t,n}return n(t,e),t.prototype.getChecker=function(e,t){var n=this.ttype.getChecker(e,t);return function(e,t){if(!Array.isArray(e))return t.fail(null,"is not an array",0);for(var r=0;r<e.length;r++){if(!n(e[r],t))return t.fail(r,null,1)}return!0}},t}(i);t.TArray=c,t.tuple=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new l(e.map((function(e){return a(e)})))};var l=function(e){function t(t){var n=e.call(this)||this;return n.ttypes=t,n}return n(t,e),t.prototype.getChecker=function(e,t){var n=this.ttypes.map((function(n){return n.getChecker(e,t)})),r=function(e,t){if(!Array.isArray(e))return t.fail(null,"is not an array",0);for(var r=0;r<n.length;r++){if(!n[r](e[r],t))return t.fail(r,null,1)}return!0};return t?function(e,t){return!!r(e,t)&&(e.length<=n.length||t.fail(n.length,"is extraneous",2))}:r},t}(i);t.TTuple=l,t.union=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new f(e.map((function(e){return a(e)})))};var f=function(e){function t(t){var n=e.call(this)||this;n.ttypes=t;var r=t.map((function(e){return e instanceof u||e instanceof A?e.name:null})).filter((function(e){return e})),i=t.length-r.length;return r.length?(i>0&&r.push(i+" more"),n._failMsg="is none of "+r.join(", ")):n._failMsg="is none of "+i+" types",n}return n(t,e),t.prototype.getChecker=function(e,t){var n=this,r=this.ttypes.map((function(n){return n.getChecker(e,t)}));return function(e,t){for(var i=t.unionResolver(),a=0;a<r.length;a++){if(r[a](e,i.createContext()))return!0}return t.resolveUnion(i),t.fail(null,n._failMsg,0)}},t}(i);t.TUnion=f,t.enumtype=function(e){return new h(e)};var h=function(e){function t(t){var n=e.call(this)||this;return n.members=t,n.validValues=new Set,n._failMsg="is not a valid enum value",n.validValues=new Set(Object.keys(t).map((function(e){return t[e]}))),n}return n(t,e),t.prototype.getChecker=function(e,t){var n=this;return function(e,t){return!!n.validValues.has(e)||t.fail(null,n._failMsg,0)}},t}(i);t.TEnumType=h,t.enumlit=function(e,t){return new g(e,t)};var g=function(e){function t(t,n){var r=e.call(this)||this;return r.enumName=t,r.prop=n,r._failMsg="is not "+t+"."+n,r}return n(t,e),t.prototype.getChecker=function(e,t){var n=this,r=o(e,this.enumName);if(!(r instanceof h))throw new Error("Type "+this.enumName+" used in enumlit is not an enum type");var i=r.members[this.prop];if(!r.members.hasOwnProperty(this.prop))throw new Error("Unknown value "+this.enumName+"."+this.prop+" used in enumlit");return function(e,t){return e===i||t.fail(null,n._failMsg,-1)}},t}(i);function d(e){return Object.keys(e).map((function(t){return function(e,t){return t instanceof v?new y(e,t.ttype,!0):new y(e,a(t),!1)}(t,e[t])}))}t.TEnumLiteral=g,t.iface=function(e,t){return new p(e,d(t))};var p=function(e){function t(t,n){var r=e.call(this)||this;return r.bases=t,r.props=n,r.propSet=new Set(n.map((function(e){return e.name}))),r}return n(t,e),t.prototype.getChecker=function(e,t){var n=this,r=this.bases.map((function(n){return o(e,n).getChecker(e,t)})),i=this.props.map((function(n){return n.ttype.getChecker(e,t)})),a=new B.NoopContext,s=this.props.map((function(e,t){return!e.isOpt&&!i[t](void 0,a)})),u=function(e,t){if("object"!==typeof e||null===e)return t.fail(null,"is not an object",0);for(var a=0;a<r.length;a++)if(!r[a](e,t))return!1;for(a=0;a<i.length;a++){var o=n.props[a].name,u=e[o];if(void 0===u){if(s[a])return t.fail(o,"is missing",1)}else if(!i[a](u,t))return t.fail(o,null,1)}return!0};return t?function(e,t){if(!u(e,t))return!1;for(var r in e)if(!n.propSet.has(r))return t.fail(r,"is extraneous",2);return!0}:u},t}(i);t.TIface=p,t.opt=function(e){return new v(a(e))};var v=function(e){function t(t){var n=e.call(this)||this;return n.ttype=t,n}return n(t,e),t.prototype.getChecker=function(e,t){var n=this.ttype.getChecker(e,t);return function(e,t){return void 0===e||n(e,t)}},t}(i);t.TOptional=v;var y=function(e,t,n){this.name=e,this.ttype=t,this.isOpt=n};t.TProp=y,t.func=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new m(new E(t),a(e))};var m=function(e){function t(t,n){var r=e.call(this)||this;return r.paramList=t,r.result=n,r}return n(t,e),t.prototype.getChecker=function(e,t){return function(e,t){return"function"===typeof e||t.fail(null,"is not a function",0)}},t}(i);t.TFunc=m,t.param=function(e,t,n){return new I(e,a(t),Boolean(n))};var I=function(e,t,n){this.name=e,this.ttype=t,this.isOpt=n};t.TParam=I;var E=function(e){function t(t){var n=e.call(this)||this;return n.params=t,n}return n(t,e),t.prototype.getChecker=function(e,t){var n=this,r=this.params.map((function(n){return n.ttype.getChecker(e,t)})),i=new B.NoopContext,a=this.params.map((function(e,t){return!e.isOpt&&!r[t](void 0,i)})),o=function(e,t){if(!Array.isArray(e))return t.fail(null,"is not an array",0);for(var i=0;i<r.length;i++){var o=n.params[i];if(void 0===e[i]){if(a[i])return t.fail(o.name,"is missing",1)}else if(!r[i](e[i],t))return t.fail(o.name,null,1)}return!0};return t?function(e,t){return!!o(e,t)&&(e.length<=r.length||t.fail(r.length,"is extraneous",2))}:o},t}(i);t.TParamList=E;var C=function(e){function t(t,n){var r=e.call(this)||this;return r.validator=t,r.message=n,r}return n(t,e),t.prototype.getChecker=function(e,t){var n=this;return function(e,t){return!!n.validator(e)||t.fail(null,n.message,0)}},t}(i);t.BasicType=C,t.basicTypes={any:new C((function(e){return!0}),"is invalid"),number:new C((function(e){return"number"===typeof e}),"is not a number"),object:new C((function(e){return"object"===typeof e&&e}),"is not an object"),boolean:new C((function(e){return"boolean"===typeof e}),"is not a boolean"),string:new C((function(e){return"string"===typeof e}),"is not a string"),symbol:new C((function(e){return"symbol"===typeof e}),"is not a symbol"),void:new C((function(e){return null==e}),"is not void"),undefined:new C((function(e){return void 0===e}),"is not undefined"),null:new C((function(e){return null===e}),"is not null"),never:new C((function(e){return!1}),"is unexpected"),Date:new C(Q("[object Date]"),"is not a Date"),RegExp:new C(Q("[object RegExp]"),"is not a RegExp")};var w=Object.prototype.toString;function Q(e){return function(t){return"object"===typeof t&&t&&w.call(t)===e}}"undefined"!==typeof r&&(t.basicTypes.Buffer=new C((function(e){return r.isBuffer(e)}),"is not a Buffer"));for(var k=function(e){t.basicTypes[e.name]=new C((function(t){return t instanceof e}),"is not a "+e.name)},_=0,x=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];_<x.length;_++){k(x[_])}}));E(w);w.TType,w.name,w.TName,w.lit,w.TLiteral,w.array,w.TArray,w.tuple,w.TTuple,w.union,w.TUnion,w.enumtype,w.TEnumType,w.enumlit,w.TEnumLiteral,w.iface,w.TIface,w.opt,w.TOptional,w.TProp,w.func,w.TFunc,w.param,w.TParam,w.TParamList,w.BasicType,w.basicTypes;var Q=C((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=w;t.TArray=n.TArray,t.TEnumType=n.TEnumType,t.TEnumLiteral=n.TEnumLiteral,t.TFunc=n.TFunc,t.TIface=n.TIface,t.TLiteral=n.TLiteral,t.TName=n.TName,t.TOptional=n.TOptional,t.TParam=n.TParam,t.TParamList=n.TParamList,t.TProp=n.TProp,t.TTuple=n.TTuple,t.TType=n.TType,t.TUnion=n.TUnion,t.array=n.array,t.enumlit=n.enumlit,t.enumtype=n.enumtype,t.func=n.func,t.iface=n.iface,t.lit=n.lit,t.name=n.name,t.opt=n.opt,t.param=n.param,t.tuple=n.tuple,t.union=n.union,t.BasicType=n.BasicType,t.createCheckers=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=Object.assign.apply(Object,[{},w.basicTypes].concat(e)),i={},a=0,o=e;a<o.length;a++)for(var s=o[a],u=0,A=Object.keys(s);u<A.length;u++){var c=A[u];i[c]=new r(n,s[c])}return i};var r=function(){function e(e,t,n){if(void 0===n&&(n="value"),this.suite=e,this.ttype=t,this._path=n,this.props=new Map,t instanceof w.TIface)for(var r=0,i=t.props;r<i.length;r++){var a=i[r];this.props.set(a.name,a.ttype)}this.checkerPlain=this.ttype.getChecker(e,!1),this.checkerStrict=this.ttype.getChecker(e,!0)}return e.prototype.setReportedPath=function(e){this._path=e},e.prototype.check=function(e){return this._doCheck(this.checkerPlain,e)},e.prototype.test=function(e){return this.checkerPlain(e,new B.NoopContext)},e.prototype.validate=function(e){return this._doValidate(this.checkerPlain,e)},e.prototype.strictCheck=function(e){return this._doCheck(this.checkerStrict,e)},e.prototype.strictTest=function(e){return this.checkerStrict(e,new B.NoopContext)},e.prototype.strictValidate=function(e){return this._doValidate(this.checkerStrict,e)},e.prototype.getProp=function(t){var n=this.props.get(t);if(!n)throw new Error("Type has no property "+t);return new e(this.suite,n,this._path+"."+t)},e.prototype.methodArgs=function(t){var n=this._getMethod(t);return new e(this.suite,n.paramList)},e.prototype.methodResult=function(t){var n=this._getMethod(t);return new e(this.suite,n.result)},e.prototype.getArgs=function(){if(!(this.ttype instanceof w.TFunc))throw new Error("getArgs() applied to non-function");return new e(this.suite,this.ttype.paramList)},e.prototype.getResult=function(){if(!(this.ttype instanceof w.TFunc))throw new Error("getResult() applied to non-function");return new e(this.suite,this.ttype.result)},e.prototype.getType=function(){return this.ttype},e.prototype._doCheck=function(e,t){if(!e(t,new B.NoopContext)){var n=new B.DetailContext;throw e(t,n),n.getError(this._path)}},e.prototype._doValidate=function(e,t){if(e(t,new B.NoopContext))return null;var n=new B.DetailContext;return e(t,n),n.getErrorDetail(this._path)},e.prototype._getMethod=function(e){var t=this.props.get(e);if(!t)throw new Error("Type has no property "+e);if(!(t instanceof w.TFunc))throw new Error("Property "+e+" is not a method");return t},e}();t.Checker=r}));E(Q);Q.TArray,Q.TEnumType,Q.TEnumLiteral,Q.TFunc,Q.TIface,Q.TLiteral,Q.TName,Q.TOptional,Q.TParam,Q.TParamList,Q.TProp,Q.TTuple,Q.TType,Q.TUnion;var k=Q.array,_=(Q.enumlit,Q.enumtype,Q.func,Q.iface),x=Q.lit,S=Q.name,O=(Q.opt,Q.param,Q.tuple,Q.union),D=(Q.BasicType,Q.createCheckers),R=(Q.Checker,{ZarrMetadataType:O("ZarrArrayMetadata","ZarrGroupMetadata"),UserAttributes:S("object"),FillType:O("number",x("NaN"),x("Infinity"),x("-Infinity"),"null"),Order:O(x("C"),x("F")),DtypeString:O(x("<u1"),x("<i1"),x("<i4"),x("<f4"),x("<f8"),x("<b"),x("<B")),ChunksArgument:O("number",k(O("number","null")),"boolean","null"),Compressor:_([],{id:"string"}),Filter:_([],{id:"string"}),ZarrArrayMetadata:_([],{zarr_format:O(x(1),x(2)),shape:k("number"),chunks:k("number"),dtype:"DtypeString",compressor:O("null",_([],{id:"string"})),fill_value:"FillType",order:"Order",filters:O("null",k("Filter"))}),ZarrGroupMetadata:_([],{zarr_format:O(x(1),x(2))})}),j=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(h.a)(this,n),r=t.call(this,"path ".concat(e," contains an array")),Object.setPrototypeOf(Object(g.a)(r),n.prototype),r}return n}(Object(v.a)(Error)),M=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(h.a)(this,n),r=t.call(this,"path ".concat(e," contains a group")),Object.setPrototypeOf(Object(g.a)(r),n.prototype),r}return n}(Object(v.a)(Error)),N=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(h.a)(this,n),r=t.call(this,"array not found at path ".concat(e)),Object.setPrototypeOf(Object(g.a)(r),n.prototype),r}return n}(Object(v.a)(Error)),F=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(h.a)(this,n),r=t.call(this,"ground not found at path ".concat(e)),Object.setPrototypeOf(Object(g.a)(r),n.prototype),r}return n}(Object(v.a)(Error)),T=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(h.a)(this,n),r=t.call(this,"nothing not found at path ".concat(e)),Object.setPrototypeOf(Object(g.a)(r),n.prototype),r}return n}(Object(v.a)(Error)),L=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(h.a)(this,n),r=t.call(this,e),Object.setPrototypeOf(Object(g.a)(r),n.prototype),r}return n}(Object(v.a)(Error)),P=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(h.a)(this,n),r=t.call(this,"key ".concat(e," not present")),Object.setPrototypeOf(Object(g.a)(r),n.prototype),r}return n}(Object(v.a)(Error)),U=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e,r){var i;return Object(h.a)(this,n),i=t.call(this,"too many indices for array; expected ".concat(r.length,", got ").concat(e.length)),Object.setPrototypeOf(Object(g.a)(i),n.prototype),i}return n}(Object(v.a)(RangeError)),G=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(h.a)(this,n),r=t.call(this,e),Object.setPrototypeOf(Object(g.a)(r),n.prototype),r}return n}(Object(v.a)(RangeError)),q=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e,r,i,a){var o;return Object(h.a)(this,n),o=t.call(this,"slice arguments slice(".concat(e,", ").concat(r,", ").concat(i,") invalid: ").concat(a)),Object.setPrototypeOf(Object(g.a)(o),n.prototype),o}return n}(Object(v.a)(RangeError)),H=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(){var e;return Object(h.a)(this,n),e=t.call(this,"Negative step size is not supported when indexing."),Object.setPrototypeOf(Object(g.a)(e),n.prototype),e}return n}(Object(v.a)(Error)),Y=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(h.a)(this,n),r=t.call(this,e),Object.setPrototypeOf(Object(g.a)(r),n.prototype),r}return n}(Object(v.a)(Error)),J=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(h.a)(this,n),r=t.call(this,e),Object.setPrototypeOf(Object(g.a)(r),n.prototype),r}return n}(Object(v.a)(Error));function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(void 0===e)throw new q(e,t,n,"The first argument must not be undefined");if("string"===typeof e&&":"!==e||"string"===typeof t&&":"!==t)throw new q(e,t,n,'Arguments can only be integers, ":" or null');return void 0===t&&(t=e,e=null),{start:":"===e?null:e,stop:":"===t?null:t,step:n,_slice:!0}}function K(e,t){var n,r,i;i=null===e.step?1:e.step,null===e.start?n=i<0?Number.MAX_SAFE_INTEGER:0:(n=e.start)<0&&(n+=t),null===e.stop?r=i<0?-Number.MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER:(r=e.stop)<0&&(r+=t);var a=function(e,t,n,r){if(e<0?(e+=r)<0&&(e=n<0?-1:0):e>=r&&(e=n<0?r-1:r),t<0?(t+=r)<0&&(t=n<0?-1:0):t>=r&&(t=n<0?r-1:r),n<0){if(t<e)return[e,t,n,Math.floor((e-t-1)/-n+1)]}else if(e<t)return[e,t,n,Math.floor((t-e-1)/n+1)];return[e,t,n,0]}(n,r,i,t);if(n=a[0],r=a[1],i=a[2],t=a[3],0===i)throw new Error("Step size 0 is invalid");return[n,r,i,t]}function W(e){return Array.isArray(e)?e:[e]}function V(e,t){for(var n=[],r=[],i=0;i<e.length;i++){var a=e[i];if("number"===typeof a)n.push(a);else{var o=K(a,t[i]),s=o[3];r.push(s),n.push(o)}}return[n,r]}function X(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e=Z(e,t);for(var r=0;r<e.length;r++){var i=e[r];if("number"===typeof i)e[r]=n?z(i,i+1,1):$(i,t[r]);else{if(ee(i))throw new TypeError("Integer array selections are not supported (yet)");":"!==i&&null!==i||(e[r]=z(null,null,1))}}return e}function Z(e,t){e=W(e);for(var n=-1,r=0,i=0;i<e.length;i++)"..."===e[i]&&(n=i,r+=1);if(r>1)throw new RangeError("an index can only have a single ellipsis ('...')");if(1===r){var a=n,o=e.length-(a+1),s=e.length-1;if(s>=t.length)e=e.filter((function(e){return"..."!==e}));else{var u=t.length-s,A=e.slice(0,a).concat(new Array(u).fill(null));o>0&&(A=A.concat(e.slice(e.length-o))),e=A}}if(e.length<t.length){var c=t.length-e.length;e=e.concat(new Array(c).fill(null))}return function(e,t){if(e.length>t.length)throw new U(e,t)}(e,t),e}function $(e,t){if(e<0&&(e=t+e),e>=t||e<0)throw new G("index out of bounds for dimension with length ".concat(t));return e}function ee(e){if(!Array.isArray(e))return!1;var t,n=Object(f.a)(e);try{for(n.s();!(t=n.n()).done;){if("number"!==typeof t.value)return!1}}catch(St){n.e(St)}finally{n.f()}return!0}function te(e){return null!==e&&!0===e._slice}function ne(e){return te(e)&&(null===e.step||1===e.step)}function re(e){e=W(e);for(var t=0;t<e.length;t++){var n=e[t];if(!ee(n)&&!ne(n)&&"..."!==n)return!1}return!0}function ie(){var e,t,n,r,i,a,o=arguments;return l.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:for(e=o.length,t=new Array(e),n=0;n<e;n++)t[n]=o[n];if(0!==t.length){s.next=3;break}return s.abrupt("return");case 3:r=t.map((function(e){return e()})),i=r.map((function(e){return e.next()})),a=0;case 6:if(!i[a].done){s.next=13;break}if(r[a]=t[a](),i[a]=r[a].next(),!(++a>=r.length)){s.next=11;break}return s.abrupt("return");case 11:s.next=16;break;case 13:return s.next=15,i.map((function(e){return e.value}));case 15:a=0;case 16:i[a]=r[a].next();case 17:s.next=6;break;case 19:case"end":return s.stop()}}),y)}var ae=function(){function e(t,n){Object(h.a)(this,e),t=X(t,n.shape),this.dimIndexers=[];for(var r=n.shape,i=0;i<r.length;i++){var a=t[i],o=r[i],s=n.chunks[i];if(null===a&&(a=z(null)),"number"===typeof a)this.dimIndexers.push(new oe(a,o,s));else{if(!te(a))throw new RangeError("Unspported selection item for basic indexing; expected integer or slice, got ".concat(a));this.dimIndexers.push(new se(a,o,s))}}this.shape=[];var u,A=Object(f.a)(this.dimIndexers);try{for(A.s();!(u=A.n()).done;){var c=u.value;c instanceof se&&this.shape.push(c.numItems)}}catch(St){A.e(St)}finally{A.f()}this.dropAxes=null}return Object(A.a)(e,[{key:"iter",value:l.a.mark((function e(){var t,n,r,i,a,o,s,A,c,h,g;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.dimIndexers.map((function(e){return function(){return e.iter()}})),n=ie.apply(void 0,Object(u.a)(t)),r=Object(f.a)(n),e.prev=3,r.s();case 5:if((i=r.n()).done){e.next=16;break}a=i.value,o=[],s=[],A=[],c=Object(f.a)(a);try{for(c.s();!(h=c.n()).done;)g=h.value,o.push(g.dimChunkIndex),s.push(g.dimChunkSelection),null!==g.dimOutSelection&&A.push(g.dimOutSelection)}catch(St){c.e(St)}finally{c.f()}return e.next=14,{chunkCoords:o,chunkSelection:s,outSelection:A};case 14:e.next=5;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(3),r.e(e.t0);case 21:return e.prev=21,r.f(),e.finish(21);case 24:case"end":return e.stop()}}),e,this,[[3,18,21,24]])}))}]),e}(),oe=function(){function e(t,n,r){Object(h.a)(this,e),t=$(t,n),this.dimSelection=t,this.dimLength=n,this.dimChunkLength=r,this.numItems=1}return Object(A.a)(e,[{key:"iter",value:l.a.mark((function e(){var t,n,r;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Math.floor(this.dimSelection/this.dimChunkLength),n=t*this.dimChunkLength,r=this.dimSelection-n,null,e.next=6,{dimChunkIndex:t,dimChunkSelection:r,dimOutSelection:null};case 6:case"end":return e.stop()}}),e,this)}))}]),e}(),se=function(){function e(t,n,r){Object(h.a)(this,e);var i=K(t,n),a=Object(s.a)(i,3),o=a[0],u=a[1],A=a[2];if(this.start=o,this.stop=u,this.step=A,this.step<1)throw new H;this.dimLength=n,this.dimChunkLength=r,this.numItems=Math.max(0,Math.ceil((this.stop-this.start)/this.step)),this.numChunks=Math.ceil(this.dimLength/this.dimChunkLength)}return Object(A.a)(e,[{key:"iter",value:l.a.mark((function e(){var t,n,r,i,a,o,s,u,A,c,f,h,g;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Math.floor(this.start/this.dimChunkLength),n=Math.ceil(this.stop/this.dimChunkLength),r=t;case 3:if(!(r<n)){e.next=20;break}return i=r*this.dimChunkLength,a=Math.min(this.dimLength,(r+1)*this.dimChunkLength),o=a-i,s=void 0,u=void 0,A=void 0,this.start<i?(s=0,(c=(i-this.start)%this.step)>0&&(s+=this.step-c),A=Math.ceil((i-this.start)/this.step)):(s=this.start-i,A=0),u=this.stop>a?o:this.stop-i,f=z(s,u,this.step),h=Math.ceil((u-s)/this.step),g=z(A,A+h),e.next=17,{dimChunkIndex:r,dimChunkSelection:f,dimOutSelection:g};case 17:r++,e.next=3;break;case 20:case"end":return e.stop()}}),e,this)}))}]),e}(),ue=D(R),Ae="undefined"!==typeof i&&i.versions&&i.versions.node;function ce(e){if(null===e)return"";for(e instanceof String&&(e=e.valueOf()),e=e.replace(/\\/g,"/");e.length>0&&"/"===e[0];)e=e.slice(1);for(;e.length>0&&"/"===e[e.length-1];)e=e.slice(0,e.length-1);var t,n=(e=e.replace(/\/\/+/g,"/")).split("/"),r=Object(f.a)(n);try{for(r.s();!(t=r.n()).done;){var i=t.value;if("."===i||".."===i)throw Error("path containing '.' or '..' segment not allowed")}}catch(St){r.e(St)}finally{r.f()}return e}function le(e){return"number"===typeof e&&(e=[e]),e.map((function(e){return Math.floor(e)}))}function fe(e,t){if(ue.ChunksArgument.check(e),null===e||!0===e)throw new Error("Chunk guessing is not supported yet");return!1===e?t:("number"===typeof e&&(e=[e]),e.length<t.length&&(e=e.concat(t.slice(e.length))),e.map((function(e,n){return-1===e||null===e?t[n]:Math.floor(e)})))}function he(e){return e=e.toUpperCase(),ue.Order.check(e),e}function ge(e){return ue.DtypeString.check(e),e}function de(e){return ue.FillType.check(e),e}function pe(e,t){if(null===e)return!0;Array.isArray(e)||(e=[e]);for(var n=0;n<Math.min(e.length,t.length);n++){var r=e[n];if(null!==r){if(te(r)){var i=r,a=1===i.step||null===i.step;if(null===i.start&&null===i.stop&&a)continue;if(i.stop-i.start===t[n]&&a)continue;return!1}return!1}}return!0}function ve(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function ye(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.map((function(e,t){return 0===t?e.trim().replace(/[\/]*$/g,""):e.trim().replace(/(^[\/]*|[\/]*$)/g,"")})).filter((function(e){return e.length})).join("/")}function me(e){var t=e.BYTES_PER_ELEMENT;if(1!==t){if(Ae){var n=r.from(e.buffer,e.byteOffset,e.length*t);return 2===t&&n.swap16(),4===t&&n.swap32(),void(8===t&&n.swap64())}for(var i,a=new Uint8Array(e.buffer,e.byteOffset,e.length*t),o=t/2,s=t-1,u=0;u<a.length;u+=t)for(var A=0;A<o;A++)i=a[u+A],a[u+A]=a[u+s-A],a[u+s-A]=i}}function Ie(e){var t=e.slice();return me(t),t}function be(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return I(this,void 0,void 0,l.a.mark((function n(){var r,i;return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=ce(t),r=Ce(t),i=r+".zarray",n.abrupt("return",e.containsItem(i));case 4:case"end":return n.stop()}}),n)})))}function Ee(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return I(this,void 0,void 0,l.a.mark((function n(){var r,i;return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=ce(t),r=Ce(t),i=r+".zgroup",n.abrupt("return",e.containsItem(i));case 4:case"end":return n.stop()}}),n)})))}function Ce(e){return e.length>0?e+"/":""}function Be(e,t,n,r){return I(this,void 0,void 0,l.a.mark((function n(){var i,a,o,s,u;return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(0!==t.length){n.next=2;break}return n.abrupt("return");case 2:i=t.split("/"),a="",o=Object(f.a)(i.slice(0,i.length-1)),n.prev=5,o.s();case 7:if((s=o.n()).done){n.next=25;break}return u=s.value,a+=u,n.next=12,be(e,a);case 12:if(!n.sent){n.next=17;break}return n.next=15,we(e,a,r);case 15:n.next=22;break;case 17:return n.next=19,Ee(e,a);case 19:if(n.sent){n.next=22;break}return n.next=22,we(e,a);case 22:a+="/";case 23:n.next=7;break;case 25:n.next=30;break;case 27:n.prev=27,n.t0=n.catch(5),o.e(n.t0);case 30:return n.prev=30,o.f(),n.finish(30);case 33:case"end":return n.stop()}}),n,null,[[5,27,30,33]])})))}function we(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return I(this,void 0,void 0,l.a.mark((function r(){var i,a;return l.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t=ce(t),!n){r.next=5;break}throw Error("Group overwriting not implemented yet :(");case 5:return r.next=7,be(e,t);case 7:if(!r.sent){r.next=11;break}throw new j(t);case 11:return r.next=13,Ee(e,t);case 13:if(!r.sent){r.next=15;break}throw new M(t);case 15:return i={zarr_format:2},a=Ce(t)+".zgroup",r.next=19,e.setItem(a,JSON.stringify(i));case 19:case"end":return r.stop()}}),r)})))}function Qe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],arguments.length>3&&void 0!==arguments[3]&&arguments[3]);return I(this,void 0,void 0,l.a.mark((function r(){return l.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return t=ce(t),r.next=3,Be(e,t,0,n);case 3:return r.next=5,we(e,t,n);case 5:case"end":return r.stop()}}),r)})))}function ke(e,t,n,r,i,a,o,s,u,A,c){return I(this,void 0,void 0,l.a.mark((function A(){var f,h,g;return l.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(!u){A.next=4;break}throw Error("Array overwriting not implemented yet :(");case 4:return A.next=6,be(e,i);case 6:if(!A.sent){A.next=10;break}throw new j(i);case 10:return A.next=12,Ee(e,i);case 12:if(!A.sent){A.next=14;break}throw new M(i);case 14:if(r=ge(r),t=le(t),n=fe(n,t),s=he(s),o=de(o),!(null!==c&&c.length>0)){A.next=21;break}throw Error("Filters are not supported yet");case 21:return f=o,"number"===typeof o&&(Number.isNaN(o)&&(f="NaN"),Number.POSITIVE_INFINITY===o&&(f="Infinity"),Number.NEGATIVE_INFINITY===o&&(f="-Infinity")),h={zarr_format:2,shape:t,chunks:n,dtype:r,fill_value:f,order:s,compressor:a,filters:c=null},g=Ce(i)+".zarray",A.next=28,e.setItem(g,JSON.stringify(h));case 28:case"end":return A.stop()}}),A)})))}function _e(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"C",u=arguments.length>8&&void 0!==arguments[8]&&arguments[8],A=(arguments.length>9&&void 0!==arguments[9]&&arguments[9],arguments.length>10&&void 0!==arguments[10]?arguments[10]:null);return I(this,void 0,void 0,l.a.mark((function c(){return l.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return i=ce(i),c.next=3,Be(e,i,0,u);case 3:return c.next=5,ke(e,t,n,r,i,a,o,s,u,0,A);case 5:case"end":return c.stop()}}),c)})))}function xe(e){return"string"!==typeof e?Ae&&r.isBuffer(e)?JSON.parse(e.toString()):e instanceof ArrayBuffer?JSON.parse(String.fromCharCode.apply(null,new Uint8Array(e))):e:JSON.parse(e)}var Se=function(){function e(t,n,r){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];Object(h.a)(this,e),this.store=t,this.key=n,this.readOnly=r,this.cache=i,this.cachedValue=null}return Object(A.a)(e,[{key:"asObject",value:function(){return I(this,void 0,void 0,l.a.mark((function e(){var t;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.cache||null===this.cachedValue){e.next=2;break}return e.abrupt("return",this.cachedValue);case 2:return e.next=4,this.getNoSync();case 4:return t=e.sent,this.cache&&(this.cachedValue=t),e.abrupt("return",t);case 7:case"end":return e.stop()}}),e,this)})))}},{key:"getNoSync",value:function(){return I(this,void 0,void 0,l.a.mark((function e(){var t;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.store.getItem(this.key);case 3:return t=e.sent,e.abrupt("return",xe(t));case 7:return e.prev=7,e.t0=e.catch(0),e.abrupt("return",{});case 10:case"end":return e.stop()}}),e,this,[[0,7]])})))}},{key:"setNoSync",value:function(e,t){return I(this,void 0,void 0,l.a.mark((function n(){var r;return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNoSync();case 2:return(r=n.sent)[e]=t,n.next=6,this.putNoSync(r);case 6:return n.abrupt("return",!0);case 7:case"end":return n.stop()}}),n,this)})))}},{key:"putNoSync",value:function(e){return I(this,void 0,void 0,l.a.mark((function t(){return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.store.setItem(this.key,JSON.stringify(e));case 2:this.cache&&(this.cachedValue=e);case 3:case"end":return t.stop()}}),t,this)})))}},{key:"delNoSync",value:function(e){return I(this,void 0,void 0,l.a.mark((function t(){var n;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNoSync();case 2:return delete(n=t.sent)[e],t.next=6,this.putNoSync(n);case 6:return t.abrupt("return",!0);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"put",value:function(e){return I(this,void 0,void 0,l.a.mark((function t(){return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.readOnly){t.next=2;break}throw new L("attributes are read-only");case 2:return t.abrupt("return",this.putNoSync(e));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"setItem",value:function(e,t){return I(this,void 0,void 0,l.a.mark((function n(){return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.readOnly){n.next=2;break}throw new L("attributes are read-only");case 2:return n.abrupt("return",this.setNoSync(e,t));case 3:case"end":return n.stop()}}),n,this)})))}},{key:"getItem",value:function(e){return I(this,void 0,void 0,l.a.mark((function t(){return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.asObject();case 2:return t.t0=e,t.abrupt("return",t.sent[t.t0]);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"deleteItem",value:function(e){return I(this,void 0,void 0,l.a.mark((function t(){return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.readOnly){t.next=2;break}throw new L("attributes are read-only");case 2:return t.abrupt("return",this.delNoSync(e));case 3:case"end":return t.stop()}}),t,this)})))}},{key:"containsItem",value:function(e){return I(this,void 0,void 0,l.a.mark((function t(){return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.asObject();case 2:return t.t0=e,t.t1=t.sent[t.t0],t.t2=void 0,t.abrupt("return",t.t1!==t.t2);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"proxy",value:function(){return m(this)}}]),e}(),Oe={"|b":Int8Array,"|B":Uint8Array,"|u1":Uint8Array,"|i1":Int8Array,"<b":Int8Array,"<B":Uint8Array,"<u1":Uint8Array,"<i1":Int8Array,"<u2":Uint16Array,"<i2":Int16Array,"<u4":Uint32Array,"<i4":Int32Array,"<f4":Float32Array,"<f8":Float64Array,">b":Int8Array,">B":Uint8Array,">u1":Uint8Array,">i1":Int8Array,">u2":Uint16Array,">i2":Int16Array,">u4":Uint32Array,">i4":Int32Array,">f4":Float32Array,">f8":Float64Array};function De(e){if(e instanceof Uint8Array)return"|u1";if(e instanceof Int8Array)return"|i1";if(e instanceof Uint16Array)return"<u2";if(e instanceof Int16Array)return"<i2";if(e instanceof Uint32Array)return"<u4";if(e instanceof Int32Array)return"<i4";if(e instanceof Float32Array)return"<f4";if(e instanceof Float64Array)return"<f8";throw new Y("Mapping for TypedArray to Dtypestring not known")}function Re(e){return void 0!==e.byteLength?e.constructor:Re(e[0])}function je(e,t,n){var r=V(X(n,t),t),i=Object(s.a)(r,2),a=i[0],o=i[1];return[function e(t,n,r){var i=r[0];if("number"===typeof i)return 1===n.length?t[i]:e(t[i],n.slice(1),r.slice(1));var a=Object(s.a)(i,4),o=a[0],u=a[1],A=a[2],c=a[3];if(0===c)return new(Re(t))(0);if(1===n.length){if(1===A)return t.slice(o,u);for(var l=new t.constructor(c),f=0;f<c;f++)l[f]=t[o+f*A];return l}for(var h=new Array(c),g=0;g<c;g++)h[g]=e(t[o+g*A],n.slice(1),r.slice(1));if(c>0&&"number"===typeof h[0]){var d=t[0].constructor;h=d.from(h)}return h}(e,t,a),o]}function Me(e,t,n,r){var i=V(X(r,n,!0),n),a=Object(s.a)(i,2),o=a[0];a[1];Fe(e,t,n,o)}function Ne(e,t,n,r,i){var a=V(X(i,n,!1),n),o=Object(s.a)(a,2),u=o[0],A=o[1];if(JSON.stringify(A)!==JSON.stringify(r))throw new Y("Shape mismatch in target and source NestedArray: ".concat(A," and ").concat(r));!function e(t,n,r,i){var a=i[0];if("number"===typeof n)return void Fe(t,n,r,i.map((function(e){return"number"===typeof e?[e,e+1,1,1]:e})));if("number"===typeof a)return void e(t[a],n,r.slice(1),i.slice(1));var o=Object(s.a)(a,4),u=o[0],A=(o[1],o[2]),c=o[3];if(1===r.length){if(1===A)t.set(n,u);else for(var l=0;l<c;l++)t[u+l*A]=n[l];return}for(var f=0;f<c;f++)e(t[u+f*A],n[f],r.slice(1),i.slice(1))}(e,t,n,u)}function Fe(e,t,n,r){var i=r[0],a=Object(s.a)(i,4),o=a[0],u=a[1],A=a[2],c=a[3];if(1!==n.length)for(var l=0;l<c;l++)Fe(e[o+l*A],t,n.slice(1),r.slice(1));else if(1===A)e.fill(t,o,u);else for(var f=0;f<c;f++)e[o+f*A]=t}function Te(e,t,n){void 0===n&&(n=Re(e));var r=new n(t.reduce((function(e,t){return e*t}),1));return function e(t,n,r,i){if(1===n.length)return void r.set(t,i);if(2===n.length){for(var a=0;a<n[0];a++)r.set(t[a],i+n[1]*a);return t}for(var o=n.slice(1),s=o.reduce((function(e,t){return e*t}),1),u=0;u<n[0];u++)e(t[u],o,r,i+s*u);return t}(e,t,r,0),r}var Le=function(){function e(t,n,i){Object(h.a)(this,e);var a=null!==t&&!!t.BYTES_PER_ELEMENT;if(void 0===n){if(!a)throw new Y("Shape argument is required unless you pass in a TypedArray");n=[t.length]}if(void 0===i){if(!a)throw new Y("Dtype argument is required unless you pass in a TypedArray");i=De(t)}if(n=le(n),this.shape=n,this.dtype=i,a&&1!==n.length&&(t=t.buffer),0===this.shape.length)this.data=new Oe[i](1);else if(Ae&&r.isBuffer(t)||t instanceof ArrayBuffer||null===t||t.toString().startsWith("[object ArrayBuffer]")){var o=n.reduce((function(e,t){return e*t}),1);null===t&&(t=new ArrayBuffer(o*parseInt(i[i.length-1],10)));var s=t.byteLength/parseInt(i[i.length-1],10);if(o!==s)throw new Error("Buffer has ".concat(s," of dtype ").concat(i,", shape is too large or small ").concat(n," (flat=").concat(o,")"));var u=Oe[i];this.data=function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(1===r.length)return new n(t.slice(i,i+r[0]*n.BYTES_PER_ELEMENT));var a=new Array(r[0]);if(2===r.length){for(var o=0;o<r[0];o++)a[o]=new n(t.slice(i+r[1]*o*n.BYTES_PER_ELEMENT,i+r[1]*(o+1)*n.BYTES_PER_ELEMENT));return a}for(var s=r.slice(1),u=s.reduce((function(e,t){return e*t}),1),A=0;A<r[0];A++)a[A]=e(t,n,s,i+u*A*n.BYTES_PER_ELEMENT);return a}(t,u,n)}else this.data=t}return Object(A.a)(e,[{key:"get",value:function(t){var n=je(this.data,this.shape,t),r=Object(s.a)(n,2),i=r[0],a=r[1];return 0===a.length?i:new e(i,a,this.dtype)}},{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;null===e&&(e=[z(null)]),"number"===typeof t?0===this.shape.length?this.data[0]=t:Me(this.data,t,this.shape,e):Ne(this.data,t.data,this.shape,t.shape,e)}},{key:"flatten",value:function(){return 1===this.shape.length?this.data:Te(this.data,this.shape,Oe[this.dtype])}}],[{key:"arange",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"<i4",r=Oe[n],i=Pe([t],r);return new e(i,[t],n)}}]),e}();function Pe(e,t){var n=e.reduce((function(e,t){return e*t}),1),r=new t(n);return r.set(Object(u.a)(Array(n).keys())),r}function Ue(e,t,n,r,i){var a=V(X(r,n,!0),n);!function e(t,n,r,i){var a=Object(o.a)(i),u=a[0],A=a.slice(1),c=Object(o.a)(r),l=c[0],f=c.slice(1),h=Object(s.a)(u,4),g=h[0],d=(h[1],h[2]),p=h[3];if(1===r.length){if(1===d&&1===l)n.fill(t,g,g+p);else for(var v=0;v<p;v++)n[l*(g+d*v)]=t;return}for(var y=0;y<p;y++)e(t,n.subarray(l*(g+d*y)),f,A)}(i,e,t,Object(s.a)(a,1)[0])}function Ge(e,t,n,r,i,a,u){var A=V(X(r,n,!1),n),c=Object(s.a)(A,2),l=c[0],f=c[1];if(JSON.stringify(f)!==JSON.stringify(u))throw new Y("Shape mismatch in target and source RawArray: ".concat(f," and ").concat(u));!function e(t,n,r,i,a){if(0===r.length)return void t.set(i);var u=Object(o.a)(r),A=u[0],c=u.slice(1),l=Object(o.a)(n),f=l[0],h=l.slice(1);if("number"===typeof A)return void e(t.subarray(A*f),h,c,i,a);var g=Object(o.a)(a),d=g[0],p=g.slice(1),v=Object(s.a)(A,4),y=v[0],m=(v[1],v[2]),I=v[3];if(1===n.length){if(1===m&&1===f&&1===d)t.set(i.subarray(0,I),y);else for(var b=0;b<I;b++)t[f*(y+m*b)]=i[d*b];return}for(var E=0;E<I;E++)e(t.subarray(f*(y+E*m)),h,c,i.subarray(d*E),p)}(e,t,l,i,a)}function qe(e,t,n,r,i,a,u,A){var c=V(X(r,n,!0),n),l=Object(s.a)(c,1)[0],f=V(X(A,u,!1),u);!function e(t,n,r,i,a,u){if(0===u.length)return void t.set(i.subarray(0,t.length));var A=Object(o.a)(r),c=A[0],l=A.slice(1),f=Object(o.a)(u),h=f[0],g=f.slice(1),d=Object(o.a)(n),p=d[0],v=d.slice(1),y=Object(o.a)(a),m=y[0],I=y.slice(1);if("number"===typeof h)return void e(t,n,r,i.subarray(m*h),I,g);var b=Object(s.a)(c,4),E=b[0],C=(b[1],b[2]),B=b[3],w=Object(s.a)(h,4),Q=w[0],k=(w[1],w[2]);w[3];if(1===n.length&&1===a.length){if(1===C&&1===p&&1===k&&1===m)t.set(i.subarray(Q,Q+B),E);else for(var _=0;_<B;_++)t[p*(E+C*_)]=i[m*(Q+k*_)];return}for(var x=0;x<B;x++)e(t.subarray(p*(E+x*C)),v,l,i.subarray(m*(Q+x*k)),I,g)}(e,t,l,i,a,Object(s.a)(f,1)[0])}var He=function(){function e(t,n,i,a){Object(h.a)(this,e);var o=null!==t&&!!t.BYTES_PER_ELEMENT;if(void 0===n){if(!o)throw new Y("Shape argument is required unless you pass in a TypedArray");n=[t.length]}if(n=le(n),void 0===i){if(!o)throw new Y("Dtype argument is required unless you pass in a TypedArray");i=De(t)}if(void 0===a&&(a=function(e){for(var t=e.length,n=Array(t),r=1,i=t-1;i>=0;i--)n[i]=r,r*=e[i];return n}(n)),this.shape=n,this.dtype=i,this.strides=a,o&&1!==n.length&&(t=t.buffer),0===this.shape.length)this.data=new Oe[i](1);else if(Ae&&r.isBuffer(t)||t instanceof ArrayBuffer||null===t||t.toString().startsWith("[object ArrayBuffer]")){var s=n.reduce((function(e,t){return e*t}),1);null===t&&(t=new ArrayBuffer(s*parseInt(i[i.length-1],10)));var u=t.byteLength/parseInt(i[i.length-1],10);if(s!==u)throw new Error("Buffer has ".concat(u," of dtype ").concat(i,", shape is too large or small ").concat(n," (flat=").concat(s,")"));var A=Oe[i];this.data=new A(t)}else this.data=t}return Object(A.a)(e,[{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;null===t&&(t=[z(null)]),"number"===typeof n?0===this.shape.length?this.data[0]=n:Ue(this.data,this.strides,this.shape,t,n):n instanceof e&&r?qe(this.data,this.strides,this.shape,t,n.data,n.strides,n.shape,r):Ge(this.data,this.strides,this.shape,t,n.data,n.strides,n.shape)}}]),e}();var Ye=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){var n="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!==typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){var t,n,r,i,a,o;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(o=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)a=e[t],o.set(a,i),i+=a.length;return o}},a={arraySet:function(e,t,n,r,i){for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,i)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,a))},t.setTyped(n)}));Ye.assign,Ye.shrinkBuf,Ye.setTyped,Ye.Buf8,Ye.Buf16,Ye.Buf32;function Je(e){for(var t=e.length;--t>=0;)e[t]=0}var ze=[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],Ke=[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],We=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ve=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Xe=new Array(576);Je(Xe);var Ze=new Array(60);Je(Ze);var $e=new Array(512);Je($e);var et=new Array(256);Je(et);var tt=new Array(29);Je(tt);var nt,rt,it,at=new Array(30);function ot(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function st(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function ut(e){return e<256?$e[e]:$e[256+(e>>>7)]}function At(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function ct(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,At(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function lt(e,t,n){ct(e,n[2*t],n[2*t+1])}function ft(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function ht(e,t,n){var r,i,a=new Array(16),o=0;for(r=1;r<=15;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=ft(a[s]++,s))}}function gt(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function dt(e){e.bi_valid>8?At(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function pt(e,t,n,r){var i=2*t,a=2*n;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]}function vt(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&pt(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!pt(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function yt(e,t,n){var r,i,a,o,s=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],i=e.pending_buf[e.l_buf+s],s++,0===r?lt(e,i,t):(lt(e,(a=et[i])+256+1,t),0!==(o=ze[a])&&ct(e,i-=tt[a],o),lt(e,a=ut(--r),n),0!==(o=Ke[a])&&ct(e,r-=at[a],o))}while(s<e.last_lit);lt(e,256,t)}function mt(e,t){var n,r,i,a=t.dyn_tree,o=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,A=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<u;n++)0!==a[2*n]?(e.heap[++e.heap_len]=A=n,e.depth[n]=0):a[2*n+1]=0;for(;e.heap_len<2;)a[2*(i=e.heap[++e.heap_len]=A<2?++A:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=o[2*i+1]);for(t.max_code=A,n=e.heap_len>>1;n>=1;n--)vt(e,a,n);i=u;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],vt(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,vt(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,u=t.dyn_tree,A=t.max_code,c=t.stat_desc.static_tree,l=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,d=0;for(a=0;a<=15;a++)e.bl_count[a]=0;for(u[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(a=u[2*u[2*(r=e.heap[n])+1]+1]+1)>g&&(a=g,d++),u[2*r+1]=a,r>A||(e.bl_count[a]++,o=0,r>=h&&(o=f[r-h]),s=u[2*r],e.opt_len+=s*(a+o),l&&(e.static_len+=s*(c[2*r+1]+o)));if(0!==d){do{for(a=g-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[g]--,d-=2}while(d>0);for(a=g;0!==a;a--)for(r=e.bl_count[a];0!==r;)(i=e.heap[--n])>A||(u[2*i+1]!==a&&(e.opt_len+=(a-u[2*i+1])*u[2*i],u[2*i+1]=a),r--)}}(e,t),ht(a,A,e.bl_count)}function It(e,t,n){var r,i,a=-1,o=t[1],s=0,u=7,A=4;for(0===o&&(u=138,A=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=o,o=t[2*(r+1)+1],++s<u&&i===o||(s<A?e.bl_tree[2*i]+=s:0!==i?(i!==a&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,a=i,0===o?(u=138,A=3):i===o?(u=6,A=3):(u=7,A=4))}function bt(e,t,n){var r,i,a=-1,o=t[1],s=0,u=7,A=4;for(0===o&&(u=138,A=3),r=0;r<=n;r++)if(i=o,o=t[2*(r+1)+1],!(++s<u&&i===o)){if(s<A)do{lt(e,i,e.bl_tree)}while(0!==--s);else 0!==i?(i!==a&&(lt(e,i,e.bl_tree),s--),lt(e,16,e.bl_tree),ct(e,s-3,2)):s<=10?(lt(e,17,e.bl_tree),ct(e,s-3,3)):(lt(e,18,e.bl_tree),ct(e,s-11,7));s=0,a=i,0===o?(u=138,A=3):i===o?(u=6,A=3):(u=7,A=4)}}Je(at);var Et=!1;function Ct(e,t,n,r){ct(e,0+(r?1:0),3),function(e,t,n,r){dt(e),r&&(At(e,n),At(e,~n)),Ye.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}var Bt={_tr_init:function(e){Et||(!function(){var e,t,n,r,i,a=new Array(16);for(n=0,r=0;r<28;r++)for(tt[r]=n,e=0;e<1<<ze[r];e++)et[n++]=r;for(et[n-1]=r,i=0,r=0;r<16;r++)for(at[r]=i,e=0;e<1<<Ke[r];e++)$e[i++]=r;for(i>>=7;r<30;r++)for(at[r]=i<<7,e=0;e<1<<Ke[r]-7;e++)$e[256+i++]=r;for(t=0;t<=15;t++)a[t]=0;for(e=0;e<=143;)Xe[2*e+1]=8,e++,a[8]++;for(;e<=255;)Xe[2*e+1]=9,e++,a[9]++;for(;e<=279;)Xe[2*e+1]=7,e++,a[7]++;for(;e<=287;)Xe[2*e+1]=8,e++,a[8]++;for(ht(Xe,287,a),e=0;e<30;e++)Ze[2*e+1]=5,Ze[2*e]=ft(e,5);nt=new ot(Xe,ze,257,286,15),rt=new ot(Ze,Ke,0,30,15),it=new ot(new Array(0),We,0,19,7)}(),Et=!0),e.l_desc=new st(e.dyn_ltree,nt),e.d_desc=new st(e.dyn_dtree,rt),e.bl_desc=new st(e.bl_tree,it),e.bi_buf=0,e.bi_valid=0,gt(e)},_tr_stored_block:Ct,_tr_flush_block:function(e,t,n,r){var i,a,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),mt(e,e.l_desc),mt(e,e.d_desc),o=function(e){var t;for(It(e,e.dyn_ltree,e.l_desc.max_code),It(e,e.dyn_dtree,e.d_desc.max_code),mt(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*Ve[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=n+5,n+4<=i&&-1!==t?Ct(e,t,n,r):4===e.strategy||a===i?(ct(e,2+(r?1:0),3),yt(e,Xe,Ze)):(ct(e,4+(r?1:0),3),function(e,t,n,r){var i;for(ct(e,t-257,5),ct(e,n-1,5),ct(e,r-4,4),i=0;i<r;i++)ct(e,e.bl_tree[2*Ve[i]+1],3);bt(e,e.dyn_ltree,t-1),bt(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),yt(e,e.dyn_ltree,e.dyn_dtree)),gt(e),r&&dt(e)},_tr_tally:function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(et[n]+256+1)]++,e.dyn_dtree[2*ut(t)]++),e.last_lit===e.lit_bufsize-1},_tr_align:function(e){ct(e,2,3),lt(e,256,Xe),function(e){16===e.bi_valid?(At(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}};var wt=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;0!==n;){n-=o=n>2e3?2e3:n;do{a=a+(i=i+t[r++]|0)|0}while(--o);i%=65521,a%=65521}return i|a<<16|0};var Qt=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();var kt,_t=function(e,t,n,r){var i=Qt,a=r+n;e^=-1;for(var o=r;o<a;o++)e=e>>>8^i[255&(e^t[o])];return-1^e},xt={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function St(e,t){return e.msg=xt[t],t}function Ot(e){return(e<<1)-(e>4?9:0)}function Dt(e){for(var t=e.length;--t>=0;)e[t]=0}function Rt(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(Ye.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function jt(e,t){Bt._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Rt(e.strm)}function Mt(e,t){e.pending_buf[e.pending++]=t}function Nt(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function Ft(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),0===i?0:(e.avail_in-=i,Ye.arraySet(t,e.input,e.next_in,i,n),1===e.state.wrap?e.adler=wt(e.adler,t,i,n):2===e.state.wrap&&(e.adler=_t(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)}function Tt(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,A=e.window,c=e.w_mask,l=e.prev,f=e.strstart+258,h=A[a+o-1],g=A[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(A[(n=t)+o]===g&&A[n+o-1]===h&&A[n]===A[a]&&A[++n]===A[a+1]){a+=2,n++;do{}while(A[++a]===A[++n]&&A[++a]===A[++n]&&A[++a]===A[++n]&&A[++a]===A[++n]&&A[++a]===A[++n]&&A[++a]===A[++n]&&A[++a]===A[++n]&&A[++a]===A[++n]&&a<f);if(r=258-(f-a),a=f-258,r>o){if(e.match_start=t,o=r,r>=s)break;h=A[a+o-1],g=A[a+o]}}}while((t=l[t&c])>u&&0!==--i);return o<=e.lookahead?o:e.lookahead}function Lt(e){var t,n,r,i,a,o=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=o+(o-262)){Ye.arraySet(e.window,e.window,o,o,0),e.match_start-=o,e.strstart-=o,e.block_start-=o,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=o?r-o:0}while(--n);t=n=o;do{r=e.prev[--t],e.prev[t]=r>=o?r-o:0}while(--n);i+=o}if(0===e.strm.avail_in)break;if(n=Ft(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=n,e.lookahead+e.insert>=3)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+3-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)}function Pt(e,t){for(var n,r;;){if(e.lookahead<262){if(Lt(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=Tt(e,n)),e.match_length>=3)if(r=Bt._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!==--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=Bt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(jt(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(jt(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(jt(e,!1),0===e.strm.avail_out)?1:2}function Ut(e,t){for(var n,r,i;;){if(e.lookahead<262){if(Lt(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=Tt(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=Bt._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!==--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(jt(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=Bt._tr_tally(e,0,e.window[e.strstart-1]))&&jt(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Bt._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(jt(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(jt(e,!1),0===e.strm.avail_out)?1:2}function Gt(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function qt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Ye.Buf16(1146),this.dyn_dtree=new Ye.Buf16(122),this.bl_tree=new Ye.Buf16(78),Dt(this.dyn_ltree),Dt(this.dyn_dtree),Dt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Ye.Buf16(16),this.heap=new Ye.Buf16(573),Dt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Ye.Buf16(573),Dt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ht(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=0,Bt._tr_init(t),0):St(e,-2)}function Yt(e){var t,n=Ht(e);return 0===n&&((t=e.state).window_size=2*t.w_size,Dt(t.head),t.max_lazy_match=kt[t.level].max_lazy,t.good_match=kt[t.level].good_length,t.nice_match=kt[t.level].nice_length,t.max_chain_length=kt[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),n}function Jt(e,t,n,r,i,a){if(!e)return-2;var o=1;if(-1===t&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>9||8!==n||r<8||r>15||t<0||t>9||a<0||a>4)return St(e,-2);8===r&&(r=9);var s=new qt;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Ye.Buf8(2*s.w_size),s.head=new Ye.Buf16(s.hash_size),s.prev=new Ye.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new Ye.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=a,s.method=n,Yt(e)}kt=[new Gt(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Lt(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,jt(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(jt(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(jt(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(jt(e,!1),e.strm.avail_out),1)})),new Gt(4,4,8,4,Pt),new Gt(4,5,16,8,Pt),new Gt(4,6,32,32,Pt),new Gt(4,4,16,16,Ut),new Gt(8,16,32,32,Ut),new Gt(8,16,128,128,Ut),new Gt(8,32,128,256,Ut),new Gt(32,128,258,1024,Ut),new Gt(32,258,258,4096,Ut)];var zt={deflateInit:function(e,t){return Jt(e,t,8,15,8,0)},deflateInit2:Jt,deflateReset:Yt,deflateResetKeep:Ht,deflateSetHeader:function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},deflate:function(e,t){var n,r,i,a;if(!e||!e.state||t>5||t<0)return e?St(e,-2):-2;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||666===r.status&&4!==t)return St(e,0===e.avail_out?-5:-2);if(r.strm=e,n=r.last_flush,r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,Mt(r,31),Mt(r,139),Mt(r,8),r.gzhead?(Mt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Mt(r,255&r.gzhead.time),Mt(r,r.gzhead.time>>8&255),Mt(r,r.gzhead.time>>16&255),Mt(r,r.gzhead.time>>24&255),Mt(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Mt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Mt(r,255&r.gzhead.extra.length),Mt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=_t(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Mt(r,0),Mt(r,0),Mt(r,0),Mt(r,0),Mt(r,0),Mt(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Mt(r,3),r.status=113);else{var o=8+(r.w_bits-8<<4)<<8;o|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(o|=32),o+=31-o%31,r.status=113,Nt(r,o),0!==r.strstart&&(Nt(r,e.adler>>>16),Nt(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(e.adler=_t(e.adler,r.pending_buf,r.pending-i,i)),Rt(e),i=r.pending,r.pending!==r.pending_buf_size));)Mt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=_t(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=_t(e.adler,r.pending_buf,r.pending-i,i)),Rt(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}a=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Mt(r,a)}while(0!==a);r.gzhead.hcrc&&r.pending>i&&(e.adler=_t(e.adler,r.pending_buf,r.pending-i,i)),0===a&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=_t(e.adler,r.pending_buf,r.pending-i,i)),Rt(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}a=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Mt(r,a)}while(0!==a);r.gzhead.hcrc&&r.pending>i&&(e.adler=_t(e.adler,r.pending_buf,r.pending-i,i)),0===a&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Rt(e),r.pending+2<=r.pending_buf_size&&(Mt(r,255&e.adler),Mt(r,e.adler>>8&255),e.adler=0,r.status=113)):r.status=113),0!==r.pending){if(Rt(e),0===e.avail_out)return r.last_flush=-1,0}else if(0===e.avail_in&&Ot(t)<=Ot(n)&&4!==t)return St(e,-5);if(666===r.status&&0!==e.avail_in)return St(e,-5);if(0!==e.avail_in||0!==r.lookahead||0!==t&&666!==r.status){var s=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(Lt(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=Bt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(jt(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(jt(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(jt(e,!1),0===e.strm.avail_out)?1:2}(r,t):3===r.strategy?function(e,t){for(var n,r,i,a,o=e.window;;){if(e.lookahead<=258){if(Lt(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=o[i=e.strstart-1])===o[++i]&&r===o[++i]&&r===o[++i]){a=e.strstart+258;do{}while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=258-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=Bt._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Bt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(jt(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(jt(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(jt(e,!1),0===e.strm.avail_out)?1:2}(r,t):kt[r.level].func(r,t);if(3!==s&&4!==s||(r.status=666),1===s||3===s)return 0===e.avail_out&&(r.last_flush=-1),0;if(2===s&&(1===t?Bt._tr_align(r):5!==t&&(Bt._tr_stored_block(r,0,0,!1),3===t&&(Dt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Rt(e),0===e.avail_out))return r.last_flush=-1,0}return 4!==t?0:r.wrap<=0?1:(2===r.wrap?(Mt(r,255&e.adler),Mt(r,e.adler>>8&255),Mt(r,e.adler>>16&255),Mt(r,e.adler>>24&255),Mt(r,255&e.total_in),Mt(r,e.total_in>>8&255),Mt(r,e.total_in>>16&255),Mt(r,e.total_in>>24&255)):(Nt(r,e.adler>>>16),Nt(r,65535&e.adler)),Rt(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},deflateEnd:function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?St(e,-2):(e.state=null,113===t?St(e,-3):0):-2},deflateSetDictionary:function(e,t){var n,r,i,a,o,s,u,A,c=t.length;if(!e||!e.state)return-2;if(2===(a=(n=e.state).wrap)||1===a&&42!==n.status||n.lookahead)return-2;for(1===a&&(e.adler=wt(e.adler,t,c,0)),n.wrap=0,c>=n.w_size&&(0===a&&(Dt(n.head),n.strstart=0,n.block_start=0,n.insert=0),A=new Ye.Buf8(n.w_size),Ye.arraySet(A,t,c-n.w_size,n.w_size,0),t=A,c=n.w_size),o=e.avail_in,s=e.next_in,u=e.input,e.avail_in=c,e.next_in=0,e.input=t,Lt(n);n.lookahead>=3;){r=n.strstart,i=n.lookahead-2;do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+3-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++}while(--i);n.strstart=r,n.lookahead=2,Lt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=s,e.input=u,e.avail_in=o,n.wrap=a,0},deflateInfo:"pako deflate (from Nodeca project)"},Kt=!0,Wt=!0;try{String.fromCharCode.apply(null,[0])}catch(vr){Kt=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(vr){Wt=!1}for(var Vt=new Ye.Buf8(256),Xt=0;Xt<256;Xt++)Vt[Xt]=Xt>=252?6:Xt>=248?5:Xt>=240?4:Xt>=224?3:Xt>=192?2:1;Vt[254]=Vt[254]=1;function Zt(e,t){if(t<65534&&(e.subarray&&Wt||!e.subarray&&Kt))return String.fromCharCode.apply(null,Ye.shrinkBuf(e,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}var $t=function(e){var t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)55296===(64512&(n=e.charCodeAt(i)))&&i+1<o&&56320===(64512&(r=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(r-56320),i++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Ye.Buf8(s),a=0,i=0;a<s;i++)55296===(64512&(n=e.charCodeAt(i)))&&i+1<o&&56320===(64512&(r=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(r-56320),i++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},en=function(e){return Zt(e,e.length)},tn=function(e){for(var t=new Ye.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},nn=function(e,t){var n,r,i,a,o=t||e.length,s=new Array(2*o);for(r=0,n=0;n<o;)if((i=e[n++])<128)s[r++]=i;else if((a=Vt[i])>4)s[r++]=65533,n+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&n<o;)i=i<<6|63&e[n++],a--;a>1?s[r++]=65533:i<65536?s[r++]=i:(i-=65536,s[r++]=55296|i>>10&1023,s[r++]=56320|1023&i)}return Zt(s,r)},rn=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128===(192&e[n]);)n--;return n<0||0===n?t:n+Vt[e[n]]>t?n:t};var an=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},on=Object.prototype.toString;function sn(e){if(!(this instanceof sn))return new sn(e);this.options=Ye.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new an,this.strm.avail_out=0;var n=zt.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(xt[n]);if(t.header&&zt.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(r="string"===typeof t.dictionary?$t(t.dictionary):"[object ArrayBuffer]"===on.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=zt.deflateSetDictionary(this.strm,r)))throw new Error(xt[n]);this._dict_set=!0}}function un(e,t){var n=new sn(t);if(n.push(e,!0),n.err)throw n.msg||xt[n.err];return n.result}sn.prototype.push=function(e,t){var n,r,i=this.strm,a=this.options.chunkSize;if(this.ended)return!1;r=t===~~t?t:!0===t?4:0,"string"===typeof e?i.input=$t(e):"[object ArrayBuffer]"===on.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new Ye.Buf8(a),i.next_out=0,i.avail_out=a),1!==(n=zt.deflate(i,r))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==i.avail_out&&(0!==i.avail_in||4!==r&&2!==r)||("string"===this.options.to?this.onData(en(Ye.shrinkBuf(i.output,i.next_out))):this.onData(Ye.shrinkBuf(i.output,i.next_out)))}while((i.avail_in>0||0===i.avail_out)&&1!==n);return 4===r?(n=zt.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==r||(this.onEnd(0),i.avail_out=0,!0)},sn.prototype.onData=function(e){this.chunks.push(e)},sn.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ye.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var An={Deflate:sn,deflate:un,deflateRaw:function(e,t){return(t=t||{}).raw=!0,un(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,un(e,t)}},cn=function(e,t){var n,r,i,a,o,s,u,A,c,l,f,h,g,d,p,v,y,m,I,b,E,C,B,w,Q;n=e.state,r=e.next_in,w=e.input,i=r+(e.avail_in-5),a=e.next_out,Q=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),u=n.dmax,A=n.wsize,c=n.whave,l=n.wnext,f=n.window,h=n.hold,g=n.bits,d=n.lencode,p=n.distcode,v=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;e:do{g<15&&(h+=w[r++]<<g,g+=8,h+=w[r++]<<g,g+=8),m=d[h&v];t:for(;;){if(h>>>=I=m>>>24,g-=I,0===(I=m>>>16&255))Q[a++]=65535&m;else{if(!(16&I)){if(0===(64&I)){m=d[(65535&m)+(h&(1<<I)-1)];continue t}if(32&I){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}b=65535&m,(I&=15)&&(g<I&&(h+=w[r++]<<g,g+=8),b+=h&(1<<I)-1,h>>>=I,g-=I),g<15&&(h+=w[r++]<<g,g+=8,h+=w[r++]<<g,g+=8),m=p[h&y];n:for(;;){if(h>>>=I=m>>>24,g-=I,!(16&(I=m>>>16&255))){if(0===(64&I)){m=p[(65535&m)+(h&(1<<I)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(E=65535&m,g<(I&=15)&&(h+=w[r++]<<g,(g+=8)<I&&(h+=w[r++]<<g,g+=8)),(E+=h&(1<<I)-1)>u){e.msg="invalid distance too far back",n.mode=30;break e}if(h>>>=I,g-=I,E>(I=a-o)){if((I=E-I)>c&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(C=0,B=f,0===l){if(C+=A-I,I<b){b-=I;do{Q[a++]=f[C++]}while(--I);C=a-E,B=Q}}else if(l<I){if(C+=A+l-I,(I-=l)<b){b-=I;do{Q[a++]=f[C++]}while(--I);if(C=0,l<b){b-=I=l;do{Q[a++]=f[C++]}while(--I);C=a-E,B=Q}}}else if(C+=l-I,I<b){b-=I;do{Q[a++]=f[C++]}while(--I);C=a-E,B=Q}for(;b>2;)Q[a++]=B[C++],Q[a++]=B[C++],Q[a++]=B[C++],b-=3;b&&(Q[a++]=B[C++],b>1&&(Q[a++]=B[C++]))}else{C=a-E;do{Q[a++]=Q[C++],Q[a++]=Q[C++],Q[a++]=Q[C++],b-=3}while(b>2);b&&(Q[a++]=Q[C++],b>1&&(Q[a++]=Q[C++]))}break}}break}}while(r<i&&a<s);r-=b=g>>3,h&=(1<<(g-=b<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=a<s?s-a+257:257-(a-s),n.hold=h,n.bits=g},ln=[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,0,0],fn=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],hn=[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,0,0],gn=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],dn=function(e,t,n,r,i,a,o,s){var u,A,c,l,f,h,g,d,p,v=s.bits,y=0,m=0,I=0,b=0,E=0,C=0,B=0,w=0,Q=0,k=0,_=null,x=0,S=new Ye.Buf16(16),O=new Ye.Buf16(16),D=null,R=0;for(y=0;y<=15;y++)S[y]=0;for(m=0;m<r;m++)S[t[n+m]]++;for(E=v,b=15;b>=1&&0===S[b];b--);if(E>b&&(E=b),0===b)return i[a++]=20971520,i[a++]=20971520,s.bits=1,0;for(I=1;I<b&&0===S[I];I++);for(E<I&&(E=I),w=1,y=1;y<=15;y++)if(w<<=1,(w-=S[y])<0)return-1;if(w>0&&(0===e||1!==b))return-1;for(O[1]=0,y=1;y<15;y++)O[y+1]=O[y]+S[y];for(m=0;m<r;m++)0!==t[n+m]&&(o[O[t[n+m]]++]=m);if(0===e?(_=D=o,h=19):1===e?(_=ln,x-=257,D=fn,R-=257,h=256):(_=hn,D=gn,h=-1),k=0,m=0,y=I,f=a,C=E,B=0,c=-1,l=(Q=1<<E)-1,1===e&&Q>852||2===e&&Q>592)return 1;for(;;){g=y-B,o[m]<h?(d=0,p=o[m]):o[m]>h?(d=D[R+o[m]],p=_[x+o[m]]):(d=96,p=0),u=1<<y-B,I=A=1<<C;do{i[f+(k>>B)+(A-=u)]=g<<24|d<<16|p|0}while(0!==A);for(u=1<<y-1;k&u;)u>>=1;if(0!==u?(k&=u-1,k+=u):k=0,m++,0===--S[y]){if(y===b)break;y=t[n+o[m]]}if(y>E&&(k&l)!==c){for(0===B&&(B=E),f+=I,w=1<<(C=y-B);C+B<b&&!((w-=S[C+B])<=0);)C++,w<<=1;if(Q+=1<<C,1===e&&Q>852||2===e&&Q>592)return 1;i[c=k&l]=E<<24|C<<16|f-a|0}}return 0!==k&&(i[f+k]=y-B<<24|64<<16|0),s.bits=E,0};function pn(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function vn(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Ye.Buf16(320),this.work=new Ye.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function yn(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Ye.Buf32(852),t.distcode=t.distdyn=new Ye.Buf32(592),t.sane=1,t.back=-1,0):-2}function mn(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,yn(e)):-2}function In(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,mn(e))):-2}function bn(e,t){var n,r;return e?(r=new vn,e.state=r,r.window=null,0!==(n=In(e,t))&&(e.state=null),n):-2}var En,Cn,Bn=!0;function wn(e){if(Bn){var t;for(En=new Ye.Buf32(512),Cn=new Ye.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(dn(1,e.lens,0,288,En,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;dn(2,e.lens,0,32,Cn,0,e.work,{bits:5}),Bn=!1}e.lencode=En,e.lenbits=9,e.distcode=Cn,e.distbits=5}function Qn(e,t,n,r){var i,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Ye.Buf8(a.wsize)),r>=a.wsize?(Ye.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((i=a.wsize-a.wnext)>r&&(i=r),Ye.arraySet(a.window,t,n-r,i,a.wnext),(r-=i)?(Ye.arraySet(a.window,t,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}var kn={inflateReset:mn,inflateReset2:In,inflateResetKeep:yn,inflateInit:function(e){return bn(e,15)},inflateInit2:bn,inflate:function(e,t){var n,r,i,a,o,s,u,A,c,l,f,h,g,d,p,v,y,m,I,b,E,C,B,w,Q=0,k=new Ye.Buf8(4),_=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(n=e.state).mode&&(n.mode=13),o=e.next_out,i=e.output,u=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,A=n.hold,c=n.bits,l=s,f=u,C=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;c<16;){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}if(2&n.wrap&&35615===A){n.check=0,k[0]=255&A,k[1]=A>>>8&255,n.check=_t(n.check,k,2,0),A=0,c=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&A)<<8)+(A>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!==(15&A)){e.msg="unknown compression method",n.mode=30;break}if(c-=4,E=8+(15&(A>>>=4)),0===n.wbits)n.wbits=E;else if(E>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<E,e.adler=n.check=1,n.mode=512&A?10:12,A=0,c=0;break;case 2:for(;c<16;){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}if(n.flags=A,8!==(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=A>>8&1),512&n.flags&&(k[0]=255&A,k[1]=A>>>8&255,n.check=_t(n.check,k,2,0)),A=0,c=0,n.mode=3;case 3:for(;c<32;){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}n.head&&(n.head.time=A),512&n.flags&&(k[0]=255&A,k[1]=A>>>8&255,k[2]=A>>>16&255,k[3]=A>>>24&255,n.check=_t(n.check,k,4,0)),A=0,c=0,n.mode=4;case 4:for(;c<16;){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}n.head&&(n.head.xflags=255&A,n.head.os=A>>8),512&n.flags&&(k[0]=255&A,k[1]=A>>>8&255,n.check=_t(n.check,k,2,0)),A=0,c=0,n.mode=5;case 5:if(1024&n.flags){for(;c<16;){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}n.length=A,n.head&&(n.head.extra_len=A),512&n.flags&&(k[0]=255&A,k[1]=A>>>8&255,n.check=_t(n.check,k,2,0)),A=0,c=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((h=n.length)>s&&(h=s),h&&(n.head&&(E=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Ye.arraySet(n.head.extra,r,a,h,E)),512&n.flags&&(n.check=_t(n.check,r,h,a)),s-=h,a+=h,n.length-=h),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===s)break e;h=0;do{E=r[a+h++],n.head&&E&&n.length<65536&&(n.head.name+=String.fromCharCode(E))}while(E&&h<s);if(512&n.flags&&(n.check=_t(n.check,r,h,a)),s-=h,a+=h,E)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===s)break e;h=0;do{E=r[a+h++],n.head&&E&&n.length<65536&&(n.head.comment+=String.fromCharCode(E))}while(E&&h<s);if(512&n.flags&&(n.check=_t(n.check,r,h,a)),s-=h,a+=h,E)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;c<16;){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}if(A!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}A=0,c=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;c<32;){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}e.adler=n.check=pn(A),A=0,c=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,n.hold=A,n.bits=c,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){A>>>=7&c,c-=7&c,n.mode=27;break}for(;c<3;){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}switch(n.last=1&A,c-=1,3&(A>>>=1)){case 0:n.mode=14;break;case 1:if(wn(n),n.mode=20,6===t){A>>>=2,c-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}A>>>=2,c-=2;break;case 14:for(A>>>=7&c,c-=7&c;c<32;){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}if((65535&A)!==(A>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&A,A=0,c=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(h=n.length){if(h>s&&(h=s),h>u&&(h=u),0===h)break e;Ye.arraySet(i,r,a,h,o),s-=h,a+=h,u-=h,o+=h,n.length-=h;break}n.mode=12;break;case 17:for(;c<14;){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}if(n.nlen=257+(31&A),A>>>=5,c-=5,n.ndist=1+(31&A),A>>>=5,c-=5,n.ncode=4+(15&A),A>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;c<3;){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}n.lens[_[n.have++]]=7&A,A>>>=3,c-=3}for(;n.have<19;)n.lens[_[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,B={bits:n.lenbits},C=dn(0,n.lens,0,19,n.lencode,0,n.work,B),n.lenbits=B.bits,C){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;v=(Q=n.lencode[A&(1<<n.lenbits)-1])>>>16&255,y=65535&Q,!((p=Q>>>24)<=c);){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}if(y<16)A>>>=p,c-=p,n.lens[n.have++]=y;else{if(16===y){for(w=p+2;c<w;){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}if(A>>>=p,c-=p,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}E=n.lens[n.have-1],h=3+(3&A),A>>>=2,c-=2}else if(17===y){for(w=p+3;c<w;){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}c-=p,E=0,h=3+(7&(A>>>=p)),A>>>=3,c-=3}else{for(w=p+7;c<w;){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}c-=p,E=0,h=11+(127&(A>>>=p)),A>>>=7,c-=7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;h--;)n.lens[n.have++]=E}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,B={bits:n.lenbits},C=dn(1,n.lens,0,n.nlen,n.lencode,0,n.work,B),n.lenbits=B.bits,C){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,B={bits:n.distbits},C=dn(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,B),n.distbits=B.bits,C){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(s>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,n.hold=A,n.bits=c,cn(e,f),o=e.next_out,i=e.output,u=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,A=n.hold,c=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;v=(Q=n.lencode[A&(1<<n.lenbits)-1])>>>16&255,y=65535&Q,!((p=Q>>>24)<=c);){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}if(v&&0===(240&v)){for(m=p,I=v,b=y;v=(Q=n.lencode[b+((A&(1<<m+I)-1)>>m)])>>>16&255,y=65535&Q,!(m+(p=Q>>>24)<=c);){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}A>>>=m,c-=m,n.back+=m}if(A>>>=p,c-=p,n.back+=p,n.length=y,0===v){n.mode=26;break}if(32&v){n.back=-1,n.mode=12;break}if(64&v){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&v,n.mode=22;case 22:if(n.extra){for(w=n.extra;c<w;){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}n.length+=A&(1<<n.extra)-1,A>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;v=(Q=n.distcode[A&(1<<n.distbits)-1])>>>16&255,y=65535&Q,!((p=Q>>>24)<=c);){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}if(0===(240&v)){for(m=p,I=v,b=y;v=(Q=n.distcode[b+((A&(1<<m+I)-1)>>m)])>>>16&255,y=65535&Q,!(m+(p=Q>>>24)<=c);){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}A>>>=m,c-=m,n.back+=m}if(A>>>=p,c-=p,n.back+=p,64&v){e.msg="invalid distance code",n.mode=30;break}n.offset=y,n.extra=15&v,n.mode=24;case 24:if(n.extra){for(w=n.extra;c<w;){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}n.offset+=A&(1<<n.extra)-1,A>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===u)break e;if(h=f-u,n.offset>h){if((h=n.offset-h)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}h>n.wnext?(h-=n.wnext,g=n.wsize-h):g=n.wnext-h,h>n.length&&(h=n.length),d=n.window}else d=i,g=o-n.offset,h=n.length;h>u&&(h=u),u-=h,n.length-=h;do{i[o++]=d[g++]}while(--h);0===n.length&&(n.mode=21);break;case 26:if(0===u)break e;i[o++]=n.length,u--,n.mode=21;break;case 27:if(n.wrap){for(;c<32;){if(0===s)break e;s--,A|=r[a++]<<c,c+=8}if(f-=u,e.total_out+=f,n.total+=f,f&&(e.adler=n.check=n.flags?_t(n.check,i,f,o-f):wt(n.check,i,f,o-f)),f=u,(n.flags?A:pn(A))!==n.check){e.msg="incorrect data check",n.mode=30;break}A=0,c=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;c<32;){if(0===s)break e;s--,A+=r[a++]<<c,c+=8}if(A!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}A=0,c=0}n.mode=29;case 29:C=1;break e;case 30:C=-3;break e;case 31:return-4;case 32:default:return-2}return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,n.hold=A,n.bits=c,(n.wsize||f!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&Qn(e,e.output,e.next_out,f-e.avail_out),l-=e.avail_in,f-=e.avail_out,e.total_in+=l,e.total_out+=f,n.total+=f,n.wrap&&f&&(e.adler=n.check=n.flags?_t(n.check,i,f,e.next_out-f):wt(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0===l&&0===f||4===t)&&0===C&&(C=-5),C},inflateEnd:function(e){if(!e||!e.state)return-2;var t=e.state;return t.window&&(t.window=null),e.state=null,0},inflateGetHeader:function(e,t){var n;return e&&e.state?0===(2&(n=e.state).wrap)?-2:(n.head=t,t.done=!1,0):-2},inflateSetDictionary:function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?-2:11===n.mode&&wt(1,t,r,0)!==n.check?-3:Qn(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,0):-2},inflateInfo:"pako inflate (from Nodeca project)"},_n={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};var xn=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},Sn=Object.prototype.toString;function On(e){if(!(this instanceof On))return new On(e);this.options=Ye.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0===(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new an,this.strm.avail_out=0;var n=kn.inflateInit2(this.strm,t.windowBits);if(n!==_n.Z_OK)throw new Error(xt[n]);if(this.header=new xn,kn.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"===typeof t.dictionary?t.dictionary=$t(t.dictionary):"[object ArrayBuffer]"===Sn.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=kn.inflateSetDictionary(this.strm,t.dictionary))!==_n.Z_OK))throw new Error(xt[n])}function Dn(e,t){var n=new On(t);if(n.push(e,!0),n.err)throw n.msg||xt[n.err];return n.result}On.prototype.push=function(e,t){var n,r,i,a,o,s=this.strm,u=this.options.chunkSize,A=this.options.dictionary,c=!1;if(this.ended)return!1;r=t===~~t?t:!0===t?_n.Z_FINISH:_n.Z_NO_FLUSH,"string"===typeof e?s.input=tn(e):"[object ArrayBuffer]"===Sn.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new Ye.Buf8(u),s.next_out=0,s.avail_out=u),(n=kn.inflate(s,_n.Z_NO_FLUSH))===_n.Z_NEED_DICT&&A&&(n=kn.inflateSetDictionary(this.strm,A)),n===_n.Z_BUF_ERROR&&!0===c&&(n=_n.Z_OK,c=!1),n!==_n.Z_STREAM_END&&n!==_n.Z_OK)return this.onEnd(n),this.ended=!0,!1;s.next_out&&(0!==s.avail_out&&n!==_n.Z_STREAM_END&&(0!==s.avail_in||r!==_n.Z_FINISH&&r!==_n.Z_SYNC_FLUSH)||("string"===this.options.to?(i=rn(s.output,s.next_out),a=s.next_out-i,o=nn(s.output,i),s.next_out=a,s.avail_out=u-a,a&&Ye.arraySet(s.output,s.output,i,a,0),this.onData(o)):this.onData(Ye.shrinkBuf(s.output,s.next_out)))),0===s.avail_in&&0===s.avail_out&&(c=!0)}while((s.avail_in>0||0===s.avail_out)&&n!==_n.Z_STREAM_END);return n===_n.Z_STREAM_END&&(r=_n.Z_FINISH),r===_n.Z_FINISH?(n=kn.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===_n.Z_OK):r!==_n.Z_SYNC_FLUSH||(this.onEnd(_n.Z_OK),s.avail_out=0,!0)},On.prototype.onData=function(e){this.chunks.push(e)},On.prototype.onEnd=function(e){e===_n.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ye.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Rn={Inflate:On,inflate:Dn,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Dn(e,t)},ungzip:Dn},jn={};(0,Ye.assign)(jn,An,Rn,_n);var Mn=jn,Nn=function(){var e=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(Object(h.a)(this,e),t<0||t>9)throw new Error("Invalid gzip compression level, it should be between 0 and 9");this.level=t}return Object(A.a)(e,[{key:"encode",value:function(e){return Mn.gzip(e,{level:this.level})}},{key:"decode",value:function(e,t){var n=Mn.ungzip(e);return void 0!==t?(t.set(n),t):n}}],[{key:"fromConfig",value:function(t){return new e(t.level)}}]),e}();return e.codecId="gzip",e}(),Fn=function(){var e=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(Object(h.a)(this,e),t<-1||t>9)throw new Error("Invalid zlib compression level, it should be between -1 and 9");this.level=t}return Object(A.a)(e,[{key:"encode",value:function(e){return Mn.deflate(e,{level:this.level})}},{key:"decode",value:function(e,t){var n=Mn.inflate(e);return void 0!==t?(t.set(n),t):n}}],[{key:"fromConfig",value:function(t){return new e(t.level)}}]),e}();return e.codecId="zlib",e}();function Tn(e,t){var n=function(e){if("undefined"!==typeof i&&null!=i.versions&&null!=i.versions.node)return r.from(e,"base64");for(var t=globalThis.atob(e),n=t.length,a=new Uint8Array(n),o=0;o<n;o++)a[o]=t.charCodeAt(o);return a}(t);return new Promise((function(t){var r=e({noInitialRun:!0,onRuntimeInitialized:function(){delete r.then,t(r)},wasmBinary:n})}))}var Ln,Pn=function(){"undefined"!==typeof document&&document.currentScript&&document.currentScript.src;return function(e){var t;e=e||{},t||(t="undefined"!==typeof e?e:{});var n,r={};for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);var i,a="./this.program",o=t.print||console.log.bind(console),s=t.printErr||console.warn.bind(console);for(n in r)r.hasOwnProperty(n)&&(t[n]=r[n]);r=null,t.thisProgram&&(a=t.thisProgram),t.wasmBinary&&(i=t.wasmBinary),t.noExitRuntime&&t.noExitRuntime,"object"!==typeof WebAssembly&&s("no native wasm support detected");var u,A=new WebAssembly.Table({initial:86,maximum:86,element:"anyfunc"}),c=!1,l="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;function f(e,t,n){var r=t+n;for(n=t;e[n]&&!(n>=r);)++n;if(16<n-t&&e.subarray&&l)return l.decode(e.subarray(t,n));for(r="";t<n;){var i=e[t++];if(128&i){var a=63&e[t++];if(192==(224&i))r+=String.fromCharCode((31&i)<<6|a);else{var o=63&e[t++];65536>(i=224==(240&i)?(15&i)<<12|a<<6|o:(7&i)<<18|a<<12|o<<6|63&e[t++])?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i))}}else r+=String.fromCharCode(i)}return r}var h,g,d,p,v,y,m,I,b,E="undefined"!==typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function C(e){var t;for(t=e>>1;p[t];)++t;if(32<(t<<=1)-e&&E)return E.decode(d.subarray(e,t));t=0;for(var n="";;){var r=p[e+2*t>>1];if(0==r)return n;++t,n+=String.fromCharCode(r)}}function B(e,t,n){if(void 0===n&&(n=2147483647),2>n)return 0;var r=t;n=(n-=2)<2*e.length?n/2:e.length;for(var i=0;i<n;++i)p[t>>1]=e.charCodeAt(i),t+=2;return p[t>>1]=0,t-r}function w(e){return 2*e.length}function Q(e){for(var t=0,n="";;){var r=y[e+4*t>>2];if(0==r)return n;++t,65536<=r?(r-=65536,n+=String.fromCharCode(55296|r>>10,56320|1023&r)):n+=String.fromCharCode(r)}}function k(e,t,n){if(void 0===n&&(n=2147483647),4>n)return 0;var r=t;n=r+n-4;for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&57343>=a)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i);if(y[t>>2]=a,(t+=4)+4>n)break}return y[t>>2]=0,t-r}function _(e){for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);55296<=r&&57343>=r&&++n,t+=4}return t}function x(e){h=e,t.HEAP8=g=new Int8Array(e),t.HEAP16=p=new Int16Array(e),t.HEAP32=y=new Int32Array(e),t.HEAPU8=d=new Uint8Array(e),t.HEAPU16=v=new Uint16Array(e),t.HEAPU32=m=new Uint32Array(e),t.HEAPF32=I=new Float32Array(e),t.HEAPF64=b=new Float64Array(e)}var S=t.INITIAL_MEMORY||16777216;function O(e){for(;0<e.length;){var n=e.shift();if("function"==typeof n)n(t);else{var r=n.ba;"number"===typeof r?void 0===n.Y?t.dynCall_v(r):t.dynCall_vi(r,n.Y):r(void 0===n.Y?null:n.Y)}}}(u=t.wasmMemory?t.wasmMemory:new WebAssembly.Memory({initial:S/65536,maximum:32768}))&&(h=u.buffer),S=h.byteLength,x(h),y[8104]=5275456;var D=[],R=[],j=[],M=[];function N(){var e=t.preRun.shift();D.unshift(e)}var F=0,T=null;function L(e){throw t.onAbort&&t.onAbort(e),o(e),s(e),c=!0,new WebAssembly.RuntimeError("abort("+e+"). Build with -s ASSERTIONS=1 for more info.")}function P(e){var t=G;return String.prototype.startsWith?t.startsWith(e):0===t.indexOf(e)}function U(){return P("data:application/octet-stream;base64,")}t.preloadedImages={},t.preloadedAudios={};var G="blosc_codec.wasm";if(!U()){var q=G;G=t.locateFile?t.locateFile(q,""):""+q}function H(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}R.push({ba:function(){Be()}});var Y=void 0;function J(e){for(var t="";d[e];)t+=Y[d[e++]];return t}var z={},K={},W={};function V(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=t&&57>=t?"_"+e:e}function X(e,t){return e=V(e),new Function("body","return function "+e+'() {\n    "use strict";    return body.apply(this, arguments);\n};\n')(t)}function Z(e){var t=Error,n=X(e,(function(t){this.name=e,this.message=t,void 0!==(t=Error(t).stack)&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return n.prototype=Object.create(t.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},n}var $=void 0;function ee(e){throw new $(e)}var te=void 0;function ne(e,t,n){if(n=n||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var r=t.name;if(e||ee('type "'+r+'" must have a positive integer typeid pointer'),K.hasOwnProperty(e)){if(n.ca)return;ee("Cannot register type '"+r+"' twice")}K[e]=t,delete W[e],z.hasOwnProperty(e)&&(t=z[e],delete z[e],t.forEach((function(e){e()})))}var re=[],ie=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function ae(e){4<e&&0===--ie[e].Z&&(ie[e]=void 0,re.push(e))}function oe(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=re.length?re.pop():ie.length;return ie[t]={Z:1,value:e},t}}function se(e){return this.fromWireType(m[e>>2])}function ue(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function Ae(e,t){switch(t){case 2:return function(e){return this.fromWireType(I[e>>2])};case 3:return function(e){return this.fromWireType(b[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function ce(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function le(e,n,r){t.hasOwnProperty(e)?((void 0===r||void 0!==t[e].W&&void 0!==t[e].W[r])&&ee("Cannot register public name '"+e+"' twice"),function(e,n){var r=t;if(void 0===r[e].W){var i=r[e];r[e]=function(){return r[e].W.hasOwnProperty(arguments.length)||ee("Function '"+n+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+r[e].W+")!"),r[e].W[arguments.length].apply(this,arguments)},r[e].W=[],r[e].W[i.aa]=i}}(e,e),t.hasOwnProperty(r)&&ee("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),t[e].W[r]=n):(t[e]=n,void 0!==r&&(t[e].ea=r))}var fe=void 0;function he(e){var t=J(e=ke(e));return Qe(e),t}function ge(e,t,n){switch(t){case 0:return n?function(e){return g[e]}:function(e){return d[e]};case 1:return n?function(e){return p[e>>1]}:function(e){return v[e>>1]};case 2:return n?function(e){return y[e>>2]}:function(e){return m[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}var de={};function pe(){if(!ve){var e,t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:a||"./this.program"};for(e in de)t[e]=de[e];var n=[];for(e in t)n.push(e+"="+t[e]);ve=n}return ve}for(var ve,ye=[null,[],[]],me=Array(256),Ie=0;256>Ie;++Ie)me[Ie]=String.fromCharCode(Ie);Y=me,$=t.BindingError=Z("BindingError"),te=t.InternalError=Z("InternalError"),t.count_emval_handles=function(){for(var e=0,t=5;t<ie.length;++t)void 0!==ie[t]&&++e;return e},t.get_first_emval=function(){for(var e=5;e<ie.length;++e)if(void 0!==ie[e])return ie[e];return null},fe=t.UnboundTypeError=Z("UnboundTypeError");var be={o:function(e){return we(e)},n:function(e){throw e},u:function(e,t,n,r,i){var a=H(n);ne(e,{name:t=J(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:i},argPackAdvance:8,readValueFromPointer:function(e){if(1===n)var r=g;else if(2===n)r=p;else{if(4!==n)throw new TypeError("Unknown boolean type size: "+t);r=y}return this.fromWireType(r[e>>a])},X:null})},s:function(e,t){ne(e,{name:t=J(t),fromWireType:function(e){var t=ie[e].value;return ae(e),t},toWireType:function(e,t){return oe(t)},argPackAdvance:8,readValueFromPointer:se,X:null})},f:function(e,t,n){n=H(n),ne(e,{name:t=J(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!==typeof t&&"boolean"!==typeof t)throw new TypeError('Cannot convert "'+ue(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:Ae(t,n),X:null})},d:function(e,n,r,i,a,o){var s=function(e,t){for(var n=[],r=0;r<e;r++)n.push(y[(t>>2)+r]);return n}(n,r);e=J(e),a=function(e,n){e=J(e);for(var r=t["dynCall_"+e],i=[],a=1;a<e.length;++a)i.push("a"+a);return a="return function dynCall_"+e+"_"+n+"("+i.join(", ")+") {\n",a+="    return dynCall(rawFunction"+(i.length?", ":"")+i.join(", ")+");\n","function"!==typeof(r=new Function("dynCall","rawFunction",a+"};\n")(r,n))&&ee("unknown function pointer with signature "+e+": "+n),r}(i,a),le(e,(function(){!function(e,t){var n=[],r={};throw t.forEach((function e(t){r[t]||K[t]||(W[t]?W[t].forEach(e):(n.push(t),r[t]=!0))})),new fe(e+": "+n.map(he).join([", "]))}("Cannot call "+e+" due to unbound types",s)}),n-1),function(e,t){function n(e){if((e=t(e)).length!==r.length)throw new te("Mismatched type converter count");for(var n=0;n<r.length;++n)ne(r[n],e[n])}var r=[];r.forEach((function(t){W[t]=e}));var i=Array(e.length),a=[],o=0;e.forEach((function(e,t){K.hasOwnProperty(e)?i[t]=K[e]:(a.push(e),z.hasOwnProperty(e)||(z[e]=[]),z[e].push((function(){i[t]=K[e],++o===a.length&&n(i)})))})),0===a.length&&n(i)}(s,(function(r){var i=e,s=e;r=[r[0],null].concat(r.slice(1));var u=a,A=r.length;2>A&&ee("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var c=null!==r[1]&&!1,l=!1,f=1;f<r.length;++f)if(null!==r[f]&&void 0===r[f].X){l=!0;break}var h="void"!==r[0].name,g="",d="";for(f=0;f<A-2;++f)g+=(0!==f?", ":"")+"arg"+f,d+=(0!==f?", ":"")+"arg"+f+"Wired";s="return function "+V(s)+"("+g+") {\nif (arguments.length !== "+(A-2)+") {\nthrowBindingError('function "+s+" called with ' + arguments.length + ' arguments, expected "+(A-2)+" args!');\n}\n",l&&(s+="var destructors = [];\n");var p=l?"destructors":"null";for(g="throwBindingError invoker fn runDestructors retType classParam".split(" "),u=[ee,u,o,ce,r[0],r[1]],c&&(s+="var thisWired = classParam.toWireType("+p+", this);\n"),f=0;f<A-2;++f)s+="var arg"+f+"Wired = argType"+f+".toWireType("+p+", arg"+f+"); // "+r[f+2].name+"\n",g.push("argType"+f),u.push(r[f+2]);if(c&&(d="thisWired"+(0<d.length?", ":"")+d),s+=(h?"var rv = ":"")+"invoker(fn"+(0<d.length?", ":"")+d+");\n",l)s+="runDestructors(destructors);\n";else for(f=c?1:2;f<r.length;++f)A=1===f?"thisWired":"arg"+(f-2)+"Wired",null!==r[f].X&&(s+=A+"_dtor("+A+"); // "+r[f].name+"\n",g.push(A+"_dtor"),u.push(r[f].X));if(h&&(s+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),g.push(s+"}\n"),r=function(e){var t=Function;if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var n=X(t.name||"unknownFunctionName",(function(){}));return n.prototype=t.prototype,n=new n,(e=t.apply(n,e))instanceof Object?e:n}(g).apply(null,u),f=n-1,!t.hasOwnProperty(i))throw new te("Replacing nonexistant public symbol");return void 0!==t[i].W&&void 0!==f?t[i].W[f]=r:(t[i]=r,t[i].aa=f),[]}))},b:function(e,t,n,r,i){function a(e){return e}t=J(t),-1===i&&(i=4294967295);var o=H(n);if(0===r){var s=32-8*n;a=function(e){return e<<s>>>s}}var u=-1!=t.indexOf("unsigned");ne(e,{name:t,fromWireType:a,toWireType:function(e,n){if("number"!==typeof n&&"boolean"!==typeof n)throw new TypeError('Cannot convert "'+ue(n)+'" to '+this.name);if(n<r||n>i)throw new TypeError('Passing a number "'+ue(n)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+r+", "+i+"]!");return u?n>>>0:0|n},argPackAdvance:8,readValueFromPointer:ge(t,o,0!==r),X:null})},a:function(e,t,n){function r(e){var t=m;return new i(h,t[(e>>=2)+1],t[e])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];ne(e,{name:n=J(n),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{ca:!0})},g:function(e,t){var n="std::string"===(t=J(t));ne(e,{name:t,fromWireType:function(e){var t=m[e>>2];if(n){var r=d[e+4+t],i=0;0!=r&&(i=r,d[e+4+t]=0);var a=e+4;for(r=0;r<=t;++r){var o=e+4+r;if(0==d[o]){if(a=a?f(d,a,void 0):"",void 0===s)var s=a;else s+=String.fromCharCode(0),s+=a;a=o+1}}0!=i&&(d[e+4+t]=i)}else{for(s=Array(t),r=0;r<t;++r)s[r]=String.fromCharCode(d[e+4+r]);s=s.join("")}return Qe(e),s},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r="string"===typeof t;r||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||ee("Cannot pass non-string to std::string");var i=(n&&r?function(){for(var e=0,n=0;n<t.length;++n){var r=t.charCodeAt(n);55296<=r&&57343>=r&&(r=65536+((1023&r)<<10)|1023&t.charCodeAt(++n)),127>=r?++e:e=2047>=r?e+2:65535>=r?e+3:e+4}return e}:function(){return t.length})(),a=we(4+i+1);if(m[a>>2]=i,n&&r)!function(e,t,n){var r=d;if(0<n){n=t+n-1;for(var i=0;i<e.length;++i){var a=e.charCodeAt(i);if(55296<=a&&57343>=a)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i);if(127>=a){if(t>=n)break;r[t++]=a}else{if(2047>=a){if(t+1>=n)break;r[t++]=192|a>>6}else{if(65535>=a){if(t+2>=n)break;r[t++]=224|a>>12}else{if(t+3>=n)break;r[t++]=240|a>>18,r[t++]=128|a>>12&63}r[t++]=128|a>>6&63}r[t++]=128|63&a}}r[t]=0}}(t,a+4,i+1);else if(r)for(r=0;r<i;++r){var o=t.charCodeAt(r);255<o&&(Qe(a),ee("String has UTF-16 code units that do not fit in 8 bits")),d[a+4+r]=o}else for(r=0;r<i;++r)d[a+4+r]=t[r];return null!==e&&e.push(Qe,a),a},argPackAdvance:8,readValueFromPointer:se,X:function(e){Qe(e)}})},c:function(e,t,n){if(n=J(n),2===t)var r=C,i=B,a=w,o=function(){return v},s=1;else 4===t&&(r=Q,i=k,a=_,o=function(){return m},s=2);ne(e,{name:n,fromWireType:function(e){var n=m[e>>2],i=o(),a=i[e+4+n*t>>s],u=0;0!=a&&(u=a,i[e+4+n*t>>s]=0);var A=e+4;for(a=0;a<=n;++a){var c=e+4+a*t;if(0==i[c>>s]){if(A=r(A),void 0===l)var l=A;else l+=String.fromCharCode(0),l+=A;A=c+t}}return 0!=u&&(i[e+4+n*t>>s]=u),Qe(e),l},toWireType:function(e,r){"string"!==typeof r&&ee("Cannot pass non-string to C++ string type "+n);var o=a(r),u=we(4+o+t);return m[u>>2]=o>>s,i(r,u+4,o+t),null!==e&&e.push(Qe,u),u},argPackAdvance:8,readValueFromPointer:se,X:function(e){Qe(e)}})},v:function(e,t){ne(e,{da:!0,name:t=J(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},m:ae,t:function(e){4<e&&(ie[e].Z+=1)},B:function(e,t){var n=K[e];return void 0===n&&ee("_emval_take_value has unknown type "+he(e)),oe(e=n.readValueFromPointer(t))},w:function(){L()},q:function(e,t,n){d.copyWithin(e,t,t+n)},r:function(e){e>>>=0;var t=d.length;if(2147483648<e)return!1;for(var n=1;4>=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+100663296),0<(r=Math.max(16777216,e,r))%65536&&(r+=65536-r%65536);e:{try{u.grow(Math.min(2147483648,r)-h.byteLength+65535>>>16),x(u.buffer);var i=1;break e}catch(a){}i=void 0}if(i)return!0}return!1},x:function(e,t){var n=0;return pe().forEach((function(r,i){var a=t+n;for(i=y[e+4*i>>2]=a,a=0;a<r.length;++a)g[i++>>0]=r.charCodeAt(a);g[i>>0]=0,n+=r.length+1})),0},y:function(e,t){var n=pe();y[e>>2]=n.length;var r=0;return n.forEach((function(e){r+=e.length+1})),y[t>>2]=r,0},z:function(){return 0},p:function(){},h:function(e,t,n,r){for(var i=0,a=0;a<n;a++){for(var u=y[t+8*a>>2],A=y[t+(8*a+4)>>2],c=0;c<A;c++){var l=d[u+c],h=ye[e];0===l||10===l?((1===e?o:s)(f(h,0)),h.length=0):h.push(l)}i+=A}return y[r>>2]=i,0},memory:u,k:function(){return 0},j:function(){return 0},i:function(){},A:function(){return 6},l:function(){},e:function(){},table:A},Ee=function(){function e(e){t.asm=e.exports,F--,t.monitorRunDependencies&&t.monitorRunDependencies(F),0==F&&T&&(e=T,T=null,e())}function n(t){e(t.instance)}function r(e){return new Promise((function(e){e:{try{if(i){var t=new Uint8Array(i);break e}throw"both async and sync fetching of the wasm failed"}catch(r){L(r)}t=void 0}e(t)})).then((function(e){return WebAssembly.instantiate(e,a)})).then(e,(function(e){s("failed to asynchronously prepare wasm: "+e),L(e)}))}var a={a:be};if(F++,t.monitorRunDependencies&&t.monitorRunDependencies(F),t.instantiateWasm)try{return t.instantiateWasm(a,e)}catch(o){return s("Module.instantiateWasm callback failed with error: "+o),!1}return function(){if(i||"function"!==typeof WebAssembly.instantiateStreaming||U()||P("file://")||"function"!==typeof fetch)return r(n);fetch(G,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,a).then(n,(function(e){s("wasm streaming compile failed: "+e),s("falling back to ArrayBuffer instantiation"),r(n)}))}))}(),{}}();t.asm=Ee;var Ce,Be=t.___wasm_call_ctors=function(){return(Be=t.___wasm_call_ctors=t.asm.C).apply(null,arguments)},we=t._malloc=function(){return(we=t._malloc=t.asm.D).apply(null,arguments)},Qe=t._free=function(){return(Qe=t._free=t.asm.E).apply(null,arguments)},ke=t.___getTypeName=function(){return(ke=t.___getTypeName=t.asm.F).apply(null,arguments)};function _e(){function e(){if(!Ce&&(Ce=!0,t.calledRun=!0,!c)){if(O(R),O(j),t.onRuntimeInitialized&&t.onRuntimeInitialized(),t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;){var e=t.postRun.shift();M.unshift(e)}O(M)}}if(!(0<F)){if(t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)N();O(D),0<F||(t.setStatus?(t.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t.setStatus("")}),1),e()}),1)):e())}}if(t.___embind_register_native_and_builtin_types=function(){return(t.___embind_register_native_and_builtin_types=t.asm.G).apply(null,arguments)},t.dynCall_ii=function(){return(t.dynCall_ii=t.asm.H).apply(null,arguments)},t.dynCall_vi=function(){return(t.dynCall_vi=t.asm.I).apply(null,arguments)},t.dynCall_iii=function(){return(t.dynCall_iii=t.asm.J).apply(null,arguments)},t.dynCall_vii=function(){return(t.dynCall_vii=t.asm.K).apply(null,arguments)},t.dynCall_viii=function(){return(t.dynCall_viii=t.asm.L).apply(null,arguments)},t.dynCall_iiii=function(){return(t.dynCall_iiii=t.asm.M).apply(null,arguments)},t.dynCall_iiiiiii=function(){return(t.dynCall_iiiiiii=t.asm.N).apply(null,arguments)},t.dynCall_viiiiii=function(){return(t.dynCall_viiiiii=t.asm.O).apply(null,arguments)},t.dynCall_v=function(){return(t.dynCall_v=t.asm.P).apply(null,arguments)},t.dynCall_iiiii=function(){return(t.dynCall_iiiii=t.asm.Q).apply(null,arguments)},t.dynCall_jiiiii=function(){return(t.dynCall_jiiiii=t.asm.R).apply(null,arguments)},t.dynCall_viiii=function(){return(t.dynCall_viiii=t.asm.S).apply(null,arguments)},t.dynCall_iiiiii=function(){return(t.dynCall_iiiiii=t.asm.T).apply(null,arguments)},t.dynCall_jiji=function(){return(t.dynCall_jiji=t.asm.U).apply(null,arguments)},t.dynCall_viiiii=function(){return(t.dynCall_viiiii=t.asm.V).apply(null,arguments)},t.asm=Ee,t.then=function(e){if(Ce)e(t);else{var n=t.onRuntimeInitialized;t.onRuntimeInitialized=function(){n&&n(),e(t)}}return t},T=function e(){Ce||_e(),Ce||(T=e)},t.run=_e,t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);0<t.preInit.length;)t.preInit.pop()();return!0,_e(),e}}(),Un=" ";!function(e){e[e.NOSHUFFLE=0]="NOSHUFFLE",e[e.SHUFFLE=1]="SHUFFLE",e[e.BITSHUFFLE=2]="BITSHUFFLE",e[e.AUTOSHUFFLE=-1]="AUTOSHUFFLE"}(Ln||(Ln={}));var Gn,qn=new Set(["blosclz","lz4","lz4hc","snappy","zlib","zstd"]),Hn=function(){var e=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"lz4",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ln.SHUFFLE,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(Object(h.a)(this,e),t<0||t>9)throw new Error("Invalid compression level: '".concat(t,"'. It should be between 0 and 9"));if(!qn.has(n))throw new Error("Invalid compressor '".concat(n,"'. Valid compressors include\n        'blosclz', 'lz4', 'lz4hc','snappy', 'zlib', 'zstd'."));if(r<-1||r>2)throw new Error("Invalid shuffle ".concat(r,". Must be one of 0 (NOSHUFFLE),\n        1 (SHUFFLE), 2 (BITSHUFFLE), -1 (AUTOSHUFFLE)."));this.blocksize=i,this.clevel=t,this.cname=n,this.shuffle=r}return Object(A.a)(e,[{key:"encode",value:function(){var e=Object(a.a)(l.a.mark((function e(t){var n,r,i;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Gn||(Gn=Tn(Pn,Un)),e.next=3,Gn;case 3:return n=e.sent,r=n.compress(t,this.cname,this.clevel,this.shuffle,this.blocksize),i=new Uint8Array(r),n.free_result(),e.abrupt("return",i);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"decode",value:function(){var e=Object(a.a)(l.a.mark((function e(t,n){var r,i,a;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Gn||(Gn=Tn(Pn,Un)),e.next=3,Gn;case 3:if(r=e.sent,i=r.decompress(t),a=new Uint8Array(i),r.free_result(),void 0===n){e.next=10;break}return n.set(a),e.abrupt("return",n);case 10:return e.abrupt("return",a);case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()}],[{key:"fromConfig",value:function(t){var n=t.blocksize;return new e(t.clevel,t.cname,t.shuffle,n)}}]),e}();return e.codecId="blosc",e.COMPRESSORS=Object(u.a)(qn),e.NOSHUFFLE=Ln.NOSHUFFLE,e.SHUFFLE=Ln.SHUFFLE,e.BITSHUFFLE=Ln.BITSHUFFLE,e.AUTOSHUFFLE=Ln.AUTOSHUFFLE,e}(),Yn=(new Map).set(Fn.codecId,Fn).set(Nn.codecId,Nn).set(Hn.codecId,Hn);function Jn(e){if(!Yn.has(e.id))throw new Error("Compression codec ".concat(e.id," is not supported by Zarr.js yet."));return Yn.get(e.id).fromConfig(e)}var zn=C((function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,r,a,o){if("function"!==typeof r)throw new TypeError("The listener must be a function");var s=new i(r,a||e,o),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function o(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,a=r.length,o=new Array(a);i<a;i++)o[i]=r[i].fn;return o},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,a,o){var s=n?n+e:e;if(!this._events[s])return!1;var u,A,c=this._events[s],l=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,i),!0;case 5:return c.fn.call(c.context,t,r,i,a),!0;case 6:return c.fn.call(c.context,t,r,i,a,o),!0}for(A=1,u=new Array(l-1);A<l;A++)u[A-1]=arguments[A];c.fn.apply(c.context,u)}else{var f,h=c.length;for(A=0;A<h;A++)switch(c[A].once&&this.removeListener(e,c[A].fn,void 0,!0),l){case 1:c[A].fn.call(c[A].context);break;case 2:c[A].fn.call(c[A].context,t);break;case 3:c[A].fn.call(c[A].context,t,r);break;case 4:c[A].fn.call(c[A].context,t,r,i);break;default:if(!u)for(f=1,u=new Array(l-1);f<l;f++)u[f-1]=arguments[f];c[A].fn.apply(c[A].context,u)}}return!0},s.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var a=n?n+e:e;if(!this._events[a])return this;if(!t)return o(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||o(this,a);else{for(var u=0,A=[],c=s.length;u<c;u++)(s[u].fn!==t||i&&!s[u].once||r&&s[u].context!==r)&&A.push(s[u]);A.length?this._events[a]=1===A.length?A[0]:A:o(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})),Kn=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(h.a)(this,n),(r=t.call(this,e)).name="TimeoutError",r}return n}(Object(v.a)(Error)),Wn=function(e,t,n){return new Promise((function(r,i){if("number"!==typeof t||t<0)throw new TypeError("Expected `milliseconds` to be a positive number");if(t!==1/0){var a=setTimeout((function(){if("function"!==typeof n){var a="string"===typeof n?n:"Promise timed out after ".concat(t," milliseconds"),o=n instanceof Error?n:new Kn(a);"function"===typeof e.cancel&&e.cancel(),i(o)}else try{r(n())}catch(s){i(s)}}),t);!function(e,t){t=t||function(){},e.then((function(e){return new Promise((function(e){e(t())})).then((function(){return e}))}),(function(e){return new Promise((function(e){e(t())})).then((function(){throw e}))}))}(e.then(r,i),(function(){clearTimeout(a)}))}else r(e)}))},Vn=Wn,Xn=Wn,Zn=Kn;Vn.default=Xn,Vn.TimeoutError=Zn;var $n=C((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){for(var r=0,i=e.length;i>0;){var a=i/2|0,o=r+a;n(e[o],t)<=0?(r=++o,i-=a+1):i=a}return r}}));E($n);var er=C((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){Object(h.a)(this,e),this._queue=[]}return Object(A.a)(e,[{key:"enqueue",value:function(e,t){var n={priority:(t=Object.assign({priority:0},t)).priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority)this._queue.push(n);else{var r=$n.default(this._queue,n,(function(e,t){return t.priority-e.priority}));this._queue.splice(r,0,n)}}},{key:"dequeue",value:function(){var e=this._queue.shift();return e&&e.run}},{key:"size",get:function(){return this._queue.length}}]),e}();t.default=n}));E(er);var tr=E(C((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){},r=new Vn.default.TimeoutError,i=function(e){Object(d.a)(i,e);var t=Object(p.a)(i);function i(e){var r;if(Object(h.a)(this,i),(r=t.call(this))._intervalCount=0,r._intervalEnd=0,r._pendingCount=0,r._resolveEmpty=n,r._resolveIdle=n,!("number"===typeof(e=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:er.default},e)).intervalCap&&e.intervalCap>=1))throw new TypeError("Expected `intervalCap` to be a number from 1 and up, got `".concat(e.intervalCap,"` (").concat(typeof e.intervalCap,")"));if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError("Expected `interval` to be a finite number >= 0, got `".concat(e.interval,"` (").concat(typeof e.interval,")"));return r._carryoverConcurrencyCount=e.carryoverConcurrencyCount,r._isIntervalIgnored=e.intervalCap===1/0||0===e.interval,r._intervalCap=e.intervalCap,r._interval=e.interval,r._queue=new e.queueClass,r._queueClass=e.queueClass,r.concurrency=e.concurrency,r._timeout=e.timeout,r._throwOnTimeout=!0===e.throwOnTimeout,r._isPaused=!1===e.autoStart,r}return Object(A.a)(i,[{key:"_next",value:function(){this._pendingCount--,this._tryToStartAnother()}},{key:"_resolvePromises",value:function(){this._resolveEmpty(),this._resolveEmpty=n,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=n)}},{key:"_onResumeInterval",value:function(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}},{key:"_isIntervalPaused",value:function(){var e=this,t=Date.now();if(void 0===this._intervalId){var n=this._intervalEnd-t;if(!(n<0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout((function(){e._onResumeInterval()}),n)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}},{key:"_tryToStartAnother",value:function(){if(0===this._queue.size)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){var e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother)return this.emit("active"),this._queue.dequeue()(),e&&this._initializeIntervalIfNeeded(),!0}return!1}},{key:"_initializeIntervalIfNeeded",value:function(){var e=this;this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval((function(){e._onInterval()}),this._interval),this._intervalEnd=Date.now()+this._interval)}},{key:"_onInterval",value:function(){0===this._intervalCount&&0===this._pendingCount&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}},{key:"_processQueue",value:function(){for(;this._tryToStartAnother(););}},{key:"add",value:function(){var e=Object(a.a)(l.a.mark((function e(t){var n,i=this,o=arguments;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:{},e.abrupt("return",new Promise((function(e,o){var s=function(){var s=Object(a.a)(l.a.mark((function a(){var s;return l.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i._pendingCount++,i._intervalCount++,a.prev=2,s=void 0===i._timeout&&void 0===n.timeout?t():Vn.default(Promise.resolve(t()),void 0===n.timeout?i._timeout:n.timeout,(function(){(void 0===n.throwOnTimeout?i._throwOnTimeout:n.throwOnTimeout)&&o(r)})),a.t0=e,a.next=7,s;case 7:a.t1=a.sent,(0,a.t0)(a.t1),a.next=14;break;case 11:a.prev=11,a.t2=a.catch(2),o(a.t2);case 14:i._next();case 15:case"end":return a.stop()}}),a,null,[[2,11]])})));return function(){return s.apply(this,arguments)}}();i._queue.enqueue(s,n),i._tryToStartAnother()})));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"addAll",value:function(){var e=Object(a.a)(l.a.mark((function e(t,n){var r=this;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t.map(function(){var e=Object(a.a)(l.a.mark((function e(t){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r.add(t,n));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"start",value:function(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}},{key:"pause",value:function(){this._isPaused=!0}},{key:"clear",value:function(){this._queue=new this._queueClass}},{key:"onEmpty",value:function(){var e=Object(a.a)(l.a.mark((function e(){var t=this;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==this._queue.size){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",new Promise((function(e){var n=t._resolveEmpty;t._resolveEmpty=function(){n(),e()}})));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"onIdle",value:function(){var e=Object(a.a)(l.a.mark((function e(){var t=this;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==this._pendingCount||0!==this._queue.size){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",new Promise((function(e){var n=t._resolveIdle;t._resolveIdle=function(){n(),e()}})));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_doesIntervalAllowAnother",get:function(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}},{key:"_doesConcurrentAllowAnother",get:function(){return this._pendingCount<this._concurrency}},{key:"concurrency",get:function(){return this._concurrency},set:function(e){if(!("number"===typeof e&&e>=1))throw new TypeError("Expected `concurrency` to be a number from 1 and up, got `".concat(e,"` (").concat(typeof e,")"));this._concurrency=e,this._processQueue()}},{key:"size",get:function(){return this._queue.size}},{key:"pending",get:function(){return this._pendingCount}},{key:"isPaused",get:function(){return this._isPaused}},{key:"timeout",set:function(e){this._timeout=e},get:function(){return this._timeout}}]),i}(zn);t.default=i}))),nr=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],s=!(arguments.length>6&&void 0!==arguments[6])||arguments[6];Object(h.a)(this,e),this.store=t,this._chunkStore=a,this.path=ce(n),this.keyPrefix=Ce(this.path),this.readOnly=i,this.cacheMetadata=o,this.cacheAttrs=s,this.meta=r,null!==this.meta.compressor?this.compressor=Jn(this.meta.compressor):this.compressor=null;var u=this.keyPrefix+".zattributes";this.attrs=new Se(this.store,u,this.readOnly,s)}return Object(A.a)(e,[{key:"reloadMetadata",value:function(){return I(this,void 0,void 0,l.a.mark((function e(){var t,n;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.keyPrefix+".zarray",n=this.store.getItem(t),e.t0=xe,e.next=5,n;case 5:return e.t1=e.sent,this.meta=(0,e.t0)(e.t1),e.abrupt("return",this.meta);case 8:case"end":return e.stop()}}),e,this)})))}},{key:"refreshMetadata",value:function(){return I(this,void 0,void 0,l.a.mark((function e(){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.cacheMetadata){e.next=3;break}return e.next=3,this.reloadMetadata();case 3:case"end":return e.stop()}}),e,this)})))}},{key:"get",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getBasicSelection(e,!1,t)}},{key:"getRaw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getBasicSelection(e,!0,t)}},{key:"getBasicSelection",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.concurrencyLimit,i=void 0===r?10:r,a=n.progressCallback;return I(this,void 0,void 0,l.a.mark((function n(){return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(this.cacheMetadata){n.next=3;break}return n.next=3,this.reloadMetadata();case 3:if(this.shape!==[]){n.next=7;break}throw new Error("Shape [] indexing is not supported yet");case 7:return n.abrupt("return",this.getBasicSelectionND(e,t,i,a));case 8:case"end":return n.stop()}}),n,this)})))}},{key:"getBasicSelectionND",value:function(e,t,n,r){var i=new ae(e,this);return this.getSelection(i,t,n,r)}},{key:"getSelection",value:function(e,t,n,r){return I(this,void 0,void 0,l.a.mark((function i(){var a,o,s,u,A,c,h,g,d,p,v,y,m=this;return l.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(a=this.dtype,o=e.shape,s=e.shape.reduce((function(e,t){return e*t}),1),!t||s!==this.chunkSize){i.next=12;break}if(u=e.iter(),!1!==(A=u.next()).done||!0!==u.next().done){i.next=12;break}return c=A.value,i.next=10,this.decodeDirectToRawArray(c,o,s);case 10:return h=i.sent,i.abrupt("return",h);case 12:if(g=t?new He(null,o,a):new Le(null,o,a),0!==s){i.next=15;break}return i.abrupt("return",g);case 15:if(d=new tr({concurrency:n}),r)!function(){var t,n=0,i=0,a=Object(f.a)(e.iter());try{for(a.s();!(t=a.n()).done;){t.value;i+=1}}catch(St){a.e(St)}finally{a.f()}r({progress:0,queueSize:i});var o,s=Object(f.a)(e.iter());try{var u=function(){var t=o.value;I(m,void 0,void 0,l.a.mark((function a(){var o=this;return l.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,d.add((function(){return o.chunkGetItem(t.chunkCoords,t.chunkSelection,g,t.outSelection,e.dropAxes)}));case 2:r({progress:n+=1,queueSize:i});case 4:case"end":return a.stop()}}),a)})))};for(s.s();!(o=s.n()).done;)u()}catch(St){s.e(St)}finally{s.f()}}();else{p=Object(f.a)(e.iter());try{for(y=function(){var t=v.value;d.add((function(){return m.chunkGetItem(t.chunkCoords,t.chunkSelection,g,t.outSelection,e.dropAxes)}))},p.s();!(v=p.n()).done;)y()}catch(St){p.e(St)}finally{p.f()}}return i.next=19,d.onIdle();case 19:if(0!==g.shape.length){i.next=21;break}return i.abrupt("return",g.data[0]);case 21:return i.abrupt("return",g);case 22:case"end":return i.stop()}}),i,this)})))}},{key:"chunkGetItem",value:function(e,t,n,r,i){return I(this,void 0,void 0,l.a.mark((function a(){var o,s,u,A,c;return l.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(e.length===this._chunkDataShape.length){a.next=2;break}throw new Y("Inconsistent shapes: chunkCoordsLength: ".concat(e.length,", cDataShapeLength: ").concat(this.chunkDataShape.length));case 2:return o=this.chunkKey(e),a.prev=3,a.next=6,this.chunkStore.getItem(o);case 6:return s=a.sent,a.next=9,this.decodeChunk(s);case 9:if(u=a.sent,!(n instanceof Le)){a.next=21;break}if(!re(r)||!pe(t,this.chunks)||this.meta.filters){a.next=14;break}return n.set(r,this.toNestedArray(u)),a.abrupt("return");case 14:if(A=this.toNestedArray(u),c=A.get(t),null===i){a.next=18;break}throw new Error("Drop axes is not supported yet");case 18:n.set(r,c),a.next=22;break;case 21:n.set(r,this.chunkBufferToRawArray(u),t);case 22:a.next=31;break;case 24:if(a.prev=24,a.t0=a.catch(3),!(a.t0 instanceof P)){a.next=30;break}null!==this.fillValue&&n.set(r,this.fillValue),a.next=31;break;case 30:throw new a.t0;case 31:case"end":return a.stop()}}),a,this,[[3,24]])})))}},{key:"getRawChunk",value:function(e){return I(this,void 0,void 0,l.a.mark((function t(){var n,r,i,a,o,s;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length===this.shape.length){t.next=2;break}throw new Error("Chunk coordinates ".concat(e.join(".")," do not correspond to shape ").concat(this.shape,"."));case 2:for(t.prev=2,n=0;n<e.length;n++)r=Math.ceil(this.shape[n]/this.chunks[n]),e[n]=$(e[n],r);t.next=13;break;case 6:if(t.prev=6,t.t0=t.catch(2),!(t.t0 instanceof G)){t.next=12;break}throw new G("index ".concat(e.join(".")," is out of bounds for shape: ").concat(this.shape," and chunks ").concat(this.chunks));case 12:throw new t.t0;case 13:return i=this.chunkKey(e),a=this.chunkStore.getItem(i),t.t1=this,t.next=18,a;case 18:return t.t2=t.sent,t.next=21,t.t1.decodeChunk.call(t.t1,t.t2);case 21:return o=t.sent,s=this.chunks.filter((function(e){return 1!==e})),t.abrupt("return",new He(o,s,this.dtype));case 24:case"end":return t.stop()}}),t,this,[[2,6]])})))}},{key:"chunkKey",value:function(e){return this.keyPrefix+e.join(".")}},{key:"ensureByteArray",value:function(e){return"string"===typeof e?new Uint8Array(r.from(e).buffer):new Uint8Array(e)}},{key:"toTypedArray",value:function(e){return new Oe[this.dtype](e)}},{key:"toNestedArray",value:function(e){var t=this.ensureByteArray(e).buffer;return new Le(t,this.chunks,this.dtype)}},{key:"decodeChunk",value:function(e){return I(this,void 0,void 0,l.a.mark((function t(){var n;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.ensureByteArray(e),null===this.compressor){t.next=5;break}return t.next=4,this.compressor.decode(n);case 4:n=t.sent;case 5:return this.dtype.includes(">")&&me(this.toTypedArray(n.buffer)),t.abrupt("return",n.buffer);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"chunkBufferToRawArray",value:function(e){return new He(e,this.chunks,this.dtype)}},{key:"decodeDirectToRawArray",value:function(e,t,n){var r=e.chunkCoords;return I(this,void 0,void 0,l.a.mark((function e(){var i,a,o;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this.chunkKey(r),e.prev=1,e.next=4,this.chunkStore.getItem(i);case 4:return a=e.sent,e.t0=He,e.next=8,this.decodeChunk(a);case 8:return e.t1=e.sent,e.t2=t,e.t3=this.dtype,e.abrupt("return",new e.t0(e.t1,e.t2,e.t3));case 14:if(e.prev=14,e.t4=e.catch(1),!(e.t4 instanceof P)){e.next=21;break}return o=new Oe[this.dtype](n),e.abrupt("return",new He(o.fill(this.fillValue),t));case 21:throw new e.t4;case 22:case"end":return e.stop()}}),e,this,[[1,14]])})))}},{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return I(this,void 0,void 0,l.a.mark((function r(){return l.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.setBasicSelection(e,t,n);case 2:case"end":return r.stop()}}),r,this)})))}},{key:"setBasicSelection",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.concurrencyLimit,i=void 0===r?10:r,a=n.progressCallback;return I(this,void 0,void 0,l.a.mark((function n(){return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.readOnly){n.next=2;break}throw new L("Object is read only");case 2:if(this.cacheMetadata){n.next=5;break}return n.next=5,this.reloadMetadata();case 5:if(this.shape!==[]){n.next=9;break}throw new Error("Shape [] indexing is not supported yet");case 9:return n.next=11,this.setBasicSelectionND(e,t,i,a);case 11:case"end":return n.stop()}}),n,this)})))}},{key:"setBasicSelectionND",value:function(e,t,n,r){return I(this,void 0,void 0,l.a.mark((function i(){var a;return l.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return a=new ae(e,this),i.next=3,this.setSelection(a,t,n,r);case 3:case"end":return i.stop()}}),i,this)})))}},{key:"getChunkValue",value:function(e,t,n,r){var i;if(r===[])i=n;else if("number"===typeof n)i=n;else if(i=n.get(e.outSelection),null!==t.dropAxes)throw new Error("Handling drop axes not supported yet");return i}},{key:"setSelection",value:function(e,t,n,r){return I(this,void 0,void 0,l.a.mark((function i(){var a,o,s,u,A,c=this;return l.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if((a=e.shape)!==[]){i.next=5;break}i.next=15;break;case 5:if("number"!==typeof t){i.next=9;break}i.next=15;break;case 9:if(!(t instanceof Le)){i.next=14;break}if(ve(t.shape,a)){i.next=12;break}throw new Y("Shape mismatch in source NestedArray and set selection: ".concat(t.shape," and ").concat(a));case 12:i.next=15;break;case 14:throw new Error("Unknown data type for setting :(");case 15:if(o=new tr({concurrency:n}),r)!function(){var n,i=0,s=Object(f.a)(e.iter());try{for(s.s();!(n=s.n()).done;){n.value;i+=1}}catch(St){s.e(St)}finally{s.f()}var u=0;r({progress:0,queueSize:i});var A,h=Object(f.a)(e.iter());try{var g=function(){var n=A.value,s=c.getChunkValue(n,e,t,a);I(c,void 0,void 0,l.a.mark((function e(){var t=this;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.add((function(){return t.chunkSetItem(n.chunkCoords,n.chunkSelection,s)}));case 2:r({progress:u+=1,queueSize:i});case 4:case"end":return e.stop()}}),e)})))};for(h.s();!(A=h.n()).done;)g()}catch(St){h.e(St)}finally{h.f()}}();else{s=Object(f.a)(e.iter());try{for(A=function(){var n=u.value,r=c.getChunkValue(n,e,t,a);o.add((function(){return c.chunkSetItem(n.chunkCoords,n.chunkSelection,r)}))},s.s();!(u=s.n()).done;)A()}catch(St){s.e(St)}finally{s.f()}}return i.next=19,o.onIdle();case 19:case"end":return i.stop()}}),i)})))}},{key:"chunkSetItem",value:function(e,t,n){return I(this,void 0,void 0,l.a.mark((function r(){var i,a,o,s,u,A,c,f,h;return l.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=this.chunkKey(e),a=null,o=Oe[this.dtype],s=this.chunkSize,!pe(t,this.chunks)){r.next=8;break}"number"===typeof n?(a=new o(s)).fill(n):a=n.flatten(),r.next=29;break;case 8:return r.prev=8,r.next=11,this.chunkStore.getItem(i);case 11:return A=r.sent,r.next=14,this.decodeChunk(A);case 14:c=r.sent,u=this.toTypedArray(c),r.next=26;break;case 18:if(r.prev=18,r.t0=r.catch(8),!(r.t0 instanceof P)){r.next=25;break}u=new o(s),null!==this.fillValue&&u.fill(this.fillValue),r.next=26;break;case 25:throw r.t0;case 26:(f=new Le(u,this.chunks,this.dtype)).set(t,n),a=f.flatten();case 29:return r.next=31,this.encodeChunk(a);case 31:h=r.sent,this.chunkStore.setItem(i,h);case 33:case"end":return r.stop()}}),r,this,[[8,18]])})))}},{key:"encodeChunk",value:function(e){return I(this,void 0,void 0,l.a.mark((function t(){var n,r;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.dtype.includes(">")&&(e=Ie(e)),null===this.compressor){t.next=7;break}return n=new Uint8Array(e.buffer),t.next=5,this.compressor.encode(n);case 5:return r=t.sent,t.abrupt("return",r.buffer);case 7:return t.abrupt("return",e.buffer);case 8:case"end":return t.stop()}}),t,this)})))}},{key:"chunkStore",get:function(){return this._chunkStore?this._chunkStore:this.store}},{key:"name",get:function(){return this.path.length>0?"/"!==this.path[0]?"/"+this.path:this.path:null}},{key:"basename",get:function(){var e=this.name;if(null===e)return null;var t=e.split("/");return t[t.length-1]}},{key:"shape",get:function(){return this.meta.shape}},{key:"chunks",get:function(){return this.meta.chunks}},{key:"chunkSize",get:function(){return this.chunks.reduce((function(e,t){return e*t}),1)}},{key:"dtype",get:function(){return this.meta.dtype}},{key:"fillValue",get:function(){var e=this.meta.fill_value;return"NaN"===e?NaN:"Infinity"===e?1/0:"-Infinity"===e?-1/0:this.meta.fill_value}},{key:"nDims",get:function(){return this.meta.shape.length}},{key:"size",get:function(){return this.meta.shape.reduce((function(e,t){return e*t}),1)}},{key:"length",get:function(){return this.shape[0]}},{key:"_chunkDataShape",get:function(){if(this.shape===[])return[1];for(var e=[],t=0;t<this.shape.length;t++)e[t]=Math.ceil(this.shape[t]/this.chunks[t]);return e}},{key:"chunkDataShape",get:function(){return this._chunkDataShape}},{key:"numChunks",get:function(){return this.chunkDataShape.reduce((function(e,t){return e*t}),1)}}],[{key:"create",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return I(this,void 0,void 0,l.a.mark((function s(){var u;return l.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,this.loadMetadataForConstructor(t,n);case 2:return u=s.sent,s.abrupt("return",new e(t,n,u,r,i,a,o));case 4:case"end":return s.stop()}}),s,this)})))}},{key:"loadMetadataForConstructor",value:function(e,t){return I(this,void 0,void 0,l.a.mark((function n(){var r,i;return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,t=ce(t),r=Ce(t),n.next=5,e.getItem(r+".zarray");case 5:return i=n.sent,n.abrupt("return",xe(i));case 9:throw n.prev=9,n.t0=n.catch(0),new Error("Failed to load metadata for ZarrArray:"+n.t0.toString());case 12:case"end":return n.stop()}}),n,null,[[0,9]])})))}}]),e}(),rr=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(h.a)(this,e),this.root=t}return Object(A.a)(e,[{key:"proxy",value:function(){return m(this)}},{key:"getParent",value:function(e){var t,n=this.root,r=e.split("/"),i=Object(f.a)(r.slice(0,r.length-1));try{for(i.s();!(t=i.n()).done;){if(!(n=n[t.value]))throw Error(e)}}catch(St){i.e(St)}finally{i.f()}return[n,r[r.length-1]]}},{key:"requireParent",value:function(e){var t,n=this.root,r=e.split("/"),i=Object(f.a)(r.slice(0,r.length-1));try{for(i.s();!(t=i.n()).done;){var a=t.value;void 0===n[a]&&(n[a]={}),n=n[a]}}catch(St){i.e(St)}finally{i.f()}return[n,r[r.length-1]]}},{key:"getItem",value:function(e){var t=this.getParent(e),n=Object(s.a)(t,2),r=n[0][n[1]];if(void 0===r)throw new P(e);return r}},{key:"setItem",value:function(e,t){var n=this.requireParent(e),r=Object(s.a)(n,2);return r[0][r[1]]=t,!0}},{key:"deleteItem",value:function(e){var t=this.getParent(e),n=Object(s.a)(t,2);return delete n[0][n[1]]}},{key:"containsItem",value:function(e){try{return void 0!==this.getItem(e)}catch(t){return!1}}},{key:"keys",value:function(){throw new Error("Method not implemented.")}}]),e}(),ir=function(){function e(t){Object(h.a)(this,e),this.url=t}return Object(A.a)(e,[{key:"keys",value:function(){throw new Error("Method not implemented.")}},{key:"getItem",value:function(e){return I(this,void 0,void 0,l.a.mark((function t(){var n,i;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=ye(this.url,e),t.next=3,fetch(n);case 3:if(404!==(i=t.sent).status){t.next=8;break}throw new P(e);case 8:if(200===i.status){t.next=10;break}throw new J(String(i.status));case 10:if(!Ae){t.next=18;break}return t.t0=r,t.next=14,i.arrayBuffer();case 14:return t.t1=t.sent,t.abrupt("return",t.t0.from.call(t.t0,t.t1));case 18:return t.abrupt("return",i.arrayBuffer());case 19:case"end":return t.stop()}}),t,this)})))}},{key:"setItem",value:function(e,t){return I(this,void 0,void 0,l.a.mark((function n(){var r,i;return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=ye(this.url,e),"string"===typeof t&&(t=(new TextEncoder).encode(t).buffer),n.next=4,fetch(r,{method:"PUT",body:t});case 4:return i=n.sent,n.abrupt("return","2"===i.status.toString()[0]);case 6:case"end":return n.stop()}}),n,this)})))}},{key:"deleteItem",value:function(e){throw new Error("Method not implemented.")}},{key:"containsItem",value:function(e){return I(this,void 0,void 0,l.a.mark((function t(){var n,r;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=ye(this.url,e),t.next=3,fetch(n);case 3:return r=t.sent,t.abrupt("return",200===r.status);case 5:case"end":return t.stop()}}),t,this)})))}}]),e}();function ar(e){var t=e.shape,n=e.chunks,r=void 0===n||n,i=e.dtype,a=void 0===i?"<i4":i,o=e.compressor,s=void 0===o?null:o,u=e.fillValue,A=void 0===u?null:u,c=e.order,f=void 0===c?"C":c,h=e.store,g=e.overwrite,d=void 0!==g&&g,p=e.path,v=e.chunkStore,y=e.filters,m=e.cacheMetadata,b=void 0===m||m,E=e.cacheAttrs,C=void 0===E||E,B=e.readOnly,w=void 0!==B&&B;return I(this,void 0,void 0,l.a.mark((function e(){var n;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h=fr(h),e.next=3,_e(h,t,r,a,p,s,A,f,d,v,y);case 3:return e.next=5,nr.create(h,p,w,v,b,C);case 5:return n=e.sent,e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})))}function or(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return I(this,void 0,void 0,l.a.mark((function n(){return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.fillValue=null,n.abrupt("return",ar(Object.assign({shape:e},t)));case 2:case"end":return n.stop()}}),n)})))}function sr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return I(this,void 0,void 0,l.a.mark((function n(){return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.fillValue=0,n.abrupt("return",ar(Object.assign({shape:e},t)));case 2:case"end":return n.stop()}}),n)})))}function ur(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return I(this,void 0,void 0,l.a.mark((function n(){return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.fillValue=1,n.abrupt("return",ar(Object.assign({shape:e},t)));case 2:case"end":return n.stop()}}),n)})))}function Ar(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return I(this,void 0,void 0,l.a.mark((function r(){return l.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n.fillValue=t,r.abrupt("return",ar(Object.assign({shape:e},n)));case 2:case"end":return r.stop()}}),r)})))}function cr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return I(this,void 0,void 0,l.a.mark((function n(){var r,i,a;return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=null,e instanceof Le?(r=e.shape,t.dtype=void 0===t.dtype?e.dtype:t.dtype):r=e.byteLength,i=void 0!==t.readOnly&&t.readOnly,t.readOnly=!1,n.next=6,ar(Object.assign({shape:r},t));case 6:return a=n.sent,n.next=9,a.set(null,e);case 9:return a.readOnly=i,n.abrupt("return",a);case 11:case"end":return n.stop()}}),n)})))}function lr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.shape,n=e.mode,r=void 0===n?"a":n,i=e.chunks,a=void 0===i||i,o=e.dtype,s=void 0===o?"<i4":o,u=e.compressor,A=void 0===u?null:u,c=e.fillValue,f=void 0===c?null:c,h=e.order,g=void 0===h?"C":h,d=e.store,p=e.overwrite,v=void 0!==p&&p,y=e.path,m=void 0===y?null:y,b=e.chunkStore,E=e.filters,C=e.cacheMetadata,B=void 0===C||C,w=e.cacheAttrs,Q=void 0===w||w;return I(this,void 0,void 0,l.a.mark((function e(){var n;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d=fr(d),void 0===b&&(b=fr(d)),m=ce(m),"r"!==r&&"r+"!==r){e.next=16;break}return e.next=6,Ee(d,m);case 6:if(!e.sent){e.next=10;break}throw new M(m);case 10:return e.next=12,be(d,m);case 12:if(e.sent){e.next=14;break}throw new N(m);case 14:e.next=59;break;case 16:if("w"!==r){e.next=23;break}if(void 0!==t){e.next=19;break}throw new Y("Shape can not be undefined when creating a new array");case 19:return e.next=21,_e(d,t,a,s,m,A,f,g,v,b,E);case 21:e.next=59;break;case 23:if("a"!==r){e.next=39;break}return e.next=26,Ee(d,m);case 26:if(!e.sent){e.next=30;break}throw new M(m);case 30:return e.next=32,be(d,m);case 32:if(e.sent){e.next=37;break}if(void 0!==t){e.next=35;break}throw new Y("Shape can not be undefined when creating a new array");case 35:return e.next=37,_e(d,t,a,s,m,A,f,g,v,b,E);case 37:e.next=59;break;case 39:if("w-"!==r&&"x"!==r){e.next=58;break}return e.next=42,be(d,m);case 42:if(!e.sent){e.next=46;break}throw new j(m);case 46:return e.next=48,Ee(d,m);case 48:if(!e.sent){e.next=52;break}throw new M(m);case 52:if(void 0!==t){e.next=54;break}throw new Y("Shape can not be undefined when creating a new array");case 54:return e.next=56,_e(d,t,a,s,m,A,f,g,v,b,E);case 56:e.next=59;break;case 58:throw new Y("Invalid mode argument: ".concat(r));case 59:return n="r"===r,e.abrupt("return",nr.create(d,m,n,b,B,Q));case 61:case"end":return e.stop()}}),e)})))}function fr(e){return void 0===e?new rr:"string"===typeof e?new ir(e):e}var hr=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];Object(h.a)(this,e),this.store=t,this._chunkStore=a,this.path=ce(n),this.keyPrefix=Ce(this.path),this.readOnly=i,this.meta=r;var s=this.keyPrefix+".zattributes";this.attrs=new Se(this.store,s,this.readOnly,o)}return Object(A.a)(e,[{key:"itemPath",value:function(e){var t="string"===typeof e&&e.length>0&&"/"===e[0],n=ce(e);return!t&&this.path.length>0?this.keyPrefix+n:n}},{key:"createGroup",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return I(this,void 0,void 0,l.a.mark((function r(){var i;return l.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!this.readOnly){r.next=2;break}throw new L("group is read only");case 2:return i=this.itemPath(t),r.next=5,Qe(this.store,i,this._chunkStore,n);case 5:return r.abrupt("return",e.create(this.store,i,this.readOnly,this._chunkStore,this.attrs.cache));case 6:case"end":return r.stop()}}),r,this)})))}},{key:"requireGroup",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return I(this,void 0,void 0,l.a.mark((function r(){var i;return l.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!this.readOnly){r.next=2;break}throw new L("group is read only");case 2:return i=this.itemPath(t),r.next=5,Ee(this.store,i);case 5:if(r.sent){r.next=8;break}return r.next=8,Qe(this.store,i,this._chunkStore,n);case 8:return r.abrupt("return",e.create(this.store,i,this.readOnly,this._chunkStore,this.attrs.cache));case 9:case"end":return r.stop()}}),r,this)})))}},{key:"getOptsForArrayCreation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.itemPath(e);return t.path=n,void 0===t.cacheAttrs&&(t.cacheAttrs=this.attrs.cache),t.store=this.store,t.chunkStore=this.chunkStore,t}},{key:"array",value:function(e,t,n,r){if(this.readOnly)throw new L("group is read only");return(n=this.getOptsForArrayCreation(e,n)).overwrite=void 0===r?n.overwrite:r,cr(t,n)}},{key:"empty",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.readOnly)throw new L("group is read only");return or(t,n=this.getOptsForArrayCreation(e,n))}},{key:"zeros",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.readOnly)throw new L("group is read only");return sr(t,n=this.getOptsForArrayCreation(e,n))}},{key:"ones",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.readOnly)throw new L("group is read only");return ur(t,n=this.getOptsForArrayCreation(e,n))}},{key:"full",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(this.readOnly)throw new L("group is read only");return Ar(t,n,r=this.getOptsForArrayCreation(e,r))}},{key:"createDataset",value:function(e,t,n,r){if(this.readOnly)throw new L("group is read only");var i;if(r=this.getOptsForArrayCreation(e,r),void 0===n){if(void 0===t)throw new Y("Shape must be set if no data is passed to CreateDataset");i=ar(Object.assign({shape:t},r))}else i=cr(n,r);return i}},{key:"getItem",value:function(t){return I(this,void 0,void 0,l.a.mark((function n(){var r;return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=this.itemPath(t),n.next=3,be(this.store,r);case 3:if(!n.sent){n.next=7;break}return n.abrupt("return",nr.create(this.store,this.path,this.readOnly,this.chunkStore,void 0,this.attrs.cache));case 7:return n.next=9,Ee(this.store,r);case 9:if(!n.sent){n.next=11;break}return n.abrupt("return",e.create(this.store,r,this.readOnly,this._chunkStore,this.attrs.cache));case 11:throw new P(t);case 12:case"end":return n.stop()}}),n,this)})))}},{key:"setItem",value:function(e,t){return I(this,void 0,void 0,l.a.mark((function n(){return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.array(e,t,{},!0);case 2:return n.abrupt("return",!0);case 3:case"end":return n.stop()}}),n,this)})))}},{key:"deleteItem",value:function(e){return I(this,void 0,void 0,l.a.mark((function e(){return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.readOnly){e.next=2;break}throw new L("group is read only");case 2:throw new Error("Method not implemented.");case 3:case"end":return e.stop()}}),e,this)})))}},{key:"containsItem",value:function(e){return I(this,void 0,void 0,l.a.mark((function t(){var n;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.itemPath(e),t.next=3,be(this.store,n);case 3:if(t.t0=t.sent,t.t0){t.next=6;break}t.t0=Ee(this.store,n);case 6:return t.abrupt("return",t.t0);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"proxy",value:function(){return m(this)}},{key:"name",get:function(){return this.path.length>0?"/"!==this.path[0]?"/"+this.path:this.path:"/"}},{key:"basename",get:function(){var e=this.name.split("/");return e[e.length-1]}},{key:"chunkStore",get:function(){return this._chunkStore?this._chunkStore:this.store}}],[{key:"create",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return I(this,void 0,void 0,l.a.mark((function o(){var s;return l.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,this.loadMetadataForConstructor(t,n);case 2:return s=o.sent,o.abrupt("return",new e(t,n,s,r,i,a));case 4:case"end":return o.stop()}}),o,this)})))}},{key:"loadMetadataForConstructor",value:function(e,t){return I(this,void 0,void 0,l.a.mark((function n(){var r,i;return l.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=ce(t),n.next=3,be(e,t);case 3:if(!n.sent){n.next=5;break}throw new j(t);case 5:return r=Ce(t),n.prev=6,n.next=9,e.getItem(r+".zgroup");case 9:return i=n.sent,n.abrupt("return",xe(i));case 13:throw n.prev=13,n.t0=n.catch(6),new F(t);case 16:case"end":return n.stop()}}),n,null,[[6,13]])})))}}]),e}();function gr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return I(this,void 0,void 0,l.a.mark((function a(){return l.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(e=fr(e),t=ce(t),a.t0=r,a.t0){a.next=7;break}return a.next=6,Ee(e);case 6:a.t0=a.sent;case 7:if(!a.t0){a.next=10;break}return a.next=10,Qe(e,t,n,r);case 10:return a.abrupt("return",hr.create(e,t,!1,n,i));case 11:case"end":return a.stop()}}),a)})))}function dr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"a",r=arguments.length>3?arguments[3]:void 0,i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return I(this,void 0,void 0,l.a.mark((function a(){var o;return l.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(e=fr(e),void 0!==r&&(r=fr(e)),t=ce(t),"r"!==n&&"r+"!==n){a.next=16;break}return a.next=6,be(e,t);case 6:if(!a.sent){a.next=10;break}throw new j(t);case 10:return a.next=12,Ee(e,t);case 12:if(a.sent){a.next=14;break}throw new F(t);case 14:a.next=53;break;case 16:if("w"!==n){a.next=21;break}return a.next=19,Qe(e,t,r,!0);case 19:a.next=53;break;case 21:if("a"!==n){a.next=35;break}return a.next=24,be(e,t);case 24:if(!a.sent){a.next=28;break}throw new j(t);case 28:return a.next=30,Ee(e,t);case 30:if(a.sent){a.next=33;break}return a.next=33,Qe(e,t,r);case 33:a.next=53;break;case 35:if("w-"!==n&&"x"!==n){a.next=52;break}return a.next=38,be(e,t);case 38:if(!a.sent){a.next=42;break}throw new j(t);case 42:return a.next=44,Ee(e,t);case 44:if(!a.sent){a.next=48;break}throw new M(t);case 48:return a.next=50,Qe(e,t,r);case 50:a.next=53;break;case 52:throw new Y("Invalid mode argument: ".concat(n));case 53:return o="r"===n,a.abrupt("return",hr.create(e,t,o,r,i));case 55:case"end":return a.stop()}}),a)})))}var pr=function(){function e(){Object(h.a)(this,e),this.object={}}return Object(A.a)(e,[{key:"getItem",value:function(e){if(!Object.prototype.hasOwnProperty.call(this.object,e))throw new P(e);return this.object[e]}},{key:"setItem",value:function(e,t){return this.object[e]=t,!0}},{key:"deleteItem",value:function(e){return delete this.object[e]}},{key:"containsItem",value:function(e){return Object.prototype.hasOwnProperty.call(this.object,e)}},{key:"proxy",value:function(){return m(this)}},{key:"keys",value:function(){return Object.getOwnPropertyNames(this.object)}}]),e}()}.call(this,n(70),n(198).Buffer,n(86))},function(e,t,n){"use strict";var r=n(0),i=n.n(r);t.a=i.a.createContext(null)},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(1139),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(29),o=n(6),s=n(7),u=n(4),A=n(412),c=n(411),l=n(217),f=n(311),h=n(121);function g(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}n.d(t,"a",(function(){return v}));var d=[0,0,0,255],p={radiusUnits:"meters",radiusScale:{type:"number",min:0,value:1},radiusMinPixels:{type:"number",min:0,value:0},radiusMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},lineWidthUnits:"meters",lineWidthScale:{type:"number",min:0,value:1},lineWidthMinPixels:{type:"number",min:0,value:0},lineWidthMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},stroked:!1,filled:!0,getPosition:{type:"accessor",value:function(e){return e.position}},getRadius:{type:"accessor",value:1},getFillColor:{type:"accessor",value:d},getLineColor:{type:"accessor",value:d},getLineWidth:{type:"accessor",value:1},strokeWidth:{deprecatedFor:"getLineWidth"},outline:{deprecatedFor:"stroked"},getColor:{deprecatedFor:["getFillColor","getLineColor"]}},v=function(e){Object(o.a)(n,e);var t=g(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"getShaders",value:function(e){return Object(a.a)(Object(u.a)(n.prototype),"getShaders",this).call(this,{vs:"#define SHADER_NAME scatterplot-layer-vertex-shader\n\nattribute vec3 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute float instanceRadius;\nattribute float instanceLineWidths;\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute vec3 instancePickingColors;\n\nuniform float opacity;\nuniform float radiusScale;\nuniform float radiusMinPixels;\nuniform float radiusMaxPixels;\nuniform float lineWidthScale;\nuniform float lineWidthMinPixels;\nuniform float lineWidthMaxPixels;\nuniform float stroked;\nuniform bool filled;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying vec2 unitPosition;\nvarying float innerUnitRadius;\nvarying float outerRadiusPixels;\n\nvoid main(void) {\n  geometry.worldPosition = instancePositions;\n  outerRadiusPixels = clamp(\n    project_size_to_pixel(radiusScale * instanceRadius),\n    radiusMinPixels, radiusMaxPixels\n  );\n  float lineWidthPixels = clamp(\n    project_size_to_pixel(lineWidthScale * instanceLineWidths),\n    lineWidthMinPixels, lineWidthMaxPixels\n  );\n  outerRadiusPixels += stroked * lineWidthPixels / 2.0;\n  unitPosition = positions.xy;\n  geometry.uv = unitPosition;\n  geometry.pickingColor = instancePickingColors;\n\n  innerUnitRadius = 1.0 - stroked * lineWidthPixels / outerRadiusPixels;\n  \n  vec3 offset = positions * project_pixel_size(outerRadiusPixels);\n  DECKGL_FILTER_SIZE(offset, geometry);\n  gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset, geometry.position);\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n  vFillColor = vec4(instanceFillColors.rgb, instanceFillColors.a * opacity);\n  DECKGL_FILTER_COLOR(vFillColor, geometry);\n  vLineColor = vec4(instanceLineColors.rgb, instanceLineColors.a * opacity);\n  DECKGL_FILTER_COLOR(vLineColor, geometry);\n}\n",fs:"#define SHADER_NAME scatterplot-layer-fragment-shader\n\nprecision highp float;\n\nuniform bool filled;\nuniform float stroked;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying vec2 unitPosition;\nvarying float innerUnitRadius;\nvarying float outerRadiusPixels;\n\nvoid main(void) {\n  geometry.uv = unitPosition;\n\n  float distToCenter = length(unitPosition) * outerRadiusPixels;\n  float inCircle = smoothedge(distToCenter, outerRadiusPixels);\n\n  if (inCircle == 0.0) {\n    discard;\n  }\n\n  if (stroked > 0.5) {\n    float isLine = smoothedge(innerUnitRadius * outerRadiusPixels, distToCenter);\n    if (filled) {\n      gl_FragColor = mix(vFillColor, vLineColor, isLine);\n    } else {\n      if (isLine == 0.0) {\n        discard;\n      }\n      gl_FragColor = vec4(vLineColor.rgb, vLineColor.a * isLine);\n    }\n  } else if (filled) {\n    gl_FragColor = vFillColor;\n  } else {\n    discard;\n  }\n\n  gl_FragColor.a *= inCircle;\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[A.a,c.a]})}},{key:"initializeState",value:function(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceRadius:{size:1,transition:!0,accessor:"getRadius",defaultValue:1},instanceFillColors:{size:this.props.colorFormat.length,transition:!0,normalized:!0,type:5121,accessor:"getFillColor",defaultValue:[0,0,0,255]},instanceLineColors:{size:this.props.colorFormat.length,transition:!0,normalized:!0,type:5121,accessor:"getLineColor",defaultValue:[0,0,0,255]},instanceLineWidths:{size:1,transition:!0,accessor:"getLineWidth",defaultValue:1}})}},{key:"updateState",value:function(e){var t=e.props,r=e.oldProps,i=e.changeFlags;if(Object(a.a)(Object(u.a)(n.prototype),"updateState",this).call(this,{props:t,oldProps:r,changeFlags:i}),i.extensionsChanged){var o=this.context.gl;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(o)}),this.getAttributeManager().invalidateAll()}}},{key:"draw",value:function(e){var t=e.uniforms,n=this.context.viewport,r=this.props,i=r.radiusUnits,a=r.radiusScale,o=r.radiusMinPixels,s=r.radiusMaxPixels,u=r.stroked,A=r.filled,c=r.lineWidthUnits,l=r.lineWidthScale,f=r.lineWidthMinPixels,h=r.lineWidthMaxPixels,g="pixels"===i?n.metersPerPixel:1,d="pixels"===c?n.metersPerPixel:1;this.state.model.setUniforms(t).setUniforms({stroked:u?1:0,filled:A,radiusScale:a*g,radiusMinPixels:o,radiusMaxPixels:s,lineWidthScale:l*d,lineWidthMinPixels:f,lineWidthMaxPixels:h}).draw()}},{key:"_getModel",value:function(e){return new f.a(e,Object.assign(this.getShaders(),{id:this.props.id,geometry:new h.a({drawMode:6,vertexCount:4,attributes:{positions:{size:3,value:new Float32Array([-1,-1,0,1,-1,0,1,1,0,-1,1,0])}}}),isInstanced:!0}))}}]),n}(l.a);v.layerName="ScatterplotLayer",v.defaultProps=p},function(e,t,n){"use strict";var r=n(16),i=n(1),a=n(3),o=n(2),s=n(29),u=n(6),A=n(7),c=n(4),l=n(101),f=n(322),h=n(299),g=n(179),d=n(467),p=n.n(d),v=n(44);function y(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I(e,t){for(var n=0,r=0;r<e.length;r++){var i=e[r],a=null,o=t&&t[i];o&&(a=o.width),n+=a}return n}function b(e,t,n){for(var r=[],i=0,a=0,o=0;o<e.length;o++){var s=I(e[o],n);a+s>t&&(i<o&&r.push(e.substring(i,o)),i=o,a=0),a+=s}return i<e.length&&r.push(e.substring(i)),{rows:r,lastRowStartCharIndex:i,lastRowOffsetLeft:a}}function E(e,t,n,r){return"break-all"===t?b(e,n,r):function(e,t,n){for(var r=[],i=0,a=0,o=0,s=null,u=0;u<e.length;u++)if(" "===e[u]?(s=e[u],a=u+1):u+1<e.length&&" "===e[u+1]||u+1===e.length?(s=e.substring(a,u+1),a=u+1):s=null,s){var A=I(s,n);if(o+A>t){var c=a-s.length;if(i<c&&(r.push(e.substring(i,c)),i=c,o=0),A>t){var l=b(s,t,n);l.rows.length>1&&(r=r.concat(l.rows.slice(0,l.rows.length-1))),i+=l.lastRowStartCharIndex,A=l.lastRowOffsetLeft}}o+=A}return i<e.length&&r.push(e.substring(i)),{rows:r,lastRowStartCharIndex:i,lastRowOffsetLeft:o}}(e,n,r)}function C(e,t){for(var n=0,r=0,i=new Array(e.length),a=0;a<e.length;a++){var o=e[a],s=t[o];s?(r||(r=s.height),i[a]=n+s.width/2,n+=s.width):(v.a.warn("Missing character: ".concat(o))(),i[a]=n,n+=32)}return{leftOffsets:i,rowWidth:n,rowHeight:r}}var B=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;Object(a.a)(this,e),this.limit=t,this.clear()}return Object(o.a)(e,[{key:"clear",value:function(){this._cache={},this._order=[]}},{key:"get",value:function(e){var t=this._cache[e];return t&&(this._deleteOrder(e),this._appendOrder(e)),t}},{key:"set",value:function(e,t){this._cache[e]?(this.delete(e),this._cache[e]=t,this._appendOrder(e)):(Object.keys(this._cache).length===this.limit&&this.delete(this._order[0]),this._cache[e]=t,this._appendOrder(e))}},{key:"delete",value:function(e){this._cache[e]&&(this._deleteCache(e),this._deleteOrder(e))}},{key:"_deleteCache",value:function(e){delete this._cache[e]}},{key:"_deleteOrder",value:function(e){var t=this._order.findIndex((function(t){return t===e}));t>=0&&this._order.splice(t,1)}},{key:"_appendOrder",value:function(e){this._order.push(e)}}]),e}();function w(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return Q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Q(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var k=function(){for(var e=[],t=32;t<128;t++)e.push(String.fromCharCode(t));return e}(),_=new B(3),x=["fontFamily","fontWeight","characterSet","fontSize","sdf","buffer","cutoff","radius"];function S(e,t){var n=_.get(e);if(!n)return t;var r=[],i=n.mapping,a=Object.keys(i);a=new Set(a);var o=t;return o instanceof Array&&(o=new Set(o)),o.forEach((function(e){a.has(e)||r.push(e)})),r}function O(e,t){for(var n=0;n<e.length;n++)t.data[4*n+3]=e[n]}function D(e,t,n,r){e.font="".concat(r," ").concat(n,"px ").concat(t),e.fillStyle="#000",e.textBaseline="baseline",e.textAlign="left"}var R=function(){function e(t){Object(a.a)(this,e),this.gl=t,this.props={fontFamily:"Monaco, monospace",fontWeight:"normal",characterSet:k,fontSize:64,buffer:2,sdf:!1,cutoff:.25,radius:3},this._key=null,this._texture=new g.a(this.gl)}return Object(o.a)(e,[{key:"finalize",value:function(){this._texture.delete()}},{key:"setProps",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};x.forEach((function(n){n in t&&(e.props[n]=t[n])}));var n=this._key;this._key=this._getKey();var r=S(this._key,this.props.characterSet),i=_.get(this._key);if(i&&0===r.length)this._key!==n&&this._updateTexture(i);else{var a=this._generateFontAtlas(this._key,r,i);this._updateTexture(a),_.set(this._key,a)}}},{key:"_updateTexture",value:function(e){var t,n=e.data,r=e.width,a=e.height;this._texture.width===r&&this._texture.height===a||this._texture.resize({width:r,height:a}),this._texture.setImageData({data:n,width:r,height:a,parameters:(t={},Object(i.a)(t,10242,33071),Object(i.a)(t,10243,33071),t)}),this._texture.generateMipmap()}},{key:"_generateFontAtlas",value:function(e,t,n){var r=this.props,i=r.fontFamily,a=r.fontWeight,o=r.fontSize,s=r.buffer,u=r.sdf,A=r.radius,c=r.cutoff,l=n&&n.data;l||((l=document.createElement("canvas")).width=1024);var f=l.getContext("2d");D(f,i,o,a);var h=function(e){var t,n=e.characterSet,r=e.getFontWidth,i=e.fontHeight,a=e.buffer,o=e.maxCanvasWidth,s=e.mapping,u=void 0===s?{}:s,A=e.xOffset,c=void 0===A?0:A,l=e.yOffset,f=void 0===l?0:l,h=0,g=c,d=0,p=y(n);try{for(p.s();!(t=p.n()).done;){var v=t.value;if(!u[v]){var m=r(v,d++);g+m+2*a>o&&(g=0,h++),u[v]={x:g+a,y:f+h*(i+2*a)+a,width:m,height:i},g+=m+2*a}}}catch(E){p.e(E)}finally{p.f()}var I,b=i+2*a;return{mapping:u,xOffset:g,yOffset:f+h*b,canvasHeight:(I=f+(h+1)*b,Math.pow(2,Math.ceil(Math.log2(I))))}}(Object.assign({getFontWidth:function(e){return f.measureText(e).width},fontHeight:1.2*o,buffer:s,characterSet:t,maxCanvasWidth:1024},n&&{mapping:n.mapping,xOffset:n.xOffset,yOffset:n.yOffset})),g=h.mapping,d=h.canvasHeight,v=h.xOffset,m=h.yOffset;if(l.height!==d){var I=f.getImageData(0,0,l.width,l.height);l.height=d,f.putImageData(I,0,0)}if(D(f,i,o,a),u){var b,E=new p.a(o,s,A,c,i,a),C=f.getImageData(0,0,E.size,E.size),B=w(t);try{for(B.s();!(b=B.n()).done;){var Q=b.value;O(E.draw(Q),C),f.putImageData(C,g[Q].x-s,g[Q].y-s)}}catch(S){B.e(S)}finally{B.f()}}else{var k,_=w(t);try{for(_.s();!(k=_.n()).done;){var x=k.value;f.fillText(x,g[x].x,g[x].y+.9*o)}}catch(S){_.e(S)}finally{_.f()}}return{xOffset:v,yOffset:m,mapping:g,data:l,width:l.width,height:l.height}}},{key:"_getKey",value:function(){var e=this.props,t=e.gl,n=e.fontFamily,r=e.fontWeight,i=e.fontSize,a=e.buffer,o=e.sdf,s=e.radius,u=e.cutoff;return o?"".concat(t," ").concat(n," ").concat(r," ").concat(i," ").concat(a," ").concat(s," ").concat(u):"".concat(t," ").concat(n," ").concat(r," ").concat(i," ").concat(a)}},{key:"texture",get:function(){return this._texture}},{key:"mapping",get:function(){var e=_.get(this._key);return e&&e.mapping}},{key:"scale",get:function(){return 1.2}}]),e}();function j(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return M(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}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 F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}n.d(t,"a",(function(){return H}));var L={fontSize:64,buffer:2,sdf:!1,radius:3,cutoff:.25},P={start:1,middle:0,end:-1},U={top:1,center:0,bottom:-1},G=["fontSize","buffer","sdf","radius","cutoff"],q={billboard:!0,sizeScale:1,sizeUnits:"pixels",sizeMinPixels:0,sizeMaxPixels:Number.MAX_SAFE_INTEGER,backgroundColor:{type:"color",value:null,optional:!0},characterSet:k,fontFamily:"Monaco, monospace",fontWeight:"normal",lineHeight:1,fontSettings:{},wordBreak:"word-break",maxWidth:{type:"number",value:-1},getText:{type:"accessor",value:function(e){return e.text}},getPosition:{type:"accessor",value:function(e){return e.position}},getColor:{type:"accessor",value:[0,0,0,255]},getSize:{type:"accessor",value:32},getAngle:{type:"accessor",value:0},getTextAnchor:{type:"accessor",value:"middle"},getAlignmentBaseline:{type:"accessor",value:"center"},getPixelOffset:{type:"accessor",value:[0,0]}},H=function(e){Object(u.a)(n,e);var t=T(n);function n(){return Object(a.a)(this,n),t.apply(this,arguments)}return Object(o.a)(n,[{key:"initializeState",value:function(){this.state={styleVersion:0,fontAtlasManager:new R(this.context.gl)}}},{key:"updateState",value:function(e){var t=e.props,n=e.oldProps,r=e.changeFlags,i=this._fontChanged(n,t);i&&this._updateFontAtlas(n,t);var a=i||t.lineHeight!==n.lineHeight||t.wordBreak!==n.wordBreak||t.maxWidth!==n.maxWidth;(r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged.getText))&&this._updateText(),a&&this.setState({styleVersion:this.state.styleVersion+1})}},{key:"finalizeState",value:function(){Object(s.a)(Object(c.a)(n.prototype),"finalizeState",this).call(this),this.state.fontAtlasManager.finalize()}},{key:"getPickingInfo",value:function(e){var t=e.info;return Object.assign(t,{object:t.index>=0?this.props.data[t.index]:null})}},{key:"_updateFontAtlas",value:function(e,t){var n=t.characterSet,r=t.fontSettings,i=t.fontFamily,a=t.fontWeight;this.state.fontAtlasManager.setProps(Object.assign({},L,r,{characterSet:n,fontFamily:i,fontWeight:a})),this.setNeedsRedraw(!0)}},{key:"_fontChanged",value:function(e,t){if(e.fontFamily!==t.fontFamily||e.characterSet!==t.characterSet||e.fontWeight!==t.fontWeight)return!0;if(e.fontSettings===t.fontSettings)return!1;var n=e.fontSettings||{},r=t.fontSettings||{};return G.some((function(e){return n[e]!==r[e]}))}},{key:"_updateText",value:function(){var e,t=this.props.data,n=t.attributes&&t.attributes.getText,r=this.props.getText,i=t.startIndices;if(n&&i){var a=function(e){var t=e.value,n=e.length,r=e.stride,i=e.offset,a=e.startIndices,o=t.BYTES_PER_ELEMENT,s=r?r/o:1,u=i?i/o:0,A=a[n]||Math.floor((t.length-u-o)/s)+1,c=new Array(n),l=t;if(s>1||u>0){l=new t.constructor(A);for(var f=0;f<A;f++)l[f]=t[f*s+u]}for(var h=0;h<n;h++){var g=a[h],d=a[h+1]||A;c[h]=String.fromCodePoint.apply(null,l.subarray(g,d))}return{texts:c,characterCount:A}}(F(F({},ArrayBuffer.isView(n)?{value:n}:n),{},{length:t.length,startIndices:i})),o=a.texts;e=a.characterCount,r=function(e,t){var n=t.index;return o[n]}}else{var s=Object(l.a)(t),u=s.iterable,A=s.objectInfo;i=[0],e=0;var c,f=j(u);try{for(f.s();!(c=f.n()).done;){var h=c.value;A.index++,e+=(r(h,A)||"").length,i.push(e)}}catch(g){f.e(g)}finally{f.f()}}this.setState({getText:r,startIndices:i,numInstances:e})}},{key:"getIconOffsets",value:function(e,t){var n,i=this.state.fontAtlasManager.mapping,a=this.state.getText,o=this.props,s=o.wordBreak,u=o.maxWidth,A=o.lineHeight,c=o.getTextAnchor,l=o.getAlignmentBaseline,f=a(e,t)||"",h=function(e,t,n,r,i){for(var a=new Array(e.length),o=("break-word"===n||"break-all"===n)&&isFinite(r)&&r>0,s=[0,0],u=0,A=0,c=0;c<=e.length;c++){var l=e[c],f=void 0;if("\n"!==l&&void 0!==l||(f=e.slice(A,c)),f){var h,g=y(o?E(f,n,r,i).rows:[f]);try{for(g.s();!(h=g.n()).done;){var d,p=C(h.value,i),v=p.rowWidth,m=p.rowHeight,I=y(p.leftOffsets);try{for(I.s();!(d=I.n()).done;){var b=d.value;a[A++]={x:b,y:u+m/2,rowWidth:v}}}catch(B){I.e(B)}finally{I.f()}u+=m*t,s[0]=o?r:Math.max(s[0],v)}}catch(B){g.e(B)}finally{g.f()}}"\n"===l&&(a[A++]={x:0,y:0,rowWidth:0})}return s[1]=u,{characters:a,size:s}}(f,A,s,u,i),g=h.characters,d=Object(r.a)(h.size,2),p=d[0],v=d[1],m=P["function"===typeof c?c(e,t):c],I=U["function"===typeof l?l(e,t):l],b=new Array(2*f.length),B=0,w=j(g);try{for(w.s();!(n=w.n()).done;){var Q=n.value,k=Q.rowWidth,_=Q.x,x=Q.y,S=(1-m)*(p-k)/2;b[B++]=(m-1)*p/2+S+_,b[B++]=(I-1)*v/2+x}}catch(O){w.e(O)}finally{w.f()}return b}},{key:"renderLayers",value:function(){var e=this.state,t=e.startIndices,n=e.numInstances,r=e.getText,i=e.fontAtlasManager,a=i.scale,o=i.texture,s=i.mapping,u=e.styleVersion,A=this.props,c=A.data,l=A._dataDiff,f=A.backgroundColor,g=A.getPosition,d=A.getColor,p=A.getSize,v=A.getAngle,y=A.getPixelOffset,m=A.billboard,I=A.fontSettings,b=A.sizeScale,E=A.sizeUnits,C=A.sizeMinPixels,B=A.sizeMaxPixels,w=A.transitions,Q=A.updateTriggers,k=this.getIconOffsets.bind(this);return new(this.getSubLayerClass("characters",h.a))({sdf:I.sdf,iconAtlas:o,iconMapping:s,backgroundColor:f,getPosition:g,getColor:d,getSize:p,getAngle:v,getPixelOffset:y,billboard:m,sizeScale:b*a,sizeUnits:E,sizeMinPixels:C*a,sizeMaxPixels:B*a,transitions:w&&{getPosition:w.getPosition,getAngle:w.getAngle,getColor:w.getColor,getSize:w.getSize,getPixelOffset:Q.getPixelOffset}},this.getSubLayerProps({id:"characters",updateTriggers:{getIcon:Q.getText,getPosition:Q.getPosition,getAngle:Q.getAngle,getColor:Q.getColor,getSize:Q.getSize,getPixelOffset:Q.getPixelOffset,getIconOffsets:{getText:Q.getText,getTextAnchor:Q.getTextAnchor,getAlignmentBaseline:Q.getAlignmentBaseline,styleVersion:u}}}),{data:c,_dataDiff:l,startIndices:t,numInstances:n,getIconOffsets:k,getIcon:r})}}]),n}(f.a);H.layerName="TextLayer",H.defaultProps=q},function(e,t,n){"use strict";n.d(t,"f",(function(){return d})),n.d(t,"e",(function(){return p})),n.d(t,"a",(function(){return I})),n.d(t,"b",(function(){return E})),n.d(t,"c",(function(){return B})),n.d(t,"d",(function(){return Q}));var r=n(9),i=n.n(r),a=n(60),o=n(20),s=n(47),u=n(459),A=n.n(u),c=n(460),l=n(189),f=n(100),h=n(85),g=n(125);function d(e,t,n){return[[e,t+n],[e+n,t],[e,t-n],[e-n,t]]}function p(e){return e.sort((function(e,t){return g.b.indexOf(e.type)-g.b.indexOf(t.type)}))}function v(e){for(var t=[],n=function(e){var t=e.filter((function(e){return g.g.includes(e.field)})),n={};return t.forEach((function(e){n[e.field]=Math.floor((e.values.length||0)/2)})),n}(e),r=e.filter((function(e){return!g.g.includes(e.field)&&e.values}))[0],i=0;i<Math.min(4,r.values.length);i+=1)t.push(Object(s.a)(Object(o.a)({},r.field,i),n));return t}function y(e,t,n){return m.apply(this,arguments)}function m(){return(m=Object(a.a)(i.a.mark((function e(t,n,r){var a,o,s,u;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(l.getChannelStats)({loader:t,loaderSelection:[n]});case 2:return a=e.sent,o=t.isRgb?[[0,255],[0,255],[0,255]][r]:a[0].domain,s=t.isRgb?[[255,0,0],[0,255,0],[0,0,255]][r]:h.e[r],u=t.isRgb?[[0,255],[0,255],[0,255]][r]:a[0].autoSliders,e.abrupt("return",{selection:n,color:s,visible:!0,slider:u||o});case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(e){return b.apply(this,arguments)}function b(){return(b=Object(a.a)(i.a.mark((function e(t){var n,r,a,o,s,u,A;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=[],r=t.dimensions,a=v(r),e.next=5,Object(l.getChannelStats)({loader:t,loaderSelection:a});case 5:return o=e.sent,s=t.isRgb?[[0,255],[0,255],[0,255]]:o.map((function(e){return e.domain})),u=t.isRgb?[[255,0,0],[0,255,0],[0,0,255]]:null,A=t.isRgb?[[0,255],[0,255],[0,255]]:o.map((function(e){return e.autoSliders})),a.forEach((function(e,t){var r=s[t],i=A[t],a={selection:e,color:u?u[t]:h.e[t],visible:!0,slider:i||r};n.push(a)})),e.abrupt("return",n);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e,t){return C.apply(this,arguments)}function C(){return(C=Object(a.a)(i.a.mark((function e(t,n){var r,a,o,u,A,l;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(r=Object(c.cloneDeep)(t),a=[],o=!1,u=function(e){var t=r[e],i=n[t.index],u=Promise.resolve(t);if(t.channels){for(var A=[],c=function(e){var n=t.channels[e],r=Promise.resolve(n);!n.selection||n.color&&n.slider||(r=y(i,n.selection,e).then((function(e){return Promise.resolve(Object(s.a)({},e,{},n))})),o=!0),A.push(r)},l=0;l<t.channels.length;l++)c(l);u=Promise.all(A).then((function(e){return Promise.resolve(Object(s.a)({},t,{channels:e}))}))}a.push(u)},A=0;A<r.length;A++)u(A);return e.next=7,Promise.all(a);case 7:return l=e.sent,e.abrupt("return",[l,o]);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(e,t){return w.apply(this,arguments)}function w(){return(w=Object(a.a)(i.a.mark((function e(t,n){var r,a,o,u,A,c,l,f,h,d,p,v,y,m;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=[],a=[],o=[],e.next=5,Promise.all(t.map((function(e){return e.loaderCreator()})));case 5:for(u=e.sent,A=0;A<t.length;A++)c=t[A],l=u[A],r[A]=l,a[A]=c;if(n)for(p=n.map((function(e){return t.findIndex((function(t){return t.name===e}))})),v=function(e){var t=p[e],n=I(r[t]).then((function(e){return Promise.resolve(Object(s.a)({type:"raster",index:t},g.f,{channels:e,domainType:"Min/Max"}))}));o.push(n)},y=0;y<p.length;y++)v(y);else f=Math.floor(t.length/2),h=r[f],d=I(h).then((function(e){return Promise.resolve(Object(s.a)({type:"raster",index:f},g.f,{channels:e}))})),o.push(d);return e.next=10,Promise.all(o);case 10:return m=e.sent,e.abrupt("return",[m,r,a]);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Q(e){var t=e.observationsCount,n=e.observationsLabel,r=e.observationsPluralLabel,i=e.subobservationsCount,a=e.subobservationsLabel,o=e.subobservationsPluralLabel,s=e.locationsCount,u=[];if(i>0){var c="".concat(i," ").concat(Object(f.d)(a,o,i));s>0&&(c+=" at ".concat(A()(s)," locations")),u.push(c)}return t>0&&u.push("".concat(t," ").concat(Object(f.d)(n,r,t))),u.join(", ")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72),i=n(114);function a(e,t,n){if(void 0===n&&(n={}),!0===n.final)return function(e,t){var n=a(t,e);return n=(n+180)%360}(e,t);var o=i.getCoord(e),s=i.getCoord(t),u=r.degreesToRadians(o[0]),A=r.degreesToRadians(s[0]),c=r.degreesToRadians(o[1]),l=r.degreesToRadians(s[1]),f=Math.sin(A-u)*Math.cos(l),h=Math.cos(c)*Math.sin(l)-Math.sin(c)*Math.cos(l)*Math.cos(A-u);return r.radiansToDegrees(Math.atan2(f,h))}t.default=a},function(e,t,n){var r=n(195),i=n(592),a=n(387),o=Math.max,s=Math.min;e.exports=function(e,t,n){var u,A,c,l,f,h,g=0,d=!1,p=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=u,r=A;return u=A=void 0,g=t,l=e.apply(r,n)}function m(e){return g=e,f=setTimeout(b,t),d?y(e):l}function I(e){var n=e-h;return void 0===h||n>=t||n<0||p&&e-g>=c}function b(){var e=i();if(I(e))return E(e);f=setTimeout(b,function(e){var n=t-(e-h);return p?s(n,c-(e-g)):n}(e))}function E(e){return f=void 0,v&&u?y(e):(u=A=void 0,l)}function C(){var e=i(),n=I(e);if(u=arguments,A=this,h=e,n){if(void 0===f)return m(h);if(p)return clearTimeout(f),f=setTimeout(b,t),y(h)}return void 0===f&&(f=setTimeout(b,t)),l}return t=a(t)||0,r(n)&&(d=!!n.leading,c=(p="maxWait"in n)?o(a(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),C.cancel=function(){void 0!==f&&clearTimeout(f),g=0,u=h=A=f=void 0},C.flush=function(){return void 0===f?l:E(i())},C}},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(1023),a=(r=i)&&r.__esModule?r:{default:r};t.default=function(e,t,n){return t in e?(0,a.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},,,,function(e,t,n){"use strict";var r="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!==typeof n)throw new TypeError(n+"must be non-object");for(var r in n)i(n,r)&&(e[r]=n[r])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){var t,n,r,i,a,o;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(o=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)a=e[t],o.set(a,i),i+=a.length;return o}},o={arraySet:function(e,t,n,r,i){for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,a)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,o))},t.setTyped(r)},function(e,t,n){"use strict";var r=n(153),i=n(153).buildOptions,a=n(668);"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,r.nameRegexp);!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);var o={attributeNamePrefix:"@_",attrNodeName:!1,textNodeName:"#text",ignoreAttributes:!0,ignoreNameSpace:!1,allowBooleanAttributes:!1,parseNodeValue:!0,parseAttributeValue:!1,arrayMode:!1,trimValues:!0,cdataTagName:!1,cdataPositionChar:"\\c",tagValueProcessor:function(e,t){return e},attrValueProcessor:function(e,t){return e},stopNodes:[]};t.defaultOptions=o;var s=["attributeNamePrefix","attrNodeName","textNodeName","ignoreAttributes","ignoreNameSpace","allowBooleanAttributes","parseNodeValue","parseAttributeValue","arrayMode","trimValues","cdataTagName","cdataPositionChar","tagValueProcessor","attrValueProcessor","parseTrueNumberOnly","stopNodes"];function u(e,t,n){return t&&(n.trimValues&&(t=t.trim()),t=c(t=n.tagValueProcessor(t,e),n.parseNodeValue,n.parseTrueNumberOnly)),t}function A(e,t){if(t.ignoreNameSpace){var n=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===n[0])return"";2===n.length&&(e=r+n[1])}return e}function c(e,t,n){var i;return t&&"string"===typeof e?(""===e.trim()||isNaN(e)?i="true"===e||"false"!==e&&e:(-1!==e.indexOf("0x")?i=Number.parseInt(e,16):-1!==e.indexOf(".")?(i=Number.parseFloat(e),e=e.replace(/\.?0+$/,"")):i=Number.parseInt(e,10),n&&(i=String(i)===e?i:e)),i):r.isExist(e)?e:""}t.props=s;var l=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])(.*?)\\3)?","g");function f(e,t){if(!t.ignoreAttributes&&"string"===typeof e){e=e.replace(/\r?\n/g," ");for(var n=r.getAllMatches(e,l),i=n.length,a={},o=0;o<i;o++){var s=A(n[o][1],t);s.length&&(void 0!==n[o][4]?(t.trimValues&&(n[o][4]=n[o][4].trim()),n[o][4]=t.attrValueProcessor(n[o][4],s),a[t.attributeNamePrefix+s]=c(n[o][4],t.parseAttributeValue,t.parseTrueNumberOnly)):t.allowBooleanAttributes&&(a[t.attributeNamePrefix+s]=!0))}if(!Object.keys(a).length)return;if(t.attrNodeName){var u={};return u[t.attrNodeName]=a,u}return a}}function h(e,t){for(var n,r="",i=t;i<e.length;i++){var a=e[i];if(n)a===n&&(n="");else if('"'===a||"'"===a)n=a;else{if(">"===a)return{data:r,index:i};"\t"===a&&(a=" ")}r+=a}}function g(e,t,n,r){var i=e.indexOf(t,n);if(-1===i)throw new Error(r);return i+t.length-1}t.getTraversalObj=function(e,t){e=e.replace(/(\r\n)|\n/," "),t=i(t,o,s);for(var n=new a("!xml"),A=n,c="",l=0;l<e.length;l++){if("<"===e[l])if("/"===e[l+1]){var d=g(e,">",l,"Closing Tag is not closed."),p=e.substring(l+2,d).trim();if(t.ignoreNameSpace){var v=p.indexOf(":");-1!==v&&(p=p.substr(v+1))}A&&(A.val?A.val=r.getValue(A.val)+""+u(p,c,t):A.val=u(p,c,t)),t.stopNodes.length&&t.stopNodes.includes(A.tagname)&&(A.child=[],void 0==A.attrsMap&&(A.attrsMap={}),A.val=e.substr(A.startIndex+1,l-A.startIndex-1)),A=A.parent,c="",l=d}else if("?"===e[l+1])l=g(e,"?>",l,"Pi Tag is not closed.");else if("!--"===e.substr(l+1,3))l=g(e,"--\x3e",l,"Comment is not closed.");else if("!D"===e.substr(l+1,2)){var y=g(e,">",l,"DOCTYPE is not closed.");l=e.substring(l,y).indexOf("[")>=0?e.indexOf("]>",l)+1:y}else if("!["===e.substr(l+1,2)){var m=g(e,"]]>",l,"CDATA is not closed.")-2,I=e.substring(l+9,m);if(c&&(A.val=r.getValue(A.val)+""+u(A.tagname,c,t),c=""),t.cdataTagName){var b=new a(t.cdataTagName,A,I);A.addChild(b),A.val=r.getValue(A.val)+t.cdataPositionChar,I&&(b.val=I)}else A.val=(A.val||"")+(I||"");l=m+2}else{var E=h(e,l+1),C=E.data,B=E.index,w=C.indexOf(" "),Q=C;if(-1!==w&&(Q=C.substr(0,w).trimRight(),C=C.substr(w+1)),t.ignoreNameSpace){var k=Q.indexOf(":");-1!==k&&(Q=Q.substr(k+1))}if(A&&c&&"!xml"!==A.tagname&&(A.val=r.getValue(A.val)+""+u(A.tagname,c,t)),C.length>0&&C.lastIndexOf("/")===C.length-1){C="/"===Q[Q.length-1]?Q=Q.substr(0,Q.length-1):C.substr(0,C.length-1);var _=new a(Q,A,"");Q!==C&&(_.attrsMap=f(C,t)),A.addChild(_)}else{var x=new a(Q,A);t.stopNodes.length&&t.stopNodes.includes(x.tagname)&&(x.startIndex=B),Q!==C&&(x.attrsMap=f(C,t)),A.addChild(x),A=x}c="",l=B}else c+=e[l]}return n}},function(e,t,n){var r=n(674),i=n(675),a=n(676),o=n(677),s=n(678);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(325);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(199)(Object,"create");e.exports=r},function(e,t,n){var r=n(696);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(58),o=n(6),s=n(7),u=n(4),A=n(0),c=n.n(A),l=n(28),f=n.n(l),h=n(445),g=n(155),d=n(23);function p(e,t){for(;e;){if(e===t)return!0;e=Object.getPrototypeOf(e)}return!1}var v=n(120),y=n(217);function m(e){return e?"function"===typeof e?Object(A.createElement)(v.a,{},e):Array.isArray(e)?e.map(m):e.type===c.a.Fragment?m(e.props.children):(p(e.type,v.a),e):e}function I(e){var t=e.children,n=e.layers,r=e.views,i=[],a=[],o={};return c.a.Children.forEach(m(t),(function(e){if(e){var t=e.type;if(p(t,y.a)){var n=function(e,t){var n={},r=e.defaultProps||{};for(var i in t)r[i]!==t[i]&&(n[i]=t[i]);return new e(n)}(t,e.props);a.push(n)}else i.push(e);if(t!==v.a&&p(t,v.a)&&e.props.id){var r=new t(e.props);o[r.id]=r}}})),Object.keys(o).length>0&&(Array.isArray(r)?r.forEach((function(e){o[e.id]=e})):r&&(o[r.id]=r),r=Object.values(o)),{layers:n=a.length>0?[].concat(a,Object(d.a)(n)):n,children:i,views:r}}var b={position:"absolute",zIndex:-1};function E(e,t){return e?"function"===typeof e?e(t):Array.isArray(e)?e.map((function(e){return E(e,t)})):function(e){var t=e&&e.type,n=t&&t.defaultProps;return n&&n.mapStyle}(e)?(t.style=b,Object(A.cloneElement)(e,t)):function(e){var t=e&&e.type;return t&&t.deckGLViewProps}(e)?Object(A.cloneElement)(e,t):e:e}function C(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return B(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w(e){var t=e.children,n=(e.viewports,e.deck),r=e.ContextProvider,i=(n||{}).viewManager;if(!i||!i.views.length)return[];var a,o={},s=i.views[0].id,u=C(t);try{for(u.s();!(a=u.n()).done;){var c=a.value,l=s,f=c;p(c.type,v.a)&&(l=c.props.id||s,f=c.props.children);var h=i.getViewport(l),g=i.getViewState(l);if(h)f=E(f,{x:h.x,y:h.y,width:h.width,height:h.height,viewport:h,viewState:g}),o[l]||(o[l]={viewport:h,children:[]}),o[l].children.push(f)}}catch(y){u.e(y)}finally{u.f()}return Object.keys(o).map((function(e){var t=o[e],i=t.viewport,a=t.children,s={position:"absolute",left:i.x,top:i.y,width:i.width,height:i.height},u="view-".concat(e),c=A.createElement.apply(void 0,["div",{key:u,id:u,style:s}].concat(Object(d.a)(a)));if(r){var l={viewport:i,container:n.canvas.offsetParent,eventManager:n.eventManager,onViewStateChange:function(t){t.viewId=e,n._onViewStateChange(t)}};return Object(A.createElement)(r,{key:u,value:l},c)}return c}))}var Q={mixBlendMode:null};function k(e){var t=e.width,n=e.height,r=e.style,i={position:"absolute",zIndex:0,left:0,top:0,width:t,height:n},a={left:0,top:0};if(r)for(var o in r)o in Q?a[o]=r[o]:i[o]=r[o];return{containerStyle:i,canvasStyle:a}}function _(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}n.d(t,"a",(function(){return O}));var x=h.a.getPropTypes(f.a),S=h.a.defaultProps,O=function(e){Object(o.a)(n,e);var t=_(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e)).viewports=null,i.children=null,i._needsRedraw=null,i._containerRef=c.a.createRef(),i._canvasRef=c.a.createRef(),i.pickObject=i.pickObject.bind(Object(a.a)(i)),i.pickMultipleObjects=i.pickMultipleObjects.bind(Object(a.a)(i)),i.pickObjects=i.pickObjects.bind(Object(a.a)(i)),i._extractJSXLayers=Object(g.a)(I),i._positionChildrenUnderViews=Object(g.a)(w),i._extractStyles=Object(g.a)(k),i}return Object(i.a)(n,[{key:"componentDidMount",value:function(){var e=this.props.Deck||h.a;this.deck=this.deck||new e(Object.assign({},this.props,{parent:this._containerRef.current,canvas:this._canvasRef.current,style:null,width:"100%",height:"100%",_customRender:this._customRender.bind(this)})),this._updateFromProps(this.props)}},{key:"shouldComponentUpdate",value:function(e){this._updateFromProps(e);var t=this.children!==this._parseJSX(e).children,n=this.deck.viewManager&&this.deck.viewManager.needsRedraw();return t&&!n}},{key:"componentDidUpdate",value:function(){this._redrawDeck()}},{key:"componentWillUnmount",value:function(){this.deck.finalize()}},{key:"pickObject",value:function(e){return this.deck.pickObject(e)}},{key:"pickMultipleObjects",value:function(e){return this.deck.pickMultipleObjects(e)}},{key:"pickObjects",value:function(e){return this.deck.pickObjects(e)}},{key:"_redrawDeck",value:function(){this._needsRedraw&&(this.deck._drawLayers(this._needsRedraw),this._needsRedraw=null)}},{key:"_customRender",value:function(e){this._needsRedraw=e,this.deck.viewManager.getViewports()!==this.viewports?this.forceUpdate():this._redrawDeck()}},{key:"_parseJSX",value:function(e){return this._extractJSXLayers({layers:e.layers,views:e.views,children:e.children})}},{key:"_updateFromProps",value:function(e){var t=this._parseJSX(e),n=t.layers,r=t.views,i=Object.assign({},e,{style:null,width:"100%",height:"100%",layers:n,views:r});this.deck.setProps(i)}},{key:"render",value:function(){var e=this.props,t=e.ContextProvider,n=e.width,r=e.height,i=e.style,a=(this.deck||{}).viewManager;this.viewports=a&&a.getViewports(),this.children=this._parseJSX(this.props).children;var o=this._positionChildrenUnderViews({children:this.children,viewports:this.viewports,deck:this.deck,ContextProvider:t}),s=this._extractStyles({width:n,height:r,style:i}),u=s.containerStyle,c=s.canvasStyle,l=Object(A.createElement)("canvas",{key:"canvas",ref:this._canvasRef,style:c});return Object(A.createElement)("div",{id:"deckgl-wrapper",ref:this._containerRef,style:u},[l,o])}}]),n}(c.a.Component);O.propTypes=x,O.defaultProps=S},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(3),i=n(2),a=n(6),o=n(7),s=n(4),u=n(304),A=n(38),c=n(64),l=n(17),f=n(169);function h(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var g=[0,0,0],d={},p=function(e){Object(a.a)(n,e);var t=h(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object(r.a)(this,n),e=t.call(this,-0,-0,-0),1===arguments.length&&Object(A.f)(i)?e.copy(i):(A.b.debug&&(Object(c.a)(i),Object(c.a)(a),Object(c.a)(o)),e[0]=i,e[1]=a,e[2]=o),e}return Object(i.a)(n,null,[{key:"ZERO",get:function(){return d.ZERO=d.ZERO||Object.freeze(new n(0,0,0,0))}}]),Object(i.a)(n,[{key:"set",value:function(e,t,n){return this[0]=e,this[1]=t,this[2]=n,this.check()}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}},{key:"fromObject",value:function(e){return A.b.debug&&(Object(c.a)(e.x),Object(c.a)(e.y),Object(c.a)(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}},{key:"toObject",value:function(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}},{key:"angle",value:function(e){return l.a(this,e)}},{key:"cross",value:function(e){return l.c(this,this,e),this.check()}},{key:"rotateX",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?g:n;return l.k(this,this,r,t),this.check()}},{key:"rotateY",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?g:n;return l.l(this,this,r,t),this.check()}},{key:"rotateZ",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?g:n;return l.m(this,this,r,t),this.check()}},{key:"transform",value:function(e){return this.transformAsPoint(e)}},{key:"transformAsPoint",value:function(e){return l.q(this,this,e),this.check()}},{key:"transformAsVector",value:function(e){return Object(f.c)(this,this,e),this.check()}},{key:"transformByMatrix3",value:function(e){return l.p(this,this,e),this.check()}},{key:"transformByMatrix2",value:function(e){return Object(f.b)(this,this,e),this.check()}},{key:"transformByQuaternion",value:function(e){return l.r(this,this,e),this.check()}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(e){this[2]=Object(c.a)(e)}}]),n}(u.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),i=[255,255,255],a=0,o=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r.a)(this,e);var n=t.color,o=void 0===n?i:n,s=t.intensity,u=void 0===s?1:s;this.id=t.id||"ambient-".concat(a++),this.color=o,this.intensity=u,this.type="ambient"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(3),i=n(2),a=n(6),o=n(7),s=n(4),u=n(120),A=n(213),c=n(214);function l(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var f=function(e){Object(a.a)(n,e);var t=l(n);function n(e){return Object(r.a)(this,n),t.call(this,Object.assign({},e,{type:A.a}))}return Object(i.a)(n,[{key:"controller",get:function(){return this._getControllerProps({type:c.b})}}]),n}(u.a);f.displayName="MapView"},function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r=n(12),i=n.n(r),a=n(26),o=n(3),s=n(2),u=n(300),A=function(){function e(t){var n=t.source,r=t.name,i=void 0===r?"unnamed":r,a=t.maxConcurrency,s=void 0===a?1:a,u=t.onMessage,A=t.onDebug,c=void 0===A?function(){}:A;Object(o.a)(this,e),this.source=n,this.name=i,this.maxConcurrency=s,this.onMessage=u,this.onDebug=c,this.jobQueue=[],this.idleQueue=[],this.count=0,this.isDestroyed=!1}return Object(s.a)(e,[{key:"destroy",value:function(){this.idleQueue.forEach((function(e){return e.destroy()})),this.isDestroyed=!0}},{key:"process",value:function(e,t){var n=this;return new Promise((function(r,i){n.jobQueue.push({data:e,jobName:t,resolve:r,reject:i}),n._startQueuedJob()}))}},{key:"_startQueuedJob",value:function(){var e=Object(a.a)(i.a.mark((function e(){var t,n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.jobQueue.length){e.next=2;break}return e.abrupt("return");case 2:if(t=this._getAvailableWorker()){e.next=5;break}return e.abrupt("return");case 5:return n=this.jobQueue.shift(),this.onDebug({message:"processing",worker:t.name,job:n.jobName,backlog:this.jobQueue.length}),e.prev=7,e.t0=n,e.next=11,t.process(n.data);case 11:e.t1=e.sent,e.t0.resolve.call(e.t0,e.t1),e.next=18;break;case 15:e.prev=15,e.t2=e.catch(7),n.reject(e.t2);case 18:return e.prev=18,this._onWorkerDone(t),e.finish(18);case 21:case"end":return e.stop()}}),e,this,[[7,15,18,21]])})));return function(){return e.apply(this,arguments)}}()},{key:"_onWorkerDone",value:function(e){this.isDestroyed?e.destroy():(this.idleQueue.push(e),this._startQueuedJob())}},{key:"_getAvailableWorker",value:function(){if(this.idleQueue.length>0)return this.idleQueue.shift();if(this.count<this.maxConcurrency){this.count++;var e="".concat(this.name.toLowerCase()," (#").concat(this.count," of ").concat(this.maxConcurrency,")");return new u.a({source:this.source,onMessage:this.onMessage,name:e})}return null}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(25);function i(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,o=n||new Set;if(e){if(a(e))o.add(e);else if(a(e.buffer))o.add(e.buffer);else if(ArrayBuffer.isView(e));else if(t&&"object"===Object(r.a)(e))for(var s in e)i(e[s],t,o)}else;return void 0===n?Array.from(o):[]}function a(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!==typeof MessagePort&&e instanceof MessagePort||("undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!==typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(1);function i(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 a(e,t){if(!t)return e;var n=Object.assign({},e,t);if("defines"in t&&(n.defines=Object.assign({},e.defines,t.defines)),"modules"in t&&(n.modules=(e.modules||[]).concat(t.modules),t.modules.some((function(e){return"project64"===e.name})))){var a=n.modules.findIndex((function(e){return"project32"===e.name}));a>=0&&n.modules.splice(a,1)}if("inject"in t)if(e.inject){var o=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.inject);for(var s in t.inject)o[s]=(o[s]||"")+t.inject[s];n.inject=o}else n.inject=t.inject;return n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(25);function i(e){if(null===(t=e)||"object"!==Object(r.a)(t))throw new Error("count(): argument not an object");var t;if("function"===typeof e.count)return e.count();if(Number.isFinite(e.size))return e.size;if(Number.isFinite(e.length))return e.length;if(function(e){return null!==e&&"object"===Object(r.a)(e)&&e.constructor===Object}(e))return Object.keys(e).length;throw new Error("count(): argument not a container")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(3),i=n(2),a=n(6),o=n(7),s=n(4),u=n(119),A=n(216),c=n(117),l=n(118);function f(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var h={transitionDuration:300,transitionEasing:function(e){return e},transitionInterpolator:new c.a(["target","zoom"]),transitionInterruption:l.a.BREAK},g=function(e){Object(a.a)(n,e);var t=f(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,A.a,e)).invertPan=!0,i}return Object(i.a)(n,[{key:"_onPanRotate",value:function(e){return!1}},{key:"_getTransitionProps",value:function(){return h}}]),n}(u.a)},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(1),o=n(16),s=n(29),u=n(6),A=n(7),c=n(4),l=n(734),f=n(359),h=n(82);function g(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 d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=function(){function e(t,n){Object(r.a)(this,e),this.opts=n,this.source=t}return Object(i.a)(e,[{key:"getValue",value:function(){var e=this.source.getBuffer(),t=this.getAccessor();if(e)return[e,t];var n=this.source.value,r=t.size,i=n;if(n&&n.length!==r){i=new Float32Array(r);for(var a=t.elementOffset||0,o=0;o<r;++o)i[o]=n[a+o]}return i}},{key:"getAccessor",value:function(){return d(d({},this.source.getAccessor()),this.opts)}},{key:"value",get:function(){return this.source.value}}]),e}();var v=n(128),y=n(83),m=n(44);function I(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 b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e){return e.stride||e.size*e.bytesPerElement}function C(e,t){t.offset&&m.a.removed("shaderAttribute.offset","vertexOffset, elementOffset")();var n=E(e),r=("vertexOffset"in t?t.vertexOffset:e.vertexOffset||0)*n+(t.elementOffset||0)*e.bytesPerElement+(e.offset||0);return b(b({},t),{},{offset:r,stride:n})}var B=function(){function e(t,n){Object(r.a)(this,e),this.gl=t,this.id=n.id,this.size=n.size;var i=n.logicalType||n.type,a=5130===i,o=n.defaultValue;o=Number.isFinite(o)?[o]:o||new Array(this.size).fill(0),n.defaultValue=o;var s=i;a?s=5126:!s&&n.isIndexed?s=t&&Object(l.b)(t,f.a.ELEMENT_INDEX_UINT32)?5125:5123:s||(s=5126),n.logicalType=i,n.type=s;var u=function(e){switch(e){case 5126:return Float32Array;case 5130:return Float64Array;case 5123:case 33635:case 32819:case 32820:return Uint16Array;case 5125:return Uint32Array;case 5121:return Uint8ClampedArray;case 5120:return Int8Array;case 5122:return Int16Array;case 5124:return Int32Array;default:throw new Error("Unknown GL type")}}(i||s||5126);this.shaderAttributes={},this.doublePrecision=a,a&&!1===n.fp64&&(u=Float32Array),n.bytesPerElement=u.BYTES_PER_ELEMENT,this.defaultType=u,this.value=null,this.settings=n,this.state={externalBuffer:null,bufferAccessor:n,allocatedValue:null,constant:!1},this._buffer=null,this.setData(n)}return Object(i.a)(e,[{key:"delete",value:function(){this._buffer&&(this._buffer.delete(),this._buffer=null),v.a.release(this.state.allocatedValue)}},{key:"getShaderAttributes",value:function(e,t){if(this.doublePrecision){var n={},r=this.value instanceof Float64Array,i=function(e,t){var n=C(e,t);return{high:n,low:b(b({},n),{},{offset:n.offset+4*e.size})}}(this.getAccessor(),t||{});return n[e]=new p(this,i.high),n["".concat(e,"64Low")]=r?new p(this,i.low):new Float32Array(this.size),n}if(t){var o=C(this.getAccessor(),t);return Object(a.a)({},e,new p(this,o))}return Object(a.a)({},e,this)}},{key:"getBuffer",value:function(){return this.state.constant?null:this.state.externalBuffer||this._buffer}},{key:"getValue",value:function(){return this.state.constant?this.value:[this.getBuffer(),this.getAccessor()]}},{key:"getAccessor",value:function(){return this.state.bufferAccessor}},{key:"setData",value:function(e){var t=this.state;ArrayBuffer.isView(e)?e={value:e}:e instanceof h.a&&(e={buffer:e});var n=b(b({},this.settings),e);if(t.bufferAccessor=n,e.constant){var r=e.value;if(r=this._normalizeValue(r,[],0),this.settings.normalized&&(r=this._normalizeConstant(r)),!(!t.constant||!this._areValuesEqual(r,this.value)))return!1;t.externalBuffer=null,t.constant=!0,this.value=r}else if(e.buffer){var i=e.buffer;t.externalBuffer=i,t.constant=!1,this.value=e.value;var a=e.value instanceof Float64Array;n.type=e.type||i.accessor.type,n.bytesPerElement=i.accessor.BYTES_PER_ELEMENT*(a?2:1),n.stride=E(n)}else if(e.value){this._checkExternalBuffer(e);var o=e.value;t.externalBuffer=null,t.constant=!1,this.value=o,n.bytesPerElement=o.BYTES_PER_ELEMENT,n.stride=E(n);var s=this.buffer,u=this.byteOffset;this.doublePrecision&&o instanceof Float64Array&&(o=Object(y.f)(o,n)),s.byteLength<o.byteLength+u&&s.reallocate(2*(o.byteLength+u)),s.setAccessor(null),s.subData({data:o,offset:u}),n.type=e.type||s.accessor.type}return!0}},{key:"updateSubBuffer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.value,n=e.startOffset,r=void 0===n?0:n,i=e.endOffset;this.buffer.subData({data:this.doublePrecision&&t instanceof Float64Array?Object(y.f)(t,{size:this.size,startIndex:r,endIndex:i}):t.subarray(r,i),offset:r*t.BYTES_PER_ELEMENT+this.byteOffset})}},{key:"allocate",value:function(e){var t=e.numInstances,n=e.copy,r=void 0!==n&&n,i=this.state,a=i.allocatedValue,o=v.a.allocate(a,t+1,{size:this.size,type:this.defaultType,copy:r});this.value=o;var s=this.buffer,u=this.byteOffset;return s.byteLength<o.byteLength+u&&(s.reallocate(o.byteLength+u),r&&a&&s.subData({data:a instanceof Float64Array?Object(y.f)(a,this):a,offset:u})),i.allocatedValue=o,i.constant=!1,i.externalBuffer=null,i.bufferAccessor=this.settings,!0}},{key:"_checkExternalBuffer",value:function(e){var t=e.value;if(!e.constant&&t){var n=this.defaultType,r=!1;if(this.doublePrecision&&(r=t.BYTES_PER_ELEMENT<4),r)throw new Error("Attribute ".concat(this.id," does not support ").concat(t.constructor.name));t instanceof n||!this.settings.normalized||"normalized"in e||m.a.warn("Attribute ".concat(this.id," is normalized"))()}}},{key:"_normalizeConstant",value:function(e){switch(this.settings.type){case 5120:return new Float32Array(e).map((function(e){return(e+128)/255*2-1}));case 5122:return new Float32Array(e).map((function(e){return(e+32768)/65535*2-1}));case 5121:return new Float32Array(e).map((function(e){return e/255}));case 5123:return new Float32Array(e).map((function(e){return e/65535}));default:return e}}},{key:"_normalizeValue",value:function(e,t,n){var r=this.settings,i=r.defaultValue,a=r.size;if(Number.isFinite(e))return t[n]=e,t;if(!e)return t[n]=i[0],t;switch(a){case 4:t[n+3]=Number.isFinite(e[3])?e[3]:i[3];case 3:t[n+2]=Number.isFinite(e[2])?e[2]:i[2];case 2:t[n+1]=Number.isFinite(e[1])?e[1]:i[1];case 1:t[n+0]=Number.isFinite(e[0])?e[0]:i[0];break;default:for(var o=a;--o>=0;)t[n+o]=Number.isFinite(e[o])?e[o]:i[o]}return t}},{key:"_areValuesEqual",value:function(e,t){if(!e||!t)return!1;for(var n=this.size,r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}},{key:"buffer",get:function(){if(!this._buffer){var e=this.settings,t=e.isIndexed,n=e.type;this._buffer=new h.a(this.gl,{id:this.id,target:t?34963:34962,accessor:{type:n}})}return this._buffer}},{key:"byteOffset",get:function(){var e=this.getAccessor();return e.vertexOffset?e.vertexOffset*E(e):0}}]),e}(),w=n(57),Q=n(101),k=n(126),_=[],x=[[0,1/0]];function S(e,t){if(e===x)return e;if(t[0]<0&&(t[0]=0),t[0]>=t[1])return e;for(var n=[],r=e.length,i=0,a=0;a<r;a++){var o=e[a];o[1]<t[0]?(n.push(o),i=a+1):o[0]>t[1]?n.push(o):t=[Math.min(o[0],t[0]),Math.max(o[1],t[1])]}return n.splice(i,0,t),n}var O=n(96);function D(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return R(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function j(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var M=function(e){Object(u.a)(n,e);var t=j(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,n),i=t.call(this,e,a);var o=a.transition,s=void 0!==o&&o,u=a.noAlloc,A=void 0!==u&&u,c=a.update,l=void 0===c?null:c,f=a.accessor,h=void 0===f?null:f,g=a.transform,d=void 0===g?null:g,p=a.startIndices,v=void 0===p?null:p;return Object.assign(i.settings,{transition:s,noAlloc:A,update:l||h&&i._autoUpdater,accessor:h,transform:d}),Object.assign(i.state,{lastExternalBuffer:null,binaryValue:null,binaryAccessor:null,needsUpdate:!0,needsRedraw:!1,updateRanges:x,startIndices:v}),Object.seal(i.settings),Object.seal(i.state),i._validateAttributeUpdaters(),i}return Object(i.a)(n,[{key:"needsUpdate",value:function(){return this.state.needsUpdate}},{key:"needsRedraw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.clearChangedFlags,n=void 0!==t&&t,r=this.state.needsRedraw;return this.state.needsRedraw=r&&!n,r}},{key:"getUpdateTriggers",value:function(){var e=this.settings.accessor;return[this.id].concat("function"!==typeof e&&e||[])}},{key:"supportsTransition",value:function(){return Boolean(this.settings.transition)}},{key:"getTransitionSetting",value:function(e){var t=this.settings.accessor,n=this.settings.transition;if(!this.supportsTransition())return null;var r=Array.isArray(t)?e[t.find((function(t){return e[t]}))]:e[t];return Object(O.e)(r,n)}},{key:"setNeedsUpdate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.id,t=arguments.length>1?arguments[1]:void 0;if(this.state.needsUpdate=this.state.needsUpdate||e,this.setNeedsRedraw(e),t){var n=t.startRow,r=void 0===n?0:n,i=t.endRow,a=void 0===i?1/0:i;this.state.updateRanges=S(this.state.updateRanges,[r,a])}else this.state.updateRanges=x}},{key:"clearNeedsUpdate",value:function(){this.state.needsUpdate=!1,this.state.updateRanges=_}},{key:"setNeedsRedraw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.id;this.state.needsRedraw=this.state.needsRedraw||e}},{key:"update",value:function(e){this.setData(e)}},{key:"allocate",value:function(e){var t=this.state,r=this.settings;return!r.noAlloc&&(!!r.update&&(Object(w.a)(Number.isFinite(e)),Object(s.a)(Object(c.a)(n.prototype),"allocate",this).call(this,{numInstances:e,copy:t.updateRanges!==x}),!0))}},{key:"updateBuffer",value:function(e){var t=e.numInstances,r=e.data,i=e.props,a=e.context;if(!this.needsUpdate())return!1;var u=this.state.updateRanges,A=this.settings,l=A.update,f=A.noAlloc,h=!0;if(l){var g,d=D(u);try{for(d.s();!(g=d.n()).done;){var p=Object(o.a)(g.value,2),v=p[0],y=p[1];l.call(a,this,{data:r,startRow:v,endRow:y,props:i,numInstances:t})}}catch(Q){d.e(Q)}finally{d.f()}if(this.value)if(this.constant||this.buffer.byteLength<this.value.byteLength+this.byteOffset)this.setData({value:this.value,constant:this.constant});else{var m,I=D(u);try{for(I.s();!(m=I.n()).done;){var b=Object(o.a)(m.value,2),E=b[0],C=b[1],B=Number.isFinite(E)?this.getVertexOffset(E):0,w=Number.isFinite(C)?this.getVertexOffset(C):f||!Number.isFinite(t)?this.value.length:t*this.size;Object(s.a)(Object(c.a)(n.prototype),"updateSubBuffer",this).call(this,{startOffset:B,endOffset:w})}}catch(Q){I.e(Q)}finally{I.f()}}else;this._checkAttributeArray()}else h=!1;return this.clearNeedsUpdate(),this.setNeedsRedraw(),h}},{key:"setConstantValue",value:function(e){return void 0!==e&&"function"!==typeof e&&(this.setData({constant:!0,value:e})&&this.setNeedsRedraw(),this.clearNeedsUpdate(),!0)}},{key:"setExternalBuffer",value:function(e){var t=this.state;return e?(this.clearNeedsUpdate(),t.lastExternalBuffer===e||(t.lastExternalBuffer=e,this.setNeedsRedraw(),this.setData(e)),!0):(t.lastExternalBuffer=null,!1)}},{key:"setBinaryValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.state,r=this.settings;if(!e)return n.binaryValue=null,n.binaryAccessor=null,!1;if(r.noAlloc)return!1;if(n.binaryValue===e)return this.clearNeedsUpdate(),!0;n.binaryValue=e,this.setNeedsRedraw(),ArrayBuffer.isView(e)&&(e={value:e});var i=r.transform||t!==this.startIndices;if(i){Object(w.a)(ArrayBuffer.isView(e.value),"invalid ".concat(r.accessor));var a=e.size&&e.size!==this.size;return n.binaryAccessor=Object(Q.b)(e.value,{size:e.size||this.size,stride:e.stride,offset:e.offset,startIndices:t,nested:a}),!1}return this.clearNeedsUpdate(),this.setData(e),!0}},{key:"getVertexOffset",value:function(e){var t=this.startIndices;return(t?t[e]:e)*this.size}},{key:"getShaderAttributes",value:function(){var e=this.settings.shaderAttributes||Object(a.a)({},this.id,null),t={};for(var r in e)Object.assign(t,Object(s.a)(Object(c.a)(n.prototype),"getShaderAttributes",this).call(this,r,e[r]));return t}},{key:"_autoUpdater",value:function(e,t){var n=t.data,r=t.startRow,i=t.endRow,a=t.props,o=t.numInstances;if(!e.constant){var s=e.settings,u=e.state,A=e.value,c=e.size,l=e.startIndices,f=s.accessor,h=s.transform,g=u.binaryAccessor||("function"===typeof f?f:a[f]);Object(w.a)("function"===typeof g,'accessor "'.concat(f,'" is not a function'));var d,p=e.getVertexOffset(r),v=Object(Q.a)(n,r,i),y=v.iterable,m=v.objectInfo,I=D(y);try{for(I.s();!(d=I.n()).done;){var b=d.value;m.index++;var E=g(b,m);if(h&&(E=h.call(this,E)),l){var C=(m.index<l.length-1?l[m.index+1]:o)-l[m.index];if(E&&Array.isArray(E[0])){var B,_=p,x=D(E);try{for(x.s();!(B=x.n()).done;){var S=B.value;e._normalizeValue(S,A,_),_+=c}}catch(O){x.e(O)}finally{x.f()}}else E&&E.length>c?A.set(E,p):(e._normalizeValue(E,m.target,0),Object(k.a)({target:A,source:m.target,start:p,count:C}));p+=C*c}else e._normalizeValue(E,A,p),p+=c}}catch(O){I.e(O)}finally{I.f()}}}},{key:"_validateAttributeUpdaters",value:function(){var e=this.settings;if(!(e.noAlloc||"function"===typeof e.update))throw new Error("Attribute ".concat(this.id," missing update or accessor"))}},{key:"_checkAttributeArray",value:function(){var e=this.value,t=Math.min(4,this.size);if(e&&e.length>=t){var n=!0;switch(t){case 4:n=n&&Number.isFinite(e[3]);case 3:n=n&&Number.isFinite(e[2]);case 2:n=n&&Number.isFinite(e[1]);case 1:n=n&&Number.isFinite(e[0]);break;default:n=!1}if(!n)throw new Error("Illegal attribute generated for ".concat(this.id))}}},{key:"startIndices",get:function(){return this.state.startIndices},set:function(e){this.state.startIndices=e}}]),n}(B),N=n(79),F=n(928),T=n(142);function L(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 P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function U(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return G(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var q=function(){function e(t){var n=t.gl,i=t.attribute,a=t.timeline;Object(r.a)(this,e),this.gl=n,this.type="interpolation",this.transition=new T.a(a),this.attribute=i,this.attributeInTransition=new M(n,i.settings),this.currentStartIndices=i.startIndices,this.currentLength=0,this.transform=function(e,t){var n=Object(O.c)(t.size);return new F.a(e,{vs:"\n#define SHADER_NAME interpolation-transition-vertex-shader\n\nuniform float time;\nattribute ATTRIBUTE_TYPE aFrom;\nattribute ATTRIBUTE_TYPE aTo;\nvarying ATTRIBUTE_TYPE vCurrent;\n\nvoid main(void) {\n  vCurrent = mix(aFrom, aTo, time);\n  gl_Position = vec4(0.0);\n}\n",defines:{ATTRIBUTE_TYPE:n},varyings:["vCurrent"]})}(n,i);var o={byteLength:0,usage:35050};this.buffers=[new h.a(n,o),new h.a(n,o)]}return Object(i.a)(e,[{key:"start",value:function(e,t){if(e.duration<=0)this.transition.cancel();else{var n=this.gl,r=this.buffers,i=this.attribute;Object(O.a)(r);var a,o={numInstances:t,attribute:i,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:e.enter},s=U(r);try{for(s.s();!(a=s.n()).done;){var u=a.value;Object(O.f)(P({buffer:u},o))}}catch(A){s.e(A)}finally{s.f()}this.currentStartIndices=i.startIndices,this.currentLength=Object(O.b)(i,t),this.attributeInTransition.update({buffer:r[1],value:i.value}),this.transition.start(e),this.transform.update({elementCount:Math.floor(this.currentLength/i.size),sourceBuffers:{aFrom:r[0],aTo:Object(O.d)(n,i)},feedbackBuffers:{vCurrent:r[1]}})}}},{key:"update",value:function(){var e=this.transition.update();if(e){var t=this.transition,n=t.time,r=t.settings,i=r.duration,a=(0,r.easing)(n/i);this.transform.run({uniforms:{time:a}})}return e}},{key:"cancel",value:function(){for(this.transition.cancel(),this.transform.delete();this.buffers.length;)this.buffers.pop().delete()}},{key:"inProgress",get:function(){return this.transition.inProgress}}]),e}();var H=n(362),Y=n(179),J=n(140);function z(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 K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function W(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return V(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return V(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var X={interpolation:q,spring:function(){function e(t){var n=t.gl,i=t.attribute,o=t.timeline;Object(r.a)(this,e),this.gl=n,this.type="spring",this.transition=new T.a(o),this.attribute=i,this.attributeInTransition=new M(n,Object.assign({},i.settings,{normalized:!1})),this.currentStartIndices=i.startIndices,this.currentLength=0,this.texture=function(e){return new Y.a(e,{data:new Uint8Array(4),format:6408,type:5121,border:0,mipmaps:!1,dataFormat:6408,width:1,height:1})}(n),this.framebuffer=function(e,t){return new J.a(e,{id:"spring-transition-is-transitioning-framebuffer",width:1,height:1,attachments:Object(a.a)({},36064,t)})}(n,this.texture),this.transform=function(e,t,n){var r=Object(O.c)(t.size);return new F.a(e,{framebuffer:n,vs:"\n#define SHADER_NAME spring-transition-vertex-shader\n\n#define EPSILON 0.00001\n\nuniform float stiffness;\nuniform float damping;\nattribute ATTRIBUTE_TYPE aPrev;\nattribute ATTRIBUTE_TYPE aCur;\nattribute ATTRIBUTE_TYPE aTo;\nvarying ATTRIBUTE_TYPE vNext;\nvarying float vIsTransitioningFlag;\n\nATTRIBUTE_TYPE getNextValue(ATTRIBUTE_TYPE cur, ATTRIBUTE_TYPE prev, ATTRIBUTE_TYPE dest) {\n  ATTRIBUTE_TYPE velocity = cur - prev;\n  ATTRIBUTE_TYPE delta = dest - cur;\n  ATTRIBUTE_TYPE spring = delta * stiffness;\n  ATTRIBUTE_TYPE damper = velocity * -1.0 * damping;\n  return spring + damper + velocity + cur;\n}\n\nvoid main(void) {\n  bool isTransitioning = length(aCur - aPrev) > EPSILON || length(aTo - aCur) > EPSILON;\n  vIsTransitioningFlag = isTransitioning ? 1.0 : 0.0;\n\n  vNext = getNextValue(aCur, aPrev, aTo);\n  gl_Position = vec4(0, 0, 0, 1);\n  gl_PointSize = 100.0;\n}\n",fs:"\n#define SHADER_NAME spring-transition-is-transitioning-fragment-shader\n\nvarying float vIsTransitioningFlag;\n\nvoid main(void) {\n  if (vIsTransitioningFlag == 0.0) {\n    discard;\n  }\n  gl_FragColor = vec4(1.0);\n}",defines:{ATTRIBUTE_TYPE:r},varyings:["vNext"]})}(n,i,this.framebuffer);var s={byteLength:0,usage:35050};this.buffers=[new h.a(n,s),new h.a(n,s),new h.a(n,s)]}return Object(i.a)(e,[{key:"start",value:function(e,t){var n,r=this.gl,i=this.buffers,a=this.attribute,o={numInstances:t,attribute:a,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:e.enter},s=W(i);try{for(s.s();!(n=s.n()).done;){var u=n.value;Object(O.f)(K({buffer:u},o))}}catch(A){s.e(A)}finally{s.f()}this.currentStartIndices=a.startIndices,this.currentLength=Object(O.b)(a,t),this.attributeInTransition.update({buffer:i[1],value:a.value}),this.transition.start(e),this.transform.update({elementCount:Math.floor(this.currentLength/a.size),sourceBuffers:{aTo:Object(O.d)(r,a)}})}},{key:"update",value:function(){var e=this.buffers,t=this.transform,n=this.framebuffer,r=this.transition;return!!r.update()&&(t.update({sourceBuffers:{aPrev:e[0],aCur:e[1]},feedbackBuffers:{vNext:e[2]}}),t.run({framebuffer:n,discard:!1,clearRenderTarget:!0,uniforms:{stiffness:r.settings.stiffness,damping:r.settings.damping},parameters:{depthTest:!1,blend:!0,viewport:[0,0,1,1],blendFunc:[1,1],blendEquation:[32776,32776]}}),Object(O.a)(e),this.attributeInTransition.update({buffer:e[1],value:this.attribute.value}),Object(H.c)(n)[0]>0||r.end(),!0)}},{key:"cancel",value:function(){for(this.transition.cancel(),this.transform.delete();this.buffers.length;)this.buffers.pop().delete();this.texture.delete(),this.texture=null,this.framebuffer.delete(),this.framebuffer=null}},{key:"inProgress",get:function(){return this.transition.inProgress}}]),e}()},Z=function(){function e(t,n){var i=n.id,a=n.timeline;Object(r.a)(this,e),this.id=i,this.gl=t,this.timeline=a,this.transitions={},this.needsRedraw=!1,this.numInstances=1,F.a.isSupported(t)?this.isSupported=!0:t&&m.a.warn("WebGL2 not supported by this browser. Transition animation is disabled.")()}return Object(i.a)(e,[{key:"finalize",value:function(){for(var e in this.transitions)this._removeTransition(e)}},{key:"update",value:function(e){var t=e.attributes,n=e.transitions,r=void 0===n?{}:n,i=e.numInstances;if(this.numInstances=i||1,this.isSupported){for(var a in t){var o=t[a],s=o.getTransitionSetting(r);s&&this._updateAttribute(a,o,s)}for(var u in this.transitions){var A=t[u];A&&A.getTransitionSetting(r)||this._removeTransition(u)}}}},{key:"hasAttribute",value:function(e){var t=this.transitions[e];return t&&t.inProgress}},{key:"getAttributes",value:function(){var e={};for(var t in this.transitions){var n=this.transitions[t];n.inProgress&&(e[t]=n.attributeInTransition)}return e}},{key:"run",value:function(){if(!this.isSupported||0===this.numInstances)return!1;for(var e in this.transitions){this.transitions[e].update()&&(this.needsRedraw=!0)}var t=this.needsRedraw;return this.needsRedraw=!1,t}},{key:"_removeTransition",value:function(e){this.transitions[e].cancel(),delete this.transitions[e]}},{key:"_updateAttribute",value:function(e,t,n){var r=this.transitions[e],i=!r||r.type!==n.type;if(i){r&&this._removeTransition(e);var a=X[n.type];a?this.transitions[e]=new a({attribute:t,timeline:this.timeline,gl:this.gl}):(m.a.error("unsupported transition type '".concat(n.type,"'"))(),i=!1)}(i||t.needsRedraw())&&(this.needsRedraw=!0,this.transitions[e].start(n,this.numInstances))}}]),e}();n.d(t,"a",(function(){return $}));var $=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.id,a=void 0===i?"attribute-manager":i,o=n.stats,s=n.timeline;Object(r.a)(this,e),this.id=a,this.gl=t,this.attributes={},this.updateTriggers={},this.accessors={},this.needsRedraw=!0,this.userData={},this.stats=o,this.attributeTransitionManager=new Z(t,{id:"".concat(a,"-transitions"),timeline:s}),Object.seal(this)}return Object(i.a)(e,[{key:"finalize",value:function(){for(var e in this.attributes)this.attributes[e].delete();this.attributeTransitionManager.finalize()}},{key:"getNeedsRedraw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},t=this.needsRedraw;return this.needsRedraw=this.needsRedraw&&!e.clearRedrawFlags,t&&this.id}},{key:"setNeedsRedraw",value:function(){!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.needsRedraw=!0,this}},{key:"add",value:function(e,t){this._add(e,t)}},{key:"addInstanced",value:function(e,t){this._add(e,t,{instanced:1})}},{key:"remove",value:function(e){for(var t=0;t<e.length;t++){var n=e[t];void 0!==this.attributes[n]&&(this.attributes[n].delete(),delete this.attributes[n])}}},{key:"invalidate",value:function(e,t){var n=this._invalidateTrigger(e,t);Object(N.a)("attributeManager.invalidate",this,e,n)}},{key:"invalidateAll",value:function(e){for(var t in this.attributes)this.attributes[t].setNeedsUpdate(t,e);Object(N.a)("attributeManager.invalidate",this,"all")}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.data,n=e.numInstances,r=e.startIndices,i=void 0===r?null:r,a=e.transitions,o=e.props,s=void 0===o?{}:o,u=e.buffers,A=void 0===u?{}:u,c=e.context,l=void 0===c?{}:c,f=!1;for(var h in Object(N.a)("attributeManager.updateStart",this),this.stats&&this.stats.get("Update Attributes").timeStart(),this.attributes){var g=this.attributes[h],d=g.settings.accessor;g.startIndices=i,s[h]&&m.a.removed("props.".concat(h),"data.attributes.".concat(h))(),g.setExternalBuffer(A[h])||g.setBinaryValue(A[d],t.startIndices)||!A[d]&&g.setConstantValue(s[d])||g.needsUpdate()&&(f=!0,this._updateAttribute({attribute:g,numInstances:n,data:t,props:s,context:l})),this.needsRedraw|=g.needsRedraw()}f&&Object(N.a)("attributeManager.updateEnd",this,n),this.stats&&this.stats.get("Update Attributes").timeEnd(),this.attributeTransitionManager.update({attributes:this.attributes,numInstances:n,transitions:a})}},{key:"updateTransition",value:function(){var e=this.attributeTransitionManager.run();return this.needsRedraw=this.needsRedraw||e,e}},{key:"getAttributes",value:function(){return this.attributes}},{key:"getChangedAttributes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearChangedFlags:!1},t=this.attributes,n=this.attributeTransitionManager,r=Object.assign({},n.getAttributes());for(var i in t){var a=t[i];a.needsRedraw(e)&&!n.hasAttribute(i)&&(r[i]=a)}return r}},{key:"getShaderAttributes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e||(e=this.getAttributes());var n={};for(var r in e)t[r]||Object.assign(n,e[r].getShaderAttributes());return n}},{key:"getAccessors",value:function(){return this.updateTriggers}},{key:"_add",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t&&m.a.warn("AttributeManager.add({updaters}) - updater map no longer supported")();var r={};for(var i in e){var a=e[i],o=this._createAttribute(i,a,n);r[i]=o}Object.assign(this.attributes,r),this._mapUpdateTriggersToAttributes()}},{key:"_createAttribute",value:function(e,t,n){var r={id:e,constant:t.constant||!1,isIndexed:t.isIndexed||t.elements,size:t.elements?1:t.size,value:t.value||null,divisor:t.instanced||n.instanced?1:t.divisor};return new M(this.gl,Object.assign({},t,r))}},{key:"_mapUpdateTriggersToAttributes",value:function(){var e=this,t={},n=function(n){e.attributes[n].getUpdateTriggers().forEach((function(e){t[e]||(t[e]=[]),t[e].push(n)}))};for(var r in this.attributes)n(r);this.updateTriggers=t}},{key:"_invalidateTrigger",value:function(e,t){var n=this.attributes,r=this.updateTriggers[e];return r&&r.forEach((function(e){var r=n[e];r&&r.setNeedsUpdate(r.id,t)})),r}},{key:"_updateAttribute",value:function(e){var t=e.attribute,n=e.numInstances;Object(N.a)("attribute.updateStart",t),t.allocate(n)&&Object(N.a)("attribute.allocate",t,n),t.updateBuffer(e)&&(this.needsRedraw=!0,Object(N.a)("attribute.updateEnd",t,n))}}]),e}()},function(e,t,n){"use strict";var r,i=n(3),a=n(2),o=n(29),s=n(6),u=n(7),A=n(4),c=n(412),l=n(411),f=n(217),h=n(311),g=n(121),d=n(1),p=n(462),v=n(362),y=n(179),m=n(926),I=n(925),b=n(101),E=n(44);function C(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return B(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var w=function(){},Q=(r={},Object(d.a)(r,10241,9987),Object(d.a)(r,10240,9729),Object(d.a)(r,10242,33071),Object(d.a)(r,10243,33071),r);function k(e){return e&&(e.id||e.url)}function _(e,t,n){for(var r=0;r<t.length;r++){var i=t[r],a=i.icon,o=i.xOffset;e[k(a)]=Object.assign({},a,{x:o,y:n})}}var x=function(){function e(t,n){var r=n.onUpdate,a=void 0===r?w:r;Object(i.a)(this,e),this.gl=t,this.onUpdate=a,this._loadOptions=null,this._getIcon=null,this._texture=null,this._externalTexture=null,this._mapping={},this._pendingCount=0,this._autoPacking=!1,this._xOffset=0,this._yOffset=0,this._rowHeight=0,this._buffer=4,this._canvasWidth=1024,this._canvasHeight=0,this._canvas=null}return Object(a.a)(e,[{key:"finalize",value:function(){this._texture&&this._texture.delete()}},{key:"getTexture",value:function(){return this._texture||this._externalTexture}},{key:"getIconMapping",value:function(e){var t=this._autoPacking?k(e):e;return this._mapping[t]||{}}},{key:"setProps",value:function(e){var t=e.loadOptions,n=e.autoPacking,r=e.iconAtlas,i=e.iconMapping,a=e.data,o=e.getIcon;t&&(this._loadOptions=t),void 0!==n&&(this._autoPacking=n),o&&(this._getIcon=o),i&&(this._mapping=i),r&&this._updateIconAtlas(r),this._autoPacking&&(a||o)&&"undefined"!==typeof document&&(this._canvas=this._canvas||document.createElement("canvas"),this._updateAutoPacking(a))}},{key:"_updateIconAtlas",value:function(e){this._texture&&(this._texture.delete(),this._texture=null),e instanceof y.a?(e.setParameters(Q),this._externalTexture=e,this.onUpdate()):e&&(this._texture=new y.a(this.gl,{data:e,parameters:Q}),this.onUpdate())}},{key:"_updateAutoPacking",value:function(e){var t=Object.values(function(e,t,n){if(!e||!t)return null;n=n||{};var r,i={},a=Object(b.a)(e),o=a.iterable,s=a.objectInfo,u=C(o);try{for(u.s();!(r=u.n()).done;){var A=r.value;s.index++;var c=t(A,s),l=k(c);if(!c)throw new Error("Icon is missing.");if(!c.url)throw new Error("Icon url is missing.");i[l]||n[l]&&c.url===n[l].url||(i[l]=c)}}catch(f){u.e(f)}finally{u.f()}return i}(e,this._getIcon,this._mapping)||{});if(t.length>0){var n=function(e){for(var t,n=e.icons,r=e.buffer,i=e.mapping,a=void 0===i?{}:i,o=e.xOffset,s=void 0===o?0:o,u=e.yOffset,A=void 0===u?0:u,c=e.rowHeight,l=void 0===c?0:c,f=e.canvasWidth,h=[],g=0;g<n.length;g++){var d=n[g];if(!a[k(d)]){var p=d.height,v=d.width;s+v+r>f&&(_(a,h,A),s=0,A=l+A+r,l=0,h=[]),h.push({icon:d,xOffset:s}),s=s+v+r,l=Math.max(l,p)}}return h.length>0&&_(a,h,A),{mapping:a,rowHeight:l,xOffset:s,yOffset:A,canvasWidth:f,canvasHeight:(t=l+A+r,Math.pow(2,Math.ceil(Math.log2(t))))}}({icons:t,buffer:this._buffer,canvasWidth:this._canvasWidth,mapping:this._mapping,rowHeight:this._rowHeight,xOffset:this._xOffset,yOffset:this._yOffset}),r=n.mapping,i=n.xOffset,a=n.yOffset,o=n.rowHeight,s=n.canvasHeight;this._rowHeight=o,this._mapping=r,this._xOffset=i,this._yOffset=a,this._canvasHeight=s,this._texture||(this._texture=new y.a(this.gl,{width:this._canvasWidth,height:this._canvasHeight,parameters:Q})),this._texture.height!==this._canvasHeight&&(this._texture=function(e,t,n,r){var i=t.width,a=t.height,o=Object(p.a)(t,{width:n,height:r});return Object(v.b)(t,o,{targetY:0,width:i,height:a}),t.delete(),o}(this.gl,this._texture,this._canvasWidth,this._canvasHeight)),this.onUpdate(),this._loadIcons(t)}}},{key:"_loadIcons",value:function(e){var t,n=this,r=this._canvas.getContext("2d"),i=C(e);try{var a=function(){var e=t.value;n._pendingCount++,Object(I.a)(e.url,m.a,n._loadOptions).then((function(t){var i=k(e),a=n._mapping[i],o=a.x,s=a.y,u=a.width,A=a.height,c=function(e,t,n,r){return n===t.width&&r===t.height?t:(e.canvas.height=r,e.canvas.width=n,e.clearRect(0,0,e.canvas.width,e.canvas.height),e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.canvas)}(r,t,u,A);n._texture.setSubImageData({data:c,x:o,y:s,width:u,height:A}),n._texture.generateMipmap(),n.onUpdate()})).catch((function(e){E.a.error(e)()})).finally((function(){n._pendingCount--}))};for(i.s();!(t=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}}},{key:"isLoaded",get:function(){return 0===this._pendingCount}}]),e}();function S(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(A.a)(e);if(t){var i=Object(A.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(u.a)(this,n)}}n.d(t,"a",(function(){return R}));var O=[0,0,0,255],D={iconAtlas:{type:"object",value:null,async:!0},iconMapping:{type:"object",value:{},async:!0},sizeScale:{type:"number",value:1,min:0},billboard:!0,sizeUnits:"pixels",sizeMinPixels:{type:"number",min:0,value:0},sizeMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},alphaCutoff:{type:"number",value:.05,min:0,max:1},getPosition:{type:"accessor",value:function(e){return e.position}},getIcon:{type:"accessor",value:function(e){return e.icon}},getColor:{type:"accessor",value:O},getSize:{type:"accessor",value:1},getAngle:{type:"accessor",value:0},getPixelOffset:{type:"accessor",value:[0,0]}},R=function(e){Object(s.a)(n,e);var t=S(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"getShaders",value:function(){return Object(o.a)(Object(A.a)(n.prototype),"getShaders",this).call(this,{vs:"#define SHADER_NAME icon-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute float instanceSizes;\nattribute float instanceAngles;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute vec4 instanceIconFrames;\nattribute float instanceColorModes;\nattribute vec2 instanceOffsets;\nattribute vec2 instancePixelOffset;\n\nuniform float sizeScale;\nuniform vec2 iconsTextureDim;\nuniform float sizeMinPixels;\nuniform float sizeMaxPixels;\nuniform bool billboard;\n\nvarying float vColorMode;\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvec2 rotate_by_angle(vec2 vertex, float angle) {\n  float angle_radian = angle * PI / 180.0;\n  float cos_angle = cos(angle_radian);\n  float sin_angle = sin(angle_radian);\n  mat2 rotationMatrix = mat2(cos_angle, -sin_angle, sin_angle, cos_angle);\n  return rotationMatrix * vertex;\n}\n\nvoid main(void) {\n  geometry.worldPosition = instancePositions;\n  geometry.uv = positions;\n  geometry.pickingColor = instancePickingColors;\n  uv = positions;\n\n  vec2 iconSize = instanceIconFrames.zw;\n  float sizePixels = clamp(\n    project_size_to_pixel(instanceSizes * sizeScale), \n    sizeMinPixels, sizeMaxPixels\n  );\n  float instanceScale = iconSize.y == 0.0 ? 0.0 : sizePixels / iconSize.y;\n  vec2 pixelOffset = positions / 2.0 * iconSize + instanceOffsets;\n  pixelOffset = rotate_by_angle(pixelOffset, instanceAngles) * instanceScale;\n  pixelOffset += instancePixelOffset;\n  pixelOffset.y *= -1.0;\n\n  if (billboard)  {\n    gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n    vec3 offset = vec3(pixelOffset, 0.0);\n    DECKGL_FILTER_SIZE(offset, geometry);\n    gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n\n  } else {\n    vec3 offset_common = vec3(project_pixel_size(pixelOffset), 0.0);\n    DECKGL_FILTER_SIZE(offset_common, geometry);\n    gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset_common, geometry.position); \n  }\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  vTextureCoords = mix(\n    instanceIconFrames.xy,\n    instanceIconFrames.xy + iconSize,\n    (positions.xy + 1.0) / 2.0\n  ) / iconsTextureDim;\n\n  vColor = instanceColors;\n  DECKGL_FILTER_COLOR(vColor, geometry);\n\n  vColorMode = instanceColorModes;\n}\n",fs:"#define SHADER_NAME icon-layer-fragment-shader\n\nprecision highp float;\n\nuniform float opacity;\nuniform sampler2D iconsTexture;\nuniform float alphaCutoff;\n\nvarying float vColorMode;\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvoid main(void) {\n  geometry.uv = uv;\n\n  vec4 texColor = texture2D(iconsTexture, vTextureCoords);\n  vec3 color = mix(texColor.rgb, vColor.rgb, vColorMode);\n  float a = texColor.a * opacity * vColor.a;\n\n  if (a < alphaCutoff) {\n    discard;\n  }\n\n  gl_FragColor = vec4(color, a);\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[c.a,l.a]})}},{key:"initializeState",value:function(){var e=this;this.state={iconManager:new x(this.context.gl,{onUpdate:function(){return e._onUpdate()}})},this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceSizes:{size:1,transition:!0,accessor:"getSize",defaultValue:1},instanceOffsets:{size:2,accessor:"getIcon",transform:this.getInstanceOffset},instanceIconFrames:{size:4,accessor:"getIcon",transform:this.getInstanceIconFrame},instanceColorModes:{size:1,type:5121,accessor:"getIcon",transform:this.getInstanceColorMode},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getColor",defaultValue:O},instanceAngles:{size:1,transition:!0,accessor:"getAngle"},instancePixelOffset:{size:2,transition:!0,accessor:"getPixelOffset"}})}},{key:"updateState",value:function(e){var t=e.oldProps,r=e.props,i=e.changeFlags;Object(o.a)(Object(A.a)(n.prototype),"updateState",this).call(this,{props:r,oldProps:t,changeFlags:i});var a=this.getAttributeManager(),s=r.iconAtlas,u=r.iconMapping,c=r.data,l=r.getIcon,f=this.state.iconManager;f.setProps({loadOptions:r.loadOptions});var h=!1;if(s||this.internalState.isAsyncPropLoading("iconAtlas")?(t.iconAtlas!==r.iconAtlas&&f.setProps({iconAtlas:s,autoPacking:!1}),t.iconMapping!==r.iconMapping&&(f.setProps({iconMapping:u}),h=!0)):f.setProps({autoPacking:!0}),(i.dataChanged||i.updateTriggersChanged&&(i.updateTriggersChanged.all||i.updateTriggersChanged.getIcon))&&f.setProps({data:c,getIcon:l}),h&&(a.invalidate("instanceOffsets"),a.invalidate("instanceIconFrames"),a.invalidate("instanceColorModes")),i.extensionsChanged){var g=this.context.gl;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(g)}),a.invalidateAll()}}},{key:"finalizeState",value:function(){Object(o.a)(Object(A.a)(n.prototype),"finalizeState",this).call(this),this.state.iconManager.finalize()}},{key:"draw",value:function(e){var t=e.uniforms,n=this.props,r=n.sizeScale,i=n.sizeMinPixels,a=n.sizeMaxPixels,o=n.sizeUnits,s=n.billboard,u=n.alphaCutoff,A=this.state.iconManager,c=this.context.viewport,l=A.getTexture();l&&l.loaded&&this.state.model.setUniforms(Object.assign({},t,{iconsTexture:l,iconsTextureDim:[l.width,l.height],sizeScale:r*("pixels"===o?c.metersPerPixel:1),sizeMinPixels:i,sizeMaxPixels:a,billboard:s,alphaCutoff:u})).draw()}},{key:"_getModel",value:function(e){return new h.a(e,Object.assign({},this.getShaders(),{id:this.props.id,geometry:new g.a({drawMode:6,attributes:{positions:{size:2,value:new Float32Array([-1,-1,-1,1,1,1,1,-1])}}}),isInstanced:!0}))}},{key:"_onUpdate",value:function(){this.setNeedsRedraw()}},{key:"getInstanceOffset",value:function(e){var t=this.state.iconManager.getIconMapping(e);return[t.width/2-t.anchorX||0,t.height/2-t.anchorY||0]}},{key:"getInstanceColorMode",value:function(e){return this.state.iconManager.getIconMapping(e).mask?1:0}},{key:"getInstanceIconFrame",value:function(e){var t=this.state.iconManager.getIconMapping(e);return[t.x||0,t.y||0,t.width||0,t.height||0]}},{key:"isLoaded",get:function(){return Object(o.a)(Object(A.a)(n.prototype),"isLoaded",this)&&this.state.iconManager.isLoaded}}]),n}(f.a);R.layerName="IconLayer",R.defaultProps=D},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(29),o=n(6),s=n(7),u=n(4),A=n(412),c=n(931),l=n(411),f=n(217),h=n(311),g=n(1),d=n(44),p=n(193);function v(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 y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){Object(g.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}var I=function(e){Object(o.a)(n,e);var t=m(n);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r.a)(this,n);var i=e.id,a=void 0===i?Object(p.c)("column-geometry"):i,o=b(e),s=o.indices,u=o.attributes;return t.call(this,y(y({},e),{},{id:a,indices:s,attributes:u}))}return n}(n(121).a);function b(e){var t=e.radius,n=e.height,r=void 0===n?1:n,i=e.nradial,a=void 0===i?10:i,o=e.vertices;d.a.assert(!o||o.length>=a);for(var s=a+1,u=3*s,A=2*Math.PI/a,c=new Uint16Array(3*a*2),l=new Float32Array(3*u),f=new Float32Array(3*u),h=0,g=0;g<s;g++)for(var p=g*A,v=o&&o[g%a],y=o&&o[(g+1)%a],m=Math.sin(p),I=Math.cos(p),b=0;b<2;b++)l[h+0]=v?v[0]:I*t,l[h+1]=v?v[1]:m*t,l[h+2]=(.5-b)*r,f[h+0]=v?y[0]-v[0]:I,f[h+1]=v?y[1]-v[1]:m,h+=3;for(var E=0;E<s;E++){var C=Math.floor(E/2)*Math.sign(E%2-.5),B=C*A,w=o&&o[(C+a)%a],Q=Math.sin(B),k=Math.cos(B);l[h+0]=w?w[0]:k*t,l[h+1]=w?w[1]:Q*t,l[h+2]=r/2,f[h+2]=1,h+=3}for(var _=0,x=0;x<a;x++)c[_++]=2*x+0,c[_++]=2*x+2,c[_++]=2*x+0,c[_++]=2*x+1,c[_++]=2*x+1,c[_++]=2*x+3;return{indices:c,attributes:{POSITION:{size:3,value:l},NORMAL:{size:3,value:f}}}}function E(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}n.d(t,"a",(function(){return w}));var C=[0,0,0,255],B={diskResolution:{type:"number",min:4,value:20},vertices:null,radius:{type:"number",min:0,value:1e3},angle:{type:"number",value:0},offset:{type:"array",value:[0,0]},coverage:{type:"number",min:0,max:1,value:1},elevationScale:{type:"number",min:0,value:1},lineWidthUnits:"meters",lineWidthScale:1,lineWidthMinPixels:0,lineWidthMaxPixels:Number.MAX_SAFE_INTEGER,extruded:!0,wireframe:!1,filled:!0,stroked:!1,getPosition:{type:"accessor",value:function(e){return e.position}},getFillColor:{type:"accessor",value:C},getLineColor:{type:"accessor",value:C},getLineWidth:{type:"accessor",value:1},getElevation:{type:"accessor",value:1e3},material:!0,getColor:{deprecatedFor:["getFillColor","getLineColor"]}},w=function(e){Object(o.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"getShaders",value:function(){return Object(a.a)(Object(u.a)(n.prototype),"getShaders",this).call(this,{vs:"\n#define SHADER_NAME column-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 normals;\n\nattribute vec3 instancePositions;\nattribute float instanceElevations;\nattribute vec3 instancePositions64Low;\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute float instanceStrokeWidths;\n\nattribute vec3 instancePickingColors;\nuniform float opacity;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\nuniform bool extruded;\nuniform bool isStroke;\nuniform float coverage;\nuniform float elevationScale;\nuniform float edgeDistance;\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nvarying vec4 vColor;\n\nvoid main(void) {\n  geometry.worldPosition = instancePositions;\n\n  vec4 color = isStroke ? instanceLineColors : instanceFillColors;\n  mat2 rotationMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));\n  float elevation = 0.0;\n  float strokeOffsetRatio = 1.0;\n\n  if (extruded) {\n    elevation = instanceElevations * (positions.z + 1.0) / 2.0 * elevationScale;\n  } else if (isStroke) {\n    float widthPixels = clamp(project_size_to_pixel(instanceStrokeWidths * widthScale),\n      widthMinPixels, widthMaxPixels) / 2.0;\n    strokeOffsetRatio += sign(positions.z) * project_pixel_size(widthPixels) / project_size(edgeDistance * coverage * radius);\n  }\n  float shouldRender = float(color.a > 0.0 && instanceElevations >= 0.0);\n  float dotRadius = radius * coverage * shouldRender;\n\n  geometry.normal = project_normal(vec3(rotationMatrix * normals.xy, normals.z));\n  geometry.pickingColor = instancePickingColors;\n  vec3 centroidPosition = vec3(instancePositions.xy, instancePositions.z + elevation);\n  vec3 centroidPosition64Low = instancePositions64Low;\n  vec3 pos = vec3(project_size(rotationMatrix * positions.xy * strokeOffsetRatio + offset) * dotRadius, 0.);\n  DECKGL_FILTER_SIZE(pos, geometry);\n\n  gl_Position = project_position_to_clipspace(centroidPosition, centroidPosition64Low, pos, geometry.position);\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n  if (extruded && !isStroke) {\n    vec3 lightColor = lighting_getLightColor(color.rgb, project_uCameraPosition, geometry.position.xyz, geometry.normal);\n    vColor = vec4(lightColor, color.a * opacity);\n  } else {\n    vColor = vec4(color.rgb, color.a * opacity);\n  }\n  DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME column-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n  gl_FragColor = vColor;\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[A.a,c.a,l.a]})}},{key:"initializeState",value:function(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceElevations:{size:1,transition:!0,accessor:"getElevation"},instanceFillColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getFillColor",defaultValue:C},instanceLineColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getLineColor",defaultValue:C},instanceStrokeWidths:{size:1,accessor:"getLineWidth",transition:!0}})}},{key:"updateState",value:function(e){var t=e.props,r=e.oldProps,i=e.changeFlags;Object(a.a)(Object(u.a)(n.prototype),"updateState",this).call(this,{props:t,oldProps:r,changeFlags:i});var o=i.extensionsChanged;if(o){var s=this.context.gl;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(s)}),this.getAttributeManager().invalidateAll()}(o||t.diskResolution!==r.diskResolution||t.vertices!==r.vertices)&&this._updateGeometry(t)}},{key:"getGeometry",value:function(e,t){var n=new I({radius:1,height:2,vertices:t,nradial:e}),r=0;if(t)for(var i=0;i<e;i++){var a=t[i];r+=Math.sqrt(a[0]*a[0]+a[1]*a[1])/e}else r=1;return this.setState({edgeDistance:Math.cos(Math.PI/e)*r}),n}},{key:"_getModel",value:function(e){return new h.a(e,Object.assign({},this.getShaders(),{id:this.props.id,isInstanced:!0}))}},{key:"_updateGeometry",value:function(e){var t=e.diskResolution,n=e.vertices,r=this.getGeometry(t,n);this.setState({fillVertexCount:r.attributes.POSITION.value.length/3,wireframeVertexCount:r.indices.value.length}),this.state.model.setProps({geometry:r})}},{key:"draw",value:function(e){var t=e.uniforms,n=this.context.viewport,r=this.props,i=r.lineWidthUnits,a=r.lineWidthScale,o=r.lineWidthMinPixels,s=r.lineWidthMaxPixels,u=r.elevationScale,A=r.extruded,c=r.filled,l=r.stroked,f=r.wireframe,h=r.offset,g=r.coverage,d=r.radius,p=r.angle,v=this.state,y=v.model,m=v.fillVertexCount,I=v.wireframeVertexCount,b=v.edgeDistance,E="pixels"===i?n.metersPerPixel:1;y.setUniforms(Object.assign({},t,{radius:d,angle:p/180*Math.PI,offset:h,extruded:A,coverage:g,elevationScale:u,edgeDistance:b,widthScale:a*E,widthMinPixels:o,widthMaxPixels:s})),A&&f&&(y.setProps({isIndexed:!0}),y.setVertexCount(I).setDrawMode(1).setUniforms({isStroke:!0}).draw()),c&&(y.setProps({isIndexed:!1}),y.setVertexCount(m).setDrawMode(5).setUniforms({isStroke:!1}).draw()),!A&&l&&(y.setProps({isIndexed:!1}),y.setVertexCount(2*m/3).setDrawMode(5).setUniforms({isStroke:!0}).draw())}}]),n}(f.a);w.layerName="ColumnLayer",w.defaultProps=B},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(922),o=n(217),s=n(80),u=n(44),A=n(79),c=n(126),l=n(253),f=n(925);function h(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var d=function(){function e(t,n,i){Object(r.a)(this,e),this.id=t,this.context=i,this._loadCount=0,this._subscribers=new Set,this.setData(n)}return Object(i.a)(e,[{key:"subscribe",value:function(e){this._subscribers.add(e)}},{key:"unsubscribe",value:function(e){this._subscribers.delete(e)}},{key:"inUse",value:function(){return this._subscribers.size>0}},{key:"delete",value:function(){}},{key:"getData",value:function(){var e=this;return this.isLoaded?this._error?Promise.reject(this._error):this._content:this._loader.then((function(){return e.getData()}))}},{key:"setData",value:function(e,t){var n=this;if(e!==this._data||t){this._data=e;var r=++this._loadCount,i=e;"string"===typeof e&&(i=Object(f.a)(e)),i instanceof Promise?(this.isLoaded=!1,this._loader=i.then((function(e){n._loadCount===r&&(n.isLoaded=!0,n._error=null,n._content=e)})).catch((function(e){n._loadCount===r&&(n.isLoaded=!0,n._error=e||!0)}))):(this.isLoaded=!0,this._error=null,this._content=e);var a,o=h(this._subscribers);try{for(o.s();!(a=o.n()).done;){a.value.onChange(this.getData())}}catch(s){o.e(s)}finally{o.f()}}}}]),e}(),p=function(){function e(t){var n=t.gl,i=t.protocol;Object(r.a)(this,e),this.protocol=i||"resource://",this._context={gl:n,resourceManager:this},this._resources={},this._consumers={},this._pruneRequest=null}return Object(i.a)(e,[{key:"contains",value:function(e){return!!e.startsWith(this.protocol)||e in this._resources}},{key:"add",value:function(e){var t=e.resourceId,n=e.data,r=e.forceUpdate,i=void 0!==r&&r,a=e.persistent,o=void 0===a||a,s=this._resources[t];s?s.setData(n,i):(s=new d(t,n,this._context),this._resources[t]=s),s.persistent=o}},{key:"remove",value:function(e){var t=this._resources[e];t&&(t.delete(),delete this._resources[e])}},{key:"unsubscribe",value:function(e){var t=e.consumerId,n=this._consumers[t];if(n){for(var r in n){var i=n[r];i.resource&&i.resource.unsubscribe(i)}delete this._consumers[t],this.prune()}}},{key:"subscribe",value:function(e){var t=e.resourceId,n=e.onChange,r=e.consumerId,i=e.requestId,a=void 0===i?"default":i,o=this._resources,s=this.protocol;t.startsWith(s)&&(o[t=t.replace(s,"")]||this.add({resourceId:t,data:null,persistent:!1}));var u=o[t];if(this._track(r,a,u,n),u)return u.getData()}},{key:"prune",value:function(){var e=this;this._pruneRequest||(this._pruneRequest=setTimeout((function(){return e._prune()}),0))}},{key:"finalize",value:function(){for(var e in this._resources)this._resources[e].delete()}},{key:"_track",value:function(e,t,n,r){var i=this._consumers,a=i[e]=i[e]||{},o=a[t]||{};o.resource&&(o.resource.unsubscribe(o),o.resource=null,this.prune()),n&&(a[t]=o,o.onChange=r,o.resource=n,n.subscribe(o))}},{key:"_prune",value:function(){this._pruneRequest=null;for(var e=0,t=Object.keys(this._resources);e<t.length;e++){var n=t[e],r=this._resources[n];r.persistent||r.inUse()||(r.delete(),delete this._resources[n])}}}]),e}(),v=n(90),y=n(297);function m(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return I(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return C}));var b=Object.seal({layerManager:null,resourceManager:null,deck:null,gl:null,stats:null,shaderCache:null,pickingFBO:null,mousePosition:null,userData:{}}),E=function(e){return e instanceof o.a?"".concat(e):e?"invalid":"null"},C=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.deck,o=n.stats,s=n.viewport,u=n.timeline;Object(r.a)(this,e),this.lastRenderedLayers=[],this.layers=[],this.resourceManager=new p({gl:t,protocol:"deck://"}),this.context=Object.assign({},b,{layerManager:this,gl:t,deck:i,programManager:t&&Object(y.a)(t),stats:o||new l.a({id:"deck.gl"}),viewport:s||new v.a({id:"DEFAULT-INITIAL-VIEWPORT"}),timeline:u||new a.a,resourceManager:this.resourceManager}),this._needsRedraw="Initial render",this._needsUpdate=!1,this._debug=!1,this._onError=null,this.activateViewport=this.activateViewport.bind(this),Object.seal(this)}return Object(i.a)(e,[{key:"finalize",value:function(){this.resourceManager.finalize();var e,t=m(this.layers);try{for(t.s();!(e=t.n()).done;){var n=e.value;this._finalizeLayer(n)}}catch(r){t.e(r)}finally{t.f()}}},{key:"needsRedraw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},t=this._needsRedraw;e.clearRedrawFlags&&(this._needsRedraw=!1);var n,r=m(this.layers);try{for(r.s();!(n=r.n()).done;){var i=n.value,a=i.getNeedsRedraw(e);t=t||a}}catch(o){r.e(o)}finally{r.f()}return t}},{key:"needsUpdate",value:function(){return this._needsUpdate}},{key:"setNeedsRedraw",value:function(e){this._needsRedraw=this._needsRedraw||e}},{key:"setNeedsUpdate",value:function(e){this._needsUpdate=this._needsUpdate||e}},{key:"getLayers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.layerIds,n=void 0===t?null:t;return n?this.layers.filter((function(e){return n.find((function(t){return 0===e.id.indexOf(t)}))})):this.layers}},{key:"setProps",value:function(e){"debug"in e&&(this._debug=e.debug),"userData"in e&&(this.context.userData=e.userData),"layers"in e&&this.setLayers(e.layers),"onError"in e&&(this._onError=e.onError)}},{key:"setLayers",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t||e!==this.lastRenderedLayers;if(Object(A.a)("layerManager.setLayers",this,n,e),!n)return this;this.lastRenderedLayers=e;var r,i=m(e=Object(c.b)(e,Boolean));try{for(i.s();!(r=i.n()).done;){var a=r.value;a.context=this.context}}catch(o){i.e(o)}finally{i.f()}return this._updateLayers(this.layers,e),this}},{key:"updateLayers",value:function(){var e=this.needsUpdate();if(e){this.setNeedsRedraw("updating layers: ".concat(e));this.setLayers(this.lastRenderedLayers,!0)}}},{key:"activateViewport",value:function(e){return Object(A.a)("layerManager.activateViewport",this,e),e&&(this.context.viewport=e),this}},{key:"_handleError",value:function(e,t,n){this._onError?this._onError(t,n):u.a.error("error during ".concat(e," of ").concat(E(n)),t)()}},{key:"_updateLayers",value:function(e,t){var n,r={},i=m(e);try{for(i.s();!(n=i.n()).done;){var a=n.value;r[a.id]?u.a.warn("Multiple old layers with same id ".concat(E(a)))():r[a.id]=a}}catch(l){i.e(l)}finally{i.f()}var o=[];this._updateSublayersRecursively(t,r,o),this._finalizeOldLayers(r);for(var s=!1,A=0,c=o;A<c.length;A++){if(c[A].hasUniformTransition()){s=!0;break}}this._needsUpdate=s,this.layers=o}},{key:"_updateSublayersRecursively",value:function(e,t,n){var r,i=m(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.context=this.context;var o=t[a.id];null===o&&u.a.warn("Multiple new layers with same id ".concat(E(a)))(),t[a.id]=null;var s=null;try{this._debug&&o!==a&&a.validateProps(),o?(this._transferLayerState(o,a),this._updateLayer(a)):this._initializeLayer(a),n.push(a),s=a.isComposite&&a.getSubLayers()}catch(A){this._handleError("matching",A,a)}s&&this._updateSublayersRecursively(s,t,n)}}catch(A){i.e(A)}finally{i.f()}}},{key:"_finalizeOldLayers",value:function(e){for(var t in e){var n=e[t];n&&this._finalizeLayer(n)}}},{key:"_initializeLayer",value:function(e){try{e._initialize(),e.lifecycle=s.a.INITIALIZED}catch(t){this._handleError("initialization",t,e)}}},{key:"_transferLayerState",value:function(e,t){t._transferState(e),t.lifecycle=s.a.MATCHED,t!==e&&(e.lifecycle=s.a.AWAITING_GC)}},{key:"_updateLayer",value:function(e){try{e._update()}catch(t){this._handleError("update",t,e)}}},{key:"_finalizeLayer",value:function(e){this._needsRedraw=this._needsRedraw||"finalized ".concat(E(e)),e.lifecycle=s.a.AWAITING_FINALIZATION;try{e._finalize(),e.lifecycle=s.a.FINALIZED}catch(t){this._handleError("finalization",t,e)}}}]),e}()},function(e,t,n){"use strict";var r=n(474),i={name:"geometry",vs:"\nstruct VertexGeometry {\n  vec4 position;\n  vec3 worldPosition;\n  vec3 worldPositionAlt;\n  vec3 normal;\n  vec2 uv;\n  vec3 pickingColor;\n} geometry;\n",fs:"\n#define SMOOTH_EDGE_RADIUS 0.5\n\nstruct FragmentGeometry {\n  vec2 uv;\n} geometry;\n\nfloat smoothedge(float edge, float x) {\n  return smoothstep(edge - SMOOTH_EDGE_RADIUS, edge + SMOOTH_EDGE_RADIUS, x);\n}\n"},a=n(187);function o(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(u)throw a}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return c}));var u=[i,a.a],A=["vs:DECKGL_FILTER_SIZE(inout vec3 size, VertexGeometry geometry)","vs:DECKGL_FILTER_GL_POSITION(inout vec4 position, VertexGeometry geometry)","vs:DECKGL_FILTER_COLOR(inout vec4 color, VertexGeometry geometry)","fs:DECKGL_FILTER_COLOR(inout vec4 color, FragmentGeometry geometry)"];function c(e){var t,n=r.a.getDefaultProgramManager(e),i=o(u);try{for(i.s();!(t=i.n()).done;){var a=t.value;n.addDefaultModule(a)}}catch(f){i.e(f)}finally{i.f()}var s,c=o(A);try{for(c.s();!(s=c.n()).done;){var l=s.value;n.addShaderHook(l)}}catch(f){c.e(f)}finally{c.f()}return n}},function(e,t,n){"use strict";var r=n(1),i=n(3),a=n(2),o=n(79),s=n(6),u=n(7),A=n(4);function c(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(A.a)(e);if(t){var i=Object(A.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(u.a)(this,n)}}var l=function(e){Object(s.a)(n,e);var t=c(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return n}(n(166).a),f=n(307),h=n(140);function g(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(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 v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n.d(t,"a",(function(){return y}));var y=function(){function e(t){Object(i.a)(this,e),this.gl=t,this.layerFilter=null,this.drawPickingColors=!1,this.drawLayersPass=new l(t),this.pickLayersPass=new f.a(t),this.renderCount=0,this._needsRedraw="Initial render",this.renderBuffers=[],this.lastPostProcessEffect=null,this._onError=null}return Object(a.a)(e,[{key:"setProps",value:function(e){"layerFilter"in e&&this.layerFilter!==e.layerFilter&&(this.layerFilter=e.layerFilter,this._needsRedraw="layerFilter changed"),"drawPickingColors"in e&&this.drawPickingColors!==e.drawPickingColors&&(this.drawPickingColors=e.drawPickingColors,this._needsRedraw="drawPickingColors changed"),"onError"in e&&(this._onError=e.onError)}},{key:"renderLayers",value:function(e){var t=this.drawPickingColors?this.pickLayersPass:this.drawLayersPass;e.layerFilter=this.layerFilter,e.onError=this._onError,e.effects=e.effects||[],e.target=e.target||h.a.getDefaultFramebuffer(this.gl),this._preRender(e.effects,e);var n=this.lastPostProcessEffect?this.renderBuffers[0]:e.target,r=t.render(v(v({},e),{},{target:n}));this._postRender(e.effects,e),this.renderCount++,Object(o.a)("deckRenderer.renderLayers",this,r,e)}},{key:"needsRedraw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},t=this._needsRedraw;return e.clearRedrawFlags&&(this._needsRedraw=!1),t}},{key:"finalize",value:function(){var e,t=this.renderBuffers,n=g(t);try{for(n.s();!(e=n.n()).done;){e.value.delete()}}catch(r){n.e(r)}finally{n.f()}t.length=0}},{key:"_preRender",value:function(e,t){var n,r=null,i=g(e);try{for(i.s();!(n=i.n()).done;){var a=n.value;a.preRender(this.gl,t),a.postRender&&(r=a)}}catch(o){i.e(o)}finally{i.f()}r&&this._resizeRenderBuffers(),this.lastPostProcessEffect=r}},{key:"_resizeRenderBuffers",value:function(){var e=this.renderBuffers;0===e.length&&e.push(new h.a(this.gl),new h.a(this.gl));var t,n=g(e);try{for(n.s();!(t=n.n()).done;){t.value.resize()}}catch(r){n.e(r)}finally{n.f()}}},{key:"_postRender",value:function(e,t){var n,r=this.renderBuffers,i={inputBuffer:r[0],swapBuffer:r[1],target:null},a=g(e);try{for(a.s();!(n=a.n()).done;){var o=n.value;if(o.postRender){if(o===this.lastPostProcessEffect){i.target=t.target,o.postRender(this.gl,i);break}var s=o.postRender(this.gl,i);i.inputBuffer=s,i.swapBuffer=s===r[0]?r[1]:r[0]}}}catch(u){a.e(u)}finally{a.f()}}}]),e}()},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(29),o=n(6),s=n(7),u=n(4),A=n(294);function c(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}n.d(t,"a",(function(){return f}));var l=[],f=function(e){Object(o.a)(n,e);var t=c(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"getShaders",value:function(){return Object.assign({},Object(a.a)(Object(u.a)(n.prototype),"getShaders",this).call(this),{inject:{"vs:#decl":"\n  uniform float gamma;\n  varying float vGamma;\n","vs:#main-end":"\n  vGamma = gamma / (sizeScale * iconSize.y);\n"},fs:"#define SHADER_NAME multi-icon-layer-fragment-shader\n\nprecision highp float;\n\nuniform float opacity;\nuniform sampler2D iconsTexture;\nuniform float buffer;\nuniform bool sdf;\nuniform float alphaCutoff;\nuniform bool shouldDrawBackground;\nuniform vec3 backgroundColor;\n\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying float vGamma;\nvarying vec2 uv;\n\nvoid main(void) {\n  geometry.uv = uv;\n\n  if (!picking_uActive) {\n    float alpha = texture2D(iconsTexture, vTextureCoords).a;\n    if (sdf) {\n      alpha = smoothstep(buffer - vGamma, buffer + vGamma, alpha);\n    }\n    float a = alpha * vColor.a;\n    \n    if (a < alphaCutoff) {\n      if (shouldDrawBackground) {\n        gl_FragColor = vec4(backgroundColor, vColor.a);\n      } else {\n        discard;\n      }\n    } else {\n      if (shouldDrawBackground) {\n        gl_FragColor = vec4(mix(backgroundColor, vColor.rgb, alpha), vColor.a * opacity);\n      } else {\n        gl_FragColor = vec4(vColor.rgb, a * opacity);\n      }\n      DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n    }\n  } else {\n    DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n  }\n}\n"})}},{key:"initializeState",value:function(){var e=this;Object(a.a)(Object(u.a)(n.prototype),"initializeState",this).call(this),this.getAttributeManager().addInstanced({instanceOffsets:{size:2,accessor:"getIconOffsets"},instancePickingColors:{type:5121,size:3,accessor:function(t,n){var r=n.index,i=n.target;return e.encodePickingColor(r,i)}}})}},{key:"updateState",value:function(e){Object(a.a)(Object(u.a)(n.prototype),"updateState",this).call(this,e);var t=e.oldProps,r=e.props;if(r.backgroundColor!==t.backgroundColor){var i=Array.isArray(r.backgroundColor)?r.backgroundColor.map((function(e){return e/255})).slice(0,3):null;this.setState({backgroundColor:i})}}},{key:"draw",value:function(e){var t=e.uniforms,r=this.props.sdf,i=this.state.backgroundColor,o=Array.isArray(i);Object(a.a)(Object(u.a)(n.prototype),"draw",this).call(this,{uniforms:Object.assign({},t,{buffer:.75,gamma:.2,sdf:Boolean(r),backgroundColor:i||[0,0,0],shouldDrawBackground:o})})}},{key:"getInstanceOffset",value:function(e){var t=this;return e?Array.from(e).map((function(e){return Object(a.a)(Object(u.a)(n.prototype),"getInstanceOffset",t).call(t,e)})):l}},{key:"getInstanceColorMode",value:function(e){return 1}},{key:"getInstanceIconFrame",value:function(e){var t=this;return e?Array.from(e).map((function(e){return Object(a.a)(Object(u.a)(n.prototype),"getInstanceIconFrame",t).call(t,e)})):l}}]),n}(A.a);f.layerName="MultiIconLayer",f.defaultProps={backgroundColor:{type:"color",value:null,optional:!0},getIconOffsets:{type:"accessor",value:function(e){return e.offsets}},alphaCutoff:0}},function(e,t,n){"use strict";var r=n(12),i=n.n(r),a=n(26),o=n(3),s=n(2),u=n(98),A=new Map;function c(e){return"try {\n  importScripts('".concat(e,"');\n} catch (error) {\n  console.error(error);\n}")}var l=n(289);n.d(t,"a",(function(){return g}));var f=0;function h(e){var t=e.data;(0,e.resolve)(t)}var g=function(){function e(t){var n=t.source,r=t.name,i=void 0===r?"web-worker-".concat(f++):r,a=t.onMessage;Object(o.a)(this,e);var s=function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1],Object(u.a)("string"===typeof e,"worker source"),e.startsWith("url(")&&e.endsWith(")")){var t=e.match(/^url\((.*)\)$/)[1];if(t&&!t.startsWith("http"))return t;e=c(t)}var n=A.get(e);if(!n){var r=new Blob([e],{type:"application/javascript"});n=URL.createObjectURL(r),A.set(e,n)}return n}(n,i);this.worker=new Worker(s,{name:i}),this.name=i,this.onMessage=a||h}return Object(s.a)(e,[{key:"process",value:function(){var e=Object(a.a)(i.a.mark((function e(t){var n=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,r){n.worker.onmessage=function(t){n.onMessage({worker:n.worker,data:t.data,resolve:e,reject:r})},n.worker.onerror=function(e){var t="".concat(n.name,": WorkerThread.process() failed");e.message&&(t+=" ".concat(e.message," ").concat(e.filename,":").concat(e.lineno,":").concat(e.colno));var i=new Error(t);console.error(e),r(i)};var i=Object(l.a)(t);n.worker.postMessage(t,i)})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"destroy",value:function(){this.worker.terminate(),this.worker=null}}]),e}()},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var r=n(25),i=n(302);function a(){return!("object"===("undefined"===typeof e?"undefined":Object(r.a)(e))&&"[object process]"===String(e)&&!e.browser)||Object(i.a)()}}).call(this,n(86))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i}));var r=n(25);function i(t){if("undefined"!==typeof window&&"object"===Object(r.a)(window.process)&&"renderer"===window.process.type)return!0;if("undefined"!==typeof e&&"object"===Object(r.a)(e.versions)&&Boolean(e.versions.electron))return!0;var n="object"===("undefined"===typeof navigator?"undefined":Object(r.a)(navigator))&&"string"===typeof navigator.userAgent&&navigator.userAgent,i=t||n;return!!(i&&i.indexOf("Electron")>=0)}}).call(this,n(86))},function(e,t,n){"use strict";function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(3),i=n(2),a=n(6),o=n(7),s=n(4),u=n(305),A=n(64),c=n(127);function l(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var f=function(e){Object(a.a)(n,e);var t=l(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"copy",value:function(e){return Object(c.a)(!1),this}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var e=0,t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(e){return Math.sqrt(this.distanceSquared(e))}},{key:"distanceSquared",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n){var r=this[n]-e[n];t+=r*r}return Object(A.a)(t)}},{key:"dot",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n)t+=this[n]*e[n];return Object(A.a)(t)}},{key:"normalize",value:function(){var e=this.magnitude();if(0!==e)for(var t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}},{key:"multiply",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]*=a[o];return this.check()}},{key:"divide",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]/=a[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(e){return this.distance(e)}},{key:"distanceToSquared",value:function(e){return this.distanceSquared(e)}},{key:"getComponent",value:function(e){return Object(c.a)(e>=0&&e<this.ELEMENTS,"index is out of range"),Object(A.a)(this[e])}},{key:"setComponent",value:function(e,t){return Object(c.a)(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=t,this.check()}},{key:"addVectors",value:function(e,t){return this.copy(e).add(t)}},{key:"subVectors",value:function(e,t){return this.copy(e).subtract(t)}},{key:"multiplyVectors",value:function(e,t){return this.copy(e).multiply(t)}},{key:"addScaledVector",value:function(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}},{key:"x",get:function(){return this[0]},set:function(e){this[0]=Object(A.a)(e)}},{key:"y",get:function(){return this[1]},set:function(e){this[1]=Object(A.a)(e)}}]),n}(u.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(3),i=n(2),a=n(6),o=n(7),s=n(4),u=n(81),A=n(38),c=n(127);function l(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var f=function(e){Object(a.a)(n,e);var t=l(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}},{key:"fromArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)this[n]=e[n+t];return this.check()}},{key:"to",value:function(e){return e===this?this:Object(A.f)(e)?this.toArray(e):this.toObject(e)}},{key:"toTarget",value:function(e){return e?this.to(e):this}},{key:"toArray",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)e[t+n]=this[n];return e}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(A.b)}},{key:"formatString",value:function(e){for(var t="",n=0;n<this.ELEMENTS;++n)t+=(n>0?", ":"")+Object(A.e)(this[n],e);return"".concat(e.printTypes?this.constructor.name:"","[").concat(t,"]")}},{key:"equals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(!Object(A.d)(this[t],e[t]))return!1;return!0}},{key:"exactEquals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(this[t]!==e[t])return!1;return!0}},{key:"negate",value:function(){for(var e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}},{key:"lerp",value:function(e,t,n){void 0===n&&(n=t,t=e,e=this);for(var r=0;r<this.ELEMENTS;++r){var i=e[r];this[r]=i+n*(t[r]-i)}return this.check()}},{key:"min",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}},{key:"max",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}},{key:"clamp",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e[n]),t[n]);return this.check()}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]+=a[o];return this.check()}},{key:"subtract",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]-=a[o];return this.check()}},{key:"scale",value:function(e){if(Array.isArray(e))return this.multiply(e);for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"sub",value:function(e){return this.subtract(e)}},{key:"setScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}},{key:"addScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}},{key:"subScalar",value:function(e){return this.addScalar(-e)}},{key:"multiplyScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"divideScalar",value:function(e){return this.scale(1/e)}},{key:"clampScalar",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e),t);return this.check()}},{key:"multiplyByScalar",value:function(e){return this.scale(e)}},{key:"check",value:function(){if(A.b.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}},{key:"validate",value:function(){for(var e=this.length===this.ELEMENTS,t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}},{key:"ELEMENTS",get:function(){return Object(c.a)(!1),0}},{key:"RANK",get:function(){return Object(c.a)(!1),0}},{key:"elements",get:function(){return this}}]),n}(Object(u.a)(Array))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),i=n(2),a=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,e);var i=n.id,a=void 0===i?"pass":i;this.id=a,this.gl=t,this.props={},Object.assign(this.props,n)}return Object(i.a)(e,[{key:"setProps",value:function(e){Object.assign(this.props,e)}},{key:"render",value:function(){}},{key:"cleanup",value:function(){}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(1),i=n(3),a=n(2),o=n(29),s=n(6),u=n(7),A=n(4),c=n(166),l=n(21);function f(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 h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(A.a)(e);if(t){var i=Object(A.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(u.a)(this,n)}}var d={blendFunc:[1,0,32771,0],blendEquation:32774},p=function(e){Object(s.a)(n,e);var t=g(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"render",value:function(e){e.pickingFBO?this._drawPickingBuffer(e):Object(o.a)(Object(A.a)(n.prototype),"render",this).call(this,e)}},{key:"_drawPickingBuffer",value:function(e){var t=this,r=e.layers,i=e.layerFilter,a=e.views,s=e.viewports,u=e.onViewportActive,c=e.pickingFBO,f=e.deviceRect,g=f.x,p=f.y,v=f.width,y=f.height,m=e.pass,I=void 0===m?"picking":m,b=e.redrawReason,E=e.pickZ,C=this.gl;return this.pickZ=E,Object(l.l)(C,h(h({scissorTest:!0,scissor:[g,p,v,y],clearColor:[0,0,0,0],depthMask:!0,depthTest:!0,depthRange:[0,1],colorMask:[!0,!0,!0,!0]},d),{},{blend:!E}),(function(){Object(o.a)(Object(A.a)(n.prototype),"render",t).call(t,{target:c,layers:r,layerFilter:i,views:a,viewports:s,onViewportActive:u,pass:I,redrawReason:b})}))}},{key:"shouldDrawLayer",value:function(e){return e.props.pickable}},{key:"getModuleParameters",value:function(){return{pickingActive:1,pickingAttribute:this.pickZ,lightSources:{}}}},{key:"getLayerParameters",value:function(e,t){var n=this.pickZ?{blend:!1}:h(h({},d),{},{blend:!0,blendColor:[0,0,0,(t+1)/255]});return Object.assign({},e.props.parameters,n)}}]),n}(c.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(3),i=n(2),a=n(7),o=n(4),s=n(6),u=n(168),A=n(36),c=n(34),l=function(e){function t(){return Object(r.a)(this,t),Object(a.a)(this,Object(o.a)(t).apply(this,arguments))}return Object(s.a)(t,e),Object(i.a)(t,[{key:"toString",value:function(){var e="[";if(c.f.printRowMajor){e+="row-major:";for(var t=0;t<this.RANK;++t)for(var n=0;n<this.RANK;++n)e+=" ".concat(this[n*this.RANK+t])}else{e+="column-major:";for(var r=0;r<this.ELEMENTS;++r)e+=" ".concat(this[r])}return e+="]"}},{key:"getElementIndex",value:function(e,t){return t*this.RANK+e}},{key:"getElement",value:function(e,t){return this[t*this.RANK+e]}},{key:"setElement",value:function(e,t,n){return this[t*this.RANK+e]=Object(A.a)(n),this}},{key:"getColumn",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),n=e*this.RANK,r=0;r<this.RANK;++r)t[r]=this[n+r];return t}},{key:"setColumn",value:function(e,t){for(var n=e*this.RANK,r=0;r<this.RANK;++r)this[n+r]=t[r];return this}}]),t}(u.a)},function(e,t,n){"use strict";function r(e){for(var t=e.data,n=e.getIndex,r=e.dataRange,i=e.replace,a=r.startRow,o=void 0===a?0:a,s=r.endRow,u=void 0===s?1/0:s,A=t.length,c=A,l=A,f=0;f<A;f++){var h=n(t[f]);if(c>f&&h>=o&&(c=f),h>=u){l=f;break}}for(var g=c,d=l-c!==i.length,p=d&&t.slice(l),v=0;v<i.length;v++)t[g++]=i[v];if(d){for(var y=0;y<p.length;y++)t[g++]=p[y];t.length=g}return{startRow:c,endRow:c+i.length}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(3),i=n(2),a=n(6),o=n(7),s=n(4),u=n(81),A=n(53),c=n(130);function l(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var f=function(e){Object(a.a)(n,e);var t=l(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}},{key:"fromArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)this[n]=e[n+t];return this.check()}},{key:"to",value:function(e){return e===this?this:Object(A.d)(e)?this.toArray(e):this.toObject(e)}},{key:"toTarget",value:function(e){return e?this.to(e):this}},{key:"toArray",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)e[t+n]=this[n];return e}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(A.a)}},{key:"formatString",value:function(e){for(var t="",n=0;n<this.ELEMENTS;++n)t+=(n>0?", ":"")+Object(A.c)(this[n],e);return"".concat(e.printTypes?this.constructor.name:"","[").concat(t,"]")}},{key:"equals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(!Object(A.b)(this[t],e[t]))return!1;return!0}},{key:"exactEquals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(this[t]!==e[t])return!1;return!0}},{key:"negate",value:function(){for(var e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}},{key:"lerp",value:function(e,t,n){void 0===n&&(n=t,t=e,e=this);for(var r=0;r<this.ELEMENTS;++r){var i=e[r];this[r]=i+n*(t[r]-i)}return this.check()}},{key:"min",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}},{key:"max",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}},{key:"clamp",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e[n]),t[n]);return this.check()}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]+=a[o];return this.check()}},{key:"subtract",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]-=a[o];return this.check()}},{key:"scale",value:function(e){if(Array.isArray(e))return this.multiply(e);for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"sub",value:function(e){return this.subtract(e)}},{key:"setScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}},{key:"addScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}},{key:"subScalar",value:function(e){return this.addScalar(-e)}},{key:"multiplyScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"divideScalar",value:function(e){return this.scale(1/e)}},{key:"clampScalar",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e),t);return this.check()}},{key:"multiplyByScalar",value:function(e){return this.scale(e)}},{key:"check",value:function(){if(A.a.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}},{key:"validate",value:function(){for(var e=this.length===this.ELEMENTS,t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}},{key:"ELEMENTS",get:function(){return Object(c.a)(!1),0}},{key:"RANK",get:function(){return Object(c.a)(!1),0}},{key:"elements",get:function(){return this}}]),n}(Object(u.a)(Array))},function(e,t,n){"use strict";var r=n(1),i=n(3),a=n(2),o=n(21),s=n(474),u=n(193),A=n(51),c=n(314),l=n(927),f=n(122),h=n(82),g=n(7),d=n(58),p=n(4),v=n(29),y=n(6),m=n(89),I=null;function b(e,t){var n;return new e((n=e.BYTES_PER_ELEMENT*t,(!I||I.byteLength<n)&&(I=new ArrayBuffer(n)),I),0,t)}var E=n(116),C=n(301),B=n(302);function w(e){if(!e&&!Object(C.a)())return"Node";if(Object(B.a)(e))return"Electron";var t="undefined"!==typeof navigator?navigator:{},n=e||t.userAgent||"";if(n.indexOf("Edge")>-1)return"Edge";var r=-1!==n.indexOf("MSIE "),i=-1!==n.indexOf("Trident/");return r||i?"IE":E.b.chrome?"Chrome":E.b.safari?"Safari":E.b.mozInnerScreenX?"Firefox":"Unknown"}var Q="elements must be GL.ELEMENT_ARRAY_BUFFER",k=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(i.a)(this,t);var a=r.id||r.program&&r.program.id;return(n=Object(g.a)(this,Object(p.a)(t).call(this,e,Object.assign({},r,{id:a})))).buffer=null,n.bufferValue=null,n.isDefaultArray=r.isDefaultArray||!1,n.initialize(r),Object.seal(Object(d.a)(n)),n}return Object(y.a)(t,e),Object(a.a)(t,null,[{key:"isSupported",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!t.constantAttributeZero||(Object(o.g)(e)||"Chrome"===w())}},{key:"getDefaultArray",value:function(e){return e.luma=e.luma||{},e.luma.defaultVertexArray||(e.luma.defaultVertexArray=new t(e,{handle:null,isDefaultArray:!0})),e.luma.defaultVertexArray}},{key:"getMaxAttributes",value:function(e){return t.MAX_ATTRIBUTES=t.MAX_ATTRIBUTES||e.getParameter(34921),t.MAX_ATTRIBUTES}},{key:"setConstant",value:function(e,n,r){switch(r.constructor){case Float32Array:t._setConstantFloatArray(e,n,r);break;case Int32Array:t._setConstantIntArray(e,n,r);break;case Uint32Array:t._setConstantUintArray(e,n,r);break;default:Object(A.a)(!1)}}}]),Object(a.a)(t,[{key:"delete",value:function(){Object(v.a)(Object(p.a)(t.prototype),"delete",this).call(this),this.buffer&&this.buffer.delete()}},{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.setProps(e)}},{key:"setProps",value:function(e){return this}},{key:"setElementBuffer",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(A.a)(!t||34963===t.target,Q),this.bind((function(){e.gl.bindBuffer(34963,t?t.handle:null)})),this}},{key:"setBuffer",value:function(e,t,n){if(34963===t.target)return this.setElementBuffer(t,n);var r=n.size,i=n.type,a=n.stride,s=n.offset,u=n.normalized,c=n.integer,l=n.divisor,f=this.gl;return e=Number(e),this.bind((function(){f.bindBuffer(34962,t.handle),c?(Object(A.a)(Object(o.g)(f)),f.vertexAttribIPointer(e,r,i,a,s)):f.vertexAttribPointer(e,r,i,u,a,s),f.enableVertexAttribArray(e),f.vertexAttribDivisor(e,l||0)})),this}},{key:"enable",value:function(e){var n=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!r&&0===e&&!t.isSupported(this.gl,{constantAttributeZero:!0});return i||(e=Number(e),this.bind((function(){return r?n.gl.enableVertexAttribArray(e):n.gl.disableVertexAttribArray(e)}))),this}},{key:"getConstantBuffer",value:function(e,t,n){var r=this._normalizeConstantArrayValue(t,n),i=r.byteLength*e,a=r.length*e,o=!this.buffer;if(this.buffer=this.buffer||new h.a(this.gl,i),o=(o=o||this.buffer.reallocate(i))||!this._compareConstantArrayValues(r,this.bufferValue)){var s=b(t.constructor,a);!function(e){for(var t=e.target,n=e.source,r=e.start,i=void 0===r?0:r,a=e.count,o=void 0===a?1:a,s=n.length,u=o*s,A=0,c=i;A<s;A++)t[c++]=n[A];for(;A<u;)A<u-A?(t.copyWithin(i+A,i,i+A),A*=2):(t.copyWithin(i+A,i,i+u-A),A=u)}({target:s,source:r,start:0,count:a}),this.buffer.subData(s),this.bufferValue=t}return this.buffer}},{key:"_normalizeConstantArrayValue",value:function(e,t){return Array.isArray(e)?new Float32Array(e):e}},{key:"_compareConstantArrayValues",value:function(e,t){if(!e||!t||e.length!==t.length||e.constructor!==t.constructor)return!1;for(var n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0}},{key:"_createHandle",value:function(){return this.gl.createVertexArray()}},{key:"_deleteHandle",value:function(e){return this.gl.deleteVertexArray(e),[this.elements]}},{key:"_bindHandle",value:function(e){this.gl.bindVertexArray(e)}},{key:"_getParameter",value:function(e,t){var n=this,r=t.location;return Object(A.a)(Number.isFinite(r)),this.bind((function(){switch(e){case 34373:return n.gl.getVertexAttribOffset(r,e);default:return n.gl.getVertexAttrib(r,e)}}))}},{key:"MAX_ATTRIBUTES",get:function(){return t.getMaxAttributes(this.gl)}}],[{key:"_setConstantFloatArray",value:function(e,t,n){switch(n.length){case 1:e.vertexAttrib1fv(t,n);break;case 2:e.vertexAttrib2fv(t,n);break;case 3:e.vertexAttrib3fv(t,n);break;case 4:e.vertexAttrib4fv(t,n);break;default:Object(A.a)(!1)}}},{key:"_setConstantIntArray",value:function(e,t,n){switch(Object(A.a)(Object(o.g)(e)),n.length){case 1:e.vertexAttribI1iv(t,n);break;case 2:e.vertexAttribI2iv(t,n);break;case 3:e.vertexAttribI3iv(t,n);break;case 4:e.vertexAttribI4iv(t,n);break;default:Object(A.a)(!1)}}},{key:"_setConstantUintArray",value:function(e,t,n){switch(Object(A.a)(Object(o.g)(e)),n.length){case 1:e.vertexAttribI1uiv(t,n);break;case 2:e.vertexAttribI2uiv(t,n);break;case 3:e.vertexAttribI3uiv(t,n);break;case 4:e.vertexAttribI4uiv(t,n);break;default:Object(A.a)(!1)}}}]),t}(m.a),_=n(733),x=/^(.+)__LOCATION_([0-9]+)$/,S=["setBuffers","setGeneric","clearBindings","setLocations","setGenericValues","setDivisor","enable","disable"],O=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(i.a)(this,e);var r=n.id||n.program&&n.program.id;this.id=r,this.gl=t,this.configuration=null,this.elements=null,this.elementsAccessor=null,this.values=null,this.accessors=null,this.unused=null,this.drawParams=null,this.buffer=null,this.attributes={},this.vertexArrayObject=new k(t),Object(_.a)(this,"VertexArray","v6.0",S),this.initialize(n),Object.seal(this)}return Object(a.a)(e,[{key:"delete",value:function(){this.buffer&&this.buffer.delete(),this.vertexArrayObject.delete()}},{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.reset(),this.configuration=null,this.bindOnUse=!1,this.setProps(e)}},{key:"reset",value:function(){this.elements=null,this.elementsAccessor=null;var e=this.vertexArrayObject.MAX_ATTRIBUTES;return this.values=new Array(e).fill(null),this.accessors=new Array(e).fill(null),this.unused={},this.drawParams=null,this}},{key:"setProps",value:function(e){return"program"in e&&(this.configuration=e.program&&e.program.configuration),"configuration"in e&&(this.configuration=e.configuration),"attributes"in e&&this.setAttributes(e.attributes),"elements"in e&&this.setElementBuffer(e.elements),"bindOnUse"in e&&(e=e.bindOnUse),this}},{key:"clearDrawParams",value:function(){this.drawParams=null}},{key:"getDrawParams",value:function(){return this.drawParams=this.drawParams||this._updateDrawParams(),this.drawParams}},{key:"setAttributes",value:function(e){var t=this;return Object.assign(this.attributes,e),this.vertexArrayObject.bind((function(){for(var n in e){var r=e[n];t._setAttribute(n,r)}t.gl.bindBuffer(34962,null)})),this}},{key:"setElementBuffer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.elements=e,this.elementsAccessor=t,this.clearDrawParams(),this.vertexArrayObject.setElementBuffer(e,t),this}},{key:"setBuffer",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(34963===t.target)return this.setElementBuffer(t,n);var r=this._resolveLocationAndAccessor(e,t,t.accessor,n),i=r.location,a=r.accessor;return i>=0&&(this.values[i]=t,this.accessors[i]=a,this.clearDrawParams(),this.vertexArrayObject.setBuffer(i,t,a)),this}},{key:"setConstant",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this._resolveLocationAndAccessor(e,t,Object.assign({size:t.length},n)),i=r.location,a=r.accessor;return i>=0&&(t=this.vertexArrayObject._normalizeConstantArrayValue(t,a),this.values[i]=t,this.accessors[i]=a,this.clearDrawParams(),this.vertexArrayObject.enable(i,!1)),this}},{key:"unbindBuffers",value:function(){var e=this;return this.vertexArrayObject.bind((function(){e.elements&&e.vertexArrayObject.setElementBuffer(null),e.buffer=e.buffer||new h.a(e.gl,{accessor:{size:4}});for(var t=0;t<e.vertexArrayObject.MAX_ATTRIBUTES;t++)e.values[t]instanceof h.a&&(e.gl.disableVertexAttribArray(t),e.gl.bindBuffer(34962,e.buffer.handle),e.gl.vertexAttribPointer(t,1,5126,!1,0,0))})),this}},{key:"bindBuffers",value:function(){var e=this;return this.vertexArrayObject.bind((function(){e.elements&&e.setElementBuffer(e.elements);for(var t=0;t<e.vertexArrayObject.MAX_ATTRIBUTES;t++){var n=e.values[t];n instanceof h.a&&e.setBuffer(t,n)}})),this}},{key:"bindForDraw",value:function(e,t,n){var r,i=this;return this.vertexArrayObject.bind((function(){i._setConstantAttributes(e,t),r=n()})),r}},{key:"_resolveLocationAndAccessor",value:function(e,t,n,r){var i=this,a=this._getAttributeIndex(e),s=a.location,u=a.name;if(!Number.isFinite(s)||s<0)return this.unused[e]=t,o.h.once(3,(function(){return"unused value ".concat(e," in ").concat(i.id)}))(),this;var c=this._getAttributeInfo(u||s);if(!c)return{location:-1,accessor:null};var l=this.accessors[s]||{},h=f.a.resolve(c.accessor,l,n,r),g=h.size,d=h.type;return Object(A.a)(Number.isFinite(g)&&Number.isFinite(d)),{location:s,accessor:h}}},{key:"_getAttributeInfo",value:function(e){return this.configuration&&this.configuration.getAttributeInfo(e)}},{key:"_getAttributeIndex",value:function(e){var t=Number(e);if(Number.isFinite(t))return{location:t};var n=x.exec(e),r=n?n[1]:e,i=n?Number(n[2]):0;return this.configuration?{location:this.configuration.getAttributeLocation(r)+i,name:r}:{location:-1}}},{key:"_setAttribute",value:function(e,t){if(t instanceof h.a)this.setBuffer(e,t);else if(Array.isArray(t)&&t.length&&t[0]instanceof h.a){var n=t[0],r=t[1];this.setBuffer(e,n,r)}else if(ArrayBuffer.isView(t)||Array.isArray(t)){var i=t;this.setConstant(e,i)}else{if(!(t.buffer instanceof h.a))throw new Error("VertexArray: attributes must be Buffers or constants (i.e. typed array)");var a=t;this.setBuffer(e,a.buffer,a)}}},{key:"_setConstantAttributes",value:function(e,t){var n=Math.max(0|e,0|t),r=this.values[0];ArrayBuffer.isView(r)&&this._setConstantAttributeZero(r,n);for(var i=1;i<this.vertexArrayObject.MAX_ATTRIBUTES;i++)r=this.values[i],ArrayBuffer.isView(r)&&this._setConstantAttribute(i,r)}},{key:"_setConstantAttributeZero",value:function(e,t){if(k.isSupported(this.gl,{constantAttributeZero:!0}))this._setConstantAttribute(0,e);else{var n=this.vertexArrayObject.getConstantBuffer(t,e);this.vertexArrayObject.setBuffer(0,n,this.accessors[0])}}},{key:"_setConstantAttribute",value:function(e,t){k.setConstant(this.gl,e,t)}},{key:"_updateDrawParams",value:function(){for(var e={isIndexed:!1,isInstanced:!1,indexCount:1/0,vertexCount:1/0,instanceCount:1/0},t=0;t<this.vertexArrayObject.MAX_ATTRIBUTES;t++)this._updateDrawParamsForLocation(e,t);return this.elements&&(e.elementCount=this.elements.getElementCount(this.elements.accessor),e.isIndexed=!0,e.indexType=this.elementsAccessor.type||this.elements.accessor.type,e.indexOffset=this.elementsAccessor.offset||0),e.indexCount===1/0&&(e.indexCount=0),e.vertexCount===1/0&&(e.vertexCount=0),e.instanceCount===1/0&&(e.instanceCount=0),e}},{key:"_updateDrawParamsForLocation",value:function(e,t){var n=this.values[t],r=this.accessors[t];if(n){var i=r.divisor>0;if(e.isInstanced=e.isInstanced||i,n instanceof h.a){var a=n;if(i){var o=a.getVertexCount(r);e.instanceCount=Math.min(e.instanceCount,o)}else{var s=a.getVertexCount(r);e.vertexCount=Math.min(e.vertexCount,s)}}}}},{key:"setElements",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.h.deprecated("setElements","setElementBuffer")(),this.setElementBuffer(e,t)}}]),e}(),D=n(921),R=n(174),j=n(156);function M(e,t){for(var n=t.maxElts,r=void 0===n?16:n,i=t.size,a=void 0===i?1:i,o="[",s=0;s<e.length&&s<r;++s)s>0&&(o+=",".concat(s%a===0?" ":"")),o+=N(e[s],t);var u=e.length>r?"...":"]";return"".concat(o).concat(u)}function N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=1e-16,r=t.isInteger,i=void 0!==r&&r;if(Array.isArray(e)||ArrayBuffer.isView(e))return M(e,t);if(!Number.isFinite(e))return String(e);if(Math.abs(e)<n)return i?"0":"0.";if(i)return e.toFixed(0);if(Math.abs(e)>100&&Math.abs(e)<1e4)return e.toFixed(0);var a=e.toPrecision(2),o=a.indexOf(".0");return o===a.length-2?a.slice(0,-1):a}function F(e,t,n,i){var a,o,s=e.gl;if(!t)return o={},Object(r.a)(o,i,"null"),Object(r.a)(o,"Format ","N/A"),o;var u,A,c,l="NOT PROVIDED",f="N/A",g="N/A",d="N/A";if(n&&(l=n.type,f=n.size,u=-1!==(l=String(l).replace("Array","")).indexOf("nt")),t instanceof h.a){var p,v,y=t,m=y.getDebugData(),I=m.data;if(A=m.modified?"*":"",c=I,g=(d=y.byteLength)/I.BYTES_PER_ELEMENT/f,n){var b=n.divisor>0;v="".concat(b?"I ":"P "," ").concat(g," (x").concat(f,"=").concat(d," bytes ").concat(Object(R.a)(s,l),")")}else u=!0,v="".concat(d," bytes");return p={},Object(r.a)(p,i,"".concat(A).concat(N(c,{size:f,isInteger:u}))),Object(r.a)(p,"Format ",v),p}return c=t,f=t.length,u=-1!==(l=String(t.constructor.name).replace("Array","")).indexOf("nt"),a={},Object(r.a)(a,i,"".concat(N(c,{size:f,isInteger:u})," (constant)")),Object(r.a)(a,"Format ","".concat(f,"x").concat(l," (constant)")),a}function T(e,t){var n=t.type,r=t.size,i=Object(j.b)(n,r);return i?"".concat(e," (").concat(i.name,")"):e}function L(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.header,n=void 0===t?"Uniforms":t,i=e.program,a=e.uniforms,o=e.undefinedOnly,s=void 0!==o&&o;Object(A.a)(i);var u=".*_.*",c=".*Matrix",l=i._uniformSetters,f={},h=Object.keys(l).sort(),g=0,d=!0,p=!1,v=void 0;try{for(var y,m=h[Symbol.iterator]();!(d=(y=m.next()).done);d=!0){var I=y.value;I.match(u)||I.match(c)||P({table:f,header:n,uniforms:a,uniformName:I,undefinedOnly:s})&&g++}}catch(T){p=!0,v=T}finally{try{d||null==m.return||m.return()}finally{if(p)throw v}}var b=!0,E=!1,C=void 0;try{for(var B,w=h[Symbol.iterator]();!(b=(B=w.next()).done);b=!0){var Q=B.value;Q.match(c)&&P({table:f,header:n,uniforms:a,uniformName:Q,undefinedOnly:s})&&g++}}catch(T){E=!0,C=T}finally{try{b||null==w.return||w.return()}finally{if(E)throw C}}var k=!0,_=!1,x=void 0;try{for(var S,O=h[Symbol.iterator]();!(k=(S=O.next()).done);k=!0){var D=S.value;f[D]||P({table:f,header:n,uniforms:a,uniformName:D,undefinedOnly:s})&&g++}}catch(T){_=!0,x=T}finally{try{k||null==O.return||O.return()}finally{if(_)throw x}}var R=0,j={};if(!s)for(var M in a){var F=a[M];f[M]||(R++,j[M]=Object(r.a)({Type:"NOT USED: ".concat(F)},n,N(F)))}return{table:f,count:g,unusedTable:j,unusedCount:R}}function P(e){var t,n=e.table,i=e.header,a=e.uniforms,o=e.uniformName,s=e.undefinedOnly,u=a[o],A=function(e){return void 0!==e&&null!==e}(u);return(!s||!A)&&(n[o]=(t={},Object(r.a)(t,i,A?N(u):"N/A"),Object(r.a)(t,"Uniform Type",A?u:"NOT PROVIDED"),t),!0)}function U(e){var t=e.accessor,n=t.type,r=t.size,i=Object(j.b)(n,r);return i?"".concat(i.name," ").concat(e.name):e.name}var G=n(78),q={POSITION:"positions",NORMAL:"normals",COLOR_0:"colors",TEXCOORD_0:"texCoords",TEXCOORD_1:"texCoords1",TEXCOORD_2:"texCoords2"};function H(e,t){var n=(t||{}).attributeMap,r=void 0===n?q:n;return r&&r[e]||e}function Y(e,t){var n;switch(e){case"texCoords":case"texCoord1":case"texCoord2":case"texCoord3":n="uvs";break;case"vertices":case"positions":case"normals":case"pickingColors":n="vectors"}switch(n){case"vectors":t.size=t.size||3;break;case"uvs":t.size=t.size||2}Object(A.a)(Number.isFinite(t.size),"attribute ".concat(e," needs size"))}n.d(t,"a",(function(){return K}));var J=function(){},z={},K=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(i.a)(this,e);var r=n.id,a=void 0===r?Object(u.c)("model"):r;Object(A.a)(Object(o.f)(t)),this.id=a,this.gl=t,this.id=n.id||Object(u.c)("Model"),this.lastLogTime=0,this.initialize(n)}return Object(a.a)(e,[{key:"initialize",value:function(e){this.props={},this.programManager=e.programManager||s.a.getDefaultProgramManager(this.gl),this._programManagerState=-1,this._managedProgram=!1;var t=e.program,n=void 0===t?null:t,r=e.vs,i=e.fs,a=e.modules,o=e.defines,u=e.inject,c=e.varyings,l=e.bufferMode,f=e.transpileToGLSL100;this.programProps={program:n,vs:r,fs:i,modules:a,defines:o,inject:u,varyings:c,bufferMode:l,transpileToGLSL100:f},this.program=null,this.vertexArray=null,this._programDirty=!0,this.userData={},this.needsRedraw=!0,this._attributes={},this.attributes={},this.uniforms={},this.pickable=!0,this._checkProgram(),this.setUniforms(Object.assign({},this.getModuleUniforms(e.moduleSettings))),this.drawMode=void 0!==e.drawMode?e.drawMode:4,this.vertexCount=e.vertexCount||0,this.geometryBuffers={},this.isInstanced=e.isInstanced||e.instanced||e.instanceCount>0,this._setModelProps(e),this.geometry={},Object(A.a)(void 0!==this.drawMode&&Number.isFinite(this.vertexCount),"Model needs drawMode and vertexCount")}},{key:"setProps",value:function(e){this._setModelProps(e)}},{key:"delete",value:function(){for(var e in this._attributes)this._attributes[e]!==this.attributes[e]&&this._attributes[e].delete();this._managedProgram&&(this.programManager.release(this.program),this._managedProgram=!1),this.vertexArray.delete(),this._deleteGeometryBuffers()}},{key:"getDrawMode",value:function(){return this.drawMode}},{key:"getVertexCount",value:function(){return this.vertexCount}},{key:"getInstanceCount",value:function(){return this.instanceCount}},{key:"getAttributes",value:function(){return this.attributes}},{key:"getProgram",value:function(){return this.program}},{key:"setProgram",value:function(e){var t=e.program,n=e.vs,r=e.fs,i=e.modules,a=e.defines,o=e.inject,s=e.varyings,u=e.bufferMode,A=e.transpileToGLSL100;this.programProps={program:t,vs:n,fs:r,modules:i,defines:a,inject:o,varyings:s,bufferMode:u,transpileToGLSL100:A},this._programDirty=!0}},{key:"getUniforms",value:function(){return this.uniforms}},{key:"setDrawMode",value:function(e){return this.drawMode=e,this}},{key:"setVertexCount",value:function(e){return Object(A.a)(Number.isFinite(e)),this.vertexCount=e,this}},{key:"setInstanceCount",value:function(e){return Object(A.a)(Number.isFinite(e)),this.instanceCount=e,this}},{key:"setGeometry",value:function(e){return this.drawMode=e.drawMode,this.vertexCount=e.getVertexCount(),this._deleteGeometryBuffers(),this.geometryBuffers=function(e,t,n){var r={},i=t.indices;for(var a in t.attributes){var o=t.attributes[a],s=H(a,n);if("indices"===a)i=o;else if(o.constant)r[s]=o.value;else{var u=o.value,c=Object(G.a)({},o);delete c.value,r[s]=[new h.a(e,u),c],Y(a,c)}}if(i){var l=i.value||i;Object(A.a)(l instanceof Uint16Array||l instanceof Uint32Array,'attribute array for "indices" must be of integer type');var f={size:1,isIndexed:void 0===i.isIndexed||i.isIndexed};r.indices=[new h.a(e,{data:l,target:34963}),f]}return r}(this.gl,e),this.vertexArray.setAttributes(this.geometryBuffers),this}},{key:"setAttributes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(u.a)(e))return this;var t={};for(var n in e){var r=e[n];t[n]=r.getValue?r.getValue():r}return this.vertexArray.setAttributes(t),this}},{key:"setUniforms",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(this.uniforms,e),this}},{key:"getModuleUniforms",value:function(e){this._checkProgram();var t=this.programManager.getUniforms(this.program);return t?t(e):{}}},{key:"updateModuleSettings",value:function(e){var t=this.getModuleUniforms(e||{});return this.setUniforms(t)}},{key:"clear",value:function(e){return Object(c.a)(this.program.gl,e),this}},{key:"draw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._checkProgram();var t,n=e.moduleSettings,r=void 0===n?null:n,i=e.framebuffer,a=e.uniforms,s=void 0===a?{}:a,u=e.attributes,A=void 0===u?{}:u,c=e.transformFeedback,l=void 0===c?this.transformFeedback:c,f=e.parameters,h=void 0===f?{}:f,g=e.vertexArray,d=void 0===g?this.vertexArray:g;this.setAttributes(A),this.updateModuleSettings(r),this.setUniforms(s),o.h.priority>=2&&(t=this._logDrawCallStart(2));var p=this.vertexArray.getDrawParams(),v=this.props,y=v.isIndexed,m=void 0===y?p.isIndexed:y,I=v.indexType,b=void 0===I?p.indexType:I,E=v.indexOffset,C=void 0===E?p.indexOffset:E,B=v.vertexArrayInstanced,w=void 0===B?p.isInstanced:B;w&&!this.isInstanced&&o.h.warn("Found instanced attributes on non-instanced model",this.id)();var Q=this.isInstanced,k=this.instanceCount,_=this.props,x=_.onBeforeRender,S=void 0===x?J:x,O=_.onAfterRender,D=void 0===O?J:O;S(),this.program.setUniforms(this.uniforms);var R=this.program.draw(Object.assign(z,e,{logPriority:t,uniforms:null,framebuffer:i,parameters:h,drawMode:this.getDrawMode(),vertexCount:this.getVertexCount(),vertexArray:d,transformFeedback:l,isIndexed:m,indexType:b,isInstanced:Q,instanceCount:k,offset:m?C:0}));return D(),o.h.priority>=2&&this._logDrawCallEnd(t,d,i),R}},{key:"transform",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.discard,n=void 0===t||t,i=e.feedbackBuffers,a=e.unbindModels,o=void 0===a?[]:a,s=e.parameters;i&&this._setFeedbackBuffers(i),n&&(s=Object.assign({},s,Object(r.a)({},35977,n))),o.forEach((function(e){return e.vertexArray.unbindBuffers()}));try{this.draw(Object.assign({},e,{parameters:s}))}finally{o.forEach((function(e){return e.vertexArray.bindBuffers()}))}return this}},{key:"render",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o.h.warn("Model.render() is deprecated. Use Model.setUniforms() and Model.draw()")(),this.setUniforms(e).draw()}},{key:"_setModelProps",value:function(e){Object.assign(this.props,e),"uniforms"in e&&this.setUniforms(e.uniforms),"pickable"in e&&(this.pickable=e.pickable),"instanceCount"in e&&(this.instanceCount=e.instanceCount),"geometry"in e&&this.setGeometry(e.geometry),"attributes"in e&&this.setAttributes(e.attributes),"_feedbackBuffers"in e&&this._setFeedbackBuffers(e._feedbackBuffers)}},{key:"_checkProgram",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];var e=this._programDirty||this.programManager.stateHash!==this._programManagerState;if(e){var t=this.programProps.program;if(t)this._managedProgram=!1;else{var n=this.programProps,r=n.vs,i=n.fs,a=n.modules,o=n.inject,s=n.defines,u=n.varyings,c=n.bufferMode,f=n.transpileToGLSL100;t=this.programManager.get({vs:r,fs:i,modules:a,inject:o,defines:s,varyings:u,bufferMode:c,transpileToGLSL100:f}),this.program&&this._managedProgram&&this.programManager.release(this.program),this._programManagerState=this.programManager.stateHash,this._managedProgram=!0}Object(A.a)(t instanceof l.a,"Model needs a program"),this._programDirty=!1,t!==this.program&&(this.program=t,this.vertexArray?this.vertexArray.setProps({program:this.program,attributes:this.vertexArray.attributes}):this.vertexArray=new O(this.gl,{program:this.program}),this.setUniforms(Object.assign({},this.getModuleUniforms())))}}},{key:"_deleteGeometryBuffers",value:function(){for(var e in this.geometryBuffers){var t=this.geometryBuffers[e][0]||this.geometryBuffers[e];t instanceof h.a&&t.delete()}}},{key:"_setAnimationProps",value:function(e){if(this.animated){Object(A.a)(e,"Model.draw(): animated uniforms but no animationProps");var t=this._evaluateAnimateUniforms(e);Object.assign(this.uniforms,t)}}},{key:"_setFeedbackBuffers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(u.a)(e))return this;var t=this.program.gl;return this.transformFeedback=this.transformFeedback||new D.a(t,{program:this.program}),this.transformFeedback.setBuffers(e),this}},{key:"_logDrawCallStart",value:function(e){var t=e>3?0:1e4;if(!(Date.now()-this.lastLogTime<t))return this.lastLogTime=Date.now(),o.h.group(2,">>> DRAWING MODEL ".concat(this.id),{collapsed:o.h.level<=2})(),e}},{key:"_logDrawCallEnd",value:function(e,t,n,i){if(void 0!==e){var a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.vertexArray,n=e.header,r=void 0===n?"Attributes":n;if(!t.configuration)return{};var i={};t.elements&&(i.ELEMENT_ARRAY_BUFFER=F(t,t.elements,null,r));var a=t.values;for(var o in a){var s=t._getAttributeInfo(o);if(s){var u="".concat(o,": ").concat(s.name),A=t.accessors[s.location];A&&(u="".concat(o,": ").concat(T(s.name,A))),i[u]=F(t,a[o],A,r)}}return i}({vertexArray:t,header:"".concat(this.id," attributes"),attributes:this._attributes}),s=L({header:"".concat(this.id," uniforms"),program:this.program,uniforms:Object.assign({},this.program.uniforms,n)}),u=s.table,A=s.unusedTable,c=s.unusedCount,l=L({header:"".concat(this.id," uniforms"),program:this.program,uniforms:Object.assign({},this.program.uniforms,n),undefinedOnly:!0}),f=l.table;l.count>0&&o.h.log("MISSING UNIFORMS",Object.keys(f))(),c>0&&o.h.log("UNUSED UNIFORMS",Object.keys(A))();var h=function(e){var t={},n="Accessors for ".concat(e.id),i=!0,a=!1,o=void 0;try{for(var s,u=e.attributeInfos[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var A=s.value;if(A){var c=U(A);t["in ".concat(c)]=Object(r.a)({},n,JSON.stringify(A.accessor))}}}catch(y){a=!0,o=y}finally{try{i||null==u.return||u.return()}finally{if(a)throw o}}var l=!0,f=!1,h=void 0;try{for(var g,d=e.varyingInfos[Symbol.iterator]();!(l=(g=d.next()).done);l=!0){var p=g.value;if(p){var v=U(p);t["out ".concat(v)]=Object(r.a)({},n,JSON.stringify(p.accessor))}}}catch(y){f=!0,h=y}finally{try{l||null==d.return||d.return()}finally{if(f)throw h}}return t}(this.vertexArray.configuration);o.h.table(e,a)(),o.h.table(e,u)(),o.h.table(e+1,h)(),i&&i.log({logLevel:2,message:"Rendered to ".concat(i.id)}),o.h.groupEnd(2,">>> DRAWING MODEL ".concat(this.id))()}}}]),e}()},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function i(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function o(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof e.getDerivedStateFromProps&&"function"!==typeof t.getSnapshotBeforeUpdate)return e;var n=null,o=null,s=null;if("function"===typeof t.componentWillMount?n="componentWillMount":"function"===typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof t.componentWillReceiveProps?o="componentWillReceiveProps":"function"===typeof t.UNSAFE_componentWillReceiveProps&&(o="UNSAFE_componentWillReceiveProps"),"function"===typeof t.componentWillUpdate?s="componentWillUpdate":"function"===typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==o||null!==s){var u=e.displayName||e.name,A="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+A+" but also contains the following legacy lifecycles:"+(null!==n?"\n  "+n:"")+(null!==o?"\n  "+o:"")+(null!==s?"\n  "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=i),"function"===typeof t.getSnapshotBeforeUpdate){if("function"!==typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.d(t,"a",(function(){return o})),r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";function r(e,t){if(!e)throw new Error(t||"shadertools: assertion failed.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return u}));var r=n(16),i=n(21),a=n(133),o=n(51);function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.framebuffer,r=void 0===n?null:n,a=t.color,s=void 0===a?null:a,u=t.depth,A=void 0===u?null:u,c=t.stencil,l=void 0===c?null:c,f={};r&&(f.framebuffer=r);var h=0;s&&(h|=16384,!0!==s&&(f.clearColor=s)),A&&(h|=256,!0!==A&&(f.clearDepth=A)),l&&(h|=1024,!0!==A&&(f.clearStencil=A)),Object(o.a)(0!==h,"clear: bad arguments"),Object(i.l)(e,f,(function(){e.clear(h)}))}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.framebuffer,s=void 0===n?null:n,u=t.buffer,A=void 0===u?6144:u,c=t.drawBuffer,l=void 0===c?0:c,f=t.value,h=void 0===f?[0,0,0,0]:f;Object(a.a)(e),Object(i.l)(e,{framebuffer:s},(function(){switch(A){case 6144:switch(h.constructor){case Int32Array:e.clearBufferiv(A,l,h);break;case Uint32Array:e.clearBufferuiv(A,l,h);break;case Float32Array:default:e.clearBufferfv(A,l,h)}break;case 6145:e.clearBufferfv(6145,0,[h]);break;case 6146:e.clearBufferiv(6146,0,[h]);break;case 34041:var t=Object(r.a)(h,2),n=t[0],i=t[1];e.clearBufferfi(34041,0,n,i);break;default:Object(o.a)(!1,"clear: bad arguments")}}))}},function(e,t,n){"use strict";var r,i=n(1),a=n(144),o=n(313);n.d(t,"a",(function(){return u})),n.d(t,"c",(function(){return f})),n.d(t,"b",(function(){return h}));var s=(r={},Object(i.a)(r,a.b,"#ifdef MODULE_LOGDEPTH\n  logdepth_adjustPosition(gl_Position);\n#endif\n"),Object(i.a)(r,a.a,"#ifdef MODULE_MATERIAL\n  gl_FragColor = material_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LIGHTING\n  gl_FragColor = lighting_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_FOG\n  gl_FragColor = fog_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_PICKING\n  gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n  gl_FragColor = picking_filterPickingColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LOGDEPTH\n  logdepth_setFragDepth();\n#endif\n"),r),u="__LUMA_INJECT_DECLARATIONS__",A=/void\s+main\s*\([^)]*\)\s*\{\n?/,c=/}\n?[^{}]*$/,l=[];function f(e,t,n,r){var i=t===a.b,o=function(t){var r=n[t];r.sort((function(e,t){return e.order-t.order})),l.length=r.length;for(var a=0,o=r.length;a<o;++a)l[a]=r[a].injection;var s="".concat(l.join("\n"),"\n");switch(t){case"vs:#decl":i&&(e=e.replace(u,s));break;case"vs:#main-start":i&&(e=e.replace(A,(function(e){return e+s})));break;case"vs:#main-end":i&&(e=e.replace(c,(function(e){return s+e})));break;case"fs:#decl":i||(e=e.replace(u,s));break;case"fs:#main-start":i||(e=e.replace(A,(function(e){return e+s})));break;case"fs:#main-end":i||(e=e.replace(c,(function(e){return s+e})));break;default:e=e.replace(t,(function(e){return e+s}))}};for(var f in n)o(f);return e=e.replace(u,""),r&&(e=e.replace(/\}\s*$/,(function(e){return e+s[t]}))),e}function h(e){var t={};return Object(o.a)(Array.isArray(e)&&e.length>1),e.forEach((function(e){for(var n in e)t[n]=t[n]?"".concat(t[n],"\n").concat(e[n]):e[n]})),t}},function(e,t,n){var r=n(138).Symbol;e.exports=r},function(e,t,n){"use strict";e.exports=n(516)},function(e,t,n){var r=n(778)();e.exports=r},function(e,t,n){"use strict";function r(e){var t={type:"Feature"};return Object.keys(e).forEach((function(n){switch(n){case"type":case"properties":case"geometry":return;default:t[n]=e[n]}})),t.properties=function e(t){var n={};return t?(Object.keys(t).forEach((function(r){var i=t[r];"object"===typeof i?null===i?n[r]=null:i.length?n[r]=i.map((function(e){return e})):n[r]=e(i):n[r]=i})),n):n}(e.properties),t.geometry=i(e.geometry),t}function i(e){var t={type:e.type};return e.bbox&&(t.bbox=e.bbox),"GeometryCollection"===e.type?(t.geometries=e.geometries.map((function(e){return i(e)})),t):(t.coordinates=function e(t){if("object"!==typeof t[0])return t.slice();return t.map((function(t){return e(t)}))}(e.coordinates),t)}t.a=function(e){if(!e)throw new Error("geojson is required");switch(e.type){case"Feature":return r(e);case"FeatureCollection":return function(e){var t={type:"FeatureCollection"};return Object.keys(e).forEach((function(n){switch(n){case"type":case"features":return;default:t[n]=e[n]}})),t.features=e.features.map((function(e){return r(e)})),t}(e);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return i(e);default:throw new Error("unknown GeoJSON type")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ArrowStyles",{enumerable:!0,get:function(){return r.ArrowStyles}}),Object.defineProperty(t,"DEFAULT_ARROWS",{enumerable:!0,get:function(){return r.DEFAULT_ARROWS}}),Object.defineProperty(t,"MAX_ARROWS",{enumerable:!0,get:function(){return r.MAX_ARROWS}}),Object.defineProperty(t,"SELECTION_TYPE",{enumerable:!0,get:function(){return i.SELECTION_TYPE}}),Object.defineProperty(t,"Feature",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"LayerMouseEvent",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"NebulaLayer",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"JunctionsLayer",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"TextsLayer",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"SegmentsLayer",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"NebulaCore",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"toDeckColor",{enumerable:!0,get:function(){return f.toDeckColor}}),Object.defineProperty(t,"EditableGeoJsonLayer",{enumerable:!0,get:function(){return h.EditableGeoJsonLayer}}),Object.defineProperty(t,"SelectionLayer",{enumerable:!0,get:function(){return h.SelectionLayer}}),Object.defineProperty(t,"ElevatedEditHandleLayer",{enumerable:!0,get:function(){return h.ElevatedEditHandleLayer}}),Object.defineProperty(t,"PathOutlineLayer",{enumerable:!0,get:function(){return h.PathOutlineLayer}}),Object.defineProperty(t,"PathMarkerLayer",{enumerable:!0,get:function(){return h.PathMarkerLayer}}),Object.defineProperty(t,"GeoJsonEditMode",{enumerable:!0,get:function(){return g.GeoJsonEditMode}}),Object.defineProperty(t,"ModifyMode",{enumerable:!0,get:function(){return g.ModifyMode}}),Object.defineProperty(t,"TranslateMode",{enumerable:!0,get:function(){return g.TranslateMode}}),Object.defineProperty(t,"ScaleMode",{enumerable:!0,get:function(){return g.ScaleMode}}),Object.defineProperty(t,"RotateMode",{enumerable:!0,get:function(){return g.RotateMode}}),Object.defineProperty(t,"DuplicateMode",{enumerable:!0,get:function(){return g.DuplicateMode}}),Object.defineProperty(t,"ExtendLineStringMode",{enumerable:!0,get:function(){return g.ExtendLineStringMode}}),Object.defineProperty(t,"SplitPolygonMode",{enumerable:!0,get:function(){return g.SplitPolygonMode}}),Object.defineProperty(t,"ExtrudeMode",{enumerable:!0,get:function(){return g.ExtrudeMode}}),Object.defineProperty(t,"ElevationMode",{enumerable:!0,get:function(){return g.ElevationMode}}),Object.defineProperty(t,"TransformMode",{enumerable:!0,get:function(){return g.TransformMode}}),Object.defineProperty(t,"DrawPointMode",{enumerable:!0,get:function(){return g.DrawPointMode}}),Object.defineProperty(t,"DrawLineStringMode",{enumerable:!0,get:function(){return g.DrawLineStringMode}}),Object.defineProperty(t,"DrawPolygonMode",{enumerable:!0,get:function(){return g.DrawPolygonMode}}),Object.defineProperty(t,"DrawRectangleMode",{enumerable:!0,get:function(){return g.DrawRectangleMode}}),Object.defineProperty(t,"DrawCircleByDiameterMode",{enumerable:!0,get:function(){return g.DrawCircleByDiameterMode}}),Object.defineProperty(t,"DrawCircleFromCenterMode",{enumerable:!0,get:function(){return g.DrawCircleFromCenterMode}}),Object.defineProperty(t,"DrawEllipseByBoundingBoxMode",{enumerable:!0,get:function(){return g.DrawEllipseByBoundingBoxMode}}),Object.defineProperty(t,"DrawEllipseUsingThreePointsMode",{enumerable:!0,get:function(){return g.DrawEllipseUsingThreePointsMode}}),Object.defineProperty(t,"DrawRectangleUsingThreePointsMode",{enumerable:!0,get:function(){return g.DrawRectangleUsingThreePointsMode}}),Object.defineProperty(t,"Draw90DegreePolygonMode",{enumerable:!0,get:function(){return g.Draw90DegreePolygonMode}}),Object.defineProperty(t,"DrawPolygonByDraggingMode",{enumerable:!0,get:function(){return g.DrawPolygonByDraggingMode}}),Object.defineProperty(t,"ImmutableFeatureCollection",{enumerable:!0,get:function(){return g.ImmutableFeatureCollection}}),Object.defineProperty(t,"ViewMode",{enumerable:!0,get:function(){return g.ViewMode}}),Object.defineProperty(t,"MeasureDistanceMode",{enumerable:!0,get:function(){return g.MeasureDistanceMode}}),Object.defineProperty(t,"MeasureAreaMode",{enumerable:!0,get:function(){return g.MeasureAreaMode}}),Object.defineProperty(t,"MeasureAngleMode",{enumerable:!0,get:function(){return g.MeasureAngleMode}}),Object.defineProperty(t,"CompositeMode",{enumerable:!0,get:function(){return g.CompositeMode}}),Object.defineProperty(t,"SnappableMode",{enumerable:!0,get:function(){return g.SnappableMode}});var r=n(818),i=n(819),a=d(n(956)),o=d(n(820)),s=d(n(503)),u=d(n(957)),A=d(n(996)),c=d(n(997)),l=d(n(998)),f=n(536),h=n(752),g=n(366);function d(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var r=n(479),i=n(480),a=n(793),o=n(792),s=o.MAX_LENGTH,u=o.MAX_SAFE_INTEGER,A=n(722),c=A.re,l=A.t,f=n(886).compareIdentifiers,h=function(){"use strict";function e(t,n){if(r(this,e),n&&"object"===typeof n||(n={loose:!!n,includePrerelease:!1}),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if("string"!==typeof t)throw new TypeError("Invalid Version: ".concat(t));if(t.length>s)throw new TypeError("version is longer than ".concat(s," characters"));a("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;var i=t.trim().match(n.loose?c[l.LOOSE]:c[l.FULL]);if(!i)throw new TypeError("Invalid Version: ".concat(t));if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>u||this.major<0)throw new TypeError("Invalid major version");if(this.minor>u||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>u||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<u)return t}return e})):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}return i(e,[{key:"format",value:function(){return this.version="".concat(this.major,".").concat(this.minor,".").concat(this.patch),this.prerelease.length&&(this.version+="-".concat(this.prerelease.join("."))),this.version}},{key:"toString",value:function(){return this.version}},{key:"compare",value:function(t){if(a("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if("string"===typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}},{key:"compareMain",value:function(t){return t instanceof e||(t=new e(t,this.options)),f(this.major,t.major)||f(this.minor,t.minor)||f(this.patch,t.patch)}},{key:"comparePre",value:function(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;var n=0;do{var r=this.prerelease[n],i=t.prerelease[n];if(a("prerelease compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return f(r,i)}while(++n)}},{key:"compareBuild",value:function(t){t instanceof e||(t=new e(t,this.options));var n=0;do{var r=this.build[n],i=t.build[n];if(a("prerelease compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return f(r,i)}while(++n)}},{key:"inc",value:function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"===typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: ".concat(e))}return this.format(),this.raw=this.version,this}}]),e}();e.exports=h},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(3),i=n(2),a=n(29),o=n(6),s=n(7),u=n(4),A=n(217),c=n(79),l=n(126);function f(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}var d=function(e){Object(o.a)(n,e);var t=g(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"getSubLayers",value:function(){return this.internalState&&this.internalState.subLayers||[]}},{key:"initializeState",value:function(){}},{key:"setState",value:function(e){Object(a.a)(Object(u.a)(n.prototype),"setState",this).call(this,e),this.setNeedsUpdate()}},{key:"getPickingInfo",value:function(e){var t=e.info,n=t.object;return n&&n.__source&&n.__source.parent&&n.__source.parent.id===this.id?Object.assign(t,{object:n.__source.object,index:n.__source.index}):t}},{key:"renderLayers",value:function(){return null}},{key:"shouldRenderSubLayer",value:function(e,t){var n=this.props._subLayerProps;return t&&t.length||n&&n[e]}},{key:"getSubLayerClass",value:function(e,t){var n=this.props._subLayerProps;return n&&n[e]&&n[e].type||t}},{key:"getSubLayerRow",value:function(e,t,n){return e.__source={parent:this,object:t,index:n},e}},{key:"getSubLayerAccessor",value:function(e){if("function"===typeof e){var t={data:this.props.data,target:[]};return function(n,r){return n.__source?(t.index=n.__source.index,e(n.__source.object,t)):e(n,r)}}return e}},{key:"getSubLayerProps",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.props,n=t.opacity,r=t.pickable,i=t.visible,a=t.parameters,o=t.getPolygonOffset,s=t.highlightedObjectIndex,u=t.autoHighlight,A=t.highlightColor,c=t.coordinateSystem,l=t.coordinateOrigin,h=t.wrapLongitude,g=t.positionFormat,d=t.modelMatrix,p=t.extensions,v=t._subLayerProps,y={opacity:n,pickable:r,visible:i,parameters:a,getPolygonOffset:o,highlightedObjectIndex:s,autoHighlight:u,highlightColor:A,coordinateSystem:c,coordinateOrigin:l,wrapLongitude:h,positionFormat:g,modelMatrix:d,extensions:p},m=v&&v[e.id],I=m&&m.updateTriggers,b=e.id||"sublayer";if(m){var E=this.constructor._propTypes;for(var C in m){var B=E[C];B&&"accessor"===B.type&&(m[C]=this.getSubLayerAccessor(m[C]))}}Object.assign(y,e,m,{id:"".concat(this.props.id,"-").concat(b),updateTriggers:Object.assign({all:this.props.updateTriggers.all},e.updateTriggers,I)});var w,Q=f(p);try{for(Q.s();!(w=Q.n()).done;){var k=w.value,_=k.getSubLayerProps.call(this,k);_&&Object.assign(y,_,{updateTriggers:Object.assign(y.updateTriggers,_.updateTriggers)})}}catch(x){Q.e(x)}finally{Q.f()}return y}},{key:"_getAttributeManager",value:function(){return null}},{key:"_renderLayers",value:function(){var e=this.internalState.subLayers,t=!e||this.needsUpdate();t&&(e=this.renderLayers(),e=Object(l.b)(e,Boolean),this.internalState.subLayers=e),Object(c.a)("compositeLayer.renderLayers",this,t,e);var n,r=f(e);try{for(r.s();!(n=r.n()).done;){n.value.parent=this}}catch(i){r.e(i)}finally{r.f()}}},{key:"isComposite",get:function(){return!0}},{key:"isLoaded",get:function(){return Object(a.a)(Object(u.a)(n.prototype),"isLoaded",this)&&this.getSubLayers().every((function(e){return e.isLoaded}))}}]),n}(A.a);d.layerName="CompositeLayer"},function(e,t,n){"use strict";var r=n(108);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),a=(0,r(n(182)).default)(i.default.createElement("path",{d:"M7 14l5-5 5 5z"}),"ArrowDropUp");t.default=a},function(e,t,n){"use strict";var r=n(108);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),a=(0,r(n(182)).default)(i.default.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");t.default=a},function(e,t){e.exports=function(e,t){return e===t||e!==e&&t!==t}},function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(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 u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.ImmutableFeatureCollection=void 0;var A=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),u(this,"featureCollection",void 0),this.featureCollection=t}var t,n,i;return t=e,(n=[{key:"getObject",value:function(){return this.featureCollection}},{key:"replacePosition",value:function(e,t,n){var r=this.featureCollection.features[e].geometry,i="Polygon"===r.type||"MultiPolygon"===r.type,a=o({},r,{coordinates:l(r.coordinates,t,n,i)});return this.replaceGeometry(e,a)}},{key:"removePosition",value:function(e,t){var n=this.featureCollection.features[e].geometry;if("Point"===n.type)throw Error("Can't remove a position from a Point or there'd be nothing left");if("MultiPoint"===n.type&&n.coordinates.length<2)throw Error("Can't remove the last point of a MultiPoint or there'd be nothing left");if("LineString"===n.type&&n.coordinates.length<3)throw Error("Can't remove position. LineString must have at least two positions");if("Polygon"===n.type&&n.coordinates[0].length<5&&Array.isArray(t)&&0===t[0])throw Error("Can't remove position. Polygon's outer ring must have at least four positions");if("MultiLineString"===n.type&&1===n.coordinates.length&&n.coordinates[0].length<3)throw Error("Can't remove position. MultiLineString must have at least two positions");if("MultiPolygon"===n.type&&1===n.coordinates.length&&n.coordinates[0][0].length<5&&Array.isArray(t)&&0===t[0]&&0===t[1])throw Error("Can't remove position. MultiPolygon's outer ring must have at least four positions");var r="Polygon"===n.type||"MultiPolygon"===n.type,i=o({},n,{coordinates:f(n.coordinates,t,r)});return function(e){switch(e.type){case"Polygon":!function(e){for(var t=e.coordinates,n=1;n<t.length;n++)g(t,n)&&n--}(e);break;case"MultiLineString":!function(e){for(var t=0;t<e.coordinates.length;t++)1===e.coordinates[t].length&&(e.coordinates.splice(t,1),t--)}(e);break;case"MultiPolygon":!function(e){for(var t=0;t<e.coordinates.length;t++){var n=e.coordinates[t];n[0].length<=3&&(e.coordinates.splice(t,1),t--);for(var r=1;r<n.length;r++)g(n,r)&&r--}}(e)}}(i),this.replaceGeometry(e,i)}},{key:"addPosition",value:function(e,t,n){var r=this.featureCollection.features[e].geometry;if("Point"===r.type)throw new Error("Unable to add a position to a Point feature");var i="Polygon"===r.type||"MultiPolygon"===r.type,a=o({},r,{coordinates:h(r.coordinates,t,n,i)});return this.replaceGeometry(e,a)}},{key:"replaceGeometry",value:function(t,n){var i=o({},this.featureCollection.features[t],{geometry:n});return new e(o({},this.featureCollection,{features:[].concat(r(this.featureCollection.features.slice(0,t)),[i],r(this.featureCollection.features.slice(t+1)))}))}},{key:"addFeature",value:function(e){return this.addFeatures([e])}},{key:"addFeatures",value:function(t){return new e(o({},this.featureCollection,{features:[].concat(r(this.featureCollection.features),r(t))}))}},{key:"deleteFeature",value:function(e){return this.deleteFeatures([e])}},{key:"deleteFeatures",value:function(t){var n=r(this.featureCollection.features);t.sort();for(var i=t.length-1;i>=0;i--){var a=t[i];a>=0&&a<n.length&&n.splice(a,1)}return new e(o({},this.featureCollection,{features:n}))}}])&&s(t.prototype,n),i&&s(t,i),e}();function c(e,t){if(2===e.length&&3===t.length){var n=t[2];return[e[0],e[1],n]}return e}function l(e,t,n,i){if(!t)return e;if(0===t.length)return c(n,e);if(1===t.length){var a=[].concat(r(e.slice(0,t[0])),[c(n,e[t[0]])],r(e.slice(t[0]+1)));return!i||0!==t[0]&&t[0]!==e.length-1||(a[0]=c(n,e[0]),a[e.length-1]=c(n,e[0])),a}return[].concat(r(e.slice(0,t[0])),[l(e[t[0]],t.slice(1,t.length),n,i)],r(e.slice(t[0]+1)))}function f(e,t,n){if(!t)return e;if(0===t.length)throw Error("Must specify the index of the position to remove");if(1===t.length){var i=[].concat(r(e.slice(0,t[0])),r(e.slice(t[0]+1)));return!n||0!==t[0]&&t[0]!==e.length-1||(0===t[0]?i[i.length-1]=i[0]:t[0]===e.length-1&&(i[0]=i[i.length-1])),i}return[].concat(r(e.slice(0,t[0])),[f(e[t[0]],t.slice(1,t.length),n)],r(e.slice(t[0]+1)))}function h(e,t,n,i){if(!t)return e;if(0===t.length)throw Error("Must specify the index of the position to remove");return 1===t.length?[].concat(r(e.slice(0,t[0])),[n],r(e.slice(t[0]))):[].concat(r(e.slice(0,t[0])),[h(e[t[0]],t.slice(1,t.length),n,i)],r(e.slice(t[0]+1)))}function g(e,t){return e[t].length<=3&&(e.splice(t,1),!0)}t.ImmutableFeatureCollection=A},function(e,t,n){"use strict";var r=n(18),i=n(33),a=n(0),o=(n(28),n(37)),s=n(48),u=n(73),A=a.forwardRef((function(e,t){var n=e.children,s=e.classes,A=e.className,c=e.color,l=void 0===c?"inherit":c,f=e.component,h=void 0===f?"svg":f,g=e.fontSize,d=void 0===g?"default":g,p=e.htmlColor,v=e.titleAccess,y=e.viewBox,m=void 0===y?"0 0 24 24":y,I=Object(i.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return a.createElement(h,Object(r.a)({className:Object(o.a)(s.root,A,"inherit"!==l&&s["color".concat(Object(u.a)(l))],"default"!==d&&s["fontSize".concat(Object(u.a)(d))]),focusable:"false",viewBox:m,color:p,"aria-hidden":v?void 0:"true",role:v?"img":"presentation",ref:t},I),n,v?a.createElement("title",null,v):null)}));A.muiName="SvgIcon",t.a=Object(s.a)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(A)},function(e,t,n){"use strict";var r=n(317),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var A=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,g=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(g){var i=h(n);i&&i!==g&&e(t,i,r)}var o=c(n);l&&(o=o.concat(l(n)));for(var s=u(t),d=u(n),p=0;p<o.length;++p){var v=o[p];if(!a[v]&&(!r||!r[v])&&(!d||!d[v])&&(!s||!s[v])){var y=f(n,v);try{A(t,v,y)}catch(m){}}}}return t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n(23),n(18);var r=n(25),i=(n(28),n(200),{xs:0,sm:600,md:960,lg:1280,xl:1920}),a={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(i[e],"px)")}};function o(e,t,n){if(Array.isArray(t)){var i=e.theme.breakpoints||a;return t.reduce((function(e,r,a){return e[i.up(i.keys[a])]=n(t[a]),e}),{})}if("object"===Object(r.a)(t)){var o=e.theme.breakpoints||a;return Object.keys(t).reduce((function(e,r){return e[o.up(r)]=n(t[r]),e}),{})}return n(t)}},function(e,t,n){var r=n(745),i=n(746);e.exports=function(e,t,n){var a=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||r)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var s=0;s<16;++s)t[a+s]=o[s];return t||i(o)}},function(e,t,n){"use strict";var r={meters:6371008.8,metres:6371008.8,millimeters:6371008800,millimetres:6371008800,centimeters:637100880,centimetres:637100880,kilometers:6371.0088,kilometres:6371.0088,miles:3958.761333810546,nauticalmiles:6371008.8/1852,inches:6371008.8*39.37,yards:6371008.8/1.0936,feet:20902260.511392,radians:1,degrees:6371008.8/111325};function i(e,t,n){if(!c(n=n||{}))throw new Error("options is invalid");var r=n.bbox,i=n.id;if(void 0===e)throw new Error("geometry is required");if(t&&t.constructor!==Object)throw new Error("properties must be an Object");r&&l(r),i&&f(i);var a={type:"Feature"};return i&&(a.id=i),r&&(a.bbox=r),a.properties=t||{},a.geometry=e,a}function a(e,t,n){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!A(e[0])||!A(e[1]))throw new Error("coordinates must contain numbers");return i({type:"Point",coordinates:e},t,n)}function o(e,t){if(void 0===e||null===e)throw new Error("distance is required");if(t&&"string"!==typeof t)throw new Error("units must be a string");var n=r[t||"kilometers"];if(!n)throw new Error(t+" units is invalid");return e/n}function s(e){if(null===e||void 0===e)throw new Error("degrees is required");return e%360*Math.PI/180}function u(e,t,n){if(null===e||void 0===e)throw new Error("length is required");if(!(e>=0))throw new Error("length must be a positive number");return function(e,t){if(void 0===e||null===e)throw new Error("radians is required");if(t&&"string"!==typeof t)throw new Error("units must be a string");var n=r[t||"kilometers"];if(!n)throw new Error(t+" units is invalid");return e*n}(o(e,t),n||"kilometers")}function A(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function c(e){return!!e&&e.constructor===Object}function l(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!A(e))throw new Error("bbox must only contain numbers")}))}function f(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}t.a=function(e,t,n,r){if(!c(r=r||{}))throw new Error("options is invalid");var i=r.units,o=r.properties;if(!e)throw new Error("origin is required");if(void 0===t||null===t)throw new Error("distance is required");if(void 0===n||null===n)throw new Error("bearing is required");if(!(t>=0))throw new Error("distance must be greater than 0");var A=u(t,i,"meters"),l=function(e){if(!e)throw new Error("coord is required");if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates;if(Array.isArray(e)&&e.length>=2&&void 0===e[0].length&&void 0===e[1].length)return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(e),f=function(e,t,n,r){r=void 0===r?6371008.8:Number(r);var i=t/r,a=e[0]*Math.PI/180,o=s(e[1]),u=s(n),A=i*Math.cos(u),c=o+A;Math.abs(c)>Math.PI/2&&(c=c>0?Math.PI-c:-Math.PI-c);var l=Math.log(Math.tan(c/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),f=Math.abs(l)>1e-11?A/l:Math.cos(o),h=i*Math.sin(u)/f;return[(180*(a+h)/Math.PI+540)%360-180,180*c/Math.PI]}(l,A,n);return f[0]+=f[0]-l[0]>180?-360:l[0]-f[0]>180?360:0,a(f,o)}},function(e,t,n){var r=n(863),i=n(387);e.exports=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=i(n))===n?n:0),void 0!==t&&(t=(t=i(t))===t?t:0),r(i(e),t,n)}},,function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/hubmapconsortium/vitessce/#cell-sets","title":"Vitessce cell sets data","type":"object","definitions":{"stringArray":{"type":"array","items":{"type":"string"}},"stringProbabilityTupleArray":{"type":"array","items":{"type":"array","additionalItems":false,"items":[{"type":"string"},{"oneOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}]}},"colorArray":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":3,"maxItems":3},"treeNodeLeaf":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"color":{"$ref":"#/definitions/colorArray"},"set":{"$ref":"#/definitions/stringArray"}}},"treeNodeNonLeaf":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"color":{"$ref":"#/definitions/colorArray"},"children":{"type":"array","items":{"$ref":"#/definitions/treeNode"}}}},"treeNode":{"oneOf":[{"$ref":"#/definitions/treeNodeNonLeaf"},{"$ref":"#/definitions/treeNodeLeaf"}]},"version0.1.2":{"type":"object","additionalProperties":false,"required":["version","datatype","tree"],"properties":{"dataset":{"type":"string"},"version":{"type":"string","enum":["0.1.2"]},"datatype":{"type":"string","enum":["cell"]},"tree":{"type":"array","items":{"$ref":"#/definitions/treeNodeNonLeaf"}}}},"treeNodeLeafProbabilistic":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"color":{"$ref":"#/definitions/colorArray"},"set":{"$ref":"#/definitions/stringProbabilityTupleArray"}}},"treeNodeNonLeafProbabilistic":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"color":{"$ref":"#/definitions/colorArray"},"children":{"type":"array","items":{"$ref":"#/definitions/treeNodeProbabilistic"}}}},"treeNodeProbabilistic":{"oneOf":[{"$ref":"#/definitions/treeNodeNonLeafProbabilistic"},{"$ref":"#/definitions/treeNodeLeafProbabilistic"}]},"version0.1.3":{"type":"object","additionalProperties":false,"required":["version","datatype","tree"],"properties":{"dataset":{"type":"string"},"version":{"type":"string","enum":["0.1.3"]},"datatype":{"type":"string","enum":["cell"]},"tree":{"type":"array","items":{"$ref":"#/definitions/treeNodeNonLeafProbabilistic"}}}}},"oneOf":[{"$ref":"#/definitions/version0.1.2"},{"$ref":"#/definitions/version0.1.3"}]}')},,,,,,,function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){var r=n(402);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t,n){"use strict";(function(e){var r=n(108);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){if("undefined"!==typeof window&&"object"===(0,i.default)(window.process)&&"renderer"===window.process.type)return!0;if("undefined"!==typeof e&&"object"===(0,i.default)(e.versions)&&Boolean(e.versions.electron))return!0;var n="object"===("undefined"===typeof navigator?"undefined":(0,i.default)(navigator))&&"string"===typeof navigator.userAgent&&navigator.userAgent,r=t||n;if(r&&r.indexOf("Electron")>=0)return!0;return!1};var i=r(n(206))}).call(this,n(86))},function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r=n(12),i=n.n(r),a=n(26),o=n(224),s=n(154),u=n(98);function A(e){return c.apply(this,arguments)}function c(){return(c=Object(a.a)(i.a.mark((function e(t){var n,r,a,A,c,l,f,h,g;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=[],r=[],a=!0,A=!1,e.prev=4,l=Object(o.a)(t);case 6:return e.next=8,l.next();case 8:return f=e.sent,a=f.done,e.next=12,f.value;case 12:if(h=e.sent,a){e.next=19;break}"string"===typeof(g=h)?r.push(g):n.push(g);case 16:a=!0,e.next=6;break;case 19:e.next=25;break;case 21:e.prev=21,e.t0=e.catch(4),A=!0,c=e.t0;case 25:if(e.prev=25,e.prev=26,a||null==l.return){e.next=30;break}return e.next=30,l.return();case 30:if(e.prev=30,!A){e.next=33;break}throw c;case 33:return e.finish(30);case 34:return e.finish(25);case 35:if(!(r.length>0)){e.next=38;break}return Object(u.a)(0===n.length),e.abrupt("return",r.join(""));case 38:return e.abrupt("return",s.b.apply(void 0,n));case 39:case"end":return e.stop()}}),e,null,[[4,21,25,35],[26,,30,34]])})))).apply(this,arguments)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(12),i=n.n(r),a=n(26),o=n(94),s=n(260),u=n(98),A={};function c(e){return l.apply(this,arguments)}function l(){return(l=Object(a.a)(i.a.mark((function e(t){var n,r,a=arguments;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:null,r=a.length>2&&void 0!==a[2]?a[2]:{},n&&(t=f(t,n,r)),A[t]=A[t]||h(t),e.next=6,A[t];case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e,t,n){var r=n.modules||{};return r[e]?r[e]:o.b?n.CDN?(Object(u.a)(n.CDN.startsWith("http")),"".concat(n.CDN,"/").concat(t,"@").concat("2.3.0","/dist/libs/").concat(e)):o.c?"../src/libs/".concat(e):"modules/".concat(t,"/src/libs/").concat(e):"modules/".concat(t,"/dist/libs/").concat(e)}function h(e){return g.apply(this,arguments)}function g(){return(g=Object(a.a)(i.a.mark((function e(t){var n,r,a;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.endsWith("wasm")){e.next=7;break}return e.next=3,fetch(t);case 3:return n=e.sent,e.next=6,n.arrayBuffer();case 6:return e.abrupt("return",e.sent);case 7:if(o.b){e.next=9;break}return e.abrupt("return",s.requireFromFile&&s.requireFromFile(t));case 9:if(!o.c){e.next=11;break}return e.abrupt("return",importScripts(t));case 11:return e.next=13,fetch(t);case 13:return r=e.sent,e.next=16,r.text();case 16:return a=e.sent,e.abrupt("return",d(a,t));case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,t){if(!o.b)return s.requireFromString&&s.requireFromString(e,t);if(o.c)return eval.call(o.a,e),null;var n=document.createElement("script");n.id=t;try{n.appendChild(document.createTextNode(e))}catch(r){n.text=e}return document.body.appendChild(n),null}},function(e,t,n){"use strict";function r(e){if(!e||!e.POSITION)return null;var t=1/0,n=1/0,r=1/0,i=-1/0,a=-1/0,o=-1/0,s=e.POSITION.value,u=s&&s.length;if(!u)return null;for(var A=0;A<u;A+=3){var c=s[A],l=s[A+1],f=s[A+2];t=c<t?c:t,n=l<n?l:n,r=f<r?f:r,i=c>i?c:i,a=l>a?l:a,o=f>o?f:o}return[[t,n,r],[i,a,o]]}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(209).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,a){if("function"===typeof n)return e(t,null,n);n||(n={}),a=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(a||i);var o=n.readable||!1!==n.readable&&t.readable,s=n.writable||!1!==n.writable&&t.writable,u=function(){t.writable||c()},A=t._writableState&&t._writableState.finished,c=function(){s=!1,A=!0,o||a.call(t)},l=t._readableState&&t._readableState.endEmitted,f=function(){o=!1,l=!0,s||a.call(t)},h=function(e){a.call(t,e)},g=function(){var e;return o&&!l?(t._readableState&&t._readableState.ended||(e=new r),a.call(t,e)):s&&!A?(t._writableState&&t._writableState.ended||(e=new r),a.call(t,e)):void 0},d=function(){t.req.on("finish",c)};return!function(e){return e.setHeader&&"function"===typeof e.abort}(t)?s&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",c),t.on("abort",g),t.req?d():t.on("request",d)),t.on("end",f),t.on("finish",c),!1!==n.error&&t.on("error",h),t.on("close",g),function(){t.removeListener("complete",c),t.removeListener("abort",g),t.removeListener("request",d),t.req&&t.req.removeListener("finish",c),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("end",f),t.removeListener("error",h),t.removeListener("close",g)}}},function(e,t,n){var r=n(199)(n(138),"Map");e.exports=r},function(e,t,n){var r=n(389),i=n(392);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t,n){var r=n(1233),i=n(1236)((function(e,t,n){r(e,t,n)}));e.exports=i},function(e,t,n){"use strict";var r=n(465),i=n(926),a=n(61),o=n(44),s=n(79);var u={name:"JSON",extensions:["json","geojson"],mimeTypes:["application/json","application/geo+json"],testText:function(e){var t=e[0],n=e[e.length-1];return"{"===t&&"}"===n||"["===t&&"]"===n},parseTextSync:JSON.parse},A=a.global.deck&&a.global.deck.VERSION;if(A&&"8.3.4"!==A)throw new Error("deck.gl - multiple versions detected: ".concat(A," vs ").concat("8.3.4"));A||(a.global.deck=Object.assign(a.global.deck||{},{VERSION:"8.3.4",version:"8.3.4",log:o.a,_registerLoggers:s.b}),Object(r.b)([u,[i.a,{imagebitmap:{premultiplyAlpha:"none"}}]]));t.a=a.global.deck},function(e,t,n){"use strict";function r(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return a}));var r=n(33),i={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},a={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function o(e){return"".concat(Math.round(e),"ms")}t.a={easing:i,duration:a,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,s=void 0===n?a.standard:n,u=t.easing,A=void 0===u?i.easeInOut:u,c=t.delay,l=void 0===c?0:c;Object(r.a)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof s?s:o(s)," ").concat(A," ").concat("string"===typeof l?l:o(l))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}}},function(e,t,n){"use strict";t.a={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},function(e,t,n){"use strict";function r(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(765),i=n(196);function a(){return Object(r.a)()||i.a}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r,i=n(1),a=n(140),o=n(179),s={WEBGL2:"WEBGL2",VERTEX_ARRAY_OBJECT:"VERTEX_ARRAY_OBJECT",TIMER_QUERY:"TIMER_QUERY",INSTANCED_RENDERING:"INSTANCED_RENDERING",MULTIPLE_RENDER_TARGETS:"MULTIPLE_RENDER_TARGETS",ELEMENT_INDEX_UINT32:"ELEMENT_INDEX_UINT32",BLEND_EQUATION_MINMAX:"BLEND_EQUATION_MINMAX",FLOAT_BLEND:"FLOAT_BLEND",COLOR_ENCODING_SRGB:"COLOR_ENCODING_SRGB",TEXTURE_DEPTH:"TEXTURE_DEPTH",TEXTURE_FLOAT:"TEXTURE_FLOAT",TEXTURE_HALF_FLOAT:"TEXTURE_HALF_FLOAT",TEXTURE_FILTER_LINEAR_FLOAT:"TEXTURE_FILTER_LINEAR_FLOAT",TEXTURE_FILTER_LINEAR_HALF_FLOAT:"TEXTURE_FILTER_LINEAR_HALF_FLOAT",TEXTURE_FILTER_ANISOTROPIC:"TEXTURE_FILTER_ANISOTROPIC",COLOR_ATTACHMENT_RGBA32F:"COLOR_ATTACHMENT_RGBA32F",COLOR_ATTACHMENT_FLOAT:"COLOR_ATTACHMENT_FLOAT",COLOR_ATTACHMENT_HALF_FLOAT:"COLOR_ATTACHMENT_HALF_FLOAT",GLSL_FRAG_DATA:"GLSL_FRAG_DATA",GLSL_FRAG_DEPTH:"GLSL_FRAG_DEPTH",GLSL_DERIVATIVES:"GLSL_DERIVATIVES",GLSL_TEXTURE_LOD:"GLSL_TEXTURE_LOD"};t.b=(r={},Object(i.a)(r,s.WEBGL2,[!1,!0]),Object(i.a)(r,s.VERTEX_ARRAY_OBJECT,["OES_vertex_array_object",!0]),Object(i.a)(r,s.TIMER_QUERY,["EXT_disjoint_timer_query","EXT_disjoint_timer_query_webgl2"]),Object(i.a)(r,s.INSTANCED_RENDERING,["ANGLE_instanced_arrays",!0]),Object(i.a)(r,s.MULTIPLE_RENDER_TARGETS,["WEBGL_draw_buffers",!0]),Object(i.a)(r,s.ELEMENT_INDEX_UINT32,["OES_element_index_uint",!0]),Object(i.a)(r,s.BLEND_EQUATION_MINMAX,["EXT_blend_minmax",!0]),Object(i.a)(r,s.FLOAT_BLEND,["EXT_float_blend"]),Object(i.a)(r,s.COLOR_ENCODING_SRGB,["EXT_sRGB",!0]),Object(i.a)(r,s.TEXTURE_DEPTH,["WEBGL_depth_texture",!0]),Object(i.a)(r,s.TEXTURE_FLOAT,["OES_texture_float",!0]),Object(i.a)(r,s.TEXTURE_HALF_FLOAT,["OES_texture_half_float",!0]),Object(i.a)(r,s.TEXTURE_FILTER_LINEAR_FLOAT,["OES_texture_float_linear"]),Object(i.a)(r,s.TEXTURE_FILTER_LINEAR_HALF_FLOAT,["OES_texture_half_float_linear"]),Object(i.a)(r,s.TEXTURE_FILTER_ANISOTROPIC,["EXT_texture_filter_anisotropic"]),Object(i.a)(r,s.COLOR_ATTACHMENT_RGBA32F,[function(e){var t=new o.a(e,{format:6408,type:5126,dataFormat:6408}),n=new a.a(e,{id:"test-framebuffer",check:!1,attachments:Object(i.a)({},36064,t)}),r=n.getStatus();return t.delete(),n.delete(),36053===r},"EXT_color_buffer_float"]),Object(i.a)(r,s.COLOR_ATTACHMENT_FLOAT,[!1,"EXT_color_buffer_float"]),Object(i.a)(r,s.COLOR_ATTACHMENT_HALF_FLOAT,["EXT_color_buffer_half_float"]),Object(i.a)(r,s.GLSL_FRAG_DATA,["WEBGL_draw_buffers",!0]),Object(i.a)(r,s.GLSL_FRAG_DEPTH,["EXT_frag_depth",!0]),Object(i.a)(r,s.GLSL_DERIVATIVES,["OES_standard_derivatives",!0]),Object(i.a)(r,s.GLSL_TEXTURE_LOD,["EXT_shader_texture_lod",!0]),r)},function(e,t){},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(313),o=n(25),s={number:{validate:function(e,t){return Number.isFinite(e)&&(!("max"in t)||e<=t.max)&&(!("min"in t)||e>=t.min)}},array:{validate:function(e,t){return Array.isArray(e)||ArrayBuffer.isView(e)}}};function u(e){var t=A(e);return"object"===t?e?"type"in e?Object.assign({},e,s[e.type]):"value"in e?(t=A(e.value),Object.assign({type:t},e,s[t])):{type:"object",value:e}:{type:"object",value:null}:Object.assign({type:t,value:e},s[t])}function A(e){return Array.isArray(e)||ArrayBuffer.isView(e)?"array":Object(o.a)(e)}n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l}));var c=function(){function e(t){var n=t.name,i=t.vs,o=t.fs,s=t.dependencies,A=void 0===s?[]:s,c=t.uniforms,l=t.getUniforms,f=t.deprecations,h=void 0===f?[]:f,g=t.defines,d=void 0===g?{}:g,p=t.inject,v=void 0===p?{}:p,y=t.vertexShader,m=t.fragmentShader;Object(r.a)(this,e),Object(a.a)("string"===typeof n),this.name=n,this.vs=i||y,this.fs=o||m,this.getModuleUniforms=l,this.dependencies=A,this.deprecations=this._parseDeprecationDefinitions(h),this.defines=d,this.injections=function(e){var t={vs:{},fs:{}};for(var n in e){var r=e[n],i=n.slice(0,2);"string"===typeof r&&(r={injection:r}),t[i][n]=r}return t}(v),c&&(this.uniforms=function(e){var t={};for(var n in e){var r=u(e[n]);t[n]=r}return t}(c))}return Object(i.a)(e,[{key:"getModuleSource",value:function(e){var t;switch(e){case"vs":t=this.vs||"";break;case"fs":t=this.fs||"";break;default:Object(a.a)(!1)}return"#define MODULE_".concat(this.name.toUpperCase().replace(/[^0-9a-z]/gi,"_"),"\n").concat(t,"// END MODULE_").concat(this.name,"\n\n")}},{key:"getUniforms",value:function(e,t){return this.getModuleUniforms?this.getModuleUniforms(e,t):this.uniforms?this._defaultGetUniforms(e):{}}},{key:"getDefines",value:function(){return this.defines}},{key:"checkDeprecations",value:function(e,t){this.deprecations.forEach((function(n){n.regex.test(e)&&(n.deprecated?t.deprecated(n.old,n.new)():t.removed(n.old,n.new)())}))}},{key:"_parseDeprecationDefinitions",value:function(e){return e.forEach((function(e){switch(e.type){case"function":e.regex=new RegExp("\\b".concat(e.old,"\\("));break;default:e.regex=new RegExp("".concat(e.type," ").concat(e.old,";"))}})),e}},{key:"_defaultGetUniforms",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=this.uniforms;for(var r in n){var i=n[r];r in e&&!i.private?(i.validate&&Object(a.a)(i.validate(e[r],i),"".concat(this.name,": invalid ").concat(r)),t[r]=e[r]):t[r]=i.value}return t}}]),e}();function l(e){if(!e.normalized&&(e.normalized=!0,e.uniforms&&!e.getUniforms)){var t=new c(e);e.getUniforms=t.getUniforms.bind(t)}return e}},function(e,t,n){"use strict";var r=n(82),i=n(140),a=n(111),o=n(21),s=n(133),u=n(160),A=n(51);function c(e){switch(e){case 6406:case 33326:case 6403:return 1;case 33328:case 33319:return 2;case 6407:case 34837:return 3;case 6408:case 34836:return 4;default:return Object(A.a)(!1),0}}var l=n(462);function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.sourceX,r=void 0===n?0:n,i=t.sourceY,a=void 0===i?0:i,o=t.sourceFormat,s=void 0===o?6408:o,c=t.sourceAttachment,l=void 0===c?36064:c,f=t.target,h=void 0===f?null:f,g=t.sourceWidth,d=t.sourceHeight,y=t.sourceType,m=p(e),I=m.framebuffer,b=m.deleteFramebuffer;Object(A.a)(I);var E=I.gl,C=I.handle,B=I.attachments;g=g||I.width,d=d||I.height,36064===l&&null===C&&(l=1028),Object(A.a)(B[l]),h=v(h,y=y||B[l].type,s,g,d),y=y||Object(u.b)(h);var w=E.bindFramebuffer(36160,C);return E.readPixels(r,a,g,d,s,y,h),E.bindFramebuffer(36160,w||null),b&&I.delete(),h}function h(e,t){var n=t.sourceX,i=void 0===n?0:n,a=t.sourceY,u=void 0===a?0:a,l=t.sourceFormat,f=void 0===l?6408:l,h=t.target,g=void 0===h?null:h,d=t.targetByteOffset,v=void 0===d?0:d,y=t.sourceWidth,m=t.sourceHeight,I=t.sourceType,b=p(e),E=b.framebuffer,C=b.deleteFramebuffer;Object(A.a)(E);var B=E.gl;if(y=y||E.width,m=m||E.height,Object(s.a)(B),I=I||(g?g.type:5121),!g){var w=c(f),Q=function(e){switch(e){case 5121:return 1;case 33635:case 32819:case 32820:return 2;case 5126:return 4;default:return Object(A.a)(!1),0}}(I),k=v+y*m*w*Q;g=new r.a(B,{byteLength:k,accessor:{type:I,size:w}})}return g.bind({target:35051}),Object(o.l)(B,{framebuffer:E},(function(){B.readPixels(i,u,y,m,f,I,v)})),g.unbind({target:35051}),C&&E.delete(),g}function g(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.sourceAttachment,r=void 0===n?36064:n,i=t.targetMaxHeight,a=void 0===i?Number.MAX_SAFE_INTEGER:i,o=f(e,{sourceAttachment:r}),s=e.width,A=e.height;A>a;){var c=Object(u.d)({data:o,width:s,height:A});o=c.data,s=c.width,A=c.height}Object(u.a)({data:o,width:s,height:A});var l=document.createElement("canvas");l.width=s,l.height=A;var h=l.getContext("2d"),g=h.createImageData(s,A);return g.data.set(o),h.putImageData(g,0,0),l.toDataURL()}function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.sourceX,i=void 0===r?0:r,o=n.sourceY,s=void 0===o?0:o,u=n.targetX,c=n.targetY,l=n.targetZ,f=n.targetMipmaplevel,h=void 0===f?0:f,g=n.targetInternalFormat,d=void 0===g?6408:g,v=n.width,y=n.height,m=p(e),I=m.framebuffer,b=m.deleteFramebuffer;Object(A.a)(I);var E=I.gl,C=I.handle,B="undefined"!==typeof u||"undefined"!==typeof c||"undefined"!==typeof l;u=u||0,c=c||0,l=l||0;var w=E.bindFramebuffer(36160,C);Object(A.a)(t);var Q=null;if(t instanceof a.a&&(Q=t,v=Number.isFinite(v)?v:Q.width,y=Number.isFinite(y)?y:Q.height,Q.bind(0),t=Q.target),B)switch(t){case 3553:case 34067:E.copyTexSubImage2D(t,h,u,c,i,s,v,y);break;case 35866:case 32879:E.copyTexSubImage3D(t,h,u,c,l,i,s,v,y)}else E.copyTexImage2D(t,h,d,i,s,v,y,0);return Q&&Q.unbind(),E.bindFramebuffer(36160,w||null),b&&I.delete(),Q}function p(e){return e instanceof i.a?{framebuffer:e,deleteFramebuffer:!1}:{framebuffer:Object(l.b)(e),deleteFramebuffer:!0}}function v(e,t,n,r,i){return e||(t=t||5121,new(Object(u.c)(t,{clamped:!1}))(r*i*c(n)))}n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return h})),n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return d}))},function(e,t,n){"use strict";var r=n(22),i=n(19),a=n(171),o=n.n(a),s=n(255),u=n(932),A=n(84),c=n(11),l=n(13),f=n(8),h=n(42),g=n(46),d=n(14),p=n(15),v=function(){},y=function(e){return e},m=function(e){return Promise.resolve().then(e)};function I(e){throw e}var b=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(c.a)(this,n),(r=t.call(this,(function(t){var n=Object(f.a)(r),i=Object.assign(Object.assign({},t),{complete:function(){t.complete(),n.onCompletion()},error:function(e){t.error(e),n.onError(e)},next:function(e){t.next(e),n.onNext(e)}});try{return r.initHasRun=!0,e(i)}catch(a){i.error(a)}}))).initHasRun=!1,r.fulfillmentCallbacks=[],r.rejectionCallbacks=[],r.firstValueSet=!1,r.state="pending",r}return Object(l.a)(n,[{key:"onNext",value:function(e){this.firstValueSet||(this.firstValue=e,this.firstValueSet=!0)}},{key:"onError",value:function(e){this.state="rejected",this.rejection=e;var t,n=Object(i.a)(this.rejectionCallbacks);try{var r=function(){var n=t.value;m((function(){return n(e)}))};for(n.s();!(t=n.n()).done;)r()}catch(a){n.e(a)}finally{n.f()}}},{key:"onCompletion",value:function(){var e=this;this.state="fulfilled";var t,n=Object(i.a)(this.fulfillmentCallbacks);try{var r=function(){var n=t.value;m((function(){return n(e.firstValue)}))};for(n.s();!(t=n.n()).done;)r()}catch(a){n.e(a)}finally{n.f()}}},{key:"then",value:function(e,t){var n=this,r=e||y,i=t||I,a=!1;return new Promise((function(e,t){var o=function(n){if(!a){a=!0;try{e(i(n))}catch(r){t(r)}}};return n.initHasRun||n.subscribe({error:o}),"fulfilled"===n.state?e(r(n.firstValue)):"rejected"===n.state?(a=!0,e(i(n.rejection))):(n.fulfillmentCallbacks.push((function(t){try{e(r(t))}catch(n){o(n)}})),void n.rejectionCallbacks.push(o))}))}},{key:"catch",value:function(e){return this.then(void 0,e)}},{key:"finally",value:function(e){var t=e||v;return this.then((function(e){return t(),e}),(function(){return t()}))}}],[{key:"from",value:function(e){return function(e){return e&&"function"===typeof e.then}(e)?new n((function(t){e.then((function(e){t.next(e),t.complete()}),(function(e){t.error(e)}))})):Object(g.a)(Object(h.a)(n),"from",this).call(this,e)}}]),n}(s.a),E=n(165),C=n(99);n.d(t,"a",(function(){return _})),n.d(t,"b",(function(){return x}));var B=o()("threads:master:messages"),w=1;function Q(e,t){return new s.a((function(n){var r,i=function i(a){var o;if(B("Message from worker:",a.data),a.data&&a.data.uid===t)if((o=a.data)&&o.type===C.b.running)r=a.data.resultType;else if(function(e){return e&&e.type===C.b.result}(a.data))"promise"===r?("undefined"!==typeof a.data.payload&&n.next(Object(A.a)(a.data.payload)),n.complete(),e.removeEventListener("message",i)):(a.data.payload&&n.next(Object(A.a)(a.data.payload)),a.data.complete&&(n.complete(),e.removeEventListener("message",i)));else if(function(e){return e&&e.type===C.b.error}(a.data)){var s=Object(A.a)(a.data.error);n.error(s),e.removeEventListener("message",i)}};return e.addEventListener("message",i),function(){if("observable"===r||!r){var n={type:C.a.cancel,uid:t};e.postMessage(n)}e.removeEventListener("message",i)}}))}function k(e){if(0===e.length)return{args:[],transferables:[]};var t,n,a=[],o=[],s=Object(i.a)(e);try{for(s.s();!(t=s.n()).done;){var u=t.value;Object(E.b)(u)?(a.push(Object(A.c)(u.send)),o.push.apply(o,Object(r.a)(u.transferables))):a.push(Object(A.c)(u))}}catch(c){s.e(c)}finally{s.f()}return{args:a,transferables:0===o.length?o:(n=o,Array.from(new Set(n)))}}function _(e,t){return function(){for(var n=w++,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=k(i),s=o.args,A=o.transferables,c={type:C.a.run,uid:n,method:t,args:s};B("Sending command to run function to worker:",c);try{e.postMessage(c,A)}catch(l){return b.from(Promise.reject(l))}return b.from(Object(u.a)(Q(e,n)))}}function x(e,t){var n,r={},a=Object(i.a)(t);try{for(a.s();!(n=a.n()).done;){var o=n.value;r[o]=_(e,o)}}catch(s){a.e(s)}finally{a.f()}return r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(21);function i(e,t,n){var i=n.removedProps,a=void 0===i?{}:i,o=n.deprecatedProps,s=void 0===o?{}:o,u=n.replacedProps,A=void 0===u?{}:u;for(var c in a)if(c in t){var l=a[c]?"".concat(e,".").concat(a[c]):"N/A";r.h.removed("".concat(e,".").concat(c),l)()}for(var f in s)if(f in t){var h=s[f];r.h.deprecated("".concat(e,".").concat(f),"".concat(e,".").concat(h))()}var g=null;for(var d in A)if(d in t){var p=A[d];r.h.deprecated("".concat(e,".").concat(d),"".concat(e,".").concat(p))(),(g=g||Object.assign({},t))[p]=t[d],delete g[d]}return g||t}},function(e,t,n){"use strict";var r,i="object"===typeof Reflect?Reflect:null,a=i&&"function"===typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"===typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function A(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,a,o,s;if(A(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),void 0===o)o=a[t]=n,++e._eventsCount;else if("function"===typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=o.length,s=u,console&&console.warn&&console.warn(s)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function g(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"===typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):p(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"===typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!==typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!==typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var u=i[e];if(void 0===u)return!1;if("function"===typeof u)a(u,this,t);else{var A=u.length,c=p(u,A);for(n=0;n<A;++n)a(c[n],this,t)}return!0},s.prototype.addListener=function(e,t){return l(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return l(this,e,t,!0)},s.prototype.once=function(e,t){return A(t),this.on(e,h(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return A(t),this.prependListener(e,h(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(A(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!==typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"===typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return g(this,e,!0)},s.prototype.rawListeners=function(e){return g(this,e,!1)},s.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},s.prototype.listenerCount=d,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"GeoJsonEditMode",{enumerable:!0,get:function(){return a.GeoJsonEditMode}}),Object.defineProperty(t,"ModifyMode",{enumerable:!0,get:function(){return o.ModifyMode}}),Object.defineProperty(t,"TranslateMode",{enumerable:!0,get:function(){return s.TranslateMode}}),Object.defineProperty(t,"ScaleMode",{enumerable:!0,get:function(){return u.ScaleMode}}),Object.defineProperty(t,"RotateMode",{enumerable:!0,get:function(){return A.RotateMode}}),Object.defineProperty(t,"DuplicateMode",{enumerable:!0,get:function(){return c.DuplicateMode}}),Object.defineProperty(t,"ExtendLineStringMode",{enumerable:!0,get:function(){return l.ExtendLineStringMode}}),Object.defineProperty(t,"SplitPolygonMode",{enumerable:!0,get:function(){return f.SplitPolygonMode}}),Object.defineProperty(t,"ExtrudeMode",{enumerable:!0,get:function(){return h.ExtrudeMode}}),Object.defineProperty(t,"ElevationMode",{enumerable:!0,get:function(){return g.ElevationMode}}),Object.defineProperty(t,"TransformMode",{enumerable:!0,get:function(){return d.TransformMode}}),Object.defineProperty(t,"DrawPointMode",{enumerable:!0,get:function(){return p.DrawPointMode}}),Object.defineProperty(t,"DrawLineStringMode",{enumerable:!0,get:function(){return v.DrawLineStringMode}}),Object.defineProperty(t,"DrawPolygonMode",{enumerable:!0,get:function(){return y.DrawPolygonMode}}),Object.defineProperty(t,"DrawRectangleMode",{enumerable:!0,get:function(){return m.DrawRectangleMode}}),Object.defineProperty(t,"DrawCircleByDiameterMode",{enumerable:!0,get:function(){return I.DrawCircleByDiameterMode}}),Object.defineProperty(t,"DrawCircleFromCenterMode",{enumerable:!0,get:function(){return b.DrawCircleFromCenterMode}}),Object.defineProperty(t,"DrawEllipseByBoundingBoxMode",{enumerable:!0,get:function(){return E.DrawEllipseByBoundingBoxMode}}),Object.defineProperty(t,"DrawEllipseUsingThreePointsMode",{enumerable:!0,get:function(){return C.DrawEllipseUsingThreePointsMode}}),Object.defineProperty(t,"DrawRectangleUsingThreePointsMode",{enumerable:!0,get:function(){return B.DrawRectangleUsingThreePointsMode}}),Object.defineProperty(t,"Draw90DegreePolygonMode",{enumerable:!0,get:function(){return w.Draw90DegreePolygonMode}}),Object.defineProperty(t,"DrawPolygonByDraggingMode",{enumerable:!0,get:function(){return Q.DrawPolygonByDraggingMode}}),Object.defineProperty(t,"ImmutableFeatureCollection",{enumerable:!0,get:function(){return k.ImmutableFeatureCollection}}),Object.defineProperty(t,"ViewMode",{enumerable:!0,get:function(){return _.ViewMode}}),Object.defineProperty(t,"MeasureDistanceMode",{enumerable:!0,get:function(){return x.MeasureDistanceMode}}),Object.defineProperty(t,"MeasureAreaMode",{enumerable:!0,get:function(){return S.MeasureAreaMode}}),Object.defineProperty(t,"MeasureAngleMode",{enumerable:!0,get:function(){return O.MeasureAngleMode}}),Object.defineProperty(t,"CompositeMode",{enumerable:!0,get:function(){return D.CompositeMode}}),Object.defineProperty(t,"SnappableMode",{enumerable:!0,get:function(){return R.SnappableMode}}),Object.defineProperty(t,"_memoize",{enumerable:!0,get:function(){return j.default}}),t.utils=void 0;var i,a=n(162),o=n(754),s=n(755),u=n(823),A=n(824),c=n(962),l=n(963),f=n(964),h=n(965),g=n(966),d=n(967),p=n(968),v=n(969),y=n(757),m=n(970),I=n(971),b=n(972),E=n(973),C=n(974),B=n(975),w=n(976),Q=n(977),k=n(326),_=n(979),x=n(980),S=n(981),O=n(982),D=n(825),R=n(984),j=(i=n(758))&&i.__esModule?i:{default:i},M=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=N();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(241));function N(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return N=function(){return e},e}t.utils=M},,function(e,t,n){"use strict";var r=n(0),i=n.n(r).a.createContext(null);t.a=i},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for;t.a=r?Symbol.for("mui.nested"):"__THEME_NESTED__"},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(e){var t=e.controlled,n=e.default,i=(e.name,r.useRef(void 0!==t).current),a=r.useState(n),o=a[0],s=a[1];return[i?t:o,r.useCallback((function(e){i||s(e)}),[])]}},function(e,t,n){"use strict";n.d(t,"f",(function(){return d})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return v})),n.d(t,"b",(function(){return y})),n.d(t,"c",(function(){return m})),n.d(t,"a",(function(){return I}));var r=n(24),i=n(47),a=n(541),o=n.n(a),s=n(475),u=n.n(s),A=n(1308),c=n(1062),l=n(123),f=n(134),h=n(85),g=n(91);function d(e,t){var n=(new o.a).compile(g.c[t].schema);if(!n(e)){var r=JSON.stringify(n.errors,null,2);throw new Error("Tree validation failed: ".concat(r))}if(e.datatype!==t)throw new Error("The data type does not match the expected data type of '".concat(t,"'."));return"0.1.2"===e.version?Object(i.a)({},e,{version:g.c[t].latestVersion,tree:e.tree.map((function(e){return Object(f.i)(e,(function(e){return!e.children&&Array.isArray(e.set)}),(function(e){return Object(i.a)({},e,{set:e.set.map((function(e){return[e,null]}))})}),[])}))}):e}function p(e,t){var n=JSON.parse(e);return n=d(n,t)}function v(e,t){var n=Object(A.a)(g.g).parse(e,(function(e){return{group_name:e.group_name,set_name:e.set_name,set_color:e.set_color?Object(l.d)(e.set_color):h.b,cell_id:e.cell_id,prediction_score:u()(e.prediction_score)||e.prediction_score===g.f?null:+e.prediction_score}})),r=(new o.a).compile(g.i[t].schema);if(r(n)){var i={version:g.c[t].latestVersion,datatype:t,tree:[]};return Array.from(new Set(n.map((function(e){return e.group_name})))).forEach((function(e){var t={name:e,children:[]},r=n.filter((function(t){return t.group_name===e}));Array.from(new Set(r.map((function(e){return e.set_name})))).forEach((function(e){var n=r.filter((function(t){return t.set_name===e})),i=n[0].set_color,a={name:e,color:i,set:n.map((function(e){return[e.cell_id,e.prediction_score]}))};t.children.push(a)})),i.tree.push(t)})),i}var a=JSON.stringify(r.errors,null,2);throw new Error("Import validation failed: ".concat(a))}function y(e){var t=JSON.stringify(e);return"data:".concat(g.d,";charset=utf-8,").concat(encodeURIComponent(t))}function m(e){var t=[];e.tree.forEach((function(e){e.children.forEach((function(n){n.set&&n.set.forEach((function(i){var a=Object(r.a)(i,2),o=a[0],s=a[1];t.push({group_name:e.name,set_name:n.name,set_color:Object(l.c)(n.color),cell_id:o,prediction_score:u()(s)?g.f:s})}))}))}));var n=Object(c.parse)(t,{fields:["group_name","set_name","set_color","cell_id","prediction_score"],delimiter:g.g});return"data:".concat(g.e,";charset=utf-8,").concat(encodeURIComponent(n))}function I(e,t){var n=document.createElement("a");n.setAttribute("href",e),n.setAttribute("download",t),document.body.appendChild(n),n.click(),n.remove()}},function(e,t,n){(function(e){var r=n(138),i=n(709),a=t&&!t.nodeType&&t,o=a&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===a?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;e.exports=u}).call(this,n(264)(e))},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(29),o=n(6),s=n(7),u=n(4),A=n(1),c=n(412),l=n(411),f=n(217),h=n(311),g=n(121),d=n(179),p=n(194),v=new Uint16Array([0,2,1,0,3,2]),y=new Float32Array([0,1,0,0,1,0,1,1]);function m(e,t){if(!t)return function(e){for(var t=new Float64Array(12),n=0;n<e.length;n++)t[3*n+0]=e[n][0],t[3*n+1]=e[n][1],t[3*n+2]=e[n][2]||0;return{vertexCount:6,positions:t,indices:v,texCoords:y}}(e);for(var n=Math.max(Math.abs(e[0][0]-e[3][0]),Math.abs(e[1][0]-e[2][0])),r=Math.max(Math.abs(e[1][1]-e[0][1]),Math.abs(e[2][1]-e[3][1])),i=Math.ceil(n/t)+1,a=Math.ceil(r/t)+1,o=(i-1)*(a-1)*6,s=new Uint32Array(o),u=new Float32Array(i*a*2),A=new Float64Array(i*a*3),c=0,l=0,f=0;f<i;f++)for(var h=f/(i-1),g=0;g<a;g++){var d=g/(a-1),p=I(e,h,d);A[3*c+0]=p[0],A[3*c+1]=p[1],A[3*c+2]=p[2]||0,u[2*c+0]=h,u[2*c+1]=1-d,f>0&&g>0&&(s[l++]=c-a,s[l++]=c-a-1,s[l++]=c-1,s[l++]=c-a,s[l++]=c-1,s[l++]=c),c++}return{vertexCount:o,positions:A,indices:s,texCoords:u}}function I(e,t,n){return Object(p.lerp)(Object(p.lerp)(e[0],e[1],n),Object(p.lerp)(e[3],e[2],n),t)}var b;function E(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}n.d(t,"a",(function(){return B}));var C=(b={},Object(A.a)(b,10241,9987),Object(A.a)(b,10240,9729),Object(A.a)(b,10242,33071),Object(A.a)(b,10243,33071),b),B=function(e){Object(o.a)(n,e);var t=E(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"getShaders",value:function(){return Object(a.a)(Object(u.a)(n.prototype),"getShaders",this).call(this,{vs:"\n#define SHADER_NAME bitmap-layer-vertex-shader\n\nattribute vec2 texCoords;\nattribute vec3 positions;\nattribute vec3 positions64Low;\n\nvarying vec2 vTexCoord;\n\nconst vec3 pickingColor = vec3(1.0, 0.0, 0.0);\n\nvoid main(void) {\n  geometry.worldPosition = positions;\n  geometry.uv = texCoords;\n  geometry.pickingColor = pickingColor;\n\n  gl_Position = project_position_to_clipspace(positions, positions64Low, vec3(0.0), geometry.position);\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  vTexCoord = texCoords;\n\n  vec4 color = vec4(0.0);\n  DECKGL_FILTER_COLOR(color, geometry);\n}\n",fs:"\n#define SHADER_NAME bitmap-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D bitmapTexture;\n\nvarying vec2 vTexCoord;\n\nuniform float desaturate;\nuniform vec4 transparentColor;\nuniform vec3 tintColor;\nuniform float opacity;\n\n// apply desaturation\nvec3 color_desaturate(vec3 color) {\n  float luminance = (color.r + color.g + color.b) * 0.333333333;\n  return mix(color, vec3(luminance), desaturate);\n}\n\n// apply tint\nvec3 color_tint(vec3 color) {\n  return color * tintColor;\n}\n\n// blend with background color\nvec4 apply_opacity(vec3 color, float alpha) {\n  return mix(transparentColor, vec4(color, 1.0), alpha);\n}\n\nvoid main(void) {\n  vec4 bitmapColor = texture2D(bitmapTexture, vTexCoord);\n\n  gl_FragColor = apply_opacity(color_tint(color_desaturate(bitmapColor.rgb)), bitmapColor.a * opacity);\n\n  geometry.uv = vTexCoord;\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[c.a,l.a]})}},{key:"initializeState",value:function(){var e=this,t=this.getAttributeManager();t.remove(["instancePickingColors"]);t.add({indices:{size:1,isIndexed:!0,update:function(t){return t.value=e.state.mesh.indices},noAlloc:!0},positions:{size:3,type:5130,fp64:this.use64bitPositions(),update:function(t){return t.value=e.state.mesh.positions},noAlloc:!0},texCoords:{size:2,update:function(t){return t.value=e.state.mesh.texCoords},noAlloc:!0}})}},{key:"updateState",value:function(e){var t=e.props,n=e.oldProps;if(e.changeFlags.extensionsChanged){var r=this.context.gl;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(r)}),this.getAttributeManager().invalidateAll()}t.image!==n.image&&this.loadTexture(t.image);var i=this.getAttributeManager();if(t.bounds!==n.bounds){var a=this.state.mesh,o=this._createMesh();for(var s in this.state.model.setVertexCount(o.vertexCount),o)a&&a[s]!==o[s]&&i.invalidate(s);this.setState({mesh:o})}}},{key:"finalizeState",value:function(){Object(a.a)(Object(u.a)(n.prototype),"finalizeState",this).call(this),this.state.bitmapTexture&&this.state.bitmapTexture.delete()}},{key:"_createMesh",value:function(){var e=this.props.bounds,t=e;return Number.isFinite(e[0])&&(t=[[e[0],e[1]],[e[0],e[3]],[e[2],e[3]],[e[2],e[1]]]),m(t,this.context.viewport.resolution)}},{key:"_getModel",value:function(e){return e?new h.a(e,Object.assign({},this.getShaders(),{id:this.props.id,geometry:new g.a({drawMode:4,vertexCount:6}),isInstanced:!1})):null}},{key:"draw",value:function(e){var t=e.uniforms,n=this.state,r=n.bitmapTexture,i=n.model,a=this.props,o=a.image,s=a.desaturate,u=a.transparentColor,A=a.tintColor;r&&o instanceof HTMLVideoElement&&o.readyState>HTMLVideoElement.HAVE_METADATA&&(r.width!==o.videoWidth||r.height!==o.videoHeight?(r.resize({width:o.videoWidth,height:o.videoHeight,mipmaps:!0}),r.setSubImageData({data:o,parameters:C})):r.setSubImageData({data:o}),r.generateMipmap());r&&i&&i.setUniforms(Object.assign({},t,{bitmapTexture:r,desaturate:s,transparentColor:u.map((function(e){return e/255})),tintColor:A.slice(0,3).map((function(e){return e/255}))})).draw()}},{key:"loadTexture",value:function(e){var t=this.context.gl;this.state.bitmapTexture&&this.state.bitmapTexture.delete(),e instanceof d.a?this.setState({bitmapTexture:e}):e instanceof HTMLVideoElement?this.setState({bitmapTexture:new d.a(t,{width:1,height:1,parameters:C,mipmaps:!1})}):e&&this.setState({bitmapTexture:new d.a(t,{data:e,parameters:C})})}}]),n}(f.a);B.layerName="BitmapLayer",B.defaultProps={image:{type:"object",value:null,async:!0},bounds:{type:"array",value:[1,0,0,1],compare:!0},desaturate:{type:"number",min:0,max:1,value:0},transparentColor:{type:"color",value:[0,0,0,0]},tintColor:{type:"color",value:[255,255,255]}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(18),i=n(0),a=n(327);function o(e,t){var n=i.memo(i.forwardRef((function(t,n){return i.createElement(a.a,Object(r.a)({},t,{ref:n}),e)})));return n.muiName=a.a.muiName,n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),i=n(540);function a(){return r.useContext(i.a)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(145);t.default=function(e){var t=[1/0,1/0,-1/0,-1/0];return r.coordEach(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=t.getContrastingColor=t.isValidHex=t.toState=t.simpleCheckForValidColor=void 0;var r=a(n(1240)),i=a(n(395));function a(e){return e&&e.__esModule?e:{default:e}}t.simpleCheckForValidColor=function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],(function(r){if(e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)){/^\d+%$/.test(e[r])&&(n+=1)}})),t===n&&e};var o=t.toState=function(e,t){var n=e.hex?(0,i.default)(e.hex):(0,i.default)(e),r=n.toHsl(),a=n.toHsv(),o=n.toRgb(),s=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===s&&0===o.a?"transparent":"#"+s,rgb:o,hsv:a,oldHue:e.h||t||r.h,source:e.source}};t.isValidHex=function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,i.default)(e).isValid()},t.getContrastingColor=function(e){if(!e)return"#fff";var t=o(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}};t.default=t},function(e,t,n){var r=n(321);e.exports=function(e,t,n){return new r(e,n).compare(new r(t,n))}},function(e,t,n){var r=n(479),i=n(480),a=function(){"use strict";function e(t,n){var i=this;if(r(this,e),n&&"object"===typeof n||(n={loose:!!n,includePrerelease:!1}),t instanceof e)return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new e(t.raw,n);if(t instanceof o)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map((function(e){return i.parseRange(e.trim())})).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(t));this.format()}return i(e,[{key:"format",value:function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(e){var t=this,n=this.options.loose;e=e.trim();var r=n?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(r,Q(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(c[l.COMPARATORTRIM],f),s("comparator trim",e,c[l.COMPARATORTRIM]),e=(e=(e=e.replace(c[l.TILDETRIM],h)).replace(c[l.CARETTRIM],g)).split(/\s+/).join(" ");var i=n?c[l.COMPARATORLOOSE]:c[l.COMPARATOR];return e.split(" ").map((function(e){return p(e,t.options)})).join(" ").split(/\s+/).map((function(e){return w(e,t.options)})).filter(this.options.loose?function(e){return!!e.match(i)}:function(){return!0}).map((function(e){return new o(e,t.options)}))}},{key:"intersects",value:function(t,n){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some((function(e){return d(e,n)&&t.set.some((function(t){return d(t,n)&&e.every((function(e){return t.every((function(t){return e.intersects(t,n)}))}))}))}))}},{key:"test",value:function(e){if(!e)return!1;if("string"===typeof e)try{e=new u(e,this.options)}catch(n){return!1}for(var t=0;t<this.set.length;t++)if(k(this.set[t],e,this.options))return!0;return!1}}]),e}();e.exports=a;var o=n(795),s=n(793),u=n(321),A=n(722),c=A.re,l=A.t,f=A.comparatorTrimReplace,h=A.tildeTrimReplace,g=A.caretTrimReplace,d=function(e,t){for(var n=!0,r=e.slice(),i=r.pop();n&&r.length;)n=r.every((function(e){return i.intersects(e,t)})),i=r.pop();return n},p=function(e,t){return s("comp",e,t),e=I(e,t),s("caret",e),e=y(e,t),s("tildes",e),e=E(e,t),s("xrange",e),e=B(e,t),s("stars",e),e},v=function(e){return!e||"x"===e.toLowerCase()||"*"===e},y=function(e,t){return e.trim().split(/\s+/).map((function(e){return m(e,t)})).join(" ")},m=function(e,t){var n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,(function(t,n,r,i,a){var o;return s("tilde",e,t,n,r,i,a),v(n)?o="":v(r)?o=">=".concat(n,".0.0 <").concat(+n+1,".0.0-0"):v(i)?o=">=".concat(n,".").concat(r,".0 <").concat(n,".").concat(+r+1,".0-0"):a?(s("replaceTilde pr",a),o=">=".concat(n,".").concat(r,".").concat(i,"-").concat(a," <").concat(n,".").concat(+r+1,".0-0")):o=">=".concat(n,".").concat(r,".").concat(i," <").concat(n,".").concat(+r+1,".0-0"),s("tilde return",o),o}))},I=function(e,t){return e.trim().split(/\s+/).map((function(e){return b(e,t)})).join(" ")},b=function(e,t){s("caret",e,t);var n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,(function(t,n,i,a,o){var u;return s("caret",e,t,n,i,a,o),v(n)?u="":v(i)?u=">=".concat(n,".0.0").concat(r," <").concat(+n+1,".0.0-0"):v(a)?u="0"===n?">=".concat(n,".").concat(i,".0").concat(r," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".0").concat(r," <").concat(+n+1,".0.0-0"):o?(s("replaceCaret pr",o),u="0"===n?"0"===i?">=".concat(n,".").concat(i,".").concat(a,"-").concat(o," <").concat(n,".").concat(i,".").concat(+a+1,"-0"):">=".concat(n,".").concat(i,".").concat(a,"-").concat(o," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".").concat(a,"-").concat(o," <").concat(+n+1,".0.0-0")):(s("no pr"),u="0"===n?"0"===i?">=".concat(n,".").concat(i,".").concat(a).concat(r," <").concat(n,".").concat(i,".").concat(+a+1,"-0"):">=".concat(n,".").concat(i,".").concat(a).concat(r," <").concat(n,".").concat(+i+1,".0-0"):">=".concat(n,".").concat(i,".").concat(a," <").concat(+n+1,".0.0-0")),s("caret return",u),u}))},E=function(e,t){return s("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return C(e,t)})).join(" ")},C=function(e,t){e=e.trim();var n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,(function(n,r,i,a,o,u){s("xRange",e,n,r,i,a,o,u);var A=v(i),c=A||v(a),l=c||v(o),f=l;return"="===r&&f&&(r=""),u=t.includePrerelease?"-0":"",A?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&f?(c&&(a=0),o=0,">"===r?(r=">=",c?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===r&&(r="<",c?i=+i+1:a=+a+1),"<"===r&&(u="-0"),n="".concat(r+i,".").concat(a,".").concat(o).concat(u)):c?n=">=".concat(i,".0.0").concat(u," <").concat(+i+1,".0.0-0"):l&&(n=">=".concat(i,".").concat(a,".0").concat(u," <").concat(i,".").concat(+a+1,".0-0")),s("xRange return",n),n}))},B=function(e,t){return s("replaceStars",e,t),e.trim().replace(c[l.STAR],"")},w=function(e,t){return s("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],"")},Q=function(e){return function(t,n,r,i,a,o,s,u,A,c,l,f,h){return n=v(r)?"":v(i)?">=".concat(r,".0.0").concat(e?"-0":""):v(a)?">=".concat(r,".").concat(i,".0").concat(e?"-0":""):o?">=".concat(n):">=".concat(n).concat(e?"-0":""),u=v(A)?"":v(c)?"<".concat(+A+1,".0.0-0"):v(l)?"<".concat(A,".").concat(+c+1,".0-0"):f?"<=".concat(A,".").concat(c,".").concat(l,"-").concat(f):e?"<".concat(A,".").concat(c,".").concat(+l+1,"-0"):"<=".concat(u),"".concat(n," ").concat(u).trim()}},k=function(e,t,n){for(var r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(var i=0;i<e.length;i++)if(s(e[i].semver),e[i].semver!==o.ANY&&e[i].semver.prerelease.length>0){var a=e[i].semver;if(a.major===t.major&&a.minor===t.minor&&a.patch===t.patch)return!0}return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(145),i=n(72);t.default=function(e,t){void 0===t&&(t={});var n=0,a=0,o=0;return r.coordEach(e,(function(e){n+=e[0],a+=e[1],o++})),i.point([n/o,a/o],t.properties)}},function(e,t,n){"use strict";(function(e){var n="undefined"!==typeof window&&"undefined"!==typeof document&&"undefined"!==typeof navigator,r=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(n&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();var i=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),r))}};function a(e){return e&&"[object Function]"==={}.toString.call(e)}function o(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function s(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function u(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=o(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:u(s(e))}function A(e){return e&&e.referenceNode?e.referenceNode:e}var c=n&&!(!window.MSInputMethodContext||!document.documentMode),l=n&&/MSIE 10/.test(navigator.userAgent);function f(e){return 11===e?c:10===e?l:c||l}function h(e){if(!e)return document.documentElement;for(var t=f(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===o(n,"position")?h(n):n:e?e.ownerDocument.documentElement:document.documentElement}function g(e){return null!==e.parentNode?g(e.parentNode):e}function d(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,a=document.createRange();a.setStart(r,0),a.setEnd(i,0);var o=a.commonAncestorContainer;if(e!==o&&t!==o||r.contains(i))return function(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||h(e.firstElementChild)===e)}(o)?o:h(o);var s=g(e);return s.host?d(s.host,t):d(e,g(t).host)}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var i=e.ownerDocument.documentElement,a=e.ownerDocument.scrollingElement||i;return a[n]}return e[n]}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=p(t,"top"),i=p(t,"left"),a=n?-1:1;return e.top+=r*a,e.bottom+=r*a,e.left+=i*a,e.right+=i*a,e}function y(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function m(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],f(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function I(e){var t=e.body,n=e.documentElement,r=f(10)&&getComputedStyle(n);return{height:m("Height",t,n,r),width:m("Width",t,n,r)}}var b=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},E=function(){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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),C=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},B=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function w(e){return B({},e,{right:e.left+e.width,bottom:e.top+e.height})}function Q(e){var t={};try{if(f(10)){t=e.getBoundingClientRect();var n=p(e,"top"),r=p(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(h){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a="HTML"===e.nodeName?I(e.ownerDocument):{},s=a.width||e.clientWidth||i.width,u=a.height||e.clientHeight||i.height,A=e.offsetWidth-s,c=e.offsetHeight-u;if(A||c){var l=o(e);A-=y(l,"x"),c-=y(l,"y"),i.width-=A,i.height-=c}return w(i)}function k(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=f(10),i="HTML"===t.nodeName,a=Q(e),s=Q(t),A=u(e),c=o(t),l=parseFloat(c.borderTopWidth),h=parseFloat(c.borderLeftWidth);n&&i&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var g=w({top:a.top-s.top-l,left:a.left-s.left-h,width:a.width,height:a.height});if(g.marginTop=0,g.marginLeft=0,!r&&i){var d=parseFloat(c.marginTop),p=parseFloat(c.marginLeft);g.top-=l-d,g.bottom-=l-d,g.left-=h-p,g.right-=h-p,g.marginTop=d,g.marginLeft=p}return(r&&!n?t.contains(A):t===A&&"BODY"!==A.nodeName)&&(g=v(g,t)),g}function _(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=k(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),a=Math.max(n.clientHeight,window.innerHeight||0),o=t?0:p(n),s=t?0:p(n,"left"),u={top:o-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:a};return w(u)}function x(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===o(e,"position"))return!0;var n=s(e);return!!n&&x(n)}function S(e){if(!e||!e.parentElement||f())return document.documentElement;for(var t=e.parentElement;t&&"none"===o(t,"transform");)t=t.parentElement;return t||document.documentElement}function O(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a={top:0,left:0},o=i?S(e):d(e,A(t));if("viewport"===r)a=_(o,i);else{var c=void 0;"scrollParent"===r?"BODY"===(c=u(s(t))).nodeName&&(c=e.ownerDocument.documentElement):c="window"===r?e.ownerDocument.documentElement:r;var l=k(c,o,i);if("HTML"!==c.nodeName||x(o))a=l;else{var f=I(e.ownerDocument),h=f.height,g=f.width;a.top+=l.top-l.marginTop,a.bottom=h+l.top,a.left+=l.left-l.marginLeft,a.right=g+l.left}}var p="number"===typeof(n=n||0);return a.left+=p?n:n.left||0,a.top+=p?n:n.top||0,a.right-=p?n:n.right||0,a.bottom-=p?n:n.bottom||0,a}function D(e){return e.width*e.height}function R(e,t,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var o=O(n,r,a,i),s={top:{width:o.width,height:t.top-o.top},right:{width:o.right-t.right,height:o.height},bottom:{width:o.width,height:o.bottom-t.bottom},left:{width:t.left-o.left,height:o.height}},u=Object.keys(s).map((function(e){return B({key:e},s[e],{area:D(s[e])})})).sort((function(e,t){return t.area-e.area})),A=u.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),c=A.length>0?A[0].key:u[0].key,l=e.split("-")[1];return c+(l?"-"+l:"")}function j(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=r?S(t):d(t,A(n));return k(n,i,r)}function M(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function N(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function F(e,t,n){n=n.split("-")[0];var r=M(e),i={width:r.width,height:r.height},a=-1!==["right","left"].indexOf(n),o=a?"top":"left",s=a?"left":"top",u=a?"height":"width",A=a?"width":"height";return i[o]=t[o]+t[u]/2-r[u]/2,i[s]=n===s?t[s]-r[A]:t[N(s)],i}function T(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function L(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=T(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&a(n)&&(t.offsets.popper=w(t.offsets.popper),t.offsets.reference=w(t.offsets.reference),t=n(t,e))})),t}function P(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=j(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=R(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=F(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=L(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function U(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function G(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var i=t[r],a=i?""+i+n:e;if("undefined"!==typeof document.body.style[a])return a}return null}function q(){return this.state.isDestroyed=!0,U(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[G("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function H(e){var t=e.ownerDocument;return t?t.defaultView:window}function Y(e,t,n,r){n.updateBound=r,H(e).addEventListener("resize",n.updateBound,{passive:!0});var i=u(e);return function e(t,n,r,i){var a="BODY"===t.nodeName,o=a?t.ownerDocument.defaultView:t;o.addEventListener(n,r,{passive:!0}),a||e(u(o.parentNode),n,r,i),i.push(o)}(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function J(){this.state.eventsEnabled||(this.state=Y(this.reference,this.options,this.state,this.scheduleUpdate))}function z(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,H(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function K(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function W(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&K(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var V=n&&/Firefox/i.test(navigator.userAgent);function X(e,t,n){var r=T(e,(function(e){return e.name===t})),i=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!i){var a="`"+t+"`",o="`"+n+"`";console.warn(o+" modifier is required by "+a+" modifier in order to work, be sure to include it before "+a+"!")}return i}var Z=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],$=Z.slice(3);function ee(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=$.indexOf(e),r=$.slice(n+1).concat($.slice(0,n));return t?r.reverse():r}var te="flip",ne="clockwise",re="counterclockwise";function ie(e,t,n,r){var i=[0,0],a=-1!==["right","left"].indexOf(r),o=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=o.indexOf(T(o,(function(e){return-1!==e.search(/,|\s/)})));o[s]&&-1===o[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,A=-1!==s?[o.slice(0,s).concat([o[s].split(u)[0]]),[o[s].split(u)[1]].concat(o.slice(s+1))]:[o];return(A=A.map((function(e,r){var i=(1===r?!a:a)?"height":"width",o=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,o=!0,e):o?(e[e.length-1]+=t,o=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),a=+i[1],o=i[2];if(!a)return e;if(0===o.indexOf("%")){var s=void 0;switch(o){case"%p":s=n;break;case"%":case"%r":default:s=r}return w(s)[t]/100*a}if("vh"===o||"vw"===o){return("vh"===o?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*a}return a}(e,i,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){K(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))}))})),i}var ae={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,a=i.reference,o=i.popper,s=-1!==["bottom","top"].indexOf(n),u=s?"left":"top",A=s?"width":"height",c={start:C({},u,a[u]),end:C({},u,a[u]+a[A]-o[A])};e.offsets.popper=B({},o,c[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,i=e.offsets,a=i.popper,o=i.reference,s=r.split("-")[0],u=void 0;return u=K(+n)?[+n,0]:ie(n,a,o,s),"left"===s?(a.top+=u[0],a.left-=u[1]):"right"===s?(a.top+=u[0],a.left+=u[1]):"top"===s?(a.left+=u[0],a.top-=u[1]):"bottom"===s&&(a.left+=u[0],a.top+=u[1]),e.popper=a,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||h(e.instance.popper);e.instance.reference===n&&(n=h(n));var r=G("transform"),i=e.instance.popper.style,a=i.top,o=i.left,s=i[r];i.top="",i.left="",i[r]="";var u=O(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=a,i.left=o,i[r]=s,t.boundaries=u;var A=t.priority,c=e.offsets.popper,l={primary:function(e){var n=c[e];return c[e]<u[e]&&!t.escapeWithReference&&(n=Math.max(c[e],u[e])),C({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=c[n];return c[e]>u[e]&&!t.escapeWithReference&&(r=Math.min(c[n],u[e]-("right"===e?c.width:c.height))),C({},n,r)}};return A.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";c=B({},c,l[t](e))})),e.offsets.popper=c,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],a=Math.floor,o=-1!==["top","bottom"].indexOf(i),s=o?"right":"bottom",u=o?"left":"top",A=o?"width":"height";return n[s]<a(r[u])&&(e.offsets.popper[u]=a(r[u])-n[A]),n[u]>a(r[s])&&(e.offsets.popper[u]=a(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!X(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"===typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],a=e.offsets,s=a.popper,u=a.reference,A=-1!==["left","right"].indexOf(i),c=A?"height":"width",l=A?"Top":"Left",f=l.toLowerCase(),h=A?"left":"top",g=A?"bottom":"right",d=M(r)[c];u[g]-d<s[f]&&(e.offsets.popper[f]-=s[f]-(u[g]-d)),u[f]+d>s[g]&&(e.offsets.popper[f]+=u[f]+d-s[g]),e.offsets.popper=w(e.offsets.popper);var p=u[f]+u[c]/2-d/2,v=o(e.instance.popper),y=parseFloat(v["margin"+l]),m=parseFloat(v["border"+l+"Width"]),I=p-e.offsets.popper[f]-y-m;return I=Math.max(Math.min(s[c]-d,I),0),e.arrowElement=r,e.offsets.arrow=(C(n={},f,Math.round(I)),C(n,h,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(U(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=O(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=N(r),a=e.placement.split("-")[1]||"",o=[];switch(t.behavior){case te:o=[r,i];break;case ne:o=ee(r);break;case re:o=ee(r,!0);break;default:o=t.behavior}return o.forEach((function(s,u){if(r!==s||o.length===u+1)return e;r=e.placement.split("-")[0],i=N(r);var A=e.offsets.popper,c=e.offsets.reference,l=Math.floor,f="left"===r&&l(A.right)>l(c.left)||"right"===r&&l(A.left)<l(c.right)||"top"===r&&l(A.bottom)>l(c.top)||"bottom"===r&&l(A.top)<l(c.bottom),h=l(A.left)<l(n.left),g=l(A.right)>l(n.right),d=l(A.top)<l(n.top),p=l(A.bottom)>l(n.bottom),v="left"===r&&h||"right"===r&&g||"top"===r&&d||"bottom"===r&&p,y=-1!==["top","bottom"].indexOf(r),m=!!t.flipVariations&&(y&&"start"===a&&h||y&&"end"===a&&g||!y&&"start"===a&&d||!y&&"end"===a&&p),I=!!t.flipVariationsByContent&&(y&&"start"===a&&g||y&&"end"===a&&h||!y&&"start"===a&&p||!y&&"end"===a&&d),b=m||I;(f||v||b)&&(e.flipped=!0,(f||v)&&(r=o[u+1]),b&&(a=function(e){return"end"===e?"start":"start"===e?"end":e}(a)),e.placement=r+(a?"-"+a:""),e.offsets.popper=B({},e.offsets.popper,F(e.instance.popper,e.offsets.reference,e.placement)),e=L(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,a=r.reference,o=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[o?"left":"top"]=a[n]-(s?i[o?"width":"height"]:0),e.placement=N(t),e.offsets.popper=w(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!X(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=T(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,i=e.offsets.popper,a=T(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==a&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var o=void 0!==a?a:t.gpuAcceleration,s=h(e.instance.popper),u=Q(s),A={position:i.position},c=function(e,t){var n=e.offsets,r=n.popper,i=n.reference,a=Math.round,o=Math.floor,s=function(e){return e},u=a(i.width),A=a(r.width),c=-1!==["left","right"].indexOf(e.placement),l=-1!==e.placement.indexOf("-"),f=t?c||l||u%2===A%2?a:o:s,h=t?a:s;return{left:f(u%2===1&&A%2===1&&!l&&t?r.left-1:r.left),top:h(r.top),bottom:h(r.bottom),right:f(r.right)}}(e,window.devicePixelRatio<2||!V),l="bottom"===n?"top":"bottom",f="right"===r?"left":"right",g=G("transform"),d=void 0,p=void 0;if(p="bottom"===l?"HTML"===s.nodeName?-s.clientHeight+c.bottom:-u.height+c.bottom:c.top,d="right"===f?"HTML"===s.nodeName?-s.clientWidth+c.right:-u.width+c.right:c.left,o&&g)A[g]="translate3d("+d+"px, "+p+"px, 0)",A[l]=0,A[f]=0,A.willChange="transform";else{var v="bottom"===l?-1:1,y="right"===f?-1:1;A[l]=p*v,A[f]=d*y,A.willChange=l+", "+f}var m={"x-placement":e.placement};return e.attributes=B({},m,e.attributes),e.styles=B({},A,e.styles),e.arrowStyles=B({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return W(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach((function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&W(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,i){var a=j(i,t,e,n.positionFixed),o=R(n.placement,a,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",o),W(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},oe=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};b(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=i(this.update.bind(this)),this.options=B({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(B({},e.Defaults.modifiers,o.modifiers)).forEach((function(t){r.options.modifiers[t]=B({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return B({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&a(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return E(e,[{key:"update",value:function(){return P.call(this)}},{key:"destroy",value:function(){return q.call(this)}},{key:"enableEventListeners",value:function(){return J.call(this)}},{key:"disableEventListeners",value:function(){return z.call(this)}}]),e}();oe.Utils=("undefined"!==typeof window?window:e).PopperUtils,oe.placements=Z,oe.Defaults=ae,t.a=oe}).call(this,n(70))},function(e,t,n){"use strict";var r=n(108);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),a=(0,r(n(182)).default)(i.default.createElement("path",{transform:"scale(1.2, 1.2)",d:"M15.95 10.78c.03-.25.05-.51.05-.78s-.02-.53-.06-.78l1.69-1.32c.15-.12.19-.34.1-.51l-1.6-2.77c-.1-.18-.31-.24-.49-.18l-1.99.8c-.42-.32-.86-.58-1.35-.78L12 2.34c-.03-.2-.2-.34-.4-.34H8.4c-.2 0-.36.14-.39.34l-.3 2.12c-.49.2-.94.47-1.35.78l-1.99-.8c-.18-.07-.39 0-.49.18l-1.6 2.77c-.1.18-.06.39.1.51l1.69 1.32c-.04.25-.07.52-.07.78s.02.53.06.78L2.37 12.1c-.15.12-.19.34-.1.51l1.6 2.77c.1.18.31.24.49.18l1.99-.8c.42.32.86.58 1.35.78l.3 2.12c.04.2.2.34.4.34h3.2c.2 0 .37-.14.39-.34l.3-2.12c.49-.2.94-.47 1.35-.78l1.99.8c.18.07.39 0 .49-.18l1.6-2.77c.1-.18.06-.39-.1-.51l-1.67-1.32zM10 13c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z"}),"Settings");t.default=a},function(e,t,n){"use strict";var r=n(108);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),a=(0,r(n(182)).default)(i.default.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.96zM17 13l-5 5-5-5h3V9h4v4h3z"}),"CloudDownload");t.default=a},function(e,t,n){"use strict";var r=n(108);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),a=(0,r(n(182)).default)(i.default.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"}),"Close");t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(Object.is(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(var r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}},,function(e,t,n){var r=n(195),i=n(478),a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,A=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=s.test(e);return n||u.test(e)?A(e.slice(2),n?2:8):o.test(e)?NaN:+e}},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"===typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",o=r.toStringTag||"@@toStringTag";function s(e,t,n,r){var i=t&&t.prototype instanceof c?t:c,a=Object.create(i.prototype),o=new E(r||[]);return a._invoke=function(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return B()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=m(o,n);if(s){if(s===A)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===A)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,o),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}e.wrap=s;var A={};function c(){}function l(){}function f(){}var h={};h[i]=function(){return this};var g=Object.getPrototypeOf,d=g&&g(g(C([])));d&&d!==t&&n.call(d,i)&&(h=d);var p=f.prototype=c.prototype=Object.create(h);function v(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function y(e,t){var r;this._invoke=function(i,a){function o(){return new t((function(r,o){!function r(i,a,o,s){var A=u(e[i],e,a);if("throw"!==A.type){var c=A.arg,l=c.value;return l&&"object"===typeof l&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,o,s)}),(function(e){r("throw",e,o,s)})):t.resolve(l).then((function(e){c.value=e,o(c)}),(function(e){return r("throw",e,o,s)}))}s(A.arg)}(i,a,r,o)}))}return r=r?r.then(o,o):o()}}function m(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,m(e,t),"throw"===t.method))return A;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return A}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,A;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,A):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,A)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function b(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function C(e){if(e){var t=e[i];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:B}}function B(){return{value:void 0,done:!0}}return l.prototype=p.constructor=f,f.constructor=l,f[o]=l.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===l||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,o in e||(e[o]="GeneratorFunction")),e.prototype=Object.create(p),e},e.awrap=function(e){return{__await:e}},v(y.prototype),y.prototype[a]=function(){return this},e.AsyncIterator=y,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new y(s(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},v(p),p[o]="Generator",p[i]=function(){return this},p.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=C,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,A):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),A},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),b(n),A}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;b(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),A}},e}(e.exports);try{regeneratorRuntime=r}catch(i){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){var r=n(239),i=n(195);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){var r=n(688),i=n(695),a=n(697),o=n(698),s=n(699);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(710),i=n(483),a=n(500),o=a&&a.isTypedArray,s=o?i(o):r;e.exports=s},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(3),i=n(2),a=n(6),o=n(7),s=n(4),u=n(44),A=n(101),c=n(322),l=n(218),f=n(186),h=n(252),g=n(309);function d(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var y={stroked:!0,filled:!0,extruded:!1,elevationScale:1,wireframe:!1,_normalize:!0,lineWidthUnits:"meters",lineWidthScale:1,lineWidthMinPixels:0,lineWidthMaxPixels:Number.MAX_SAFE_INTEGER,lineJointRounded:!1,lineMiterLimit:4,getPolygon:{type:"accessor",value:function(e){return e.polygon}},getFillColor:{type:"accessor",value:[0,0,0,255]},getLineColor:{type:"accessor",value:[0,0,0,255]},getLineWidth:{type:"accessor",value:1},getElevation:{type:"accessor",value:1e3},material:!0},m=function(e){Object(a.a)(n,e);var t=v(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"initializeState",value:function(){this.state={paths:[]},this.props.getLineDashArray&&u.a.removed("getLineDashArray","PathStyleExtension")()}},{key:"updateState",value:function(e){var t=this,n=(e.oldProps,e.props,e.changeFlags),r=n.dataChanged||n.updateTriggersChanged&&(n.updateTriggersChanged.all||n.updateTriggersChanged.getPolygon);if(r&&Array.isArray(n.dataChanged)){var i=this.state.paths.slice(),a=n.dataChanged.map((function(e){return Object(g.a)({data:i,getIndex:function(e){return e.__source.index},dataRange:e,replace:t._getPaths(e)})}));this.setState({paths:i,pathsDiff:a})}else r&&this.setState({paths:this._getPaths(),pathsDiff:null})}},{key:"_getPaths",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.props,r=n.data,i=n.getPolygon,a=n.positionFormat,o=n._normalize,s=[],u="XY"===a?2:3,c=t.startRow,l=t.endRow,f=Object(A.a)(r,c,l),g=f.iterable,p=f.objectInfo,v=d(g);try{for(v.s();!(e=v.n()).done;){var y=e.value;p.index++;var m=i(y,p);o&&(m=h.b(m,u));var I=m,b=I.holeIndices,E=m.positions||m;if(b)for(var C=0;C<=b.length;C++){var B=E.slice(b[C-1]||0,b[C]||E.length);s.push(this.getSubLayerRow({path:B},y,p.index))}else s.push(this.getSubLayerRow({path:E},y,p.index))}}catch(w){v.e(w)}finally{v.f()}return s}},{key:"renderLayers",value:function(){var e=this.props,t=e.data,n=e._dataDiff,r=e.stroked,i=e.filled,a=e.extruded,o=e.wireframe,s=e._normalize,u=e.elevationScale,A=e.transitions,c=e.positionFormat,h=this.props,g=h.lineWidthUnits,d=h.lineWidthScale,p=h.lineWidthMinPixels,v=h.lineWidthMaxPixels,y=h.lineJointRounded,m=h.lineMiterLimit,I=h.lineDashJustified,b=this.props,E=b.getFillColor,C=b.getLineColor,B=b.getLineWidth,w=b.getLineDashArray,Q=b.getElevation,k=b.getPolygon,_=b.updateTriggers,x=b.material,S=this.state,O=S.paths,D=S.pathsDiff,R=this.getSubLayerClass("fill",l.a),j=this.getSubLayerClass("stroke",f.a),M=this.shouldRenderSubLayer("fill",O)&&new R({_dataDiff:n,extruded:a,elevationScale:u,filled:i,wireframe:o,_normalize:s,getElevation:Q,getFillColor:E,getLineColor:C,material:x,transitions:A},this.getSubLayerProps({id:"fill",updateTriggers:{getPolygon:_.getPolygon,getElevation:_.getElevation,getFillColor:_.getFillColor,getLineColor:_.getLineColor}}),{data:t,positionFormat:c,getPolygon:k});return[!a&&M,!a&&r&&this.shouldRenderSubLayer("stroke",O)&&new j({_dataDiff:D&&function(){return D},widthUnits:g,widthScale:d,widthMinPixels:p,widthMaxPixels:v,rounded:y,miterLimit:m,dashJustified:I,_pathType:"loop",transitions:A&&{getWidth:A.getLineWidth,getColor:A.getLineColor,getPath:A.getPolygon},getColor:this.getSubLayerAccessor(C),getWidth:this.getSubLayerAccessor(B),getDashArray:this.getSubLayerAccessor(w)},this.getSubLayerProps({id:"stroke",updateTriggers:{getWidth:_.getLineWidth,getColor:_.getLineColor,getDashArray:_.getLineDashArray}}),{data:O,positionFormat:c,getPath:function(e){return e.path}}),a&&M]}}]),n}(c.a);m.layerName="PolygonLayer",m.defaultProps=y},function(e,t,n){var r=n(522),i=n(711),a=n(349);e.exports=function(e){return a(e)?r(e):i(e)}},function(e,t,n){var r;!function(i){var a=/^\s+/,o=/\s+$/,s=0,u=i.round,A=i.min,c=i.max,l=i.random;function f(e,t){if(t=t||{},(e=e||"")instanceof f)return e;if(!(this instanceof f))return new f(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,s=null,u=null,l=!1,f=!1;"string"==typeof e&&(e=function(e){e=e.replace(a,"").replace(o,"").toLowerCase();var t,n=!1;if(S[e])e=S[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=P.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=P.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=P.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=P.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=P.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=P.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=P.hex8.exec(e))return{r:M(t[1]),g:M(t[2]),b:M(t[3]),a:L(t[4]),format:n?"name":"hex8"};if(t=P.hex6.exec(e))return{r:M(t[1]),g:M(t[2]),b:M(t[3]),format:n?"name":"hex"};if(t=P.hex4.exec(e))return{r:M(t[1]+""+t[1]),g:M(t[2]+""+t[2]),b:M(t[3]+""+t[3]),a:L(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=P.hex3.exec(e))return{r:M(t[1]+""+t[1]),g:M(t[2]+""+t[2]),b:M(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(h=e.r,g=e.g,d=e.b,t={r:255*R(h,255),g:255*R(g,255),b:255*R(d,255)},l=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(r=F(e.s),s=F(e.v),t=function(e,t,n){e=6*R(e,360),t=R(t,100),n=R(n,100);var r=i.floor(e),a=e-r,o=n*(1-t),s=n*(1-a*t),u=n*(1-(1-a)*t),A=r%6;return{r:255*[n,s,o,o,u,n][A],g:255*[u,n,n,s,o,o][A],b:255*[o,o,u,n,n,s][A]}}(e.h,r,s),l=!0,f="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(r=F(e.s),u=F(e.l),t=function(e,t,n){var r,i,a;function o(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=R(e,360),t=R(t,100),n=R(n,100),0===t)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,u=2*n-s;r=o(u,s,e+1/3),i=o(u,s,e),a=o(u,s,e-1/3)}return{r:255*r,g:255*i,b:255*a}}(e.h,r,u),l=!0,f="hsl"),e.hasOwnProperty("a")&&(n=e.a));var h,g,d;return n=D(n),{ok:l,format:e.format||f,r:A(255,c(t.r,0)),g:A(255,c(t.g,0)),b:A(255,c(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=u(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=u(this._r)),this._g<1&&(this._g=u(this._g)),this._b<1&&(this._b=u(this._b)),this._ok=n.ok,this._tc_id=s++}function h(e,t,n){e=R(e,255),t=R(t,255),n=R(n,255);var r,i,a=c(e,t,n),o=A(e,t,n),s=(a+o)/2;if(a==o)r=i=0;else{var u=a-o;switch(i=s>.5?u/(2-a-o):u/(a+o),a){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4}r/=6}return{h:r,s:i,l:s}}function g(e,t,n){e=R(e,255),t=R(t,255),n=R(n,255);var r,i,a=c(e,t,n),o=A(e,t,n),s=a,u=a-o;if(i=0===a?0:u/a,a==o)r=0;else{switch(a){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4}r/=6}return{h:r,s:i,v:s}}function d(e,t,n,r){var i=[N(u(e).toString(16)),N(u(t).toString(16)),N(u(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function p(e,t,n,r){return[N(T(r)),N(u(e).toString(16)),N(u(t).toString(16)),N(u(n).toString(16))].join("")}function v(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.s-=t/100,n.s=j(n.s),f(n)}function y(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.s+=t/100,n.s=j(n.s),f(n)}function m(e){return f(e).desaturate(100)}function I(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.l+=t/100,n.l=j(n.l),f(n)}function b(e,t){t=0===t?0:t||10;var n=f(e).toRgb();return n.r=c(0,A(255,n.r-u(-t/100*255))),n.g=c(0,A(255,n.g-u(-t/100*255))),n.b=c(0,A(255,n.b-u(-t/100*255))),f(n)}function E(e,t){t=0===t?0:t||10;var n=f(e).toHsl();return n.l-=t/100,n.l=j(n.l),f(n)}function C(e,t){var n=f(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,f(n)}function B(e){var t=f(e).toHsl();return t.h=(t.h+180)%360,f(t)}function w(e){var t=f(e).toHsl(),n=t.h;return[f(e),f({h:(n+120)%360,s:t.s,l:t.l}),f({h:(n+240)%360,s:t.s,l:t.l})]}function Q(e){var t=f(e).toHsl(),n=t.h;return[f(e),f({h:(n+90)%360,s:t.s,l:t.l}),f({h:(n+180)%360,s:t.s,l:t.l}),f({h:(n+270)%360,s:t.s,l:t.l})]}function k(e){var t=f(e).toHsl(),n=t.h;return[f(e),f({h:(n+72)%360,s:t.s,l:t.l}),f({h:(n+216)%360,s:t.s,l:t.l})]}function _(e,t,n){t=t||6,n=n||30;var r=f(e).toHsl(),i=360/n,a=[f(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(f(r));return a}function x(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(f({h:r,s:i,v:a})),a=(a+s)%1;return o}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:i.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=D(e),this._roundA=u(100*this._a)/100,this},toHsv:function(){var e=g(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=g(this._r,this._g,this._b),t=u(360*e.h),n=u(100*e.s),r=u(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=h(this._r,this._g,this._b),t=u(360*e.h),n=u(100*e.s),r=u(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return d(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var a=[N(u(e).toString(16)),N(u(t).toString(16)),N(u(n).toString(16)),N(T(r))];if(i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:u(this._r),g:u(this._g),b:u(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+u(this._r)+", "+u(this._g)+", "+u(this._b)+")":"rgba("+u(this._r)+", "+u(this._g)+", "+u(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:u(100*R(this._r,255))+"%",g:u(100*R(this._g,255))+"%",b:u(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+u(100*R(this._r,255))+"%, "+u(100*R(this._g,255))+"%, "+u(100*R(this._b,255))+"%)":"rgba("+u(100*R(this._r,255))+"%, "+u(100*R(this._g,255))+"%, "+u(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(O[d(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+p(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=f(e);n="#"+p(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(I,arguments)},brighten:function(){return this._applyModification(b,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(C,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(_,arguments)},complement:function(){return this._applyCombination(B,arguments)},monochromatic:function(){return this._applyCombination(x,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(Q,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:F(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:l(),g:l(),b:l()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),i=f(t).toRgb(),a=n/100;return f({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(i.max(n.getLuminance(),r.getLuminance())+.05)/(i.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,i,a=f.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},f.mostReadable=function(e,t,n){var r,i,a,o,s=null,u=0;i=(n=n||{}).includeFallbackColors,a=n.level,o=n.size;for(var A=0;A<t.length;A++)(r=f.readability(e,t[A]))>u&&(u=r,s=f(t[A]));return f.isReadable(e,s,{level:a,size:o})||!i?s:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var S=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},O=f.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(S);function D(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function R(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!=e.indexOf("%")}(e);return e=A(t,c(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),i.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function j(e){return A(1,c(0,e))}function M(e){return parseInt(e,16)}function N(e){return 1==e.length?"0"+e:""+e}function F(e){return e<=1&&(e=100*e+"%"),e}function T(e){return i.round(255*parseFloat(e)).toString(16)}function L(e){return M(e)/255}var P=function(){var e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",t="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function U(e){return!!P.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";var r=n(18),i=n(531),a=n(196);t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(i.a)(e,Object(r.a)({defaultTheme:a.a},t))}},,,function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(70))},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){e.exports=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){"use strict";(function(e){var r=n(38),i=n(404);n.d(t,"b",(function(){return i.a}));var a=n(285);n.d(t,"c",(function(){return a.a}));var o=n(451);n.d(t,"a",(function(){return o.a})),n.d(t,"f",(function(){return r.d})),n.d(t,"e",(function(){return r.a})),n.d(t,"g",(function(){return r.g}));var s=n(405);n.d(t,"d",(function(){return s.a}));var u={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof e&&e};(u.global||u.self||u.window).mathgl={config:r.b}}).call(this,n(70))},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(3),i=n(2),a=n(6),o=n(7),s=n(4),u=n(304),A=n(38),c=n(64),l=n(32),f=n(169);function h(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var g=function(e){Object(a.a)(n,e);var t=h(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(r.a)(this,n),e=t.call(this,2),Object(A.f)(i)&&1===arguments.length?e.copy(i):(A.b.debug&&(Object(c.a)(i),Object(c.a)(a)),e[0]=i,e[1]=a),e}return Object(i.a)(n,[{key:"set",value:function(e,t){return this[0]=e,this[1]=t,this.check()}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this.check()}},{key:"fromObject",value:function(e){return A.b.debug&&(Object(c.a)(e.x),Object(c.a)(e.y)),this[0]=e.x,this[1]=e.y,this.check()}},{key:"toObject",value:function(e){return e.x=this[0],e.y=this[1],e}},{key:"horizontalAngle",value:function(){return Math.atan2(this.y,this.x)}},{key:"verticalAngle",value:function(){return Math.atan2(this.x,this.y)}},{key:"transform",value:function(e){return this.transformAsPoint(e)}},{key:"transformAsPoint",value:function(e){return l.j(this,this,e),this.check()}},{key:"transformAsVector",value:function(e){return Object(f.a)(this,this,e),this.check()}},{key:"transformByMatrix3",value:function(e){return l.i(this,this,e),this.check()}},{key:"transformByMatrix2x3",value:function(e){return l.h(this,this,e),this.check()}},{key:"transformByMatrix2",value:function(e){return l.g(this,this,e),this.check()}},{key:"ELEMENTS",get:function(){return 2}}]),n}(u.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r=n(16),i=n(3),a=n(2),o=n(38),s=n(285),u=n(17),A=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.phi,r=void 0===n?0:n,a=t.theta,o=void 0===a?0:a,s=t.radius,u=void 0===s?1:s,A=t.bearing,c=void 0===A?void 0:A,l=t.pitch,f=void 0===l?void 0:l,h=t.altitude,g=void 0===h?void 0:h,d=t.radiusScale,p=void 0===d?6371e3:d;Object(i.a)(this,e),this.phi=r,this.theta=o,this.radius=u||g||1,this.radiusScale=p||1,void 0!==c&&(this.bearing=c),void 0!==f&&(this.pitch=f),this.check()}return Object(a.a)(e,[{key:"toString",value:function(){return this.formatString(o.b)}},{key:"formatString",value:function(e){var t=e.printTypes,n=void 0!==t&&t,r=o.e;return"".concat(n?"Spherical":"","[rho:").concat(r(this.radius),",theta:").concat(r(this.theta),",phi:").concat(r(this.phi),"]")}},{key:"equals",value:function(e){return Object(o.d)(this.radius,e.radius)&&Object(o.d)(this.theta,e.theta)&&Object(o.d)(this.phi,e.phi)}},{key:"exactEquals",value:function(e){return this.radius===e.radius&&this.theta===e.theta&&this.phi===e.phi}},{key:"set",value:function(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this.check()}},{key:"clone",value:function(){return(new e).copy(this)}},{key:"copy",value:function(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this.check()}},{key:"fromLngLatZ",value:function(e){var t=Object(r.a)(e,3),n=t[0],i=t[1],a=t[2];this.radius=1+a/this.radiusScale,this.phi=Object(o.h)(i),this.theta=Object(o.h)(n)}},{key:"fromVector3",value:function(e){return this.radius=u.g(e),this.radius>0&&(this.theta=Math.atan2(e[0],e[1]),this.phi=Math.acos(Object(o.a)(e[2]/this.radius,-1,1))),this.check()}},{key:"toVector3",value:function(){return new s.a(0,0,this.radius).rotateX({radians:this.theta}).rotateZ({radians:this.phi})}},{key:"makeSafe",value:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}},{key:"check",value:function(){if(!Number.isFinite(this.phi)||!Number.isFinite(this.theta)||!(this.radius>0))throw new Error("SphericalCoordinates: some fields set to invalid numbers");return this}},{key:"bearing",get:function(){return 180-Object(o.c)(this.phi)},set:function(e){this.phi=Math.PI-Object(o.h)(e)}},{key:"pitch",get:function(){return Object(o.c)(this.theta)},set:function(e){this.theta=Object(o.h)(e)}},{key:"longitude",get:function(){return Object(o.c)(this.phi)}},{key:"latitude",get:function(){return Object(o.c)(this.theta)}},{key:"lng",get:function(){return Object(o.c)(this.phi)}},{key:"lat",get:function(){return Object(o.c)(this.theta)}},{key:"z",get:function(){return(this.radius-1)*this.radiusScale}}]),e}()},function(e,t,n){"use strict";(function(e){var t=n(461),r=n(43),i=n(234);function a(e,t){var n=t.extension,a=t.target,o=t.target2,s=i.b[n];Object(r.a)(s);for(var u=s.meta,A=(void 0===u?{}:u).suffix,c=void 0===A?"":A,l=e.getExtension(n),f=function(){var t=g[h],n="".concat(t).concat(c),r=null;"meta"===t||"function"===typeof e[t]||(l&&"function"===typeof l[n]?r=function(){return l[n].apply(l,arguments)}:"function"===typeof s[t]&&(r=s[t].bind(a))),r&&(a[t]=r,o[t]=r)},h=0,g=Object.keys(s);h<g.length;h++)f()}("undefined"!==typeof e?e:window).polyfillContext=function(e){return e.luma=e.luma||{},e.luma.polyfilled||(Object(t.a)(e),function(e){e.luma.extensions={};var t=e.getSupportedExtensions()||[],n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;e.luma[s]=e.getExtension(s)}}catch(u){r=!0,i=u}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}(e),function(e,t){var n=!0,r=!1,i=void 0;try{for(var o,s=Object.getOwnPropertyNames(t)[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var u=o.value;"overrides"!==u&&a(e,{extension:u,target:e.luma,target2:e})}}catch(A){r=!0,i=A}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}}(e,i.b),function(e,t){var n=t.target,r=t.target2;Object.keys(i.a).forEach((function(t){if("function"===typeof i.a[t]){var a=e[t]?e[t].bind(e):function(){},o=i.a[t].bind(null,e,a);n[t]=o,r[t]=o}}))}(e,{target:e.luma,target2:e}),e.luma.polyfilled=!0),e}}).call(this,n(70))},function(e,t,n){"use strict";(function(e,r){var i=n(108);Object.defineProperty(t,"__esModule",{value:!0}),t.console=t.process=t.document=t.global=t.window=t.self=void 0;var a=i(n(206)),o={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof e&&e,document:"undefined"!==typeof document&&document,process:"object"===("undefined"===typeof r?"undefined":(0,a.default)(r))&&r},s=o.self||o.window||o.global;t.self=s;var u=o.window||o.self||o.global;t.window=u;var A=o.global||o.self||o.window;t.global=A;var c=o.document||{};t.document=c;var l=o.process||{};t.process=l;var f=console;t.console=f}).call(this,n(70),n(86))},function(e,t,n){"use strict";(function(e){var r=n(108);Object.defineProperty(t,"__esModule",{value:!0}),t.default=o,t.isBrowserMainThread=function(){return o()&&"undefined"!==typeof document};var i=r(n(206)),a=r(n(343));function o(){return!("object"===("undefined"===typeof e?"undefined":(0,i.default)(e))&&"[object process]"===String(e)&&!e.browser)||(0,a.default)()}}).call(this,n(86))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(98);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"2.3.0";Object(r.a)(e,"no loader provided");var n=e.version;t&&n&&(t=a(t),n=a(n))}function a(e){var t=e.split(".").map(Number);return{major:t[0],minor:t[1]}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r=n(12),i=n.n(r),a=n(26),o=n(3),s=n(2),u=n(288),A=function(){function e(t){var n=t.maxConcurrency,r=void 0===n?5:n,i=t.onMessage,a=void 0===i?null:i,s=t.onDebug,u=void 0===s?function(){}:s;Object(o.a)(this,e),this.maxConcurrency=r,this.onMessage=a,this.onDebug=u,this.workerPools=new Map}return Object(s.a)(e,null,[{key:"isSupported",value:function(){return"undefined"!==typeof Worker}}]),Object(s.a)(e,[{key:"setProps",value:function(e){"maxConcurrency"in e&&(this.maxConcurrency=e.maxConcurrency),"onDebug"in e&&(this.onDebug=e.onDebug)}},{key:"destroy",value:function(){this.workerPools.forEach((function(e){return e.destroy()}))}},{key:"process",value:function(){var e=Object(a.a)(i.a.mark((function e(t,n,r){var a;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this._getWorkerPool(t,n),e.abrupt("return",a.process(r));case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_getWorkerPool",value:function(e,t){var n=this.workerPools.get(t);return n||(n=new u.a({source:e,name:t,onMessage:c.bind(null,this.onMessage),maxConcurrency:this.maxConcurrency,onDebug:this.onDebug}),this.workerPools.set(t,n)),n}}]),e}();function c(e,t){var n=t.worker,r=t.data,i=t.resolve,a=t.reject;if(e)e({worker:n,data:r,resolve:i,reject:a});else switch(r.type){case"done":i(r.result);break;case"error":a(r.message)}}},function(e,t,n){"use strict";var r=n(735);t.a=Object.assign({inject:{"vs:DECKGL_FILTER_COLOR":"\n    picking_setPickingColor(geometry.pickingColor);\n    // for picking depth values\n    picking_setPickingAttribute(geometry.position.z);\n    ","fs:DECKGL_FILTER_COLOR":{order:99,injection:"\n    // use highlight color if this fragment belongs to the selected object.\n    color = picking_filterHighlightColor(color);\n\n    // use picking color if rendering to picking FBO.\n    color = picking_filterPickingColor(color);\n      "}}},r.a)},function(e,t,n){"use strict";var r=n(187);t.a={name:"project32",dependencies:[r.a],vs:"\nvec4 project_position_to_clipspace(\n  vec3 position, vec3 position64Low, vec3 offset, out vec4 commonPosition\n) {\n  vec3 projectedPosition = project_position(position, position64Low);\n  if (project_uProjectionMode == PROJECTION_MODE_GLOBE) {\n    // offset is specified as ENU\n    // when in globe projection, rotate offset so that the ground alighs with the surface of the globe\n    mat3 rotation = project_get_orientation_matrix(projectedPosition);\n    offset = rotation * offset;\n  }\n  commonPosition = vec4(projectedPosition + offset, 1.0);\n  return project_common_position_to_clipspace(commonPosition);\n}\n\nvec4 project_position_to_clipspace(\n  vec3 position, vec3 position64Low, vec3 offset\n) {\n  vec4 commonPosition;\n  return project_position_to_clipspace(position, position64Low, offset, commonPosition);\n}\n"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(2),i=n(3),a=n(6),o=n(7),s=n(4),u=n(120),A=n(90),c=n(35),l=n(292);function f(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var h=(new c.a).lookAt({eye:[0,0,1]});function g(e){var t=e.width,n=e.height,r=e.near,i=e.far;return t=t||1,n=n||1,(new c.a).ortho({left:-t/2,right:t/2,bottom:n/2,top:-n/2,near:r,far:i})}var d=function(e){Object(a.a)(t,e);f(t);function t(e){var n=e.id,r=e.x,a=e.y,s=e.width,u=e.height,c=e.near,l=void 0===c?.1:c,f=e.far,d=void 0===f?1e3:f,p=e.zoom,v=void 0===p?0:p,y=e.target,m=void 0===y?[0,0,0]:y;Object(i.a)(this,t);var I=Math.pow(2,v);return Object(o.a)(void 0,new A.a({id:n,x:r,y:a,width:s,height:u,position:m,viewMatrix:h.clone().scale(I),projectionMatrix:g({width:s,height:u,near:l,far:d}),zoom:v}))}return t}(A.a),p=function(e){Object(a.a)(n,e);var t=f(n);function n(e){return Object(i.a)(this,n),t.call(this,Object.assign({},e,{type:d}))}return Object(r.a)(n,[{key:"controller",get:function(){return this._getControllerProps({type:l.a})}}]),n}(u.a);p.displayName="OrthographicView"},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),i=n(2),a=n(141),o=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r.a)(this,e),this.opts=t}return Object(i.a)(e,[{key:"equals",value:function(e){return this===e||this.constructor===e.constructor&&Object(a.a)(this.opts,e.opts)}},{key:"getShaders",value:function(e){return null}},{key:"getSubLayerProps",value:function(e){var t=e.constructor.defaultProps,n=void 0===t?{}:t,r={updateTriggers:{}};for(var i in n)if(i in this.props){var a=n[i],o=this.props[i];r[i]=o,a&&"accessor"===a.type&&(r.updateTriggers[i]=this.props.updateTriggers[i],"function"===typeof o&&(r[i]=this.getSubLayerAccessor(o,!0)))}return r}},{key:"initializeState",value:function(e,t){}},{key:"updateState",value:function(e,t){}},{key:"draw",value:function(e,t){}},{key:"finalizeState",value:function(e){}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(3),i=n(2),a=n(101),o=n(128),s=n(57),u=n(82);function A(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r.a)(this,e);var n=t.attributes,i=void 0===n?{}:n;this.typedArrayManager=o.a,this.indexStarts=null,this.vertexStarts=null,this.vertexCount=0,this.instanceCount=0,this.attributes={},this._attributeDefs=i,this.opts=t,this.updateGeometry(t),Object.seal(this)}return Object(i.a)(e,[{key:"updateGeometry",value:function(e){Object.assign(this.opts,e);var t=this.opts,n=t.data,r=t.buffers,i=void 0===r?{}:r,a=t.getGeometry,o=t.geometryBuffer,u=t.positionFormat,c=t.dataChanged,l=t.normalize,f=void 0===l||l;if(this.data=n,this.getGeometry=a,this.positionSize=o&&o.size||("XY"===u?2:3),this.buffers=i,this.normalize=f,o&&(Object(s.a)(n.startIndices,"binary data missing startIndices"),this.getGeometry=this.getGeometryFromBuffer(o),f||(i.positions=o)),this.geometryBuffer=i.positions,Array.isArray(c)){var h,g=A(c);try{for(g.s();!(h=g.n()).done;){var d=h.value;this._rebuildGeometry(d)}}catch(p){g.e(p)}finally{g.f()}}else this._rebuildGeometry()}},{key:"updatePartialGeometry",value:function(e){var t=e.startRow,n=e.endRow;this._rebuildGeometry({startRow:t,endRow:n})}},{key:"normalizeGeometry",value:function(e){return e}},{key:"updateGeometryAttributes",value:function(e,t,n){throw new Error("Not implemented")}},{key:"getGeometrySize",value:function(e){throw new Error("Not implemented")}},{key:"getGeometryFromBuffer",value:function(e){var t=e.value||e;return Object(s.a)(ArrayBuffer.isView(t),"cannot read geometries"),Object(a.b)(t,{size:this.positionSize,offset:e.offset,stride:e.stride,startIndices:this.data.startIndices})}},{key:"_allocate",value:function(e,t){var n=this.attributes,r=this.buffers,i=this._attributeDefs,a=this.typedArrayManager;for(var o in i)if(o in r)a.release(n[o]),n[o]=null;else{var s=i[o];s.copy=t,n[o]=a.allocate(n[o],e,s)}}},{key:"_forEachGeometry",value:function(e,t,n){var r,i=this.data,o=this.getGeometry,s=Object(a.a)(i,t,n),u=s.iterable,c=s.objectInfo,l=A(u);try{for(l.s();!(r=l.n()).done;){var f=r.value;c.index++,e(o(f,c),c.index)}}catch(h){l.e(h)}finally{l.f()}}},{key:"_rebuildGeometry",value:function(e){var t=this;if(this.data&&this.getGeometry){var n=this.indexStarts,r=this.vertexStarts,i=this.instanceCount,a=this.data,o=this.geometryBuffer,s=e||{},A=s.startRow,c=void 0===A?0:A,l=s.endRow,f=void 0===l?1/0:l,h={};if(e||(n=[0],r=[0]),this.normalize||!o)this._forEachGeometry((function(e,n){e=t.normalizeGeometry(e),h[n]=e,r[n+1]=r[n]+t.getGeometrySize(e)}),c,f),i=r[r.length-1];else if(o.buffer instanceof u.a){var g=o.stride||4*this.positionSize;r=a.startIndices,i=r[a.length]||o.buffer.byteLength/g}else{var d=o.value||o,p=o.stride/d.BYTES_PER_ELEMENT||this.positionSize;r=a.startIndices,i=r[a.length]||d.length/p}this._allocate(i,Boolean(e)),this.indexStarts=n,this.vertexStarts=r,this.instanceCount=i;var v={};this._forEachGeometry((function(e,a){e=h[a]||e,v.vertexStart=r[a],v.indexStart=n[a];var o=a<r.length-1?r[a+1]:i;v.geometrySize=o-r[a],v.geometryIndex=a,t.updateGeometryAttributes(e,v)}),c,f),this.vertexCount=n[n.length-1]}}}]),e}()},function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,u=(1<<s)-1,A=u>>1,c=-7,l=n?i-1:0,f=n?-1:1,h=e[t+l];for(l+=f,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=256*a+e[t+l],l+=f,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+l],l+=f,c-=8);if(0===a)a=1-A;else{if(a===u)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),a-=A}return(h?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,u,A=8*a-i-1,c=(1<<A)-1,l=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,g=r?1:-1,d=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=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+l>=1?f/u:f*Math.pow(2,1-l))*u>=2&&(o++,u/=2),o+l>=c?(s=0,o=c):o+l>=1?(s=(t*u-1)*Math.pow(2,i),o+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=255&s,h+=g,s/=256,i-=8);for(o=o<<i|s,A+=i;A>0;e[n+h]=255&o,h+=g,o/=256,A-=8);e[n+h-g]|=128*d}},function(e,t,n){"use strict";(function(e){var r=n(56),i=n(446);n.d(t,"a",(function(){return i.a}));var a={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof e&&e};(a.global||a.self||a.window).mathgl={config:r.a}}).call(this,n(70))},function(e,t,n){"use strict";(function(e){var r=n(59),i=n(447);n.d(t,"a",(function(){return i.a}));var a={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof e&&e};(a.global||a.self||a.window).mathgl={config:r.a}}).call(this,n(70))},function(e,t,n){"use strict";(function(e){var r=n(194),i=n(420);n.d(t,"d",(function(){return i.a}));var a=n(185);n.d(t,"e",(function(){return a.a}));var o=n(421);n.d(t,"f",(function(){return o.a}));var s=n(422);n.d(t,"a",(function(){return s.a}));var u=n(226);n.d(t,"b",(function(){return u.a}));var A=n(247);n.d(t,"c",(function(){return A.a}));var c=n(34);n.d(t,"t",(function(){return c.f})),n.d(t,"u",(function(){return c.g})),n.d(t,"z",(function(){return c.l})),n.d(t,"A",(function(){return c.m})),n.d(t,"s",(function(){return c.e})),n.d(t,"x",(function(){return c.j})),n.d(t,"y",(function(){return c.k})),n.d(t,"G",(function(){return c.s})),n.d(t,"F",(function(){return c.r})),n.d(t,"C",(function(){return c.o})),n.d(t,"w",(function(){return c.i})),n.d(t,"D",(function(){return c.p})),n.d(t,"v",(function(){return c.h})),n.d(t,"E",(function(){return c.q})),n.d(t,"n",(function(){return c.b})),n.d(t,"m",(function(){return c.a})),n.d(t,"p",(function(){return c.c})),n.d(t,"r",(function(){return c.d})),n.d(t,"B",(function(){return c.n})),n.d(t,"l",(function(){return c.t}));var l=n(36);n.d(t,"q",(function(){return l.a}));var f=n(423);n.d(t,"h",(function(){return f.a}));var h=n(424);n.d(t,"k",(function(){return h.a}));var g=n(425);n.d(t,"j",(function(){return g.a}));var d=n(227);n.d(t,"g",(function(){return d.a}));var p=n(426);n.d(t,"i",(function(){return p.a}));var v=n(143);n.d(t,"o",(function(){return v.a}));var y={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof e&&e};(y.global||y.self||y.window).mathgl={config:r.config}}).call(this,n(70))},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(3),i=n(2),a=n(7),o=n(4),s=n(6),u=n(225),A=n(34),c=n(36),l=n(32),f=n(112),h=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(r.a)(this,t),e=Object(a.a)(this,Object(o.a)(t).call(this,2)),Object(A.m)(n)&&1===arguments.length?e.copy(n):(A.f.debug&&(Object(c.a)(n),Object(c.a)(i)),e[0]=n,e[1]=i),e}return Object(s.a)(t,e),Object(i.a)(t,[{key:"set",value:function(e,t,n){return this[0]=e,this[1]=t,this.check()}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this.check()}},{key:"fromObject",value:function(e){return A.f.debug&&(Object(c.a)(e.x),Object(c.a)(e.y)),this[0]=e.x,this[1]=e.y,this.check()}},{key:"toObject",value:function(e){return e.x=this[0],e.y=this[1],e}},{key:"horizontalAngle",value:function(){return Math.atan2(this.y,this.x)}},{key:"verticalAngle",value:function(){return Math.atan2(this.x,this.y)}},{key:"transform",value:function(e){return this.transformAsPoint(e)}},{key:"transformAsPoint",value:function(e){return l.j(this,this,e),this.check()}},{key:"transformAsVector",value:function(e){return Object(f.a)(this,this,e),this.check()}},{key:"transformByMatrix3",value:function(e){return l.i(this,this,e),this.check()}},{key:"transformByMatrix2x3",value:function(e){return l.h(this,this,e),this.check()}},{key:"transformByMatrix2",value:function(e){return l.g(this,this,e),this.check()}},{key:"ELEMENTS",get:function(){return 2}}]),t}(u.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(3),i=n(2),a=n(7),o=n(4),s=n(6),u=n(225),A=n(34),c=n(36),l=n(17),f=n(112),h=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return Object(r.a)(this,t),e=Object(a.a)(this,Object(o.a)(t).call(this,-0,-0,-0,-0)),Object(A.m)(n)&&1===arguments.length?e.copy(n):(A.f.debug&&(Object(c.a)(n),Object(c.a)(i),Object(c.a)(s),Object(c.a)(u)),e[0]=n,e[1]=i,e[2]=s,e[3]=u),e}return Object(s.a)(t,e),Object(i.a)(t,[{key:"set",value:function(e,t,n,r){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this.check()}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this.check()}},{key:"fromObject",value:function(e){return A.f.debug&&(Object(c.a)(e.x),Object(c.a)(e.y),Object(c.a)(e.z),Object(c.a)(e.w)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this[3]=e.w,this}},{key:"toObject",value:function(e){return e.x=this[0],e.y=this[1],e.z=this[2],e.w=this[3],e}},{key:"transform",value:function(e){return l.q(this,this,e),this.check()}},{key:"transformByMatrix3",value:function(e){return Object(f.e)(this,this,e),this.check()}},{key:"transformByMatrix2",value:function(e){return Object(f.d)(this,this,e),this.check()}},{key:"transformByQuaternion",value:function(e){return l.r(this,this,e),this.check()}},{key:"applyMatrix4",value:function(e){return e.transform(this,this),this}},{key:"ELEMENTS",get:function(){return 4}},{key:"z",get:function(){return this[2]},set:function(e){return this[2]=Object(c.a)(e)}},{key:"w",get:function(){return this[3]},set:function(e){return this[3]=Object(c.a)(e)}}]),t}(u.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(3),i=n(7),a=n(4),o=n(2),s=n(6),u=n(308),A=n(36),c=n(112),l=n(45),f=n(32),h=n(17),g=Object.freeze([1,0,0,0,1,0,0,0,1]),d=Object.freeze([0,0,0,0,0,0,0,0,0]),p=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL1ROW0:3,COL1ROW1:4,COL1ROW2:5,COL2ROW0:6,COL2ROW1:7,COL2ROW2:8}),v={},y=function(e){function t(e){var n;return Object(r.a)(this,t),n=Object(i.a)(this,Object(a.a)(t).call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0)),1===arguments.length&&Array.isArray(e)?n.copy(e):n.identity(),n}return Object(s.a)(t,e),Object(o.a)(t,[{key:"ELEMENTS",get:function(){return 9}},{key:"RANK",get:function(){return 3}},{key:"INDICES",get:function(){return p}}],[{key:"IDENTITY",get:function(){return v.IDENTITY=v.IDENTITY||Object.freeze(new t(g)),v.IDENTITY}},{key:"ZERO",get:function(){return v.ZERO=v.ZERO||Object.freeze(new t(d)),v.ZERO}}]),Object(o.a)(t,[{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this.check()}},{key:"set",value:function(e,t,n,r,i,a,o,s,u){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this[4]=i,this[5]=a,this[6]=o,this[7]=s,this[8]=u,this.check()}},{key:"setRowMajor",value:function(e,t,n,r,i,a,o,s,u){return this[0]=e,this[1]=r,this[2]=o,this[3]=t,this[4]=i,this[5]=s,this[6]=n,this[7]=a,this[8]=u,this.check()}},{key:"determinant",value:function(){return l.b(this)}},{key:"identity",value:function(){return this.copy(g)}},{key:"fromQuaternion",value:function(e){return l.c(this,e),this.check()}},{key:"transpose",value:function(){return l.i(this,this),this.check()}},{key:"invert",value:function(){return l.d(this,this),this.check()}},{key:"multiplyLeft",value:function(e){return l.e(this,e,this),this.check()}},{key:"multiplyRight",value:function(e){return l.e(this,this,e),this.check()}},{key:"rotate",value:function(e){return l.f(this,this,e),this.check()}},{key:"scale",value:function(e){return Array.isArray(e)?l.g(this,this,e):l.g(this,this,[e,e,e]),this.check()}},{key:"translate",value:function(e){return l.h(this,this,e),this.check()}},{key:"transform",value:function(e,t){switch(e.length){case 2:t=f.i(t||[-0,-0],e,this);break;case 3:t=h.p(t||[-0,-0,-0],e,this);break;case 4:t=Object(c.e)(t||[-0,-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return Object(A.b)(t,e.length),t}},{key:"transformVector",value:function(e,t){return Object(A.c)("Matrix3.transformVector"),this.transform(e,t)}},{key:"transformVector2",value:function(e,t){return Object(A.c)("Matrix3.transformVector"),this.transform(e,t)}},{key:"transformVector3",value:function(e,t){return Object(A.c)("Matrix3.transformVector"),this.transform(e,t)}}]),t}(u.a)},function(e,t,n){"use strict";t.a={EPSILON1:.1,EPSILON2:.01,EPSILON3:.001,EPSILON4:1e-4,EPSILON5:1e-5,EPSILON6:1e-6,EPSILON7:1e-7,EPSILON8:1e-8,EPSILON9:1e-9,EPSILON10:1e-10,EPSILON11:1e-11,EPSILON12:1e-12,EPSILON13:1e-13,EPSILON14:1e-14,EPSILON15:1e-15,EPSILON16:1e-16,EPSILON17:1e-17,EPSILON18:1e-18,EPSILON19:1e-19,EPSILON20:1e-20,PI_OVER_TWO:Math.PI/2,PI_OVER_FOUR:Math.PI/4,PI_OVER_SIX:Math.PI/6,TWO_PI:2*Math.PI}},function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r=n(16),i=n(3),a=n(2),o=n(34),s=n(185),u=n(17),A=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.phi,r=t.theta,a=t.radius,o=t.bearing,s=t.pitch,u=(t.altitude,t.radiusScale),A=void 0===u?6371e3:u;Object(i.a)(this,e),0===arguments.length?(this.phi=0,this.theta=0,this.radius=1):Number.isFinite(n)||Number.isFinite(r)?(this.phi=n||0,this.theta=r||0):(Number.isFinite(o)||Number.isFinite(s))&&(this.bearing=o||0,this.pitch=s||0),this.radius=a||1,this.radiusScale=A||1,this.check()}return Object(a.a)(e,[{key:"toString",value:function(){return this.formatString(o.f)}},{key:"formatString",value:function(e){var t=e.printTypes,n=(e.printDegrees,o.l);return"".concat(t?"Spherical":"","[rho:").concat(n(this.radius),",theta:").concat(n(this.theta),",phi:").concat(n(this.phi),"]")}},{key:"equals",value:function(e){return Object(o.j)(this.radius,e.radius)&&Object(o.j)(this.theta,e.theta)&&Object(o.j)(this.phi,e.phi)}},{key:"exactEquals",value:function(e){return this.radius===e.radius&&this.theta===e.theta&&this.phi===e.phi}},{key:"set",value:function(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this.check()}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this.check()}},{key:"fromLngLatZ",value:function(e){var t=Object(r.a)(e,3),n=t[0],i=t[1],a=t[2];this.radius=1+a/this.radiusScale,this.phi=Object(o.o)(i),this.theta=Object(o.o)(n)}},{key:"fromVector3",value:function(e){return this.radius=u.g(e),this.radius>0&&(this.theta=Math.atan2(e[0],e[1]),this.phi=Math.acos(Object(o.d)(e[2]/this.radius,-1,1))),this.check()}},{key:"toVector3",value:function(){return new s.a(0,0,this.radius).rotateX({radians:this.theta}).rotateZ({radians:this.phi})}},{key:"makeSafe",value:function(){this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi))}},{key:"check",value:function(){if(!Number.isFinite(this.phi)||!Number.isFinite(this.theta)||!(this.radius>0))throw new Error("SphericalCoordinates: some fields set to invalid numbers");return this}},{key:"bearing",get:function(){return 180-Object(o.i)(this.phi)},set:function(e){this.phi=Math.PI-Object(o.o)(e)}},{key:"pitch",get:function(){return Object(o.i)(this.theta)},set:function(e){this.theta=Object(o.o)(e)}},{key:"longitude",get:function(){return Object(o.i)(this.phi)}},{key:"latitude",get:function(){return Object(o.i)(this.theta)}},{key:"lng",get:function(){return Object(o.i)(this.phi)}},{key:"lat",get:function(){return Object(o.i)(this.theta)}},{key:"z",get:function(){return(this.radius-1)*this.radiusScale}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(3),i=n(2),a=n(226),o=n(185),s=n(227),u=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.x,i=void 0===n?0:n,a=t.y,u=void 0===a?0:a,A=t.z,c=void 0===A?0:A,l=t.roll,f=void 0===l?0:l,h=t.pitch,g=void 0===h?0:h,d=t.yaw,p=void 0===d?0:d,v=t.position,y=t.orientation;Object(r.a)(this,e),Array.isArray(v)&&3===v.length?this.position=new o.a(v):this.position=new o.a(i,u,c),Array.isArray(y)&&4===y.length?this.orientation=new s.a(y,y[3]):this.orientation=new s.a(f,g,p,s.a.RollPitchYaw)}return Object(i.a)(e,[{key:"getPosition",value:function(){return this.position}},{key:"getOrientation",value:function(){return this.orientation}},{key:"equals",value:function(e){return!!e&&(this.position.equals(e.position)&&this.orientation.equals(e.orientation))}},{key:"exactEquals",value:function(e){return!!e&&(this.position.exactEquals(e.position)&&this.orientation.exactEquals(e.orientation))}},{key:"getTransformationMatrix",value:function(){var e=Math.sin(this.roll),t=Math.sin(this.pitch),n=Math.sin(this.yaw),r=Math.cos(this.roll),i=Math.cos(this.pitch),o=Math.cos(this.yaw);return(new a.a).setRowMajor(o*i,-n*r+o*t*e,n*e+o*t*r,this.x,n*i,o*r+n*t*e,-o*e+n*t*r,this.y,-t,i*e,i*r,this.z,0,0,0,1)}},{key:"getTransformationMatrixFromPose",value:function(e){return(new a.a).multiplyRight(this.getTransformationMatrix()).multiplyRight(e.getTransformationMatrix().invert())}},{key:"getTransformationMatrixToPose",value:function(e){return(new a.a).multiplyRight(e.getTransformationMatrix()).multiplyRight(this.getTransformationMatrix().invert())}},{key:"x",get:function(){return this.position.x},set:function(e){return this.position.x=e}},{key:"y",get:function(){return this.position.y},set:function(e){return this.position.y=e}},{key:"z",get:function(){return this.position.z},set:function(e){return this.position.z=e}},{key:"roll",get:function(){return this.orientation.roll},set:function(e){return this.orientation.roll=e}},{key:"pitch",get:function(){return this.orientation.pitch},set:function(e){return this.orientation.pitch=e}},{key:"yaw",get:function(){return this.orientation.yaw},set:function(e){return this.orientation.yaw=e}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),i=n(2),a=n(34),o=function(){function e(t){Object(r.a)(this,e),this.points=t,this.isClosed=Object(a.j)(this.points[this.points.length-1],this.points[0]),Object.freeze(this)}return Object(i.a)(e,[{key:"getSignedArea",value:function(){var e=0;return this.forEachSegment((function(t,n){e+=(t[0]+n[0])*(t[1]-n[1])})),e/2}},{key:"getArea",value:function(){return Math.abs(this.getSignedArea())}},{key:"getWindingDirection",value:function(){return Math.sign(this.getSignedArea())}},{key:"forEachSegment",value:function(e){for(var t=this.points.length,n=0;n<t-1;n++)e(this.points[n],this.points[n+1],n,n+1);this.isClosed||e(this.points[t-1],this.points[0],t-1,0)}}]),e}()},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return w}));var r=n(20),i=n(24),a=n(9),o=n.n(a),s=n(171),u=n.n(s),A=n(255),c=n(84),l=n(469),f=n(113),h=n(259),g=n(363),d=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},p=u()("threads:master:messages"),v=u()("threads:master:spawn"),y=u()("threads:master:thread-utils"),m="undefined"!==typeof e&&Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).THREADS_WORKER_INIT_TIMEOUT?Number.parseInt(Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).THREADS_WORKER_INIT_TIMEOUT,10):1e4;function I(e,t,n){return d(this,void 0,void 0,o.a.mark((function r(){var i,a,s;return o.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=new Promise((function(e,r){i=setTimeout((function(){return r(Error(n))}),t)})),r.next=3,Promise.race([e,a]);case 3:return s=r.sent,clearTimeout(i),r.abrupt("return",s);case 6:case"end":return r.stop()}}),r)})))}function b(e){return new Promise((function(t,n){e.addEventListener("message",(function r(i){var a;p("Message from worker before finishing initialization:",i.data),(a=i.data)&&"init"===a.type?(e.removeEventListener("message",r),t(i.data)):function(e){return e&&"uncaughtError"===e.type}(i.data)&&(e.removeEventListener("message",r),n(Object(c.a)(i.data.error)))}))}))}function E(e,t){return new A.a((function(n){var r=function(e){var t={type:h.a.message,data:e.data};n.next(t)},i=function(e){y("Unhandled promise rejection event in thread:",e);var t={type:h.a.internalError,error:Error(e.reason)};n.next(t)};e.addEventListener("message",r),e.addEventListener("unhandledrejection",i),t.then((function(){var t={type:h.a.termination};e.removeEventListener("message",r),e.removeEventListener("unhandledrejection",i),n.next(t),n.complete()}))}))}function C(e){var t=this,n=Object(l.a)(),r=Object(i.a)(n,2),a=r[0],s=r[1];return{terminate:function(){return d(t,void 0,void 0,o.a.mark((function t(){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return y("Terminating worker"),t.next=3,e.terminate();case 3:s();case 4:case"end":return t.stop()}}),t)})))},termination:a}}function B(e,t,n,i){var a,o=n.filter((function(e){return e.type===h.a.internalError})).map((function(e){return e.error}));return Object.assign(e,(a={},Object(r.a)(a,f.a,o),Object(r.a)(a,f.b,n),Object(r.a)(a,f.c,i),Object(r.a)(a,f.e,t),a))}function w(e,t){return d(this,void 0,void 0,o.a.mark((function n(){var r,i,a,s,u,A,c,l,f;return o.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return v("Initializing new thread"),n.next=3,I(b(e),t&&t.timeout?t.timeout:m,"Timeout: Did not receive an init message from worker after ".concat(m,"ms. Make sure the worker calls expose()."));case 3:if(r=n.sent,i=r.exposed,a=C(e),s=a.termination,u=a.terminate,A=E(e,s),"function"!==i.type){n.next=12;break}return c=Object(g.a)(e),n.abrupt("return",B(c,e,A,u));case 12:if("module"!==i.type){n.next=17;break}return l=Object(g.b)(e,i.methods),n.abrupt("return",B(l,e,A,u));case 17:throw f=i.type,Error("Worker init message states unexpected type of expose(): ".concat(f));case 19:case"end":return n.stop()}}),n)})))}}).call(this,n(86))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return C}));var r=n(9),i=n.n(r),a=n(22),o=n(470),s=n.n(o),u=n(84),A=n(165),c=n(99),l=n(103),f=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},h=(l.a.isWorkerRuntime,!1),g=new Map,d=function(e){return e&&e.type===c.a.run},p=function(e){return s()(e)||function(e){return e&&"object"===typeof e&&"function"===typeof e.subscribe}(e)};function v(e){return Object(A.b)(e)?{payload:e.send,transferables:e.transferables}:{payload:e,transferables:void 0}}function y(e,t){var n=v(t),r=n.payload,i=n.transferables,a={type:c.b.error,uid:e,error:Object(u.c)(r)};l.a.postMessageToMaster(a,i)}function m(e,t,n){var r=v(n),i=r.payload,a=r.transferables,o={type:c.b.result,uid:e,complete:!!t||void 0,payload:i};l.a.postMessageToMaster(o,a)}function I(e,t){var n={type:c.b.running,uid:e,resultType:t};l.a.postMessageToMaster(n)}function b(e){try{var t={type:c.b.uncaughtError,error:Object(u.c)(e)};l.a.postMessageToMaster(t)}catch(n){console.error("Not reporting uncaught error back to master thread as it occured while reporting an uncaught error already.\nLatest error:",n,"\nOriginal error:",e)}}function E(e,t,n){return f(this,void 0,void 0,i.a.mark((function r(){var o,s,A,c;return i.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:r.prev=0,o=t.apply(void 0,Object(a.a)(n)),r.next=7;break;case 4:return r.prev=4,r.t0=r.catch(0),r.abrupt("return",y(e,r.t0));case 7:if(s=p(o)?"observable":"promise",I(e,s),!p(o)){r.next=14;break}A=o.subscribe((function(t){return m(e,!1,Object(u.c)(t))}),(function(t){y(e,Object(u.c)(t)),g.delete(e)}),(function(){m(e,!0),g.delete(e)})),g.set(e,A),r.next=24;break;case 14:return r.prev=14,r.next=17,o;case 17:c=r.sent,m(e,!0,Object(u.c)(c)),r.next=24;break;case 21:r.prev=21,r.t1=r.catch(14),y(e,Object(u.c)(r.t1));case 24:case"end":return r.stop()}}),r,null,[[0,4],[14,21]])})))}function C(e){if(!l.a.isWorkerRuntime())throw Error("expose() called in the master thread.");if(h)throw Error("expose() called more than once. This is not possible. Pass an object to expose() if you want to expose multiple functions.");if(h=!0,"function"===typeof e)l.a.subscribeToMasterMessages((function(t){d(t)&&!t.method&&E(t.uid,e,t.args.map(u.a))})),function(){var e={type:c.b.init,exposed:{type:"function"}};l.a.postMessageToMaster(e)}();else{if("object"!==typeof e||!e)throw Error("Invalid argument passed to expose(). Expected a function or an object, got: ".concat(e));l.a.subscribeToMasterMessages((function(t){d(t)&&t.method&&E(t.uid,e[t.method],t.args.map(u.a))})),function(e){var t={type:c.b.init,exposed:{type:"module",methods:e}};l.a.postMessageToMaster(t)}(Object.keys(e).filter((function(t){return"function"===typeof e[t]})))}l.a.subscribeToMasterMessages((function(e){if((r=e)&&r.type===c.a.cancel){var t=e.uid,n=g.get(t);n&&(n.unsubscribe(),g.delete(t))}var r}))}"undefined"!==typeof self&&"function"===typeof self.addEventListener&&l.a.isWorkerRuntime()&&(self.addEventListener("error",(function(e){setTimeout((function(){return b(e.error||e)}),250)})),self.addEventListener("unhandledrejection",(function(e){var t=e.reason;t&&"string"===typeof t.message&&setTimeout((function(){return b(t)}),250)}))),"undefined"!==typeof e&&"function"===typeof e.on&&l.a.isWorkerRuntime()&&(e.on("uncaughtException",(function(e){setTimeout((function(){return b(e)}),250)})),e.on("unhandledRejection",(function(e){e&&"string"===typeof e.message&&setTimeout((function(){return b(e)}),250)})))}).call(this,n(86))},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),i=n(3),a=n(2),o=n(253);function s(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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A={id:"request-scheduler",throttleRequests:!0,maxRequests:6},c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(i.a)(this,e),this.props=u(u({},A),t),this.requestQueue=[],this.activeRequestCount=0,this.requestMap=new Map,this.stats=new o.a({id:t.id}),this.stats.get("Queued Requests"),this.stats.get("Active Requests"),this.stats.get("Cancelled Requests"),this.stats.get("Queued Requests Ever"),this.stats.get("Active Requests Ever"),this._deferredUpdate=null}return Object(a.a)(e,[{key:"scheduleRequest",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return 0};if(!this.props.throttleRequests)return Promise.resolve({done:function(){}});if(this.requestMap.has(e))return this.requestMap.get(e);var n={handle:e,getPriority:t},r=new Promise((function(e){return n.resolve=e,n}));return this.requestQueue.push(n),this.requestMap.set(e,r),this._issueNewRequests(),r}},{key:"_issueRequest",value:function(e){var t=this,n=e.handle,r=e.resolve,i=!1,a=function(){i||(i=!0,t.requestMap.delete(n),t.activeRequestCount--,t._issueNewRequests())};return this.activeRequestCount++,r?r({done:a}):Promise.resolve({done:a})}},{key:"_issueNewRequests",value:function(){var e=this;this._deferredUpdate||(this._deferredUpdate=setTimeout((function(){return e._issueNewRequestsAsync()}),0))}},{key:"_issueNewRequestsAsync",value:function(){this._deferredUpdate=null;var e=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(0!==e){this._updateAllRequests();for(var t=0;t<e;++t)if(this.requestQueue.length>0){var n=this.requestQueue.shift();this._issueRequest(n)}}}},{key:"_updateAllRequests",value:function(){for(var e=this.requestQueue,t=0;t<e.length;++t){var n=e[t];this._updateRequest(n)||(e.splice(t,1),this.requestMap.delete(n.handle),t--)}e.sort((function(e,t){return e.priority-t.priority}))}},{key:"_updateRequest",value:function(e){return e.priority=e.getPriority(e.handle),!(e.priority<0)||(e.resolve(null),!1)}}]),e}()},function(e,t,n){"use strict";(function(e){var r=n(53),i=n(452);n.d(t,"b",(function(){return i.a}));var a=n(453);n.d(t,"a",(function(){return a.a})),n.d(t,"c",(function(){return r.e}));var o={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof e&&e};(o.global||o.self||o.window).mathgl={config:r.a}}).call(this,n(70))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(244);function i(e){try{return JSON.parse(e)}catch(t){throw new Error('Failed to parse JSON from data starting with "'.concat(Object(r.a)(e),'"'))}}},function(e,t,n){"use strict";(function(e){var r=n(54),i=n(454);n.d(t,"c",(function(){return i.a}));var a=n(455);n.d(t,"a",(function(){return a.a}));var o=n(433);n.d(t,"b",(function(){return o.a}));var s={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof e&&e};(s.global||s.self||s.window).mathgl={config:r.a}}).call(this,n(70))},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(3),i=n(2),a=n(6),o=n(7),s=n(4),u=n(228),A=n(63),c=n(102),l=n(31),f=n(40);function h(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var g=[0,0,0,1],d=function(e){Object(a.a)(n,e);var t=h(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return Object(r.a)(this,n),e=t.call(this,-0,-0,-0,-0),Array.isArray(i)&&1===arguments.length?e.copy(i):e.set(i,a,o,s),e}return Object(i.a)(n,[{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this.check()}},{key:"set",value:function(e,t,n,r){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this.check()}},{key:"fromMatrix3",value:function(e){return l.e(this,e),this.check()}},{key:"identity",value:function(){return l.f(this),this.check()}},{key:"fromAxisRotation",value:function(e,t){return l.p(this,e,t),this.check()}},{key:"setAxisAngle",value:function(e,t){return this.fromAxisRotation(e,t)}},{key:"len",value:function(){return l.h(this)}},{key:"lengthSquared",value:function(){return l.r(this)}},{key:"dot",value:function(e,t){if(void 0!==t)throw new Error("Quaternion.dot only takes one argument");return l.d(this,e)}},{key:"rotationTo",value:function(e,t){return l.n(this,e,t),this.check()}},{key:"add",value:function(e,t){if(void 0!==t)throw new Error("Quaternion.add only takes one argument");return l.a(this,this,e),this.check()}},{key:"calculateW",value:function(){return l.b(this,this),this.check()}},{key:"conjugate",value:function(){return l.c(this,this),this.check()}},{key:"invert",value:function(){return l.g(this,this),this.check()}},{key:"lerp",value:function(e,t,n){return l.i(this,e,t,n),this.check()}},{key:"multiplyRight",value:function(e,t){return Object(c.a)(!t),l.j(this,this,e),this.check()}},{key:"multiplyLeft",value:function(e,t){return Object(c.a)(!t),l.j(this,e,this),this.check()}},{key:"normalize",value:function(){var e=this.len(),t=e>0?1/e:0;return this[0]=this[0]*t,this[1]=this[1]*t,this[2]=this[2]*t,this[3]=this[3]*t,0===e&&(this[3]=1),this.check()}},{key:"rotateX",value:function(e){return l.k(this,this,e),this.check()}},{key:"rotateY",value:function(e){return l.l(this,this,e),this.check()}},{key:"rotateZ",value:function(e){return l.m(this,this,e),this.check()}},{key:"scale",value:function(e){return l.o(this,this,e),this.check()}},{key:"slerp",value:function(e,t,n){switch(arguments.length){case 1:var r=arguments[0],i=r.start;e=void 0===i?g:i,t=r.target,n=r.ratio;break;case 2:var a=Array.prototype.slice.call(arguments);t=a[0],n=a[1],e=this}return l.q(this,e,t,n),this.check()}},{key:"transformVector4",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return f.o(t,e,this),Object(A.b)(t,4)}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"setFromAxisAngle",value:function(e,t){return this.setAxisAngle(e,t)}},{key:"premultiply",value:function(e,t){return this.multiplyLeft(e,t)}},{key:"multiply",value:function(e,t){return this.multiplyRight(e,t)}},{key:"ELEMENTS",get:function(){return 4}},{key:"x",get:function(){return this[0]},set:function(e){this[0]=Object(A.a)(e)}},{key:"y",get:function(){return this[1]},set:function(e){this[1]=Object(A.a)(e)}},{key:"z",get:function(){return this[2]},set:function(e){this[2]=Object(A.a)(e)}},{key:"w",get:function(){return this[3]},set:function(e){this[3]=Object(A.a)(e)}}]),n}(u.a)},function(e,t,n){"use strict";(function(t,r){var i;e.exports=w,w.ReadableState=B;n(365).EventEmitter;var a=function(e,t){return e.listeners(t).length},o=n(435),s=n(198).Buffer,u=t.Uint8Array||function(){};var A,c=n(645);A=c&&c.debuglog?c.debuglog("stream"):function(){};var l,f,h,g=n(646),d=n(436),p=n(437).getHighWaterMark,v=n(209).codes,y=v.ERR_INVALID_ARG_TYPE,m=v.ERR_STREAM_PUSH_AFTER_EOF,I=v.ERR_METHOD_NOT_IMPLEMENTED,b=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(210)(w,o);var E=d.errorOrDestroy,C=["error","close","destroy","pause","resume"];function B(e,t,r){i=i||n(211),e=e||{},"boolean"!==typeof r&&(r=t instanceof i),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=p(this,e,"readableHighWaterMark",r),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=n(439).StringDecoder),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function w(e){if(i=i||n(211),!(this instanceof w))return new w(e);var t=this instanceof i;this._readableState=new B(e,this,t),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function Q(e,t,n,r,i){A("readableAddChunk",t);var a,o=e._readableState;if(null===t)o.reading=!1,function(e,t){if(A("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?x(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,S(e)))}(e,o);else if(i||(a=function(e,t){var n;r=t,s.isBuffer(r)||r instanceof u||"string"===typeof t||void 0===t||e.objectMode||(n=new y("chunk",["string","Buffer","Uint8Array"],t));var r;return n}(o,t)),a)E(e,a);else if(o.objectMode||t&&t.length>0)if("string"===typeof t||o.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)o.endEmitted?E(e,new b):k(e,o,t,!0);else if(o.ended)E(e,new m);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?k(e,o,t,!1):O(e,o)):k(e,o,t,!1)}else r||(o.reading=!1,O(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function k(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&x(e)),O(e,t)}Object.defineProperty(w.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),w.prototype.destroy=d.destroy,w.prototype._undestroy=d.undestroy,w.prototype._destroy=function(e,t){t(e)},w.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"===typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=s.from(e,t),t=""),n=!0),Q(this,e,t,!1,n)},w.prototype.unshift=function(e){return Q(this,e,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(e){l||(l=n(439).StringDecoder);var t=new l(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function _(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function x(e){var t=e._readableState;A("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(A("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(S,e))}function S(e){var t=e._readableState;A("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,N(e)}function O(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(D,e,t))}function D(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(A("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function R(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function j(e){A("readable nexttick read 0"),e.read(0)}function M(e,t){A("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),N(e),t.flowing&&!t.reading&&e.read(0)}function N(e){var t=e._readableState;for(A("flow",t.flowing);t.flowing&&null!==e.read(););}function F(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function T(e){var t=e._readableState;A("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(L,t,e))}function L(e,t){if(A("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function P(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}w.prototype.read=function(e){A("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return A("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?T(this):x(this),null;if(0===(e=_(e,t))&&t.ended)return 0===t.length&&T(this),null;var r,i=t.needReadable;return A("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&A("length less than watermark",i=!0),t.ended||t.reading?A("reading or ended",i=!1):i&&(A("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=_(n,t))),null===(r=e>0?F(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&T(this)),null!==r&&this.emit("data",r),r},w.prototype._read=function(e){E(this,new I("_read()"))},w.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,A("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?u:p;function s(t,r){A("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,A("cleanup"),e.removeListener("close",g),e.removeListener("finish",d),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",s),n.removeListener("end",u),n.removeListener("end",p),n.removeListener("data",f),l=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function u(){A("onend"),e.end()}i.endEmitted?r.nextTick(o):n.once("end",o),e.on("unpipe",s);var c=function(e){return function(){var t=e._readableState;A("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,N(e))}}(n);e.on("drain",c);var l=!1;function f(t){A("ondata");var r=e.write(t);A("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==P(i.pipes,e))&&!l&&(A("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function h(t){A("onerror",t),p(),e.removeListener("error",h),0===a(e,"error")&&E(e,t)}function g(){e.removeListener("finish",d),p()}function d(){A("onfinish"),e.removeListener("close",g),p()}function p(){A("unpipe"),n.unpipe(e)}return n.on("data",f),function(e,t,n){if("function"===typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",g),e.once("finish",d),e.emit("pipe",n),i.flowing||(A("pipe resume"),n.resume()),e},w.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)r[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=P(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},w.prototype.on=function(e,t){var n=o.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,A("on readable",i.length,i.reading),i.length?x(this):i.reading||r.nextTick(j,this))),n},w.prototype.addListener=w.prototype.on,w.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(R,this),n},w.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(R,this),t},w.prototype.resume=function(){var e=this._readableState;return e.flowing||(A("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(M,e,t))}(this,e)),e.paused=!1,this},w.prototype.pause=function(){return A("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(A("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},w.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(A("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(A("wrapped data"),n.decoder&&(i=n.decoder.write(i)),!n.objectMode||null!==i&&void 0!==i)&&((n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause())))})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<C.length;a++)e.on(C[a],this.emit.bind(this,C[a]));return this._read=function(t){A("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"===typeof Symbol&&(w.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=n(650)),f(this)}),Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(w.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(w.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),w._fromList=F,Object.defineProperty(w.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"===typeof Symbol&&(w.from=function(e,t){return void 0===h&&(h=n(651)),h(w,e,t)})}).call(this,n(70),n(86))},function(e,t,n){e.exports=n(365).EventEmitter},function(e,t,n){"use strict";(function(t){function n(e,t){i(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,a){var o=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(a?a(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(i,this,e)):t.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!a&&e?o._writableState?o._writableState.errorEmitted?t.nextTick(r,o):(o._writableState.errorEmitted=!0,t.nextTick(n,o,e)):t.nextTick(n,o,e):a?(t.nextTick(r,o),a(e)):t.nextTick(r,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this,n(86))},function(e,t,n){"use strict";var r=n(209).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,i){var a=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new r(i?n:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},function(e,t,n){"use strict";(function(t,r){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var a;e.exports=w,w.WritableState=B;var o={deprecate:n(648)},s=n(435),u=n(198).Buffer,A=t.Uint8Array||function(){};var c,l=n(436),f=n(437).getHighWaterMark,h=n(209).codes,g=h.ERR_INVALID_ARG_TYPE,d=h.ERR_METHOD_NOT_IMPLEMENTED,p=h.ERR_MULTIPLE_CALLBACK,v=h.ERR_STREAM_CANNOT_PIPE,y=h.ERR_STREAM_DESTROYED,m=h.ERR_STREAM_NULL_VALUES,I=h.ERR_STREAM_WRITE_AFTER_END,b=h.ERR_UNKNOWN_ENCODING,E=l.errorOrDestroy;function C(){}function B(e,t,o){a=a||n(211),e=e||{},"boolean"!==typeof o&&(o=t instanceof a),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=f(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,a=n.writecb;if("function"!==typeof a)throw new p;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,a){--t.pendingcb,n?(r.nextTick(a,i),r.nextTick(O,e,t),e._writableState.errorEmitted=!0,E(e,i)):(a(i),e._writableState.errorEmitted=!0,E(e,i),O(e,t))}(e,n,i,t,a);else{var o=x(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||_(e,n),i?r.nextTick(k,e,n,o,a):k(e,n,o,a)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function w(e){var t=this instanceof(a=a||n(211));if(!t&&!c.call(w,this))return new w(e);this._writableState=new B(e,this,t),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final)),s.call(this)}function Q(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function k(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),O(e,t)}function _(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,a=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var s=0,u=!0;n;)a[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;a.allBuffers=u,Q(e,t,!0,t.length,a,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;n;){var A=n.chunk,c=n.encoding,l=n.callback;if(Q(e,t,!1,t.objectMode?1:A.length,A,c,l),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function x(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(n){t.pendingcb--,n&&E(e,n),t.prefinished=!0,e.emit("prefinish"),O(e,t)}))}function O(e,t){var n=x(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!==typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(S,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return n}n(210)(w,s),B.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(B.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===w&&(e&&e._writableState instanceof B)}})):c=function(e){return e instanceof this},w.prototype.pipe=function(){E(this,new v)},w.prototype.write=function(e,t,n){var i,a=this._writableState,o=!1,s=!a.objectMode&&(i=e,u.isBuffer(i)||i instanceof A);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"===typeof t&&(n=t,t=null),s?t="buffer":t||(t=a.defaultEncoding),"function"!==typeof n&&(n=C),a.ending?function(e,t){var n=new I;E(e,n),r.nextTick(t,n)}(this,n):(s||function(e,t,n,i){var a;return null===n?a=new m:"string"===typeof n||t.objectMode||(a=new g("chunk",["string","Buffer"],n)),!a||(E(e,a),r.nextTick(i,a),!1)}(this,a,e,n))&&(a.pendingcb++,o=function(e,t,n,r,i,a){if(!n){var o=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=u.from(t,n));return t}(t,r,i);r!==o&&(n=!0,i="buffer",r=o)}var s=t.objectMode?1:r.length;t.length+=s;var A=t.length<t.highWaterMark;A||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Q(e,t,!1,s,r,i,a);return A}(this,a,s,e,t,n)),o},w.prototype.cork=function(){this._writableState.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||_(this,e))},w.prototype.setDefaultEncoding=function(e){if("string"===typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new b(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(w.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,n){n(new d("_write()"))},w.prototype._writev=null,w.prototype.end=function(e,t,n){var i=this._writableState;return"function"===typeof e?(n=e,e=null,t=null):"function"===typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,O(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(w.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(w.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=l.destroy,w.prototype._undestroy=l.undestroy,w.prototype._destroy=function(e,t){t(e)}}).call(this,n(70),n(86))},function(e,t,n){"use strict";var r=n(649).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!==typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=A,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=l,t=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function o(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!==(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function A(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\ufffd":t},a.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=o(t[r]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=o(t[r]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";e.exports=c;var r=n(209).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,a=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(211);function A(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new a);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);u.call(this,e),this._transformState={afterTransform:A.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"===typeof e.transform&&(this._transform=e.transform),"function"===typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",l)}function l(){var e=this;"function"!==typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(t,n){f(e,t,n)}))}function f(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new s;if(e._transformState.transforming)throw new o;return e.push(null)}n(210)(c,u),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,n){n(new i("_transform()"))},c.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(t){}try{return e+""}catch(t){}}return""}},function(e,t,n){var r=n(495),i=n(702),a=n(496);e.exports=function(e,t,n,o,s,u){var A=1&n,c=e.length,l=t.length;if(c!=l&&!(A&&l>c))return!1;var f=u.get(e);if(f&&u.get(t))return f==t;var h=-1,g=!0,d=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++h<c;){var p=e[h],v=t[h];if(o)var y=A?o(v,p,h,t,e,u):o(p,v,h,e,t,u);if(void 0!==y){if(y)continue;g=!1;break}if(d){if(!i(t,(function(e,t){if(!a(d,t)&&(p===e||s(p,e,n,o,u)))return d.push(t)}))){g=!1;break}}else if(p!==v&&!s(p,v,n,o,u)){g=!1;break}}return u.delete(e),u.delete(t),g}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72),i=n(114);t.default=function(e,t,n,a){void 0===a&&(a={});var o=i.getCoord(e),s=r.degreesToRadians(o[0]),u=r.degreesToRadians(o[1]),A=r.degreesToRadians(n),c=r.lengthToRadians(t,a.units),l=Math.asin(Math.sin(u)*Math.cos(c)+Math.cos(u)*Math.sin(c)*Math.cos(A)),f=s+Math.atan2(Math.sin(A)*Math.sin(c)*Math.cos(u),Math.cos(c)-Math.sin(u)*Math.sin(l)),h=r.radiansToDegrees(f),g=r.radiansToDegrees(l);return r.point([h,g],a.properties)}},function(e,t,n){"use strict";var r=n(1),i=n(3),a=n(2),o=n(296),s=n(57),u=n(141),A=n(44),c=n(126);function l(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 f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(i.a)(this,e),this.views=[],this.width=100,this.height=100,this.viewState={},this.controllers={},this.timeline=t.timeline,this._viewports=[],this._viewportMap={},this._isUpdating=!1,this._needsRedraw="Initial render",this._needsUpdate=!0,this._eventManager=t.eventManager,this._eventCallbacks={onViewStateChange:t.onViewStateChange,onInteractiveStateChange:t.onInteractiveStateChange},Object.seal(this),this.setProps(t)}return Object(a.a)(e,[{key:"finalize",value:function(){for(var e in this.controllers)this.controllers[e]&&this.controllers[e].finalize();this.controllers={}}},{key:"needsRedraw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},t=this._needsRedraw;return e.clearRedrawFlags&&(this._needsRedraw=!1),t}},{key:"setNeedsUpdate",value:function(e){this._needsUpdate=this._needsUpdate||e,this._needsRedraw=this._needsRedraw||e}},{key:"updateViewStates",value:function(){for(var e in this.controllers){var t=this.controllers[e];t&&t.updateTransition()}}},{key:"getViewports",value:function(e){return e?this._viewports.filter((function(t){return t.containsPixel(e)})):this._viewports}},{key:"getViews",value:function(){var e={};return this.views.forEach((function(t){e[t.id]=t})),e}},{key:"getView",value:function(e){return"string"===typeof e?this.views.find((function(t){return t.id===e})):e}},{key:"getViewState",value:function(e){var t=this.getView(e),n=t&&this.viewState[t.getViewStateId()]||this.viewState;return t?t.filterViewState(n):n}},{key:"getViewport",value:function(e){return this._viewportMap[e]}},{key:"unproject",value:function(e,t){for(var n=this.getViewports(),r={x:e[0],y:e[1]},i=n.length-1;i>=0;--i){var a=n[i];if(a.containsPixel(r)){var o=e.slice();return o[0]-=a.x,o[1]-=a.y,a.unproject(o,t)}}return null}},{key:"setProps",value:function(e){"views"in e&&this._setViews(e.views),"viewState"in e&&this._setViewState(e.viewState),("width"in e||"height"in e)&&this._setSize(e.width,e.height),this._isUpdating||this._update()}},{key:"_update",value:function(){this._isUpdating=!0,this._needsUpdate&&(this._needsUpdate=!1,this._rebuildViewports()),this._needsUpdate&&(this._needsUpdate=!1,this._rebuildViewports()),this._isUpdating=!1}},{key:"_setSize",value:function(e,t){Object(s.a)(Number.isFinite(e)&&Number.isFinite(t)),e===this.width&&t===this.height||(this.width=e,this.height=t,this.setNeedsUpdate("Size changed"))}},{key:"_setViews",value:function(e){e=Object(c.b)(e,Boolean),this._diffViews(e,this.views)&&this.setNeedsUpdate("views changed"),this.views=e}},{key:"_setViewState",value:function(e){e?(!Object(u.a)(e,this.viewState)&&this.setNeedsUpdate("viewState changed"),this.viewState=e):A.a.warn("missing `viewState` or `initialViewState`")()}},{key:"_onViewStateChange",value:function(e,t){t.viewId=e,this._eventCallbacks.onViewStateChange(t)}},{key:"_createController",value:function(e,t){return new(0,t.type)(f({timeline:this.timeline,eventManager:this._eventManager,onViewStateChange:this._onViewStateChange.bind(this,t.id),onStateChange:this._eventCallbacks.onInteractiveStateChange,makeViewport:e._getViewport.bind(e)},t))}},{key:"_updateController",value:function(e,t,n,r){var i=e.controller;return i?(i=f(f(f(f({},t),e.props),i),{},{id:e.id,x:n.x,y:n.y,width:n.width,height:n.height}),r?r.setProps(i):r=this._createController(e,i),r):null}},{key:"_rebuildViewports",value:function(){var e=this.width,t=this.height,n=this.views,r=this.controllers;this._viewports=[],this.controllers={};for(var i=n.length;i--;){var a=n[i],o=this.getViewState(a),s=a.makeViewport({width:e,height:t,viewState:o});this.controllers[a.id]=this._updateController(a,o,s,r[a.id]),this._viewports.unshift(s)}for(var u in r)r[u]&&!this.controllers[u]&&r[u].finalize();this._buildViewportMap()}},{key:"_buildViewportMap",value:function(){var e=this;this._viewportMap={},this._viewports.forEach((function(t){t.id&&(e._viewportMap[t.id]=e._viewportMap[t.id]||t)}))}},{key:"_diffViews",value:function(e,t){return e.length!==t.length||e.some((function(n,r){return!e[r].equals(t[r])}))}}]),e}(),g=n(287),d=n(249);function p(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var y=new d.a,m=function(){function e(){Object(i.a)(this,e),this.effects=[],this._internalEffects=[],this._needsRedraw="Initial render",this.setEffects()}return Object(a.a)(e,[{key:"setProps",value:function(e){"effects"in e&&(e.effects.length===this.effects.length&&Object(u.a)(e.effects,this.effects)||(this.setEffects(e.effects),this._needsRedraw="effects changed"))}},{key:"needsRedraw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},t=this._needsRedraw;return e.clearRedrawFlags&&(this._needsRedraw=!1),t}},{key:"getEffects",value:function(){return this._internalEffects}},{key:"finalize",value:function(){this.cleanup()}},{key:"setEffects",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.cleanup(),this.effects=e,this._createInternalEffects()}},{key:"cleanup",value:function(){var e,t=p(this.effects);try{for(t.s();!(e=t.n()).done;){e.value.cleanup()}}catch(i){t.e(i)}finally{t.f()}var n,r=p(this._internalEffects);try{for(r.s();!(n=r.n()).done;){n.value.cleanup()}}catch(i){r.e(i)}finally{r.f()}this.effects.length=0,this._internalEffects.length=0}},{key:"_createInternalEffects",value:function(){this._internalEffects=this.effects.slice(),this.effects.some((function(e){return e instanceof d.a}))||this._internalEffects.push(y)}}]),e}(),I=n(167),b=n(298),E=n(140),C=n(179),B=n(21),w=n(362),Q=n(307),k={pickedColor:null,pickedLayer:null,pickedObjectIndex:-1};function _(e){var t=e.pickedColors,n=e.layers,r=e.deviceX,i=e.deviceY,a=e.deviceRadius,o=e.deviceRect;if(t){for(var s=o.x,u=o.y,c=o.width,l=o.height,f=a*a,h=-1,g=0,d=0;d<l;d++){var p=d+u-i,v=p*p;if(v>f)g+=4*c;else for(var y=0;y<c;y++){if(t[g+3]-1>=0){var m=y+s-r,I=m*m+v;I<=f&&(f=I,h=g)}g+=4}}if(h>=0){var b=t[h+3]-1,E=t.slice(h,h+4),C=n[b];if(C){var B=C.decodePickingColor(E),w=Math.floor(h/4/c);return{pickedColor:E,pickedLayer:C,pickedObjectIndex:B,pickedX:s+(h/4-w*c),pickedY:u+w}}A.a.error("Picked non-existent layer. Is picking buffer corrupt?")()}}return k}function x(e){var t=e.pickInfo,n=e.viewports,r=e.pixelRatio,i=e.x,a=e.y,o=e.z,s={viewports:n}.viewports[0],u=s&&s.unproject([i-s.x,a-s.y],{targetZ:o});return{color:null,layer:null,index:-1,picked:!1,x:i,y:a,pixel:[i,a],coordinate:u,lngLat:u,devicePixel:t&&[t.pickedX,t.pickedY],pixelRatio:r}}function S(e){var t=e.pickInfo,n=e.lastPickedInfo,r=e.mode,i=e.layers,a=t.pickedColor,o=t.pickedLayer,s=t.pickedObjectIndex,u=o?[o]:[];if("hover"===r){var A=n.index,c=n.layerId,l=o&&o.props.id;if(l!==c||s!==A){if(l!==c){var f=i.find((function(e){return e.props.id===c}));f&&u.unshift(f)}n.layerId=l,n.index=s,n.info=null}}var h=x(e),g=new Map;return g.set(null,h),u.forEach((function(e){var t=Object.assign({},h);if(e===o&&(t.color=a,t.index=s,t.picked=!0),t=O({layer:e,info:t,mode:r}),e===o&&"hover"===r&&(n.info=t),t&&g.set(t.layer.id,t),"hover"===r&&e.props.autoHighlight){var i={pickingSelectedColor:o===e?a:null},u=e.props.highlightColor;o===e&&"function"===typeof u&&(i.pickingHighlightColor=u(t)),e.setModuleParameters(i),e.setNeedsRedraw()}})),g}function O(e){for(var t=e.layer,n=e.info,r=e.mode;t&&n;){var i=n.layer||t;n.layer=t,n=t.getPickingInfo({info:n,mode:r,sourceLayer:i}),t=t.parent}return n}function D(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return R(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var j=function(){function e(t){Object(i.a)(this,e),this.gl=t,this.pickingFBO=null,this.pickLayersPass=new Q.a(t),this.layerFilter=null,this.lastPickedInfo={index:-1,layerId:null,info:null},this._onError=null}return Object(a.a)(e,[{key:"setProps",value:function(e){"layerFilter"in e&&(this.layerFilter=e.layerFilter),"onError"in e&&(this._onError=e.onError),"_pickable"in e&&(this._pickable=e._pickable)}},{key:"finalize",value:function(){this.pickingFBO&&this.pickingFBO.delete(),this.depthFBO&&(this.depthFBO.color.delete(),this.depthFBO.delete())}},{key:"pickObject",value:function(e){return this._pickClosestObject(e)}},{key:"pickObjects",value:function(e){return this._pickVisibleObjects(e)}},{key:"getLastPickedObject",value:function(e){var t=e.x,n=e.y,r=e.layers,i=e.viewports,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.lastPickedInfo.info,o=a&&a.layer&&a.layer.id,s=o?r.find((function(e){return e.id===o})):null,u=i[0]&&i[0].unproject([t,n]),A={x:t,y:n,coordinate:u,lngLat:u,layer:s};return s?Object.assign({},a,A):Object.assign(A,{color:null,object:null,index:-1})}},{key:"_resizeBuffer",value:function(){var e=this.gl;return this.pickingFBO||(this.pickingFBO=new E.a(e),E.a.isSupported(e,{colorBufferFloat:!0})&&(this.depthFBO=new E.a(e),this.depthFBO.attach(Object(r.a)({},36064,new C.a(e,{format:Object(B.g)(e)?34836:6408,type:5126}))))),this.pickingFBO.resize({width:e.canvas.width,height:e.canvas.height}),this.depthFBO&&this.depthFBO.resize({width:e.canvas.width,height:e.canvas.height}),this.pickingFBO}},{key:"_getPickable",value:function(e){if(!1===this._pickable)return null;var t=e.filter((function(e){return e.isPickable()&&!e.isComposite}));return t.length>255?(A.a.warn("Too many pickable layers, only picking the first 255")(),t.slice(0,255)):t.length?t:null}},{key:"_pickClosestObject",value:function(e){var t=e.layers,n=e.views,r=e.viewports,i=e.x,a=e.y,o=e.radius,s=void 0===o?0:o,u=e.depth,A=void 0===u?1:u,c=e.mode,l=void 0===c?"query":c,f=e.unproject3D,h=e.onViewportActive;if(!(t=this._getPickable(t)))return{result:[],emptyInfo:x({viewports:r,x:i,y:a})};this._resizeBuffer();for(var g,d=Object(B.c)(this.gl),p=Object(B.b)(this.gl,[i,a],!0),v=[p.x+Math.floor(p.width/2),p.y+Math.floor(p.height/2)],y=Math.round(s*d),m=this.pickingFBO,I=m.width,b=m.height,E=this._getPickingRect({deviceX:v[0],deviceY:v[1],deviceRadius:y,deviceWidth:I,deviceHeight:b}),C=[],w={},Q=0;Q<A;Q++){var k=_({pickedColors:E&&this._drawAndSample({layers:t,views:n,viewports:r,onViewportActive:h,deviceRect:E,pass:"picking:".concat(l),redrawReason:l}),layers:t,deviceX:v[0],deviceY:v[1],deviceRadius:y,deviceRect:E}),O=void 0;if(k.pickedLayer&&f&&this.depthFBO)O=this._drawAndSample({layers:[k.pickedLayer],views:n,viewports:r,onViewportActive:h,deviceRect:{x:k.pickedX,y:k.pickedY,width:1,height:1},pass:"picking:".concat(l),redrawReason:"pick-z",pickZ:!0})[0]*r[0].distanceScales.metersPerUnit[2]+r[0].position[2];if(k.pickedColor&&Q+1<A){var R=k.pickedColor[3]-1;w[R]=!0,t[R].clearPickingColor(k.pickedColor)}var j,M=D((g=S({pickInfo:k,lastPickedInfo:this.lastPickedInfo,mode:l,layers:t,viewports:r,x:i,y:a,z:O,pixelRatio:d})).values());try{for(M.s();!(j=M.n()).done;){var N=j.value;N.layer&&C.push(N)}}catch(T){M.e(T)}finally{M.f()}if(!k.pickedColor)break}for(var F in w)t[F].restorePickingColors();return{result:C,emptyInfo:g&&g.get(null)}}},{key:"_pickVisibleObjects",value:function(e){var t=e.layers,n=e.views,r=e.viewports,i=e.x,a=e.y,o=e.width,s=void 0===o?1:o,u=e.height,c=void 0===u?1:u,l=e.mode,f=void 0===l?"query":l,h=e.onViewportActive;if(!(t=this._getPickable(t)))return[];this._resizeBuffer();var g=Object(B.c)(this.gl),d=Object(B.b)(this.gl,[i,a],!0),p=d.x,v=d.y+d.height,y=Object(B.b)(this.gl,[i+s,a+c],!0),m=y.x+y.width,I=y.y,b={x:p,y:I,width:m-p,height:v-I},E=function(e){var t=e.pickedColors,n=e.layers,r=new Map;if(t)for(var i=0;i<t.length;i+=4){var a=t[i+3]-1;if(a>=0){var o=t.slice(i,i+4),s=o.join(",");if(!r.has(s)){var u=n[a];u?r.set(s,{pickedColor:o,pickedLayer:u,pickedObjectIndex:u.decodePickingColor(o)}):A.a.error("Picked non-existent layer. Is picking buffer corrupt?")()}}}return Array.from(r.values())}({pickedColors:this._drawAndSample({layers:t,views:n,viewports:r,onViewportActive:h,deviceRect:b,pass:"picking:".concat(f),redrawReason:f}),layers:t}),C=new Map;return E.forEach((function(e){var t={color:e.pickedColor,layer:null,index:e.pickedObjectIndex,picked:!0,x:i,y:a,width:s,height:c,pixelRatio:g};t=O({layer:e.pickedLayer,info:t,mode:f}),C.has(t.object)||C.set(t.object,t)})),Array.from(C.values())}},{key:"_drawAndSample",value:function(e){var t=e.layers,n=e.views,r=e.viewports,i=e.onViewportActive,a=e.deviceRect,o=e.pass,u=e.redrawReason,A=e.pickZ;if(Object(s.a)(a.width>0&&a.height>0),t.length<1)return null;var c=A?this.depthFBO:this.pickingFBO;this.pickLayersPass.render({layers:t,layerFilter:this.layerFilter,onError:this._onError,views:n,viewports:r,onViewportActive:i,pickingFBO:c,deviceRect:a,pass:o,redrawReason:u,pickZ:A});var l=a.x,f=a.y,h=a.width,g=a.height,d=new(A?Float32Array:Uint8Array)(h*g*4);return Object(w.c)(c,{sourceX:l,sourceY:f,sourceWidth:h,sourceHeight:g,target:d}),d}},{key:"_getPickingRect",value:function(e){var t=e.deviceX,n=e.deviceY,r=e.deviceRadius,i=e.deviceWidth,a=e.deviceHeight,o=Math.max(0,t-r),s=Math.max(0,n-r),u=Math.min(i,t+r+1)-o,A=Math.min(a,n+r+1)-s;return u<=0||A<=0?null:{x:o,y:s,width:u,height:A}}}]),e}(),M={zIndex:1,position:"absolute",pointerEvents:"none",color:"#a0a7b4",backgroundColor:"#29323c",padding:"10px",top:0,left:0,display:"none"},N=function(){function e(t){Object(i.a)(this,e);var n=t.parentElement;n&&(this.el=document.createElement("div"),this.el.className="deck-tooltip",Object.assign(this.el.style,M),n.appendChild(this.el))}return Object(a.a)(e,[{key:"setTooltip",value:function(e,t,n){var r=this.el;if("string"===typeof e)r.innerText=e;else{if(!e)return void(r.style.display="none");"text"in e&&(r.innerText=e.text),"html"in e&&(r.innerHTML=e.html),"className"in e&&(r.className=e.className),Object.assign(r.style,e.style)}r.style.display="block",r.style.transform="translate(".concat(t,"px, ").concat(n,"px)")}},{key:"remove",value:function(){this.el&&this.el.remove()}}]),e}(),F=n(128),T=n(351),L=n(61),P=n(929),U=n(922),G=n(257),q=n(253),H=n(16),Y=n(258),J=n.n(Y),z={mousedown:1,mousemove:2,mouseup:4};!function(e){var t=e.prototype.handler;e.prototype.handler=function(e){var n=this.store;e.button>0&&(function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return!0;return!1}(n,(function(t){return t.pointerId===e.pointerId}))||n.push(e)),t.call(this,e)}}(J.a.PointerEventInput),J.a.MouseInput.prototype.handler=function(e){var t=z[e.type];1&t&&e.button>=0&&(this.pressed=!0),2&t&&0===e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))};var K=J.a.Manager,W=J.a,V=W?[[W.Rotate,{enable:!1}],[W.Pinch,{enable:!1}],[W.Swipe,{enable:!1}],[W.Pan,{threshold:0,enable:!1}],[W.Press,{enable:!1}],[W.Tap,{event:"doubletap",taps:2,enable:!1}],[W.Tap,{event:"anytap",enable:!1}],[W.Tap,{enable:!1}]]:null,X={rotate:["pinch"],pinch:["pan"],pan:["press","doubletap","anytap","tap"],doubletap:["anytap"],anytap:["tap"]},Z={doubletap:["tap"]},$={pointerdown:"pointerdown",pointermove:"pointermove",pointerup:"pointerup",touchstart:"pointerdown",touchmove:"pointermove",touchend:"pointerup",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup"},ee=["keydown","keyup"],te=["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"],ne=["wheel","mousewheel","DOMMouseScroll"],re={tap:"tap",anytap:"anytap",doubletap:"doubletap",press:"press",pinch:"pinch",pinchin:"pinch",pinchout:"pinch",pinchstart:"pinch",pinchmove:"pinch",pinchend:"pinch",pinchcancel:"pinch",rotate:"rotate",rotatestart:"rotate",rotatemove:"rotate",rotateend:"rotate",rotatecancel:"rotate",pan:"pan",panstart:"pan",panmove:"pan",panup:"pan",pandown:"pan",panleft:"pan",panright:"pan",panend:"pan",pancancel:"pan",swipe:"swipe",swipeleft:"swipe",swiperight:"swipe",swipeup:"swipe",swipedown:"swipe"},ie={click:"tap",anyclick:"anytap",dblclick:"doubletap",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",mouseover:"pointerover",mouseout:"pointerout",mouseleave:"pointerleave"},ae=n(192),oe=-1!==ae.b.indexOf("firefox"),se=ne,ue=function(){function e(t,n){var r=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(i.a)(this,e),this.element=t,this.callback=n,this.options=Object.assign({enable:!0},a),this.events=se.concat(a.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach((function(e){return t.addEventListener(e,r.handleEvent,!!ae.a&&{passive:!1})}))}return Object(a.a)(e,[{key:"destroy",value:function(){var e=this;this.events.forEach((function(t){return e.element.removeEventListener(t,e.handleEvent)}))}},{key:"enableEventType",value:function(e,t){"wheel"===e&&(this.options.enable=t)}},{key:"handleEvent",value:function(e){if(this.options.enable){var t=e.deltaY;ae.c.WheelEvent&&(oe&&e.deltaMode===ae.c.WheelEvent.DOM_DELTA_PIXEL&&(t/=ae.c.devicePixelRatio),e.deltaMode===ae.c.WheelEvent.DOM_DELTA_LINE&&(t*=40));var n={x:e.clientX,y:e.clientY};0!==t&&t%4.000244140625===0&&(t=Math.floor(t/4.000244140625)),e.shiftKey&&t&&(t*=.25),this._onWheel(e,-t,n)}}},{key:"_onWheel",value:function(e,t,n){this.callback({type:"wheel",center:n,delta:t,srcEvent:e,pointerType:"mouse",target:e.target})}}]),e}(),Ae=te,ce=function(){function e(t,n){var r=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(i.a)(this,e),this.element=t,this.callback=n,this.pressed=!1,this.options=Object.assign({enable:!0},a),this.enableMoveEvent=this.options.enable,this.enableLeaveEvent=this.options.enable,this.enableOutEvent=this.options.enable,this.enableOverEvent=this.options.enable,this.events=Ae.concat(a.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach((function(e){return t.addEventListener(e,r.handleEvent)}))}return Object(a.a)(e,[{key:"destroy",value:function(){var e=this;this.events.forEach((function(t){return e.element.removeEventListener(t,e.handleEvent)}))}},{key:"enableEventType",value:function(e,t){"pointermove"===e&&(this.enableMoveEvent=t),"pointerover"===e&&(this.enableOverEvent=t),"pointerout"===e&&(this.enableOutEvent=t),"pointerleave"===e&&(this.enableLeaveEvent=t)}},{key:"handleEvent",value:function(e){this.handleOverEvent(e),this.handleOutEvent(e),this.handleLeaveEvent(e),this.handleMoveEvent(e)}},{key:"handleOverEvent",value:function(e){this.enableOverEvent&&"mouseover"===e.type&&this.callback({type:"pointerover",srcEvent:e,pointerType:"mouse",target:e.target})}},{key:"handleOutEvent",value:function(e){this.enableOutEvent&&"mouseout"===e.type&&this.callback({type:"pointerout",srcEvent:e,pointerType:"mouse",target:e.target})}},{key:"handleLeaveEvent",value:function(e){this.enableLeaveEvent&&"mouseleave"===e.type&&this.callback({type:"pointerleave",srcEvent:e,pointerType:"mouse",target:e.target})}},{key:"handleMoveEvent",value:function(e){if(this.enableMoveEvent)switch(e.type){case"mousedown":e.button>=0&&(this.pressed=!0);break;case"mousemove":0===e.which&&(this.pressed=!1),this.pressed||this.callback({type:"pointermove",srcEvent:e,pointerType:"mouse",target:e.target});break;case"mouseup":this.pressed=!1}}}]),e}(),le=ee,fe=function(){function e(t,n){var r=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(i.a)(this,e),this.element=t,this.callback=n,this.options=Object.assign({enable:!0},a),this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,this.events=le.concat(a.events||[]),this.handleEvent=this.handleEvent.bind(this),t.tabIndex=a.tabIndex||0,t.style.outline="none",this.events.forEach((function(e){return t.addEventListener(e,r.handleEvent)}))}return Object(a.a)(e,[{key:"destroy",value:function(){var e=this;this.events.forEach((function(t){return e.element.removeEventListener(t,e.handleEvent)}))}},{key:"enableEventType",value:function(e,t){"keydown"===e&&(this.enableDownEvent=t),"keyup"===e&&(this.enableUpEvent=t)}},{key:"handleEvent",value:function(e){var t=e.target||e.srcElement;"INPUT"===t.tagName&&"text"===t.type||"TEXTAREA"===t.tagName||(this.enableDownEvent&&"keydown"===e.type&&this.callback({type:"keydown",srcEvent:e,key:e.key,target:e.target}),this.enableUpEvent&&"keyup"===e.type&&this.callback({type:"keyup",srcEvent:e,key:e.key,target:e.target}))}}]),e}(),he=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(i.a)(this,e),this.element=t,this.callback=n,this.options=Object.assign({enable:!0},r),this.handleEvent=this.handleEvent.bind(this),t.addEventListener("contextmenu",this.handleEvent)}return Object(a.a)(e,[{key:"destroy",value:function(){this.element.removeEventListener("contextmenu",this.handleEvent)}},{key:"enableEventType",value:function(e,t){"contextmenu"===e&&(this.options.enable=t)}},{key:"handleEvent",value:function(e){this.options.enable&&this.callback({type:"contextmenu",center:{x:e.clientX,y:e.clientY},srcEvent:e,pointerType:"mouse",target:e.target})}}]),e}(),ge=n(25),de={pointerdown:1,pointermove:2,pointerup:4,mousedown:1,mousemove:2,mouseup:4};var pe={srcElement:"root",priority:0},ve=function(){function e(t){Object(i.a)(this,e),this.eventManager=t,this.handlers=[],this.handlersByElement=new Map,this.handleEvent=this.handleEvent.bind(this),this._active=!1}return Object(a.a)(e,[{key:"isEmpty",value:function(){return!this._active}},{key:"add",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=this.handlers,o=this.handlersByElement;n&&("object"!==Object(ge.a)(n)||n.addEventListener)&&(n={srcElement:n}),n=n?Object.assign({},pe,n):pe;var s=o.get(n.srcElement);s||(s=[],o.set(n.srcElement,s));var u={type:e,handler:t,srcElement:n.srcElement,priority:n.priority};r&&(u.once=!0),i&&(u.passive=!0),a.push(u),this._active=this._active||!u.passive;for(var A=s.length-1;A>=0&&!(s[A].priority>=u.priority);)A--;s.splice(A+1,0,u)}},{key:"remove",value:function(e,t){for(var n=this.handlers,r=this.handlersByElement,i=n.length-1;i>=0;i--){var a=n[i];if(a.type===e&&a.handler===t){n.splice(i,1);var o=r.get(a.srcElement);o.splice(o.indexOf(a),1),0===o.length&&r.delete(a.srcElement)}}this._active=n.some((function(e){return!e.passive}))}},{key:"handleEvent",value:function(e){if(!this.isEmpty()){for(var t=this._normalizeEvent(e),n=e.srcEvent.target;n&&n!==t.rootElement;){if(this._emit(t,n),t.handled)return;n=n.parentNode}this._emit(t,"root")}}},{key:"_emit",value:function(e,t){var n=this.handlersByElement.get(t);if(n){for(var r=!1,i=function(){e.handled=!0},a=function(){e.handled=!0,r=!0},o=[],s=0;s<n.length;s++){var u=n[s],A=u.type,c=u.handler,l=u.once;if(c(Object.assign({},e,{type:A,stopPropagation:i,stopImmediatePropagation:a})),l&&o.push(n[s]),r)break}for(var f=0;f<o.length;f++){var h=o[f];A=h.type,c=h.handler;this.remove(A,c)}}}},{key:"_normalizeEvent",value:function(e){var t=this.eventManager.element;return Object.assign({},e,function(e){var t=de[e.srcEvent.type];if(!t)return null;var n=e.srcEvent,r=n.buttons,i=n.button,a=n.which,o=!1,s=!1,u=!1;return 4===t||2===t&&!Number.isFinite(r)?(o=1===a,s=2===a,u=3===a):2===t?(o=Boolean(1&r),s=Boolean(4&r),u=Boolean(2&r)):1===t&&(o=0===i,s=1===i,u=2===i),{leftButton:o,middleButton:s,rightButton:u}}(e),function(e,t){var n=e.srcEvent;if(!e.center&&!Number.isFinite(n.clientX))return null;var r=e.center||{x:n.clientX,y:n.clientY},i=t.getBoundingClientRect(),a=i.width/t.offsetWidth,o=i.height/t.offsetHeight;return{center:r,offsetCenter:{x:(r.x-i.left-t.clientLeft)/a,y:(r.y-i.top-t.clientTop)/o}}}(e,t),{handled:!1,rootElement:t})}}]),e}(),ye={events:null,recognizers:null,recognizerOptions:{},Manager:K,touchAction:"none",tabIndex:0},me=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(i.a)(this,e),this.options=Object.assign({},ye,n),this.events=new Map,this._onBasicInput=this._onBasicInput.bind(this),this._onOtherEvent=this._onOtherEvent.bind(this),this.setElement(t);var r=n.events;r&&this.on(r)}return Object(a.a)(e,[{key:"setElement",value:function(e){var t=this;if(this.element&&this.destroy(),this.element=e,e){var n=this.options,r=n.Manager;for(var i in this.manager=new r(e,{touchAction:n.touchAction,recognizers:n.recognizers||V}).on("hammer.input",this._onBasicInput),n.recognizers||Object.keys(X).forEach((function(e){var n=t.manager.get(e);n&&X[e].forEach((function(e){n.recognizeWith(e)}))})),n.recognizerOptions){var a=this.manager.get(i);if(a){var o=n.recognizerOptions[i];delete o.enable,a.set(o)}}this.wheelInput=new ue(e,this._onOtherEvent,{enable:!1}),this.moveInput=new ce(e,this._onOtherEvent,{enable:!1}),this.keyInput=new fe(e,this._onOtherEvent,{enable:!1,tabIndex:n.tabIndex}),this.contextmenuInput=new he(e,this._onOtherEvent,{enable:!1});var s=!0,u=!1,A=void 0;try{for(var c,l=this.events[Symbol.iterator]();!(s=(c=l.next()).done);s=!0){var f=Object(H.a)(c.value,2),h=f[0],g=f[1];g.isEmpty()||(this._toggleRecognizer(g.recognizerName,!0),this.manager.on(h,g.handleEvent))}}catch(d){u=!0,A=d}finally{try{s||null==l.return||l.return()}finally{if(u)throw A}}}}},{key:"destroy",value:function(){this.element&&(this.wheelInput.destroy(),this.moveInput.destroy(),this.keyInput.destroy(),this.contextmenuInput.destroy(),this.manager.destroy(),this.wheelInput=null,this.moveInput=null,this.keyInput=null,this.contextmenuInput=null,this.manager=null,this.element=null)}},{key:"on",value:function(e,t,n){this._addEventHandler(e,t,n,!1)}},{key:"once",value:function(e,t,n){this._addEventHandler(e,t,n,!0)}},{key:"watch",value:function(e,t,n){this._addEventHandler(e,t,n,!1,!0)}},{key:"off",value:function(e,t){this._removeEventHandler(e,t)}},{key:"_toggleRecognizer",value:function(e,t){var n=this.manager;if(n){var r=n.get(e);if(r&&r.options.enable!==t){r.set({enable:t});var i=Z[e];i&&!this.options.recognizers&&i.forEach((function(i){var a=n.get(i);t?(a.requireFailure(e),r.dropRequireFailure(i)):a.dropRequireFailure(e)}))}this.wheelInput.enableEventType(e,t),this.moveInput.enableEventType(e,t),this.keyInput.enableEventType(e,t),this.contextmenuInput.enableEventType(e,t)}}},{key:"_addEventHandler",value:function(e,t,n,r,i){if("string"===typeof e){var a=this.manager,o=this.events,s=ie[e]||e,u=o.get(s);u||(u=new ve(this),o.set(s,u),u.recognizerName=re[s]||s,a&&a.on(s,u.handleEvent)),u.add(e,t,n,r,i),u.isEmpty()||this._toggleRecognizer(u.recognizerName,!0)}else for(var A in n=t,e)this._addEventHandler(A,e[A],n,r,i)}},{key:"_removeEventHandler",value:function(e,t){if("string"===typeof e){var n=this.events,r=ie[e]||e,i=n.get(r);if(i&&(i.remove(e,t),i.isEmpty())){var a=i.recognizerName,o=!1,s=!0,u=!1,A=void 0;try{for(var c,l=n.values()[Symbol.iterator]();!(s=(c=l.next()).done);s=!0){var f=c.value;if(f.recognizerName===a&&!f.isEmpty()){o=!0;break}}}catch(g){u=!0,A=g}finally{try{s||null==l.return||l.return()}finally{if(u)throw A}}o||this._toggleRecognizer(a,!1)}}else for(var h in e)this._removeEventHandler(h,e[h])}},{key:"_onBasicInput",value:function(e){var t=e.srcEvent,n=$[t.type];n&&this.manager.emit(n,e)}},{key:"_onOtherEvent",value:function(e){this.manager.emit(e.type,e)}}]),e}(),Ie=n(39);function be(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 Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?be(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ce(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return Be(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Be(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Be(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function we(){}n.d(t,"a",(function(){return ke}));var Qe={id:"deckgl-overlay",width:"100%",height:"100%",pickingRadius:0,layerFilter:null,glOptions:{},gl:null,layers:[],effects:[],views:null,controller:null,useDevicePixels:!0,touchAction:"none",_framebuffer:null,_animate:!1,_pickable:!0,_typedArrayManagerProps:{},onWebGLInitialized:we,onResize:we,onViewStateChange:we,onBeforeRender:we,onAfterRender:we,onLoad:we,onError:null,_onMetrics:null,getCursor:function(e){return e.isDragging?"grabbing":"grab"},debug:!1,drawPickingColors:!1},ke=function(){function e(t){Object(i.a)(this,e),t=Object.assign({},Qe,t),this.props={},this.width=0,this.height=0,this.viewManager=null,this.layerManager=null,this.effectManager=null,this.deckRenderer=null,this.deckPicker=null,this._needsRedraw=!0,this._pickRequest={},this._lastPointerDownInfo=null,this.viewState=null,this.interactiveState={isDragging:!1},this._onEvent=this._onEvent.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this._onPointerMove=this._onPointerMove.bind(this),this._pickAndCallback=this._pickAndCallback.bind(this),this._onRendererInitialized=this._onRendererInitialized.bind(this),this._onRenderFrame=this._onRenderFrame.bind(this),this._onViewStateChange=this._onViewStateChange.bind(this),this._onInteractiveStateChange=this._onInteractiveStateChange.bind(this),t.viewState&&t.initialViewState&&A.a.warn("View state tracking is disabled. Use either `initialViewState` for auto update or `viewState` for manual update.")(),"IE"===Object(L.getBrowser)()&&A.a.warn("IE 11 support will be deprecated in v8.0")(),t.gl||"undefined"!==typeof document&&(this.canvas=this._createCanvas(t)),this.animationLoop=this._createAnimationLoop(t),this.stats=new q.a({id:"deck.gl"}),this.metrics={fps:0,setPropsTime:0,updateAttributesTime:0,framesRedrawn:0,pickTime:0,pickCount:0,gpuTime:0,gpuTimePerFrame:0,cpuTime:0,cpuTimePerFrame:0,bufferMemory:0,textureMemory:0,renderbufferMemory:0,gpuMemory:0},this._metricsCounter=0,this.setProps(t),t._typedArrayManagerProps&&F.a.setProps(t._typedArrayManagerProps),this.animationLoop.start()}return Object(a.a)(e,[{key:"finalize",value:function(){this.animationLoop.stop(),this.animationLoop=null,this._lastPointerDownInfo=null,this.layerManager&&(this.layerManager.finalize(),this.layerManager=null,this.viewManager.finalize(),this.viewManager=null,this.effectManager.finalize(),this.effectManager=null,this.deckRenderer.finalize(),this.deckRenderer=null,this.deckPicker.finalize(),this.deckPicker=null,this.eventManager.destroy(),this.eventManager=null,this.tooltip.remove(),this.tooltip=null),this.props.canvas||this.props.gl||!this.canvas||(this.canvas.parentElement.removeChild(this.canvas),this.canvas=null)}},{key:"setProps",value:function(e){this.stats.get("setProps Time").timeStart(),"onLayerHover"in e&&A.a.removed("onLayerHover","onHover")(),"onLayerClick"in e&&A.a.removed("onLayerClick","onClick")(),e.initialViewState&&!Object(u.a)(this.props.initialViewState,e.initialViewState)&&(this.viewState=e.initialViewState),Object.assign(this.props,e),this._setCanvasSize(this.props);var t=Object.create(this.props);Object.assign(t,{views:this._getViews(),width:this.width,height:this.height,viewState:this._getViewState()}),this.animationLoop.setProps(t),this.layerManager&&(this.viewManager.setProps(t),this.layerManager.activateViewport(this.getViewports()[0]),this.layerManager.setProps(t),this.effectManager.setProps(t),this.deckRenderer.setProps(t),this.deckPicker.setProps(t)),this.stats.get("setProps Time").timeEnd()}},{key:"needsRedraw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};if(this.props._animate)return"Deck._animate";var t=this._needsRedraw;e.clearRedrawFlags&&(this._needsRedraw=!1);var n=this.viewManager.needsRedraw(e),r=this.layerManager.needsRedraw(e),i=this.effectManager.needsRedraw(e),a=this.deckRenderer.needsRedraw(e);return t=t||n||r||i||a}},{key:"redraw",value:function(e){if(this.layerManager){var t=e||this.needsRedraw({clearRedrawFlags:!0});t&&(this.stats.get("Redraw Count").incrementCount(),this.props._customRender?this.props._customRender(t):this._drawLayers(t))}}},{key:"getViews",value:function(){return this.viewManager.views}},{key:"getViewports",value:function(e){return this.viewManager.getViewports(e)}},{key:"pickObject",value:function(e){var t=this._pick("pickObject","pickObject Time",e).result;return t.length?t[0]:null}},{key:"pickMultipleObjects",value:function(e){return e.depth=e.depth||10,this._pick("pickObject","pickMultipleObjects Time",e).result}},{key:"pickObjects",value:function(e){return this._pick("pickObjects","pickObjects Time",e)}},{key:"_addResources",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var n in e)this.layerManager.resourceManager.add({resourceId:n,data:e[n],forceUpdate:t})}},{key:"_removeResources",value:function(e){var t,n=Ce(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.layerManager.resourceManager.remove(r)}}catch(i){n.e(i)}finally{n.f()}}},{key:"_pick",value:function(e,t,n){var r=this.stats;r.get("Pick Count").incrementCount(),r.get(t).timeStart();var i=this.deckPicker[e](Object.assign({layers:this.layerManager.getLayers(n),views:this.viewManager.getViews(),viewports:this.getViewports(n),onViewportActive:this.layerManager.activateViewport},n));return r.get(t).timeEnd(),i}},{key:"_createCanvas",value:function(e){var t=e.canvas;("string"===typeof t&&(t=document.getElementById(t),Object(s.a)(t)),t)||(t=document.createElement("canvas"),(e.parent||document.body).appendChild(t));var n=e.id,r=e.style;return t.id=n,Object.assign(t.style,r),t}},{key:"_setCanvasSize",value:function(e){if(this.canvas){var t=e.width,n=e.height;(t||0===t)&&(t=Number.isFinite(t)?"".concat(t,"px"):t,this.canvas.style.width=t),(n||0===n)&&(n=Number.isFinite(n)?"".concat(n,"px"):n,this.canvas.style.position="absolute",this.canvas.style.height=n)}}},{key:"_updateCanvasSize",value:function(){if(this._checkForCanvasSizeChange()){var e=this.width,t=this.height;this.viewManager.setProps({width:e,height:t}),this.props.onResize({width:this.width,height:this.height})}}},{key:"_checkForCanvasSizeChange",value:function(){var e=this.canvas;if(!e)return!1;var t=e.clientWidth||e.width,n=e.clientHeight||e.height;return(t!==this.width||n!==this.height)&&(this.width=t,this.height=n,!0)}},{key:"_createAnimationLoop",value:function(e){var t=this,n=e.width,r=e.height,i=e.gl,a=e.glOptions,o=e.debug,s=e.useDevicePixels,u=e.autoResizeDrawingBuffer;return new P.a({width:n,height:r,useDevicePixels:s,autoResizeDrawingBuffer:u,autoResizeViewport:!1,gl:i,onCreateContext:function(e){return Object(B.a)(Object.assign({},a,e,{canvas:t.canvas,debug:o}))},onInitialize:this._onRendererInitialized,onRender:this._onRenderFrame,onBeforeRender:e.onBeforeRender,onAfterRender:e.onAfterRender})}},{key:"_getViewState",value:function(){return this.props.viewState||this.viewState}},{key:"_getViews",value:function(){var e=this.props.views||[new g.a({id:"default-view"})];return(e=Array.isArray(e)?e:[e]).length&&this.props.controller&&(e[0].props.controller=this.props.controller),e}},{key:"_onPointerMove",value:function(e){var t=this._pickRequest;if("pointerleave"===e.type)t.x=-1,t.y=-1,t.radius=0;else{if(e.leftButton||e.rightButton)return;var n=e.offsetCenter;if(!n)return;t.x=n.x,t.y=n.y,t.radius=this.props.pickingRadius}this.layerManager&&(this.layerManager.context.mousePosition={x:t.x,y:t.y}),t.event=e,t.mode="hover"}},{key:"_pickAndCallback",value:function(){var e=this._pickRequest;if(e.event){var t,n=this._pick("pickObject","pickObject Time",e),r=n.result,i=n.emptyInfo,a=!1,o=Ce(r);try{for(o.s();!(t=o.n()).done;){var s=t.value;i=s,a=s.layer.onHover(s,e.event)}}catch(A){o.e(A)}finally{o.f()}if(!a&&this.props.onHover&&this.props.onHover(i,e.event),this.props.getTooltip){var u=this.props.getTooltip(i);this.tooltip.setTooltip(u,i.x,i.y)}e.event=null}}},{key:"_updateCursor",value:function(){var e=this.props.parent||this.canvas;e&&(e.style.cursor=this.props.getCursor(this.interactiveState))}},{key:"_setGLContext",value:function(e){if(!this.layerManager){this.canvas||(this.canvas=e.canvas,Object(B.e)(e,{enable:!0,copyState:!0})),this.tooltip=new N(this.canvas),Object(B.k)(e,{blend:!0,blendFunc:[770,771,1,771],polygonOffsetFill:!0,depthTest:!0,depthFunc:515}),this.props.onWebGLInitialized(e);var t=new U.a;for(var n in t.play(),this.animationLoop.attachTimeline(t),this.eventManager=new me(this.props.parent||e.canvas,{touchAction:this.props.touchAction,events:{pointerdown:this._onPointerDown,pointermove:this._onPointerMove,pointerleave:this._onPointerMove}}),Ie.b)this.eventManager.on(n,this._onEvent);this.viewManager=new h({timeline:t,eventManager:this.eventManager,onViewStateChange:this._onViewStateChange,onInteractiveStateChange:this._onInteractiveStateChange,views:this._getViews(),viewState:this._getViewState(),width:this.width,height:this.height});var r=this.viewManager.getViewports()[0];this.layerManager=new o.a(e,{deck:this,stats:this.stats,viewport:r,timeline:t}),this.effectManager=new m,this.deckRenderer=new b.a(e),this.deckPicker=new j(e),this.setProps(this.props),this._updateCanvasSize(),this.props.onLoad()}}},{key:"_drawLayers",value:function(e,t){var n=this.layerManager.context.gl;Object(B.k)(n,this.props.parameters),this.props.onBeforeRender({gl:n}),this.deckRenderer.renderLayers(Object.assign({target:this.props._framebuffer,layers:this.layerManager.getLayers(),viewports:this.viewManager.getViewports(),onViewportActive:this.layerManager.activateViewport,views:this.viewManager.getViews(),pass:"screen",redrawReason:e,effects:this.effectManager.getEffects()},t)),this.props.onAfterRender({gl:n})}},{key:"_onRendererInitialized",value:function(e){var t=e.gl;this._setGLContext(t)}},{key:"_onRenderFrame",value:function(e){this._getFrameStats(),this._metricsCounter++%60===0&&(this._getMetrics(),this.stats.reset(),A.a.table(4,this.metrics)(),this.props._onMetrics&&this.props._onMetrics(this.metrics)),this._updateCanvasSize(),this._updateCursor(),this.layerManager.updateLayers(),this._pickAndCallback(),this.redraw(!1),this.viewManager&&this.viewManager.updateViewStates()}},{key:"_onViewStateChange",value:function(e){var t=this.props.onViewStateChange(e)||e.viewState;this.viewState&&(this.viewState=Ee(Ee({},this.viewState),{},Object(r.a)({},e.viewId,t)),this.props.viewState||this.viewManager.setProps({viewState:this.viewState}))}},{key:"_onInteractiveStateChange",value:function(e){var t=e.isDragging,n=void 0!==t&&t;n!==this.interactiveState.isDragging&&(this.interactiveState.isDragging=n)}},{key:"_onEvent",value:function(e){var t=Ie.b[e.type],n=e.offsetCenter;if(t&&n){var r=this.layerManager.getLayers(),i=this.deckPicker.getLastPickedObject({x:n.x,y:n.y,layers:r,viewports:this.getViewports(n)},this._lastPointerDownInfo),a=i.layer,o=a&&(a[t.handler]||a.props[t.handler]),s=this.props[t.handler],u=!1;o&&(u=o.call(a,i,e)),!u&&s&&s(i,e)}}},{key:"_onPointerDown",value:function(e){var t=e.offsetCenter;this._lastPointerDownInfo=this.pickObject({x:t.x,y:t.y,radius:this.props.pickingRadius})}},{key:"_getFrameStats",value:function(){var e=this.stats;e.get("frameRate").timeEnd(),e.get("frameRate").timeStart();var t=this.animationLoop.stats;e.get("GPU Time").addTime(t.get("GPU Time").lastTiming),e.get("CPU Time").addTime(t.get("CPU Time").lastTiming)}},{key:"_getMetrics",value:function(){var e=this.metrics,t=this.stats;e.fps=t.get("frameRate").getHz(),e.setPropsTime=t.get("setProps Time").time,e.updateAttributesTime=t.get("Update Attributes").time,e.framesRedrawn=t.get("Redraw Count").count,e.pickTime=t.get("pickObject Time").time+t.get("pickMultipleObjects Time").time+t.get("pickObjects Time").time,e.pickCount=t.get("Pick Count").count,e.gpuTime=t.get("GPU Time").time,e.cpuTime=t.get("CPU Time").time,e.gpuTimePerFrame=t.get("GPU Time").getAverageTime(),e.cpuTimePerFrame=t.get("CPU Time").getAverageTime();var n=G.a.get("Memory Usage");e.bufferMemory=n.get("Buffer Memory").count,e.textureMemory=n.get("Texture Memory").count,e.renderbufferMemory=n.get("Renderbuffer Memory").count,e.gpuMemory=n.get("GPU Memory").count}}]),e}();ke.getPropTypes=function(e){return{id:e.string,width:e.oneOfType([e.number,e.string]),height:e.oneOfType([e.number,e.string]),layers:e.oneOfType([e.object,e.array]),layerFilter:e.func,views:e.oneOfType([e.object,e.array]),viewState:e.object,effects:e.arrayOf(e.instanceOf(I.a)),controller:e.oneOfType([e.func,e.bool,e.object]),gl:e.object,glOptions:e.object,parameters:e.object,pickingRadius:e.number,useDevicePixels:e.oneOfType([e.bool,e.number]),touchAction:e.string,onWebGLInitialized:e.func,onResize:e.func,onViewStateChange:e.func,onBeforeRender:e.func,onAfterRender:e.func,onLoad:e.func,onError:e.func,debug:e.bool,drawPickingColors:e.bool,_framebuffer:e.object,_animate:e.bool,_pickable:e.bool,_typedArrayManagerProps:e.object}},ke.defaultProps=Qe,ke.VERSION=T.a.VERSION},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(6),o=n(7),s=n(4),u=n(81),A=n(56),c=n(129);function l(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var f=function(e){Object(a.a)(n,e);var t=l(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}},{key:"fromArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)this[n]=e[n+t];return this.check()}},{key:"to",value:function(e){return e===this?this:Object(A.d)(e)?this.toArray(e):this.toObject(e)}},{key:"toTarget",value:function(e){return e?this.to(e):this}},{key:"toArray",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)e[t+n]=this[n];return e}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(A.a)}},{key:"formatString",value:function(e){for(var t="",n=0;n<this.ELEMENTS;++n)t+=(n>0?", ":"")+Object(A.c)(this[n],e);return"".concat(e.printTypes?this.constructor.name:"","[").concat(t,"]")}},{key:"equals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(!Object(A.b)(this[t],e[t]))return!1;return!0}},{key:"exactEquals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(this[t]!==e[t])return!1;return!0}},{key:"negate",value:function(){for(var e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}},{key:"lerp",value:function(e,t,n){void 0===n&&(n=t,t=e,e=this);for(var r=0;r<this.ELEMENTS;++r){var i=e[r];this[r]=i+n*(t[r]-i)}return this.check()}},{key:"min",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}},{key:"max",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}},{key:"clamp",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e[n]),t[n]);return this.check()}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]+=a[o];return this.check()}},{key:"subtract",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]-=a[o];return this.check()}},{key:"scale",value:function(e){if(Array.isArray(e))return this.multiply(e);for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"sub",value:function(e){return this.subtract(e)}},{key:"setScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}},{key:"addScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}},{key:"subScalar",value:function(e){return this.addScalar(-e)}},{key:"multiplyScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"divideScalar",value:function(e){return this.scale(1/e)}},{key:"clampScalar",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e),t);return this.check()}},{key:"multiplyByScalar",value:function(e){return this.scale(e)}},{key:"check",value:function(){if(A.a.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}},{key:"validate",value:function(){for(var e=this.length===this.ELEMENTS,t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}},{key:"ELEMENTS",get:function(){return Object(c.a)(!1),0}},{key:"RANK",get:function(){return Object(c.a)(!1),0}},{key:"elements",get:function(){return this}}]),n}(Object(u.a)(Array)),h=n(95);function g(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var d=function(e){Object(a.a)(n,e);var t=g(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"copy",value:function(e){return Object(c.a)(!1),this}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var e=0,t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(e){return Math.sqrt(this.distanceSquared(e))}},{key:"distanceSquared",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n){var r=this[n]-e[n];t+=r*r}return Object(h.a)(t)}},{key:"dot",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n)t+=this[n]*e[n];return Object(h.a)(t)}},{key:"normalize",value:function(){var e=this.magnitude();if(0!==e)for(var t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}},{key:"multiply",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]*=a[o];return this.check()}},{key:"divide",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]/=a[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(e){return this.distance(e)}},{key:"distanceToSquared",value:function(e){return this.distanceSquared(e)}},{key:"getComponent",value:function(e){return Object(c.a)(e>=0&&e<this.ELEMENTS,"index is out of range"),Object(h.a)(this[e])}},{key:"setComponent",value:function(e,t){return Object(c.a)(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=t,this.check()}},{key:"addVectors",value:function(e,t){return this.copy(e).add(t)}},{key:"subVectors",value:function(e,t){return this.copy(e).subtract(t)}},{key:"multiplyVectors",value:function(e,t){return this.copy(e).multiply(t)}},{key:"addScaledVector",value:function(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}},{key:"x",get:function(){return this[0]},set:function(e){this[0]=Object(h.a)(e)}},{key:"y",get:function(){return this[1]},set:function(e){this[1]=Object(h.a)(e)}}]),n}(f),p=n(17);function v(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}n.d(t,"a",(function(){return I}));var y=[0,0,0],m={},I=function(e){Object(a.a)(n,e);var t=v(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object(r.a)(this,n),e=t.call(this,-0,-0,-0),1===arguments.length&&Object(A.d)(i)?e.copy(i):(A.a.debug&&(Object(h.a)(i),Object(h.a)(a),Object(h.a)(o)),e[0]=i,e[1]=a,e[2]=o),e}return Object(i.a)(n,null,[{key:"ZERO",get:function(){return m.ZERO=m.ZERO||Object.freeze(new n(0,0,0,0))}}]),Object(i.a)(n,[{key:"set",value:function(e,t,n){return this[0]=e,this[1]=t,this[2]=n,this.check()}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}},{key:"fromObject",value:function(e){return A.a.debug&&(Object(h.a)(e.x),Object(h.a)(e.y),Object(h.a)(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}},{key:"toObject",value:function(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}},{key:"angle",value:function(e){return p.a(this,e)}},{key:"cross",value:function(e){return p.c(this,this,e),this.check()}},{key:"rotateX",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?y:n;return p.k(this,this,r,t),this.check()}},{key:"rotateY",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?y:n;return p.l(this,this,r,t),this.check()}},{key:"rotateZ",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?y:n;return p.m(this,this,r,t),this.check()}},{key:"transform",value:function(e){return this.transformAsPoint(e)}},{key:"transformAsPoint",value:function(e){return p.q(this,this,e),this.check()}},{key:"transformAsVector",value:function(e){return function(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[3]*r+n[7]*i+n[11]*a||1;e[0]=(n[0]*r+n[4]*i+n[8]*a)/o,e[1]=(n[1]*r+n[5]*i+n[9]*a)/o,e[2]=(n[2]*r+n[6]*i+n[10]*a)/o}(this,this,e),this.check()}},{key:"transformByMatrix3",value:function(e){return p.p(this,this,e),this.check()}},{key:"transformByMatrix2",value:function(e){return function(e,t,n){var r=t[0],i=t[1];e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2]}(this,this,e),this.check()}},{key:"transformByQuaternion",value:function(e){return p.r(this,this,e),this.check()}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(e){this[2]=Object(h.a)(e)}}]),n}(d)},function(e,t,n){"use strict";var r=n(16),i=n(3),a=n(2),o=n(6),s=n(7),u=n(4),A=n(131),c=n(81),l=n(59),f=n(184);function h(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}function g(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}var d=function(e){Object(o.a)(n,e);var t=g(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"toString",value:function(){var e="[";if(l.a.printRowMajor){e+="row-major:";for(var t=0;t<this.RANK;++t)for(var n=0;n<this.RANK;++n)e+=" ".concat(this[n*this.RANK+t])}else{e+="column-major:";for(var r=0;r<this.ELEMENTS;++r)e+=" ".concat(this[r])}return e+="]"}},{key:"getElementIndex",value:function(e,t){return t*this.RANK+e}},{key:"getElement",value:function(e,t){return this[t*this.RANK+e]}},{key:"setElement",value:function(e,t,n){return this[t*this.RANK+e]=Object(A.a)(n),this}},{key:"getColumn",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),n=e*this.RANK,r=0;r<this.RANK;++r)t[r]=this[n+r];return t}},{key:"setColumn",value:function(e,t){for(var n=e*this.RANK,r=0;r<this.RANK;++r)this[n+r]=t[r];return this}}]),n}(function(e){Object(o.a)(n,e);var t=h(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}},{key:"fromArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)this[n]=e[n+t];return this.check()}},{key:"to",value:function(e){return e===this?this:Object(l.d)(e)?this.toArray(e):this.toObject(e)}},{key:"toTarget",value:function(e){return e?this.to(e):this}},{key:"toArray",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)e[t+n]=this[n];return e}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(l.a)}},{key:"formatString",value:function(e){for(var t="",n=0;n<this.ELEMENTS;++n)t+=(n>0?", ":"")+Object(l.c)(this[n],e);return"".concat(e.printTypes?this.constructor.name:"","[").concat(t,"]")}},{key:"equals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(!Object(l.b)(this[t],e[t]))return!1;return!0}},{key:"exactEquals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(this[t]!==e[t])return!1;return!0}},{key:"negate",value:function(){for(var e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}},{key:"lerp",value:function(e,t,n){void 0===n&&(n=t,t=e,e=this);for(var r=0;r<this.ELEMENTS;++r){var i=e[r];this[r]=i+n*(t[r]-i)}return this.check()}},{key:"min",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}},{key:"max",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}},{key:"clamp",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e[n]),t[n]);return this.check()}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]+=a[o];return this.check()}},{key:"subtract",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]-=a[o];return this.check()}},{key:"scale",value:function(e){if(Array.isArray(e))return this.multiply(e);for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"sub",value:function(e){return this.subtract(e)}},{key:"setScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}},{key:"addScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}},{key:"subScalar",value:function(e){return this.addScalar(-e)}},{key:"multiplyScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"divideScalar",value:function(e){return this.scale(1/e)}},{key:"clampScalar",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e),t);return this.check()}},{key:"multiplyByScalar",value:function(e){return this.scale(e)}},{key:"check",value:function(){if(l.a.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}},{key:"validate",value:function(){for(var e=this.length===this.ELEMENTS,t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}},{key:"ELEMENTS",get:function(){return Object(f.a)(!1),0}},{key:"RANK",get:function(){return Object(f.a)(!1),0}},{key:"elements",get:function(){return this}}]),n}(Object(c.a)(Array)));var p=n(10),v=n(32),y=n(17),m=n(40);function I(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}n.d(t,"a",(function(){return w}));var b=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),E=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),C=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),B={},w=function(e){Object(o.a)(n,e);var t=I(n);function n(e){var r;return Object(i.a)(this,n),r=t.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(e)?r.copy(e):r.identity(),r}return Object(a.a)(n,[{key:"INDICES",get:function(){return C}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}}],[{key:"IDENTITY",get:function(){return B.IDENTITY=B.IDENTITY||Object.freeze(new n(b)),B.IDENTITY}},{key:"ZERO",get:function(){return B.ZERO=B.ZERO||Object.freeze(new n(E)),B.ZERO}}]),Object(a.a)(n,[{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this[9]=e[9],this[10]=e[10],this[11]=e[11],this[12]=e[12],this[13]=e[13],this[14]=e[14],this[15]=e[15],this.check()}},{key:"set",value:function(e,t,n,r,i,a,o,s,u,A,c,l,f,h,g,d){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this[4]=i,this[5]=a,this[6]=o,this[7]=s,this[8]=u,this[9]=A,this[10]=c,this[11]=l,this[12]=f,this[13]=h,this[14]=g,this[15]=d,this.check()}},{key:"setRowMajor",value:function(e,t,n,r,i,a,o,s,u,A,c,l,f,h,g,d){return this[0]=e,this[1]=i,this[2]=u,this[3]=f,this[4]=t,this[5]=a,this[6]=A,this[7]=h,this[8]=n,this[9]=o,this[10]=c,this[11]=g,this[12]=r,this[13]=s,this[14]=l,this[15]=d,this.check()}},{key:"toRowMajor",value:function(e){return e[0]=this[0],e[1]=this[4],e[2]=this[8],e[3]=this[12],e[4]=this[1],e[5]=this[5],e[6]=this[9],e[7]=this[13],e[8]=this[2],e[9]=this[6],e[10]=this[10],e[11]=this[14],e[12]=this[3],e[13]=this[7],e[14]=this[11],e[15]=this[15],e}},{key:"identity",value:function(){return this.copy(b)}},{key:"fromQuaternion",value:function(e){return p.c(this,e),this.check()}},{key:"frustum",value:function(e){var t=e.left,r=e.right,i=e.bottom,a=e.top,o=e.near,s=e.far;return s===1/0?n._computeInfinitePerspectiveOffCenter(this,t,r,i,a,o):p.d(this,t,r,i,a,o,s),this.check()}},{key:"lookAt",value:function(e,t,n){if(1===arguments.length){var r=e;e=r.eye,t=r.center,n=r.up}return t=t||[0,0,0],n=n||[0,1,0],p.g(this,e,t,n),this.check()}},{key:"ortho",value:function(e){var t=e.left,n=e.right,r=e.bottom,i=e.top,a=e.near,o=void 0===a?.1:a,s=e.far,u=void 0===s?500:s;return p.i(this,t,n,r,i,o,u),this.check()}},{key:"orthographic",value:function(e){var t=e.fovy,r=void 0===t?45*Math.PI/180:t,i=e.aspect,a=void 0===i?1:i,o=e.focalDistance,s=void 0===o?1:o,u=e.near,A=void 0===u?.1:u,c=e.far,l=void 0===c?500:c;if(r>2*Math.PI)throw Error("radians");var f=r/2,h=s*Math.tan(f),g=h*a;return(new n).ortho({left:-g,right:g,bottom:-h,top:h,near:A,far:l})}},{key:"perspective",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fovy,n=void 0===t?void 0:t,r=e.fov,i=void 0===r?45*Math.PI/180:r,a=e.aspect,o=void 0===a?1:a,s=e.near,u=void 0===s?.1:s,A=e.far,c=void 0===A?500:A;if((n=n||i)>2*Math.PI)throw Error("radians");return p.j(this,n,o,u,c),this.check()}},{key:"determinant",value:function(){return p.a(this)}},{key:"getScale",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),e[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),e[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),e}},{key:"getTranslation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=this[12],e[1]=this[13],e[2]=this[14],e}},{key:"getRotation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(t||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=0,e[4]=this[4]*r,e[5]=this[5]*i,e[6]=this[6]*a,e[7]=0,e[8]=this[8]*r,e[9]=this[9]*i,e[10]=this[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{key:"getRotationMatrix3",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(t||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=this[4]*r,e[4]=this[5]*i,e[5]=this[6]*a,e[6]=this[8]*r,e[7]=this[9]*i,e[8]=this[10]*a,e}},{key:"transpose",value:function(){return p.q(this,this),this.check()}},{key:"invert",value:function(){return p.f(this,this),this.check()}},{key:"multiplyLeft",value:function(e){return p.h(this,e,this),this.check()}},{key:"multiplyRight",value:function(e){return p.h(this,this,e),this.check()}},{key:"rotateX",value:function(e){return p.l(this,this,e),this.check()}},{key:"rotateY",value:function(e){return p.m(this,this,e),this.check()}},{key:"rotateZ",value:function(e){return p.n(this,this,e),this.check()}},{key:"rotateXYZ",value:function(e){var t=Object(r.a)(e,3),n=t[0],i=t[1],a=t[2];return this.rotateX(n).rotateY(i).rotateZ(a)}},{key:"rotateAxis",value:function(e,t){return p.k(this,this,e,t),this.check()}},{key:"scale",value:function(e){return Array.isArray(e)?p.o(this,this,e):p.o(this,this,[e,e,e]),this.check()}},{key:"translate",value:function(e){return p.p(this,this,e),this.check()}},{key:"transform",value:function(e,t){return 4===e.length?(t=m.n(t||[-0,-0,-0,-0],e,this),Object(A.b)(t,4),t):this.transformAsPoint(e,t)}},{key:"transformAsPoint",value:function(e,t){switch(e.length){case 2:t=v.j(t||[-0,-0],e,this);break;case 3:t=y.q(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return Object(A.b)(t,e.length),t}},{key:"transformAsVector",value:function(e,t){switch(e.length){case 2:t=function(e,t,n){var r=t[0],i=t[1],a=n[3]*r+n[7]*i||1;return e[0]=(n[0]*r+n[4]*i)/a,e[1]=(n[1]*r+n[5]*i)/a,e}(t||[-0,-0],e,this);break;case 3:t=function(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[3]*r+n[7]*i+n[11]*a||1;return e[0]=(n[0]*r+n[4]*i+n[8]*a)/o,e[1]=(n[1]*r+n[5]*i+n[9]*a)/o,e[2]=(n[2]*r+n[6]*i+n[10]*a)/o,e}(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return Object(A.b)(t,e.length),t}},{key:"makeRotationX",value:function(e){return this.identity().rotateX(e)}},{key:"makeTranslation",value:function(e,t,n){return this.identity().translate([e,t,n])}},{key:"transformPoint",value:function(e,t){return Object(A.c)("Matrix4.transformPoint","3.0"),this.transformAsPoint(e,t)}},{key:"transformVector",value:function(e,t){return Object(A.c)("Matrix4.transformVector","3.0"),this.transformAsPoint(e,t)}},{key:"transformDirection",value:function(e,t){return Object(A.c)("Matrix4.transformDirection","3.0"),this.transformAsVector(e,t)}}],[{key:"_computeInfinitePerspectiveOffCenter",value:function(e,t,n,r,i,a){var o=2*a/(n-t),s=2*a/(i-r),u=(n+t)/(n-t),A=(i+r)/(i-r),c=-2*a;return e[0]=o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=u,e[9]=A,e[10]=-1,e[11]=-1,e[12]=0,e[13]=0,e[14]=c,e[15]=0,e}}]),n}(d)},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(29),o=n(6),s=n(7),u=n(4),A=n(412),c=n(411),l=n(217),f=n(311),h=n(121);function g(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}n.d(t,"a",(function(){return v}));var d=[0,0,0,255],p={getSourcePosition:{type:"accessor",value:function(e){return e.sourcePosition}},getTargetPosition:{type:"accessor",value:function(e){return e.targetPosition}},getSourceColor:{type:"accessor",value:d},getTargetColor:{type:"accessor",value:d},getWidth:{type:"accessor",value:1},getHeight:{type:"accessor",value:1},getTilt:{type:"accessor",value:0},greatCircle:!1,widthUnits:"pixels",widthScale:{type:"number",value:1,min:0},widthMinPixels:{type:"number",value:0,min:0},widthMaxPixels:{type:"number",value:Number.MAX_SAFE_INTEGER,min:0}},v=function(e){Object(o.a)(n,e);var t=g(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"getShaders",value:function(){return Object(a.a)(Object(u.a)(n.prototype),"getShaders",this).call(this,{vs:"#define SHADER_NAME arc-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec4 instanceSourceColors;\nattribute vec4 instanceTargetColors;\nattribute vec3 instanceSourcePositions;\nattribute vec3 instanceSourcePositions64Low;\nattribute vec3 instanceTargetPositions;\nattribute vec3 instanceTargetPositions64Low;\nattribute vec3 instancePickingColors;\nattribute float instanceWidths;\nattribute float instanceHeights;\nattribute float instanceTilts;\n\nuniform bool greatCircle;\nuniform float numSegments;\nuniform float opacity;\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\n\nvarying vec4 vColor;\nvarying vec2 uv;\nvarying float isValid;\n\nfloat paraboloid(float distance, float sourceZ, float targetZ, float ratio) {\n\n  float deltaZ = targetZ - sourceZ;\n  float dh = distance * instanceHeights;\n  float unitZ = dh == 0.0 ? 0.0 : deltaZ / dh;\n  float p2 = unitZ * unitZ + 1.0;\n  float dir = step(deltaZ, 0.0);\n  float z0 = mix(sourceZ, targetZ, dir);\n  float r = mix(ratio, 1.0 - ratio, dir);\n  return sqrt(r * (p2 - r)) * dh + z0;\n}\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {\n  vec2 dir_screenspace = normalize(line_clipspace * project_uViewportSize);\n  dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n  return dir_screenspace * offset_direction * width / 2.0;\n}\n\nfloat getSegmentRatio(float index) {\n  return smoothstep(0.0, 1.0, index / (numSegments - 1.0));\n}\n\nvec3 interpolateFlat(vec3 source, vec3 target, float segmentRatio) {\n  float distance = length(source.xy - target.xy);\n  float z = paraboloid(distance, source.z, target.z, segmentRatio);\n\n  float tiltAngle = radians(instanceTilts);\n  vec2 tiltDirection = normalize(target.xy - source.xy);\n  vec2 tilt = vec2(-tiltDirection.y, tiltDirection.x) * z * sin(tiltAngle);\n\n  return vec3(\n    mix(source.xy, target.xy, segmentRatio) + tilt,\n    z * cos(tiltAngle)\n  );\n}\nfloat getAngularDist (vec2 source, vec2 target) {\n  vec2 sourceRadians = radians(source);\n  vec2 targetRadians = radians(target);\n  vec2 sin_half_delta = sin((sourceRadians - targetRadians) / 2.0);\n  vec2 shd_sq = sin_half_delta * sin_half_delta;\n\n  float a = shd_sq.y + cos(sourceRadians.y) * cos(targetRadians.y) * shd_sq.x;\n  return 2.0 * asin(sqrt(a));\n}\n\nvec3 interpolateGreatCircle(vec3 source, vec3 target, vec3 source3D, vec3 target3D, float angularDist, float t) {\n  vec2 lngLat;\n  if(abs(angularDist - PI) < 0.001) {\n    lngLat = (1.0 - t) * source.xy + t * target.xy;\n  } else {\n    float a = sin((1.0 - t) * angularDist);\n    float b = sin(t * angularDist);\n    vec3 p = source3D.yxz * a + target3D.yxz * b;\n    lngLat = degrees(vec2(atan(p.y, -p.x), atan(p.z, length(p.xy))));\n  }\n\n  float z = paraboloid(angularDist * EARTH_RADIUS, source.z, target.z, t);\n\n  return vec3(lngLat, z);\n}\n\nvoid main(void) {\n  geometry.worldPosition = instanceSourcePositions;\n  geometry.worldPositionAlt = instanceTargetPositions;\n\n  float segmentIndex = positions.x;\n  float segmentRatio = getSegmentRatio(segmentIndex);\n  float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\n  isValid = 1.0;\n\n  uv = vec2(segmentRatio, positions.y);\n  geometry.uv = uv;\n  geometry.pickingColor = instancePickingColors;\n\n  vec4 curr;\n  vec4 next;\n  vec3 source;\n  vec3 target;\n\n  if ((greatCircle || project_uProjectionMode == PROJECTION_MODE_GLOBE) && project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n    source = project_globe_(vec3(instanceSourcePositions.xy, 0.0));\n    target = project_globe_(vec3(instanceTargetPositions.xy, 0.0));\n    float angularDist = getAngularDist(instanceSourcePositions.xy, instanceTargetPositions.xy);\n  \n    float prevSegmentRatio = getSegmentRatio(max(0.0, segmentIndex - 1.0));\n    float nextSegmentRatio = getSegmentRatio(min(numSegments, segmentIndex + 1.0));\n\n    vec3 prevPos = interpolateGreatCircle(instanceSourcePositions, instanceTargetPositions, source, target, angularDist, prevSegmentRatio);\n    vec3 currPos = interpolateGreatCircle(instanceSourcePositions, instanceTargetPositions, source, target, angularDist, segmentRatio);\n    vec3 nextPos = interpolateGreatCircle(instanceSourcePositions, instanceTargetPositions, source, target, angularDist, nextSegmentRatio);\n\n    if (abs(currPos.x - prevPos.x) > 180.0) {\n      indexDir = -1.0;\n      isValid = 0.0;\n    } else if (abs(currPos.x - nextPos.x) > 180.0) {\n      indexDir = 1.0;\n      isValid = 0.0;\n    }\n    nextPos = indexDir < 0.0 ? prevPos : nextPos;\n    nextSegmentRatio = indexDir < 0.0 ? prevSegmentRatio : nextSegmentRatio;\n\n    if (isValid == 0.0) {\n      nextPos.x += nextPos.x > 0.0 ? -360.0 : 360.0;\n      float t = ((currPos.x > 0.0 ? 180.0 : -180.0) - currPos.x) / (nextPos.x - currPos.x);\n      currPos = mix(currPos, nextPos, t);\n      segmentRatio = mix(segmentRatio, nextSegmentRatio, t);\n    }\n\n    vec3 currPos64Low = mix(instanceSourcePositions64Low, instanceTargetPositions64Low, segmentRatio);\n    vec3 nextPos64Low = mix(instanceSourcePositions64Low, instanceTargetPositions64Low, nextSegmentRatio);\n  \n    curr = project_position_to_clipspace(currPos, currPos64Low, vec3(0.0), geometry.position);\n    next = project_position_to_clipspace(nextPos, nextPos64Low, vec3(0.0));\n  \n  } else {\n    source = project_position(instanceSourcePositions, instanceSourcePositions64Low);\n    target = project_position(instanceTargetPositions, instanceTargetPositions64Low);\n\n    float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);\n    vec3 currPos = interpolateFlat(source, target, segmentRatio);\n    vec3 nextPos = interpolateFlat(source, target, nextSegmentRatio);\n    curr = project_common_position_to_clipspace(vec4(currPos, 1.0));\n    next = project_common_position_to_clipspace(vec4(nextPos, 1.0));\n    geometry.position = vec4(currPos, 1.0);\n  }\n  float widthPixels = clamp(\n    project_size_to_pixel(instanceWidths * widthScale),\n    widthMinPixels, widthMaxPixels\n  );\n  vec3 offset = vec3(\n    getExtrusionOffset((next.xy - curr.xy) * indexDir, positions.y, widthPixels),\n    0.0);\n  DECKGL_FILTER_SIZE(offset, geometry);\n  gl_Position = curr + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  vec4 color = mix(instanceSourceColors, instanceTargetColors, segmentRatio);\n  vColor = vec4(color.rgb, color.a * opacity);\n  DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME arc-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 uv;\nvarying float isValid;\n\nvoid main(void) {\n  if (isValid == 0.0) {\n    discard;\n  }\n\n  gl_FragColor = vColor;\n  geometry.uv = uv;\n\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[A.a,c.a]})}},{key:"initializeState",value:function(){this.getAttributeManager().addInstanced({instanceSourcePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getSourcePosition"},instanceTargetPositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getTargetPosition"},instanceSourceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getSourceColor",defaultValue:d},instanceTargetColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getTargetColor",defaultValue:d},instanceWidths:{size:1,transition:!0,accessor:"getWidth",defaultValue:1},instanceHeights:{size:1,transition:!0,accessor:"getHeight",defaultValue:1},instanceTilts:{size:1,transition:!0,accessor:"getTilt",defaultValue:0}})}},{key:"updateState",value:function(e){var t=e.props,r=e.oldProps,i=e.changeFlags;if(Object(a.a)(Object(u.a)(n.prototype),"updateState",this).call(this,{props:t,oldProps:r,changeFlags:i}),i.extensionsChanged){var o=this.context.gl;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(o)}),this.getAttributeManager().invalidateAll()}}},{key:"draw",value:function(e){var t=e.uniforms,n=this.context.viewport,r=this.props,i=r.widthUnits,a=r.widthScale,o=r.widthMinPixels,s=r.widthMaxPixels,u=r.greatCircle,A="pixels"===i?n.metersPerPixel:1;this.state.model.setUniforms(t).setUniforms({greatCircle:u,widthScale:a*A,widthMinPixels:o,widthMaxPixels:s}).draw()}},{key:"_getModel",value:function(e){for(var t=[],n=0;n<50;n++)t=t.concat([n,1,0,n,-1,0]);var r=new f.a(e,Object.assign({},this.getShaders(),{id:this.props.id,geometry:new h.a({drawMode:5,attributes:{positions:new Float32Array(t)}}),isInstanced:!0}));return r.setUniforms({numSegments:50}),r}}]),n}(l.a);v.layerName="ArcLayer",v.defaultProps=p},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(29),o=n(6),s=n(7),u=n(4),A=n(412),c=n(931),l=n(411),f=n(217),h=n(311),g=n(121);function d(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}n.d(t,"a",(function(){return m}));var p=[0,0,0,255],v=[0,0,1],y={sizeUnits:"pixels",pointSize:{type:"number",min:0,value:10},getPosition:{type:"accessor",value:function(e){return e.position}},getNormal:{type:"accessor",value:v},getColor:{type:"accessor",value:p},material:!0,radiusPixels:{deprecatedFor:"pointSize"}};var m=function(e){Object(o.a)(n,e);var t=d(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"getShaders",value:function(e){return Object(a.a)(Object(u.a)(n.prototype),"getShaders",this).call(this,{vs:"#define SHADER_NAME point-cloud-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 instanceNormals;\nattribute vec4 instanceColors;\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute vec3 instancePickingColors;\n\nuniform float opacity;\nuniform float radiusPixels;\n\nvarying vec4 vColor;\nvarying vec2 unitPosition;\n\nvoid main(void) {\n  geometry.worldPosition = instancePositions;\n  geometry.normal = project_normal(instanceNormals);\n  unitPosition = positions.xy;\n  geometry.uv = unitPosition;\n  geometry.pickingColor = instancePickingColors;\n  vec3 offset = vec3(positions.xy * radiusPixels, 0.0);\n  DECKGL_FILTER_SIZE(offset, geometry);\n\n  gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.), geometry.position);\n  gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n  vec3 lightColor = lighting_getLightColor(instanceColors.rgb, project_uCameraPosition, geometry.position.xyz, geometry.normal);\n  vColor = vec4(lightColor, instanceColors.a * opacity);\n  DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME point-cloud-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 unitPosition;\n\nvoid main(void) {\n  geometry.uv = unitPosition;\n\n  float distToCenter = length(unitPosition);\n\n  if (distToCenter > 1.0) {\n    discard;\n  }\n\n  gl_FragColor = vColor;\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[A.a,c.a,l.a]})}},{key:"initializeState",value:function(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceNormals:{size:3,transition:!0,accessor:"getNormal",defaultValue:v},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getColor",defaultValue:p}})}},{key:"updateState",value:function(e){var t=e.props,r=e.oldProps,i=e.changeFlags;if(Object(a.a)(Object(u.a)(n.prototype),"updateState",this).call(this,{props:t,oldProps:r,changeFlags:i}),i.extensionsChanged){var o=this.context.gl;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(o)}),this.getAttributeManager().invalidateAll()}i.dataChanged&&function(e){var t=e.header,n=e.attributes;t&&n&&(e.length=t.vertexCount,n.POSITION&&(n.instancePositions=n.POSITION),n.NORMAL&&(n.instanceNormals=n.NORMAL),n.COLOR_0&&(n.instanceColors=n.COLOR_0))}(t.data)}},{key:"draw",value:function(e){var t=e.uniforms,n=this.context.viewport,r=this.props,i=r.pointSize,a="meters"===r.sizeUnits?1/n.metersPerPixel:1;this.state.model.setUniforms(Object.assign({},t,{radiusPixels:i*a})).draw()}},{key:"_getModel",value:function(e){for(var t=[],n=0;n<3;n++){var r=n/3*Math.PI*2;t.push(2*Math.cos(r),2*Math.sin(r),0)}return new h.a(e,Object.assign({},this.getShaders(),{id:this.props.id,geometry:new g.a({drawMode:4,attributes:{positions:new Float32Array(t)}}),isInstanced:!0}))}}]),n}(f.a);m.layerName="PointCloudLayer",m.defaultProps=y},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(6),o=n(7),s=n(4),u=n(44),A=n(322),c=n(269),l=n(186),f=n(218),h=n(309);function g(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={pointFeatures:[],lineFeatures:[],polygonFeatures:[],polygonOutlineFeatures:[]},i=n.startRow,a=void 0===i?0:i,o=n.endRow,s=void 0===o?e.length:o,A=a;A<s;A++){var c=e[A];u.a.assert(c&&c.geometry,"GeoJSON does not have geometry");var l=c.geometry;if("GeometryCollection"===l.type){u.a.assert(Array.isArray(l.geometries),"GeoJSON does not have geometries array");for(var f=l.geometries,h=0;h<f.length;h++){var g=f[h];d(g,r,t,c,A)}}else d(l,r,t,c,A)}return r}function d(e,t,n,r,i){var a=e.type,o=e.coordinates,s=t.pointFeatures,A=t.lineFeatures,c=t.polygonFeatures,l=t.polygonOutlineFeatures;if(function(e,t){var n=p[e];u.a.assert(n,"Unknown GeoJSON type ".concat(e));for(;t&&--n>0;)t=t[0];return t&&Number.isFinite(t[0])}(a,o))switch(a){case"Point":s.push(n({geometry:e},r,i));break;case"MultiPoint":o.forEach((function(e){s.push(n({geometry:{type:"Point",coordinates:e}},r,i))}));break;case"LineString":A.push(n({geometry:e},r,i));break;case"MultiLineString":o.forEach((function(e){A.push(n({geometry:{type:"LineString",coordinates:e}},r,i))}));break;case"Polygon":c.push(n({geometry:e},r,i)),o.forEach((function(e){l.push(n({geometry:{type:"LineString",coordinates:e}},r,i))}));break;case"MultiPolygon":o.forEach((function(e){c.push(n({geometry:{type:"Polygon",coordinates:e}},r,i)),e.forEach((function(e){l.push(n({geometry:{type:"LineString",coordinates:e}},r,i))}))}))}else u.a.warn("".concat(a," coordinates are malformed"))()}var p={Point:1,MultiPoint:2,LineString:2,MultiLineString:3,Polygon:3,MultiPolygon:4};function v(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}n.d(t,"a",(function(){return E}));var I={stroked:!0,filled:!0,extruded:!1,wireframe:!1,lineWidthUnits:"meters",lineWidthScale:1,lineWidthMinPixels:0,lineWidthMaxPixels:Number.MAX_SAFE_INTEGER,lineJointRounded:!1,lineMiterLimit:4,elevationScale:1,pointRadiusUnits:"meters",pointRadiusScale:1,pointRadiusMinPixels:0,pointRadiusMaxPixels:Number.MAX_SAFE_INTEGER,getLineColor:{type:"accessor",value:[0,0,0,255]},getFillColor:{type:"accessor",value:[0,0,0,255]},getRadius:{type:"accessor",value:1},getLineWidth:{type:"accessor",value:1},getElevation:{type:"accessor",value:1e3},material:!0};function b(e){return e.geometry.coordinates}var E=function(e){Object(a.a)(n,e);var t=m(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"initializeState",value:function(){this.state={features:{}},this.props.getLineDashArray&&u.a.removed("getLineDashArray","PathStyleExtension")()}},{key:"updateState",value:function(e){var t=e.props,n=e.changeFlags;if(n.dataChanged){var r=function(e){if(Array.isArray(e))return e;switch(u.a.assert(e.type,"GeoJSON does not have type"),e.type){case"Feature":return[e];case"FeatureCollection":return u.a.assert(Array.isArray(e.features),"GeoJSON does not have features array"),e.features;default:return[{geometry:e}]}}(t.data),i=this.getSubLayerRow.bind(this);if(Array.isArray(n.dataChanged)){var a=this.state.features,o={},s={};for(var A in a)o[A]=a[A].slice(),s[A]=[];var c,l=v(n.dataChanged);try{for(l.s();!(c=l.n()).done;){var f=c.value,d=g(r,i,f);for(var p in a)s[p].push(Object(h.a)({data:o[p],getIndex:function(e){return e.__source.index},dataRange:f,replace:d[p]}))}}catch(y){l.e(y)}finally{l.f()}this.setState({features:o,featuresDiff:s})}else this.setState({features:g(r,i),featuresDiff:{}})}}},{key:"renderLayers",value:function(){var e=this.state,t=e.features,n=e.featuresDiff,r=t.pointFeatures,i=t.lineFeatures,a=t.polygonFeatures,o=t.polygonOutlineFeatures,s=this.props,u=s.stroked,A=s.filled,h=s.extruded,g=s.wireframe,d=s.material,p=s.transitions,v=this.props,y=v.lineWidthUnits,m=v.lineWidthScale,I=v.lineWidthMinPixels,E=v.lineWidthMaxPixels,C=v.lineJointRounded,B=v.lineMiterLimit,w=v.pointRadiusUnits,Q=v.pointRadiusScale,k=v.pointRadiusMinPixels,_=v.pointRadiusMaxPixels,x=v.elevationScale,S=v.lineDashJustified,O=this.props,D=O.getLineColor,R=O.getFillColor,j=O.getRadius,M=O.getLineWidth,N=O.getLineDashArray,F=O.getElevation,T=O.updateTriggers,L=this.getSubLayerClass("polygons-fill",f.a),P=this.getSubLayerClass("polygons-stroke",l.a),U=this.getSubLayerClass("line-strings",l.a),G=this.getSubLayerClass("points",c.a),q=this.shouldRenderSubLayer("polygons-fill",a)&&new L({_dataDiff:n.polygonFeatures&&function(){return n.polygonFeatures},extruded:h,elevationScale:x,filled:A,wireframe:g,material:d,getElevation:this.getSubLayerAccessor(F),getFillColor:this.getSubLayerAccessor(R),getLineColor:this.getSubLayerAccessor(D),transitions:p&&{getPolygon:p.geometry,getElevation:p.getElevation,getFillColor:p.getFillColor,getLineColor:p.getLineColor}},this.getSubLayerProps({id:"polygons-fill",updateTriggers:{getElevation:T.getElevation,getFillColor:T.getFillColor,getLineColor:T.getLineColor}}),{data:a,getPolygon:b});return[!h&&q,!h&&u&&this.shouldRenderSubLayer("polygons-stroke",o)&&new P({_dataDiff:n.polygonOutlineFeatures&&function(){return n.polygonOutlineFeatures},widthUnits:y,widthScale:m,widthMinPixels:I,widthMaxPixels:E,rounded:C,miterLimit:B,dashJustified:S,getColor:this.getSubLayerAccessor(D),getWidth:this.getSubLayerAccessor(M),getDashArray:this.getSubLayerAccessor(N),transitions:p&&{getPath:p.geometry,getColor:p.getLineColor,getWidth:p.getLineWidth}},this.getSubLayerProps({id:"polygons-stroke",updateTriggers:{getColor:T.getLineColor,getWidth:T.getLineWidth,getDashArray:T.getLineDashArray}}),{data:o,getPath:b}),this.shouldRenderSubLayer("linestrings",i)&&new U({_dataDiff:n.lineFeatures&&function(){return n.lineFeatures},widthUnits:y,widthScale:m,widthMinPixels:I,widthMaxPixels:E,rounded:C,miterLimit:B,dashJustified:S,getColor:this.getSubLayerAccessor(D),getWidth:this.getSubLayerAccessor(M),getDashArray:this.getSubLayerAccessor(N),transitions:p&&{getPath:p.geometry,getColor:p.getLineColor,getWidth:p.getLineWidth}},this.getSubLayerProps({id:"line-strings",updateTriggers:{getColor:T.getLineColor,getWidth:T.getLineWidth,getDashArray:T.getLineDashArray}}),{data:i,getPath:b}),this.shouldRenderSubLayer("points",r)&&new G({_dataDiff:n.pointFeatures&&function(){return n.pointFeatures},stroked:u,filled:A,radiusUnits:w,radiusScale:Q,radiusMinPixels:k,radiusMaxPixels:_,lineWidthUnits:y,lineWidthScale:m,lineWidthMinPixels:I,lineWidthMaxPixels:E,getFillColor:this.getSubLayerAccessor(R),getLineColor:this.getSubLayerAccessor(D),getRadius:this.getSubLayerAccessor(j),getLineWidth:this.getSubLayerAccessor(M),transitions:p&&{getPosition:p.geometry,getFillColor:p.getFillColor,getLineColor:p.getLineColor,getRadius:p.getRadius,getLineWidth:p.getLineWidth}},this.getSubLayerProps({id:"points",updateTriggers:{getFillColor:T.getFillColor,getLineColor:T.getLineColor,getRadius:T.getRadius,getLineWidth:T.getLineWidth}}),{data:r,getPosition:b,highlightedObjectIndex:this._getHighlightedIndex(r)}),h&&q]}},{key:"_getHighlightedIndex",value:function(e){var t=this.props.highlightedObjectIndex;return Number.isFinite(t)?e.findIndex((function(e){return e.__source.index===t})):null}}]),n}(A.a);E.layerName="GeoJsonLayer",E.defaultProps=I},function(e,t,n){"use strict";var r=n(16),i=n(3),a=n(2),o=n(6),s=n(7),u=n(4),A=n(64),c=n(305),l=n(38);function f(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}var h=function(e){Object(o.a)(n,e);var t=f(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"toString",value:function(){var e="[";if(l.b.printRowMajor){e+="row-major:";for(var t=0;t<this.RANK;++t)for(var n=0;n<this.RANK;++n)e+=" ".concat(this[n*this.RANK+t])}else{e+="column-major:";for(var r=0;r<this.ELEMENTS;++r)e+=" ".concat(this[r])}return e+="]"}},{key:"getElementIndex",value:function(e,t){return t*this.RANK+e}},{key:"getElement",value:function(e,t){return this[t*this.RANK+e]}},{key:"setElement",value:function(e,t,n){return this[t*this.RANK+e]=Object(A.a)(n),this}},{key:"getColumn",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),n=e*this.RANK,r=0;r<this.RANK;++r)t[r]=this[n+r];return t}},{key:"setColumn",value:function(e,t){for(var n=e*this.RANK,r=0;r<this.RANK;++r)this[n+r]=t[r];return this}}]),n}(c.a),g=n(169),d=n(10),p=n(32),v=n(17),y=n(40);function m(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}n.d(t,"a",(function(){return B}));var I=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),b=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),E=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),C={},B=function(e){Object(o.a)(n,e);var t=m(n);function n(e){var r;return Object(i.a)(this,n),r=t.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(e)?r.copy(e):r.identity(),r}return Object(a.a)(n,[{key:"INDICES",get:function(){return E}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}}],[{key:"IDENTITY",get:function(){return C.IDENTITY=C.IDENTITY||Object.freeze(new n(I)),C.IDENTITY}},{key:"ZERO",get:function(){return C.ZERO=C.ZERO||Object.freeze(new n(b)),C.ZERO}}]),Object(a.a)(n,[{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this[9]=e[9],this[10]=e[10],this[11]=e[11],this[12]=e[12],this[13]=e[13],this[14]=e[14],this[15]=e[15],this.check()}},{key:"set",value:function(e,t,n,r,i,a,o,s,u,A,c,l,f,h,g,d){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this[4]=i,this[5]=a,this[6]=o,this[7]=s,this[8]=u,this[9]=A,this[10]=c,this[11]=l,this[12]=f,this[13]=h,this[14]=g,this[15]=d,this.check()}},{key:"setRowMajor",value:function(e,t,n,r,i,a,o,s,u,A,c,l,f,h,g,d){return this[0]=e,this[1]=i,this[2]=u,this[3]=f,this[4]=t,this[5]=a,this[6]=A,this[7]=h,this[8]=n,this[9]=o,this[10]=c,this[11]=g,this[12]=r,this[13]=s,this[14]=l,this[15]=d,this.check()}},{key:"toRowMajor",value:function(e){return e[0]=this[0],e[1]=this[4],e[2]=this[8],e[3]=this[12],e[4]=this[1],e[5]=this[5],e[6]=this[9],e[7]=this[13],e[8]=this[2],e[9]=this[6],e[10]=this[10],e[11]=this[14],e[12]=this[3],e[13]=this[7],e[14]=this[11],e[15]=this[15],e}},{key:"identity",value:function(){return this.copy(I)}},{key:"fromQuaternion",value:function(e){return d.c(this,e),this.check()}},{key:"frustum",value:function(e){var t=e.left,r=e.right,i=e.bottom,a=e.top,o=e.near,s=e.far;return s===1/0?n._computeInfinitePerspectiveOffCenter(this,t,r,i,a,o):d.d(this,t,r,i,a,o,s),this.check()}},{key:"lookAt",value:function(e,t,n){if(1===arguments.length){var r=e;e=r.eye,t=r.center,n=r.up}return t=t||[0,0,0],n=n||[0,1,0],d.g(this,e,t,n),this.check()}},{key:"ortho",value:function(e){var t=e.left,n=e.right,r=e.bottom,i=e.top,a=e.near,o=void 0===a?.1:a,s=e.far,u=void 0===s?500:s;return d.i(this,t,n,r,i,o,u),this.check()}},{key:"orthographic",value:function(e){var t=e.fovy,r=void 0===t?45*Math.PI/180:t,i=e.aspect,a=void 0===i?1:i,o=e.focalDistance,s=void 0===o?1:o,u=e.near,A=void 0===u?.1:u,c=e.far,l=void 0===c?500:c;if(r>2*Math.PI)throw Error("radians");var f=r/2,h=s*Math.tan(f),g=h*a;return(new n).ortho({left:-g,right:g,bottom:-h,top:h,near:A,far:l})}},{key:"perspective",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fovy,n=void 0===t?void 0:t,r=e.fov,i=void 0===r?45*Math.PI/180:r,a=e.aspect,o=void 0===a?1:a,s=e.near,u=void 0===s?.1:s,A=e.far,c=void 0===A?500:A;if((n=n||i)>2*Math.PI)throw Error("radians");return d.j(this,n,o,u,c),this.check()}},{key:"determinant",value:function(){return d.a(this)}},{key:"getScale",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),e[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),e[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),e}},{key:"getTranslation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=this[12],e[1]=this[13],e[2]=this[14],e}},{key:"getRotation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(t||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=0,e[4]=this[4]*r,e[5]=this[5]*i,e[6]=this[6]*a,e[7]=0,e[8]=this[8]*r,e[9]=this[9]*i,e[10]=this[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{key:"getRotationMatrix3",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(t||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=this[4]*r,e[4]=this[5]*i,e[5]=this[6]*a,e[6]=this[8]*r,e[7]=this[9]*i,e[8]=this[10]*a,e}},{key:"transpose",value:function(){return d.q(this,this),this.check()}},{key:"invert",value:function(){return d.f(this,this),this.check()}},{key:"multiplyLeft",value:function(e){return d.h(this,e,this),this.check()}},{key:"multiplyRight",value:function(e){return d.h(this,this,e),this.check()}},{key:"rotateX",value:function(e){return d.l(this,this,e),this.check()}},{key:"rotateY",value:function(e){return d.m(this,this,e),this.check()}},{key:"rotateZ",value:function(e){return d.n(this,this,e),this.check()}},{key:"rotateXYZ",value:function(e){var t=Object(r.a)(e,3),n=t[0],i=t[1],a=t[2];return this.rotateX(n).rotateY(i).rotateZ(a)}},{key:"rotateAxis",value:function(e,t){return d.k(this,this,e,t),this.check()}},{key:"scale",value:function(e){return Array.isArray(e)?d.o(this,this,e):d.o(this,this,[e,e,e]),this.check()}},{key:"translate",value:function(e){return d.p(this,this,e),this.check()}},{key:"transform",value:function(e,t){return 4===e.length?(t=y.n(t||[-0,-0,-0,-0],e,this),Object(A.b)(t,4),t):this.transformAsPoint(e,t)}},{key:"transformAsPoint",value:function(e,t){switch(e.length){case 2:t=p.j(t||[-0,-0],e,this);break;case 3:t=v.q(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return Object(A.b)(t,e.length),t}},{key:"transformAsVector",value:function(e,t){switch(e.length){case 2:t=Object(g.a)(t||[-0,-0],e,this);break;case 3:t=Object(g.c)(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return Object(A.b)(t,e.length),t}},{key:"makeRotationX",value:function(e){return this.identity().rotateX(e)}},{key:"makeTranslation",value:function(e,t,n){return this.identity().translate([e,t,n])}},{key:"transformPoint",value:function(e,t){return Object(A.c)("Matrix4.transformPoint","3.0"),this.transformAsPoint(e,t)}},{key:"transformVector",value:function(e,t){return Object(A.c)("Matrix4.transformVector","3.0"),this.transformAsPoint(e,t)}},{key:"transformDirection",value:function(e,t){return Object(A.c)("Matrix4.transformDirection","3.0"),this.transformAsVector(e,t)}}],[{key:"_computeInfinitePerspectiveOffCenter",value:function(e,t,n,r,i,a){var o=2*a/(n-t),s=2*a/(i-r),u=(n+t)/(n-t),A=(i+r)/(i-r),c=-2*a;return e[0]=o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=u,e[9]=A,e[10]=-1,e[11]=-1,e[12]=0,e[13]=0,e[14]=c,e[15]=0,e}}]),n}(h)},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(6),o=n(7),s=n(4),u=n(310),A=n(71),c=n(130);function l(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var f=function(e){Object(a.a)(n,e);var t=l(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"copy",value:function(e){return Object(c.a)(!1),this}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var e=0,t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(e){return Math.sqrt(this.distanceSquared(e))}},{key:"distanceSquared",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n){var r=this[n]-e[n];t+=r*r}return Object(A.a)(t)}},{key:"dot",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n)t+=this[n]*e[n];return Object(A.a)(t)}},{key:"normalize",value:function(){var e=this.magnitude();if(0!==e)for(var t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}},{key:"multiply",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]*=a[o];return this.check()}},{key:"divide",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]/=a[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(e){return this.distance(e)}},{key:"distanceToSquared",value:function(e){return this.distanceSquared(e)}},{key:"getComponent",value:function(e){return Object(c.a)(e>=0&&e<this.ELEMENTS,"index is out of range"),Object(A.a)(this[e])}},{key:"setComponent",value:function(e,t){return Object(c.a)(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=t,this.check()}},{key:"addVectors",value:function(e,t){return this.copy(e).add(t)}},{key:"subVectors",value:function(e,t){return this.copy(e).subtract(t)}},{key:"multiplyVectors",value:function(e,t){return this.copy(e).multiply(t)}},{key:"addScaledVector",value:function(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}},{key:"x",get:function(){return this[0]},set:function(e){this[0]=Object(A.a)(e)}},{key:"y",get:function(){return this[1]},set:function(e){this[1]=Object(A.a)(e)}}]),n}(u.a),h=n(53),g=n(17),d=n(230);function p(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}n.d(t,"a",(function(){return m}));var v=[0,0,0],y={},m=function(e){Object(a.a)(n,e);var t=p(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object(r.a)(this,n),e=t.call(this,-0,-0,-0),1===arguments.length&&Object(h.d)(i)?e.copy(i):(h.a.debug&&(Object(A.a)(i),Object(A.a)(a),Object(A.a)(o)),e[0]=i,e[1]=a,e[2]=o),e}return Object(i.a)(n,null,[{key:"ZERO",get:function(){return y.ZERO=y.ZERO||Object.freeze(new n(0,0,0,0))}}]),Object(i.a)(n,[{key:"set",value:function(e,t,n){return this[0]=e,this[1]=t,this[2]=n,this.check()}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}},{key:"fromObject",value:function(e){return h.a.debug&&(Object(A.a)(e.x),Object(A.a)(e.y),Object(A.a)(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}},{key:"toObject",value:function(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}},{key:"angle",value:function(e){return g.a(this,e)}},{key:"cross",value:function(e){return g.c(this,this,e),this.check()}},{key:"rotateX",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?v:n;return g.k(this,this,r,t),this.check()}},{key:"rotateY",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?v:n;return g.l(this,this,r,t),this.check()}},{key:"rotateZ",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?v:n;return g.m(this,this,r,t),this.check()}},{key:"transform",value:function(e){return this.transformAsPoint(e)}},{key:"transformAsPoint",value:function(e){return g.q(this,this,e),this.check()}},{key:"transformAsVector",value:function(e){return Object(d.c)(this,this,e),this.check()}},{key:"transformByMatrix3",value:function(e){return g.p(this,this,e),this.check()}},{key:"transformByMatrix2",value:function(e){return Object(d.b)(this,this,e),this.check()}},{key:"transformByQuaternion",value:function(e){return g.r(this,this,e),this.check()}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(e){this[2]=Object(A.a)(e)}}]),n}(f)},function(e,t,n){"use strict";var r=n(16),i=n(3),a=n(2),o=n(6),s=n(7),u=n(4),A=n(71),c=n(310),l=n(53);function f(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}var h=function(e){Object(o.a)(n,e);var t=f(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"toString",value:function(){var e="[";if(l.a.printRowMajor){e+="row-major:";for(var t=0;t<this.RANK;++t)for(var n=0;n<this.RANK;++n)e+=" ".concat(this[n*this.RANK+t])}else{e+="column-major:";for(var r=0;r<this.ELEMENTS;++r)e+=" ".concat(this[r])}return e+="]"}},{key:"getElementIndex",value:function(e,t){return t*this.RANK+e}},{key:"getElement",value:function(e,t){return this[t*this.RANK+e]}},{key:"setElement",value:function(e,t,n){return this[t*this.RANK+e]=Object(A.a)(n),this}},{key:"getColumn",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),n=e*this.RANK,r=0;r<this.RANK;++r)t[r]=this[n+r];return t}},{key:"setColumn",value:function(e,t){for(var n=e*this.RANK,r=0;r<this.RANK;++r)this[n+r]=t[r];return this}}]),n}(c.a),g=n(230),d=n(10),p=n(32),v=n(17),y=n(40);function m(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}n.d(t,"a",(function(){return B}));var I=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),b=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),E=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),C={},B=function(e){Object(o.a)(n,e);var t=m(n);function n(e){var r;return Object(i.a)(this,n),r=t.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(e)?r.copy(e):r.identity(),r}return Object(a.a)(n,[{key:"INDICES",get:function(){return E}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}}],[{key:"IDENTITY",get:function(){return C.IDENTITY=C.IDENTITY||Object.freeze(new n(I)),C.IDENTITY}},{key:"ZERO",get:function(){return C.ZERO=C.ZERO||Object.freeze(new n(b)),C.ZERO}}]),Object(a.a)(n,[{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this[9]=e[9],this[10]=e[10],this[11]=e[11],this[12]=e[12],this[13]=e[13],this[14]=e[14],this[15]=e[15],this.check()}},{key:"set",value:function(e,t,n,r,i,a,o,s,u,A,c,l,f,h,g,d){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this[4]=i,this[5]=a,this[6]=o,this[7]=s,this[8]=u,this[9]=A,this[10]=c,this[11]=l,this[12]=f,this[13]=h,this[14]=g,this[15]=d,this.check()}},{key:"setRowMajor",value:function(e,t,n,r,i,a,o,s,u,A,c,l,f,h,g,d){return this[0]=e,this[1]=i,this[2]=u,this[3]=f,this[4]=t,this[5]=a,this[6]=A,this[7]=h,this[8]=n,this[9]=o,this[10]=c,this[11]=g,this[12]=r,this[13]=s,this[14]=l,this[15]=d,this.check()}},{key:"toRowMajor",value:function(e){return e[0]=this[0],e[1]=this[4],e[2]=this[8],e[3]=this[12],e[4]=this[1],e[5]=this[5],e[6]=this[9],e[7]=this[13],e[8]=this[2],e[9]=this[6],e[10]=this[10],e[11]=this[14],e[12]=this[3],e[13]=this[7],e[14]=this[11],e[15]=this[15],e}},{key:"identity",value:function(){return this.copy(I)}},{key:"fromQuaternion",value:function(e){return d.c(this,e),this.check()}},{key:"frustum",value:function(e){var t=e.left,r=e.right,i=e.bottom,a=e.top,o=e.near,s=e.far;return s===1/0?n._computeInfinitePerspectiveOffCenter(this,t,r,i,a,o):d.d(this,t,r,i,a,o,s),this.check()}},{key:"lookAt",value:function(e,t,n){if(1===arguments.length){var r=e;e=r.eye,t=r.center,n=r.up}return t=t||[0,0,0],n=n||[0,1,0],d.g(this,e,t,n),this.check()}},{key:"ortho",value:function(e){var t=e.left,n=e.right,r=e.bottom,i=e.top,a=e.near,o=void 0===a?.1:a,s=e.far,u=void 0===s?500:s;return d.i(this,t,n,r,i,o,u),this.check()}},{key:"orthographic",value:function(e){var t=e.fovy,r=void 0===t?45*Math.PI/180:t,i=e.aspect,a=void 0===i?1:i,o=e.focalDistance,s=void 0===o?1:o,u=e.near,A=void 0===u?.1:u,c=e.far,l=void 0===c?500:c;if(r>2*Math.PI)throw Error("radians");var f=r/2,h=s*Math.tan(f),g=h*a;return(new n).ortho({left:-g,right:g,bottom:-h,top:h,near:A,far:l})}},{key:"perspective",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fovy,n=void 0===t?void 0:t,r=e.fov,i=void 0===r?45*Math.PI/180:r,a=e.aspect,o=void 0===a?1:a,s=e.near,u=void 0===s?.1:s,A=e.far,c=void 0===A?500:A;if((n=n||i)>2*Math.PI)throw Error("radians");return d.j(this,n,o,u,c),this.check()}},{key:"determinant",value:function(){return d.a(this)}},{key:"getScale",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),e[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),e[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),e}},{key:"getTranslation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=this[12],e[1]=this[13],e[2]=this[14],e}},{key:"getRotation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(t||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=0,e[4]=this[4]*r,e[5]=this[5]*i,e[6]=this[6]*a,e[7]=0,e[8]=this[8]*r,e[9]=this[9]*i,e[10]=this[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{key:"getRotationMatrix3",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(t||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=this[4]*r,e[4]=this[5]*i,e[5]=this[6]*a,e[6]=this[8]*r,e[7]=this[9]*i,e[8]=this[10]*a,e}},{key:"transpose",value:function(){return d.q(this,this),this.check()}},{key:"invert",value:function(){return d.f(this,this),this.check()}},{key:"multiplyLeft",value:function(e){return d.h(this,e,this),this.check()}},{key:"multiplyRight",value:function(e){return d.h(this,this,e),this.check()}},{key:"rotateX",value:function(e){return d.l(this,this,e),this.check()}},{key:"rotateY",value:function(e){return d.m(this,this,e),this.check()}},{key:"rotateZ",value:function(e){return d.n(this,this,e),this.check()}},{key:"rotateXYZ",value:function(e){var t=Object(r.a)(e,3),n=t[0],i=t[1],a=t[2];return this.rotateX(n).rotateY(i).rotateZ(a)}},{key:"rotateAxis",value:function(e,t){return d.k(this,this,e,t),this.check()}},{key:"scale",value:function(e){return Array.isArray(e)?d.o(this,this,e):d.o(this,this,[e,e,e]),this.check()}},{key:"translate",value:function(e){return d.p(this,this,e),this.check()}},{key:"transform",value:function(e,t){return 4===e.length?(t=y.n(t||[-0,-0,-0,-0],e,this),Object(A.b)(t,4),t):this.transformAsPoint(e,t)}},{key:"transformAsPoint",value:function(e,t){switch(e.length){case 2:t=p.j(t||[-0,-0],e,this);break;case 3:t=v.q(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return Object(A.b)(t,e.length),t}},{key:"transformAsVector",value:function(e,t){switch(e.length){case 2:t=Object(g.a)(t||[-0,-0],e,this);break;case 3:t=Object(g.c)(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return Object(A.b)(t,e.length),t}},{key:"makeRotationX",value:function(e){return this.identity().rotateX(e)}},{key:"makeTranslation",value:function(e,t,n){return this.identity().translate([e,t,n])}},{key:"transformPoint",value:function(e,t){return Object(A.c)("Matrix4.transformPoint","3.0"),this.transformAsPoint(e,t)}},{key:"transformVector",value:function(e,t){return Object(A.c)("Matrix4.transformVector","3.0"),this.transformAsPoint(e,t)}},{key:"transformDirection",value:function(e,t){return Object(A.c)("Matrix4.transformDirection","3.0"),this.transformAsVector(e,t)}}],[{key:"_computeInfinitePerspectiveOffCenter",value:function(e,t,n,r,i,a){var o=2*a/(n-t),s=2*a/(i-r),u=(n+t)/(n-t),A=(i+r)/(i-r),c=-2*a;return e[0]=o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=u,e[9]=A,e[10]=-1,e[11]=-1,e[12]=0,e[13]=0,e[14]=c,e[15]=0,e}}]),n}(h)},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(6),o=n(7),s=n(4),u=n(228),A=n(63),c=n(102);function l(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}var f=function(e){Object(a.a)(n,e);var t=l(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"copy",value:function(e){return Object(c.a)(!1),this}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var e=0,t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(e){return Math.sqrt(this.distanceSquared(e))}},{key:"distanceSquared",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n){var r=this[n]-e[n];t+=r*r}return Object(A.a)(t)}},{key:"dot",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n)t+=this[n]*e[n];return Object(A.a)(t)}},{key:"normalize",value:function(){var e=this.magnitude();if(0!==e)for(var t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}},{key:"multiply",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]*=a[o];return this.check()}},{key:"divide",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]/=a[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(e){return this.distance(e)}},{key:"distanceToSquared",value:function(e){return this.distanceSquared(e)}},{key:"getComponent",value:function(e){return Object(c.a)(e>=0&&e<this.ELEMENTS,"index is out of range"),Object(A.a)(this[e])}},{key:"setComponent",value:function(e,t){return Object(c.a)(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=t,this.check()}},{key:"addVectors",value:function(e,t){return this.copy(e).add(t)}},{key:"subVectors",value:function(e,t){return this.copy(e).subtract(t)}},{key:"multiplyVectors",value:function(e,t){return this.copy(e).multiply(t)}},{key:"addScaledVector",value:function(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}},{key:"x",get:function(){return this[0]},set:function(e){this[0]=Object(A.a)(e)}},{key:"y",get:function(){return this[1]},set:function(e){this[1]=Object(A.a)(e)}}]),n}(u.a),h=n(54),g=n(17),d=n(232);function p(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(s.a)(e);if(t){var i=Object(s.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(o.a)(this,n)}}n.d(t,"a",(function(){return m}));var v=[0,0,0],y={},m=function(e){Object(a.a)(n,e);var t=p(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object(r.a)(this,n),e=t.call(this,-0,-0,-0),1===arguments.length&&Object(h.d)(i)?e.copy(i):(h.a.debug&&(Object(A.a)(i),Object(A.a)(a),Object(A.a)(o)),e[0]=i,e[1]=a,e[2]=o),e}return Object(i.a)(n,null,[{key:"ZERO",get:function(){return y.ZERO=y.ZERO||Object.freeze(new n(0,0,0,0))}}]),Object(i.a)(n,[{key:"set",value:function(e,t,n){return this[0]=e,this[1]=t,this[2]=n,this.check()}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}},{key:"fromObject",value:function(e){return h.a.debug&&(Object(A.a)(e.x),Object(A.a)(e.y),Object(A.a)(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}},{key:"toObject",value:function(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}},{key:"angle",value:function(e){return g.a(this,e)}},{key:"cross",value:function(e){return g.c(this,this,e),this.check()}},{key:"rotateX",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?v:n;return g.k(this,this,r,t),this.check()}},{key:"rotateY",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?v:n;return g.l(this,this,r,t),this.check()}},{key:"rotateZ",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?v:n;return g.m(this,this,r,t),this.check()}},{key:"transform",value:function(e){return this.transformAsPoint(e)}},{key:"transformAsPoint",value:function(e){return g.q(this,this,e),this.check()}},{key:"transformAsVector",value:function(e){return Object(d.c)(this,this,e),this.check()}},{key:"transformByMatrix3",value:function(e){return g.p(this,this,e),this.check()}},{key:"transformByMatrix2",value:function(e){return Object(d.b)(this,this,e),this.check()}},{key:"transformByQuaternion",value:function(e){return g.r(this,this,e),this.check()}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(e){this[2]=Object(A.a)(e)}}]),n}(f)},function(e,t,n){"use strict";var r=n(16),i=n(3),a=n(2),o=n(6),s=n(7),u=n(4),A=n(63),c=n(228),l=n(54);function f(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}var h=function(e){Object(o.a)(n,e);var t=f(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"toString",value:function(){var e="[";if(l.a.printRowMajor){e+="row-major:";for(var t=0;t<this.RANK;++t)for(var n=0;n<this.RANK;++n)e+=" ".concat(this[n*this.RANK+t])}else{e+="column-major:";for(var r=0;r<this.ELEMENTS;++r)e+=" ".concat(this[r])}return e+="]"}},{key:"getElementIndex",value:function(e,t){return t*this.RANK+e}},{key:"getElement",value:function(e,t){return this[t*this.RANK+e]}},{key:"setElement",value:function(e,t,n){return this[t*this.RANK+e]=Object(A.a)(n),this}},{key:"getColumn",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),n=e*this.RANK,r=0;r<this.RANK;++r)t[r]=this[n+r];return t}},{key:"setColumn",value:function(e,t){for(var n=e*this.RANK,r=0;r<this.RANK;++r)this[n+r]=t[r];return this}}]),n}(c.a),g=n(232),d=n(10),p=n(32),v=n(17),y=n(40);function m(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}n.d(t,"a",(function(){return B}));var I=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),b=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),E=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),C={},B=function(e){Object(o.a)(n,e);var t=m(n);function n(e){var r;return Object(i.a)(this,n),r=t.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(e)?r.copy(e):r.identity(),r}return Object(a.a)(n,[{key:"INDICES",get:function(){return E}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}}],[{key:"IDENTITY",get:function(){return C.IDENTITY=C.IDENTITY||Object.freeze(new n(I)),C.IDENTITY}},{key:"ZERO",get:function(){return C.ZERO=C.ZERO||Object.freeze(new n(b)),C.ZERO}}]),Object(a.a)(n,[{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this[9]=e[9],this[10]=e[10],this[11]=e[11],this[12]=e[12],this[13]=e[13],this[14]=e[14],this[15]=e[15],this.check()}},{key:"set",value:function(e,t,n,r,i,a,o,s,u,A,c,l,f,h,g,d){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this[4]=i,this[5]=a,this[6]=o,this[7]=s,this[8]=u,this[9]=A,this[10]=c,this[11]=l,this[12]=f,this[13]=h,this[14]=g,this[15]=d,this.check()}},{key:"setRowMajor",value:function(e,t,n,r,i,a,o,s,u,A,c,l,f,h,g,d){return this[0]=e,this[1]=i,this[2]=u,this[3]=f,this[4]=t,this[5]=a,this[6]=A,this[7]=h,this[8]=n,this[9]=o,this[10]=c,this[11]=g,this[12]=r,this[13]=s,this[14]=l,this[15]=d,this.check()}},{key:"toRowMajor",value:function(e){return e[0]=this[0],e[1]=this[4],e[2]=this[8],e[3]=this[12],e[4]=this[1],e[5]=this[5],e[6]=this[9],e[7]=this[13],e[8]=this[2],e[9]=this[6],e[10]=this[10],e[11]=this[14],e[12]=this[3],e[13]=this[7],e[14]=this[11],e[15]=this[15],e}},{key:"identity",value:function(){return this.copy(I)}},{key:"fromQuaternion",value:function(e){return d.c(this,e),this.check()}},{key:"frustum",value:function(e){var t=e.left,r=e.right,i=e.bottom,a=e.top,o=e.near,s=e.far;return s===1/0?n._computeInfinitePerspectiveOffCenter(this,t,r,i,a,o):d.d(this,t,r,i,a,o,s),this.check()}},{key:"lookAt",value:function(e,t,n){if(1===arguments.length){var r=e;e=r.eye,t=r.center,n=r.up}return t=t||[0,0,0],n=n||[0,1,0],d.g(this,e,t,n),this.check()}},{key:"ortho",value:function(e){var t=e.left,n=e.right,r=e.bottom,i=e.top,a=e.near,o=void 0===a?.1:a,s=e.far,u=void 0===s?500:s;return d.i(this,t,n,r,i,o,u),this.check()}},{key:"orthographic",value:function(e){var t=e.fovy,r=void 0===t?45*Math.PI/180:t,i=e.aspect,a=void 0===i?1:i,o=e.focalDistance,s=void 0===o?1:o,u=e.near,A=void 0===u?.1:u,c=e.far,l=void 0===c?500:c;if(r>2*Math.PI)throw Error("radians");var f=r/2,h=s*Math.tan(f),g=h*a;return(new n).ortho({left:-g,right:g,bottom:-h,top:h,near:A,far:l})}},{key:"perspective",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fovy,n=void 0===t?void 0:t,r=e.fov,i=void 0===r?45*Math.PI/180:r,a=e.aspect,o=void 0===a?1:a,s=e.near,u=void 0===s?.1:s,A=e.far,c=void 0===A?500:A;if((n=n||i)>2*Math.PI)throw Error("radians");return d.j(this,n,o,u,c),this.check()}},{key:"determinant",value:function(){return d.a(this)}},{key:"getScale",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),e[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),e[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),e}},{key:"getTranslation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=this[12],e[1]=this[13],e[2]=this[14],e}},{key:"getRotation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(t||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=0,e[4]=this[4]*r,e[5]=this[5]*i,e[6]=this[6]*a,e[7]=0,e[8]=this[8]*r,e[9]=this[9]*i,e[10]=this[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{key:"getRotationMatrix3",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(t||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=this[4]*r,e[4]=this[5]*i,e[5]=this[6]*a,e[6]=this[8]*r,e[7]=this[9]*i,e[8]=this[10]*a,e}},{key:"transpose",value:function(){return d.q(this,this),this.check()}},{key:"invert",value:function(){return d.f(this,this),this.check()}},{key:"multiplyLeft",value:function(e){return d.h(this,e,this),this.check()}},{key:"multiplyRight",value:function(e){return d.h(this,this,e),this.check()}},{key:"rotateX",value:function(e){return d.l(this,this,e),this.check()}},{key:"rotateY",value:function(e){return d.m(this,this,e),this.check()}},{key:"rotateZ",value:function(e){return d.n(this,this,e),this.check()}},{key:"rotateXYZ",value:function(e){var t=Object(r.a)(e,3),n=t[0],i=t[1],a=t[2];return this.rotateX(n).rotateY(i).rotateZ(a)}},{key:"rotateAxis",value:function(e,t){return d.k(this,this,e,t),this.check()}},{key:"scale",value:function(e){return Array.isArray(e)?d.o(this,this,e):d.o(this,this,[e,e,e]),this.check()}},{key:"translate",value:function(e){return d.p(this,this,e),this.check()}},{key:"transform",value:function(e,t){return 4===e.length?(t=y.n(t||[-0,-0,-0,-0],e,this),Object(A.b)(t,4),t):this.transformAsPoint(e,t)}},{key:"transformAsPoint",value:function(e,t){switch(e.length){case 2:t=p.j(t||[-0,-0],e,this);break;case 3:t=v.q(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return Object(A.b)(t,e.length),t}},{key:"transformAsVector",value:function(e,t){switch(e.length){case 2:t=Object(g.a)(t||[-0,-0],e,this);break;case 3:t=Object(g.c)(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return Object(A.b)(t,e.length),t}},{key:"makeRotationX",value:function(e){return this.identity().rotateX(e)}},{key:"makeTranslation",value:function(e,t,n){return this.identity().translate([e,t,n])}},{key:"transformPoint",value:function(e,t){return Object(A.c)("Matrix4.transformPoint","3.0"),this.transformAsPoint(e,t)}},{key:"transformVector",value:function(e,t){return Object(A.c)("Matrix4.transformVector","3.0"),this.transformAsPoint(e,t)}},{key:"transformDirection",value:function(e,t){return Object(A.c)("Matrix4.transformDirection","3.0"),this.transformAsVector(e,t)}}],[{key:"_computeInfinitePerspectiveOffCenter",value:function(e,t,n,r,i,a){var o=2*a/(n-t),s=2*a/(i-r),u=(n+t)/(n-t),A=(i+r)/(i-r),c=-2*a;return e[0]=o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=u,e[9]=A,e[10]=-1,e[11]=-1,e[12]=0,e[13]=0,e[14]=c,e[15]=0,e}}]),n}(h)},function(e,t,n){!function(e){"use strict";function t(e,t){return e>t?1:e<t?-1:0}var n=function(e,n){void 0===e&&(e=t),void 0===n&&(n=!1),this._compare=e,this._root=null,this._size=0,this._noDuplicates=!!n},r={size:{configurable:!0}};function i(e,t,n){null===t?(e.inOut=!1,e.otherInOut=!0):(e.isSubject===t.isSubject?(e.inOut=!t.inOut,e.otherInOut=t.otherInOut):(e.inOut=!t.otherInOut,e.otherInOut=t.isVertical()?!t.inOut:t.inOut),t&&(e.prevInResult=!a(t,n)||t.isVertical()?t.prevInResult:t)),e.inResult=a(e,n)}function a(e,t){switch(e.type){case 0:switch(t){case 0:return!e.otherInOut;case 1:return e.otherInOut;case 2:return e.isSubject&&e.otherInOut||!e.isSubject&&!e.otherInOut;case 3:return!0}break;case 2:return 0===t||1===t;case 3:return 2===t;case 1:return!1}return!1}n.prototype.rotateLeft=function(e){var t=e.right;t&&(e.right=t.left,t.left&&(t.left.parent=e),t.parent=e.parent),e.parent?e===e.parent.left?e.parent.left=t:e.parent.right=t:this._root=t,t&&(t.left=e),e.parent=t},n.prototype.rotateRight=function(e){var t=e.left;t&&(e.left=t.right,t.right&&(t.right.parent=e),t.parent=e.parent),e.parent?e===e.parent.left?e.parent.left=t:e.parent.right=t:this._root=t,t&&(t.right=e),e.parent=t},n.prototype._splay=function(e){for(;e.parent;){var t=e.parent;t.parent?t.left===e&&t.parent.left===t?(this.rotateRight(t.parent),this.rotateRight(t)):t.right===e&&t.parent.right===t?(this.rotateLeft(t.parent),this.rotateLeft(t)):t.left===e&&t.parent.right===t?(this.rotateRight(t),this.rotateLeft(t)):(this.rotateLeft(t),this.rotateRight(t)):t.left===e?this.rotateRight(t):this.rotateLeft(t)}},n.prototype.splay=function(e){for(var t,n,r,i,a;e.parent;)(n=(t=e.parent).parent)&&n.parent?((r=n.parent).left===n?r.left=e:r.right=e,e.parent=r):(e.parent=null,this._root=e),i=e.left,a=e.right,e===t.left?(n&&(n.left===t?(t.right?(n.left=t.right,n.left.parent=n):n.left=null,t.right=n,n.parent=t):(i?(n.right=i,i.parent=n):n.right=null,e.left=n,n.parent=e)),a?(t.left=a,a.parent=t):t.left=null,e.right=t,t.parent=e):(n&&(n.right===t?(t.left?(n.right=t.left,n.right.parent=n):n.right=null,t.left=n,n.parent=t):(a?(n.left=a,a.parent=n):n.left=null,e.right=n,n.parent=e)),i?(t.right=i,i.parent=t):t.right=null,e.left=t,t.parent=e)},n.prototype.replace=function(e,t){e.parent?e===e.parent.left?e.parent.left=t:e.parent.right=t:this._root=t,t&&(t.parent=e.parent)},n.prototype.minNode=function(e){if(void 0===e&&(e=this._root),e)for(;e.left;)e=e.left;return e},n.prototype.maxNode=function(e){if(void 0===e&&(e=this._root),e)for(;e.right;)e=e.right;return e},n.prototype.insert=function(e,t){var n=this._root,r=null,i=this._compare;if(this._noDuplicates)for(;n;){if(r=n,0===i(n.key,e))return;n=i(n.key,e)<0?n.right:n.left}else for(;n;)r=n,n=i(n.key,e)<0?n.right:n.left;return n={key:e,data:t,left:null,right:null,parent:r},r?i(r.key,n.key)<0?r.right=n:r.left=n:this._root=n,this.splay(n),this._size++,n},n.prototype.find=function(e){for(var t=this._root,n=this._compare;t;){var r=n(t.key,e);if(r<0)t=t.right;else{if(!(r>0))return t;t=t.left}}return null},n.prototype.contains=function(e){for(var t=this._root,n=this._compare;t;){var r=n(e,t.key);if(0===r)return!0;t=r<0?t.left:t.right}return!1},n.prototype.remove=function(e){var t=this.find(e);if(!t)return!1;if(this.splay(t),t.left)if(t.right){var n=this.minNode(t.right);n.parent!==t&&(this.replace(n,n.right),n.right=t.right,n.right.parent=n),this.replace(t,n),n.left=t.left,n.left.parent=n}else this.replace(t,t.left);else this.replace(t,t.right);return this._size--,!0},n.prototype.removeNode=function(e){if(!e)return!1;if(this.splay(e),e.left)if(e.right){var t=this.minNode(e.right);t.parent!==e&&(this.replace(t,t.right),t.right=e.right,t.right.parent=t),this.replace(e,t),t.left=e.left,t.left.parent=t}else this.replace(e,e.left);else this.replace(e,e.right);return this._size--,!0},n.prototype.erase=function(e){var t=this.find(e);if(t){this.splay(t);var n=t.left,r=t.right,i=null;n&&(n.parent=null,i=this.maxNode(n),this.splay(i),this._root=i),r&&(n?i.right=r:this._root=r,r.parent=i),this._size--}},n.prototype.pop=function(){var e=this._root,t=null;if(e){for(;e.left;)e=e.left;t={key:e.key,data:e.data},this.remove(e.key)}return t},n.prototype.next=function(e){var t=e;if(t)if(t.right)for(t=t.right;t&&t.left;)t=t.left;else for(t=e.parent;t&&t.right===e;)e=t,t=t.parent;return t},n.prototype.prev=function(e){var t=e;if(t)if(t.left)for(t=t.left;t&&t.right;)t=t.right;else for(t=e.parent;t&&t.left===e;)e=t,t=t.parent;return t},n.prototype.forEach=function(e){for(var t=this._root,n=[],r=!1,i=0;!r;)t?(n.push(t),t=t.left):n.length>0?(e(t=n.pop(),i++),t=t.right):r=!0;return this},n.prototype.range=function(e,t,n,r){for(var i=[],a=this._compare,o=this._root;0!==i.length||o;)if(o)i.push(o),o=o.left;else{if(a((o=i.pop()).key,t)>0)break;if(a(o.key,e)>=0&&n.call(r,o))return this;o=o.right}return this},n.prototype.keys=function(){for(var e=this._root,t=[],n=[],r=!1;!r;)e?(t.push(e),e=e.left):t.length>0?(e=t.pop(),n.push(e.key),e=e.right):r=!0;return n},n.prototype.values=function(){for(var e=this._root,t=[],n=[],r=!1;!r;)e?(t.push(e),e=e.left):t.length>0?(e=t.pop(),n.push(e.data),e=e.right):r=!0;return n},n.prototype.at=function(e){for(var t=this._root,n=[],r=!1,i=0;!r;)if(t)n.push(t),t=t.left;else if(n.length>0){if(t=n.pop(),i===e)return t;i++,t=t.right}else r=!0;return null},n.prototype.load=function(e,t,n){if(void 0===e&&(e=[]),void 0===t&&(t=[]),void 0===n&&(n=!1),0!==this._size)throw new Error("bulk-load: tree is not empty");var r=e.length;return n&&function e(t,n,r,i,a){if(!(r>=i)){for(var o=t[r+i>>1],s=r-1,u=i+1;;){do{s++}while(a(t[s],o)<0);do{u--}while(a(t[u],o)>0);if(s>=u)break;var A=t[s];t[s]=t[u],t[u]=A,A=n[s],n[s]=n[u],n[u]=A}e(t,n,r,u,a),e(t,n,u+1,i,a)}}(e,t,0,r-1,this._compare),this._root=function e(t,n,r,i,a){var o=a-i;if(o>0){var s=i+Math.floor(o/2),u={key:n[s],data:r[s],parent:t};return u.left=e(u,n,r,i,s),u.right=e(u,n,r,s+1,a),u}return null}(null,e,t,0,r),this._size=r,this},n.prototype.min=function(){var e=this.minNode(this._root);return e?e.key:null},n.prototype.max=function(){var e=this.maxNode(this._root);return e?e.key:null},n.prototype.isEmpty=function(){return null===this._root},r.size.get=function(){return this._size},n.createTree=function(e,t,r,i,a){return new n(r,a).load(e,t,i)},Object.defineProperties(n.prototype,r);var o=function(e,t,n,r,i){this.left=t,this.point=e,this.otherEvent=n,this.isSubject=r,this.type=i||0,this.inOut=!1,this.otherInOut=!1,this.prevInResult=null,this.inResult=!1,this.resultInOut=!1,this.isExteriorRing=!0};function s(e,t){return e[0]===t[0]&&e[1]===t[1]}function u(e,t,n){return(e[0]-n[0])*(t[1]-n[1])-(t[0]-n[0])*(e[1]-n[1])}function A(e,t){var n=e.point,r=t.point;return n[0]>r[0]?1:n[0]<r[0]?-1:n[1]!==r[1]?n[1]>r[1]?1:-1:function(e,t,n,r){return e.left!==t.left?e.left?1:-1:0!==u(n,e.otherEvent.point,t.otherEvent.point)?e.isBelow(t.otherEvent.point)?-1:1:!e.isSubject&&t.isSubject?1:-1}(e,t,n)}function c(e,t,n){var r=new o(t,!1,e,e.isSubject),i=new o(t,!0,e.otherEvent,e.isSubject);return s(e.point,e.otherEvent.point)&&console.warn("what is that, a collapsed segment?",e),r.contourId=i.contourId=e.contourId,A(i,e.otherEvent)>0&&(e.otherEvent.left=!0,i.left=!1),e.otherEvent.otherEvent=i,e.otherEvent=r,n.push(i),n.push(r),n}function l(e,t){return e[0]*t[1]-e[1]*t[0]}function f(e,t){return e[0]*t[0]+e[1]*t[1]}function h(e,t,n){var r=function(e,t,n,r,i){var a=[t[0]-e[0],t[1]-e[1]],o=[r[0]-n[0],r[1]-n[1]];function s(e,t,n){return[e[0]+t*n[0],e[1]+t*n[1]]}var u=[n[0]-e[0],n[1]-e[1]],A=l(a,o),c=A*A,h=f(a,a);if(c>0){var g=l(u,o)/A;if(g<0||g>1)return null;var d=l(u,a)/A;return d<0||d>1?null:0===g||1===g?i?null:[s(e,g,a)]:0===d||1===d?i?null:[s(n,d,o)]:[s(e,g,a)]}if((c=(A=l(u,a))*A)>0)return null;var p=f(a,u)/h,v=p+f(a,o)/h,y=Math.min(p,v),m=Math.max(p,v);return y<=1&&m>=0?1===y?i?null:[s(e,y>0?y:0,a)]:0===m?i?null:[s(e,m<1?m:1,a)]:i&&0===y&&1===m?null:[s(e,y>0?y:0,a),s(e,m<1?m:1,a)]:null}(e.point,e.otherEvent.point,t.point,t.otherEvent.point),i=r?r.length:0;if(0===i)return 0;if(1===i&&(s(e.point,t.point)||s(e.otherEvent.point,t.otherEvent.point)))return 0;if(2===i&&e.isSubject===t.isSubject)return 0;if(1===i)return s(e.point,r[0])||s(e.otherEvent.point,r[0])||c(e,r[0],n),s(t.point,r[0])||s(t.otherEvent.point,r[0])||c(t,r[0],n),1;var a=[],o=!1,u=!1;return s(e.point,t.point)?o=!0:1===A(e,t)?a.push(t,e):a.push(e,t),s(e.otherEvent.point,t.otherEvent.point)?u=!0:1===A(e.otherEvent,t.otherEvent)?a.push(t.otherEvent,e.otherEvent):a.push(e.otherEvent,t.otherEvent),o&&u||o?(t.type=1,e.type=t.inOut===e.inOut?2:3,o&&!u&&c(a[1].otherEvent,a[0].point,n),2):u?(c(a[0],a[1].point,n),3):a[0]!==a[3].otherEvent?(c(a[0],a[1].point,n),c(a[1],a[2].point,n),3):(c(a[0],a[1].point,n),c(a[3].otherEvent,a[2].point,n),3)}function g(e,t){if(e===t)return 0;if(0!==u(e.point,e.otherEvent.point,t.point)||0!==u(e.point,e.otherEvent.point,t.otherEvent.point))return s(e.point,t.point)?e.isBelow(t.otherEvent.point)?-1:1:e.point[0]===t.point[0]?e.point[1]<t.point[1]?-1:1:1===A(e,t)?t.isAbove(e.point)?-1:1:e.isBelow(t.point)?-1:1;if(e.isSubject!==t.isSubject)return e.isSubject?-1:1;var n=e.point,r=t.point;return n[0]===r[0]&&n[1]===r[1]?(n=e.otherEvent.point,r=t.otherEvent.point,n[0]===r[0]&&n[1]===r[1]?0:e.contourId>t.contourId?1:-1):1===A(e,t)?1:-1}function d(e,t,n,r){var i=e+1,a=t.length;if(i>a-1)return e-1;for(var o=t[e].point,s=t[i].point;i<a&&s[0]===o[0]&&s[1]===o[1];){if(!n[i])return i;s=t[++i].point}for(i=e-1;n[i]&&i>=r;)i--;return i}function p(e,t){var n,r,i,a=function(e){var t,n,r,i,a=[];for(n=0,r=e.length;n<r;n++)((t=e[n]).left&&t.inResult||!t.left&&t.otherEvent.inResult)&&a.push(t);for(var o=!1;!o;)for(o=!0,n=0,r=a.length;n<r;n++)n+1<r&&1===A(a[n],a[n+1])&&(i=a[n],a[n]=a[n+1],a[n+1]=i,o=!1);for(n=0,r=a.length;n<r;n++)(t=a[n]).pos=n;for(n=0,r=a.length;n<r;n++)(t=a[n]).left||(i=t.pos,t.pos=t.otherEvent.pos,t.otherEvent.pos=i);return a}(e),o={},s=[];for(n=0,r=a.length;n<r;n++)if(!o[n]){var u=[[]];a[n].isExteriorRing?2===t&&!a[n].isSubject&&s.length>1?s[s.length-1].push(u[0]):s.push(u):2!==t||a[n].isSubject||0!==s.length?0===s.length?s.push([[u]]):s[s.length-1].push(u[0]):s.push(u);var c=s.length-1,l=n,f=a[n].point;for(u[0].push(f);l>=n;)i=a[l],o[l]=!0,i.left?(i.resultInOut=!1,i.contourId=c):(i.otherEvent.resultInOut=!0,i.otherEvent.contourId=c),o[l=i.pos]=!0,u[0].push(a[l].point),l=d(l,a,o,n);i=a[l=-1===l?n:l],o[l]=o[i.pos]=!0,i.otherEvent.resultInOut=!0,i.otherEvent.contourId=c}return s}o.prototype.isBelow=function(e){var t=this.point,n=this.otherEvent.point;return this.left?(t[0]-e[0])*(n[1]-e[1])-(n[0]-e[0])*(t[1]-e[1])>0:(n[0]-e[0])*(t[1]-e[1])-(t[0]-e[0])*(n[1]-e[1])>0},o.prototype.isAbove=function(e){return!this.isBelow(e)},o.prototype.isVertical=function(){return this.point[0]===this.otherEvent.point[0]},o.prototype.clone=function(){var e=new o(this.point,this.left,this.otherEvent,this.isSubject,this.type);return e.inResult=this.inResult,e.prevInResult=this.prevInResult,e.isExteriorRing=this.isExteriorRing,e.inOut=this.inOut,e.otherInOut=this.otherInOut,e};var v=m,y=m;function m(e,t){if(!(this instanceof m))return new m(e,t);if(this.data=e||[],this.length=this.data.length,this.compare=t||I,this.length>0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)}function I(e,t){return e<t?-1:e>t?1:0}m.prototype={push:function(e){this.data.push(e),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var e=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),e}},peek:function(){return this.data[0]},_up:function(e){for(var t=this.data,n=this.compare,r=t[e];e>0;){var i=e-1>>1,a=t[i];if(n(r,a)>=0)break;t[e]=a,e=i}t[e]=r},_down:function(e){for(var t=this.data,n=this.compare,r=this.length>>1,i=t[e];e<r;){var a=1+(e<<1),o=a+1,s=t[a];if(o<this.length&&n(t[o],s)<0&&(a=o,s=t[o]),n(s,i)>=0)break;t[e]=s,e=a}t[e]=i}},v.default=y;var b=Math.max,E=Math.min,C=0;function B(e,t,n,r,i,a){var s,u,c,l,f,h;for(s=0,u=e.length-1;s<u;s++)if(c=e[s],l=e[s+1],f=new o(c,!1,void 0,t),h=new o(l,!1,f,t),f.otherEvent=h,c[0]!==l[0]||c[1]!==l[1]){f.contourId=h.contourId=n,a||(f.isExteriorRing=!1,h.isExteriorRing=!1),A(f,h)>0?h.left=!0:f.left=!0;var g=c[0],d=c[1];i[0]=E(i[0],g),i[1]=E(i[1],d),i[2]=b(i[2],g),i[3]=b(i[3],d),r.push(f),r.push(h)}}var w=[];function Q(e,t,r){"number"===typeof e[0][0][0]&&(e=[e]),"number"===typeof t[0][0][0]&&(t=[t]);var a=function(e,t,n){var r=null;return e.length*t.length===0&&(0===n?r=w:2===n?r=e:1!==n&&3!==n||(r=0===e.length?t:e)),r}(e,t,r);if(a)return a===w?null:a;var o=[1/0,1/0,-1/0,-1/0],s=[1/0,1/0,-1/0,-1/0],u=function(e,t,n,r,i){var a,o,s,u,c,l,f=new v(null,A);for(s=0,u=e.length;s<u;s++)for(c=0,l=(a=e[s]).length;c<l;c++)(o=0===c)&&C++,B(a[c],!0,C,f,n,o);for(s=0,u=t.length;s<u;s++)for(c=0,l=(a=t[s]).length;c<l;c++)o=0===c,2===i&&(o=!1),o&&C++,B(a[c],!1,C,f,r,o);return f}(e,t,o,s,r);return(a=function(e,t,n,r,i){var a=null;return(n[0]>r[2]||r[0]>n[2]||n[1]>r[3]||r[1]>n[3])&&(0===i?a=w:2===i?a=e:1!==i&&3!==i||(a=e.concat(t))),a}(e,t,o,s,r))?a===w?null:a:p(function(e,t,r,a,o,s){for(var u,A,c,l=new n(g),f=[],d=Math.min(a[2],o[2]);0!==e.length;){var p=e.pop();if(f.push(p),0===s&&p.point[0]>d||2===s&&p.point[0]>a[2])break;if(p.left){A=u=l.insert(p),u=u!==(c=l.minNode())?l.prev(u):null,A=l.next(A);var v=u?u.key:null;if(i(p,v,s),A&&2===h(p,A.key,e)&&(i(p,v,s),i(p,A.key,s)),u&&2===h(u.key,p,e)){var y=u;i(v,(y=y!==c?l.prev(y):null)?y.key:null,s),i(p,v,s)}}else p=p.otherEvent,A=u=l.find(p),u&&A&&(u=u!==c?l.prev(u):null,A=l.next(A),l.remove(p),A&&u&&h(u.key,A.key,e))}return f}(u,0,0,o,s,r),r)}var k={UNION:1,DIFFERENCE:2,INTERSECTION:0,XOR:3};e.union=function(e,t){return Q(e,t,1)},e.diff=function(e,t){return Q(e,t,2)},e.xor=function(e,t){return Q(e,t,3)},e.intersection=function(e,t){return Q(e,t,0)},e.operations=k,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(145);function i(e){var t=0;if(e&&e.length>0){t+=Math.abs(a(e[0]));for(var n=1;n<e.length;n++)t-=Math.abs(a(e[n]))}return t}function a(e){var t,n,r,i,a,s,u=0,A=e.length;if(A>2){for(s=0;s<A;s++)s===A-2?(r=A-2,i=A-1,a=0):s===A-1?(r=A-1,i=0,a=1):(r=s,i=s+1,a=s+2),t=e[r],n=e[i],u+=(o(e[a][0])-o(t[0]))*Math.sin(o(n[1]));u=6378137*u*6378137/2}return u}function o(e){return e*Math.PI/180}t.default=function(e){return r.geomReduce(e,(function(e,t){return e+function(e){var t,n=0;switch(e.type){case"Polygon":return i(e.coordinates);case"MultiPolygon":for(t=0;t<e.coordinates.length;t++)n+=i(e.coordinates[t]);return n;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}(t)}),0)}},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/hubmapconsortium/vitessce/#cell-sets-tabular","title":"Vitessce cell sets data, tabular format","definitions":{"colorArray":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":3,"maxItems":3}},"type":"array","items":{"type":"object","additionalProperties":false,"required":["group_name","set_name","cell_id"],"properties":{"group_name":{"type":"string"},"set_name":{"type":"string"},"set_color":{"$ref":"#/definitions/colorArray"},"cell_id":{"type":"string"},"prediction_score":{"oneOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}}}}')},function(e,t,n){e.exports=function(e){"use strict";return function(e){if("number"!==typeof e)throw new TypeError("Expected a number");if(e>1e19)throw new RangeError("Input expected to be < 1e19");if(e<-1e19)throw new RangeError("Input expected to be > 1e19");if(Math.abs(e)<1e3)return e;var t,n,r,i=e<0?"-":"",a={K:6,M:9,B:12,T:16};for(var o in e=Math.abs(e),n=(r=Math.floor(e).toString().length)%3===0?r-3:r-r%3,t=Math.round(e/Math.pow(10,n)*10)/10,a)if(n<a[o]){t+=o;break}return i+t}}()},function(e,t,n){(function(e,r){var i;(function(){var a="Expected a function",o="__lodash_placeholder__",s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],u="[object Arguments]",A="[object Array]",c="[object Boolean]",l="[object Date]",f="[object Error]",h="[object Function]",g="[object GeneratorFunction]",d="[object Map]",p="[object Number]",v="[object Object]",y="[object RegExp]",m="[object Set]",I="[object String]",b="[object Symbol]",E="[object WeakMap]",C="[object ArrayBuffer]",B="[object DataView]",w="[object Float32Array]",Q="[object Float64Array]",k="[object Int8Array]",_="[object Int16Array]",x="[object Int32Array]",S="[object Uint8Array]",O="[object Uint16Array]",D="[object Uint32Array]",R=/\b__p \+= '';/g,j=/\b(__p \+=) '' \+/g,M=/(__e\(.*?\)|\b__t\)) \+\n'';/g,N=/&(?:amp|lt|gt|quot|#39);/g,F=/[&<>"']/g,T=RegExp(N.source),L=RegExp(F.source),P=/<%-([\s\S]+?)%>/g,U=/<%([\s\S]+?)%>/g,G=/<%=([\s\S]+?)%>/g,q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H=/^\w*$/,Y=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,J=/[\\^$.*+?()[\]{}|]/g,z=RegExp(J.source),K=/^\s+|\s+$/g,W=/^\s+/,V=/\s+$/,X=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Z=/\{\n\/\* \[wrapped with (.+)\] \*/,$=/,? & /,ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,ie=/^[-+]0x[0-9a-f]+$/i,ae=/^0b[01]+$/i,oe=/^\[object .+?Constructor\]$/,se=/^0o[0-7]+$/i,ue=/^(?:0|[1-9]\d*)$/,Ae=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ce=/($^)/,le=/['\n\r\u2028\u2029\\]/g,fe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",he="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",ge="[\\ud800-\\udfff]",de="["+he+"]",pe="["+fe+"]",ve="\\d+",ye="[\\u2700-\\u27bf]",me="[a-z\\xdf-\\xf6\\xf8-\\xff]",Ie="[^\\ud800-\\udfff"+he+ve+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",be="\\ud83c[\\udffb-\\udfff]",Ee="[^\\ud800-\\udfff]",Ce="(?:\\ud83c[\\udde6-\\uddff]){2}",Be="[\\ud800-\\udbff][\\udc00-\\udfff]",we="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Qe="(?:"+me+"|"+Ie+")",ke="(?:"+we+"|"+Ie+")",_e="(?:"+pe+"|"+be+")"+"?",xe="[\\ufe0e\\ufe0f]?"+_e+("(?:\\u200d(?:"+[Ee,Ce,Be].join("|")+")[\\ufe0e\\ufe0f]?"+_e+")*"),Se="(?:"+[ye,Ce,Be].join("|")+")"+xe,Oe="(?:"+[Ee+pe+"?",pe,Ce,Be,ge].join("|")+")",De=RegExp("['\u2019]","g"),Re=RegExp(pe,"g"),je=RegExp(be+"(?="+be+")|"+Oe+xe,"g"),Me=RegExp([we+"?"+me+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[de,we,"$"].join("|")+")",ke+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[de,we+Qe,"$"].join("|")+")",we+"?"+Qe+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",we+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ve,Se].join("|"),"g"),Ne=RegExp("[\\u200d\\ud800-\\udfff"+fe+"\\ufe0e\\ufe0f]"),Fe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Te=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Le=-1,Pe={};Pe[w]=Pe[Q]=Pe[k]=Pe[_]=Pe[x]=Pe[S]=Pe["[object Uint8ClampedArray]"]=Pe[O]=Pe[D]=!0,Pe[u]=Pe[A]=Pe[C]=Pe[c]=Pe[B]=Pe[l]=Pe[f]=Pe[h]=Pe[d]=Pe[p]=Pe[v]=Pe[y]=Pe[m]=Pe[I]=Pe[E]=!1;var Ue={};Ue[u]=Ue[A]=Ue[C]=Ue[B]=Ue[c]=Ue[l]=Ue[w]=Ue[Q]=Ue[k]=Ue[_]=Ue[x]=Ue[d]=Ue[p]=Ue[v]=Ue[y]=Ue[m]=Ue[I]=Ue[b]=Ue[S]=Ue["[object Uint8ClampedArray]"]=Ue[O]=Ue[D]=!0,Ue[f]=Ue[h]=Ue[E]=!1;var Ge={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qe=parseFloat,He=parseInt,Ye="object"==typeof e&&e&&e.Object===Object&&e,Je="object"==typeof self&&self&&self.Object===Object&&self,ze=Ye||Je||Function("return this")(),Ke=t&&!t.nodeType&&t,We=Ke&&"object"==typeof r&&r&&!r.nodeType&&r,Ve=We&&We.exports===Ke,Xe=Ve&&Ye.process,Ze=function(){try{var e=We&&We.require&&We.require("util").types;return e||Xe&&Xe.binding&&Xe.binding("util")}catch(t){}}(),$e=Ze&&Ze.isArrayBuffer,et=Ze&&Ze.isDate,tt=Ze&&Ze.isMap,nt=Ze&&Ze.isRegExp,rt=Ze&&Ze.isSet,it=Ze&&Ze.isTypedArray;function at(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function ot(e,t,n,r){for(var i=-1,a=null==e?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}function st(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function ut(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function At(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function ct(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function lt(e,t){return!!(null==e?0:e.length)&&bt(e,t,0)>-1}function ft(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function ht(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function gt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function dt(e,t,n,r){var i=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function pt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function vt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var yt=wt("length");function mt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function It(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function bt(e,t,n){return t===t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):It(e,Ct,n)}function Et(e,t,n,r){for(var i=n-1,a=e.length;++i<a;)if(r(e[i],t))return i;return-1}function Ct(e){return e!==e}function Bt(e,t){var n=null==e?0:e.length;return n?_t(e,t)/n:NaN}function wt(e){return function(t){return null==t?void 0:t[e]}}function Qt(e){return function(t){return null==e?void 0:e[t]}}function kt(e,t,n,r,i){return i(e,(function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)})),n}function _t(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);void 0!==a&&(n=void 0===n?a:n+a)}return n}function xt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function St(e){return function(t){return e(t)}}function Ot(e,t){return ht(t,(function(t){return e[t]}))}function Dt(e,t){return e.has(t)}function Rt(e,t){for(var n=-1,r=e.length;++n<r&&bt(t,e[n],0)>-1;);return n}function jt(e,t){for(var n=e.length;n--&&bt(t,e[n],0)>-1;);return n}function Mt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Nt=Qt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),Ft=Qt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Tt(e){return"\\"+Ge[e]}function Lt(e){return Ne.test(e)}function Pt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Ut(e,t){return function(n){return e(t(n))}}function Gt(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var s=e[n];s!==t&&s!==o||(e[n]=o,a[i++]=n)}return a}function qt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function Ht(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function Yt(e){return Lt(e)?function(e){var t=je.lastIndex=0;for(;je.test(e);)++t;return t}(e):yt(e)}function Jt(e){return Lt(e)?function(e){return e.match(je)||[]}(e):function(e){return e.split("")}(e)}var zt=Qt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var Kt=function e(t){var n=(t=null==t?ze:Kt.defaults(ze.Object(),t,Kt.pick(ze,Te))).Array,r=t.Date,i=t.Error,fe=t.Function,he=t.Math,ge=t.Object,de=t.RegExp,pe=t.String,ve=t.TypeError,ye=n.prototype,me=fe.prototype,Ie=ge.prototype,be=t["__core-js_shared__"],Ee=me.toString,Ce=Ie.hasOwnProperty,Be=0,we=function(){var e=/[^.]+$/.exec(be&&be.keys&&be.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Qe=Ie.toString,ke=Ee.call(ge),_e=ze._,xe=de("^"+Ee.call(Ce).replace(J,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Se=Ve?t.Buffer:void 0,Oe=t.Symbol,je=t.Uint8Array,Ne=Se?Se.allocUnsafe:void 0,Ge=Ut(ge.getPrototypeOf,ge),Ye=ge.create,Je=Ie.propertyIsEnumerable,Ke=ye.splice,We=Oe?Oe.isConcatSpreadable:void 0,Xe=Oe?Oe.iterator:void 0,Ze=Oe?Oe.toStringTag:void 0,yt=function(){try{var e=Zi(ge,"defineProperty");return e({},"",{}),e}catch(t){}}(),Qt=t.clearTimeout!==ze.clearTimeout&&t.clearTimeout,Wt=r&&r.now!==ze.Date.now&&r.now,Vt=t.setTimeout!==ze.setTimeout&&t.setTimeout,Xt=he.ceil,Zt=he.floor,$t=ge.getOwnPropertySymbols,en=Se?Se.isBuffer:void 0,tn=t.isFinite,nn=ye.join,rn=Ut(ge.keys,ge),an=he.max,on=he.min,sn=r.now,un=t.parseInt,An=he.random,cn=ye.reverse,ln=Zi(t,"DataView"),fn=Zi(t,"Map"),hn=Zi(t,"Promise"),gn=Zi(t,"Set"),dn=Zi(t,"WeakMap"),pn=Zi(ge,"create"),vn=dn&&new dn,yn={},mn=wa(ln),In=wa(fn),bn=wa(hn),En=wa(gn),Cn=wa(dn),Bn=Oe?Oe.prototype:void 0,wn=Bn?Bn.valueOf:void 0,Qn=Bn?Bn.toString:void 0;function kn(e){if(qo(e)&&!Do(e)&&!(e instanceof On)){if(e instanceof Sn)return e;if(Ce.call(e,"__wrapped__"))return Qa(e)}return new Sn(e)}var _n=function(){function e(){}return function(t){if(!Go(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function xn(){}function Sn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function On(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Dn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Rn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function jn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Mn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new jn;++t<n;)this.add(e[t])}function Nn(e){var t=this.__data__=new Rn(e);this.size=t.size}function Fn(e,t){var n=Do(e),r=!n&&Oo(e),i=!n&&!r&&No(e),a=!n&&!r&&!i&&Xo(e),o=n||r||i||a,s=o?xt(e.length,pe):[],u=s.length;for(var A in e)!t&&!Ce.call(e,A)||o&&("length"==A||i&&("offset"==A||"parent"==A)||a&&("buffer"==A||"byteLength"==A||"byteOffset"==A)||aa(A,u))||s.push(A);return s}function Tn(e){var t=e.length;return t?e[Mr(0,t-1)]:void 0}function Ln(e,t){return Ea(pi(e),Kn(t,0,e.length))}function Pn(e){return Ea(pi(e))}function Un(e,t,n){(void 0!==n&&!_o(e[t],n)||void 0===n&&!(t in e))&&Jn(e,t,n)}function Gn(e,t,n){var r=e[t];Ce.call(e,t)&&_o(r,n)&&(void 0!==n||t in e)||Jn(e,t,n)}function qn(e,t){for(var n=e.length;n--;)if(_o(e[n][0],t))return n;return-1}function Hn(e,t,n,r){return $n(e,(function(e,i,a){t(r,e,n(e),a)})),r}function Yn(e,t){return e&&vi(t,ms(t),e)}function Jn(e,t,n){"__proto__"==t&&yt?yt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function zn(e,t){for(var r=-1,i=t.length,a=n(i),o=null==e;++r<i;)a[r]=o?void 0:gs(e,t[r]);return a}function Kn(e,t,n){return e===e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Wn(e,t,n,r,i,a){var o,s=1&t,A=2&t,f=4&t;if(n&&(o=i?n(e,r,i,a):n(e)),void 0!==o)return o;if(!Go(e))return e;var E=Do(e);if(E){if(o=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Ce.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!s)return pi(e,o)}else{var R=ta(e),j=R==h||R==g;if(No(e))return ci(e,s);if(R==v||R==u||j&&!i){if(o=A||j?{}:ra(e),!s)return A?function(e,t){return vi(e,ea(e),t)}(e,function(e,t){return e&&vi(t,Is(t),e)}(o,e)):function(e,t){return vi(e,$i(e),t)}(e,Yn(o,e))}else{if(!Ue[R])return i?e:{};o=function(e,t,n){var r=e.constructor;switch(t){case C:return li(e);case c:case l:return new r(+e);case B:return function(e,t){var n=t?li(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case w:case Q:case k:case _:case x:case S:case"[object Uint8ClampedArray]":case O:case D:return fi(e,n);case d:return new r;case p:case I:return new r(e);case y:return function(e){var t=new e.constructor(e.source,re.exec(e));return t.lastIndex=e.lastIndex,t}(e);case m:return new r;case b:return i=e,wn?ge(wn.call(i)):{}}var i}(e,R,s)}}a||(a=new Nn);var M=a.get(e);if(M)return M;a.set(e,o),Ko(e)?e.forEach((function(r){o.add(Wn(r,t,n,r,e,a))})):Ho(e)&&e.forEach((function(r,i){o.set(i,Wn(r,t,n,i,e,a))}));var N=E?void 0:(f?A?Yi:Hi:A?Is:ms)(e);return st(N||e,(function(r,i){N&&(r=e[i=r]),Gn(o,i,Wn(r,t,n,i,e,a))})),o}function Vn(e,t,n){var r=n.length;if(null==e)return!r;for(e=ge(e);r--;){var i=n[r],a=t[i],o=e[i];if(void 0===o&&!(i in e)||!a(o))return!1}return!0}function Xn(e,t,n){if("function"!=typeof e)throw new ve(a);return ya((function(){e.apply(void 0,n)}),t)}function Zn(e,t,n,r){var i=-1,a=lt,o=!0,s=e.length,u=[],A=t.length;if(!s)return u;n&&(t=ht(t,St(n))),r?(a=ft,o=!1):t.length>=200&&(a=Dt,o=!1,t=new Mn(t));e:for(;++i<s;){var c=e[i],l=null==n?c:n(c);if(c=r||0!==c?c:0,o&&l===l){for(var f=A;f--;)if(t[f]===l)continue e;u.push(c)}else a(t,l,r)||u.push(c)}return u}kn.templateSettings={escape:P,evaluate:U,interpolate:G,variable:"",imports:{_:kn}},kn.prototype=xn.prototype,kn.prototype.constructor=kn,Sn.prototype=_n(xn.prototype),Sn.prototype.constructor=Sn,On.prototype=_n(xn.prototype),On.prototype.constructor=On,Dn.prototype.clear=function(){this.__data__=pn?pn(null):{},this.size=0},Dn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Dn.prototype.get=function(e){var t=this.__data__;if(pn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ce.call(t,e)?t[e]:void 0},Dn.prototype.has=function(e){var t=this.__data__;return pn?void 0!==t[e]:Ce.call(t,e)},Dn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pn&&void 0===t?"__lodash_hash_undefined__":t,this},Rn.prototype.clear=function(){this.__data__=[],this.size=0},Rn.prototype.delete=function(e){var t=this.__data__,n=qn(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ke.call(t,n,1),--this.size,!0)},Rn.prototype.get=function(e){var t=this.__data__,n=qn(t,e);return n<0?void 0:t[n][1]},Rn.prototype.has=function(e){return qn(this.__data__,e)>-1},Rn.prototype.set=function(e,t){var n=this.__data__,r=qn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},jn.prototype.clear=function(){this.size=0,this.__data__={hash:new Dn,map:new(fn||Rn),string:new Dn}},jn.prototype.delete=function(e){var t=Vi(this,e).delete(e);return this.size-=t?1:0,t},jn.prototype.get=function(e){return Vi(this,e).get(e)},jn.prototype.has=function(e){return Vi(this,e).has(e)},jn.prototype.set=function(e,t){var n=Vi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Mn.prototype.add=Mn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Mn.prototype.has=function(e){return this.__data__.has(e)},Nn.prototype.clear=function(){this.__data__=new Rn,this.size=0},Nn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Nn.prototype.get=function(e){return this.__data__.get(e)},Nn.prototype.has=function(e){return this.__data__.has(e)},Nn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Rn){var r=n.__data__;if(!fn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new jn(r)}return n.set(e,t),this.size=n.size,this};var $n=Ii(sr),er=Ii(ur,!0);function tr(e,t){var n=!0;return $n(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function nr(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(null!=o&&(void 0===s?o===o&&!Vo(o):n(o,s)))var s=o,u=a}return u}function rr(e,t){var n=[];return $n(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function ir(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=ia),i||(i=[]);++a<o;){var s=e[a];t>0&&n(s)?t>1?ir(s,t-1,n,r,i):gt(i,s):r||(i[i.length]=s)}return i}var ar=bi(),or=bi(!0);function sr(e,t){return e&&ar(e,t,ms)}function ur(e,t){return e&&or(e,t,ms)}function Ar(e,t){return ct(t,(function(t){return Lo(e[t])}))}function cr(e,t){for(var n=0,r=(t=oi(t,e)).length;null!=e&&n<r;)e=e[Ba(t[n++])];return n&&n==r?e:void 0}function lr(e,t,n){var r=t(e);return Do(e)?r:gt(r,n(e))}function fr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ze&&Ze in ge(e)?function(e){var t=Ce.call(e,Ze),n=e[Ze];try{e[Ze]=void 0;var r=!0}catch(a){}var i=Qe.call(e);r&&(t?e[Ze]=n:delete e[Ze]);return i}(e):function(e){return Qe.call(e)}(e)}function hr(e,t){return e>t}function gr(e,t){return null!=e&&Ce.call(e,t)}function dr(e,t){return null!=e&&t in ge(e)}function pr(e,t,r){for(var i=r?ft:lt,a=e[0].length,o=e.length,s=o,u=n(o),A=1/0,c=[];s--;){var l=e[s];s&&t&&(l=ht(l,St(t))),A=on(l.length,A),u[s]=!r&&(t||a>=120&&l.length>=120)?new Mn(s&&l):void 0}l=e[0];var f=-1,h=u[0];e:for(;++f<a&&c.length<A;){var g=l[f],d=t?t(g):g;if(g=r||0!==g?g:0,!(h?Dt(h,d):i(c,d,r))){for(s=o;--s;){var p=u[s];if(!(p?Dt(p,d):i(e[s],d,r)))continue e}h&&h.push(d),c.push(g)}}return c}function vr(e,t,n){var r=null==(e=ga(e,t=oi(t,e)))?e:e[Ba(Fa(t))];return null==r?void 0:at(r,e,n)}function yr(e){return qo(e)&&fr(e)==u}function mr(e,t,n,r,i){return e===t||(null==e||null==t||!qo(e)&&!qo(t)?e!==e&&t!==t:function(e,t,n,r,i,a){var o=Do(e),s=Do(t),h=o?A:ta(e),g=s?A:ta(t),E=(h=h==u?v:h)==v,w=(g=g==u?v:g)==v,Q=h==g;if(Q&&No(e)){if(!No(t))return!1;o=!0,E=!1}if(Q&&!E)return a||(a=new Nn),o||Xo(e)?Gi(e,t,n,r,i,a):function(e,t,n,r,i,a,o){switch(n){case B:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case C:return!(e.byteLength!=t.byteLength||!a(new je(e),new je(t)));case c:case l:case p:return _o(+e,+t);case f:return e.name==t.name&&e.message==t.message;case y:case I:return e==t+"";case d:var s=Pt;case m:var u=1&r;if(s||(s=qt),e.size!=t.size&&!u)return!1;var A=o.get(e);if(A)return A==t;r|=2,o.set(e,t);var h=Gi(s(e),s(t),r,i,a,o);return o.delete(e),h;case b:if(wn)return wn.call(e)==wn.call(t)}return!1}(e,t,h,n,r,i,a);if(!(1&n)){var k=E&&Ce.call(e,"__wrapped__"),_=w&&Ce.call(t,"__wrapped__");if(k||_){var x=k?e.value():e,S=_?t.value():t;return a||(a=new Nn),i(x,S,n,r,a)}}if(!Q)return!1;return a||(a=new Nn),function(e,t,n,r,i,a){var o=1&n,s=Hi(e),u=s.length,A=Hi(t).length;if(u!=A&&!o)return!1;var c=u;for(;c--;){var l=s[c];if(!(o?l in t:Ce.call(t,l)))return!1}var f=a.get(e);if(f&&a.get(t))return f==t;var h=!0;a.set(e,t),a.set(t,e);var g=o;for(;++c<u;){l=s[c];var d=e[l],p=t[l];if(r)var v=o?r(p,d,l,t,e,a):r(d,p,l,e,t,a);if(!(void 0===v?d===p||i(d,p,n,r,a):v)){h=!1;break}g||(g="constructor"==l)}if(h&&!g){var y=e.constructor,m=t.constructor;y==m||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof m&&m instanceof m||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,r,i,a)}(e,t,n,r,mr,i))}function Ir(e,t,n,r){var i=n.length,a=i,o=!r;if(null==e)return!a;for(e=ge(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){var u=(s=n[i])[0],A=e[u],c=s[1];if(o&&s[2]){if(void 0===A&&!(u in e))return!1}else{var l=new Nn;if(r)var f=r(A,c,u,e,t,l);if(!(void 0===f?mr(c,A,3,r,l):f))return!1}}return!0}function br(e){return!(!Go(e)||(t=e,we&&we in t))&&(Lo(e)?xe:oe).test(wa(e));var t}function Er(e){return"function"==typeof e?e:null==e?Ys:"object"==typeof e?Do(e)?_r(e[0],e[1]):kr(e):eu(e)}function Cr(e){if(!ca(e))return rn(e);var t=[];for(var n in ge(e))Ce.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Br(e){if(!Go(e))return function(e){var t=[];if(null!=e)for(var n in ge(e))t.push(n);return t}(e);var t=ca(e),n=[];for(var r in e)("constructor"!=r||!t&&Ce.call(e,r))&&n.push(r);return n}function wr(e,t){return e<t}function Qr(e,t){var r=-1,i=jo(e)?n(e.length):[];return $n(e,(function(e,n,a){i[++r]=t(e,n,a)})),i}function kr(e){var t=Xi(e);return 1==t.length&&t[0][2]?fa(t[0][0],t[0][1]):function(n){return n===e||Ir(n,e,t)}}function _r(e,t){return sa(e)&&la(t)?fa(Ba(e),t):function(n){var r=gs(n,e);return void 0===r&&r===t?ds(n,e):mr(t,r,3)}}function xr(e,t,n,r,i){e!==t&&ar(t,(function(a,o){if(i||(i=new Nn),Go(a))!function(e,t,n,r,i,a,o){var s=pa(e,n),u=pa(t,n),A=o.get(u);if(A)return void Un(e,n,A);var c=a?a(s,u,n+"",e,t,o):void 0,l=void 0===c;if(l){var f=Do(u),h=!f&&No(u),g=!f&&!h&&Xo(u);c=u,f||h||g?Do(s)?c=s:Mo(s)?c=pi(s):h?(l=!1,c=ci(u,!0)):g?(l=!1,c=fi(u,!0)):c=[]:Jo(u)||Oo(u)?(c=s,Oo(s)?c=as(s):Go(s)&&!Lo(s)||(c=ra(u))):l=!1}l&&(o.set(u,c),i(c,u,r,a,o),o.delete(u));Un(e,n,c)}(e,t,o,n,xr,r,i);else{var s=r?r(pa(e,o),a,o+"",e,t,i):void 0;void 0===s&&(s=a),Un(e,o,s)}}),Is)}function Sr(e,t){var n=e.length;if(n)return aa(t+=t<0?n:0,n)?e[t]:void 0}function Or(e,t,n){var r=-1;return t=ht(t.length?t:[Ys],St(Wi())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Qr(e,(function(e,n,i){return{criteria:ht(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;for(;++r<o;){var u=hi(i[r],a[r]);if(u){if(r>=s)return u;var A=n[r];return u*("desc"==A?-1:1)}}return e.index-t.index}(e,t,n)}))}function Dr(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=cr(e,o);n(s,o)&&Pr(a,oi(o,e),s)}return a}function Rr(e,t,n,r){var i=r?Et:bt,a=-1,o=t.length,s=e;for(e===t&&(t=pi(t)),n&&(s=ht(e,St(n)));++a<o;)for(var u=0,A=t[a],c=n?n(A):A;(u=i(s,c,u,r))>-1;)s!==e&&Ke.call(s,u,1),Ke.call(e,u,1);return e}function jr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==a){var a=i;aa(i)?Ke.call(e,i,1):Zr(e,i)}}return e}function Mr(e,t){return e+Zt(An()*(t-e+1))}function Nr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Zt(t/2))&&(e+=e)}while(t);return n}function Fr(e,t){return ma(ha(e,t,Ys),e+"")}function Tr(e){return Tn(_s(e))}function Lr(e,t){var n=_s(e);return Ea(n,Kn(t,0,n.length))}function Pr(e,t,n,r){if(!Go(e))return e;for(var i=-1,a=(t=oi(t,e)).length,o=a-1,s=e;null!=s&&++i<a;){var u=Ba(t[i]),A=n;if(i!=o){var c=s[u];void 0===(A=r?r(c,u,s):void 0)&&(A=Go(c)?c:aa(t[i+1])?[]:{})}Gn(s,u,A),s=s[u]}return e}var Ur=vn?function(e,t){return vn.set(e,t),e}:Ys,Gr=yt?function(e,t){return yt(e,"toString",{configurable:!0,enumerable:!1,value:Gs(t),writable:!0})}:Ys;function qr(e){return Ea(_s(e))}function Hr(e,t,r){var i=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(r=r>a?a:r)<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var o=n(a);++i<a;)o[i]=e[i+t];return o}function Yr(e,t){var n;return $n(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function Jr(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t===t&&i<=2147483647){for(;r<i;){var a=r+i>>>1,o=e[a];null!==o&&!Vo(o)&&(n?o<=t:o<t)?r=a+1:i=a}return i}return zr(e,t,Ys,n)}function zr(e,t,n,r){t=n(t);for(var i=0,a=null==e?0:e.length,o=t!==t,s=null===t,u=Vo(t),A=void 0===t;i<a;){var c=Zt((i+a)/2),l=n(e[c]),f=void 0!==l,h=null===l,g=l===l,d=Vo(l);if(o)var p=r||g;else p=A?g&&(r||f):s?g&&f&&(r||!h):u?g&&f&&!h&&(r||!d):!h&&!d&&(r?l<=t:l<t);p?i=c+1:a=c}return on(a,4294967294)}function Kr(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n],s=t?t(o):o;if(!n||!_o(s,u)){var u=s;a[i++]=0===o?0:o}}return a}function Wr(e){return"number"==typeof e?e:Vo(e)?NaN:+e}function Vr(e){if("string"==typeof e)return e;if(Do(e))return ht(e,Vr)+"";if(Vo(e))return Qn?Qn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Xr(e,t,n){var r=-1,i=lt,a=e.length,o=!0,s=[],u=s;if(n)o=!1,i=ft;else if(a>=200){var A=t?null:Ni(e);if(A)return qt(A);o=!1,i=Dt,u=new Mn}else u=t?[]:s;e:for(;++r<a;){var c=e[r],l=t?t(c):c;if(c=n||0!==c?c:0,o&&l===l){for(var f=u.length;f--;)if(u[f]===l)continue e;t&&u.push(l),s.push(c)}else i(u,l,n)||(u!==s&&u.push(l),s.push(c))}return s}function Zr(e,t){return null==(e=ga(e,t=oi(t,e)))||delete e[Ba(Fa(t))]}function $r(e,t,n,r){return Pr(e,t,n(cr(e,t)),r)}function ei(e,t,n,r){for(var i=e.length,a=r?i:-1;(r?a--:++a<i)&&t(e[a],a,e););return n?Hr(e,r?0:a,r?a+1:i):Hr(e,r?a+1:0,r?i:a)}function ti(e,t){var n=e;return n instanceof On&&(n=n.value()),dt(t,(function(e,t){return t.func.apply(t.thisArg,gt([e],t.args))}),n)}function ni(e,t,r){var i=e.length;if(i<2)return i?Xr(e[0]):[];for(var a=-1,o=n(i);++a<i;)for(var s=e[a],u=-1;++u<i;)u!=a&&(o[a]=Zn(o[a]||s,e[u],t,r));return Xr(ir(o,1),t,r)}function ri(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}function ii(e){return Mo(e)?e:[]}function ai(e){return"function"==typeof e?e:Ys}function oi(e,t){return Do(e)?e:sa(e,t)?[e]:Ca(os(e))}var si=Fr;function ui(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Hr(e,t,n)}var Ai=Qt||function(e){return ze.clearTimeout(e)};function ci(e,t){if(t)return e.slice();var n=e.length,r=Ne?Ne(n):new e.constructor(n);return e.copy(r),r}function li(e){var t=new e.constructor(e.byteLength);return new je(t).set(new je(e)),t}function fi(e,t){var n=t?li(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function hi(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e===e,a=Vo(e),o=void 0!==t,s=null===t,u=t===t,A=Vo(t);if(!s&&!A&&!a&&e>t||a&&o&&u&&!s&&!A||r&&o&&u||!n&&u||!i)return 1;if(!r&&!a&&!A&&e<t||A&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!u)return-1}return 0}function gi(e,t,r,i){for(var a=-1,o=e.length,s=r.length,u=-1,A=t.length,c=an(o-s,0),l=n(A+c),f=!i;++u<A;)l[u]=t[u];for(;++a<s;)(f||a<o)&&(l[r[a]]=e[a]);for(;c--;)l[u++]=e[a++];return l}function di(e,t,r,i){for(var a=-1,o=e.length,s=-1,u=r.length,A=-1,c=t.length,l=an(o-u,0),f=n(l+c),h=!i;++a<l;)f[a]=e[a];for(var g=a;++A<c;)f[g+A]=t[A];for(;++s<u;)(h||a<o)&&(f[g+r[s]]=e[a++]);return f}function pi(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function vi(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],u=r?r(n[s],e[s],s,n,e):void 0;void 0===u&&(u=e[s]),i?Jn(n,s,u):Gn(n,s,u)}return n}function yi(e,t){return function(n,r){var i=Do(n)?ot:Hn,a=t?t():{};return i(n,e,Wi(r,2),a)}}function mi(e){return Fr((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,o&&oa(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=ge(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t}))}function Ii(e,t){return function(n,r){if(null==n)return n;if(!jo(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=ge(n);(t?a--:++a<i)&&!1!==r(o[a],a,o););return n}}function bi(e){return function(t,n,r){for(var i=-1,a=ge(t),o=r(t),s=o.length;s--;){var u=o[e?s:++i];if(!1===n(a[u],u,a))break}return t}}function Ei(e){return function(t){var n=Lt(t=os(t))?Jt(t):void 0,r=n?n[0]:t.charAt(0),i=n?ui(n,1).join(""):t.slice(1);return r[e]()+i}}function Ci(e){return function(t){return dt(Ls(Os(t).replace(De,"")),e,"")}}function Bi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=_n(e.prototype),r=e.apply(n,t);return Go(r)?r:n}}function wi(e){return function(t,n,r){var i=ge(t);if(!jo(t)){var a=Wi(n,3);t=ms(t),n=function(e){return a(i[e],e,i)}}var o=e(t,n,r);return o>-1?i[a?t[o]:o]:void 0}}function Qi(e){return qi((function(t){var n=t.length,r=n,i=Sn.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new ve(a);if(i&&!s&&"wrapper"==zi(o))var s=new Sn([],!0)}for(r=s?r:n;++r<n;){var u=zi(o=t[r]),A="wrapper"==u?Ji(o):void 0;s=A&&ua(A[0])&&424==A[1]&&!A[4].length&&1==A[9]?s[zi(A[0])].apply(s,A[3]):1==o.length&&ua(o)?s[u]():s.thru(o)}return function(){var e=arguments,r=e[0];if(s&&1==e.length&&Do(r))return s.plant(r).value();for(var i=0,a=n?t[i].apply(this,e):r;++i<n;)a=t[i].call(this,a);return a}}))}function ki(e,t,r,i,a,o,s,u,A,c){var l=128&t,f=1&t,h=2&t,g=24&t,d=512&t,p=h?void 0:Bi(e);return function v(){for(var y=arguments.length,m=n(y),I=y;I--;)m[I]=arguments[I];if(g)var b=Ki(v),E=Mt(m,b);if(i&&(m=gi(m,i,a,g)),o&&(m=di(m,o,s,g)),y-=E,g&&y<c){var C=Gt(m,b);return ji(e,t,ki,v.placeholder,r,m,C,u,A,c-y)}var B=f?r:this,w=h?B[e]:e;return y=m.length,u?m=da(m,u):d&&y>1&&m.reverse(),l&&A<y&&(m.length=A),this&&this!==ze&&this instanceof v&&(w=p||Bi(w)),w.apply(B,m)}}function _i(e,t){return function(n,r){return function(e,t,n,r){return sr(e,(function(e,i,a){t(r,n(e),i,a)})),r}(n,e,t(r),{})}}function xi(e,t){return function(n,r){var i;if(void 0===n&&void 0===r)return t;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;"string"==typeof n||"string"==typeof r?(n=Vr(n),r=Vr(r)):(n=Wr(n),r=Wr(r)),i=e(n,r)}return i}}function Si(e){return qi((function(t){return t=ht(t,St(Wi())),Fr((function(n){var r=this;return e(t,(function(e){return at(e,r,n)}))}))}))}function Oi(e,t){var n=(t=void 0===t?" ":Vr(t)).length;if(n<2)return n?Nr(t,e):t;var r=Nr(t,Xt(e/Yt(t)));return Lt(t)?ui(Jt(r),0,e).join(""):r.slice(0,e)}function Di(e){return function(t,r,i){return i&&"number"!=typeof i&&oa(t,r,i)&&(r=i=void 0),t=ts(t),void 0===r?(r=t,t=0):r=ts(r),function(e,t,r,i){for(var a=-1,o=an(Xt((t-e)/(r||1)),0),s=n(o);o--;)s[i?o:++a]=e,e+=r;return s}(t,r,i=void 0===i?t<r?1:-1:ts(i),e)}}function Ri(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=is(t),n=is(n)),e(t,n)}}function ji(e,t,n,r,i,a,o,s,u,A){var c=8&t;t|=c?32:64,4&(t&=~(c?64:32))||(t&=-4);var l=[e,t,i,c?a:void 0,c?o:void 0,c?void 0:a,c?void 0:o,s,u,A],f=n.apply(void 0,l);return ua(e)&&va(f,l),f.placeholder=r,Ia(f,e,t)}function Mi(e){var t=he[e];return function(e,n){if(e=is(e),(n=null==n?0:on(ns(n),292))&&tn(e)){var r=(os(e)+"e").split("e");return+((r=(os(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Ni=gn&&1/qt(new gn([,-0]))[1]==1/0?function(e){return new gn(e)}:Vs;function Fi(e){return function(t){var n=ta(t);return n==d?Pt(t):n==m?Ht(t):function(e,t){return ht(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ti(e,t,r,i,s,u,A,c){var l=2&t;if(!l&&"function"!=typeof e)throw new ve(a);var f=i?i.length:0;if(f||(t&=-97,i=s=void 0),A=void 0===A?A:an(ns(A),0),c=void 0===c?c:ns(c),f-=s?s.length:0,64&t){var h=i,g=s;i=s=void 0}var d=l?void 0:Ji(e),p=[e,t,r,i,s,h,g,u,A,c];if(d&&function(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,s=128==r&&8==n||128==r&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!a&&!s)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var A=e[3];e[3]=A?gi(A,u,t[4]):u,e[4]=A?Gt(e[3],o):t[4]}(u=t[5])&&(A=e[5],e[5]=A?di(A,u,t[6]):u,e[6]=A?Gt(e[5],o):t[6]);(u=t[7])&&(e[7]=u);128&r&&(e[8]=null==e[8]?t[8]:on(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(p,d),e=p[0],t=p[1],r=p[2],i=p[3],s=p[4],!(c=p[9]=void 0===p[9]?l?0:e.length:an(p[9]-f,0))&&24&t&&(t&=-25),t&&1!=t)v=8==t||16==t?function(e,t,r){var i=Bi(e);return function a(){for(var o=arguments.length,s=n(o),u=o,A=Ki(a);u--;)s[u]=arguments[u];var c=o<3&&s[0]!==A&&s[o-1]!==A?[]:Gt(s,A);if((o-=c.length)<r)return ji(e,t,ki,a.placeholder,void 0,s,c,void 0,void 0,r-o);var l=this&&this!==ze&&this instanceof a?i:e;return at(l,this,s)}}(e,t,c):32!=t&&33!=t||s.length?ki.apply(void 0,p):function(e,t,r,i){var a=1&t,o=Bi(e);return function t(){for(var s=-1,u=arguments.length,A=-1,c=i.length,l=n(c+u),f=this&&this!==ze&&this instanceof t?o:e;++A<c;)l[A]=i[A];for(;u--;)l[A++]=arguments[++s];return at(f,a?r:this,l)}}(e,t,r,i);else var v=function(e,t,n){var r=1&t,i=Bi(e);return function t(){var a=this&&this!==ze&&this instanceof t?i:e;return a.apply(r?n:this,arguments)}}(e,t,r);return Ia((d?Ur:va)(v,p),e,t)}function Li(e,t,n,r){return void 0===e||_o(e,Ie[n])&&!Ce.call(r,n)?t:e}function Pi(e,t,n,r,i,a){return Go(e)&&Go(t)&&(a.set(t,e),xr(e,t,void 0,Pi,a),a.delete(t)),e}function Ui(e){return Jo(e)?void 0:e}function Gi(e,t,n,r,i,a){var o=1&n,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var A=a.get(e);if(A&&a.get(t))return A==t;var c=-1,l=!0,f=2&n?new Mn:void 0;for(a.set(e,t),a.set(t,e);++c<s;){var h=e[c],g=t[c];if(r)var d=o?r(g,h,c,t,e,a):r(h,g,c,e,t,a);if(void 0!==d){if(d)continue;l=!1;break}if(f){if(!vt(t,(function(e,t){if(!Dt(f,t)&&(h===e||i(h,e,n,r,a)))return f.push(t)}))){l=!1;break}}else if(h!==g&&!i(h,g,n,r,a)){l=!1;break}}return a.delete(e),a.delete(t),l}function qi(e){return ma(ha(e,void 0,Da),e+"")}function Hi(e){return lr(e,ms,$i)}function Yi(e){return lr(e,Is,ea)}var Ji=vn?function(e){return vn.get(e)}:Vs;function zi(e){for(var t=e.name+"",n=yn[t],r=Ce.call(yn,t)?n.length:0;r--;){var i=n[r],a=i.func;if(null==a||a==e)return i.name}return t}function Ki(e){return(Ce.call(kn,"placeholder")?kn:e).placeholder}function Wi(){var e=kn.iteratee||Js;return e=e===Js?Er:e,arguments.length?e(arguments[0],arguments[1]):e}function Vi(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function Xi(e){for(var t=ms(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,la(i)]}return t}function Zi(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return br(n)?n:void 0}var $i=$t?function(e){return null==e?[]:(e=ge(e),ct($t(e),(function(t){return Je.call(e,t)})))}:ru,ea=$t?function(e){for(var t=[];e;)gt(t,$i(e)),e=Ge(e);return t}:ru,ta=fr;function na(e,t,n){for(var r=-1,i=(t=oi(t,e)).length,a=!1;++r<i;){var o=Ba(t[r]);if(!(a=null!=e&&n(e,o)))break;e=e[o]}return a||++r!=i?a:!!(i=null==e?0:e.length)&&Uo(i)&&aa(o,i)&&(Do(e)||Oo(e))}function ra(e){return"function"!=typeof e.constructor||ca(e)?{}:_n(Ge(e))}function ia(e){return Do(e)||Oo(e)||!!(We&&e&&e[We])}function aa(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ue.test(e))&&e>-1&&e%1==0&&e<t}function oa(e,t,n){if(!Go(n))return!1;var r=typeof t;return!!("number"==r?jo(n)&&aa(t,n.length):"string"==r&&t in n)&&_o(n[t],e)}function sa(e,t){if(Do(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Vo(e))||(H.test(e)||!q.test(e)||null!=t&&e in ge(t))}function ua(e){var t=zi(e),n=kn[t];if("function"!=typeof n||!(t in On.prototype))return!1;if(e===n)return!0;var r=Ji(n);return!!r&&e===r[0]}(ln&&ta(new ln(new ArrayBuffer(1)))!=B||fn&&ta(new fn)!=d||hn&&"[object Promise]"!=ta(hn.resolve())||gn&&ta(new gn)!=m||dn&&ta(new dn)!=E)&&(ta=function(e){var t=fr(e),n=t==v?e.constructor:void 0,r=n?wa(n):"";if(r)switch(r){case mn:return B;case In:return d;case bn:return"[object Promise]";case En:return m;case Cn:return E}return t});var Aa=be?Lo:iu;function ca(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ie)}function la(e){return e===e&&!Go(e)}function fa(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in ge(n)))}}function ha(e,t,r){return t=an(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,o=an(i.length-t,0),s=n(o);++a<o;)s[a]=i[t+a];a=-1;for(var u=n(t+1);++a<t;)u[a]=i[a];return u[t]=r(s),at(e,this,u)}}function ga(e,t){return t.length<2?e:cr(e,Hr(t,0,-1))}function da(e,t){for(var n=e.length,r=on(t.length,n),i=pi(e);r--;){var a=t[r];e[r]=aa(a,n)?i[a]:void 0}return e}function pa(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}var va=ba(Ur),ya=Vt||function(e,t){return ze.setTimeout(e,t)},ma=ba(Gr);function Ia(e,t,n){var r=t+"";return ma(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(X,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return st(s,(function(n){var r="_."+n[0];t&n[1]&&!lt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(Z);return t?t[1].split($):[]}(r),n)))}function ba(e){var t=0,n=0;return function(){var r=sn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ea(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n<t;){var a=Mr(n,i),o=e[a];e[a]=e[n],e[n]=o}return e.length=t,e}var Ca=function(e){var t=Eo(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Y,(function(e,n,r,i){t.push(r?i.replace(te,"$1"):n||e)})),t}));function Ba(e){if("string"==typeof e||Vo(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function wa(e){if(null!=e){try{return Ee.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Qa(e){if(e instanceof On)return e.clone();var t=new Sn(e.__wrapped__,e.__chain__);return t.__actions__=pi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var ka=Fr((function(e,t){return Mo(e)?Zn(e,ir(t,1,Mo,!0)):[]})),_a=Fr((function(e,t){var n=Fa(t);return Mo(n)&&(n=void 0),Mo(e)?Zn(e,ir(t,1,Mo,!0),Wi(n,2)):[]})),xa=Fr((function(e,t){var n=Fa(t);return Mo(n)&&(n=void 0),Mo(e)?Zn(e,ir(t,1,Mo,!0),void 0,n):[]}));function Sa(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ns(n);return i<0&&(i=an(r+i,0)),It(e,Wi(t,3),i)}function Oa(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=ns(n),i=n<0?an(r+i,0):on(i,r-1)),It(e,Wi(t,3),i,!0)}function Da(e){return(null==e?0:e.length)?ir(e,1):[]}function Ra(e){return e&&e.length?e[0]:void 0}var ja=Fr((function(e){var t=ht(e,ii);return t.length&&t[0]===e[0]?pr(t):[]})),Ma=Fr((function(e){var t=Fa(e),n=ht(e,ii);return t===Fa(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?pr(n,Wi(t,2)):[]})),Na=Fr((function(e){var t=Fa(e),n=ht(e,ii);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?pr(n,void 0,t):[]}));function Fa(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Ta=Fr(La);function La(e,t){return e&&e.length&&t&&t.length?Rr(e,t):e}var Pa=qi((function(e,t){var n=null==e?0:e.length,r=zn(e,t);return jr(e,ht(t,(function(e){return aa(e,n)?+e:e})).sort(hi)),r}));function Ua(e){return null==e?e:cn.call(e)}var Ga=Fr((function(e){return Xr(ir(e,1,Mo,!0))})),qa=Fr((function(e){var t=Fa(e);return Mo(t)&&(t=void 0),Xr(ir(e,1,Mo,!0),Wi(t,2))})),Ha=Fr((function(e){var t=Fa(e);return t="function"==typeof t?t:void 0,Xr(ir(e,1,Mo,!0),void 0,t)}));function Ya(e){if(!e||!e.length)return[];var t=0;return e=ct(e,(function(e){if(Mo(e))return t=an(e.length,t),!0})),xt(t,(function(t){return ht(e,wt(t))}))}function Ja(e,t){if(!e||!e.length)return[];var n=Ya(e);return null==t?n:ht(n,(function(e){return at(t,void 0,e)}))}var za=Fr((function(e,t){return Mo(e)?Zn(e,t):[]})),Ka=Fr((function(e){return ni(ct(e,Mo))})),Wa=Fr((function(e){var t=Fa(e);return Mo(t)&&(t=void 0),ni(ct(e,Mo),Wi(t,2))})),Va=Fr((function(e){var t=Fa(e);return t="function"==typeof t?t:void 0,ni(ct(e,Mo),void 0,t)})),Xa=Fr(Ya);var Za=Fr((function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Ja(e,n)}));function $a(e){var t=kn(e);return t.__chain__=!0,t}function eo(e,t){return t(e)}var to=qi((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return zn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof On&&aa(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:eo,args:[i],thisArg:void 0}),new Sn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(i)}));var no=yi((function(e,t,n){Ce.call(e,n)?++e[n]:Jn(e,n,1)}));var ro=wi(Sa),io=wi(Oa);function ao(e,t){return(Do(e)?st:$n)(e,Wi(t,3))}function oo(e,t){return(Do(e)?ut:er)(e,Wi(t,3))}var so=yi((function(e,t,n){Ce.call(e,n)?e[n].push(t):Jn(e,n,[t])}));var uo=Fr((function(e,t,r){var i=-1,a="function"==typeof t,o=jo(e)?n(e.length):[];return $n(e,(function(e){o[++i]=a?at(t,e,r):vr(e,t,r)})),o})),Ao=yi((function(e,t,n){Jn(e,n,t)}));function co(e,t){return(Do(e)?ht:Qr)(e,Wi(t,3))}var lo=yi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var fo=Fr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&oa(e,t[0],t[1])?t=[]:n>2&&oa(t[0],t[1],t[2])&&(t=[t[0]]),Or(e,ir(t,1),[])})),ho=Wt||function(){return ze.Date.now()};function go(e,t,n){return t=n?void 0:t,Ti(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function po(e,t){var n;if("function"!=typeof t)throw new ve(a);return e=ns(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var vo=Fr((function(e,t,n){var r=1;if(n.length){var i=Gt(n,Ki(vo));r|=32}return Ti(e,r,t,n,i)})),yo=Fr((function(e,t,n){var r=3;if(n.length){var i=Gt(n,Ki(yo));r|=32}return Ti(t,r,e,n,i)}));function mo(e,t,n){var r,i,o,s,u,A,c=0,l=!1,f=!1,h=!0;if("function"!=typeof e)throw new ve(a);function g(t){var n=r,a=i;return r=i=void 0,c=t,s=e.apply(a,n)}function d(e){return c=e,u=ya(v,t),l?g(e):s}function p(e){var n=e-A;return void 0===A||n>=t||n<0||f&&e-c>=o}function v(){var e=ho();if(p(e))return y(e);u=ya(v,function(e){var n=t-(e-A);return f?on(n,o-(e-c)):n}(e))}function y(e){return u=void 0,h&&r?g(e):(r=i=void 0,s)}function m(){var e=ho(),n=p(e);if(r=arguments,i=this,A=e,n){if(void 0===u)return d(A);if(f)return Ai(u),u=ya(v,t),g(A)}return void 0===u&&(u=ya(v,t)),s}return t=is(t)||0,Go(n)&&(l=!!n.leading,o=(f="maxWait"in n)?an(is(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h),m.cancel=function(){void 0!==u&&Ai(u),c=0,r=A=i=u=void 0},m.flush=function(){return void 0===u?s:y(ho())},m}var Io=Fr((function(e,t){return Xn(e,1,t)})),bo=Fr((function(e,t,n){return Xn(e,is(t)||0,n)}));function Eo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ve(a);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Eo.Cache||jn),n}function Co(e){if("function"!=typeof e)throw new ve(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Eo.Cache=jn;var Bo=si((function(e,t){var n=(t=1==t.length&&Do(t[0])?ht(t[0],St(Wi())):ht(ir(t,1),St(Wi()))).length;return Fr((function(r){for(var i=-1,a=on(r.length,n);++i<a;)r[i]=t[i].call(this,r[i]);return at(e,this,r)}))})),wo=Fr((function(e,t){return Ti(e,32,void 0,t,Gt(t,Ki(wo)))})),Qo=Fr((function(e,t){return Ti(e,64,void 0,t,Gt(t,Ki(Qo)))})),ko=qi((function(e,t){return Ti(e,256,void 0,void 0,void 0,t)}));function _o(e,t){return e===t||e!==e&&t!==t}var xo=Ri(hr),So=Ri((function(e,t){return e>=t})),Oo=yr(function(){return arguments}())?yr:function(e){return qo(e)&&Ce.call(e,"callee")&&!Je.call(e,"callee")},Do=n.isArray,Ro=$e?St($e):function(e){return qo(e)&&fr(e)==C};function jo(e){return null!=e&&Uo(e.length)&&!Lo(e)}function Mo(e){return qo(e)&&jo(e)}var No=en||iu,Fo=et?St(et):function(e){return qo(e)&&fr(e)==l};function To(e){if(!qo(e))return!1;var t=fr(e);return t==f||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Jo(e)}function Lo(e){if(!Go(e))return!1;var t=fr(e);return t==h||t==g||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Po(e){return"number"==typeof e&&e==ns(e)}function Uo(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Go(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function qo(e){return null!=e&&"object"==typeof e}var Ho=tt?St(tt):function(e){return qo(e)&&ta(e)==d};function Yo(e){return"number"==typeof e||qo(e)&&fr(e)==p}function Jo(e){if(!qo(e)||fr(e)!=v)return!1;var t=Ge(e);if(null===t)return!0;var n=Ce.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ee.call(n)==ke}var zo=nt?St(nt):function(e){return qo(e)&&fr(e)==y};var Ko=rt?St(rt):function(e){return qo(e)&&ta(e)==m};function Wo(e){return"string"==typeof e||!Do(e)&&qo(e)&&fr(e)==I}function Vo(e){return"symbol"==typeof e||qo(e)&&fr(e)==b}var Xo=it?St(it):function(e){return qo(e)&&Uo(e.length)&&!!Pe[fr(e)]};var Zo=Ri(wr),$o=Ri((function(e,t){return e<=t}));function es(e){if(!e)return[];if(jo(e))return Wo(e)?Jt(e):pi(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=ta(e);return(t==d?Pt:t==m?qt:_s)(e)}function ts(e){return e?(e=is(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function ns(e){var t=ts(e),n=t%1;return t===t?n?t-n:t:0}function rs(e){return e?Kn(ns(e),0,4294967295):0}function is(e){if("number"==typeof e)return e;if(Vo(e))return NaN;if(Go(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Go(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(K,"");var n=ae.test(e);return n||se.test(e)?He(e.slice(2),n?2:8):ie.test(e)?NaN:+e}function as(e){return vi(e,Is(e))}function os(e){return null==e?"":Vr(e)}var ss=mi((function(e,t){if(ca(t)||jo(t))vi(t,ms(t),e);else for(var n in t)Ce.call(t,n)&&Gn(e,n,t[n])})),us=mi((function(e,t){vi(t,Is(t),e)})),As=mi((function(e,t,n,r){vi(t,Is(t),e,r)})),cs=mi((function(e,t,n,r){vi(t,ms(t),e,r)})),ls=qi(zn);var fs=Fr((function(e,t){e=ge(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&oa(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],o=Is(a),s=-1,u=o.length;++s<u;){var A=o[s],c=e[A];(void 0===c||_o(c,Ie[A])&&!Ce.call(e,A))&&(e[A]=a[A])}return e})),hs=Fr((function(e){return e.push(void 0,Pi),at(Es,void 0,e)}));function gs(e,t,n){var r=null==e?void 0:cr(e,t);return void 0===r?n:r}function ds(e,t){return null!=e&&na(e,t,dr)}var ps=_i((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Qe.call(t)),e[t]=n}),Gs(Ys)),vs=_i((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Qe.call(t)),Ce.call(e,t)?e[t].push(n):e[t]=[n]}),Wi),ys=Fr(vr);function ms(e){return jo(e)?Fn(e):Cr(e)}function Is(e){return jo(e)?Fn(e,!0):Br(e)}var bs=mi((function(e,t,n){xr(e,t,n)})),Es=mi((function(e,t,n,r){xr(e,t,n,r)})),Cs=qi((function(e,t){var n={};if(null==e)return n;var r=!1;t=ht(t,(function(t){return t=oi(t,e),r||(r=t.length>1),t})),vi(e,Yi(e),n),r&&(n=Wn(n,7,Ui));for(var i=t.length;i--;)Zr(n,t[i]);return n}));var Bs=qi((function(e,t){return null==e?{}:function(e,t){return Dr(e,t,(function(t,n){return ds(e,n)}))}(e,t)}));function ws(e,t){if(null==e)return{};var n=ht(Yi(e),(function(e){return[e]}));return t=Wi(t),Dr(e,n,(function(e,n){return t(e,n[0])}))}var Qs=Fi(ms),ks=Fi(Is);function _s(e){return null==e?[]:Ot(e,ms(e))}var xs=Ci((function(e,t,n){return t=t.toLowerCase(),e+(n?Ss(t):t)}));function Ss(e){return Ts(os(e).toLowerCase())}function Os(e){return(e=os(e))&&e.replace(Ae,Nt).replace(Re,"")}var Ds=Ci((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Rs=Ci((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),js=Ei("toLowerCase");var Ms=Ci((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ns=Ci((function(e,t,n){return e+(n?" ":"")+Ts(t)}));var Fs=Ci((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ts=Ei("toUpperCase");function Ls(e,t,n){return e=os(e),void 0===(t=n?void 0:t)?function(e){return Fe.test(e)}(e)?function(e){return e.match(Me)||[]}(e):function(e){return e.match(ee)||[]}(e):e.match(t)||[]}var Ps=Fr((function(e,t){try{return at(e,void 0,t)}catch(n){return To(n)?n:new i(n)}})),Us=qi((function(e,t){return st(t,(function(t){t=Ba(t),Jn(e,t,vo(e[t],e))})),e}));function Gs(e){return function(){return e}}var qs=Qi(),Hs=Qi(!0);function Ys(e){return e}function Js(e){return Er("function"==typeof e?e:Wn(e,1))}var zs=Fr((function(e,t){return function(n){return vr(n,e,t)}})),Ks=Fr((function(e,t){return function(n){return vr(e,n,t)}}));function Ws(e,t,n){var r=ms(t),i=Ar(t,r);null!=n||Go(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Ar(t,ms(t)));var a=!(Go(n)&&"chain"in n)||!!n.chain,o=Lo(e);return st(i,(function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(a||t){var n=e(this.__wrapped__),i=n.__actions__=pi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,gt([this.value()],arguments))})})),e}function Vs(){}var Xs=Si(ht),Zs=Si(At),$s=Si(vt);function eu(e){return sa(e)?wt(Ba(e)):function(e){return function(t){return cr(t,e)}}(e)}var tu=Di(),nu=Di(!0);function ru(){return[]}function iu(){return!1}var au=xi((function(e,t){return e+t}),0),ou=Mi("ceil"),su=xi((function(e,t){return e/t}),1),uu=Mi("floor");var Au=xi((function(e,t){return e*t}),1),cu=Mi("round"),lu=xi((function(e,t){return e-t}),0);return kn.after=function(e,t){if("function"!=typeof t)throw new ve(a);return e=ns(e),function(){if(--e<1)return t.apply(this,arguments)}},kn.ary=go,kn.assign=ss,kn.assignIn=us,kn.assignInWith=As,kn.assignWith=cs,kn.at=ls,kn.before=po,kn.bind=vo,kn.bindAll=Us,kn.bindKey=yo,kn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Do(e)?e:[e]},kn.chain=$a,kn.chunk=function(e,t,r){t=(r?oa(e,t,r):void 0===t)?1:an(ns(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,o=0,s=n(Xt(i/t));a<i;)s[o++]=Hr(e,a,a+=t);return s},kn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var a=e[t];a&&(i[r++]=a)}return i},kn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return gt(Do(r)?pi(r):[r],ir(t,1))},kn.cond=function(e){var t=null==e?0:e.length,n=Wi();return e=t?ht(e,(function(e){if("function"!=typeof e[1])throw new ve(a);return[n(e[0]),e[1]]})):[],Fr((function(n){for(var r=-1;++r<t;){var i=e[r];if(at(i[0],this,n))return at(i[1],this,n)}}))},kn.conforms=function(e){return function(e){var t=ms(e);return function(n){return Vn(n,e,t)}}(Wn(e,1))},kn.constant=Gs,kn.countBy=no,kn.create=function(e,t){var n=_n(e);return null==t?n:Yn(n,t)},kn.curry=function e(t,n,r){var i=Ti(t,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=e.placeholder,i},kn.curryRight=function e(t,n,r){var i=Ti(t,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=e.placeholder,i},kn.debounce=mo,kn.defaults=fs,kn.defaultsDeep=hs,kn.defer=Io,kn.delay=bo,kn.difference=ka,kn.differenceBy=_a,kn.differenceWith=xa,kn.drop=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,(t=n||void 0===t?1:ns(t))<0?0:t,r):[]},kn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,0,(t=r-(t=n||void 0===t?1:ns(t)))<0?0:t):[]},kn.dropRightWhile=function(e,t){return e&&e.length?ei(e,Wi(t,3),!0,!0):[]},kn.dropWhile=function(e,t){return e&&e.length?ei(e,Wi(t,3),!0):[]},kn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&oa(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=ns(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:ns(r))<0&&(r+=i),r=n>r?0:rs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},kn.filter=function(e,t){return(Do(e)?ct:rr)(e,Wi(t,3))},kn.flatMap=function(e,t){return ir(co(e,t),1)},kn.flatMapDeep=function(e,t){return ir(co(e,t),1/0)},kn.flatMapDepth=function(e,t,n){return n=void 0===n?1:ns(n),ir(co(e,t),n)},kn.flatten=Da,kn.flattenDeep=function(e){return(null==e?0:e.length)?ir(e,1/0):[]},kn.flattenDepth=function(e,t){return(null==e?0:e.length)?ir(e,t=void 0===t?1:ns(t)):[]},kn.flip=function(e){return Ti(e,512)},kn.flow=qs,kn.flowRight=Hs,kn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},kn.functions=function(e){return null==e?[]:Ar(e,ms(e))},kn.functionsIn=function(e){return null==e?[]:Ar(e,Is(e))},kn.groupBy=so,kn.initial=function(e){return(null==e?0:e.length)?Hr(e,0,-1):[]},kn.intersection=ja,kn.intersectionBy=Ma,kn.intersectionWith=Na,kn.invert=ps,kn.invertBy=vs,kn.invokeMap=uo,kn.iteratee=Js,kn.keyBy=Ao,kn.keys=ms,kn.keysIn=Is,kn.map=co,kn.mapKeys=function(e,t){var n={};return t=Wi(t,3),sr(e,(function(e,r,i){Jn(n,t(e,r,i),e)})),n},kn.mapValues=function(e,t){var n={};return t=Wi(t,3),sr(e,(function(e,r,i){Jn(n,r,t(e,r,i))})),n},kn.matches=function(e){return kr(Wn(e,1))},kn.matchesProperty=function(e,t){return _r(e,Wn(t,1))},kn.memoize=Eo,kn.merge=bs,kn.mergeWith=Es,kn.method=zs,kn.methodOf=Ks,kn.mixin=Ws,kn.negate=Co,kn.nthArg=function(e){return e=ns(e),Fr((function(t){return Sr(t,e)}))},kn.omit=Cs,kn.omitBy=function(e,t){return ws(e,Co(Wi(t)))},kn.once=function(e){return po(2,e)},kn.orderBy=function(e,t,n,r){return null==e?[]:(Do(t)||(t=null==t?[]:[t]),Do(n=r?void 0:n)||(n=null==n?[]:[n]),Or(e,t,n))},kn.over=Xs,kn.overArgs=Bo,kn.overEvery=Zs,kn.overSome=$s,kn.partial=wo,kn.partialRight=Qo,kn.partition=lo,kn.pick=Bs,kn.pickBy=ws,kn.property=eu,kn.propertyOf=function(e){return function(t){return null==e?void 0:cr(e,t)}},kn.pull=Ta,kn.pullAll=La,kn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Rr(e,t,Wi(n,2)):e},kn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Rr(e,t,void 0,n):e},kn.pullAt=Pa,kn.range=tu,kn.rangeRight=nu,kn.rearg=ko,kn.reject=function(e,t){return(Do(e)?ct:rr)(e,Co(Wi(t,3)))},kn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],a=e.length;for(t=Wi(t,3);++r<a;){var o=e[r];t(o,r,e)&&(n.push(o),i.push(r))}return jr(e,i),n},kn.rest=function(e,t){if("function"!=typeof e)throw new ve(a);return Fr(e,t=void 0===t?t:ns(t))},kn.reverse=Ua,kn.sampleSize=function(e,t,n){return t=(n?oa(e,t,n):void 0===t)?1:ns(t),(Do(e)?Ln:Lr)(e,t)},kn.set=function(e,t,n){return null==e?e:Pr(e,t,n)},kn.setWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Pr(e,t,n,r)},kn.shuffle=function(e){return(Do(e)?Pn:qr)(e)},kn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&oa(e,t,n)?(t=0,n=r):(t=null==t?0:ns(t),n=void 0===n?r:ns(n)),Hr(e,t,n)):[]},kn.sortBy=fo,kn.sortedUniq=function(e){return e&&e.length?Kr(e):[]},kn.sortedUniqBy=function(e,t){return e&&e.length?Kr(e,Wi(t,2)):[]},kn.split=function(e,t,n){return n&&"number"!=typeof n&&oa(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=os(e))&&("string"==typeof t||null!=t&&!zo(t))&&!(t=Vr(t))&&Lt(e)?ui(Jt(e),0,n):e.split(t,n):[]},kn.spread=function(e,t){if("function"!=typeof e)throw new ve(a);return t=null==t?0:an(ns(t),0),Fr((function(n){var r=n[t],i=ui(n,0,t);return r&&gt(i,r),at(e,this,i)}))},kn.tail=function(e){var t=null==e?0:e.length;return t?Hr(e,1,t):[]},kn.take=function(e,t,n){return e&&e.length?Hr(e,0,(t=n||void 0===t?1:ns(t))<0?0:t):[]},kn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Hr(e,(t=r-(t=n||void 0===t?1:ns(t)))<0?0:t,r):[]},kn.takeRightWhile=function(e,t){return e&&e.length?ei(e,Wi(t,3),!1,!0):[]},kn.takeWhile=function(e,t){return e&&e.length?ei(e,Wi(t,3)):[]},kn.tap=function(e,t){return t(e),e},kn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ve(a);return Go(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),mo(e,t,{leading:r,maxWait:t,trailing:i})},kn.thru=eo,kn.toArray=es,kn.toPairs=Qs,kn.toPairsIn=ks,kn.toPath=function(e){return Do(e)?ht(e,Ba):Vo(e)?[e]:pi(Ca(os(e)))},kn.toPlainObject=as,kn.transform=function(e,t,n){var r=Do(e),i=r||No(e)||Xo(e);if(t=Wi(t,4),null==n){var a=e&&e.constructor;n=i?r?new a:[]:Go(e)&&Lo(a)?_n(Ge(e)):{}}return(i?st:sr)(e,(function(e,r,i){return t(n,e,r,i)})),n},kn.unary=function(e){return go(e,1)},kn.union=Ga,kn.unionBy=qa,kn.unionWith=Ha,kn.uniq=function(e){return e&&e.length?Xr(e):[]},kn.uniqBy=function(e,t){return e&&e.length?Xr(e,Wi(t,2)):[]},kn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Xr(e,void 0,t):[]},kn.unset=function(e,t){return null==e||Zr(e,t)},kn.unzip=Ya,kn.unzipWith=Ja,kn.update=function(e,t,n){return null==e?e:$r(e,t,ai(n))},kn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:$r(e,t,ai(n),r)},kn.values=_s,kn.valuesIn=function(e){return null==e?[]:Ot(e,Is(e))},kn.without=za,kn.words=Ls,kn.wrap=function(e,t){return wo(ai(t),e)},kn.xor=Ka,kn.xorBy=Wa,kn.xorWith=Va,kn.zip=Xa,kn.zipObject=function(e,t){return ri(e||[],t||[],Gn)},kn.zipObjectDeep=function(e,t){return ri(e||[],t||[],Pr)},kn.zipWith=Za,kn.entries=Qs,kn.entriesIn=ks,kn.extend=us,kn.extendWith=As,Ws(kn,kn),kn.add=au,kn.attempt=Ps,kn.camelCase=xs,kn.capitalize=Ss,kn.ceil=ou,kn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=is(n))===n?n:0),void 0!==t&&(t=(t=is(t))===t?t:0),Kn(is(e),t,n)},kn.clone=function(e){return Wn(e,4)},kn.cloneDeep=function(e){return Wn(e,5)},kn.cloneDeepWith=function(e,t){return Wn(e,5,t="function"==typeof t?t:void 0)},kn.cloneWith=function(e,t){return Wn(e,4,t="function"==typeof t?t:void 0)},kn.conformsTo=function(e,t){return null==t||Vn(e,t,ms(t))},kn.deburr=Os,kn.defaultTo=function(e,t){return null==e||e!==e?t:e},kn.divide=su,kn.endsWith=function(e,t,n){e=os(e),t=Vr(t);var r=e.length,i=n=void 0===n?r:Kn(ns(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},kn.eq=_o,kn.escape=function(e){return(e=os(e))&&L.test(e)?e.replace(F,Ft):e},kn.escapeRegExp=function(e){return(e=os(e))&&z.test(e)?e.replace(J,"\\$&"):e},kn.every=function(e,t,n){var r=Do(e)?At:tr;return n&&oa(e,t,n)&&(t=void 0),r(e,Wi(t,3))},kn.find=ro,kn.findIndex=Sa,kn.findKey=function(e,t){return mt(e,Wi(t,3),sr)},kn.findLast=io,kn.findLastIndex=Oa,kn.findLastKey=function(e,t){return mt(e,Wi(t,3),ur)},kn.floor=uu,kn.forEach=ao,kn.forEachRight=oo,kn.forIn=function(e,t){return null==e?e:ar(e,Wi(t,3),Is)},kn.forInRight=function(e,t){return null==e?e:or(e,Wi(t,3),Is)},kn.forOwn=function(e,t){return e&&sr(e,Wi(t,3))},kn.forOwnRight=function(e,t){return e&&ur(e,Wi(t,3))},kn.get=gs,kn.gt=xo,kn.gte=So,kn.has=function(e,t){return null!=e&&na(e,t,gr)},kn.hasIn=ds,kn.head=Ra,kn.identity=Ys,kn.includes=function(e,t,n,r){e=jo(e)?e:_s(e),n=n&&!r?ns(n):0;var i=e.length;return n<0&&(n=an(i+n,0)),Wo(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&bt(e,t,n)>-1},kn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ns(n);return i<0&&(i=an(r+i,0)),bt(e,t,i)},kn.inRange=function(e,t,n){return t=ts(t),void 0===n?(n=t,t=0):n=ts(n),function(e,t,n){return e>=on(t,n)&&e<an(t,n)}(e=is(e),t,n)},kn.invoke=ys,kn.isArguments=Oo,kn.isArray=Do,kn.isArrayBuffer=Ro,kn.isArrayLike=jo,kn.isArrayLikeObject=Mo,kn.isBoolean=function(e){return!0===e||!1===e||qo(e)&&fr(e)==c},kn.isBuffer=No,kn.isDate=Fo,kn.isElement=function(e){return qo(e)&&1===e.nodeType&&!Jo(e)},kn.isEmpty=function(e){if(null==e)return!0;if(jo(e)&&(Do(e)||"string"==typeof e||"function"==typeof e.splice||No(e)||Xo(e)||Oo(e)))return!e.length;var t=ta(e);if(t==d||t==m)return!e.size;if(ca(e))return!Cr(e).length;for(var n in e)if(Ce.call(e,n))return!1;return!0},kn.isEqual=function(e,t){return mr(e,t)},kn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?mr(e,t,void 0,n):!!r},kn.isError=To,kn.isFinite=function(e){return"number"==typeof e&&tn(e)},kn.isFunction=Lo,kn.isInteger=Po,kn.isLength=Uo,kn.isMap=Ho,kn.isMatch=function(e,t){return e===t||Ir(e,t,Xi(t))},kn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,Ir(e,t,Xi(t),n)},kn.isNaN=function(e){return Yo(e)&&e!=+e},kn.isNative=function(e){if(Aa(e))throw new i("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return br(e)},kn.isNil=function(e){return null==e},kn.isNull=function(e){return null===e},kn.isNumber=Yo,kn.isObject=Go,kn.isObjectLike=qo,kn.isPlainObject=Jo,kn.isRegExp=zo,kn.isSafeInteger=function(e){return Po(e)&&e>=-9007199254740991&&e<=9007199254740991},kn.isSet=Ko,kn.isString=Wo,kn.isSymbol=Vo,kn.isTypedArray=Xo,kn.isUndefined=function(e){return void 0===e},kn.isWeakMap=function(e){return qo(e)&&ta(e)==E},kn.isWeakSet=function(e){return qo(e)&&"[object WeakSet]"==fr(e)},kn.join=function(e,t){return null==e?"":nn.call(e,t)},kn.kebabCase=Ds,kn.last=Fa,kn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=ns(n))<0?an(r+i,0):on(i,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):It(e,Ct,i,!0)},kn.lowerCase=Rs,kn.lowerFirst=js,kn.lt=Zo,kn.lte=$o,kn.max=function(e){return e&&e.length?nr(e,Ys,hr):void 0},kn.maxBy=function(e,t){return e&&e.length?nr(e,Wi(t,2),hr):void 0},kn.mean=function(e){return Bt(e,Ys)},kn.meanBy=function(e,t){return Bt(e,Wi(t,2))},kn.min=function(e){return e&&e.length?nr(e,Ys,wr):void 0},kn.minBy=function(e,t){return e&&e.length?nr(e,Wi(t,2),wr):void 0},kn.stubArray=ru,kn.stubFalse=iu,kn.stubObject=function(){return{}},kn.stubString=function(){return""},kn.stubTrue=function(){return!0},kn.multiply=Au,kn.nth=function(e,t){return e&&e.length?Sr(e,ns(t)):void 0},kn.noConflict=function(){return ze._===this&&(ze._=_e),this},kn.noop=Vs,kn.now=ho,kn.pad=function(e,t,n){e=os(e);var r=(t=ns(t))?Yt(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Oi(Zt(i),n)+e+Oi(Xt(i),n)},kn.padEnd=function(e,t,n){e=os(e);var r=(t=ns(t))?Yt(e):0;return t&&r<t?e+Oi(t-r,n):e},kn.padStart=function(e,t,n){e=os(e);var r=(t=ns(t))?Yt(e):0;return t&&r<t?Oi(t-r,n)+e:e},kn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),un(os(e).replace(W,""),t||0)},kn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&oa(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=ts(e),void 0===t?(t=e,e=0):t=ts(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=An();return on(e+i*(t-e+qe("1e-"+((i+"").length-1))),t)}return Mr(e,t)},kn.reduce=function(e,t,n){var r=Do(e)?dt:kt,i=arguments.length<3;return r(e,Wi(t,4),n,i,$n)},kn.reduceRight=function(e,t,n){var r=Do(e)?pt:kt,i=arguments.length<3;return r(e,Wi(t,4),n,i,er)},kn.repeat=function(e,t,n){return t=(n?oa(e,t,n):void 0===t)?1:ns(t),Nr(os(e),t)},kn.replace=function(){var e=arguments,t=os(e[0]);return e.length<3?t:t.replace(e[1],e[2])},kn.result=function(e,t,n){var r=-1,i=(t=oi(t,e)).length;for(i||(i=1,e=void 0);++r<i;){var a=null==e?void 0:e[Ba(t[r])];void 0===a&&(r=i,a=n),e=Lo(a)?a.call(e):a}return e},kn.round=cu,kn.runInContext=e,kn.sample=function(e){return(Do(e)?Tn:Tr)(e)},kn.size=function(e){if(null==e)return 0;if(jo(e))return Wo(e)?Yt(e):e.length;var t=ta(e);return t==d||t==m?e.size:Cr(e).length},kn.snakeCase=Ms,kn.some=function(e,t,n){var r=Do(e)?vt:Yr;return n&&oa(e,t,n)&&(t=void 0),r(e,Wi(t,3))},kn.sortedIndex=function(e,t){return Jr(e,t)},kn.sortedIndexBy=function(e,t,n){return zr(e,t,Wi(n,2))},kn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Jr(e,t);if(r<n&&_o(e[r],t))return r}return-1},kn.sortedLastIndex=function(e,t){return Jr(e,t,!0)},kn.sortedLastIndexBy=function(e,t,n){return zr(e,t,Wi(n,2),!0)},kn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=Jr(e,t,!0)-1;if(_o(e[n],t))return n}return-1},kn.startCase=Ns,kn.startsWith=function(e,t,n){return e=os(e),n=null==n?0:Kn(ns(n),0,e.length),t=Vr(t),e.slice(n,n+t.length)==t},kn.subtract=lu,kn.sum=function(e){return e&&e.length?_t(e,Ys):0},kn.sumBy=function(e,t){return e&&e.length?_t(e,Wi(t,2)):0},kn.template=function(e,t,n){var r=kn.templateSettings;n&&oa(e,t,n)&&(t=void 0),e=os(e),t=As({},t,r,Li);var i,a,o=As({},t.imports,r.imports,Li),s=ms(o),u=Ot(o,s),A=0,c=t.interpolate||ce,l="__p += '",f=de((t.escape||ce).source+"|"+c.source+"|"+(c===G?ne:ce).source+"|"+(t.evaluate||ce).source+"|$","g"),h="//# sourceURL="+(Ce.call(t,"sourceURL")?(t.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++Le+"]")+"\n";e.replace(f,(function(t,n,r,o,s,u){return r||(r=o),l+=e.slice(A,u).replace(le,Tt),n&&(i=!0,l+="' +\n__e("+n+") +\n'"),s&&(a=!0,l+="';\n"+s+";\n__p += '"),r&&(l+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),A=u+t.length,t})),l+="';\n";var g=Ce.call(t,"variable")&&t.variable;g||(l="with (obj) {\n"+l+"\n}\n"),l=(a?l.replace(R,""):l).replace(j,"$1").replace(M,"$1;"),l="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var d=Ps((function(){return fe(s,h+"return "+l).apply(void 0,u)}));if(d.source=l,To(d))throw d;return d},kn.times=function(e,t){if((e=ns(e))<1||e>9007199254740991)return[];var n=4294967295,r=on(e,4294967295);e-=4294967295;for(var i=xt(r,t=Wi(t));++n<e;)t(n);return i},kn.toFinite=ts,kn.toInteger=ns,kn.toLength=rs,kn.toLower=function(e){return os(e).toLowerCase()},kn.toNumber=is,kn.toSafeInteger=function(e){return e?Kn(ns(e),-9007199254740991,9007199254740991):0===e?e:0},kn.toString=os,kn.toUpper=function(e){return os(e).toUpperCase()},kn.trim=function(e,t,n){if((e=os(e))&&(n||void 0===t))return e.replace(K,"");if(!e||!(t=Vr(t)))return e;var r=Jt(e),i=Jt(t);return ui(r,Rt(r,i),jt(r,i)+1).join("")},kn.trimEnd=function(e,t,n){if((e=os(e))&&(n||void 0===t))return e.replace(V,"");if(!e||!(t=Vr(t)))return e;var r=Jt(e);return ui(r,0,jt(r,Jt(t))+1).join("")},kn.trimStart=function(e,t,n){if((e=os(e))&&(n||void 0===t))return e.replace(W,"");if(!e||!(t=Vr(t)))return e;var r=Jt(e);return ui(r,Rt(r,Jt(t))).join("")},kn.truncate=function(e,t){var n=30,r="...";if(Go(t)){var i="separator"in t?t.separator:i;n="length"in t?ns(t.length):n,r="omission"in t?Vr(t.omission):r}var a=(e=os(e)).length;if(Lt(e)){var o=Jt(e);a=o.length}if(n>=a)return e;var s=n-Yt(r);if(s<1)return r;var u=o?ui(o,0,s).join(""):e.slice(0,s);if(void 0===i)return u+r;if(o&&(s+=u.length-s),zo(i)){if(e.slice(s).search(i)){var A,c=u;for(i.global||(i=de(i.source,os(re.exec(i))+"g")),i.lastIndex=0;A=i.exec(c);)var l=A.index;u=u.slice(0,void 0===l?s:l)}}else if(e.indexOf(Vr(i),s)!=s){var f=u.lastIndexOf(i);f>-1&&(u=u.slice(0,f))}return u+r},kn.unescape=function(e){return(e=os(e))&&T.test(e)?e.replace(N,zt):e},kn.uniqueId=function(e){var t=++Be;return os(e)+t},kn.upperCase=Fs,kn.upperFirst=Ts,kn.each=ao,kn.eachRight=oo,kn.first=Ra,Ws(kn,function(){var e={};return sr(kn,(function(t,n){Ce.call(kn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),kn.VERSION="4.17.15",st(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){kn[e].placeholder=kn})),st(["drop","take"],(function(e,t){On.prototype[e]=function(n){n=void 0===n?1:an(ns(n),0);var r=this.__filtered__&&!t?new On(this):this.clone();return r.__filtered__?r.__takeCount__=on(n,r.__takeCount__):r.__views__.push({size:on(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},On.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),st(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;On.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Wi(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),st(["head","last"],(function(e,t){var n="take"+(t?"Right":"");On.prototype[e]=function(){return this[n](1).value()[0]}})),st(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");On.prototype[e]=function(){return this.__filtered__?new On(this):this[n](1)}})),On.prototype.compact=function(){return this.filter(Ys)},On.prototype.find=function(e){return this.filter(e).head()},On.prototype.findLast=function(e){return this.reverse().find(e)},On.prototype.invokeMap=Fr((function(e,t){return"function"==typeof e?new On(this):this.map((function(n){return vr(n,e,t)}))})),On.prototype.reject=function(e){return this.filter(Co(Wi(e)))},On.prototype.slice=function(e,t){e=ns(e);var n=this;return n.__filtered__&&(e>0||t<0)?new On(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ns(t))<0?n.dropRight(-t):n.take(t-e)),n)},On.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},On.prototype.toArray=function(){return this.take(4294967295)},sr(On.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=kn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(kn.prototype[t]=function(){var t=this.__wrapped__,o=r?[1]:arguments,s=t instanceof On,u=o[0],A=s||Do(t),c=function(e){var t=i.apply(kn,gt([e],o));return r&&l?t[0]:t};A&&n&&"function"==typeof u&&1!=u.length&&(s=A=!1);var l=this.__chain__,f=!!this.__actions__.length,h=a&&!l,g=s&&!f;if(!a&&A){t=g?t:new On(this);var d=e.apply(t,o);return d.__actions__.push({func:eo,args:[c],thisArg:void 0}),new Sn(d,l)}return h&&g?e.apply(this,o):(d=this.thru(c),h?r?d.value()[0]:d.value():d)})})),st(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ye[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);kn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Do(i)?i:[],e)}return this[n]((function(n){return t.apply(Do(n)?n:[],e)}))}})),sr(On.prototype,(function(e,t){var n=kn[t];if(n){var r=n.name+"";Ce.call(yn,r)||(yn[r]=[]),yn[r].push({name:t,func:n})}})),yn[ki(void 0,2).name]=[{name:"wrapper",func:void 0}],On.prototype.clone=function(){var e=new On(this.__wrapped__);return e.__actions__=pi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=pi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=pi(this.__views__),e},On.prototype.reverse=function(){if(this.__filtered__){var e=new On(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},On.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Do(e),r=t<0,i=n?e.length:0,a=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var a=n[r],o=a.size;switch(a.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=on(t,e+o);break;case"takeRight":e=an(e,t-o)}}return{start:e,end:t}}(0,i,this.__views__),o=a.start,s=a.end,u=s-o,A=r?s:o-1,c=this.__iteratees__,l=c.length,f=0,h=on(u,this.__takeCount__);if(!n||!r&&i==u&&h==u)return ti(e,this.__actions__);var g=[];e:for(;u--&&f<h;){for(var d=-1,p=e[A+=t];++d<l;){var v=c[d],y=v.iteratee,m=v.type,I=y(p);if(2==m)p=I;else if(!I){if(1==m)continue e;break e}}g[f++]=p}return g},kn.prototype.at=to,kn.prototype.chain=function(){return $a(this)},kn.prototype.commit=function(){return new Sn(this.value(),this.__chain__)},kn.prototype.next=function(){void 0===this.__values__&&(this.__values__=es(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},kn.prototype.plant=function(e){for(var t,n=this;n instanceof xn;){var r=Qa(n);r.__index__=0,r.__values__=void 0,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},kn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof On){var t=e;return this.__actions__.length&&(t=new On(this)),(t=t.reverse()).__actions__.push({func:eo,args:[Ua],thisArg:void 0}),new Sn(t,this.__chain__)}return this.thru(Ua)},kn.prototype.toJSON=kn.prototype.valueOf=kn.prototype.value=function(){return ti(this.__wrapped__,this.__actions__)},kn.prototype.first=kn.prototype.head,Xe&&(kn.prototype[Xe]=function(){return this}),kn}();ze._=Kt,void 0===(i=function(){return Kt}.call(t,n,t,r))||(r.exports=i)}).call(this)}).call(this,n(70),n(264)(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(61),i={};function a(e,t){var n;i[e]=!0,void 0!==t&&(n=t,r.global.console&&r.global.console.error&&r.global.console.error(n))}var o=function e(t){var n=t.gl;this.ext=t,this.isAlive=!0,this.hasBeenBound=!1,this.elementArrayBuffer=null,this.attribs=new Array(t.maxVertexAttribs);for(var r=0;r<this.attribs.length;r++){var i=new e.VertexAttrib(n);this.attribs[r]=i}this.maxAttrib=0};(o.VertexAttrib=function(e){this.enabled=!1,this.buffer=null,this.size=4,this.type=5126,this.normalized=!1,this.stride=16,this.offset=0,this.cached="",this.recache()}).prototype.recache=function(){this.cached=[this.size,this.type,this.normalized,this.stride,this.offset].join(":")};var s=function(e){var t=this;this.gl=e,function(e){var t=e.getError;e.getError=function(){var n;do{0!==(n=t.apply(e))&&(i[n]=!0)}while(0!==n);for(n in i)if(i[n])return delete i[n],parseInt(n,10);return 0}}(e);var n=this.original={getParameter:e.getParameter,enableVertexAttribArray:e.enableVertexAttribArray,disableVertexAttribArray:e.disableVertexAttribArray,bindBuffer:e.bindBuffer,getVertexAttrib:e.getVertexAttrib,vertexAttribPointer:e.vertexAttribPointer};e.getParameter=function(e){return e===t.VERTEX_ARRAY_BINDING_OES?t.currentVertexArrayObject===t.defaultVertexArrayObject?null:t.currentVertexArrayObject:n.getParameter.apply(this,arguments)},e.enableVertexAttribArray=function(e){var r=t.currentVertexArrayObject;r.maxAttrib=Math.max(r.maxAttrib,e);var i=r.attribs[e];return i.enabled=!0,n.enableVertexAttribArray.apply(this,arguments)},e.disableVertexAttribArray=function(e){var r=t.currentVertexArrayObject;r.maxAttrib=Math.max(r.maxAttrib,e);var i=r.attribs[e];return i.enabled=!1,n.disableVertexAttribArray.apply(this,arguments)},e.bindBuffer=function(e,r){switch(e){case 34962:t.currentArrayBuffer=r;break;case 34963:t.currentVertexArrayObject.elementArrayBuffer=r}return n.bindBuffer.apply(this,arguments)},e.getVertexAttrib=function(e,r){var i=t.currentVertexArrayObject,a=i.attribs[e];switch(r){case 34975:return a.buffer;case 34338:return a.enabled;case 34339:return a.size;case 34340:return a.stride;case 34341:return a.type;case 34922:return a.normalized;default:return n.getVertexAttrib.apply(this,arguments)}},e.vertexAttribPointer=function(e,r,i,a,o,s){var u=t.currentVertexArrayObject;u.maxAttrib=Math.max(u.maxAttrib,e);var A=u.attribs[e];return A.buffer=t.currentArrayBuffer,A.size=r,A.type=i,A.normalized=a,A.stride=o,A.offset=s,A.recache(),n.vertexAttribPointer.apply(this,arguments)},e.instrumentExtension&&e.instrumentExtension(this,"OES_vertex_array_object"),e.canvas&&e.canvas.addEventListener("webglcontextrestored",(function(){var e;e="OESVertexArrayObject emulation library context restored",r.global.console&&r.global.console.log&&r.global.console.log(e),t.reset_()}),!0),this.reset_()};function u(e){if("function"!==typeof e.createVertexArray){var t=e.getSupportedExtensions;e.getSupportedExtensions=function(){var e=t.call(this)||[];return e.indexOf("OES_vertex_array_object")<0&&e.push("OES_vertex_array_object"),e};var n=e.getExtension;e.getExtension=function(t){var r=n.call(this,t);return r||("OES_vertex_array_object"!==t?null:(e.__OESVertexArrayObject||(this.__OESVertexArrayObject=new s(this)),this.__OESVertexArrayObject))}}}s.prototype.VERTEX_ARRAY_BINDING_OES=34229,s.prototype.reset_=function(){if(void 0!==this.vertexArrayObjects)for(var e=0;e<this.vertexArrayObjects.length;++e)this.vertexArrayObjects.isAlive=!1;var t=this.gl;this.maxVertexAttribs=t.getParameter(34921),this.defaultVertexArrayObject=new o(this),this.currentVertexArrayObject=null,this.currentArrayBuffer=null,this.vertexArrayObjects=[this.defaultVertexArrayObject],this.bindVertexArrayOES(null)},s.prototype.createVertexArrayOES=function(){var e=new o(this);return this.vertexArrayObjects.push(e),e},s.prototype.deleteVertexArrayOES=function(e){e.isAlive=!1,this.vertexArrayObjects.splice(this.vertexArrayObjects.indexOf(e),1),this.currentVertexArrayObject===e&&this.bindVertexArrayOES(null)},s.prototype.isVertexArrayOES=function(e){return!!(e&&e instanceof o&&e.hasBeenBound&&e.ext===this)},s.prototype.bindVertexArrayOES=function(e){var t=this.gl;if(!e||e.isAlive){var n=this.original,r=this.currentVertexArrayObject;this.currentVertexArrayObject=e||this.defaultVertexArrayObject,this.currentVertexArrayObject.hasBeenBound=!0;var i=this.currentVertexArrayObject;if(r!==i){r&&i.elementArrayBuffer===r.elementArrayBuffer||n.bindBuffer.call(t,34963,i.elementArrayBuffer);for(var o=this.currentArrayBuffer,s=Math.max(r?r.maxAttrib:0,i.maxAttrib),u=0;u<=s;u++){var A=i.attribs[u],c=r?r.attribs[u]:null;if(r&&A.enabled===c.enabled||(A.enabled?n.enableVertexAttribArray.call(t,u):n.disableVertexAttribArray.call(t,u)),A.enabled){var l=!1;r&&A.buffer===c.buffer||(o!==A.buffer&&(n.bindBuffer.call(t,34962,A.buffer),o=A.buffer),l=!0),(l||A.cached!==c.cached)&&n.vertexAttribPointer.call(t,u,A.size,A.type,A.normalized,A.stride,A.offset)}}this.currentArrayBuffer!==o&&n.bindBuffer.call(t,34962,this.currentArrayBuffer)}}else a(1282,"bindVertexArrayOES: attempt to bind deleted arrayObject")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return A})),n.d(t,"b",(function(){return c}));var r=n(1),i=n(179),a=n(463),o=n(464),s=n(140),u=n(51);function A(e,t){Object(u.a)(e instanceof i.a||e instanceof a.a||e instanceof o.a);var n=e.constructor,r=e.gl,s=e.width,A=e.height,c=e.format,l=e.type,f=e.dataFormat,h=e.border,g=e.mipmaps;return new n(r,Object.assign({width:s,height:A,format:c,type:l,dataFormat:f,border:h,mipmaps:g},t))}function c(e,t){var n=e.gl,i=e.width,a=e.height,o=e.id;return new s.a(n,Object.assign({},t,{id:"framebuffer-for-".concat(o),width:i,height:a,attachments:Object(r.a)({},36064,e)}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(12),i=n.n(r),a=n(26),o=n(3),s=n(2),u=n(7),A=n(4),c=n(58),l=n(6),f=n(21),h=n(111),g=n(133),d=[34069,34070,34071,34072,34073,34074],p=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(o.a)(this,t),Object(g.b)(e),(n=Object(u.a)(this,Object(A.a)(t).call(this,e,Object.assign({},r,{target:34067})))).initialize(r),Object.seal(Object(c.a)(n)),n}return Object(l.a)(t,e),Object(s.a)(t,[{key:"initialize",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.mipmaps,r=void 0===n||n,i=t.parameters,a=void 0===i?{}:i;this.opts=t,this.setCubeMapImageData(t).then((function(){e.loaded=!0,r&&e.generateMipmap(t),e.setParameters(a)}))}},{key:"subImage",value:function(e){var t=e.face,n=e.data,r=e.x,i=void 0===r?0:r,a=e.y,o=void 0===a?0:a,s=e.mipmapLevel,u=void 0===s?0:s;return this._subImage({target:t,data:n,x:i,y:o,mipmapLevel:u})}},{key:"setCubeMapImageData",value:function(){var e=Object(a.a)(i.a.mark((function e(t){var n,r,a,o,s,u,A,c,l,h,g,p,v,y=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.width,r=t.height,a=t.pixels,o=t.data,s=t.border,u=void 0===s?0:s,A=t.format,c=void 0===A?6408:A,l=t.type,h=void 0===l?5121:l,g=this.gl,p=a||o,e.next=5,Promise.all(d.map((function(e){var t=p[e];return Promise.all(Array.isArray(t)?t:[t])})));case 5:v=e.sent,this.bind(),d.forEach((function(e,t){v[t].length>1&&!1!==y.opts.mipmaps&&f.h.warn("".concat(y.id," has mipmap and multiple LODs."))(),v[t].forEach((function(t,i){n&&r?g.texImage2D(e,i,c,n,r,u,c,h,t):g.texImage2D(e,i,c,c,h,t)}))})),this.unbind();case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setImageDataForFace",value:function(e){var t=this,n=e.face,r=e.width,i=e.height,a=e.pixels,o=e.data,s=e.border,u=void 0===s?0:s,A=e.format,c=void 0===A?6408:A,l=e.type,f=void 0===l?5121:l,h=this.gl,g=a||o;return this.bind(),g instanceof Promise?g.then((function(r){return t.setImageDataForFace(Object.assign({},e,{face:n,data:r,pixels:r}))})):this.width||this.height?h.texImage2D(n,0,c,r,i,u,c,f,g):h.texImage2D(n,0,c,c,f,g),this}}]),t}(h.a);p.FACES=d},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(3),i=n(7),a=n(4),o=n(58),s=n(2),u=n(6),A=n(21),c=n(133),l=n(111),f=n(159),h=n(82),g=function(e){function t(e){var n,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r.a)(this,t),Object(c.a)(e),s=Object.assign({depth:1},s,{target:32879,unpackFlipY:!1}),(n=Object(i.a)(this,Object(a.a)(t).call(this,e,s))).initialize(s),Object.seal(Object(o.a)(n)),n}return Object(u.a)(t,e),Object(s.a)(t,null,[{key:"isSupported",value:function(e){return Object(A.g)(e)}}]),Object(s.a)(t,[{key:"setImageData",value:function(e){var t=this,n=e.level,r=void 0===n?0:n,i=e.dataFormat,a=void 0===i?6408:i,o=e.width,s=e.height,u=e.depth,c=void 0===u?1:u,l=e.border,g=void 0===l?0:l,d=e.format,p=e.type,v=void 0===p?5121:p,y=e.offset,m=void 0===y?0:y,I=e.data,b=e.parameters,E=void 0===b?{}:b;if(this._trackDeallocatedMemory("Texture"),this.gl.bindTexture(this.target,this.handle),Object(A.l)(this.gl,E,(function(){ArrayBuffer.isView(I)&&t.gl.texImage3D(t.target,r,a,o,s,c,g,d,v,I),I instanceof h.a&&(t.gl.bindBuffer(35052,I.handle),t.gl.texImage3D(t.target,r,a,o,s,c,g,d,v,m))})),I&&I.byteLength)this._trackAllocatedMemory(I.byteLength,"Texture");else{var C=f.a[this.dataFormat]||4,B=f.c[this.type]||1;this._trackAllocatedMemory(this.width*this.height*this.depth*C*B,"Texture")}return this.loaded=!0,this}}]),t}(l.a)},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return A}));var r=n(157),i=n(158);function a(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,s=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s=function(){var e=Object(i.b)();return e.loaderRegistry=e.loaderRegistry||[],e.loaderRegistry};function u(e){var t,n=s(),i=a(e=Array.isArray(e)?e:[e]);try{var o=function(){var e=t.value,i=Object(r.b)(e);n.find((function(e){return i===e}))||n.unshift(i)};for(i.s();!(t=i.n()).done;)o()}catch(u){i.e(u)}finally{i.f()}}function A(){return s()}},function(e,t,n){"use strict";function r(e,t,n){n=n||2;var r,s,u,A,c,h,g,p=t&&t.length,v=p?t[0]*n:e.length,y=i(e,0,v,n,!0),m=[];if(!y||y.next===y.prev)return m;if(p&&(y=function(e,t,n,r){var o,s,u,A,c,h=[];for(o=0,s=t.length;o<s;o++)u=t[o]*r,A=o<s-1?t[o+1]*r:e.length,(c=i(e,u,A,r,!1))===c.next&&(c.steiner=!0),h.push(d(c));for(h.sort(l),o=0;o<h.length;o++)f(h[o],n),n=a(n,n.next);return n}(e,t,y,n)),e.length>80*n){r=u=e[0],s=A=e[1];for(var I=n;I<v;I+=n)(c=e[I])<r&&(r=c),(h=e[I+1])<s&&(s=h),c>u&&(u=c),h>A&&(A=h);g=0!==(g=Math.max(u-r,A-s))?1/g:0}return o(y,m,n,r,s,g),m}function i(e,t,n,r,i){var a,o;if(i===_(e,t,n,r)>0)for(a=t;a<n;a+=r)o=w(a,e[a],e[a+1],o);else for(a=n-r;a>=t;a-=r)o=w(a,e[a],e[a+1],o);return o&&m(o,o.next)&&(Q(o),o=o.next),o}function a(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!m(r,r.next)&&0!==y(r.prev,r,r.next))r=r.next;else{if(Q(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function o(e,t,n,r,i,l,f){if(e){!f&&l&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=g(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,a,o,s,u,A=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;t<A&&(s++,r=r.nextZ);t++);for(u=A;s>0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,A*=2}while(o>1)}(i)}(e,r,i,l);for(var h,d,p=e;e.prev!==e.next;)if(h=e.prev,d=e.next,l?u(e,r,i,l):s(e))t.push(h.i/n),t.push(e.i/n),t.push(d.i/n),Q(e),e=d.next,p=d.next;else if((e=d)===p){f?1===f?o(e=A(a(e),t,n),t,n,r,i,l,2):2===f&&c(e,t,n,r,i,l):o(a(e),t,n,r,i,l,1);break}}}function s(e){var t=e.prev,n=e,r=e.next;if(y(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(p(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&y(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function u(e,t,n,r){var i=e.prev,a=e,o=e.next;if(y(i,a,o)>=0)return!1;for(var s=i.x<a.x?i.x<o.x?i.x:o.x:a.x<o.x?a.x:o.x,u=i.y<a.y?i.y<o.y?i.y:o.y:a.y<o.y?a.y:o.y,A=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,l=g(s,u,t,n,r),f=g(A,c,t,n,r),h=e.prevZ,d=e.nextZ;h&&h.z>=l&&d&&d.z<=f;){if(h!==e.prev&&h!==e.next&&p(i.x,i.y,a.x,a.y,o.x,o.y,h.x,h.y)&&y(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,d!==e.prev&&d!==e.next&&p(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;h&&h.z>=l;){if(h!==e.prev&&h!==e.next&&p(i.x,i.y,a.x,a.y,o.x,o.y,h.x,h.y)&&y(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;d&&d.z<=f;){if(d!==e.prev&&d!==e.next&&p(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&y(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function A(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!m(i,o)&&I(i,r,r.next,o)&&C(i,o)&&C(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),Q(r),Q(r.next),r=e=o),r=r.next}while(r!==e);return a(r)}function c(e,t,n,r,i,s){var u=e;do{for(var A=u.next.next;A!==u.prev;){if(u.i!==A.i&&v(u,A)){var c=B(u,A);return u=a(u,u.next),c=a(c,c.next),o(u,t,n,r,i,s),void o(c,t,n,r,i,s)}A=A.next}u=u.next}while(u!==e)}function l(e,t){return e.x-t.x}function f(e,t){if(t=function(e,t){var n,r=t,i=e.x,a=e.y,o=-1/0;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>o){if(o=s,s===i){if(a===r.y)return r;if(a===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(i===o)return n;var u,A=n,c=n.x,l=n.y,f=1/0;r=n;do{i>=r.x&&r.x>=c&&i!==r.x&&p(a<l?i:o,a,c,l,a<l?o:i,a,r.x,r.y)&&(u=Math.abs(a-r.y)/(i-r.x),C(r,e)&&(u<f||u===f&&(r.x>n.x||r.x===n.x&&h(n,r)))&&(n=r,f=u)),r=r.next}while(r!==A);return n}(e,t)){var n=B(t,e);a(t,t.next),a(n,n.next)}}function h(e,t){return y(e.prev,e,t.prev)<0&&y(t.next,e,e.next)<0}function g(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function d(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function p(e,t,n,r,i,a,o,s){return(i-o)*(t-s)-(e-o)*(a-s)>=0&&(e-o)*(r-s)-(n-o)*(t-s)>=0&&(n-o)*(a-s)-(i-o)*(r-s)>=0}function v(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&I(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(C(e,t)&&C(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{n.y>a!==n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(y(e.prev,e,t.prev)||y(e,t.prev,t))||m(e,t)&&y(e.prev,e,e.next)>0&&y(t.prev,t,t.next)>0)}function y(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function m(e,t){return e.x===t.x&&e.y===t.y}function I(e,t,n,r){var i=E(y(e,t,n)),a=E(y(e,t,r)),o=E(y(n,r,e)),s=E(y(n,r,t));return i!==a&&o!==s||(!(0!==i||!b(e,n,t))||(!(0!==a||!b(e,r,t))||(!(0!==o||!b(n,e,r))||!(0!==s||!b(n,t,r)))))}function b(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function E(e){return e>0?1:e<0?-1:0}function C(e,t){return y(e.prev,e,e.next)<0?y(e,t,e.next)>=0&&y(e,e.prev,t)>=0:y(e,t,e.prev)<0||y(e,e.next,t)<0}function B(e,t){var n=new k(e.i,e.x,e.y),r=new k(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function w(e,t,n,r){var i=new k(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Q(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function k(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function _(e,t,n,r){for(var i=0,a=t,o=n-r;a<n;a+=r)i+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return i}e.exports=r,e.exports.default=r,r.deviation=function(e,t,n,r){var i=t&&t.length,a=i?t[0]*n:e.length,o=Math.abs(_(e,0,a,n));if(i)for(var s=0,u=t.length;s<u;s++){var A=t[s]*n,c=s<u-1?t[s+1]*n:e.length;o-=Math.abs(_(e,A,c,n))}var l=0;for(s=0;s<r.length;s+=3){var f=r[s]*n,h=r[s+1]*n,g=r[s+2]*n;l+=Math.abs((e[f]-e[g])*(e[h+1]-e[f+1])-(e[f]-e[h])*(e[g+1]-e[f+1]))}return 0===o&&0===l?0:Math.abs((l-o)/o)},r.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,i=0;i<e.length;i++){for(var a=0;a<e[i].length;a++)for(var o=0;o<t;o++)n.vertices.push(e[i][a][o]);i>0&&(r+=e[i-1].length,n.holes.push(r))}return n}},function(e,t,n){"use strict";e.exports=i,e.exports.default=i;var r=1e20;function i(e,t,n,r,i,a){this.fontSize=e||24,this.buffer=void 0===t?3:t,this.cutoff=r||.25,this.fontFamily=i||"sans-serif",this.fontWeight=a||"normal",this.radius=n||8;var o=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=o,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(o*o),this.gridInner=new Float64Array(o*o),this.f=new Float64Array(o),this.d=new Float64Array(o),this.z=new Float64Array(o+1),this.v=new Int16Array(o),this.middle=Math.round(o/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function a(e,t,n,r,i,a,s){for(var u=0;u<t;u++){for(var A=0;A<n;A++)r[A]=e[A*t+u];for(o(r,i,a,s,n),A=0;A<n;A++)e[A*t+u]=i[A]}for(A=0;A<n;A++){for(u=0;u<t;u++)r[u]=e[A*t+u];for(o(r,i,a,s,t),u=0;u<t;u++)e[A*t+u]=Math.sqrt(i[u])}}function o(e,t,n,i,a){n[0]=0,i[0]=-r,i[1]=+r;for(var o=1,s=0;o<a;o++){for(var u=(e[o]+o*o-(e[n[s]]+n[s]*n[s]))/(2*o-2*n[s]);u<=i[s];)s--,u=(e[o]+o*o-(e[n[s]]+n[s]*n[s]))/(2*o-2*n[s]);n[++s]=o,i[s]=u,i[s+1]=+r}for(o=0,s=0;o<a;o++){for(;i[s+1]<o;)s++;t[o]=(o-n[s])*(o-n[s])+e[n[s]]}}i.prototype.draw=function(e){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(e,this.buffer,this.middle);for(var t=this.ctx.getImageData(0,0,this.size,this.size),n=new Uint8ClampedArray(this.size*this.size),i=0;i<this.size*this.size;i++){var o=t.data[4*i+3]/255;this.gridOuter[i]=1===o?0:0===o?r:Math.pow(Math.max(0,.5-o),2),this.gridInner[i]=1===o?r:0===o?0:Math.pow(Math.max(0,o-.5),2)}for(a(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),a(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),i=0;i<this.size*this.size;i++){var s=this.gridOuter[i]-this.gridInner[i];n[i]=Math.max(0,Math.min(255,Math.round(255-255*(s/this.radius+this.cutoff))))}return n}},function(e,t,n){"use strict";var r=n(19),i=n(11),a=n(13),o=n(14),s=n(15),u=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.call(this,(function(t){return e._observers.add(t),function(){return e._observers.delete(t)}})))._observers=new Set,e}return Object(a.a)(n,[{key:"next",value:function(e){var t,n=Object(r.a)(this._observers);try{for(n.s();!(t=n.n()).done;){t.value.next(e)}}catch(i){n.e(i)}finally{n.f()}}},{key:"error",value:function(e){var t,n=Object(r.a)(this._observers);try{for(n.s();!(t=n.n()).done;){t.value.error(e)}}catch(i){n.e(i)}finally{n.f()}}},{key:"complete",value:function(){var e,t=Object(r.a)(this._observers);try{for(t.s();!(e=t.n()).done;){e.value.complete()}}catch(n){t.e(n)}finally{t.f()}}}]),n}(n(255).a);t.a=u},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=function(){};function i(){var e,t=!1,n=r;return[new Promise((function(r){t?r(e):n=r})),function(r){t=!0,e=r,n()}]}},function(e,t,n){"use strict";var r=n(632).default;e.exports=function(e){return Boolean(e&&e[r]&&e===e[r]())}},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"===typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";e.exports=i;var r=n(416);function i(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}i.Varint=0,i.Fixed64=1,i.Bytes=2,i.Fixed32=5;var a="undefined"===typeof TextDecoder?null:new TextDecoder("utf8");function o(e){return e.type===i.Bytes?e.readVarint()+e.pos:e.pos+1}function s(e,t,n){return n?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function u(e,t,n){var r=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=e;i--)n.buf[i+r]=n.buf[i]}function A(e,t){for(var n=0;n<e.length;n++)t.writeVarint(e[n])}function c(e,t){for(var n=0;n<e.length;n++)t.writeSVarint(e[n])}function l(e,t){for(var n=0;n<e.length;n++)t.writeFloat(e[n])}function f(e,t){for(var n=0;n<e.length;n++)t.writeDouble(e[n])}function h(e,t){for(var n=0;n<e.length;n++)t.writeBoolean(e[n])}function g(e,t){for(var n=0;n<e.length;n++)t.writeFixed32(e[n])}function d(e,t){for(var n=0;n<e.length;n++)t.writeSFixed32(e[n])}function p(e,t){for(var n=0;n<e.length;n++)t.writeFixed64(e[n])}function v(e,t){for(var n=0;n<e.length;n++)t.writeSFixed64(e[n])}function y(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function m(e,t,n){e[n]=t,e[n+1]=t>>>8,e[n+2]=t>>>16,e[n+3]=t>>>24}function I(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}i.prototype={destroy:function(){this.buf=null},readFields:function(e,t,n){for(n=n||this.length;this.pos<n;){var r=this.readVarint(),i=r>>3,a=this.pos;this.type=7&r,e(i,t,this),this.pos===a&&this.skip(r)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=y(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=I(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=y(this.buf,this.pos)+4294967296*y(this.buf,this.pos+4);return this.pos+=8,e},readSFixed64:function(){var e=y(this.buf,this.pos)+4294967296*I(this.buf,this.pos+4);return this.pos+=8,e},readFloat:function(){var e=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,n,r=this.buf;return t=127&(n=r[this.pos++]),n<128?t:(t|=(127&(n=r[this.pos++]))<<7,n<128?t:(t|=(127&(n=r[this.pos++]))<<14,n<128?t:(t|=(127&(n=r[this.pos++]))<<21,n<128?t:function(e,t,n){var r,i,a=n.buf;if(i=a[n.pos++],r=(112&i)>>4,i<128)return s(e,r,t);if(i=a[n.pos++],r|=(127&i)<<3,i<128)return s(e,r,t);if(i=a[n.pos++],r|=(127&i)<<10,i<128)return s(e,r,t);if(i=a[n.pos++],r|=(127&i)<<17,i<128)return s(e,r,t);if(i=a[n.pos++],r|=(127&i)<<24,i<128)return s(e,r,t);if(i=a[n.pos++],r|=(1&i)<<31,i<128)return s(e,r,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(n=r[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2===1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&a?function(e,t,n){return a.decode(e.subarray(t,n))}(this.buf,t,e):function(e,t,n){var r="",i=t;for(;i<n;){var a,o,s,u=e[i],A=null,c=u>239?4:u>223?3:u>191?2:1;if(i+c>n)break;1===c?u<128&&(A=u):2===c?128===(192&(a=e[i+1]))&&(A=(31&u)<<6|63&a)<=127&&(A=null):3===c?(a=e[i+1],o=e[i+2],128===(192&a)&&128===(192&o)&&((A=(15&u)<<12|(63&a)<<6|63&o)<=2047||A>=55296&&A<=57343)&&(A=null)):4===c&&(a=e[i+1],o=e[i+2],s=e[i+3],128===(192&a)&&128===(192&o)&&128===(192&s)&&((A=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||A>=1114112)&&(A=null)),null===A?(A=65533,c=1):A>65535&&(A-=65536,r+=String.fromCharCode(A>>>10&1023|55296),A=56320|1023&A),r+=String.fromCharCode(A),i+=c}return r}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==i.Bytes)return e.push(this.readVarint(t));var n=o(this);for(e=e||[];this.pos<n;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){if(this.type!==i.Bytes)return e.push(this.readSVarint());var t=o(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){if(this.type!==i.Bytes)return e.push(this.readBoolean());var t=o(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){if(this.type!==i.Bytes)return e.push(this.readFloat());var t=o(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){if(this.type!==i.Bytes)return e.push(this.readDouble());var t=o(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){if(this.type!==i.Bytes)return e.push(this.readFixed32());var t=o(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){if(this.type!==i.Bytes)return e.push(this.readSFixed32());var t=o(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){if(this.type!==i.Bytes)return e.push(this.readFixed64());var t=o(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){if(this.type!==i.Bytes)return e.push(this.readSFixed64());var t=o(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=7&e;if(t===i.Varint)for(;this.buf[this.pos++]>127;);else if(t===i.Bytes)this.pos=this.readVarint()+this.pos;else if(t===i.Fixed32)this.pos+=4;else{if(t!==i.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var n=new Uint8Array(t);n.set(this.buf),this.buf=n,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),m(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),m(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),m(this.buf,-1&e,this.pos),m(this.buf,Math.floor(e*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),m(this.buf,-1&e,this.pos),m(this.buf,Math.floor(e*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?function(e,t){var n,r;e>=0?(n=e%4294967296|0,r=e/4294967296|0):(r=~(-e/4294967296),4294967295^(n=~(-e%4294967296))?n=n+1|0:(n=0,r=r+1|0));if(e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,n){n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos++]=127&e|128,e>>>=7,n.buf[n.pos]=127&e}(n,0,t),function(e,t){var n=(7&e)<<4;if(t.buf[t.pos++]|=n|((e>>>=3)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;t.buf[t.pos++]=127&e}(r,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,n){for(var r,i,a=0;a<t.length;a++){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){r>56319||a+1===t.length?(e[n++]=239,e[n++]=191,e[n++]=189):i=r;continue}if(r<56320){e[n++]=239,e[n++]=191,e[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(e[n++]=239,e[n++]=191,e[n++]=189,i=null);r<128?e[n++]=r:(r<2048?e[n++]=r>>6|192:(r<65536?e[n++]=r>>12|224:(e[n++]=r>>18|240,e[n++]=r>>12&63|128),e[n++]=r>>6&63|128),e[n++]=63&r|128)}return n}(this.buf,e,this.pos);var n=this.pos-t;n>=128&&u(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeFloat:function(e){this.realloc(4),r.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),r.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var n=0;n<t;n++)this.buf[this.pos++]=e[n]},writeRawMessage:function(e,t){this.pos++;var n=this.pos;e(t,this);var r=this.pos-n;r>=128&&u(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(e,t,n){this.writeTag(e,i.Bytes),this.writeRawMessage(t,n)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,A,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,c,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,h,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,l,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,f,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,g,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,d,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,p,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,v,t)},writeBytesField:function(e,t){this.writeTag(e,i.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,i.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,i.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,i.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,i.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,i.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,i.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,i.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,i.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,i.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}}},function(e,t,n){"use strict";function r(e,t){this.x=e,this.y=t}e.exports=r,r.prototype={clone:function(){return new r(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,n=e.y-this.y;return t*t+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,n=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=n,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),n=Math.sin(e),r=t*this.x-n*this.y,i=n*this.x+t*this.y;return this.x=r,this.y=i,this},_rotateAround:function(e,t){var n=Math.cos(e),r=Math.sin(e),i=t.x+n*(this.x-t.x)-r*(this.y-t.y),a=t.y+r*(this.x-t.x)+n*(this.y-t.y);return this.x=i,this.y=a,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},r.convert=function(e){return e instanceof r?e:Array.isArray(e)?new r(e[0],e[1]):e}},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(16),o=n(1),s=n(144),u=n(361),A=n(313);function c(e){return l(function e(t,n){return t.map((function(t){return t instanceof u.a||(Object(A.a)("string"!==typeof t,"Shader module use by name is deprecated. Import shader module '".concat(t,"' and use it directly.")),Object(A.a)(t.name,"shader module has no name"),(t=new u.a(t)).dependencies=e(t.dependencies)),t}))}(e))}function l(e){var t={},n={};return f({modules:e,level:0,moduleMap:t,moduleDepth:n}),Object.keys(n).sort((function(e,t){return n[t]-n[e]})).map((function(e){return t[e]}))}function f(e){var t=e.modules,n=e.level,r=e.moduleMap,i=e.moduleDepth;if(n>=5)throw new Error("Possible loop in shader dependency graph");var a=!0,o=!1,s=void 0;try{for(var u,A=t[Symbol.iterator]();!(a=(u=A.next()).done);a=!0){var c=u.value;r[c.name]=c,(void 0===i[c.name]||i[c.name]<n)&&(i[c.name]=n)}}catch(y){o=!0,s=y}finally{try{a||null==A.return||A.return()}finally{if(o)throw s}}var l=!0,h=!1,g=void 0;try{for(var d,p=t[Symbol.iterator]();!(l=(d=p.next()).done);l=!0){var v=d.value;v.dependencies&&f({modules:v.dependencies,level:n+1,moduleMap:r,moduleDepth:i})}}catch(y){h=!0,g=y}finally{try{l||null==p.return||p.return()}finally{if(h)throw g}}}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="undefined"!==typeof window&&window.navigator||{},n=e.userAgent||t.userAgent||"",r=-1!==n.indexOf("MSIE "),i=-1!==n.indexOf("Trident/");return r||i}var g={GLSL_FRAG_DATA:["WEBGL_draw_buffers",!0],GLSL_FRAG_DEPTH:["EXT_frag_depth",!0],GLSL_DERIVATIVES:["OES_standard_derivatives",!0],GLSL_TEXTURE_LOD:["EXT_shader_texture_lod",!0]},d={};Object.keys(g).forEach((function(e){d[e]=e}));var p={};function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=g[t];if(Object(A.a)(r,t),!h(n))return!0;if(t in p)return p[t];var i=r[0],a=n.behavior||"enable",o="#extension GL_".concat(i," : ").concat(a,"\nvoid main(void) {}"),s=e.createShader(35633);e.shaderSource(s,o),e.compileShader(s);var u=e.getShaderParameter(s,35713);return e.deleteShader(s),p[t]=u,u}function y(e,t){var n=g[t];Object(A.a)(n,t);var r=function(e){return Boolean(e&&2===e._version)}(e)&&n[1]||n[0],i="string"===typeof r?Boolean(e.getExtension(r)):r;return Object(A.a)(!1===i||!0===i),i}function m(e,t){return(t=Array.isArray(t)?t:[t]).every((function(t){return y(e,t)}))}var I=n(315);function b(e,t,n){switch(t){case 300:return n?function(e){return e.replace(/^(#version[ \t]+(100|300[ \t]+es))?[ \t]*\n/,"#version 300 es\n").replace(/^[ \t]*attribute[ \t]+(.+;)/gm,"in $1").replace(/^[ \t]*varying[ \t]+(.+;)/gm,"out $1").replace(/\btexture2D\(/g,"texture(").replace(/\btextureCube\(+/g,"texture(").replace(/\btexture2DLodEXT\(/g,"textureLod(").replace(/\btextureCubeLodEXT\(/g,"textureLod(")}(e):function(e){return e.replace(/^(#version[ \t]+(100|300[ \t]+es))?[ \t]*\n/,"#version 300 es\n").replace(/^[ \t]*varying[ \t]+(.+;)/gm,"in $1").replace(/\btexture2D\(/g,"texture(").replace(/\btextureCube\(/g,"texture(").replace(/\btexture2DLodEXT\(/g,"textureLod(").replace(/\btextureCubeLodEXT\(/g,"textureLod(")}(e);case 100:return n?function(e){return e.replace(/^#version[ \t]+300[ \t]+es/,"#version 100").replace(/^[ \t]*in[ \t]+(.+;)/gm,"attribute $1").replace(/^[ \t]*out[ \t]+(.+;)/gm,"varying $1").replace(/\btexture\(/g,"texture2D(").replace(/\btextureLod\(/g,"texture2DLodEXT(")}(e):function(e){var t=(e=e.replace(/^#version[ \t]+300[ \t]+es/,"#version 100").replace(/^[ \t]*in[ \t]+/gm,"varying ").replace(/\btexture\(/g,"texture2D(").replace(/\btextureLod\(/g,"texture2DLodEXT(")).match(C);if(t){var n=t[1];e=e.replace(C,"").replace(new RegExp("\\b".concat(n,"\\b"),"g"),"gl_FragColor")}return e}(e);default:throw new Error("unknown GLSL version ".concat(t))}}var E,C=/^[ \t]*out[ \t]+vec4[ \t]+(\w+)[ \t]*;\s+/m;var B="\n\n".concat(I.a,"\n\n"),w=(E={},Object(o.a)(E,s.b,"vertex"),Object(o.a)(E,s.a,"fragment"),E);function Q(e,t){var n=t.vs,r=t.fs,i=c(t.modules||[]);return{gl:e,vs:k(e,Object.assign({},t,{source:n,type:s.b,modules:i})),fs:k(e,Object.assign({},t,{source:r,type:s.a,modules:i})),getUniforms:_(i)}}function k(e,t){var n=t.id,r=t.source,i=t.type,o=t.modules,u=t.defines,c=void 0===u?{}:u,l=t.hookFunctions,f=void 0===l?[]:l,h=t.inject,g=void 0===h?{}:h,p=t.transpileToGLSL100,y=void 0!==p&&p,E=t.prologue,C=void 0===E||E,Q=t.log;Object(A.a)("string"===typeof r,"shader source must be a string");var k=i===s.b,_=r.split("\n"),x=100,S="",O=r;0===_[0].indexOf("#version ")?(x=300,S=_[0],O=_.slice(1).join("\n")):S="#version ".concat(x);var D={};o.forEach((function(e){Object.assign(D,e.getDefines())})),Object.assign(D,c);var R=C?"".concat(S,"\n").concat(function(e){var t=e.id,n=e.source,r=e.type;return t&&"string"===typeof t&&-1===n.indexOf("SHADER_NAME")?"\n#define SHADER_NAME ".concat(t,"_").concat(w[r],"\n\n"):""}({id:n,source:r,type:i}),"\n").concat(function(e){var t=e.type;return"\n#define SHADER_TYPE_".concat(w[t].toUpperCase(),"\n")}({type:i}),"\n").concat(function(e){switch(function(e){var t=e.getExtension("WEBGL_debug_renderer_info"),n=e.getParameter(t&&t.UNMASKED_VENDOR_WEBGL||7936),r=e.getParameter(t&&t.UNMASKED_RENDERER_WEBGL||7937);return{gpuVendor:function(e,t){if(e.match(/NVIDIA/i)||t.match(/NVIDIA/i))return"NVIDIA";if(e.match(/INTEL/i)||t.match(/INTEL/i))return"INTEL";if(e.match(/AMD/i)||t.match(/AMD/i)||e.match(/ATI/i)||t.match(/ATI/i))return"AMD";return"UNKNOWN GPU"}(n,r),vendor:n,renderer:r,version:e.getParameter(7938),shadingLanguageVersion:e.getParameter(35724)}}(e).gpuVendor.toLowerCase()){case"nvidia":return"#define NVIDIA_GPU\n// Nvidia optimizes away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n";case"intel":return"#define INTEL_GPU\n// Intel optimizes away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n// Intel's built-in 'tan' function doesn't have acceptable precision\n#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1\n// Intel GPU doesn't have full 32 bits precision in same cases, causes overflow\n#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1\n";case"amd":return"#define AMD_GPU\n";default:return"#define DEFAULT_GPU\n// Prevent driver from optimizing away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n// Intel's built-in 'tan' function doesn't have acceptable precision\n#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1\n// Intel GPU doesn't have full 32 bits precision in same cases, causes overflow\n#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1\n"}}(e),"\n").concat(function(e,t,n){var r="#if (__VERSION__ > 120)\n\n# define FRAG_DEPTH\n# define DERIVATIVES\n# define DRAW_BUFFERS\n# define TEXTURE_LOD\n\n#endif // __VERSION\n";return m(e,d.GLSL_FRAG_DEPTH)&&(r+="// FRAG_DEPTH => gl_FragDepth is available\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n# define FRAG_DEPTH\n# define gl_FragDepth gl_FragDepthEXT\n#endif\n"),m(e,d.GLSL_DERIVATIVES)&&v(e,d.GLSL_DERIVATIVES)&&(r+="// DERIVATIVES => dxdF, dxdY and fwidth are available\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n# define DERIVATIVES\n#endif\n"),m(e,d.GLSL_FRAG_DATA)&&v(e,d.GLSL_FRAG_DATA,{behavior:"require"})&&(r+="// DRAW_BUFFERS => gl_FragData[] is available\n#ifdef GL_EXT_draw_buffers\n#extension GL_EXT_draw_buffers : require\n#define DRAW_BUFFERS\n#endif\n"),m(e,d.GLSL_TEXTURE_LOD)&&(r+="// TEXTURE_LOD => texture2DLod etc are available\n#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod : enable\n# define TEXTURE_LOD\n#define texture2DLod texture2DLodEXT\n#define texture2DProjLod texture2DProjLodEXT\n#define texture2DProjLod texture2DProjLodEXT\n#define textureCubeLod textureCubeLodEXT\n#define texture2DGrad texture2DGradEXT\n#define texture2DProjGrad texture2DProjGradEXT\n#define texture2DProjGrad texture2DProjGradEXT\n#define textureCubeGrad textureCubeGradEXT\n#endif\n"),r}(e),"\n").concat(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=0,n="";for(var r in e){0===t&&(n+="\n// APPLICATION DEFINES\n"),t++;var i=e[r];(i||Number.isFinite(i))&&(n+="#define ".concat(r.toUpperCase()," ").concat(e[r],"\n"))}0===t&&(n+="\n");return n}(D),"\n").concat(k?"":"precision highp float;\n\n","\n"):"".concat(S,"\n");f=function(e){var t={vs:{},fs:{}};return e.forEach((function(e){var n;"string"!==typeof e?e=(n=e).hook:n={};var r=(e=e.trim()).split(":"),i=Object(a.a)(r,2),o=i[0],s=i[1],u=e.replace(/\(.+/,"");t[o][u]=Object.assign(n,{signature:s})})),t}(f);var j={},M={},N={};for(var F in g){var T="string"===typeof g[F]?{injection:g[F],order:0}:g[F],L=F.match(/^(v|f)s:(#)?([\w-]+)$/);if(L){var P=L[2],U=L[3];P?"decl"===U?M[F]=[T]:N[F]=[T]:j[F]=[T]}else N[F]=[T]}var G=!0,q=!1,H=void 0;try{for(var Y,J=o[Symbol.iterator]();!(G=(Y=J.next()).done);G=!0){var z=Y.value;Q&&z.checkDeprecations(O,Q),R+=z.getModuleSource(i,x);var K=z.injections[i];for(var W in K){var V=W.match(/^(v|f)s:#([\w-]+)$/);if(V){var X="decl"===V[2]?M:N;X[W]=X[W]||[],X[W].push(K[W])}else j[W]=j[W]||[],j[W].push(K[W])}}}catch(Z){q=!0,H=Z}finally{try{G||null==J.return||J.return()}finally{if(q)throw H}}return R+=B,R=Object(I.c)(R,i,M),R+=function(e,t){var n="";for(var r in e){var i=e[r];if(n+="void ".concat(i.signature," {\n"),i.header&&(n+="  ".concat(i.header)),t[r]){var a=t[r];a.sort((function(e,t){return e.order-t.order}));var o=!0,s=!1,u=void 0;try{for(var A,c=a[Symbol.iterator]();!(o=(A=c.next()).done);o=!0){var l=A.value;n+="  ".concat(l.injection,"\n")}}catch(Z){s=!0,u=Z}finally{try{o||null==c.return||c.return()}finally{if(s)throw u}}}i.footer&&(n+="  ".concat(i.footer)),n+="}\n"}return n}(f[i],j),R+=O,R=b(R=Object(I.c)(R,i,N),y?100:x,k)}function _(e){return function(t){var n={},r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var u=o.value.getUniforms(t,n);Object.assign(n,u)}}catch(A){i=!0,a=A}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}var x=n(927);n.d(t,"a",(function(){return S}));var S=function(){function e(t){Object(r.a)(this,e),this.gl=t,this._programCache={},this._getUniforms={},this._registeredModules={},this._hookFunctions=[],this._defaultModules=[],this._hashes={},this._hashCounter=0,this.stateHash=0,this._useCounts={}}return Object(i.a)(e,null,[{key:"getDefaultProgramManager",value:function(t){return t.luma=t.luma||{},t.luma.defaultProgramManager=t.luma.defaultProgramManager||new e(t),t.luma.defaultProgramManager}}]),Object(i.a)(e,[{key:"addDefaultModule",value:function(e){this._defaultModules.find((function(t){return t.name===e.name}))||this._defaultModules.push(e),this.stateHash++}},{key:"removeDefaultModule",value:function(e){var t="string"===typeof e?e:e.name;this._defaultModules=this._defaultModules.filter((function(e){return e.name!==t})),this.stateHash++}},{key:"addShaderHook",value:function(e,t){t&&(e=Object.assign(t,{hook:e})),this._hookFunctions.push(e),this.stateHash++}},{key:"get",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.vs,r=void 0===n?"":n,i=t.fs,a=void 0===i?"":i,o=t.defines,s=void 0===o?{}:o,u=t.inject,A=void 0===u?{}:u,c=t.varyings,l=void 0===c?[]:c,f=t.bufferMode,h=void 0===f?35981:f,g=t.transpileToGLSL100,d=void 0!==g&&g,p=this._getModuleList(t.modules),v=this._getHash(r),y=this._getHash(a),m=p.map((function(t){return e._getHash(t.name)})).sort(),I=l.map((function(t){return e._getHash(t)})),b=Object.keys(s).sort(),E=Object.keys(A).sort(),C=[],B=[],w=!0,k=!1,_=void 0;try{for(var S,O=b[Symbol.iterator]();!(w=(S=O.next()).done);w=!0){var D=S.value;C.push(this._getHash(D)),C.push(this._getHash(s[D]))}}catch(U){k=!0,_=U}finally{try{w||null==O.return||O.return()}finally{if(k)throw _}}var R=!0,j=!1,M=void 0;try{for(var N,F=E[Symbol.iterator]();!(R=(N=F.next()).done);R=!0){var T=N.value;B.push(this._getHash(T)),B.push(this._getHash(A[T]))}}catch(U){j=!0,M=U}finally{try{R||null==F.return||F.return()}finally{if(j)throw M}}var L="".concat(v,"/").concat(y,"D").concat(C.join("/"),"M").concat(m.join("/"),"I").concat(B.join("/"),"V").concat(I.join("/"),"H").concat(this.stateHash,"B").concat(h).concat(d?"T":"");if(!this._programCache[L]){var P=Q(this.gl,{vs:r,fs:a,modules:p,inject:A,defines:s,hookFunctions:this._hookFunctions,transpileToGLSL100:d});this._programCache[L]=new x.a(this.gl,{hash:L,vs:P.vs,fs:P.fs,varyings:l,bufferMode:h}),this._getUniforms[L]=P.getUniforms||function(e){},this._useCounts[L]=0}return this._useCounts[L]++,this._programCache[L]}},{key:"getUniforms",value:function(e){return this._getUniforms[e.hash]||null}},{key:"release",value:function(e){var t=e.hash;this._useCounts[t]--,0===this._useCounts[t]&&(this._programCache[t].delete(),delete this._programCache[t],delete this._getUniforms[t],delete this._useCounts[t])}},{key:"_getHash",value:function(e){return void 0===this._hashes[e]&&(this._hashes[e]=this._hashCounter++),this._hashes[e]}},{key:"_getModuleList",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=new Array(this._defaultModules.length+e.length),n={},r=0,i=0,a=this._defaultModules.length;i<a;++i){var o=this._defaultModules[i],s=o.name;t[r++]=o,n[s]=!0}for(var u=0,A=e.length;u<A;++u){var c=e[u],l=c.name;n[l]||(t[r++]=c,n[l]=!0)}return t.length=r,t}}]),e}()},function(e,t){e.exports=function(e){return null==e}},,,function(e,t,n){var r=n(239),i=n(197);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(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)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(280),i=n(679),a=n(680),o=n(681),s=n(682),u=n(683);function A(e){var t=this.__data__=new r(e);this.size=t.size}A.prototype.clear=i,A.prototype.delete=a,A.prototype.get=o,A.prototype.has=s,A.prototype.set=u,e.exports=A},function(e,t,n){var r=n(708),i=n(197),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&o.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){var r=n(713),i=n(348),a=n(714),o=n(524),s=n(715),u=n(239),A=n(441),c=A(r),l=A(i),f=A(a),h=A(o),g=A(s),d=u;(r&&"[object DataView]"!=d(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=d(new i)||a&&"[object Promise]"!=d(a.resolve())||o&&"[object Set]"!=d(new o)||s&&"[object WeakMap]"!=d(new s))&&(d=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?A(n):"";if(r)switch(r){case c:return"[object DataView]";case l:return"[object Map]";case f:return"[object Promise]";case h:return"[object Set]";case g:return"[object WeakMap]"}return t}),e.exports=d},function(e,t,n){"use strict";function r(e){var t={type:"Feature"};return Object.keys(e).forEach((function(n){switch(n){case"type":case"properties":case"geometry":return;default:t[n]=e[n]}})),t.properties=function e(t){var n={};if(!t)return n;return Object.keys(t).forEach((function(r){var i=t[r];"object"===typeof i?null===i?n[r]=null:Array.isArray(i)?n[r]=i.map((function(e){return e})):n[r]=e(i):n[r]=i})),n}(e.properties),t.geometry=i(e.geometry),t}function i(e){var t={type:e.type};return e.bbox&&(t.bbox=e.bbox),"GeometryCollection"===e.type?(t.geometries=e.geometries.map((function(e){return i(e)})),t):(t.coordinates=function e(t){var n=t;if("object"!==typeof n[0])return n.slice();return n.map((function(t){return e(t)}))}(e.coordinates),t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)throw new Error("geojson is required");switch(e.type){case"Feature":return r(e);case"FeatureCollection":return function(e){var t={type:"FeatureCollection"};return Object.keys(e).forEach((function(n){switch(n){case"type":case"features":return;default:t[n]=e[n]}})),t.features=e.features.map((function(e){return r(e)})),t}(e);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return i(e);default:throw new Error("unknown GeoJSON type")}}},function(e,t,n){"use strict";n.r(t);var r=n(739);n.d(t,"SimpleMeshLayer",(function(){return r.a}));var i=n(738);n.d(t,"ScenegraphLayer",(function(){return i.a}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(107);function i(e){return Object(r.a)(e).defaultView||window}},function(e,t,n){"use strict";e.exports=function(e,t){t||(t={}),"function"===typeof t&&(t={cmp:t});var n,r="boolean"===typeof t.cycles&&t.cycles,i=t.cmp&&(n=t.cmp,function(e){return function(t,r){var i={key:t,value:e[t]},a={key:r,value:e[r]};return n(i,a)}}),a=[];return function e(t){if(t&&t.toJSON&&"function"===typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!==typeof t)return JSON.stringify(t);var n,o;if(Array.isArray(t)){for(o="[",n=0;n<t.length;n++)n&&(o+=","),o+=e(t[n])||"null";return o+"]"}if(null===t)return"null";if(-1!==a.indexOf(t)){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=a.push(t)-1,u=Object.keys(t).sort(i&&i(t));for(o="",n=0;n<u.length;n++){var A=u[n],c=e(t[A]);c&&(o&&(o+=","),o+=JSON.stringify(A)+":"+c)}return a.splice(s,1),"{"+o+"}"}}(e)}},function(e,t,n){(function(t){for(var r=n(1178),i="undefined"===typeof window?t:window,a=["moz","webkit"],o="AnimationFrame",s=i["request"+o],u=i["cancel"+o]||i["cancelRequest"+o],A=0;!s&&A<a.length;A++)s=i[a[A]+"Request"+o],u=i[a[A]+"Cancel"+o]||i[a[A]+"CancelRequest"+o];if(!s||!u){var c=0,l=0,f=[];s=function(e){if(0===f.length){var t=r(),n=Math.max(0,1e3/60-(t-c));c=n+t,setTimeout((function(){var e=f.slice(0);f.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(c)}catch(n){setTimeout((function(){throw n}),0)}}),Math.round(n))}return f.push({handle:++l,callback:e,cancelled:!1}),l},u=function(e){for(var t=0;t<f.length;t++)f[t].handle===e&&(f[t].cancelled=!0)}}e.exports=function(e){return s.call(i,e)},e.exports.cancel=function(){u.apply(i,arguments)},e.exports.polyfill=function(e){e||(e=i),e.requestAnimationFrame=s,e.cancelAnimationFrame=u}}).call(this,n(70))},function(e,t,n){"use strict";n.r(t);var r=n(327);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n.n(r),a=n(513);function o(e){var t=e.parentUuid,n=e.sourceUuid,r=e.x,o=e.y,s=e.parentWidth,u=e.parentHeight,A=e.children;if(r<0||r>s||o<0||o>u)return null;var c=t===n;return i.a.createElement(i.a.Fragment,null,c?i.a.createElement(a.a,{x:r,y:o,parentWidth:s,parentHeight:u},A):i.a.createElement(i.a.Fragment,null,null!==r?i.a.createElement("div",{className:"cell-emphasis-crosshair",style:{left:"".concat(r-.5,"px"),top:0,width:"".concat(1,"px"),height:"".concat(u,"px")}}):null,null!==o?i.a.createElement("div",{className:"cell-emphasis-crosshair",style:{left:0,top:"".concat(o-.5,"px"),width:"".concat(s,"px"),height:"".concat(1,"px")}}):null))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(24),i=n(0),a=n.n(i);function o(e){var t=e.info;return a.a.createElement("table",null,a.a.createElement("tbody",null,Object.entries(t).map((function(e){var t=Object(r.a)(e,2),n=t[0],i=t[1];return a.a.createElement("tr",{key:n},a.a.createElement("th",null,n),a.a.createElement("td",null,i))}))))}},function(e,t,n){var r=n(342);e.exports=function(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=r(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 i,a,o=!0,s=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==i.return||i.return()}finally{if(s)throw a}}}}},function(e,t,n){var r=n(673),i=n(197);e.exports=function e(t,n,a,o,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!==t&&n!==n:r(t,n,a,o,e,s))}},function(e,t,n){var r=n(390),i=n(700),a=n(701);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}o.prototype.add=o.prototype.push=i,o.prototype.has=a,e.exports=o},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},function(e,t,n){var r=n(706),i=n(521),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(e){return null==e?[]:(e=Object(e),r(o(e),(function(t){return a.call(e,t)})))}:i;e.exports=s},function(e,t,n){(function(e){var r=n(399),i=t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i&&r.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(t){}}();e.exports=s}).call(this,n(264)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72);t.default=function(e,t){void 0===t&&(t={});var n=Number(e[0]),i=Number(e[1]),a=Number(e[2]),o=Number(e[3]);if(6===e.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var s=[n,i],u=[n,o],A=[a,o],c=[a,i];return r.polygon([[s,c,A,u,s]],t.properties,{bbox:e,id:t.id})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(365)),i=a(n(1052));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(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 u(e,t){return!t||"object"!==o(t)&&"function"!==typeof t?A(e):t}function A(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(g,e);var t,n,r,a,o=(t=g,function(){var e,n=l(t);if(c()){var r=l(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return u(this,e)});function g(e){var t,n=e.getData,r=e.on,a=e.toNebulaFeature;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),h(A(t=o.call(this)),"getData",void 0),h(A(t),"toNebulaFeature",void 0),h(A(t),"id",void 0),h(A(t),"helperLayers",void 0),h(A(t),"usesMapEvents",!1),h(A(t),"enablePicking",!1),h(A(t),"enableSelection",!1),t.id=i.default.v4(),t.getData=n,t.toNebulaFeature=a,t.helperLayers=[],r&&Object.keys(r).forEach((function(e){return t.on(e,r[e])})),t}return n=g,(r=[{key:"render",value:function(e){return null}}])&&s(n.prototype,r),a&&s(n,a),g}(r.default.EventEmitter);t.default=g},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(e,t,n){e.exports=!n(761)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(832),i=n(1183),a=n(1200),o=n(203);e.exports=function(e,t){return(o(e)?r:a)(e,i(t,3))}},function(e,t,n){var r=n(615),i=n(616),a=n(617);e.exports=function(e,t){return r(e)||i(e,t)||a()}},function(e,t,n){var r=n(618),i=n(619),a=n(620);e.exports=function(e){return r(e)||i(e)||a()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(114);function i(e,t,n){var r=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,a=t.length-1;i<t.length;a=i++){var o=t[i][0],s=t[i][1],u=t[a][0],A=t[a][1];if(e[1]*(o-u)+s*(u-e[0])+A*(e[0]-o)===0&&(o-e[0])*(u-e[0])<=0&&(s-e[1])*(A-e[1])<=0)return!n;s>e[1]!==A>e[1]&&e[0]<(u-o)*(e[1]-s)/(A-s)+o&&(r=!r)}return r}t.default=function(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");var a=r.getCoord(e),o=r.getGeom(t),s=o.type,u=t.bbox,A=o.coordinates;if(u&&!1===function(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}(a,u))return!1;"Polygon"===s&&(A=[A]);for(var c=!1,l=0;l<A.length&&!c;l++)if(i(a,A[l][0],n.ignoreBoundary)){for(var f=!1,h=1;h<A[l].length&&!f;)i(a,A[l][h],!n.ignoreBoundary)&&(f=!0),h++;f||(c=!0)}return c}},,function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"decode",(function(){return pu})),n.d(r,"encode",(function(){return yu}));var i={};n.r(i),n.d(i,"decode",(function(){return Qu})),n.d(i,"encode",(function(){return ku}));var a={};n.r(a),n.d(a,"decode",(function(){return Su})),n.d(a,"encode",(function(){return Ou}));var o={};n.r(o),n.d(o,"decode",(function(){return ju})),n.d(o,"encode",(function(){return Mu}));var s=n(3),u=n(6),A=n(7),c=n(4);function l(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var f=function(e){Object(u.a)(n,e);var t=l(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return n}(n(448).a);f.layerName="GreatCircleLayer",f.defaultProps={getHeight:{type:"accessor",value:0},greatCircle:!0};var h=n(2),g=n(322),d=n(393),p=n(16),v=n(229),y=n.n(v),m=180/Math.PI;function I(e,t,n){var r=1<<t;return[(e[0]+n[0])/r,(e[1]+n[1])/r]}function b(e){return e>=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function E(e){return[b(e[0]),b(e[1])]}function C(e,t){var n=Object(p.a)(t,2),r=n[0],i=n[1];switch(e){case 0:return[1,r,i];case 1:return[-r,1,i];case 2:return[-r,-i,1];case 3:return[-1,-i,-r];case 4:return[i,-1,-r];case 5:return[i,r,-1];default:throw new Error("Invalid face")}}function B(e){var t=Object(p.a)(e,3),n=t[0],r=t[1],i=t[2],a=Math.atan2(i,Math.sqrt(n*n+r*r));return[Math.atan2(r,n)*m,a*m]}function w(e,t,n,r){if(0===r){1===n&&(t[0]=e-1-t[0],t[1]=e-1-t[1]);var i=t[0];t[0]=t[1],t[1]=i}}function Q(e){if("string"===typeof e){if(e.indexOf("/")>0)return e;e=function(e){var t=e.padEnd(16,"0");return y.a.fromString(t,16)}(e)}return function(e){for(var t=y.a.fromString(e,!0,10).toString(2);t.length<64;)t="0"+t;for(var n=t.lastIndexOf("1"),r=t.substring(0,3),i=t.substring(3,n),a=i.length/2,o=y.a.fromString(r,!0,2).toString(10),s=y.a.fromString(i,!0,2).toString(4);s.length<a;)s="0"+s;return"".concat(o,"/").concat(s)}(e.toString())}function k(e){return function(e){for(var t=e.face,n=e.ij,r=e.level,i=[[0,0],[0,1],[1,1],[1,0],[0,0]],a=Math.max(1,Math.ceil(100*Math.pow(2,-r))),o=new Float64Array(4*a*2+2),s=0,u=0;u<4;u++)for(var A=i[u].slice(0),c=i[u+1],l=(c[0]-A[0])/a,f=(c[1]-A[1])/a,h=0;h<a;h++){A[0]+=l,A[1]+=f;var g=B(C(t,E(I(n,r,A))));o[s++]=g[0],o[s++]=g[1]}return o[s++]=o[0],o[s++]=o[1],o}(function(e){for(var t,n=e.split("/"),r=parseInt(n[0],10),i=n[1],a=i.length,o=[0,0],s=a-1;s>=0;s--){t=a-s;var u=i[s],A=0,c=0;"1"===u?c=1:"2"===u?(A=1,c=1):"3"===u&&(A=1);var l=Math.pow(2,t-1);w(l,o,A,c),o[0]+=l*A,o[1]+=l*c}if(r%2===1){var f=o[0];o[0]=o[1],o[1]=f}return{face:r,ij:o,level:t}}(Q(e)))}function _(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var x=Object.assign({getS2Token:{type:"accessor",value:function(e){return e.token}}},d.a.defaultProps),S=function(e){Object(u.a)(n,e);var t=_(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"renderLayers",value:function(){var e=this.props,t=e.data,n=e.getS2Token,r=this.props,i=r.elevationScale,a=r.extruded,o=r.wireframe,s=r.filled,u=r.stroked,A=r.lineWidthUnits,c=r.lineWidthScale,l=r.lineWidthMinPixels,f=r.lineWidthMaxPixels,h=r.lineJointRounded,g=r.lineMiterLimit,p=r.lineDashJustified,v=r.getElevation,y=r.getFillColor,m=r.getLineColor,I=r.getLineWidth,b=r.getLineDashArray,E=this.props,C=E.updateTriggers,B=E.material;return new(this.getSubLayerClass("cell",d.a))({filled:s,wireframe:o,extruded:a,elevationScale:i,stroked:u,lineWidthUnits:A,lineWidthScale:c,lineWidthMinPixels:l,lineWidthMaxPixels:f,lineJointRounded:h,lineMiterLimit:g,lineDashJustified:p,material:B,getElevation:v,getFillColor:y,getLineColor:m,getLineWidth:I,getLineDashArray:b},this.getSubLayerProps({id:"cell",updateTriggers:{getElevation:C.getElevation,getFillColor:C.getFillColor,getLineColor:C.getLineColor,getLineWidth:C.getLineWidth,getLineDashArray:C.getLineDashArray}}),{data:t,_normalize:!1,positionFormat:"XY",getPolygon:function(e,t){return k(n(e,t))}})}}]),n}(g.a);S.layerName="S2Layer",S.defaultProps=x;var O=n(1),D=n(126),R=n(450),j=n(925),M=n(12),N=n.n(M),F=n(26),T=n(44),L=function(){function e(t){var n=t.x,r=t.y,i=t.z,a=t.onTileLoad,o=t.onTileError;Object(s.a)(this,e),this.x=n,this.y=r,this.z=i,this.isVisible=!1,this.isSelected=!1,this.parent=null,this.children=[],this.content=null,this._isLoaded=!1,this._isCancelled=!1,this.onTileLoad=a,this.onTileError=o}return Object(h.a)(e,[{key:"_loadData",value:function(){var e=Object(F.a)(N.a.mark((function e(t,n){var r,i,a,o,s,u,A,c;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.x,i=this.y,a=this.z,o=this.bbox,this._abortController=new AbortController,s=this._abortController.signal,e.next=5,n.scheduleRequest(this,(function(e){return e.isSelected?1:-1}));case 5:if(u=e.sent){e.next=9;break}return this._isCancelled=!0,e.abrupt("return");case 9:if(!this._isCancelled){e.next=12;break}return u.done(),e.abrupt("return");case 12:return e.prev=12,e.next=15,t({x:r,y:i,z:a,bbox:o,signal:s});case 15:A=e.sent,e.next=21;break;case 18:e.prev=18,e.t0=e.catch(12),c=e.t0||!0;case 21:return e.prev=21,u.done(),this._isCancelled&&!A?this._isLoaded=!1:(this._isLoaded=!0,this._isCancelled=!1),e.finish(21);case 25:if(this._isLoaded){e.next=27;break}return e.abrupt("return");case 27:c?this.onTileError(c,this):(this.content=A,this.onTileLoad(this));case 28:case"end":return e.stop()}}),e,this,[[12,18,21,25]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"loadData",value:function(e,t){var n=this;e&&(this._isCancelled=!1,this._loader=this._loadData(e,t),this._loader.finally((function(){n._loader=void 0})))}},{key:"abort",value:function(){this.isLoaded||(this._isCancelled=!0,this._abortController.abort())}},{key:"data",get:function(){return this._isLoaded?this.content:this._loader}},{key:"isLoaded",get:function(){return this._isLoaded}},{key:"isLoading",get:function(){return Boolean(this._loader)}},{key:"isCancelled",get:function(){return this._isCancelled}},{key:"byteLength",get:function(){var e=this.content?this.content.byteLength:0;return Number.isFinite(e)||T.a.error("byteLength not defined in tile data")(),e}}]),e}(),P=Object.freeze({OUTSIDE:-1,INTERSECTING:0,INSIDE:1}),U=n(81),G=n(25),q=(n(65),n(23));function H(e,t){if(!e)throw new Error("math.gl assertion ".concat(t))}Math.PI,Math.PI;var Y={};function J(e){return Math.round(e/Y.EPSILON)*Y.EPSILON}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.precision,r=void 0===n?Y.precision||4:n;return e=J(e),"".concat(parseFloat(e.toPrecision(r)))}function K(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function W(e,t,n){var r=Y.EPSILON;n&&(Y.EPSILON=n);try{if(e===t)return!0;if(K(e)&&K(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;++i)if(!W(e[i],t[i]))return!1;return!0}return e&&e.equals?e.equals(t):t&&t.equals?t.equals(e):!(!Number.isFinite(e)||!Number.isFinite(t))&&Math.abs(e-t)<=Y.EPSILON*Math.max(1,Math.abs(e),Math.abs(t))}finally{Y.EPSILON=r}}function V(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}Y.EPSILON=1e-12,Y.debug=!1,Y.precision=4,Y.printTypes=!1,Y.printDegrees=!1,Y.printRowMajor=!0;var X=function(e){Object(u.a)(n,e);var t=V(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}},{key:"fromArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)this[n]=e[n+t];return this.check()}},{key:"to",value:function(e){return e===this?this:K(e)?this.toArray(e):this.toObject(e)}},{key:"toTarget",value:function(e){return e?this.to(e):this}},{key:"toArray",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)e[t+n]=this[n];return e}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(Y)}},{key:"formatString",value:function(e){for(var t="",n=0;n<this.ELEMENTS;++n)t+=(n>0?", ":"")+z(this[n],e);return"".concat(e.printTypes?this.constructor.name:"","[").concat(t,"]")}},{key:"equals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(!W(this[t],e[t]))return!1;return!0}},{key:"exactEquals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(this[t]!==e[t])return!1;return!0}},{key:"negate",value:function(){for(var e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}},{key:"lerp",value:function(e,t,n){void 0===n&&(n=t,t=e,e=this);for(var r=0;r<this.ELEMENTS;++r){var i=e[r];this[r]=i+n*(t[r]-i)}return this.check()}},{key:"min",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}},{key:"max",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}},{key:"clamp",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e[n]),t[n]);return this.check()}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]+=a[o];return this.check()}},{key:"subtract",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]-=a[o];return this.check()}},{key:"scale",value:function(e){if(Array.isArray(e))return this.multiply(e);for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"sub",value:function(e){return this.subtract(e)}},{key:"setScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}},{key:"addScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}},{key:"subScalar",value:function(e){return this.addScalar(-e)}},{key:"multiplyScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"divideScalar",value:function(e){return this.scale(1/e)}},{key:"clampScalar",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e),t);return this.check()}},{key:"multiplyByScalar",value:function(e){return this.scale(e)}},{key:"check",value:function(){if(Y.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}},{key:"validate",value:function(){for(var e=this.length===this.ELEMENTS,t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}},{key:"ELEMENTS",get:function(){return H(!1),0}},{key:"RANK",get:function(){return H(!1),0}},{key:"elements",get:function(){return this}}]),n}(Object(U.a)(Array));function Z(e,t){if(e.length!==t)return!1;for(var n=0;n<e.length;++n)if(!Number.isFinite(e[n]))return!1;return!0}function $(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}function ee(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(Y.debug&&!Z(e,t))throw new Error("math.gl: ".concat(n," some fields set to invalid numbers'"));return e}var te={};function ne(e,t){te[e]||(te[e]=!0,console.warn("".concat(e," has been removed in version ").concat(t,", see upgrade guide for more information")))}function re(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var ie=function(e){Object(u.a)(n,e);var t=re(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"copy",value:function(e){return H(!1),this}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var e=0,t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(e){return Math.sqrt(this.distanceSquared(e))}},{key:"distanceSquared",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n){var r=this[n]-e[n];t+=r*r}return $(t)}},{key:"dot",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n)t+=this[n]*e[n];return $(t)}},{key:"normalize",value:function(){var e=this.magnitude();if(0!==e)for(var t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}},{key:"multiply",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]*=a[o];return this.check()}},{key:"divide",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]/=a[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(e){return this.distance(e)}},{key:"distanceToSquared",value:function(e){return this.distanceSquared(e)}},{key:"getComponent",value:function(e){return H(e>=0&&e<this.ELEMENTS,"index is out of range"),$(this[e])}},{key:"setComponent",value:function(e,t){return H(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=t,this.check()}},{key:"addVectors",value:function(e,t){return this.copy(e).add(t)}},{key:"subVectors",value:function(e,t){return this.copy(e).subtract(t)}},{key:"multiplyVectors",value:function(e,t){return this.copy(e).multiply(t)}},{key:"addScaledVector",value:function(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}},{key:"x",get:function(){return this[0]},set:function(e){this[0]=$(e)}},{key:"y",get:function(){return this[1]},set:function(e){this[1]=$(e)}}]),n}(X),ae=n(17);function oe(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[3]*r+n[7]*i+n[11]*a||1;return e[0]=(n[0]*r+n[4]*i+n[8]*a)/o,e[1]=(n[1]*r+n[5]*i+n[9]*a)/o,e[2]=(n[2]*r+n[6]*i+n[10]*a)/o,e}function se(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var ue=[0,0,0],Ae={},ce=function(e){Object(u.a)(n,e);var t=se(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object(s.a)(this,n),e=t.call(this,-0,-0,-0),1===arguments.length&&K(r)?e.copy(r):(Y.debug&&($(r),$(i),$(a)),e[0]=r,e[1]=i,e[2]=a),e}return Object(h.a)(n,null,[{key:"ZERO",get:function(){return Ae.ZERO=Ae.ZERO||Object.freeze(new n(0,0,0,0))}}]),Object(h.a)(n,[{key:"set",value:function(e,t,n){return this[0]=e,this[1]=t,this[2]=n,this.check()}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}},{key:"fromObject",value:function(e){return Y.debug&&($(e.x),$(e.y),$(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}},{key:"toObject",value:function(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}},{key:"angle",value:function(e){return ae.a(this,e)}},{key:"cross",value:function(e){return ae.c(this,this,e),this.check()}},{key:"rotateX",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?ue:n;return ae.k(this,this,r,t),this.check()}},{key:"rotateY",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?ue:n;return ae.l(this,this,r,t),this.check()}},{key:"rotateZ",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?ue:n;return ae.m(this,this,r,t),this.check()}},{key:"transform",value:function(e){return this.transformAsPoint(e)}},{key:"transformAsPoint",value:function(e){return ae.q(this,this,e),this.check()}},{key:"transformAsVector",value:function(e){return oe(this,this,e),this.check()}},{key:"transformByMatrix3",value:function(e){return ae.p(this,this,e),this.check()}},{key:"transformByMatrix2",value:function(e){return function(e,t,n){var r=t[0],i=t[1];e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2]}(this,this,e),this.check()}},{key:"transformByQuaternion",value:function(e){return ae.r(this,this,e),this.check()}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(e){this[2]=$(e)}}]),n}(ie),le=new ce,fe=new ce,he=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Object(s.a)(this,e),r=r||le.copy(t).add(n).scale(.5),this.center=new ce(r),this.halfDiagonal=new ce(n).subtract(this.center),this.minimum=new ce(t),this.maximum=new ce(n)}return Object(h.a)(e,[{key:"clone",value:function(){return new e(this.minimum,this.maximum,this.center)}},{key:"equals",value:function(e){return this===e||Boolean(e)&&this.minimum.equals(e.minimum)&&this.maximum.equals(e.maximum)}},{key:"intersectPlane",value:function(e){var t=this.halfDiagonal,n=fe.from(e.normal),r=t.x*Math.abs(n.x)+t.y*Math.abs(n.y)+t.z*Math.abs(n.z),i=this.center.dot(n)+e.distance;return i-r>0?P.INSIDE:i+r<0?P.OUTSIDE:P.INTERSECTING}},{key:"distanceTo",value:function(e){return Math.sqrt(this.distanceSquaredTo(e))}},{key:"distanceSquaredTo",value:function(e){var t,n=le.from(e).subtract(this.center),r=this.halfDiagonal,i=0;return(t=Math.abs(n.x)-r.x)>0&&(i+=t*t),(t=Math.abs(n.y)-r.y)>0&&(i+=t*t),(t=Math.abs(n.z)-r.z)>0&&(i+=t*t),i}}]),e}(),ge=n(10),de=new ce,pe=new ce,ve=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Object(s.a)(this,e),this.radius=-0,this.center=new ce,this.fromCenterRadius(t,n)}return Object(h.a)(e,[{key:"fromCenterRadius",value:function(e,t){return this.center.from(e),this.radius=t,this}},{key:"fromCornerPoints",value:function(e,t){return t=de.from(t),this.center=(new ce).from(e).add(t).scale(.5),this.radius=this.center.distance(t),this}},{key:"equals",value:function(e){return this===e||Boolean(e)&&this.center.equals(e.center)&&this.radius===e.radius}},{key:"clone",value:function(){return new e(this.center,this.radius)}},{key:"union",value:function(e){var t=this.center,n=this.radius,r=e.center,i=e.radius,a=de.copy(r).subtract(t),o=a.magnitude();if(n>=o+i)return this.clone();if(i>=o+n)return e.clone();var s=.5*(n+o+i);return pe.copy(a).scale((-n+s)/o).add(t),this.center.copy(pe),this.radius=s,this}},{key:"expand",value:function(e){var t=(e=de.from(e)).subtract(this.center).magnitude();return t>this.radius&&(this.radius=t),this}},{key:"intersectPlane",value:function(e){var t=this.center,n=this.radius,r=e.normal.dot(t)+e.distance;return r<-n?P.OUTSIDE:r<n?P.INTERSECTING:P.INSIDE}},{key:"transform",value:function(e){this.center.transform(e);var t=ge.e(de,e);return this.radius=Math.max(t[0],Math.max(t[1],t[2]))*this.radius,this}},{key:"distanceSquaredTo",value:function(e){return(e=de.from(e)).subtract(this.center).lengthSquared()-this.radius*this.radius}},{key:"distanceTo",value:function(e){return Math.sqrt(this.distanceSquaredTo(e))}}]),e}();function ye(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var me=function(e){Object(u.a)(n,e);var t=ye(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"toString",value:function(){var e="[";if(Y.printRowMajor){e+="row-major:";for(var t=0;t<this.RANK;++t)for(var n=0;n<this.RANK;++n)e+=" ".concat(this[n*this.RANK+t])}else{e+="column-major:";for(var r=0;r<this.ELEMENTS;++r)e+=" ".concat(this[r])}return e+="]"}},{key:"getElementIndex",value:function(e,t){return t*this.RANK+e}},{key:"getElement",value:function(e,t){return this[t*this.RANK+e]}},{key:"setElement",value:function(e,t,n){return this[t*this.RANK+e]=$(n),this}},{key:"getColumn",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),n=e*this.RANK,r=0;r<this.RANK;++r)t[r]=this[n+r];return t}},{key:"setColumn",value:function(e,t){for(var n=e*this.RANK,r=0;r<this.RANK;++r)this[n+r]=t[r];return this}}]),n}(X),Ie=n(45),be=n(32);function Ee(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var Ce=Object.freeze([1,0,0,0,1,0,0,0,1]),Be=Object.freeze([0,0,0,0,0,0,0,0,0]),we=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL1ROW0:3,COL1ROW1:4,COL1ROW2:5,COL2ROW0:6,COL2ROW1:7,COL2ROW2:8}),Qe={},ke=function(e){Object(u.a)(n,e);var t=Ee(n);function n(e){var r;return Object(s.a)(this,n),r=t.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(e)?r.copy(e):r.identity(),r}return Object(h.a)(n,[{key:"ELEMENTS",get:function(){return 9}},{key:"RANK",get:function(){return 3}},{key:"INDICES",get:function(){return we}}],[{key:"IDENTITY",get:function(){return Qe.IDENTITY=Qe.IDENTITY||Object.freeze(new n(Ce)),Qe.IDENTITY}},{key:"ZERO",get:function(){return Qe.ZERO=Qe.ZERO||Object.freeze(new n(Be)),Qe.ZERO}}]),Object(h.a)(n,[{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this.check()}},{key:"set",value:function(e,t,n,r,i,a,o,s,u){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this[4]=i,this[5]=a,this[6]=o,this[7]=s,this[8]=u,this.check()}},{key:"setRowMajor",value:function(e,t,n,r,i,a,o,s,u){return this[0]=e,this[1]=r,this[2]=o,this[3]=t,this[4]=i,this[5]=s,this[6]=n,this[7]=a,this[8]=u,this.check()}},{key:"determinant",value:function(){return Ie.b(this)}},{key:"identity",value:function(){return this.copy(Ce)}},{key:"fromQuaternion",value:function(e){return Ie.c(this,e),this.check()}},{key:"transpose",value:function(){return Ie.i(this,this),this.check()}},{key:"invert",value:function(){return Ie.d(this,this),this.check()}},{key:"multiplyLeft",value:function(e){return Ie.e(this,e,this),this.check()}},{key:"multiplyRight",value:function(e){return Ie.e(this,this,e),this.check()}},{key:"rotate",value:function(e){return Ie.f(this,this,e),this.check()}},{key:"scale",value:function(e){return Array.isArray(e)?Ie.g(this,this,e):Ie.g(this,this,[e,e,e]),this.check()}},{key:"translate",value:function(e){return Ie.h(this,this,e),this.check()}},{key:"transform",value:function(e,t){switch(e.length){case 2:t=be.i(t||[-0,-0],e,this);break;case 3:t=ae.p(t||[-0,-0,-0],e,this);break;case 4:t=function(e,t,n){var r=t[0],i=t[1],a=t[2];return e[0]=n[0]*r+n[3]*i+n[6]*a,e[1]=n[1]*r+n[4]*i+n[7]*a,e[2]=n[2]*r+n[5]*i+n[8]*a,e[3]=t[3],e}(t||[-0,-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return ee(t,e.length),t}},{key:"transformVector",value:function(e,t){return ne("Matrix3.transformVector"),this.transform(e,t)}},{key:"transformVector2",value:function(e,t){return ne("Matrix3.transformVector"),this.transform(e,t)}},{key:"transformVector3",value:function(e,t){return ne("Matrix3.transformVector"),this.transform(e,t)}}]),n}(me),_e=n(31),xe=n(40);function Se(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var Oe=[0,0,0,1],De=function(e){Object(u.a)(n,e);var t=Se(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return Object(s.a)(this,n),e=t.call(this,-0,-0,-0,-0),Array.isArray(r)&&1===arguments.length?e.copy(r):e.set(r,i,a,o),e}return Object(h.a)(n,[{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this.check()}},{key:"set",value:function(e,t,n,r){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this.check()}},{key:"fromMatrix3",value:function(e){return _e.e(this,e),this.check()}},{key:"identity",value:function(){return _e.f(this),this.check()}},{key:"fromAxisRotation",value:function(e,t){return _e.p(this,e,t),this.check()}},{key:"setAxisAngle",value:function(e,t){return this.fromAxisRotation(e,t)}},{key:"len",value:function(){return _e.h(this)}},{key:"lengthSquared",value:function(){return _e.r(this)}},{key:"dot",value:function(e,t){if(void 0!==t)throw new Error("Quaternion.dot only takes one argument");return _e.d(this,e)}},{key:"rotationTo",value:function(e,t){return _e.n(this,e,t),this.check()}},{key:"add",value:function(e,t){if(void 0!==t)throw new Error("Quaternion.add only takes one argument");return _e.a(this,this,e),this.check()}},{key:"calculateW",value:function(){return _e.b(this,this),this.check()}},{key:"conjugate",value:function(){return _e.c(this,this),this.check()}},{key:"invert",value:function(){return _e.g(this,this),this.check()}},{key:"lerp",value:function(e,t,n){return _e.i(this,e,t,n),this.check()}},{key:"multiplyRight",value:function(e,t){return H(!t),_e.j(this,this,e),this.check()}},{key:"multiplyLeft",value:function(e,t){return H(!t),_e.j(this,e,this),this.check()}},{key:"normalize",value:function(){var e=this.len(),t=e>0?1/e:0;return this[0]=this[0]*t,this[1]=this[1]*t,this[2]=this[2]*t,this[3]=this[3]*t,0===e&&(this[3]=1),this.check()}},{key:"rotateX",value:function(e){return _e.k(this,this,e),this.check()}},{key:"rotateY",value:function(e){return _e.l(this,this,e),this.check()}},{key:"rotateZ",value:function(e){return _e.m(this,this,e),this.check()}},{key:"scale",value:function(e){return _e.o(this,this,e),this.check()}},{key:"slerp",value:function(e,t,n){switch(arguments.length){case 1:var r=arguments[0],i=r.start;e=void 0===i?Oe:i,t=r.target,n=r.ratio;break;case 2:var a=Array.prototype.slice.call(arguments);t=a[0],n=a[1],e=this}return _e.q(this,e,t,n),this.check()}},{key:"transformVector4",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return xe.o(t,e,this),ee(t,4)}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"setFromAxisAngle",value:function(e,t){return this.setAxisAngle(e,t)}},{key:"premultiply",value:function(e,t){return this.multiplyLeft(e,t)}},{key:"multiply",value:function(e,t){return this.multiplyRight(e,t)}},{key:"ELEMENTS",get:function(){return 4}},{key:"x",get:function(){return this[0]},set:function(e){this[0]=$(e)}},{key:"y",get:function(){return this[1]},set:function(e){this[1]=$(e)}},{key:"z",get:function(){return this[2]},set:function(e){this[2]=$(e)}},{key:"w",get:function(){return this[3]},set:function(e){this[3]=$(e)}}]),n}(X),Re=new ce,je=new ce,Me=new ce,Ne=new ce,Fe=new ce,Te=new ce,Le=new ce,Pe=new ce,Ue=new ce,Ge=new ce,qe=0,He=1,Ye=2,Je=3,ze=4,Ke=5,We=6,Ve=7,Xe=8,Ze=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0,0,0,0,0,0,0];Object(s.a)(this,e),this.center=(new ce).from(t),this.halfAxes=new ke(n)}return Object(h.a)(e,[{key:"fromCenterHalfSizeQuaternion",value:function(e,t,n){var r=new De(n),i=(new ke).fromQuaternion(r);return i[0]=i[0]*t[0],i[1]=i[1]*t[0],i[2]=i[2]*t[0],i[3]=i[3]*t[1],i[4]=i[4]*t[1],i[5]=i[5]*t[1],i[6]=i[6]*t[2],i[7]=i[7]*t[2],i[8]=i[8]*t[2],this.center=(new ce).from(e),this.halfAxes=i,this}},{key:"clone",value:function(){return new e(this.center,this.halfAxes)}},{key:"equals",value:function(e){return this===e||Boolean(e)&&this.center.equals(e.center)&&this.halfAxes.equals(e.halfAxes)}},{key:"getBoundingSphere",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new ve,t=this.halfAxes,n=t.getColumn(0,Pe),r=t.getColumn(1,Ue),i=t.getColumn(2,Ge),a=Re.copy(n).add(r).add(i);return e.center.copy(this.center),e.radius=a.magnitude(),e}},{key:"intersectPlane",value:function(e){var t=this.center,n=e.normal,r=this.halfAxes,i=n.x,a=n.y,o=n.z,s=Math.abs(i*r[qe]+a*r[He]+o*r[Ye])+Math.abs(i*r[Je]+a*r[ze]+o*r[Ke])+Math.abs(i*r[We]+a*r[Ve]+o*r[Xe]),u=n.dot(t)+e.distance;return u<=-s?P.OUTSIDE:u>=s?P.INSIDE:P.INTERSECTING}},{key:"distanceTo",value:function(e){return Math.sqrt(this.distanceSquaredTo(e))}},{key:"distanceSquaredTo",value:function(e){var t=je.from(e).subtract(this.center),n=this.halfAxes,r=n.getColumn(0,Me),i=n.getColumn(1,Ne),a=n.getColumn(2,Fe),o=r.magnitude(),s=i.magnitude(),u=a.magnitude();r.normalize(),i.normalize(),a.normalize();var A,c=0;return(A=Math.abs(t.dot(r))-o)>0&&(c+=A*A),(A=Math.abs(t.dot(i))-s)>0&&(c+=A*A),(A=Math.abs(t.dot(a))-u)>0&&(c+=A*A),c}},{key:"computePlaneDistances",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[-0,-0],r=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,a=this.center,o=this.halfAxes,s=o.getColumn(0,Me),u=o.getColumn(1,Ne),A=o.getColumn(2,Fe),c=Te.copy(s).add(u).add(A).add(a),l=Le.copy(c).subtract(e),f=t.dot(l);return r=Math.min(f,r),i=Math.max(f,i),c.copy(a).add(s).add(u).subtract(A),l.copy(c).subtract(e),f=t.dot(l),r=Math.min(f,r),i=Math.max(f,i),c.copy(a).add(s).subtract(u).add(A),l.copy(c).subtract(e),f=t.dot(l),r=Math.min(f,r),i=Math.max(f,i),c.copy(a).add(s).subtract(u).subtract(A),l.copy(c).subtract(e),f=t.dot(l),r=Math.min(f,r),i=Math.max(f,i),a.copy(c).subtract(s).add(u).add(A),l.copy(c).subtract(e),f=t.dot(l),r=Math.min(f,r),i=Math.max(f,i),a.copy(c).subtract(s).add(u).subtract(A),l.copy(c).subtract(e),f=t.dot(l),r=Math.min(f,r),i=Math.max(f,i),a.copy(c).subtract(s).subtract(u).add(A),l.copy(c).subtract(e),f=t.dot(l),r=Math.min(f,r),i=Math.max(f,i),a.copy(c).subtract(s).subtract(u).subtract(A),l.copy(c).subtract(e),f=t.dot(l),r=Math.min(f,r),i=Math.max(f,i),n[0]=r,n[1]=i,n}},{key:"getTransform",value:function(){}},{key:"halfSize",get:function(){var e=this.halfAxes.getColumn(0),t=this.halfAxes.getColumn(1),n=this.halfAxes.getColumn(2);return[new ce(e).len(),new ce(t).len(),new ce(n).len()]}},{key:"quaternion",get:function(){var e=this.halfAxes.getColumn(0),t=this.halfAxes.getColumn(1),n=this.halfAxes.getColumn(2),r=new ce(e).normalize(),i=new ce(t).normalize(),a=new ce(n).normalize();return(new De).fromMatrix3(new ke([].concat(Object(q.a)(r),Object(q.a)(i),Object(q.a)(a))))}}]),e}(),$e=new ce,et=new ce,tt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,1],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Object(s.a)(this,e),this.normal=new ce,this.distance=-0,this.fromNormalDistance(t,n)}return Object(h.a)(e,[{key:"fromNormalDistance",value:function(e,t){return H(Number.isFinite(t)),this.normal.from(e).normalize(),this.distance=t,this}},{key:"fromPointNormal",value:function(e,t){e=$e.from(e),this.normal.from(t).normalize();var n=-this.normal.dot(e);return this.distance=n,this}},{key:"fromCoefficients",value:function(e,t,n,r){return this.normal.set(e,t,n),H(W(this.normal.len(),1)),this.distance=r,this}},{key:"clone",value:function(t){return new e(this.normal,this.distance)}},{key:"equals",value:function(e){return W(this.distance,e.distance)&&W(this.normal,e.normal)}},{key:"getPointDistance",value:function(e){return this.normal.dot(e)+this.distance}},{key:"transform",value:function(e){var t=et.copy(this.normal).transformAsVector(e).normalize(),n=this.normal.scale(-this.distance).transform(e);return this.fromPointNormal(n,t)}},{key:"projectPointOntoPlane",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];e=$e.from(e);var n=this.getPointDistance(e),r=et.copy(this.normal).scale(n);return e.subtract(r).to(t)}}]),e}();function nt(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return rt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rt(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var it=[new ce([1,0,0]),new ce([0,1,0]),new ce([0,0,1])],at=new ce,ot=new ce,st=(new tt(new ce(1,0,0),0),function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Object(s.a)(this,e),this.planes=t,H(this.planes.every((function(e){return e instanceof tt})))}return Object(h.a)(e,null,[{key:"MASK_OUTSIDE",get:function(){return 4294967295}},{key:"MASK_INSIDE",get:function(){return 0}},{key:"MASK_INDETERMINATE",get:function(){return 2147483647}}]),Object(h.a)(e,[{key:"fromBoundingSphere",value:function(e){this.planes.length=2*it.length;var t,n=e.center,r=e.radius,i=0,a=nt(it);try{for(a.s();!(t=a.n()).done;){var o=t.value,s=this.planes[i],u=this.planes[i+1];s||(s=this.planes[i]=new tt),u||(u=this.planes[i+1]=new tt);var A=at.copy(o).scale(-r).add(n);o.dot(A);s.fromPointNormal(A,o);var c=at.copy(o).scale(r).add(n),l=ot.copy(o).negate();l.dot(c);u.fromPointNormal(c,l),i+=2}}catch(f){a.e(f)}finally{a.f()}return this}},{key:"computeVisibility",value:function(e){H(e);var t,n=P.INSIDE,r=nt(this.planes);try{for(r.s();!(t=r.n()).done;){var i=t.value;switch(e.intersectPlane(i)){case P.OUTSIDE:return P.OUTSIDE;case P.INTERSECTING:n=P.INTERSECTING}}}catch(a){r.e(a)}finally{r.f()}return n}},{key:"computeVisibilityWithPlaneMask",value:function(t,n){if(H(t,"boundingVolume is required."),H(Number.isFinite(n),"parentPlaneMask is required."),n===e.MASK_OUTSIDE||n===e.MASK_INSIDE)return n;for(var r=e.MASK_INSIDE,i=this.planes,a=0;a<this.planes.length;++a){var o=a<31?1<<a:0;if(!(a<31&&0===(n&o))){var s=i[a],u=t.intersectPlane(s);if(u===P.OUTSIDE)return e.MASK_OUTSIDE;u===P.INTERSECTING&&(r|=o)}}return r}}]),e}());function ut(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var At=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),ct=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),lt=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),ft={},ht=function(e){Object(u.a)(n,e);var t=ut(n);function n(e){var r;return Object(s.a)(this,n),r=t.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(e)?r.copy(e):r.identity(),r}return Object(h.a)(n,[{key:"INDICES",get:function(){return lt}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}}],[{key:"IDENTITY",get:function(){return ft.IDENTITY=ft.IDENTITY||Object.freeze(new n(At)),ft.IDENTITY}},{key:"ZERO",get:function(){return ft.ZERO=ft.ZERO||Object.freeze(new n(ct)),ft.ZERO}}]),Object(h.a)(n,[{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this[9]=e[9],this[10]=e[10],this[11]=e[11],this[12]=e[12],this[13]=e[13],this[14]=e[14],this[15]=e[15],this.check()}},{key:"set",value:function(e,t,n,r,i,a,o,s,u,A,c,l,f,h,g,d){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this[4]=i,this[5]=a,this[6]=o,this[7]=s,this[8]=u,this[9]=A,this[10]=c,this[11]=l,this[12]=f,this[13]=h,this[14]=g,this[15]=d,this.check()}},{key:"setRowMajor",value:function(e,t,n,r,i,a,o,s,u,A,c,l,f,h,g,d){return this[0]=e,this[1]=i,this[2]=u,this[3]=f,this[4]=t,this[5]=a,this[6]=A,this[7]=h,this[8]=n,this[9]=o,this[10]=c,this[11]=g,this[12]=r,this[13]=s,this[14]=l,this[15]=d,this.check()}},{key:"toRowMajor",value:function(e){return e[0]=this[0],e[1]=this[4],e[2]=this[8],e[3]=this[12],e[4]=this[1],e[5]=this[5],e[6]=this[9],e[7]=this[13],e[8]=this[2],e[9]=this[6],e[10]=this[10],e[11]=this[14],e[12]=this[3],e[13]=this[7],e[14]=this[11],e[15]=this[15],e}},{key:"identity",value:function(){return this.copy(At)}},{key:"fromQuaternion",value:function(e){return ge.c(this,e),this.check()}},{key:"frustum",value:function(e){var t=e.left,r=e.right,i=e.bottom,a=e.top,o=e.near,s=e.far;return s===1/0?n._computeInfinitePerspectiveOffCenter(this,t,r,i,a,o):ge.d(this,t,r,i,a,o,s),this.check()}},{key:"lookAt",value:function(e,t,n){if(1===arguments.length){var r=e;e=r.eye,t=r.center,n=r.up}return t=t||[0,0,0],n=n||[0,1,0],ge.g(this,e,t,n),this.check()}},{key:"ortho",value:function(e){var t=e.left,n=e.right,r=e.bottom,i=e.top,a=e.near,o=void 0===a?.1:a,s=e.far,u=void 0===s?500:s;return ge.i(this,t,n,r,i,o,u),this.check()}},{key:"orthographic",value:function(e){var t=e.fovy,r=void 0===t?45*Math.PI/180:t,i=e.aspect,a=void 0===i?1:i,o=e.focalDistance,s=void 0===o?1:o,u=e.near,A=void 0===u?.1:u,c=e.far,l=void 0===c?500:c;if(r>2*Math.PI)throw Error("radians");var f=r/2,h=s*Math.tan(f),g=h*a;return(new n).ortho({left:-g,right:g,bottom:-h,top:h,near:A,far:l})}},{key:"perspective",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fovy,n=void 0===t?void 0:t,r=e.fov,i=void 0===r?45*Math.PI/180:r,a=e.aspect,o=void 0===a?1:a,s=e.near,u=void 0===s?.1:s,A=e.far,c=void 0===A?500:A;if((n=n||i)>2*Math.PI)throw Error("radians");return ge.j(this,n,o,u,c),this.check()}},{key:"determinant",value:function(){return ge.a(this)}},{key:"getScale",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),e[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),e[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),e}},{key:"getTranslation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=this[12],e[1]=this[13],e[2]=this[14],e}},{key:"getRotation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(t||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=0,e[4]=this[4]*r,e[5]=this[5]*i,e[6]=this[6]*a,e[7]=0,e[8]=this[8]*r,e[9]=this[9]*i,e[10]=this[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{key:"getRotationMatrix3",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(t||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=this[4]*r,e[4]=this[5]*i,e[5]=this[6]*a,e[6]=this[8]*r,e[7]=this[9]*i,e[8]=this[10]*a,e}},{key:"transpose",value:function(){return ge.q(this,this),this.check()}},{key:"invert",value:function(){return ge.f(this,this),this.check()}},{key:"multiplyLeft",value:function(e){return ge.h(this,e,this),this.check()}},{key:"multiplyRight",value:function(e){return ge.h(this,this,e),this.check()}},{key:"rotateX",value:function(e){return ge.l(this,this,e),this.check()}},{key:"rotateY",value:function(e){return ge.m(this,this,e),this.check()}},{key:"rotateZ",value:function(e){return ge.n(this,this,e),this.check()}},{key:"rotateXYZ",value:function(e){var t=Object(p.a)(e,3),n=t[0],r=t[1],i=t[2];return this.rotateX(n).rotateY(r).rotateZ(i)}},{key:"rotateAxis",value:function(e,t){return ge.k(this,this,e,t),this.check()}},{key:"scale",value:function(e){return Array.isArray(e)?ge.o(this,this,e):ge.o(this,this,[e,e,e]),this.check()}},{key:"translate",value:function(e){return ge.p(this,this,e),this.check()}},{key:"transform",value:function(e,t){return 4===e.length?(ee(t=xe.n(t||[-0,-0,-0,-0],e,this),4),t):this.transformAsPoint(e,t)}},{key:"transformAsPoint",value:function(e,t){switch(e.length){case 2:t=be.j(t||[-0,-0],e,this);break;case 3:t=ae.q(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return ee(t,e.length),t}},{key:"transformAsVector",value:function(e,t){switch(e.length){case 2:t=function(e,t,n){var r=t[0],i=t[1],a=n[3]*r+n[7]*i||1;return e[0]=(n[0]*r+n[4]*i)/a,e[1]=(n[1]*r+n[5]*i)/a,e}(t||[-0,-0],e,this);break;case 3:t=oe(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return ee(t,e.length),t}},{key:"makeRotationX",value:function(e){return this.identity().rotateX(e)}},{key:"makeTranslation",value:function(e,t,n){return this.identity().translate([e,t,n])}},{key:"transformPoint",value:function(e,t){return ne("Matrix4.transformPoint","3.0"),this.transformAsPoint(e,t)}},{key:"transformVector",value:function(e,t){return ne("Matrix4.transformVector","3.0"),this.transformAsPoint(e,t)}},{key:"transformDirection",value:function(e,t){return ne("Matrix4.transformDirection","3.0"),this.transformAsVector(e,t)}}],[{key:"_computeInfinitePerspectiveOffCenter",value:function(e,t,n,r,i,a){var o=2*a/(n-t),s=2*a/(i-r),u=(n+t)/(n-t),A=(i+r)/(i-r),c=-2*a;return e[0]=o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=u,e[9]=A,e[10]=-1,e[11]=-1,e[12]=0,e[13]=0,e[14]=c,e[15]=0,e}}]),n}(me);function gt(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 dt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gt(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pt=new ce,vt=new ce,yt=new ce,mt=new ce,It=new ce,bt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(s.a)(this,e),t=dt({near:1,far:5e8},t),this.left=t.left,this._left=void 0,this.right=t.right,this._right=void 0,this.top=t.top,this._top=void 0,this.bottom=t.bottom,this._bottom=void 0,this.near=t.near,this._near=this.near,this.far=t.far,this._far=this.far,this._cullingVolume=new st([new tt,new tt,new tt,new tt,new tt,new tt]),this._perspectiveMatrix=new ht,this._infinitePerspective=new ht}return Object(h.a)(e,[{key:"clone",value:function(){return new e({right:this.right,left:this.left,top:this.top,bottom:this.bottom,near:this.near,far:this.far})}},{key:"equals",value:function(t){return t&&t instanceof e&&this.right===t.right&&this.left===t.left&&this.top===t.top&&this.bottom===t.bottom&&this.near===t.near&&this.far===t.far}},{key:"computeCullingVolume",value:function(e,t,n){H(e,"position is required."),H(t,"direction is required."),H(n,"up is required.");var r=this._cullingVolume.planes;n=pt.copy(n).normalize();var i=vt.copy(t).cross(n).normalize(),a=yt.copy(t).multiplyByScalar(this.near).add(e),o=mt.copy(t).multiplyByScalar(this.far).add(e),s=It;return s.copy(i).multiplyByScalar(this.left).add(a).subtract(e).cross(n),r[0].fromPointNormal(e,s),s.copy(i).multiplyByScalar(this.right).add(a).subtract(e).cross(n).negate(),r[1].fromPointNormal(e,s),s.copy(n).multiplyByScalar(this.bottom).add(a).subtract(e).cross(i).negate(),r[2].fromPointNormal(e,s),s.copy(n).multiplyByScalar(this.top).add(a).subtract(e).cross(i),r[3].fromPointNormal(e,s),s=(new ce).copy(t),r[4].fromPointNormal(a,s),s.negate(),r[5].fromPointNormal(o,s),this._cullingVolume}},{key:"getPixelDimensions",value:function(e,t,n,r){Et(this),H(Number.isFinite(e)&&Number.isFinite(t)),H(e>0),H(t>0),H(n>0),H(r);var i=1/this.near,a=this.top*i,o=2*n*a/t,s=2*n*(a=this.right*i)/e;return r.x=s,r.y=o,r}},{key:"projectionMatrix",get:function(){return Et(this),this._perspectiveMatrix}},{key:"infiniteProjectionMatrix",get:function(){return Et(this),this._infinitePerspective}}]),e}();function Et(e){H(Number.isFinite(e.right)&&Number.isFinite(e.left)&&Number.isFinite(e.top)&&Number.isFinite(e.bottom)&&Number.isFinite(e.near)&&Number.isFinite(e.far));var t=e.top,n=e.bottom,r=e.right,i=e.left,a=e.near,o=e.far;t===e._top&&n===e._bottom&&i===e._left&&r===e._right&&a===e._near&&o===e._far||(H(e.near>0&&e.near<e.far,"near must be greater than zero and less than far."),e._left=i,e._right=r,e._top=t,e._bottom=n,e._near=a,e._far=o,e._perspectiveMatrix=(new ht).frustum({left:i,right:r,bottom:n,top:t,near:a,far:o}),e._infinitePerspective=(new ht).frustum({left:i,right:r,bottom:n,top:t,near:a,far:1/0}))}function Ct(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 Bt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}!function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(s.a)(this,e),t=Bt({near:1,far:5e8,xOffset:0,yOffset:0},t),this._offCenterFrustum=new bt,this.fov=t.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=t.aspectRatio,this._aspectRatio=void 0,this.near=t.near,this._near=this.near,this.far=t.far,this._far=this.far,this.xOffset=t.xOffset,this._xOffset=this.xOffset,this.yOffset=t.yOffset,this._yOffset=this.yOffset}Object(h.a)(e,[{key:"clone",value:function(){return new e({aspectRatio:this.aspectRatio,fov:this.fov,near:this.near,far:this.far})}},{key:"equals",value:function(t){return null!==(n=t)&&"undefined"!==typeof n&&t instanceof e&&(wt(this),wt(t),this.fov===t.fov&&this.aspectRatio===t.aspectRatio&&this.near===t.near&&this.far===t.far&&this._offCenterFrustum.equals(t._offCenterFrustum));var n}},{key:"computeCullingVolume",value:function(e,t,n){return wt(this),this._offCenterFrustum.computeCullingVolume(e,t,n)}},{key:"getPixelDimensions",value:function(e,t,n,r){return wt(this),this._offCenterFrustum.getPixelDimensions(e,t,n,r)}},{key:"projectionMatrix",get:function(){return wt(this),this._offCenterFrustum.projectionMatrix}},{key:"infiniteProjectionMatrix",get:function(){return wt(this),this._offCenterFrustum.infiniteProjectionMatrix}},{key:"fovy",get:function(){return wt(this),this._fovy}},{key:"sseDenominator",get:function(){return wt(this),this._sseDenominator}}])}();function wt(e){H(Number.isFinite(e.fov)&&Number.isFinite(e.aspectRatio)&&Number.isFinite(e.near)&&Number.isFinite(e.far));var t=e._offCenterFrustum;e.fov===e._fov&&e.aspectRatio===e._aspectRatio&&e.near===e._near&&e.far===e._far&&e.xOffset===e._xOffset&&e.yOffset===e._yOffset||(H(e.fov>=0&&e.fov<Math.PI),H(e.aspectRatio>0),H(e.near>=0&&e.near<e.far),e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:2*Math.atan(Math.tan(.5*e.fov)/e.aspectRatio),e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset,t.top=e.near*Math.tan(.5*e._fovy),t.bottom=-t.top,t.right=e.aspectRatio*t.top,t.left=-t.right,t.near=e.near,t.far=e.far,t.right+=e.xOffset,t.left+=e.xOffset,t.top+=e.yOffset,t.bottom+=e.yOffset)}new ce,new ce,new ce,new ce,new ce,new ce,new ce,new ce,new ce,new ce,new ce,new ce,Math.PI;Math.PI,Math.PI,Math.PI,Math.PI,new ke,new ke,new ke,new ke,new ke;new ce,new ce,new ce,new ce,new ce,new ke,new ke,new ke;var Qt=n(213);function kt(e,t){var n=xe.n([],t,e);return xe.k(n,n,1/n[3]),n}function _t(e,t){if(!e)throw new Error(t||"@math.gl/web-mercator: assertion failed.")}var xt=Math.PI,St=xt/4,Ot=xt/180,Dt=180/xt;function Rt(e){return Math.pow(2,e)}function jt(e){var t=Object(p.a)(e,2),n=t[0],r=t[1];_t(Number.isFinite(n)),_t(Number.isFinite(r)&&r>=-90&&r<=90,"invalid latitude");var i=r*Ot;return[512*(n*Ot+xt)/(2*xt),512*(xt+Math.log(Math.tan(St+.5*i)))/(2*xt)]}function Mt(e){var t=Object(p.a)(e,2),n=t[0],r=t[1],i=n/512*(2*xt)-xt,a=2*(Math.atan(Math.exp(r/512*(2*xt)-xt))-St);return[i*Dt,a*Dt]}function Nt(e){var t=e.latitude,n=e.longitude,r=e.highPrecision,i=void 0!==r&&r;_t(Number.isFinite(t)&&Number.isFinite(n));var a={},o=Math.cos(t*Ot),s=512/360/o,u=512/4003e4/o;if(a.unitsPerMeter=[u,u,u],a.metersPerUnit=[1/u,1/u,1/u],a.unitsPerDegree=[512/360,s,u],a.degreesPerUnit=[.703125,1/s,1/u],i){var A=Ot*Math.tan(t*Ot)/o,c=512/360*A/2,l=512/4003e4*A,f=l/s*u;a.unitsPerDegree2=[0,c,l],a.unitsPerMeter2=[f,0,f]}return a}function Ft(e){var t=e.height,n=e.pitch,r=e.bearing,i=e.altitude,a=e.scale,o=e.center,s=void 0===o?null:o,u=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return ge.p(u,u,[0,0,-i]),ge.l(u,u,-n*Ot),ge.n(u,u,r*Ot),a/=t,ge.o(u,u,[a,a,a]),s&&ge.p(u,u,ae.i([],s)),u}function Tt(e){var t=e.width,n=e.height,r=e.pitch,i=function(e){var t=e.width,n=e.height,r=e.altitude,i=void 0===r?1.5:r,a=e.pitch,o=void 0===a?0:a,s=e.nearZMultiplier,u=void 0===s?1:s,A=e.farZMultiplier,c=void 0===A?1:A,l=o*Ot,f=Math.atan(.5/i),h=Math.sin(f)*i/Math.sin(Math.min(Math.max(Math.PI/2-l-f,.01),Math.PI-.01));return{fov:2*f,aspect:t/n,focalDistance:i,near:u,far:(Math.sin(l)*h+i)*c}}({width:t,height:n,altitude:e.altitude,pitch:r,nearZMultiplier:e.nearZMultiplier,farZMultiplier:e.farZMultiplier}),a=i.fov,o=i.aspect,s=i.near,u=i.far;return ge.j([],a,o,s,u)}function Lt(e,t){var n=Object(p.a)(e,3),r=n[0],i=n[1],a=n[2],o=void 0===a?0:a;return _t(Number.isFinite(r)&&Number.isFinite(i)&&Number.isFinite(o)),kt(t,[r,i,o,1])}function Pt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Object(p.a)(e,3),i=r[0],a=r[1],o=r[2];if(_t(Number.isFinite(i)&&Number.isFinite(a),"invalid pixel coordinate"),Number.isFinite(o)){var s=kt(t,[i,a,o,1]);return s}var u=kt(t,[i,a,0,1]),A=kt(t,[i,a,1,1]),c=u[2],l=A[2],f=c===l?0:((n||0)-c)/(l-c);return be.c([],u,A,f)}function Ut(e){var t=e.width,n=e.height,r=e.bounds,i=e.minExtent,a=void 0===i?0:i,o=e.maxZoom,s=void 0===o?24:o,u=e.padding,A=void 0===u?0:u,c=e.offset,l=void 0===c?[0,0]:c,f=Object(p.a)(r,2),h=Object(p.a)(f[0],2),g=h[0],d=h[1],v=Object(p.a)(f[1],2),y=v[0],m=v[1];if(Number.isFinite(A)){A={top:A,bottom:A,left:A,right:A}}else _t(Number.isFinite(A.top)&&Number.isFinite(A.bottom)&&Number.isFinite(A.left)&&Number.isFinite(A.right));var I=new Yt({width:t,height:n,longitude:0,latitude:0,zoom:0}),b=I.project([g,m]),E=I.project([y,d]),C=[Math.max(Math.abs(E[0]-b[0]),a),Math.max(Math.abs(E[1]-b[1]),a)],B=[t-A.left-A.right-2*Math.abs(l[0]),n-A.top-A.bottom-2*Math.abs(l[1])];_t(B[0]>0&&B[1]>0);var w=B[0]/C[0],Q=B[1]/C[1],k=(A.right-A.left)/2/w,_=(A.bottom-A.top)/2/Q,x=[(E[0]+b[0])/2+k,(E[1]+b[1])/2+_],S=I.unproject(x),O=Math.min(s,I.zoom+Math.log2(Math.abs(Math.min(w,Q))));return _t(Number.isFinite(O)),{longitude:S[0],latitude:S[1],zoom:O}}var Gt=Math.PI/180;function qt(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=e.width,a=e.height,o=e.unproject,s={targetZ:r},u=o([0,a],s),A=o([i,a],s),c=Math.atan(.5/e.altitude),l=(90-e.pitch)*Gt;return c>l-.01?(t=Ht(e,0,r),n=Ht(e,i,r)):(t=o([0,0],s),n=o([i,0],s)),[u,A,n,t]}function Ht(e,t,n){var r=e.pixelUnprojectionMatrix,i=kt(r,[t,0,1,1]),a=kt(r,[t,e.height,1,1]),o=(n*e.distanceScales.unitsPerMeter[2]-i[2])/(a[2]-i[2]),s=Mt(be.c([],i,a,o));return s[2]=n,s}var Yt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{width:1,height:1},n=t.width,r=t.height,i=t.latitude,a=void 0===i?0:i,o=t.longitude,u=void 0===o?0:o,A=t.zoom,c=void 0===A?0:A,l=t.pitch,f=void 0===l?0:l,h=t.bearing,g=void 0===h?0:h,d=t.altitude,p=void 0===d?1.5:d,v=t.nearZMultiplier,y=void 0===v?.02:v,m=t.farZMultiplier,I=void 0===m?1.01:m;Object(s.a)(this,e),n=n||1,r=r||1;var b=Rt(c);p=Math.max(.75,p);var E=jt([u,a]);E[2]=0,this.projectionMatrix=Tt({width:n,height:r,pitch:f,altitude:p,nearZMultiplier:y,farZMultiplier:I}),this.viewMatrix=Ft({height:r,scale:b,center:E,pitch:f,bearing:g,altitude:p}),this.width=n,this.height=r,this.scale=b,this.latitude=a,this.longitude=u,this.zoom=c,this.pitch=f,this.bearing=g,this.altitude=p,this.center=E,this.distanceScales=Nt(this),this._initMatrices(),this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),Object.freeze(this)}return Object(h.a)(e,[{key:"_initMatrices",value:function(){var e=this.width,t=this.height,n=this.projectionMatrix,r=this.viewMatrix,i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];ge.h(i,i,n),ge.h(i,i,r),this.viewProjectionMatrix=i;var a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];ge.o(a,a,[e/2,-t/2,1]),ge.p(a,a,[1,-1,0]),ge.h(a,a,i);var o=ge.f([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],a);if(!o)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=a,this.pixelUnprojectionMatrix=o}},{key:"equals",value:function(t){return t instanceof e&&(t.width===this.width&&t.height===this.height&&ge.b(t.projectionMatrix,this.projectionMatrix)&&ge.b(t.viewMatrix,this.viewMatrix))}},{key:"project",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.topLeft,r=void 0===n||n,i=this.projectPosition(e),a=Lt(i,this.pixelProjectionMatrix),o=Object(p.a)(a,2),s=o[0],u=o[1],A=r?u:this.height-u;return 2===e.length?[s,A]:[s,A,a[2]]}},{key:"unproject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.topLeft,r=void 0===n||n,i=t.targetZ,a=void 0===i?void 0:i,o=Object(p.a)(e,3),s=o[0],u=o[1],A=o[2],c=r?u:this.height-u,l=a&&a*this.distanceScales.unitsPerMeter[2],f=Pt([s,c,A],this.pixelUnprojectionMatrix,l),h=this.unprojectPosition(f),g=Object(p.a)(h,3),d=g[0],v=g[1],y=g[2];return Number.isFinite(A)?[d,v,y]:Number.isFinite(a)?[d,v,a]:[d,v]}},{key:"projectPosition",value:function(e){var t=jt(e),n=Object(p.a)(t,2);return[n[0],n[1],(e[2]||0)*this.distanceScales.unitsPerMeter[2]]}},{key:"unprojectPosition",value:function(e){var t=Mt(e),n=Object(p.a)(t,2);return[n[0],n[1],(e[2]||0)*this.distanceScales.metersPerUnit[2]]}},{key:"projectFlat",value:function(e){return jt(e)}},{key:"unprojectFlat",value:function(e){return Mt(e)}},{key:"getMapCenterByLngLatPosition",value:function(e){var t=e.lngLat,n=Pt(e.pos,this.pixelUnprojectionMatrix),r=jt(t),i=be.a([],r,be.d([],n));return Mt(be.a([],this.center,i))}},{key:"getLocationAtPoint",value:function(e){var t=e.lngLat,n=e.pos;return this.getMapCenterByLngLatPosition({lngLat:t,pos:n})}},{key:"fitBounds",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.width,i=this.height,a=Ut(Object.assign({width:r,height:i,bounds:t},n)),o=a.longitude,s=a.latitude,u=a.zoom;return new e({width:r,height:i,longitude:o,latitude:s,zoom:u})}},{key:"getBounds",value:function(e){var t=this.getBoundingRegion(e),n=Math.min.apply(Math,Object(q.a)(t.map((function(e){return e[0]})))),r=Math.max.apply(Math,Object(q.a)(t.map((function(e){return e[0]}))));return[[n,Math.min.apply(Math,Object(q.a)(t.map((function(e){return e[1]}))))],[r,Math.max.apply(Math,Object(q.a)(t.map((function(e){return e[1]}))))]]}},{key:"getBoundingRegion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return qt(this,e.z||0)}}]),e}();function Jt(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return zt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zt(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Kt=function(){function e(t,n,r){Object(s.a)(this,e),this.x=t,this.y=n,this.z=r}return Object(h.a)(e,[{key:"update",value:function(e){var t=e.viewport,n=e.cullingVolume,r=e.elevationBounds,i=e.minZ,a=e.maxZ,o=e.offset,s=this.getBoundingVolume(r,o);if(n.computeVisibility(s)<0)return!1;if(!this.childVisible){var u=this.z;if(u<a&&u>=i){var A=s.distanceTo(t.cameraPosition)*t.scale/t.height;u+=Math.floor(Math.log2(A))}if(u>=a)return this.selected=!0,!0}this.selected=!1,this.childVisible=!0;var c,l=Jt(this.children);try{for(l.s();!(c=l.n()).done;){c.value.update(e)}}catch(f){l.e(f)}finally{l.f()}return!0}},{key:"getSelected",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(this.selected&&e.push(this),this._children){var t,n=Jt(this._children);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.getSelected(e)}}catch(i){n.e(i)}finally{n.f()}}return e}},{key:"getBoundingVolume",value:function(e,t){var n=512/Math.pow(2,this.z),r=this.x*n+512*t,i=512-(this.y+1)*n;return new he([r,i,e[0]],[r+n,i+n,e[1]])}},{key:"children",get:function(){if(!this._children){var t=2*this.x,n=2*this.y,r=this.z+1;this._children=[new e(t,n,r),new e(t,n+1,r),new e(t+1,n,r),new e(t+1,n+1,r)]}return this._children}}]),e}();var Wt=[-1/0,-1/0,1/0,1/0],Vt={type:"url",value:"",validate:function(e){return"string"===typeof e||Array.isArray(e)&&e.every((function(e){return"string"===typeof e}))},equals:function(e,t){if(e===t)return!0;if(!Array.isArray(e)||!Array.isArray(t))return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}};function Xt(e,t){if(!e||!e.length)return null;Array.isArray(e)&&(e=e[Math.abs(t.x+t.y)%e.length]);var n=t.x,r=t.y,i=t.z;return e.replace("{x}",n).replace("{y}",r).replace("{z}",i).replace("{-y}",Math.pow(2,i)-r-1)}function Zt(e,t){var n=Object(p.a)(e,2);return[n[0]*t/512,n[1]*t/512]}function $t(e){return Math.pow(2,e)}function en(e,t,n){var r=$t(n),i=e/r*360-180,a=Math.PI-2*Math.PI*t/r;return[i,180/Math.PI*Math.atan(.5*(Math.exp(a)-Math.exp(-a)))]}function tn(e,t,n){var r=$t(n);return[e/r*512,t/r*512]}function nn(e,t,n,r){if(e.isGeospatial){var i=en(t,n,r),a=Object(p.a)(i,2),o=a[0],s=a[1],u=en(t+1,n+1,r),A=Object(p.a)(u,2);return{west:o,north:s,east:A[0],south:A[1]}}var c=tn(t,n,r),l=Object(p.a)(c,2),f=l[0],h=l[1],g=tn(t+1,n+1,r),d=Object(p.a)(g,2);return{left:f,top:h,right:d[0],bottom:d[1]}}function rn(e,t,n){for(var r=function(e,t,n){var r;if(t&&2===t.length){var i=Object(p.a)(t,2),a=i[0],o=i[1],s=e.getBounds({z:a}),u=e.getBounds({z:o});r=[Math.min(s[0],u[0]),Math.min(s[1],u[1]),Math.max(s[2],u[2]),Math.max(s[3],u[3])]}else r=e.getBounds();return[Math.max(r[0],n[0]),Math.max(r[1],n[1]),Math.min(r[2],n[2]),Math.min(r[3],n[3])]}(e,null,n),i=$t(t),a=Zt([r[0],r[1]],i),o=Object(p.a)(a,2),s=o[0],u=o[1],A=Zt([r[2],r[3]],i),c=Object(p.a)(A,2),l=c[0],f=c[1],h=[],g=Math.floor(s);g<l;g++)for(var d=Math.floor(u);d<f;d++)h.push({x:g,y:d,z:t});return h}function an(e){var t=e.viewport,n=e.maxZoom,r=e.minZoom,i=e.zRange,a=e.extent,o=e.tileSize,s=void 0===o?512:o,u=Math.round(t.zoom+Math.log2(512/s));if(Number.isFinite(r)&&u<r){if(!a)return[];u=r}return Number.isFinite(n)&&u>n&&(u=n),t.isGeospatial?function(e,t,n){if(!(e instanceof Qt.a)){var r=e.getBounds(),i=Ut({width:100,height:100,bounds:[[r[0],r[1]],[r[2],r[3]]]}),a=i.longitude,o=i.latitude,s=i.zoom;e=new Qt.a({width:100,height:100,longitude:a,latitude:o,zoom:s,repeat:!0})}var u=Object.values(e.getFrustumPlanes()).map((function(e){var t=e.normal,n=e.distance;return new tt(t.clone().negate(),n)})),A=new st(u),c=e.distanceScales.unitsPerMeter[2],l=n&&n[0]*c||0,f=n&&n[1]*c||0,h=e.pitch<=60?t:0,g=new Kt(0,0,0),d={viewport:e,cullingVolume:A,elevationBounds:[l,f],minZ:h,maxZ:t,offset:0};if(g.update(d),e.subViewports&&e.subViewports.length>1){for(d.offset=-1;g.update(d)&&!(--d.offset<-3););for(d.offset=1;g.update(d)&&!(++d.offset>3););}return g.getSelected()}(t,u,i):rn(t,u,a||Wt)}var on=n(429);function sn(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return un(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return un(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function un(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var An=function(){function e(t){var n=this;Object(s.a)(this,e),this.opts=t,this._getTileData=t.getTileData,this.onTileError=t.onTileError,this.onTileLoad=function(e){t.onTileLoad(e),n.opts.maxCacheByteSize&&(n._cacheByteSize+=e.byteLength,n._resizeCache())},this.onTileUnload=t.onTileUnload,this._requestScheduler=new on.a({maxRequests:t.maxRequests,throttleRequests:t.maxRequests>0}),this._cache=new Map,this._tiles=[],this._dirty=!1,this._cacheByteSize=0,this._viewport=null,this._selectedTiles=null,this._frameNumber=0,this.setOptions(t)}return Object(h.a)(e,[{key:"setOptions",value:function(e){Object.assign(this.opts,e),Number.isFinite(e.maxZoom)&&(this._maxZoom=Math.floor(e.maxZoom)),Number.isFinite(e.minZoom)&&(this._minZoom=Math.ceil(e.minZoom))}},{key:"update",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.zRange;if(!e.equals(this._viewport)){this._viewport=e;var i=this.getTileIndices({viewport:e,maxZoom:this._maxZoom,minZoom:this._minZoom,zRange:r});this._selectedTiles=i.map((function(e){return t._getTile(e,!0)})),this._dirty&&this._rebuildTree()}var a=this.updateTileStates();return this._dirty&&this._resizeCache(),a&&this._frameNumber++,this._frameNumber}},{key:"getTileIndices",value:function(e){var t=e.viewport,n=e.maxZoom,r=e.minZoom,i=e.zRange,a=this.opts;return an({viewport:t,maxZoom:n,minZoom:r,zRange:i,tileSize:a.tileSize,extent:a.extent})}},{key:"getTileMetadata",value:function(e){var t=e.x,n=e.y,r=e.z;return{bbox:nn(this._viewport,t,n,r)}}},{key:"getParentIndex",value:function(e){return e.x=Math.floor(e.x/2),e.y=Math.floor(e.y/2),e.z-=1,e}},{key:"updateTileStates",value:function(){this._updateTileStates(this.selectedTiles);var e,t=this.opts.maxRequests,n=[],r=0,i=!1,a=sn(this._cache.values());try{for(a.s();!(e=a.n()).done;){var o=e.value,s=Boolean(1&o.state);o.isVisible!==s&&(i=!0,o.isVisible=s),o.isSelected=5===o.state,o.isLoading&&(r++,o.isSelected||n.push(o))}}catch(u){a.e(u)}finally{a.f()}if(t>0)for(;r>t&&n.length>0;){n.shift().abort(),r--}return i}},{key:"_rebuildTree",value:function(){var e,t=this._cache,n=sn(t.values());try{for(n.s();!(e=n.n()).done;){var r=e.value;r.parent=null,r.children.length=0}}catch(u){n.e(u)}finally{n.f()}var i,a=sn(t.values());try{for(a.s();!(i=a.n()).done;){var o=i.value,s=this._getNearestAncestor(o.x,o.y,o.z);o.parent=s,s&&s.children.push(o)}}catch(u){a.e(u)}finally{a.f()}}},{key:"_updateTileStates",value:function(e){var t,n=this._cache,r=this.opts.refinementStrategy||"best-available",i=sn(n.values());try{for(i.s();!(t=i.n()).done;){t.value.state=0}}catch(f){i.e(f)}finally{i.f()}var a,o=sn(e);try{for(o.s();!(a=o.n()).done;){a.value.state=5}}catch(f){o.e(f)}finally{o.f()}if("never"!==r){var s,u=sn(e);try{for(u.s();!(s=u.n()).done;){ln(s.value,r)}}catch(f){u.e(f)}finally{u.f()}var A,c=sn(e);try{for(c.s();!(A=c.n()).done;){var l=A.value;cn(l)&&fn(l)}}catch(f){c.e(f)}finally{c.f()}}}},{key:"_resizeCache",value:function(){var e=this._cache,t=this.opts,n=t.maxCacheSize||(t.maxCacheByteSize?1/0:5*this.selectedTiles.length),r=t.maxCacheByteSize||1/0;if(e.size>n||this._cacheByteSize>r){var i,a=sn(e);try{for(a.s();!(i=a.n()).done;){var o=Object(p.a)(i.value,2),s=o[0],u=o[1];if(u.isVisible||(this._cacheByteSize-=t.maxCacheByteSize?u.byteLength:0,e.delete(s),this.onTileUnload(u)),e.size<=n&&this._cacheByteSize<=r)break}}catch(A){a.e(A)}finally{a.f()}this._rebuildTree(),this._dirty=!0}this._dirty&&(this._tiles=Array.from(this._cache.values()).sort((function(e,t){return e.z-t.z})),this._dirty=!1)}},{key:"_getTile",value:function(e,t){var n=e.x,r=e.y,i=e.z,a="".concat(n,",").concat(r,",").concat(i),o=this._cache.get(a);return!o&&t?(o=new L({x:n,y:r,z:i,onTileLoad:this.onTileLoad,onTileError:this.onTileError}),Object.assign(o,this.getTileMetadata(o)),o.loadData(this._getTileData,this._requestScheduler),this._cache.set(a,o),this._dirty=!0):o&&o.isCancelled&&!o.isLoading&&o.loadData(this._getTileData,this._requestScheduler),o}},{key:"_getNearestAncestor",value:function(e,t,n){for(var r=this._minZoom,i=void 0===r?0:r,a={x:e,y:t,z:n};a.z>i;){a=this.getParentIndex(a);var o=this._getTile(a);if(o)return o}return null}},{key:"tiles",get:function(){return this._tiles}},{key:"selectedTiles",get:function(){return this._selectedTiles}},{key:"isLoaded",get:function(){return this._selectedTiles.every((function(e){return e.isLoaded}))}}]),e}();function cn(e){for(var t=e;t;){if(!1&t.state)return!0;if(t.isLoaded)return!1;t=t.parent}return!0}function ln(e,t){for(var n,r=3;n=e.parent;){if(e.isLoaded&&(r=4,"best-available"===t))return;n.state=Math.max(n.state,r),e=n}}function fn(e){var t,n=sn(e.children);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.state=Math.max(r.state,3),r.isLoaded||fn(r)}}catch(i){n.e(i)}finally{n.f()}}function hn(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}function gn(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}var dn={data:[],dataComparator:Vt.equals,renderSubLayers:{type:"function",value:function(e){return new R.a(e)},compare:!1},getTileData:{type:"function",optional:!0,value:null,compare:!1},onViewportLoad:{type:"function",optional:!0,value:null,compare:!1},onTileLoad:{type:"function",value:function(e){},compare:!1},onTileUnload:{type:"function",value:function(e){},compare:!1},onTileError:{type:"function",value:function(e){return console.error(e)},compare:!1},extent:{type:"array",optional:!0,value:null,compare:!0},tileSize:512,maxZoom:null,minZoom:0,maxCacheSize:null,maxCacheByteSize:null,refinementStrategy:"best-available",zRange:null,fetch:{type:"function",value:function(e,t){var n=t.layer,r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gn(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({signal:t.signal},n.getLoadOptions()||{});return Object(j.a)(e,r)},compare:!1},maxRequests:6},pn=function(e){Object(u.a)(n,e);var t=hn(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"initializeState",value:function(){this.state={tiles:[],isLoaded:!1}}},{key:"shouldUpdateState",value:function(e){return e.changeFlags.somethingChanged}},{key:"updateState",value:function(e){var t=e.props,n=(e.oldProps,e.context,e.changeFlags),r=this.state.tileset;if(!r||n.dataChanged||n.updateTriggersChanged&&(n.updateTriggersChanged.all||n.updateTriggersChanged.getTileData)){var i=t.maxZoom,a=t.minZoom,o=t.tileSize,s=t.maxCacheSize,u=t.maxCacheByteSize,A=t.refinementStrategy,c=t.extent,l=t.maxRequests;r=new An({getTileData:this.getTileData.bind(this),maxCacheSize:s,maxCacheByteSize:u,maxZoom:i,minZoom:a,tileSize:o,refinementStrategy:A,extent:c,onTileLoad:this._onTileLoad.bind(this),onTileError:this._onTileError.bind(this),onTileUnload:this._onTileUnload.bind(this),maxRequests:l}),this.setState({tileset:r})}else(n.propsChanged||n.updateTriggersChanged)&&(r.setOptions(t),this.state.tileset.tiles.forEach((function(e){e.layers=null})));this._updateTileset()}},{key:"_updateTileset",value:function(){var e=this.state.tileset,t=this.props,n=t.onViewportLoad,r=t.zRange,i=e.update(this.context.viewport,{zRange:r}),a=e.isLoaded,o=this.state.isLoaded!==a,s=this.state.frameNumber!==i;a&&n&&(o||s)&&n(e.selectedTiles.map((function(e){return e.data}))),s&&this.setState({frameNumber:i}),this.state.isLoaded=a}},{key:"_onTileLoad",value:function(e){this.getCurrentLayer().props.onTileLoad(e),e.isVisible&&this.setNeedsUpdate()}},{key:"_onTileError",value:function(e,t){var n=this.getCurrentLayer();n.props.onTileError(e),n._updateTileset(),t.isVisible&&this.setNeedsUpdate()}},{key:"_onTileUnload",value:function(e){this.getCurrentLayer().props.onTileUnload(e)}},{key:"getTileData",value:function(e){var t=this.props.data,n=this.getCurrentLayer().props,r=n.getTileData,i=n.fetch,a=e.signal;return e.url=Xt(t,e),r?r(e):e.url?i(e.url,{layer:this,signal:a}):null}},{key:"renderSubLayers",value:function(e){return this.props.renderSubLayers(e)}},{key:"getHighlightedObjectIndex",value:function(){return-1}},{key:"getPickingInfo",value:function(e){var t=e.info,n=e.sourceLayer;return t.sourceLayer=n,t.tile=n.props.tile,t}},{key:"renderLayers",value:function(){var e=this,t=this.props.visible;return this.state.tileset.tiles.map((function(n){var r=t&&n.isVisible,i=e.getHighlightedObjectIndex(n);if(n.isLoaded)if(n.layers)!n.layers[0]||n.layers[0].props.visible===r&&n.layers[0].props.highlightedObjectIndex===i||(n.layers=n.layers.map((function(e){return e.clone({visible:r,highlightedObjectIndex:i})})));else{var a=e.renderSubLayers(Object.assign({},e.props,{id:"".concat(e.id,"-").concat(n.x,"-").concat(n.y,"-").concat(n.z),data:n.data,visible:r,_offset:0,tile:n,highlightedObjectIndex:i}));n.layers=Object(D.b)(a,Boolean)}else;return n.layers}))}},{key:"isLoaded",get:function(){return this.state.tileset.selectedTiles.every((function(e){return e.layers&&e.layers.every((function(e){return e.isLoaded}))}))}}]),n}(g.a);pn.layerName="TileLayer",pn.defaultProps=dn;var vn=n(29);function yn(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var mn=function(e){Object(u.a)(n,e);var t=yn(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"getShaders",value:function(){var e=Object(vn.a)(Object(c.a)(n.prototype),"getShaders",this).call(this);return e.inject={"vs:#decl":"uniform float trailLength;\nattribute float instanceTimestamps;\nattribute float instanceNextTimestamps;\nvarying float vTime;\n","vs:#main-end":"vTime = instanceTimestamps + (instanceNextTimestamps - instanceTimestamps) * vPathPosition.y / vPathLength;\n","fs:#decl":"uniform float trailLength;\nuniform float currentTime;\nvarying float vTime;\n","fs:#main-start":"if(vTime > currentTime || vTime < currentTime - trailLength) {\n  discard;\n}\n","fs:DECKGL_FILTER_COLOR":"color.a *= 1.0 - (currentTime - vTime) / trailLength;"},e}},{key:"initializeState",value:function(e){Object(vn.a)(Object(c.a)(n.prototype),"initializeState",this).call(this,e),this.getAttributeManager().addInstanced({timestamps:{size:1,accessor:"getTimestamps",shaderAttributes:{instanceTimestamps:{vertexOffset:0},instanceNextTimestamps:{vertexOffset:1}}}})}},{key:"draw",value:function(e){var t=this.props,r=t.trailLength,i=t.currentTime;e.uniforms=Object.assign({},e.uniforms,{trailLength:r,currentTime:i}),Object(vn.a)(Object(c.a)(n.prototype),"draw",this).call(this,e)}}]),n}(n(186).a);mn.layerName="TripsLayer",mn.defaultProps={trailLength:{type:"number",value:120,min:0},currentTime:{type:"number",value:0,min:0},getTimestamps:{type:"accessor",value:null}};var In=n(106),bn=n(101);function En(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return Cn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cn(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bn(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var wn=Object.assign({getHexagons:{type:"accessor",value:function(e){return e.hexagons}}},d.a.defaultProps),Qn=function(e){Object(u.a)(n,e);var t=Bn(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"updateState",value:function(e){var t=e.props,n=(e.oldProps,e.changeFlags);if(n.dataChanged||n.updateTriggers&&n.updateTriggers.getHexagons){var r,i=t.data,a=t.getHexagons,o=[],s=Object(bn.a)(i),u=s.iterable,A=s.objectInfo,c=En(u);try{for(c.s();!(r=c.n()).done;){var l=r.value;A.index++;var f,h=a(l,A),g=En(Object(In.h3SetToMultiPolygon)(h,!0));try{for(g.s();!(f=g.n()).done;){var d=f.value;o.push(this.getSubLayerRow({polygon:d},l,A.index))}}catch(p){g.e(p)}finally{g.f()}}}catch(p){c.e(p)}finally{c.f()}this.setState({polygons:o})}}},{key:"renderLayers",value:function(){var e=this.props,t=e.elevationScale,n=e.extruded,r=e.wireframe,i=e.filled,a=e.stroked,o=e.lineWidthScale,s=e.lineWidthMinPixels,u=e.lineWidthMaxPixels,A=e.lineJointRounded,c=e.lineMiterLimit,l=e.lineDashJustified,f=e.material,h=e.getFillColor,g=e.getLineColor,p=e.getLineWidth,v=e.getLineDashArray,y=e.getElevation,m=e.updateTriggers;return new(this.getSubLayerClass("cluster-region",d.a))({filled:i,wireframe:r,extruded:n,elevationScale:t,stroked:a,lineWidthScale:o,lineWidthMinPixels:s,lineWidthMaxPixels:u,lineJointRounded:A,lineMiterLimit:c,lineDashJustified:l,material:f,getFillColor:this.getSubLayerAccessor(h),getLineColor:this.getSubLayerAccessor(g),getLineWidth:this.getSubLayerAccessor(p),getLineDashArray:this.getSubLayerAccessor(v),getElevation:this.getSubLayerAccessor(y)},this.getSubLayerProps({id:"cluster-region",updateTriggers:m}),{data:this.state.polygons,getPolygon:function(e){return e.polygon}})}}]),n}(g.a);Qn.defaultProps=wn,Qn.layerName="H3ClusterLayer";var kn=n(430),_n=n(295);function xn(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}function Sn(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return On(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return On(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function On(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dn(e,t){t=void 0===t?e[0][0]:t;var n,r=Sn(e);try{for(r.s();!(n=r.n()).done;){var i=n.value,a=i[0]-t;a>180?i[0]-=360:a<-180&&(i[0]+=360)}}catch(o){r.e(o)}finally{r.f()}}function Rn(e,t,n){var r=Object(In.h3ToGeo)(e),i=Object(p.a)(r,2),a=i[0],o=i[1],s=t.length;Dn(t,o);for(var u=t[0]===t[s-1]?s-1:s,A=0;A<u;A++)t[A][0]=Object(kn.c)(o,t[A][0],n),t[A][1]=Object(kn.c)(a,t[A][1],n)}function jn(e,t,n){var r=e(t,n),i=Object(In.h3ToGeo)(r),a=Object(p.a)(i,2),o=a[0];return[a[1],o]}function Mn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0,r=Object(In.h3ToGeoBoundary)(e,!0);if(1!==t?Rn(e,r,t):Dn(r),n){var i,a=new Float64Array(2*r.length),o=0,s=Sn(r);try{for(s.s();!(i=s.n()).done;){var u=i.value;a[o++]=u[0],a[o++]=u[1]}}catch(A){s.e(A)}finally{s.f()}return a}return r}var Nn=Object.assign({},d.a.defaultProps,{highPrecision:!1,coverage:{type:"number",min:0,max:1,value:1},centerHexagon:null,getHexagon:{type:"accessor",value:function(e){return e.hexagon}},extruded:!0});delete Nn.getLineDashArray;var Fn=function(e){Object(u.a)(n,e);var t=xn(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"shouldUpdateState",value:function(e){var t=e.changeFlags;return this._shouldUseHighPrecision()?t.propsOrDataChanged:t.somethingChanged}},{key:"updateState",value:function(e){var t=e.props,n=(e.oldProps,e.changeFlags);if(n.dataChanged||n.updateTriggers&&n.updateTriggers.getHexagon){var r,i=-1,a=!1,o=!1,s=Object(bn.a)(t.data),u=s.iterable,A=s.objectInfo,c=Sn(u);try{for(c.s();!(r=c.n()).done;){var l=r.value;A.index++;var f=t.getHexagon(l,A),h=Object(In.h3GetResolution)(f);if(i<0)i=h;else if(i!==h){o=!0;break}if(Object(In.h3IsPentagon)(f)){a=!0;break}}}catch(g){c.e(g)}finally{c.f()}this.setState({resolution:i,edgeLengthKM:i>=0?Object(In.edgeLength)(i,In.UNITS.km):0,hasMultipleRes:o,hasPentagon:a})}this._updateVertices(this.context.viewport)}},{key:"_shouldUseHighPrecision",value:function(){var e=this.state,t=e.resolution,n=e.hasPentagon,r=e.hasMultipleRes;return this.props.highPrecision||r||n||t>=0&&t<=5}},{key:"_updateVertices",value:function(e){if(!this._shouldUseHighPrecision()){var t=this.state,n=t.resolution,r=t.edgeLengthKM,i=t.centerHex;if(!(n<0)){var a=this.props.centerHexagon||Object(In.geoToH3)(e.latitude,e.longitude,n);if(i!==a){if(i){var o=Object(In.h3Distance)(i,a);if(o>=0&&o*r<10)return}var s=e.distanceScales.unitsPerMeter,u=Mn(a),A=Object(In.h3ToGeo)(a),c=Object(p.a)(A,2),l=c[0],f=c[1],h=e.projectFlat([f,l]),g=Object(p.a)(h,2),d=g[0],v=g[1];u=u.map((function(t){var n=e.projectFlat(t);return n[0]=(n[0]-d)/s[0],n[1]=(n[1]-v)/s[1],n})),this.setState({centerHex:a,vertices:u})}}}}},{key:"renderLayers",value:function(){return this._shouldUseHighPrecision()?this._renderPolygonLayer():this._renderColumnLayer()}},{key:"_getForwardProps",value:function(){var e=this.props,t=e.elevationScale,n=e.material,r=e.coverage,i=e.extruded,a=e.wireframe,o=e.stroked,s=e.filled,u=e.lineWidthUnits,A=e.lineWidthScale,c=e.lineWidthMinPixels,l=e.lineWidthMaxPixels,f=e.getFillColor,h=e.getElevation,g=e.getLineColor,d=e.getLineWidth,p=e.updateTriggers;return{elevationScale:t,extruded:i,coverage:r,wireframe:a,stroked:o,filled:s,lineWidthUnits:u,lineWidthScale:A,lineWidthMinPixels:c,lineWidthMaxPixels:l,material:n,getElevation:h,getFillColor:f,getLineColor:g,getLineWidth:d,updateTriggers:{getFillColor:p.getFillColor,getElevation:p.getElevation,getLineColor:p.getLineColor,getLineWidth:p.getLineWidth}}}},{key:"_renderPolygonLayer",value:function(){var e=this.props,t=e.data,n=e.getHexagon,r=e.updateTriggers,i=e.coverage,a=this.getSubLayerClass("hexagon-cell-hifi",d.a),o=this._getForwardProps();return o.updateTriggers.getPolygon=function(e,t){return void 0===e||null===e?t:"object"===Object(G.a)(e)?Object.assign({},e,{coverage:t}):{getHexagon:e,coverage:t}}(r.getHexagon,i),new a(o,this.getSubLayerProps({id:"hexagon-cell-hifi",updateTriggers:o.updateTriggers}),{data:t,_normalize:!1,positionFormat:"XY",getPolygon:function(e,t){return Mn(n(e,t),i,!0)}})}},{key:"_renderColumnLayer",value:function(){var e=this.props,t=e.data,n=e.getHexagon,r=e.updateTriggers,i=this.getSubLayerClass("hexagon-cell",_n.a),a=this._getForwardProps();return a.updateTriggers.getPosition=r.getHexagon,new i(a,this.getSubLayerProps({id:"hexagon-cell",updateTriggers:a.updateTriggers}),{data:t,diskResolution:6,radius:1,vertices:this.state.vertices,getPosition:jn.bind(null,n)})}}]),n}(g.a);Fn.defaultProps=Nn,Fn.layerName="H3HexagonLayer";var Tn=n(121),Ln=n(39),Pn=n(449),Un=n(738),Gn=n(739);function qn(e,t){if(!e)throw new Error("math.gl assertion ".concat(t))}var Hn=1/Math.PI*180,Yn=1/180*Math.PI,Jn={};function zn(e){return Math.round(e/Jn.EPSILON)*Jn.EPSILON}function Kn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.precision,r=void 0===n?Jn.precision||4:n;return e=zn(e),"".concat(parseFloat(e.toPrecision(r)))}function Wn(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Vn(e,t,n){if(Wn(e)){n=n||((i=e).clone?i.clone():new Array(i.length));for(var r=0;r<n.length&&r<e.length;++r)n[r]=t(e[r],r,n);return n}var i;return t(e)}function Xn(e){return function(e,t){return Vn(e,(function(e){return e*Yn}),t)}(e)}function Zn(e,t){return Vn(e,(function(e){return e*Hn}),t)}function $n(e,t,n){var r=Jn.EPSILON;n&&(Jn.EPSILON=n);try{if(e===t)return!0;if(Wn(e)&&Wn(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;++i)if(!$n(e[i],t[i]))return!1;return!0}return e&&e.equals?e.equals(t):t&&t.equals?t.equals(e):!(!Number.isFinite(e)||!Number.isFinite(t))&&Math.abs(e-t)<=Jn.EPSILON*Math.max(1,Math.abs(e),Math.abs(t))}finally{Jn.EPSILON=r}}function er(e,t){if(e.length!==t)return!1;for(var n=0;n<e.length;++n)if(!Number.isFinite(e[n]))return!1;return!0}function tr(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}function nr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(Jn.debug&&!er(e,t))throw new Error("math.gl: ".concat(n," some fields set to invalid numbers'"));return e}Jn.EPSILON=1e-12,Jn.debug=!1,Jn.precision=4,Jn.printTypes=!1,Jn.printDegrees=!1,Jn.printRowMajor=!0;var rr={};function ir(e,t){rr[e]||(rr[e]=!0,console.warn("".concat(e," has been removed in version ").concat(t,", see upgrade guide for more information")))}function ar(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var or=function(e){Object(u.a)(n,e);var t=ar(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}},{key:"fromArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)this[n]=e[n+t];return this.check()}},{key:"to",value:function(e){return e===this?this:Wn(e)?this.toArray(e):this.toObject(e)}},{key:"toTarget",value:function(e){return e?this.to(e):this}},{key:"toArray",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)e[t+n]=this[n];return e}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(Jn)}},{key:"formatString",value:function(e){for(var t="",n=0;n<this.ELEMENTS;++n)t+=(n>0?", ":"")+Kn(this[n],e);return"".concat(e.printTypes?this.constructor.name:"","[").concat(t,"]")}},{key:"equals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(!$n(this[t],e[t]))return!1;return!0}},{key:"exactEquals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(this[t]!==e[t])return!1;return!0}},{key:"negate",value:function(){for(var e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}},{key:"lerp",value:function(e,t,n){void 0===n&&(n=t,t=e,e=this);for(var r=0;r<this.ELEMENTS;++r){var i=e[r];this[r]=i+n*(t[r]-i)}return this.check()}},{key:"min",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}},{key:"max",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}},{key:"clamp",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e[n]),t[n]);return this.check()}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]+=a[o];return this.check()}},{key:"subtract",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]-=a[o];return this.check()}},{key:"scale",value:function(e){if(Array.isArray(e))return this.multiply(e);for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"sub",value:function(e){return this.subtract(e)}},{key:"setScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}},{key:"addScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}},{key:"subScalar",value:function(e){return this.addScalar(-e)}},{key:"multiplyScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"divideScalar",value:function(e){return this.scale(1/e)}},{key:"clampScalar",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e),t);return this.check()}},{key:"multiplyByScalar",value:function(e){return this.scale(e)}},{key:"check",value:function(){if(Jn.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}},{key:"validate",value:function(){for(var e=this.length===this.ELEMENTS,t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}},{key:"ELEMENTS",get:function(){return qn(!1),0}},{key:"RANK",get:function(){return qn(!1),0}},{key:"elements",get:function(){return this}}]),n}(Object(U.a)(Array));function sr(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var ur=function(e){Object(u.a)(n,e);var t=sr(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"toString",value:function(){var e="[";if(Jn.printRowMajor){e+="row-major:";for(var t=0;t<this.RANK;++t)for(var n=0;n<this.RANK;++n)e+=" ".concat(this[n*this.RANK+t])}else{e+="column-major:";for(var r=0;r<this.ELEMENTS;++r)e+=" ".concat(this[r])}return e+="]"}},{key:"getElementIndex",value:function(e,t){return t*this.RANK+e}},{key:"getElement",value:function(e,t){return this[t*this.RANK+e]}},{key:"setElement",value:function(e,t,n){return this[t*this.RANK+e]=tr(n),this}},{key:"getColumn",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),n=e*this.RANK,r=0;r<this.RANK;++r)t[r]=this[n+r];return t}},{key:"setColumn",value:function(e,t){for(var n=e*this.RANK,r=0;r<this.RANK;++r)this[n+r]=t[r];return this}}]),n}(or);function Ar(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[3]*r+n[7]*i+n[11]*a||1;return e[0]=(n[0]*r+n[4]*i+n[8]*a)/o,e[1]=(n[1]*r+n[5]*i+n[9]*a)/o,e[2]=(n[2]*r+n[6]*i+n[10]*a)/o,e}function cr(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var lr=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),fr=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),hr=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),gr={},dr=function(e){Object(u.a)(n,e);var t=cr(n);function n(e){var r;return Object(s.a)(this,n),r=t.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(e)?r.copy(e):r.identity(),r}return Object(h.a)(n,[{key:"INDICES",get:function(){return hr}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}}],[{key:"IDENTITY",get:function(){return gr.IDENTITY=gr.IDENTITY||Object.freeze(new n(lr)),gr.IDENTITY}},{key:"ZERO",get:function(){return gr.ZERO=gr.ZERO||Object.freeze(new n(fr)),gr.ZERO}}]),Object(h.a)(n,[{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this[9]=e[9],this[10]=e[10],this[11]=e[11],this[12]=e[12],this[13]=e[13],this[14]=e[14],this[15]=e[15],this.check()}},{key:"set",value:function(e,t,n,r,i,a,o,s,u,A,c,l,f,h,g,d){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this[4]=i,this[5]=a,this[6]=o,this[7]=s,this[8]=u,this[9]=A,this[10]=c,this[11]=l,this[12]=f,this[13]=h,this[14]=g,this[15]=d,this.check()}},{key:"setRowMajor",value:function(e,t,n,r,i,a,o,s,u,A,c,l,f,h,g,d){return this[0]=e,this[1]=i,this[2]=u,this[3]=f,this[4]=t,this[5]=a,this[6]=A,this[7]=h,this[8]=n,this[9]=o,this[10]=c,this[11]=g,this[12]=r,this[13]=s,this[14]=l,this[15]=d,this.check()}},{key:"toRowMajor",value:function(e){return e[0]=this[0],e[1]=this[4],e[2]=this[8],e[3]=this[12],e[4]=this[1],e[5]=this[5],e[6]=this[9],e[7]=this[13],e[8]=this[2],e[9]=this[6],e[10]=this[10],e[11]=this[14],e[12]=this[3],e[13]=this[7],e[14]=this[11],e[15]=this[15],e}},{key:"identity",value:function(){return this.copy(lr)}},{key:"fromQuaternion",value:function(e){return ge.c(this,e),this.check()}},{key:"frustum",value:function(e){var t=e.left,r=e.right,i=e.bottom,a=e.top,o=e.near,s=e.far;return s===1/0?n._computeInfinitePerspectiveOffCenter(this,t,r,i,a,o):ge.d(this,t,r,i,a,o,s),this.check()}},{key:"lookAt",value:function(e,t,n){if(1===arguments.length){var r=e;e=r.eye,t=r.center,n=r.up}return t=t||[0,0,0],n=n||[0,1,0],ge.g(this,e,t,n),this.check()}},{key:"ortho",value:function(e){var t=e.left,n=e.right,r=e.bottom,i=e.top,a=e.near,o=void 0===a?.1:a,s=e.far,u=void 0===s?500:s;return ge.i(this,t,n,r,i,o,u),this.check()}},{key:"orthographic",value:function(e){var t=e.fovy,r=void 0===t?45*Math.PI/180:t,i=e.aspect,a=void 0===i?1:i,o=e.focalDistance,s=void 0===o?1:o,u=e.near,A=void 0===u?.1:u,c=e.far,l=void 0===c?500:c;if(r>2*Math.PI)throw Error("radians");var f=r/2,h=s*Math.tan(f),g=h*a;return(new n).ortho({left:-g,right:g,bottom:-h,top:h,near:A,far:l})}},{key:"perspective",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fovy,n=void 0===t?void 0:t,r=e.fov,i=void 0===r?45*Math.PI/180:r,a=e.aspect,o=void 0===a?1:a,s=e.near,u=void 0===s?.1:s,A=e.far,c=void 0===A?500:A;if((n=n||i)>2*Math.PI)throw Error("radians");return ge.j(this,n,o,u,c),this.check()}},{key:"determinant",value:function(){return ge.a(this)}},{key:"getScale",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),e[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),e[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),e}},{key:"getTranslation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=this[12],e[1]=this[13],e[2]=this[14],e}},{key:"getRotation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(t||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=0,e[4]=this[4]*r,e[5]=this[5]*i,e[6]=this[6]*a,e[7]=0,e[8]=this[8]*r,e[9]=this[9]*i,e[10]=this[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{key:"getRotationMatrix3",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(t||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=this[4]*r,e[4]=this[5]*i,e[5]=this[6]*a,e[6]=this[8]*r,e[7]=this[9]*i,e[8]=this[10]*a,e}},{key:"transpose",value:function(){return ge.q(this,this),this.check()}},{key:"invert",value:function(){return ge.f(this,this),this.check()}},{key:"multiplyLeft",value:function(e){return ge.h(this,e,this),this.check()}},{key:"multiplyRight",value:function(e){return ge.h(this,this,e),this.check()}},{key:"rotateX",value:function(e){return ge.l(this,this,e),this.check()}},{key:"rotateY",value:function(e){return ge.m(this,this,e),this.check()}},{key:"rotateZ",value:function(e){return ge.n(this,this,e),this.check()}},{key:"rotateXYZ",value:function(e){var t=Object(p.a)(e,3),n=t[0],r=t[1],i=t[2];return this.rotateX(n).rotateY(r).rotateZ(i)}},{key:"rotateAxis",value:function(e,t){return ge.k(this,this,e,t),this.check()}},{key:"scale",value:function(e){return Array.isArray(e)?ge.o(this,this,e):ge.o(this,this,[e,e,e]),this.check()}},{key:"translate",value:function(e){return ge.p(this,this,e),this.check()}},{key:"transform",value:function(e,t){return 4===e.length?(nr(t=xe.n(t||[-0,-0,-0,-0],e,this),4),t):this.transformAsPoint(e,t)}},{key:"transformAsPoint",value:function(e,t){switch(e.length){case 2:t=be.j(t||[-0,-0],e,this);break;case 3:t=ae.q(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return nr(t,e.length),t}},{key:"transformAsVector",value:function(e,t){switch(e.length){case 2:t=function(e,t,n){var r=t[0],i=t[1],a=n[3]*r+n[7]*i||1;return e[0]=(n[0]*r+n[4]*i)/a,e[1]=(n[1]*r+n[5]*i)/a,e}(t||[-0,-0],e,this);break;case 3:t=Ar(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return nr(t,e.length),t}},{key:"makeRotationX",value:function(e){return this.identity().rotateX(e)}},{key:"makeTranslation",value:function(e,t,n){return this.identity().translate([e,t,n])}},{key:"transformPoint",value:function(e,t){return ir("Matrix4.transformPoint","3.0"),this.transformAsPoint(e,t)}},{key:"transformVector",value:function(e,t){return ir("Matrix4.transformVector","3.0"),this.transformAsPoint(e,t)}},{key:"transformDirection",value:function(e,t){return ir("Matrix4.transformDirection","3.0"),this.transformAsVector(e,t)}}],[{key:"_computeInfinitePerspectiveOffCenter",value:function(e,t,n,r,i,a){var o=2*a/(n-t),s=2*a/(i-r),u=(n+t)/(n-t),A=(i+r)/(i-r),c=-2*a;return e[0]=o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=u,e[9]=A,e[10]=-1,e[11]=-1,e[12]=0,e[13]=0,e[14]=c,e[15]=0,e}}]),n}(ur);function pr(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var vr=function(e){Object(u.a)(n,e);var t=pr(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"copy",value:function(e){return qn(!1),this}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var e=0,t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(e){return Math.sqrt(this.distanceSquared(e))}},{key:"distanceSquared",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n){var r=this[n]-e[n];t+=r*r}return tr(t)}},{key:"dot",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n)t+=this[n]*e[n];return tr(t)}},{key:"normalize",value:function(){var e=this.magnitude();if(0!==e)for(var t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}},{key:"multiply",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]*=a[o];return this.check()}},{key:"divide",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]/=a[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(e){return this.distance(e)}},{key:"distanceToSquared",value:function(e){return this.distanceSquared(e)}},{key:"getComponent",value:function(e){return qn(e>=0&&e<this.ELEMENTS,"index is out of range"),tr(this[e])}},{key:"setComponent",value:function(e,t){return qn(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=t,this.check()}},{key:"addVectors",value:function(e,t){return this.copy(e).add(t)}},{key:"subVectors",value:function(e,t){return this.copy(e).subtract(t)}},{key:"multiplyVectors",value:function(e,t){return this.copy(e).multiply(t)}},{key:"addScaledVector",value:function(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}},{key:"x",get:function(){return this[0]},set:function(e){this[0]=tr(e)}},{key:"y",get:function(){return this[1]},set:function(e){this[1]=tr(e)}}]),n}(or);function yr(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var mr=[0,0,0],Ir={},br=function(e){Object(u.a)(n,e);var t=yr(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object(s.a)(this,n),e=t.call(this,-0,-0,-0),1===arguments.length&&Wn(r)?e.copy(r):(Jn.debug&&(tr(r),tr(i),tr(a)),e[0]=r,e[1]=i,e[2]=a),e}return Object(h.a)(n,null,[{key:"ZERO",get:function(){return Ir.ZERO=Ir.ZERO||Object.freeze(new n(0,0,0,0))}}]),Object(h.a)(n,[{key:"set",value:function(e,t,n){return this[0]=e,this[1]=t,this[2]=n,this.check()}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}},{key:"fromObject",value:function(e){return Jn.debug&&(tr(e.x),tr(e.y),tr(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}},{key:"toObject",value:function(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}},{key:"angle",value:function(e){return ae.a(this,e)}},{key:"cross",value:function(e){return ae.c(this,this,e),this.check()}},{key:"rotateX",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?mr:n;return ae.k(this,this,r,t),this.check()}},{key:"rotateY",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?mr:n;return ae.l(this,this,r,t),this.check()}},{key:"rotateZ",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?mr:n;return ae.m(this,this,r,t),this.check()}},{key:"transform",value:function(e){return this.transformAsPoint(e)}},{key:"transformAsPoint",value:function(e){return ae.q(this,this,e),this.check()}},{key:"transformAsVector",value:function(e){return Ar(this,this,e),this.check()}},{key:"transformByMatrix3",value:function(e){return ae.p(this,this,e),this.check()}},{key:"transformByMatrix2",value:function(e){return function(e,t,n){var r=t[0],i=t[1];e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2]}(this,this,e),this.check()}},{key:"transformByQuaternion",value:function(e){return ae.r(this,this,e),this.check()}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(e){this[2]=tr(e)}}]),n}(vr);function Er(e,t){if(!e)throw new Error("math.gl assertion ".concat(t))}var Cr=1/Math.PI*180,Br=1/180*Math.PI,wr={};function Qr(e){return Math.round(e/wr.EPSILON)*wr.EPSILON}function kr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.precision,r=void 0===n?wr.precision||4:n;return e=Qr(e),"".concat(parseFloat(e.toPrecision(r)))}function _r(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function xr(e,t,n){if(_r(e)){n=n||((i=e).clone?i.clone():new Array(i.length));for(var r=0;r<n.length&&r<e.length;++r)n[r]=t(e[r],r,n);return n}var i;return t(e)}function Sr(e){return function(e,t){return xr(e,(function(e){return e*Br}),t)}(e)}function Or(e){return function(e,t){return xr(e,(function(e){return e*Cr}),t)}(e)}function Dr(e,t,n){var r=wr.EPSILON;n&&(wr.EPSILON=n);try{if(e===t)return!0;if(_r(e)&&_r(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;++i)if(!Dr(e[i],t[i]))return!1;return!0}return e&&e.equals?e.equals(t):t&&t.equals?t.equals(e):!(!Number.isFinite(e)||!Number.isFinite(t))&&Math.abs(e-t)<=wr.EPSILON*Math.max(1,Math.abs(e),Math.abs(t))}finally{wr.EPSILON=r}}function Rr(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}wr.EPSILON=1e-12,wr.debug=!1,wr.precision=4,wr.printTypes=!1,wr.printDegrees=!1,wr.printRowMajor=!0;var jr=function(e){Object(u.a)(n,e);var t=Rr(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}},{key:"fromArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)this[n]=e[n+t];return this.check()}},{key:"to",value:function(e){return e===this?this:_r(e)?this.toArray(e):this.toObject(e)}},{key:"toTarget",value:function(e){return e?this.to(e):this}},{key:"toArray",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)e[t+n]=this[n];return e}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(wr)}},{key:"formatString",value:function(e){for(var t="",n=0;n<this.ELEMENTS;++n)t+=(n>0?", ":"")+kr(this[n],e);return"".concat(e.printTypes?this.constructor.name:"","[").concat(t,"]")}},{key:"equals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(!Dr(this[t],e[t]))return!1;return!0}},{key:"exactEquals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(this[t]!==e[t])return!1;return!0}},{key:"negate",value:function(){for(var e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}},{key:"lerp",value:function(e,t,n){void 0===n&&(n=t,t=e,e=this);for(var r=0;r<this.ELEMENTS;++r){var i=e[r];this[r]=i+n*(t[r]-i)}return this.check()}},{key:"min",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}},{key:"max",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}},{key:"clamp",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e[n]),t[n]);return this.check()}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]+=a[o];return this.check()}},{key:"subtract",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]-=a[o];return this.check()}},{key:"scale",value:function(e){if(Array.isArray(e))return this.multiply(e);for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"sub",value:function(e){return this.subtract(e)}},{key:"setScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}},{key:"addScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}},{key:"subScalar",value:function(e){return this.addScalar(-e)}},{key:"multiplyScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"divideScalar",value:function(e){return this.scale(1/e)}},{key:"clampScalar",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e),t);return this.check()}},{key:"multiplyByScalar",value:function(e){return this.scale(e)}},{key:"check",value:function(){if(wr.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}},{key:"validate",value:function(){for(var e=this.length===this.ELEMENTS,t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}},{key:"ELEMENTS",get:function(){return Er(!1),0}},{key:"RANK",get:function(){return Er(!1),0}},{key:"elements",get:function(){return this}}]),n}(Object(U.a)(Array));function Mr(e,t){if(e.length!==t)return!1;for(var n=0;n<e.length;++n)if(!Number.isFinite(e[n]))return!1;return!0}function Nr(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}function Fr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(wr.debug&&!Mr(e,t))throw new Error("math.gl: ".concat(n," some fields set to invalid numbers'"));return e}var Tr={};function Lr(e,t){Tr[e]||(Tr[e]=!0,console.warn("".concat(e," has been removed in version ").concat(t,", see upgrade guide for more information")))}function Pr(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var Ur=function(e){Object(u.a)(n,e);var t=Pr(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"copy",value:function(e){return Er(!1),this}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var e=0,t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(e){return Math.sqrt(this.distanceSquared(e))}},{key:"distanceSquared",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n){var r=this[n]-e[n];t+=r*r}return Nr(t)}},{key:"dot",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n)t+=this[n]*e[n];return Nr(t)}},{key:"normalize",value:function(){var e=this.magnitude();if(0!==e)for(var t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}},{key:"multiply",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]*=a[o];return this.check()}},{key:"divide",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]/=a[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(e){return this.distance(e)}},{key:"distanceToSquared",value:function(e){return this.distanceSquared(e)}},{key:"getComponent",value:function(e){return Er(e>=0&&e<this.ELEMENTS,"index is out of range"),Nr(this[e])}},{key:"setComponent",value:function(e,t){return Er(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=t,this.check()}},{key:"addVectors",value:function(e,t){return this.copy(e).add(t)}},{key:"subVectors",value:function(e,t){return this.copy(e).subtract(t)}},{key:"multiplyVectors",value:function(e,t){return this.copy(e).multiply(t)}},{key:"addScaledVector",value:function(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}},{key:"x",get:function(){return this[0]},set:function(e){this[0]=Nr(e)}},{key:"y",get:function(){return this[1]},set:function(e){this[1]=Nr(e)}}]),n}(jr);function Gr(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[3]*r+n[7]*i+n[11]*a||1;return e[0]=(n[0]*r+n[4]*i+n[8]*a)/o,e[1]=(n[1]*r+n[5]*i+n[9]*a)/o,e[2]=(n[2]*r+n[6]*i+n[10]*a)/o,e}function qr(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var Hr=[0,0,0],Yr={},Jr=function(e){Object(u.a)(n,e);var t=qr(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object(s.a)(this,n),e=t.call(this,-0,-0,-0),1===arguments.length&&_r(r)?e.copy(r):(wr.debug&&(Nr(r),Nr(i),Nr(a)),e[0]=r,e[1]=i,e[2]=a),e}return Object(h.a)(n,null,[{key:"ZERO",get:function(){return Yr.ZERO=Yr.ZERO||Object.freeze(new n(0,0,0,0))}}]),Object(h.a)(n,[{key:"set",value:function(e,t,n){return this[0]=e,this[1]=t,this[2]=n,this.check()}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}},{key:"fromObject",value:function(e){return wr.debug&&(Nr(e.x),Nr(e.y),Nr(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}},{key:"toObject",value:function(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}},{key:"angle",value:function(e){return ae.a(this,e)}},{key:"cross",value:function(e){return ae.c(this,this,e),this.check()}},{key:"rotateX",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?Hr:n;return ae.k(this,this,r,t),this.check()}},{key:"rotateY",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?Hr:n;return ae.l(this,this,r,t),this.check()}},{key:"rotateZ",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?Hr:n;return ae.m(this,this,r,t),this.check()}},{key:"transform",value:function(e){return this.transformAsPoint(e)}},{key:"transformAsPoint",value:function(e){return ae.q(this,this,e),this.check()}},{key:"transformAsVector",value:function(e){return Gr(this,this,e),this.check()}},{key:"transformByMatrix3",value:function(e){return ae.p(this,this,e),this.check()}},{key:"transformByMatrix2",value:function(e){return function(e,t,n){var r=t[0],i=t[1];e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2]}(this,this,e),this.check()}},{key:"transformByQuaternion",value:function(e){return ae.r(this,this,e),this.check()}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(e){this[2]=Nr(e)}}]),n}(Ur),zr=.1,Kr=1e-12,Wr=1e-15;Math.PI,Math.PI,Math.PI,Math.PI;function Vr(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var Xr=function(e){Object(u.a)(n,e);var t=Vr(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"toString",value:function(){var e="[";if(wr.printRowMajor){e+="row-major:";for(var t=0;t<this.RANK;++t)for(var n=0;n<this.RANK;++n)e+=" ".concat(this[n*this.RANK+t])}else{e+="column-major:";for(var r=0;r<this.ELEMENTS;++r)e+=" ".concat(this[r])}return e+="]"}},{key:"getElementIndex",value:function(e,t){return t*this.RANK+e}},{key:"getElement",value:function(e,t){return this[t*this.RANK+e]}},{key:"setElement",value:function(e,t,n){return this[t*this.RANK+e]=Nr(n),this}},{key:"getColumn",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),n=e*this.RANK,r=0;r<this.RANK;++r)t[r]=this[n+r];return t}},{key:"setColumn",value:function(e,t){for(var n=e*this.RANK,r=0;r<this.RANK;++r)this[n+r]=t[r];return this}}]),n}(jr);function Zr(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var $r=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),ei=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),ti=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),ni={},ri=function(e){Object(u.a)(n,e);var t=Zr(n);function n(e){var r;return Object(s.a)(this,n),r=t.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(e)?r.copy(e):r.identity(),r}return Object(h.a)(n,[{key:"INDICES",get:function(){return ti}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}}],[{key:"IDENTITY",get:function(){return ni.IDENTITY=ni.IDENTITY||Object.freeze(new n($r)),ni.IDENTITY}},{key:"ZERO",get:function(){return ni.ZERO=ni.ZERO||Object.freeze(new n(ei)),ni.ZERO}}]),Object(h.a)(n,[{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this[9]=e[9],this[10]=e[10],this[11]=e[11],this[12]=e[12],this[13]=e[13],this[14]=e[14],this[15]=e[15],this.check()}},{key:"set",value:function(e,t,n,r,i,a,o,s,u,A,c,l,f,h,g,d){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this[4]=i,this[5]=a,this[6]=o,this[7]=s,this[8]=u,this[9]=A,this[10]=c,this[11]=l,this[12]=f,this[13]=h,this[14]=g,this[15]=d,this.check()}},{key:"setRowMajor",value:function(e,t,n,r,i,a,o,s,u,A,c,l,f,h,g,d){return this[0]=e,this[1]=i,this[2]=u,this[3]=f,this[4]=t,this[5]=a,this[6]=A,this[7]=h,this[8]=n,this[9]=o,this[10]=c,this[11]=g,this[12]=r,this[13]=s,this[14]=l,this[15]=d,this.check()}},{key:"toRowMajor",value:function(e){return e[0]=this[0],e[1]=this[4],e[2]=this[8],e[3]=this[12],e[4]=this[1],e[5]=this[5],e[6]=this[9],e[7]=this[13],e[8]=this[2],e[9]=this[6],e[10]=this[10],e[11]=this[14],e[12]=this[3],e[13]=this[7],e[14]=this[11],e[15]=this[15],e}},{key:"identity",value:function(){return this.copy($r)}},{key:"fromQuaternion",value:function(e){return ge.c(this,e),this.check()}},{key:"frustum",value:function(e){var t=e.left,r=e.right,i=e.bottom,a=e.top,o=e.near,s=e.far;return s===1/0?n._computeInfinitePerspectiveOffCenter(this,t,r,i,a,o):ge.d(this,t,r,i,a,o,s),this.check()}},{key:"lookAt",value:function(e,t,n){if(1===arguments.length){var r=e;e=r.eye,t=r.center,n=r.up}return t=t||[0,0,0],n=n||[0,1,0],ge.g(this,e,t,n),this.check()}},{key:"ortho",value:function(e){var t=e.left,n=e.right,r=e.bottom,i=e.top,a=e.near,o=void 0===a?.1:a,s=e.far,u=void 0===s?500:s;return ge.i(this,t,n,r,i,o,u),this.check()}},{key:"orthographic",value:function(e){var t=e.fovy,r=void 0===t?45*Math.PI/180:t,i=e.aspect,a=void 0===i?1:i,o=e.focalDistance,s=void 0===o?1:o,u=e.near,A=void 0===u?.1:u,c=e.far,l=void 0===c?500:c;if(r>2*Math.PI)throw Error("radians");var f=r/2,h=s*Math.tan(f),g=h*a;return(new n).ortho({left:-g,right:g,bottom:-h,top:h,near:A,far:l})}},{key:"perspective",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fovy,n=void 0===t?void 0:t,r=e.fov,i=void 0===r?45*Math.PI/180:r,a=e.aspect,o=void 0===a?1:a,s=e.near,u=void 0===s?.1:s,A=e.far,c=void 0===A?500:A;if((n=n||i)>2*Math.PI)throw Error("radians");return ge.j(this,n,o,u,c),this.check()}},{key:"determinant",value:function(){return ge.a(this)}},{key:"getScale",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),e[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),e[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),e}},{key:"getTranslation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=this[12],e[1]=this[13],e[2]=this[14],e}},{key:"getRotation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(t||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=0,e[4]=this[4]*r,e[5]=this[5]*i,e[6]=this[6]*a,e[7]=0,e[8]=this[8]*r,e[9]=this[9]*i,e[10]=this[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{key:"getRotationMatrix3",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(t||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=this[4]*r,e[4]=this[5]*i,e[5]=this[6]*a,e[6]=this[8]*r,e[7]=this[9]*i,e[8]=this[10]*a,e}},{key:"transpose",value:function(){return ge.q(this,this),this.check()}},{key:"invert",value:function(){return ge.f(this,this),this.check()}},{key:"multiplyLeft",value:function(e){return ge.h(this,e,this),this.check()}},{key:"multiplyRight",value:function(e){return ge.h(this,this,e),this.check()}},{key:"rotateX",value:function(e){return ge.l(this,this,e),this.check()}},{key:"rotateY",value:function(e){return ge.m(this,this,e),this.check()}},{key:"rotateZ",value:function(e){return ge.n(this,this,e),this.check()}},{key:"rotateXYZ",value:function(e){var t=Object(p.a)(e,3),n=t[0],r=t[1],i=t[2];return this.rotateX(n).rotateY(r).rotateZ(i)}},{key:"rotateAxis",value:function(e,t){return ge.k(this,this,e,t),this.check()}},{key:"scale",value:function(e){return Array.isArray(e)?ge.o(this,this,e):ge.o(this,this,[e,e,e]),this.check()}},{key:"translate",value:function(e){return ge.p(this,this,e),this.check()}},{key:"transform",value:function(e,t){return 4===e.length?(Fr(t=xe.n(t||[-0,-0,-0,-0],e,this),4),t):this.transformAsPoint(e,t)}},{key:"transformAsPoint",value:function(e,t){switch(e.length){case 2:t=be.j(t||[-0,-0],e,this);break;case 3:t=ae.q(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return Fr(t,e.length),t}},{key:"transformAsVector",value:function(e,t){switch(e.length){case 2:t=function(e,t,n){var r=t[0],i=t[1],a=n[3]*r+n[7]*i||1;return e[0]=(n[0]*r+n[4]*i)/a,e[1]=(n[1]*r+n[5]*i)/a,e}(t||[-0,-0],e,this);break;case 3:t=Gr(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return Fr(t,e.length),t}},{key:"makeRotationX",value:function(e){return this.identity().rotateX(e)}},{key:"makeTranslation",value:function(e,t,n){return this.identity().translate([e,t,n])}},{key:"transformPoint",value:function(e,t){return Lr("Matrix4.transformPoint","3.0"),this.transformAsPoint(e,t)}},{key:"transformVector",value:function(e,t){return Lr("Matrix4.transformVector","3.0"),this.transformAsPoint(e,t)}},{key:"transformDirection",value:function(e,t){return Lr("Matrix4.transformDirection","3.0"),this.transformAsVector(e,t)}}],[{key:"_computeInfinitePerspectiveOffCenter",value:function(e,t,n,r,i,a){var o=2*a/(n-t),s=2*a/(i-r),u=(n+t)/(n-t),A=(i+r)/(i-r),c=-2*a;return e[0]=o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=u,e[9]=A,e[10]=-1,e[11]=-1,e[12]=0,e[13]=0,e[14]=c,e[15]=0,e}}]),n}(Xr),ii=(Math.max(6378137,6378137,6356752.314245179),function(e){return e}),ai=new Jr;function oi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ii;return _r(e)?(t[0]=n(e[0]),t[1]=n(e[1]),t[2]=e[2]):"longitude"in e?(t[0]=n(e.longitude),t[1]=n(e.latitude),t[2]=e.height):(t[0]=n(e.x),t[1]=n(e.y),t[2]=e.z),t}function si(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ai;return oi(e,t,wr._cartographicRadians?ii:Sr)}function ui(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ii;return _r(t)?(t[0]=n(e[0]),t[1]=n(e[1]),t[2]=e[2]):"longitude"in t?(t.longitude=n(e[0]),t.latitude=n(e[1]),t.height=e[2]):(t.x=n(e[0]),t.y=n(e[1]),t.z=e[2]),t}function Ai(e,t){return ui(e,t,wr._cartographicRadians?ii:Or)}var ci=new Jr,li=new Jr,fi=new Jr;var hi=new Jr,gi={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},di={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},pi={east:new Jr,north:new Jr,up:new Jr,west:new Jr,south:new Jr,down:new Jr},vi=new Jr,yi=new Jr,mi=new Jr;function Ii(e,t,n,r,i,a){var o,s,u,A=gi[t]&&gi[t][n];Er(A&&(!r||r===A));var c=hi.copy(i);if(Dr(c.x,0,1e-14)&&Dr(c.y,0,1e-14)){var l=Math.sign(c.z);o=vi.fromArray(di[t]),"east"!==t&&"west"!==t&&o.scale(l),s=yi.fromArray(di[n]),"east"!==n&&"west"!==n&&s.scale(l),u=mi.fromArray(di[r]),"east"!==r&&"west"!==r&&u.scale(l)}else{var f=pi.up,h=pi.east,g=pi.north;h.set(-c.y,c.x,0).normalize(),e.geodeticSurfaceNormal(c,f),g.copy(f).cross(h);var d=pi.west,p=pi.south;pi.down.copy(f).scale(-1),d.copy(h).scale(-1),p.copy(g).scale(-1),o=pi[t],s=pi[n],u=pi[r]}return a[0]=o.x,a[1]=o.y,a[2]=o.z,a[3]=0,a[4]=s.x,a[5]=s.y,a[6]=s.z,a[7]=0,a[8]=u.x,a[9]=u.y,a[10]=u.z,a[11]=0,a[12]=c.x,a[13]=c.y,a[14]=c.z,a[15]=1,a}var bi,Ei=new Jr,Ci=new Jr,Bi=new Jr,wi=new Jr,Qi=new Jr,ki=new Jr,_i=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;Object(s.a)(this,e),Er(t>=0),Er(n>=0),Er(r>=0),this.radii=new Jr(t,n,r),this.radiiSquared=new Jr(t*t,n*n,r*r),this.radiiToTheFourth=new Jr(t*t*t*t,n*n*n*n,r*r*r*r),this.oneOverRadii=new Jr(0===t?0:1/t,0===n?0:1/n,0===r?0:1/r),this.oneOverRadiiSquared=new Jr(0===t?0:1/(t*t),0===n?0:1/(n*n),0===r?0:1/(r*r)),this.minimumRadius=Math.min(t,n,r),this.maximumRadius=Math.max(t,n,r),this.centerToleranceSquared=zr,0!==this.radiiSquared.z&&(this.squaredXOverSquaredZ=this.radiiSquared.x/this.radiiSquared.z),Object.freeze(this)}return Object(h.a)(e,null,[{key:"WGS84",get:function(){return bi=bi||new e(6378137,6378137,6356752.314245179)}}]),Object(h.a)(e,[{key:"equals",value:function(e){return this===e||Boolean(e&&this.radii.equals(e.radii))}},{key:"toString",value:function(){return this.radii.toString()}},{key:"cartographicToCartesian",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0],n=Ci,r=Bi,i=Object(p.a)(e,3),a=i[2];this.geodeticSurfaceNormalCartographic(e,n),r.copy(this.radiiSquared).scale(n);var o=Math.sqrt(n.dot(r));return r.scale(1/o),n.scale(a),r.add(n),r.to(t)}},{key:"cartesianToCartographic",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];ki.from(e);var n=this.scaleToGeodeticSurface(ki,wi);if(n){var r=this.geodeticSurfaceNormal(n,Ci),i=Qi;i.copy(ki).subtract(n);var a=Math.atan2(r.y,r.x),o=Math.asin(r.z),s=Math.sign(ae.d(i,ki))*ae.g(i);return Ai([a,o,s],t)}}},{key:"eastNorthUpToFixedFrame",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new ri;return Ii(this,"east","north","up",e,t)}},{key:"localFrameToFixedFrame",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new ri;return Ii(this,e,t,n,r,i)}},{key:"geocentricSurfaceNormal",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];return Ei.from(e).normalize().to(t)}},{key:"geodeticSurfaceNormalCartographic",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0],n=si(e),r=n[0],i=n[1],a=Math.cos(i);return Ei.set(a*Math.cos(r),a*Math.sin(r),Math.sin(i)).normalize(),Ei.to(t)}},{key:"geodeticSurfaceNormal",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];return Ei.from(e).scale(this.oneOverRadiiSquared).normalize().to(t)}},{key:"scaleToGeodeticSurface",value:function(e,t){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Jr,r=t.oneOverRadii,i=t.oneOverRadiiSquared,a=t.centerToleranceSquared;ci.from(e);var o=e.x,s=e.y,u=e.z,A=r.x,c=r.y,l=r.z,f=o*o*A*A,h=s*s*c*c,g=u*u*l*l,d=f+h+g,p=Math.sqrt(1/d);if(Number.isFinite(p)){var v=li;if(v.copy(e).scale(p),d<a)return v.to(n);var y=i.x,m=i.y,I=i.z,b=fi;b.set(v.x*y*2,v.y*m*2,v.z*I*2);var E,C,B,w,Q=(1-p)*e.len()/(.5*b.len()),k=0;do{var _=(E=1/(1+(Q-=k)*y))*E,x=(C=1/(1+Q*m))*C,S=(B=1/(1+Q*I))*B,O=_*E,D=x*C,R=S*B,j=f*O*y+h*D*m+g*R*I,M=-2*j;k=(w=f*_+h*x+g*S-1)/M}while(Math.abs(w)>Kr);return ci.scale([E,C,B]).to(n)}}(e,this,t)}},{key:"scaleToGeocentricSurface",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];wi.from(e);var n=wi.x,r=wi.y,i=wi.z,a=this.oneOverRadiiSquared,o=1/Math.sqrt(n*n*a.x+r*r*a.y+i*i*a.z);return wi.multiplyScalar(o).to(t)}},{key:"transformPositionToScaledSpace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];return wi.from(e).scale(this.oneOverRadii).to(t)}},{key:"transformPositionFromScaledSpace",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];return wi.from(e).scale(this.radii).to(t)}},{key:"getSurfaceNormalIntersectionWithZAxis",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0,0];Er(Dr(this.radii.x,this.radii.y,Wr)),Er(this.radii.z>0),wi.from(e);var r=wi.z*(1-this.squaredXOverSquaredZ);if(!(Math.abs(r)>=this.radii.z-t))return wi.set(0,0,r).to(n)}}]),e}(),xi=n(253),Si=n(98),Oi=n(62),Di=function e(t,n,r){Object(s.a)(this,e),this.item=t,this.previous=n,this.next=r},Ri=function(){function e(){Object(s.a)(this,e),this.head=null,this.tail=null,this._length=0}return Object(h.a)(e,[{key:"add",value:function(e){var t=new Di(e,this.tail,null);return this.tail?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),++this._length,t}},{key:"remove",value:function(e){e&&(e.previous&&e.next?(e.previous.next=e.next,e.next.previous=e.previous):e.previous?(e.previous.next=null,this.tail=e.previous):e.next?(e.next.previous=null,this.head=e.next):(this.head=null,this.tail=null),e.next=null,e.previous=null,--this._length)}},{key:"splice",value:function(e,t){e!==t&&(this.remove(t),this._insert(e,t))}},{key:"_insert",value:function(e,t){var n=e.next;e.next=t,this.tail===e?this.tail=t:n.previous=t,t.next=n,t.previous=e,++this._length}},{key:"length",get:function(){return this._length}}]),e}();function ji(e){return void 0!==e&&null!==e}var Mi=function(){function e(){Object(s.a)(this,e),this._list=new Ri,this._sentinel=this._list.add("sentinel"),this._trimTiles=!1}return Object(h.a)(e,[{key:"reset",value:function(){this._list.splice(this._list.tail,this._sentinel)}},{key:"touch",value:function(e){var t=e._cacheNode;ji(t)&&this._list.splice(this._sentinel,t)}},{key:"add",value:function(e,t,n){ji(t._cacheNode)||(t._cacheNode=this._list.add(t),n&&n(e,t))}},{key:"unloadTile",value:function(e,t,n){var r=t._cacheNode;ji(r)&&(this._list.remove(r),t._cacheNode=void 0,n&&n(e,t))}},{key:"unloadTiles",value:function(e,t){var n=this._trimTiles;this._trimTiles=!1;for(var r=this._list,i=1024*e.maximumMemoryUsage*1024,a=this._sentinel,o=r.head;o!==a&&(e.gpuMemoryUsageInBytes>i||n);){var s=o.item;o=o.next,this.unloadTile(e,s,t)}}},{key:"trim",value:function(){this._trimTiles=!0}}]),e}();var Ni=new br,Fi=new br,Ti=new st([new tt,new tt,new tt,new tt,new tt,new tt]);function Li(e,t){var n=e.cameraDirection,r=e.cameraUp,i=e.height,a=e.distanceScales.metersPerUnit,o=[e.longitude,e.latitude,0],s=_i.WGS84.cartographicToCartesian(o,new br),u=_i.WGS84.eastNorthUpToFixedFrame(s),A=e.unprojectPosition(e.cameraPosition),c=_i.WGS84.cartographicToCartesian(A,new br),l=new br(u.transformAsVector(new br(n).scale(a))).normalize(),f=new br(u.transformAsVector(new br(r).scale(a))).normalize();return function(e,t){var n=e.getFrustumPlanes(),r=0;for(var i in n){var a=n[i],o=a.normal.dot(e.center);Fi.copy(a.normal).scale(a.distance-o).add(e.center);var s=e.unprojectPosition(Fi),u=_i.WGS84.cartographicToCartesian(s,new br);Ti.planes[r++].fromPointNormal(u,Ni.copy(t).subtract(u))}}(e,s),{camera:{position:c,direction:l,up:f},viewport:e,height:i,cullingVolume:Ti,frameNumber:t,sseDenominator:1.15}}var Pi=new br;var Ui=0,Gi=1,qi=3,Hi=4,Yi=5,Ji=1,zi=2,Ki="empty",Wi="scenegraph",Vi="pointcloud",Xi="mesh",Zi="I3S",$i="TILES3D",ea="geometricError",ta=1;function na(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var ra=Object.freeze([1,0,0,0,1,0,0,0,1]),ia=Object.freeze([0,0,0,0,0,0,0,0,0]),aa=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL1ROW0:3,COL1ROW1:4,COL1ROW2:5,COL2ROW0:6,COL2ROW1:7,COL2ROW2:8}),oa={},sa=function(e){Object(u.a)(n,e);var t=na(n);function n(e){var r;return Object(s.a)(this,n),r=t.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(e)?r.copy(e):r.identity(),r}return Object(h.a)(n,[{key:"ELEMENTS",get:function(){return 9}},{key:"RANK",get:function(){return 3}},{key:"INDICES",get:function(){return aa}}],[{key:"IDENTITY",get:function(){return oa.IDENTITY=oa.IDENTITY||Object.freeze(new n(ra)),oa.IDENTITY}},{key:"ZERO",get:function(){return oa.ZERO=oa.ZERO||Object.freeze(new n(ia)),oa.ZERO}}]),Object(h.a)(n,[{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this.check()}},{key:"set",value:function(e,t,n,r,i,a,o,s,u){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this[4]=i,this[5]=a,this[6]=o,this[7]=s,this[8]=u,this.check()}},{key:"setRowMajor",value:function(e,t,n,r,i,a,o,s,u){return this[0]=e,this[1]=r,this[2]=o,this[3]=t,this[4]=i,this[5]=s,this[6]=n,this[7]=a,this[8]=u,this.check()}},{key:"determinant",value:function(){return Ie.b(this)}},{key:"identity",value:function(){return this.copy(ra)}},{key:"fromQuaternion",value:function(e){return Ie.c(this,e),this.check()}},{key:"transpose",value:function(){return Ie.i(this,this),this.check()}},{key:"invert",value:function(){return Ie.d(this,this),this.check()}},{key:"multiplyLeft",value:function(e){return Ie.e(this,e,this),this.check()}},{key:"multiplyRight",value:function(e){return Ie.e(this,this,e),this.check()}},{key:"rotate",value:function(e){return Ie.f(this,this,e),this.check()}},{key:"scale",value:function(e){return Array.isArray(e)?Ie.g(this,this,e):Ie.g(this,this,[e,e,e]),this.check()}},{key:"translate",value:function(e){return Ie.h(this,this,e),this.check()}},{key:"transform",value:function(e,t){switch(e.length){case 2:t=be.i(t||[-0,-0],e,this);break;case 3:t=ae.p(t||[-0,-0,-0],e,this);break;case 4:t=function(e,t,n){var r=t[0],i=t[1],a=t[2];return e[0]=n[0]*r+n[3]*i+n[6]*a,e[1]=n[1]*r+n[4]*i+n[7]*a,e[2]=n[2]*r+n[5]*i+n[8]*a,e[3]=t[3],e}(t||[-0,-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return nr(t,e.length),t}},{key:"transformVector",value:function(e,t){return ir("Matrix3.transformVector"),this.transform(e,t)}},{key:"transformVector2",value:function(e,t){return ir("Matrix3.transformVector"),this.transform(e,t)}},{key:"transformVector3",value:function(e,t){return ir("Matrix3.transformVector"),this.transform(e,t)}}]),n}(ur);function ua(e){return void 0!==e&&null!==e}var Aa=new br,ca=new br,la=new br;new dr;function fa(e,t,n){if(Object(Si.a)(e,"3D Tile: boundingVolume must be defined"),e.box)return function(e,t,n){var r=new br(e[0],e[1],e[2]);t.transform(r,r);var i=t.transformAsVector(e.slice(3,6)),a=t.transformAsVector(e.slice(6,9)),o=t.transformAsVector(e.slice(9,12)),s=new sa([i[0],i[1],i[2],a[0],a[1],a[2],o[0],o[1],o[2]]);if(ua(n))return n.center=r,n.halfAxes=s,n;return new Ze(r,s)}(e.box,t,n);if(e.region){var r=Object(p.a)(e.region,6),i=r[0],a=r[1],o=r[2],s=r[3],u=r[4],A=r[5],c=_i.WGS84.cartographicToCartesian([Zn(i),Zn(s),u],ca),l=_i.WGS84.cartographicToCartesian([Zn(o),Zn(a),A],la),f=(new br).addVectors(c,l).multiplyScalar(.5),h=(new br).subVectors(c,l).len()/2;return ha([f[0],f[1],f[2],h],new dr)}if(e.sphere)return ha(e.sphere,t,n);throw new Error("3D Tile: boundingVolume must contain a sphere, region, or box")}function ha(e,t,n){var r=new br(e[0],e[1],e[2]);t.transform(r,r);var i=t.getScale(Aa),a=Math.max(Math.max(i[0],i[1]),i[2]),o=e[3]*a;return ua(n)?(n.center=r,n.radius=o,n):new ve(r,o)}new br,new br,new dr,new br,new br,new br;function ga(e,t){if(e.dynamicScreenSpaceError&&e._dynamicScreenSpaceErrorComputedDensity){var n=e._dynamicScreenSpaceErrorComputedDensity,r=e.dynamicScreenSpaceErrorFactor;return function(e,t){var n=e*t;return 1-Math.exp(-n*n)}(t,n)*r}return 0}var da=Math.PI/2;function pa(e){var t=Object(p.a)(e,3),n=t[0],r=t[1],i=t[2],a=Xn(n),o=Xn(r),s=1+i/6378137,u=s*Math.cos(o);return[n=u*Math.cos(a),r=u*Math.sin(a),i=s*Math.sin(o)]}function va(e,t){var n=Object(p.a)(e,3),r=n[0],i=n[1],a=n[2],o=void 0===a?0:a,s=Object(p.a)(t,3),u=s[0],A=s[1],c=s[2],l=pa([u,A,void 0===c?0:c]),f=pa([r,i,o]),h=f[0]-l[0],g=f[1]-l[1],d=f[2]-l[2];return h*h+g*g+d*d}function ya(e,t){var n=t.viewport,r=e.header.mbs[1],i=[e.header.mbs[0],r,e.header.mbs[2]],a=e.header.mbs[3]/6378137,o=va(n.unprojectPosition(n.cameraPosition),i)-a*a;if(o<=0)return 170141175e30;var s=function(e,t){var n=t.viewport,r=n.width,i=n.height,a=n.pixelProjectionMatrix,o=Math.tan(Math.atan(Math.sqrt(1/(a[0]*a[0])+1/(a[5]*a[5]))));return Math.sqrt(i*i+r*r)/o}(0,t);return s*=a/Math.sqrt(o)/n.scale}function ma(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 Ia(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ma(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ma(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ba=new br;var Ea=function(){function e(t,n,r){Object(s.a)(this,e),Object(Si.a)("object"===Object(G.a)(n)),this.header=n,this.tileset=t,this.id=n.id,this.url=n.url,this.parent=r,this.refine=this._getRefine(n.refine),this.type=n.type,this.contentUrl=n.contentUrl,this.lodMetricType=null,this.lodMetricValue=null,this.boundingVolume=null,this.content=null,this.contentState=Ui,this.gpuMemoryUsageInBytes=0,this.children=[],this.depth=0,this._cacheNode=null,this._frameNumber=null,this._cacheNode=null,this._initializeLodMetric(n),this._initializeTransforms(n),this._initializeBoundingVolumes(n),this._initializeContent(n),this._initializeRenderingState(n),this._lodJudge=null,this._expireDate=null,this._expiredContent=null,this._getPriority=this._getPriority.bind(this),Object.seal(this)}return Object(h.a)(e,[{key:"destroy",value:function(){this.header=null}},{key:"isDestroyed",value:function(){return null===this.header}},{key:"getScreenSpaceError",value:function(e,t){switch(this.tileset.type){case Zi:return ya(this,e);case $i:return function(e,t,n){var r=e.tileset,i=e.parent&&e.parent.lodMetricValue||e.lodMetricValue,a=n?i:e.lodMetricValue;if(0===a)return 0;var o=Math.max(e._distanceToCamera,1e-7),s=a*t.height/(o*t.sseDenominator);return s-=ga(r,o)}(this,e,t);default:return console.error("Unsupported tileset type"),null}}},{key:"_getPriority",value:function(){return this.isVisible?this.contentState===Ui?-1:Math.max(1e7-this._priority,0)||0:-1}},{key:"loadContent",value:function(){var e=Object(F.a)(N.a.mark((function e(){var t,n,r,i,a;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.hasEmptyContent){e.next=2;break}return e.abrupt("return",!1);case 2:if(!this.content){e.next=4;break}return e.abrupt("return",!0);case 4:return this.contentExpired&&(this._expireDate=null),this.contentState=Gi,e.next=9,this.tileset._requestScheduler.scheduleRequest(this.id,this._getPriority);case 9:if(t=e.sent){e.next=13;break}return this.contentState=Ui,e.abrupt("return",!1);case 13:return e.prev=13,n=this.tileset.getTileUrl(this.contentUrl),r=this.tileset.fetchOptions,i=this.tileset.loader,a=Ia(Ia({},r),{},Object(O.a)({},i.id,{tile:this.header,tileset:this.tileset.tileset,isTileset:"auto",isTileHeader:!1})),e.next=20,Object(j.a)(n,i,a);case 20:return this.content=e.sent,this._isTileset()&&this.tileset._initializeTileHeaders(this.content,this,Oi.a.dirname(this.contentUrl)),this.contentState=qi,this._onContentLoaded(),e.abrupt("return",!0);case 27:throw e.prev=27,e.t0=e.catch(13),this.contentState=Yi,e.t0;case 31:return e.prev=31,t.done(),e.finish(31);case 34:case"end":return e.stop()}}),e,this,[[13,27,31,34]])})));return function(){return e.apply(this,arguments)}}()},{key:"unloadContent",value:function(){return this.content&&this.content.destroy&&this.content.destroy(),this.content=null,this.contentState=Ui,!0}},{key:"updateVisibility",value:function(e){if(this._frameNumber!==e.frameNumber){var t=this.parent,n=t?t.computedTransform:this.tileset.modelMatrix,r=t?t._visibilityPlaneMask:st.MASK_INDETERMINATE;this._updateTransform(n),this._distanceToCamera=this.distanceToTile(e),this._screenSpaceError=this.getScreenSpaceError(e,!1),this._visibilityPlaneMask=this.visibility(e,r),this._visible=this._visibilityPlaneMask!==st.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priority=this.lodMetricValue,this._frameNumber=e.frameNumber}}},{key:"visibility",value:function(e,t){var n=e.cullingVolume,r=this.boundingVolume;return n.computeVisibilityWithPlaneMask(r,t)}},{key:"contentVisibility",value:function(e){return!0}},{key:"distanceToTile",value:function(e){var t=this.boundingVolume;return Math.sqrt(Math.max(t.distanceSquaredTo(e.camera.position),0))}},{key:"cameraSpaceZDepth",value:function(e){var t=e.camera,n=this.boundingVolume;return ba.subVectors(n.center,t.position),t.direction.dot(ba)}},{key:"insideViewerRequestVolume",value:function(e){var t=this._viewerRequestVolume;return!t||0===t.distanceToCamera(e)}},{key:"_initializeLodMetric",value:function(e){"lodMetricType"in e?this.lodMetricType=e.lodMetricType:(this.lodMetricType=this.parent&&this.parent.lodMetricType||this.tileset.lodMetricType,console.warn("3D Tile: Required prop lodMetricType is undefined. Using parent lodMetricType")),"lodMetricValue"in e?this.lodMetricValue=e.lodMetricValue:(this.lodMetricValue=this.parent&&this.parent.lodMetricValue||this.tileset.lodMetricValue,console.warn("3D Tile: Required prop lodMetricValue is undefined. Using parent lodMetricValue"))}},{key:"_initializeTransforms",value:function(e){this.transform=e.transform?new dr(e.transform):new dr;var t=this.parent,n=this.tileset,r=t&&t.computedTransform?t.computedTransform.clone():n.modelMatrix.clone();this.computedTransform=new dr(r).multiplyRight(this.transform);var i=t&&t._initialTransform?t._initialTransform.clone():new dr;this._initialTransform=new dr(i).multiplyRight(this.transform)}},{key:"_initializeBoundingVolumes",value:function(e){this._contentBoundingVolume=null,this._viewerRequestVolume=null,this._updateBoundingVolume(e)}},{key:"_initializeContent",value:function(e){this.content={_tileset:this.tileset,_tile:this},this.hasEmptyContent=!0,this.contentState=Ui,this.hasTilesetContent=!1,e.contentUrl&&(this.content=null,this.hasEmptyContent=!1)}},{key:"_initializeRenderingState",value:function(e){this.depth=e.level,this._shouldRefine=!1,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._visibilityPlaneMask=st.MASK_INDETERMINATE,this._visible=!1,this._inRequestVolume=!1,this._stackLength=0,this._selectionDepth=0,this._frameNumber=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._priority=0}},{key:"_getRefine",value:function(e){return e||this.parent&&this.parent.refine||zi}},{key:"_isTileset",value:function(){return-1!==this.contentUrl.indexOf(".json")}},{key:"_onContentLoaded",value:function(){switch(this.content&&this.content.type){case"vctr":case"geom":this.tileset.traverser.disableSkipLevelOfDetail=!0}this._isTileset()&&(this.hasTilesetContent=!0)}},{key:"_updateBoundingVolume",value:function(e){this.boundingVolume=fa(e.boundingVolume,this.computedTransform,this.boundingVolume);var t=e.content;t&&(t.boundingVolume&&(this._contentBoundingVolume=fa(t.boundingVolume,this.computedTransform,this._contentBoundingVolume)),e.viewerRequestVolume&&(this._viewerRequestVolume=fa(e.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)))}},{key:"_updateTransform",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new dr,t=e.clone().multiplyRight(this.transform),n=!t.equals(this.computedTransform);n&&(this.computedTransform=t,this._updateBoundingVolume(this.header))}},{key:"updateExpiration",value:function(){if(void 0!==(t=this._expireDate)&&null!==t&&this.contentReady&&!this.hasEmptyContent){var e=Date.now();Date.lessThan(this._expireDate,e)&&(this.contentState=Hi,this._expiredContent=this.content)}var t}},{key:"selected",get:function(){return this._selectedFrame===this.tileset._frameNumber}},{key:"isVisible",get:function(){return this._visible}},{key:"isVisibleAndInRequestVolume",get:function(){return this._visible&&this._inRequestVolume}},{key:"hasRenderContent",get:function(){return!this.hasEmptyContent&&!this.hasTilesetContent}},{key:"hasChildren",get:function(){return this.children.length>0||this.header.children&&this.header.children.length>0}},{key:"contentReady",get:function(){return this.contentState===qi||this.hasEmptyContent}},{key:"contentAvailable",get:function(){return Boolean(this.contentReady&&this.hasRenderContent||this._expiredContent&&!this.contentFailed)}},{key:"hasUnloadedContent",get:function(){return this.hasRenderContent&&this.contentUnloaded}},{key:"contentUnloaded",get:function(){return this.contentState===Ui}},{key:"contentExpired",get:function(){return this.contentState===Hi}},{key:"contentFailed",get:function(){return this.contentState===Yi}},{key:"extras",get:function(){return this.header.extras}}]),e}(),Ca=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;Object(s.a)(this,e),this._array=new Array(t),this._map=new Map,this._length=t}return Object(h.a)(e,[{key:"get",value:function(e){return Object(Si.a)(e<this._array.length),this._array[e]}},{key:"set",value:function(e,t){Object(Si.a)(e>=0),e>=this.length&&(this.length=e+1),this._map.has(this._array[e])&&this._map.delete(this._array[e]),this._array[e]=t,this._map.set(t,e)}},{key:"delete",value:function(e){var t=this._map.get(e);t>=0&&(this._array.splice(t,1),this._map.delete(e),this.length--)}},{key:"peek",value:function(){return this._array[this._length-1]}},{key:"push",value:function(e){if(!this._map.has(e)){var t=this.length++;this._array[t]=e,this._map.set(e,t)}}},{key:"pop",value:function(){var e=this._array[--this.length];return this._map.delete(e),e}},{key:"reserve",value:function(e){Object(Si.a)(e>=0),e>this._array.length&&(this._array.length=e)}},{key:"resize",value:function(e){Object(Si.a)(e>=0),this.length=e}},{key:"trim",value:function(e){null!==e&&void 0!==e||(e=this.length),this._array.length=e}},{key:"reset",value:function(){this._array=[],this._map=new Map,this._length=0}},{key:"find",value:function(e){return this._map.has(e)}},{key:"length",get:function(){return this._length},set:function(e){this._length=e,e>this._array.length&&(this._array.length=e)}},{key:"values",get:function(){return this._array}}]),e}();function Ba(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return wa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wa(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function wa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qa(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 ka(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qa(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _a={loadSiblings:!1,skipLevelOfDetail:!1,maximumScreenSpaceError:2},xa=function(){function e(t){Object(s.a)(this,e),this.options=ka(ka({},_a),t),this._traversalStack=new Ca,this._emptyTraversalStack=new Ca,this._frameNumber=null,this.root=null,this.selectedTiles={},this.requestedTiles={},this.emptyTiles={}}return Object(h.a)(e,[{key:"traverse",value:function(e,t,n){this.root=e,this.options=ka(ka({},this.options),n),this.reset(),this.updateTile(e,t),this._frameNumber=t.frameNumber,this.executeTraversal(e,t)}},{key:"reset",value:function(){this.requestedTiles={},this.selectedTiles={},this.emptyTiles={},this._traversalStack.reset(),this._emptyTraversalStack.reset()}},{key:"executeTraversal",value:function(e,t){var n=this._traversalStack;for(n.push(e);n.length>0;){var r=n.pop(),i=!1;this.canTraverse(r,t)&&(this.updateChildTiles(r,t),i=this.updateAndPushChildren(r,t,n));var a=r.parent,o=Boolean(!a||a._shouldRefine),s=!i;r.hasRenderContent?r.refine===Ji?(this.loadTile(r,t),this.selectTile(r,t)):r.refine===zi&&(this.loadTile(r,t),s&&this.selectTile(r,t)):(this.emptyTiles[r.id]=r,this.loadTile(r,t),s&&this.selectTile(r,t)),this.touchTile(r,t),r._shouldRefine=i&&o}this.options.onTraversalEnd&&this.options.onTraversalEnd(t)}},{key:"updateChildTiles",value:function(e,t){var n,r=Ba(e.children);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.updateTile(i,t)}}catch(a){r.e(a)}finally{r.f()}return!0}},{key:"updateAndPushChildren",value:function(e,t,n){var r=this.options,i=r.loadSiblings,a=r.skipLevelOfDetail,o=e.children;o.sort(this.compareDistanceToCamera);var s,u=!a&&e.refine===zi&&e.hasRenderContent,A=!1,c=Ba(o);try{for(c.s();!(s=c.n()).done;){var l=s.value;if(l.isVisibleAndInRequestVolume?(n.find(l)&&n.delete(l),n.push(l),A=!0):(u||i)&&(this.loadTile(l,t),this.touchTile(l,t)),u){var f=void 0;if(!(f=!!l._inRequestVolume&&(l.hasRenderContent?l.contentAvailable:this.executeEmptyTraversal(l,t))))return f}}}catch(h){c.e(h)}finally{c.f()}return A}},{key:"updateTile",value:function(e,t){this.updateTileVisibility(e,t)}},{key:"selectTile",value:function(e,t){this.shouldSelectTile(e,t)&&(e._selectedFrame=t.frameNumber,this.selectedTiles[e.id]=e)}},{key:"loadTile",value:function(e,t){this.shouldLoadTile(e,t)&&(e._requestedFrame=t.frameNumber,e._priority=this.getPriority(e),this.requestedTiles[e.id]=e)}},{key:"touchTile",value:function(e,t){e.tileset._cache.touch(e),e._touchedFrame=t.frameNumber}},{key:"canTraverse",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return!(!r&&!e.isVisibleAndInRequestVolume)&&(!!e.hasChildren&&(e.hasTilesetContent?!e.contentExpired:this.shouldRefine(e,t,n)))}},{key:"shouldLoadTile",value:function(e,t){return e.hasUnloadedContent||e.contentExpired}},{key:"shouldSelectTile",value:function(e,t){return e.contentAvailable&&!this.options.skipLevelOfDetail}},{key:"shouldRefine",value:function(e,t,n){var r=e._screenSpaceError;return n&&(r=e.getScreenSpaceError(t,!0)),r>this.options.maximumScreenSpaceError}},{key:"updateTileVisibility",value:function(e,t){e.updateVisibility(t)}},{key:"compareDistanceToCamera",value:function(e,t){return e._distanceToCamera-t._distanceToCamera}},{key:"getPriority",value:function(e){var t=this.options;switch(e.refine){case Ji:return e._distanceToCamera;case zi:var n=e.parent,r=n&&(!t.skipLevelOfDetail||0===e._screenSpaceError||n.hasTilesetContent)?n._screenSpaceError:e._screenSpaceError;return this.root._screenSpaceError-r;default:return Object(Si.a)(!1)}}},{key:"anyChildrenVisible",value:function(e,t){var n,r=!1,i=Ba(e.children);try{for(i.s();!(n=i.n()).done;){var a=n.value;a.updateVisibility(t),r=r||a.isVisibleAndInRequestVolume}}catch(o){i.e(o)}finally{i.f()}return r}},{key:"executeEmptyTraversal",value:function(e,t){for(var n=!0,r=this._emptyTraversalStack;r.length>0;){var i=r.pop();this.updateTile(i,t),i.isVisibleAndInRequestVolume||(this.loadTile(i,t),this.touchTile(i,t));var a=!i.hasRenderContent&&this.canTraverse(i,t,!1,!0);if(a||i.contentAvailable||(n=!1),a){var o,s=Ba(i.children.filter((function(e){return e})));try{for(s.s();!(o=s.n()).done;){var u=o.value;r.find(u)&&r.delete(u),r.push(u)}}catch(A){s.e(A)}finally{s.f()}}}return n}}]),e}();function Sa(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var Oa=function(e){Object(u.a)(n,e);var t=Sa(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"compareDistanceToCamera",value:function(e,t){return 0===t._distanceToCamera&&0===e._distanceToCamera?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera}},{key:"updateTileVisibility",value:function(e,t){if(e.updateVisibility(t),e.isVisibleAndInRequestVolume){var n=e.children.length>0;if(e.hasTilesetContent&&n){var r=e.children[0];return this.updateTileVisibility(r,t),void(e._visible=r._visible)}if(this.meetsScreenSpaceErrorEarly(e,t))e._visible=!1;else{var i=e.refine===zi,a=e._optimChildrenWithinParent===ta;i&&a&&n&&!this.anyChildrenVisible(e,t)&&(e._visible=!1)}}}},{key:"meetsScreenSpaceErrorEarly",value:function(e,t){var n=e.parent;return!(!n||n.hasTilesetContent||n.refine!==Ji)&&!this.shouldRefine(e,t,!0)}}]),n}(xa),Da="REQUESTED",Ra="COMPLETED",ja="ERROR",Ma=function(){function e(){Object(s.a)(this,e),this._statusMap={}}return Object(h.a)(e,[{key:"add",value:function(e,t,n,r){var i=this;this._statusMap[t]||(this._statusMap[t]={request:e,callback:n,key:t,frameState:r,status:Da},e().then((function(e){i._statusMap[t].status=Ra,i._statusMap[t].callback(e,r)})).catch((function(e){i._statusMap[t].status=ja,n(e)})))}},{key:"update",value:function(e,t){this._statusMap[e]&&(this._statusMap[e].frameState=t)}},{key:"find",value:function(e){return this._statusMap[e]}}]),e}();function Na(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 Fa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Na(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Na(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ta(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return La(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return La(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function La(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pa(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var Ua=function(e){Object(u.a)(n,e);var t=Pa(n);function n(e){var r;return Object(s.a)(this,n),(r=t.call(this,e))._tileManager=new Ma,r}return Object(h.a)(n,[{key:"shouldRefine",value:function(e,t){return e._lodJudge=function(e,t){var n=t.viewport,r=n.metersPerPixel,i=e.header.mbs[1],a=e.header.mbs[0],o=e.header.mbs[2],s=e.header.mbs[3],u=n.height,A=n.width,c=n.latitude,l=n.longitude,f=[l,c],h=[a,i,o],g=[l,i],d=[a,c],p=Math.sqrt(u*u+A*A)*r[0],v=.5*u+s/6378137,y=.5*A+s/6378137;if(va(f,h)>p+s/6378137)return"OUT";if(va(f,g)>v)return"OUT";if(va(f,d)>y)return"OUT";if(0===e.lodMetricValue)return"DIG";var m=ya(e,t);return(m*=da)<.5?"OUT":!e.header.children||m<=e.lodMetricValue?"DRAW":e.header.children?"DIG":"OUT"}(e,t),"DIG"===e._lodJudge}},{key:"updateChildTiles",value:function(e,t){var n,r=this,i=e.header.children||[],a=e.children,o=e.tileset,s=Ta(i);try{var u=function(){var i=n.value,s=a&&a.find((function(e){return e.id===i.id}));if(s)s&&r.updateTile(s,t);else{var u=function(){return r._loadTile(i.id,o)};r._tileManager.find(i.id)?r._tileManager.update(i.id,t):(o.tileset.nodePages&&(u=function(){return o.tileset.nodePagesTile.formTileFromNodePages(i.id)}),r._tileManager.add(u,i.id,(function(t){return r._onTileLoad(t,e)}),t))}};for(s.s();!(n=s.n()).done;)u()}catch(A){s.e(A)}finally{s.f()}}},{key:"_loadTile",value:function(){var e=Object(F.a)(N.a.mark((function e(t,n){var r,i,a;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.loader,i=n.getTileUrl("".concat(n.url,"/nodes/").concat(t)),a={i3s:Fa(Fa({},n.fetchOptions),{},{isTileHeader:!0,loadContent:!1})},e.next=5,Object(j.a)(i,r,a);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_onTileLoad",value:function(e,t){var n=this.options.basePath,r=new Ea(t.tileset,e,t,n);t.children.push(r);var i=this._tileManager.find(r.id).frameState;this.updateTile(r,i),this._frameNumber===i.frameNumber&&this.executeTraversal(r,i)}}]),n}(xa);function Ga(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return qa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qa(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function qa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ha(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 Ya(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ha(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ha(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ja={ellipsoid:_i.WGS84,modelMatrix:new dr,throttleRequests:!1,maximumMemoryUsage:32,onTileLoad:function(){},onTileUnload:function(){},onTileError:function(e,t,n){},maximumScreenSpaceError:8},za=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(s.a)(this,e),Object(Si.a)(t),this.options=Ya(Ya({},Ja),n),this.tileset=t,this.loader=t.loader,this.type=t.type,this.url=t.url,this.basePath=t.basePath||Oi.a.dirname(this.url),this.modelMatrix=this.options.modelMatrix,this.ellipsoid=this.options.ellipsoid,this.lodMetricType=t.lodMetricType,this.lodMetricValue=t.lodMetricValue,this.refine=t.root.refine,this.fetchOptions=this.options.fetchOptions||{},this.options.headers&&(this.fetchOptions.headers=this.options.headers),this.options.token&&(this.fetchOptions.token=this.options.token),this.root=null,this.cartographicCenter=null,this.cartesianCenter=null,this.zoom=1,this.boundingVolume=null,this._traverser=this._initializeTraverser(),this._cache=new Mi,this._requestScheduler=new on.a({throttleRequests:this.options.throttleRequests}),this._frameNumber=0,this._updateFrameNumber=0,this._pendingCount=0,this._tiles={},this.selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this._selectedTilesToStyle=[],this._queryParams={},this._queryParamsString=null,this.maximumMemoryUsage=this.options.maximumMemoryUsage,this.gpuMemoryUsageInBytes=0,this.stats=new xi.a({id:this.url}),this._initializeStats(),this._hasMixedContent=!1,this._maximumScreenSpaceError=this.options.maximumScreenSpaceError,this._properties=void 0,this._extensionsUsed=void 0,this._gltfUpAxis=void 0,this._dynamicScreenSpaceErrorComputedDensity=0,this.extras=null,this.asset={},this.credits={},this.description=this.options.description,this._defaultGeometrySchema=[],this._initializeTileSet(t,this.options)}return Object(h.a)(e,[{key:"isLoaded",value:function(){return 0===this._pendingCount}},{key:"destroy",value:function(){this._destroy()}},{key:"getTileUrl",value:function(e){return e.startsWith("data:")?e:"".concat(e).concat(this.queryParams)}},{key:"update",value:function(e){this._cache.reset(),this._frameNumber++,this._frameState=Li(e,this._frameNumber),this._traverser.traverse(this.root,this._frameState,this.options)}},{key:"_onTraversalEnd",value:function(){var e=Object.values(this._traverser.selectedTiles);this._tilesChanged(this.selectedTiles,e)&&this._updateFrameNumber++,this.selectedTiles=e;var t,n=Ga(this.selectedTiles);try{for(n.s();!(t=n.n()).done;){var r=t.value;this._tiles[r.id]=r}}catch(i){n.e(i)}finally{n.f()}return this._requestedTiles=Object.values(this._traverser.requestedTiles),this._emptyTiles=Object.values(this._traverser.emptyTiles),this._loadTiles(this._frameState),this._unloadTiles(),this._updateStats(),this._updateFrameNumber}},{key:"_tilesChanged",value:function(e,t){if(e.length!==t.length)return!0;var n=new Set(e.map((function(e){return e.id}))),r=new Set(t.map((function(e){return e.id}))),i=e.filter((function(e){return!r.has(e.id)})).length>0;return i=i||t.filter((function(e){return!n.has(e.id)})).length>0}},{key:"_loadTiles",value:function(e){var t,n=Ga(this._requestedTiles);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.contentUnloaded&&this._loadTile(r,e)}}catch(i){n.e(i)}finally{n.f()}}},{key:"_unloadTiles",value:function(){this._cache.unloadTiles(this,(function(e,t){return e._unloadTile(t)}))}},{key:"_updateStats",value:function(){var e,t=0,n=0,r=Ga(this.selectedTiles);try{for(r.s();!(e=r.n()).done;){var i=e.value;i.contentAvailable&&(t++,i.content.pointCount&&(n+=i.content.pointCount))}}catch(a){r.e(a)}finally{r.f()}this.stats.get("Tiles In View").count=this.selectedTiles.length,this.stats.get("Tiles To Render").count=t,this.stats.get("Points").count=n}},{key:"_initializeTileSet",value:function(e){this.root=this._initializeTileHeaders(e,null,this.basePath),this.type===$i&&this._initializeCesiumTileset(e),this.type===Zi&&this._initializeI3STileset(e),this._calculateViewProps()}},{key:"_calculateViewProps",value:function(){var e=this.root,t=e.boundingVolume.center;if(!t)return console.warn("center was not pre-calculated for the root tile"),this.cartographicCenter=new br,void(this.zoom=1);this.cartographicCenter=_i.WGS84.cartesianToCartographic(t,new br),this.cartesianCenter=t,this.zoom=function(e){var t=e.halfAxes,n=e.radius,r=e.width,i=e.height;if(t){t.getColumn(0,Pi);var a=Pi.len();t.getColumn(1,Pi);var o=Pi.len();t.getColumn(2,Pi);var s=a/2,u=o/2,A=Pi.len()/2;return(Math.log2(6378137/s)+Math.log2(6378137/u)+Math.log2(6356752.314245179/A))/3}return n?Math.log2(6356752.314245179/n):i&&r?(Math.log2(6378137/r)+Math.log2(6378137/i))/2:1}(e.boundingVolume)}},{key:"_initializeStats",value:function(){this.stats.get("Tiles In Tileset(s)"),this.stats.get("Tiles Loading"),this.stats.get("Tiles In Memory"),this.stats.get("Tiles In View"),this.stats.get("Tiles To Render"),this.stats.get("Tiles Loaded"),this.stats.get("Tiles Unloaded"),this.stats.get("Failed Tile Loads"),this.stats.get("Points","memory"),this.stats.get("Tile Memory Use","memory")}},{key:"_initializeTileHeaders",value:function(e,t,n){var r=new Ea(this,e.root,t,n);if(t&&(t.children.push(r),r.depth=t.depth+1),this.type===$i){var i=[];for(i.push(r);i.length>0;){var a=i.pop();this.stats.get("Tiles In Tileset(s)").incrementCount();var o,s=Ga(a.header.children||[]);try{for(s.s();!(o=s.n()).done;){var u=o.value,A=new Ea(this,u,a,n);a.children.push(A),A.depth=a.depth+1,i.push(A)}}catch(c){s.e(c)}finally{s.f()}}}return r}},{key:"_initializeTraverser",value:function(){var e;switch(this.type){case $i:e=Oa;break;case Zi:e=Ua;break;default:e=xa}return new e({basePath:this.basePath,onTraversalEnd:this._onTraversalEnd.bind(this)})}},{key:"_destroyTileHeaders",value:function(e){this._destroySubtree(e)}},{key:"_loadTile",value:function(){var e=Object(F.a)(N.a.mark((function e(t,n){var r;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this._onStartTileLoading(),e.next=4,t.loadContent(n);case 4:r=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),this._onTileLoadError(t,e.t0);case 10:return e.prev=10,this._onEndTileLoading(),this._onTileLoad(t,r),e.finish(10);case 14:case"end":return e.stop()}}),e,this,[[0,7,10,14]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_onTileLoadError",value:function(e,t){this.stats.get("Failed Tile Loads").incrementCount();var n=t.message||t.toString(),r=e.url;console.error("A 3D tile failed to load: ".concat(e.url," ").concat(n)),this.options.onTileError(e,n,r)}},{key:"_onTileLoad",value:function(e,t){t&&(e&&e.content&&function(e,t){Object(Si.a)(e),Object(Si.a)(t);var n=t.rtcCenter,r=t.rotateYtoZ,i=e.computedTransform,a=e.boundingVolume.center,o=new dr(i);if(n&&o.translate(n),r){var s=(new dr).rotateX(Math.PI/2);o=o.multiplyRight(s)}t.isQuantized&&o.translate(t.quantizedVolumeOffset).scale(t.quantizedVolumeScale);var u=new br(a);t.cartesianModelMatrix=o,t.cartesianOrigin=u;var A=_i.WGS84.cartesianToCartographic(u,new br),c=_i.WGS84.eastNorthUpToFixedFrame(u).invert();t.cartographicModelMatrix=c.multiplyRight(o),t.cartographicOrigin=A,t.modelMatrix=t.cartographicModelMatrix}(e,e.content),this._addTileToCache(e),this.options.onTileLoad(e))}},{key:"_onStartTileLoading",value:function(){this._pendingCount++,this.stats.get("Tiles Loading").incrementCount()}},{key:"_onEndTileLoading",value:function(){this._pendingCount--,this.stats.get("Tiles Loading").decrementCount()}},{key:"_addTileToCache",value:function(e){this._cache.add(this,e,(function(t){return t._updateCacheStats(e)}))}},{key:"_updateCacheStats",value:function(e){this.stats.get("Tiles Loaded").incrementCount(),this.stats.get("Tiles In Memory").incrementCount(),this.gpuMemoryUsageInBytes+=e.content.byteLength||0,this.stats.get("Tile Memory Use").count=this.gpuMemoryUsageInBytes}},{key:"_unloadTile",value:function(e){this.gpuMemoryUsageInBytes-=e.content.byteLength||0,this.stats.get("Tiles In Memory").decrementCount(),this.stats.get("Tiles Unloaded").incrementCount(),this.stats.get("Tile Memory Use").count=this.gpuMemoryUsageInBytes,this.options.onTileUnload(e),e.unloadContent()}},{key:"_destroy",value:function(){var e=[];for(this.root&&e.push(this.root);e.length>0;){var t,n=e.pop(),r=Ga(n.children);try{for(r.s();!(t=r.n()).done;){var i=t.value;e.push(i)}}catch(a){r.e(a)}finally{r.f()}this._destroyTile(n)}this.root=null}},{key:"_destroySubtree",value:function(e){var t=e,n=[];for(n.push(t);n.length>0;){var r,i=Ga((e=n.pop()).children);try{for(i.s();!(r=i.n()).done;){var a=r.value;n.push(a)}}catch(o){i.e(o)}finally{i.f()}e!==t&&this._destroyTile(e)}t.children=[]}},{key:"_destroyTile",value:function(e){this._cache.unloadTile(this,e),this._unloadTile(e),e.destroy()}},{key:"_initializeCesiumTileset",value:function(e){if(this.asset=e.asset,!this.asset)throw new Error("Tileset must have an asset property.");if("0.0"!==this.asset.version&&"1.0"!==this.asset.version)throw new Error("The tileset must be 3D Tiles version 0.0 or 1.0.");"tilesetVersion"in this.asset&&(this._queryParams.v=this.asset.tilesetVersion),this.credits={attributions:this.options.attributions||[]},this.description=this.options.description,this.properties=e.properties,this.geometricError=e.geometricError,this._extensionsUsed=e.extensionsUsed,this.extras=e.extras}},{key:"_initializeI3STileset",value:function(e){"token"in this.options&&(this._queryParams.token=this.options.token),this._defaultGeometrySchema=e.store.defaultGeometrySchema}},{key:"hasExtension",value:function(e){return Boolean(this._extensionsUsed&&this._extensionsUsed.indexOf(e)>-1)}},{key:"tiles",get:function(){return Object.values(this._tiles)}},{key:"queryParams",get:function(){return this._queryParamsString||(this._queryParamsString=function(e){for(var t=[],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];t.push("".concat(i,"=").concat(e[i]))}switch(t.length){case 0:return"";case 1:return"?".concat(t[0]);default:return"?".concat(t.join("&"))}}(this._queryParams)),this._queryParamsString}}]),e}(),Ka={COMPOSITE:"cmpt",POINT_CLOUD:"pnts",BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",GEOMETRY:"geom",VECTOR:"vect"};Object.keys(Ka);function Wa(e,t,n){Object(Si.a)(e instanceof ArrayBuffer);var r=new TextDecoder("utf8"),i=new Uint8Array(e,t,n);return r.decode(i)}function Va(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=new DataView(e);return"".concat(String.fromCharCode(n.getUint8(t+0))).concat(String.fromCharCode(n.getUint8(t+1))).concat(String.fromCharCode(n.getUint8(t+2))).concat(String.fromCharCode(n.getUint8(t+3)))}var Xa,Za=n(345),$a=n(94);function eo(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 to(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eo(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function no(e){return ro.apply(this,arguments)}function ro(){return(ro=Object(F.a)(N.a.mark((function e(t){var n;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.modules||{},Xa=n.draco3d?Xa||new Promise((function(e){var t=n.draco3d.createDecoderModule({onModuleLoaded:function(){e({draco:t})}})})):Xa||io(t),e.next=4,Xa;case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function io(e){return ao.apply(this,arguments)}function ao(){return(ao=Object(F.a)(N.a.mark((function e(t){var n,r,i,a;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.draco&&t.draco.decoderType,e.next="js"===e.t0?3:(e.t0,7);break;case 3:return e.next=5,Object(Za.a)("draco_decoder.js","draco",t);case 5:return n=e.sent,e.abrupt("break",21);case 7:return e.t1=Promise,e.next=10,Object(Za.a)("draco_wasm_wrapper.js","draco",t);case 10:return e.t2=e.sent,e.next=13,Object(Za.a)("draco_decoder.wasm","draco",t);case 13:return e.t3=e.sent,e.t4=[e.t2,e.t3],e.next=17,e.t1.all.call(e.t1,e.t4);case 17:i=e.sent,a=Object(p.a)(i,2),n=a[0],r=a[1];case 21:return n=n||$a.a.DracoDecoderModule,e.next=24,oo(n,r);case 24:return e.abrupt("return",e.sent);case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function oo(e,t){var n={};return t&&(n.wasmBinary=t),new Promise((function(t){e(to(to({},n),{},{onModuleLoaded:function(e){return t({draco:e})}}))}))}var so=n(346),uo=0,Ao=1,co={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},lo={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},fo=function(){function e(t){Object(s.a)(this,e),this.draco=t,this.drawMode="TRIANGLE",this.metadataQuerier={}}return Object(h.a)(e,[{key:"destroy",value:function(){}},{key:"destroyGeometry",value:function(e){e&&this.draco.destroy(e.dracoGeometry)}},{key:"parseSync",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.metadataQuerier=new this.draco.MetadataQuerier;var n=new this.draco.DecoderBuffer;n.Init(new Int8Array(e),e.byteLength);var r,i,a,o=new this.draco.Decoder,s={};try{var u=o.GetEncodedGeometryType(n);switch(u){case this.draco.TRIANGULAR_MESH:i=new this.draco.Mesh,r=o.DecodeBufferToMesh(n,i),a={type:uo,faceCount:i.num_faces(),attributeCount:i.num_attributes(),vertexCount:i.num_points()};break;case this.draco.POINT_CLOUD:i=new this.draco.PointCloud,r=o.DecodeBufferToPointCloud(n,i),a={type:Ao,attributeCount:i.num_attributes(),vertexCount:i.num_points()};break;default:throw new Error("Unknown DRACO geometry type.")}if(!r.ok()||!i.ptr){var A="DRACO decompression failed: ".concat(r.error_msg());throw i&&this.draco.destroy(i),new Error(A)}s.loaderData={header:a},this._extractDRACOGeometry(o,i,u,s,t);var c=this._getGeometryMetadata(o,i);s.header={vertexCount:a.vertexCount,boundingBox:Object(so.a)(s.attributes),metadata:c}}finally{this.draco.destroy(o),this.draco.destroy(n),this.draco.destroy(i),this.draco.destroy(this.metadataQuerier)}return s}},{key:"_extractDRACOGeometry",value:function(e,t,n,r,i){var a=this._getAttributes(e,t,i);if(!a.POSITION)throw new Error("DRACO decompressor: No position attribute found.");return n===this.draco.TRIANGULAR_MESH?(a.indices="TRIANGLE_STRIP"===this.drawMode?this._getMeshStripIndices(e,t):this._getMeshFaceIndices(e,t),r.mode="TRIANGLE_STRIP"===this.drawMode?5:4):r.mode=0,a.indices&&(r.indices={value:a.indices,size:1},delete a.indices),r.attributes=a,r}},{key:"getPositionAttributeMetadata",value:function(e){this.metadata=this.metadata||{},this.metadata.attributes=this.metadata.attributes||{};var t=new this.draco.AttributeQuantizationTransform;if(t.InitFromAttribute(e)){this.metadata.attributes.position.isQuantized=!0,this.metadata.attributes.position.maxRange=t.range(),this.metadata.attributes.position.numQuantizationBits=t.quantization_bits(),this.metadata.attributes.position.minValues=new Float32Array(3);for(var n=0;n<3;++n)this.metadata.attributes.position.minValues[n]=t.min_value(n)}this.draco.destroy(t)}},{key:"_getAttributes",value:function(e,t,n){for(var r={},i=t.num_points(),a=0;a<t.num_attributes();a++){var o=e.GetAttribute(t,a),s=this._getAttributeMetadata(e,t,a),u={uniqueId:o.unique_id(),attributeType:o.attribute_type(),dataType:lo[o.data_type()],size:o.size(),numComponents:o.num_components(),byteOffset:o.byte_offset(),byteStride:o.byte_stride(),normalized:o.normalized(),metadata:s},A=this._deduceAttributeName(u,n),c=this._getAttributeTypedArray(e,t,o,A).typedArray;r[A]={value:c,size:c.length/i,metadata:s}}return r}},{key:"_getMeshFaceIndices",value:function(e,t){for(var n=t.num_faces(),r=new Uint32Array(3*n),i=new this.draco.DracoInt32Array,a=0;a<n;++a){e.GetFaceFromMesh(t,a,i);var o=3*a;r[o]=i.GetValue(0),r[o+1]=i.GetValue(1),r[o+2]=i.GetValue(2)}return this.draco.destroy(i),r}},{key:"_getMeshStripIndices",value:function(e,t){var n=new this.draco.DracoInt32Array;e.GetTriangleStripsFromMesh(t,n);for(var r=new Uint32Array(n.size()),i=0;i<n.size();++i)r[i]=n.GetValue(i);return this.draco.destroy(n),r}},{key:"_getAttributeTypedArray",value:function(e,t,n,r){if(0===n.ptr){var i="DRACO decode bad attribute ".concat(r);throw new Error(i)}var a,o,s=lo[n.data_type()],u=n.num_components(),A=t.num_points()*u;switch(s){case Float32Array:a=new this.draco.DracoFloat32Array,e.GetAttributeFloatForAllPoints(t,n,a),o=new Float32Array(A);break;case Int8Array:a=new this.draco.DracoInt8Array,e.GetAttributeInt8ForAllPoints(t,n,a),o=new Int8Array(A);break;case Int16Array:a=new this.draco.DracoInt16Array,e.GetAttributeInt16ForAllPoints(t,n,a),o=new Int16Array(A);break;case Int32Array:a=new this.draco.DracoInt32Array,e.GetAttributeInt32ForAllPoints(t,n,a),o=new Int32Array(A);break;case Uint8Array:a=new this.draco.DracoUInt8Array,e.GetAttributeUInt8ForAllPoints(t,n,a),o=new Uint8Array(A);break;case Uint16Array:a=new this.draco.DracoUInt16Array,e.GetAttributeUInt16ForAllPoints(t,n,a),o=new Uint16Array(A);break;case Uint32Array:a=new this.draco.DracoUInt32Array,e.GetAttributeUInt32ForAllPoints(t,n,a),o=new Uint32Array(A);break;default:throw new Error("DRACO decoder: unexpected attribute type.")}for(var c=0;c<A;c++)o[c]=a.GetValue(c);return this.draco.destroy(a),{typedArray:o,components:u}}},{key:"_deduceAttributeName",value:function(e,t){var n=t.extraAttributes,r=void 0===n?{}:n;if(r&&"object"===Object(G.a)(r))for(var i=0,a=Object.entries(r);i<a.length;i++){var o=Object(p.a)(a[i],2),s=o[0];if(o[1]===e.uniqueId)return s}for(var u in co){var A=this.draco[u];if(e.attributeType===A)return co[u]}if(e.metadata){var c=t.attributeNameEntry||"name";if(e.metadata[c])return e.metadata[c].string}return"CUSTOM_ATTRIBUTE_".concat(e.uniqueId)}},{key:"_getGeometryMetadata",value:function(e,t){var n=e.GetMetadata(t);return this._queryDracoMetadata(n)}},{key:"_getAttributeMetadata",value:function(e,t,n){var r=e.GetAttributeMetadata(t,n);return this._queryDracoMetadata(r)}},{key:"_queryDracoMetadata",value:function(e){if(!e||!e.ptr)return{};for(var t={},n=this.metadataQuerier.NumEntries(e),r=0;r<n;r++){var i=this.metadataQuerier.GetEntryName(e,r);t[i]={int:this.metadataQuerier.GetIntEntry(e,i),string:this.metadataQuerier.GetStringEntry(e,i),double:this.metadataQuerier.GetDoubleEntry(e,i),intArray:this.metadataQuerier.GetIntEntryArray(e,i)}}return t}},{key:"decode",value:function(e,t){return this.parseSync(e,t)}}]),e}();function ho(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 go(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ho(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ho(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var po=go(go({},{id:"draco",name:"Draco",version:"2.3.0",extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"===("undefined"===typeof WebAssembly?"undefined":Object(G.a)(WebAssembly))?"wasm":"js",libraryPath:"libs/",workerUrl:"https://unpkg.com/@loaders.gl/draco@".concat("2.3.0","/dist/draco-loader.worker.js"),localWorkerUrl:"modules/draco/dist/draco-loader.worker.dev.js",extraAttributes:{}}}}),{},{parse:function(e,t,n,r){return vo.apply(this,arguments)}});function vo(){return(vo=Object(F.a)(N.a.mark((function e(t,n,r,i){var a,o,s;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,no(n);case 2:return a=e.sent,o=a.draco,s=new fo(o),e.prev=5,e.abrupt("return",s.parseSync(t,go({extraAttributes:n.draco&&n.draco.extraAttributes||null},n.parseOptions||{})));case 7:return e.prev=7,s.destroy(),e.finish(7);case 10:case"end":return e.stop()}}),e,null,[[5,,7,10]])})))).apply(this,arguments)}function yo(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 mo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yo(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Io={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130},bo=mo(mo({},{POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6}),Io);function Eo(e,t){if(!e)throw new Error("math.gl assertion ".concat(t))}Math.PI,Math.PI;var Co={};function Bo(e){return Math.round(e/Co.EPSILON)*Co.EPSILON}function wo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.precision,r=void 0===n?Co.precision||4:n;return e=Bo(e),"".concat(parseFloat(e.toPrecision(r)))}function Qo(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ko(e,t,n){var r=Co.EPSILON;n&&(Co.EPSILON=n);try{if(e===t)return!0;if(Qo(e)&&Qo(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;++i)if(!ko(e[i],t[i]))return!1;return!0}return e&&e.equals?e.equals(t):t&&t.equals?t.equals(e):!(!Number.isFinite(e)||!Number.isFinite(t))&&Math.abs(e-t)<=Co.EPSILON*Math.max(1,Math.abs(e),Math.abs(t))}finally{Co.EPSILON=r}}function _o(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}Co.EPSILON=1e-12,Co.debug=!1,Co.precision=4,Co.printTypes=!1,Co.printDegrees=!1,Co.printRowMajor=!0;var xo=function(e){Object(u.a)(n,e);var t=_o(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}},{key:"fromArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)this[n]=e[n+t];return this.check()}},{key:"to",value:function(e){return e===this?this:Qo(e)?this.toArray(e):this.toObject(e)}},{key:"toTarget",value:function(e){return e?this.to(e):this}},{key:"toArray",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)e[t+n]=this[n];return e}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(Co)}},{key:"formatString",value:function(e){for(var t="",n=0;n<this.ELEMENTS;++n)t+=(n>0?", ":"")+wo(this[n],e);return"".concat(e.printTypes?this.constructor.name:"","[").concat(t,"]")}},{key:"equals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(!ko(this[t],e[t]))return!1;return!0}},{key:"exactEquals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(this[t]!==e[t])return!1;return!0}},{key:"negate",value:function(){for(var e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}},{key:"lerp",value:function(e,t,n){void 0===n&&(n=t,t=e,e=this);for(var r=0;r<this.ELEMENTS;++r){var i=e[r];this[r]=i+n*(t[r]-i)}return this.check()}},{key:"min",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}},{key:"max",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}},{key:"clamp",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e[n]),t[n]);return this.check()}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]+=a[o];return this.check()}},{key:"subtract",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]-=a[o];return this.check()}},{key:"scale",value:function(e){if(Array.isArray(e))return this.multiply(e);for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"sub",value:function(e){return this.subtract(e)}},{key:"setScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}},{key:"addScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}},{key:"subScalar",value:function(e){return this.addScalar(-e)}},{key:"multiplyScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"divideScalar",value:function(e){return this.scale(1/e)}},{key:"clampScalar",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e),t);return this.check()}},{key:"multiplyByScalar",value:function(e){return this.scale(e)}},{key:"check",value:function(){if(Co.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}},{key:"validate",value:function(){for(var e=this.length===this.ELEMENTS,t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}},{key:"ELEMENTS",get:function(){return Eo(!1),0}},{key:"RANK",get:function(){return Eo(!1),0}},{key:"elements",get:function(){return this}}]),n}(Object(U.a)(Array));function So(e,t){if(e.length!==t)return!1;for(var n=0;n<e.length;++n)if(!Number.isFinite(e[n]))return!1;return!0}function Oo(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}function Do(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(Co.debug&&!So(e,t))throw new Error("math.gl: ".concat(n," some fields set to invalid numbers'"));return e}var Ro={};function jo(e,t){Ro[e]||(Ro[e]=!0,console.warn("".concat(e," has been removed in version ").concat(t,", see upgrade guide for more information")))}function Mo(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var No=function(e){Object(u.a)(n,e);var t=Mo(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"copy",value:function(e){return Eo(!1),this}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var e=0,t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(e){return Math.sqrt(this.distanceSquared(e))}},{key:"distanceSquared",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n){var r=this[n]-e[n];t+=r*r}return Oo(t)}},{key:"dot",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n)t+=this[n]*e[n];return Oo(t)}},{key:"normalize",value:function(){var e=this.magnitude();if(0!==e)for(var t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}},{key:"multiply",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]*=a[o];return this.check()}},{key:"divide",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]/=a[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(e){return this.distance(e)}},{key:"distanceToSquared",value:function(e){return this.distanceSquared(e)}},{key:"getComponent",value:function(e){return Eo(e>=0&&e<this.ELEMENTS,"index is out of range"),Oo(this[e])}},{key:"setComponent",value:function(e,t){return Eo(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=t,this.check()}},{key:"addVectors",value:function(e,t){return this.copy(e).add(t)}},{key:"subVectors",value:function(e,t){return this.copy(e).subtract(t)}},{key:"multiplyVectors",value:function(e,t){return this.copy(e).multiply(t)}},{key:"addScaledVector",value:function(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}},{key:"x",get:function(){return this[0]},set:function(e){this[0]=Oo(e)}},{key:"y",get:function(){return this[1]},set:function(e){this[1]=Oo(e)}}]),n}(xo);function Fo(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[3]*r+n[7]*i+n[11]*a||1;return e[0]=(n[0]*r+n[4]*i+n[8]*a)/o,e[1]=(n[1]*r+n[5]*i+n[9]*a)/o,e[2]=(n[2]*r+n[6]*i+n[10]*a)/o,e}function To(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var Lo,Po=[0,0,0],Uo={},Go=function(e){Object(u.a)(n,e);var t=To(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object(s.a)(this,n),e=t.call(this,-0,-0,-0),1===arguments.length&&Qo(r)?e.copy(r):(Co.debug&&(Oo(r),Oo(i),Oo(a)),e[0]=r,e[1]=i,e[2]=a),e}return Object(h.a)(n,null,[{key:"ZERO",get:function(){return Uo.ZERO=Uo.ZERO||Object.freeze(new n(0,0,0,0))}}]),Object(h.a)(n,[{key:"set",value:function(e,t,n){return this[0]=e,this[1]=t,this[2]=n,this.check()}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}},{key:"fromObject",value:function(e){return Co.debug&&(Oo(e.x),Oo(e.y),Oo(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}},{key:"toObject",value:function(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}},{key:"angle",value:function(e){return ae.a(this,e)}},{key:"cross",value:function(e){return ae.c(this,this,e),this.check()}},{key:"rotateX",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?Po:n;return ae.k(this,this,r,t),this.check()}},{key:"rotateY",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?Po:n;return ae.l(this,this,r,t),this.check()}},{key:"rotateZ",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?Po:n;return ae.m(this,this,r,t),this.check()}},{key:"transform",value:function(e){return this.transformAsPoint(e)}},{key:"transformAsPoint",value:function(e){return ae.q(this,this,e),this.check()}},{key:"transformAsVector",value:function(e){return Fo(this,this,e),this.check()}},{key:"transformByMatrix3",value:function(e){return ae.p(this,this,e),this.check()}},{key:"transformByMatrix2",value:function(e){return function(e,t,n){var r=t[0],i=t[1];e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2]}(this,this,e),this.check()}},{key:"transformByQuaternion",value:function(e){return ae.r(this,this,e),this.check()}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(e){this[2]=Oo(e)}}]),n}(No),qo=(Lo={},Object(O.a)(Lo,Io.DOUBLE,Float64Array),Object(O.a)(Lo,Io.FLOAT,Float32Array),Object(O.a)(Lo,Io.UNSIGNED_SHORT,Uint16Array),Object(O.a)(Lo,Io.UNSIGNED_INT,Uint32Array),Object(O.a)(Lo,Io.UNSIGNED_BYTE,Uint8Array),Object(O.a)(Lo,Io.BYTE,Int8Array),Object(O.a)(Lo,Io.SHORT,Int16Array),Object(O.a)(Lo,Io.INT,Int32Array),Lo),Ho={DOUBLE:Io.DOUBLE,FLOAT:Io.FLOAT,UNSIGNED_SHORT:Io.UNSIGNED_SHORT,UNSIGNED_INT:Io.UNSIGNED_INT,UNSIGNED_BYTE:Io.UNSIGNED_BYTE,BYTE:Io.BYTE,SHORT:Io.SHORT,INT:Io.INT},Yo=function(){function e(){Object(s.a)(this,e)}return Object(h.a)(e,null,[{key:"fromTypedArray",value:function(e){for(var t in e=ArrayBuffer.isView(e)?e.constructor:e,qo){if(qo[t]===e)return t}throw new Error("Failed to convert GL type")}},{key:"fromName",value:function(e){var t=Ho[e];if(!t)throw new Error("Failed to convert GL type");return t}},{key:"getArrayType",value:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e){case Io.UNSIGNED_SHORT_5_6_5:case Io.UNSIGNED_SHORT_4_4_4_4:case Io.UNSIGNED_SHORT_5_5_5_1:return Uint16Array;default:var t=qo[e];if(!t)throw new Error("Failed to convert GL type");return t}}},{key:"getByteSize",value:function(t){return e.getArrayType(t).BYTES_PER_ELEMENT}},{key:"validate",value:function(t){return Boolean(e.getArrayType(t))}},{key:"createTypedArray",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3?arguments[3]:void 0;void 0===i&&(i=(n.byteLength-r)/e.getByteSize(t));var a=e.getArrayType(t);return new a(n,r,i)}}]),e}(),Jo=function(){function e(t,n){Object(s.a)(this,e),this.json=t,this.buffer=n,this.featuresLength=0,this._cachedTypedArrays={}}return Object(h.a)(e,[{key:"getExtension",value:function(e){return this.json.extensions&&this.json.extensions[e]}},{key:"hasProperty",value:function(e){return Boolean(this.json[e])}},{key:"getGlobalProperty",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bo.UNSIGNED_INT,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=this.json[e];return r&&Number.isFinite(r.byteOffset)?this._getTypedArrayFromBinary(e,t,n,1,r.byteOffset):r}},{key:"getPropertyArray",value:function(e,t,n){var r=this.json[e];return r&&Number.isFinite(r.byteOffset)?("componentType"in r&&(t=Yo.fromName(r.componentType)),this._getTypedArrayFromBinary(e,t,n,this.featuresLength,r.byteOffset)):this._getTypedArrayFromArray(e,t,r)}},{key:"getProperty",value:function(e,t,n,r,i){var a=this.json[e];if(!a)return a;var o=this.getPropertyArray(e,t,n);if(1===n)return o[r];for(var s=0;s<n;++s)i[s]=o[n*r+s];return i}},{key:"_getTypedArrayFromBinary",value:function(e,t,n,r,i){var a=this._cachedTypedArrays,o=a[e];return o||(o=Yo.createTypedArray(t,this.buffer.buffer,this.buffer.byteOffset+i,r*n),a[e]=o),o}},{key:"_getTypedArrayFromArray",value:function(e,t,n){var r=this._cachedTypedArrays,i=r[e];return i||(i=Yo.createTypedArray(t,n),r[e]=i),i}}]),e}(),zo={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ko={SCALAR:function(e,t){return e[t]},VEC2:function(e,t){return[e[2*t+0],e[2*t+1]]},VEC3:function(e,t){return[e[3*t+0],e[3*t+1],e[3*t+2]]},VEC4:function(e,t){return[e[4*t+0],e[4*t+1],e[4*t+2],e[4*t+3]]},MAT2:function(e,t){return[e[4*t+0],e[4*t+1],e[4*t+2],e[4*t+3]]},MAT3:function(e,t){return[e[9*t+0],e[9*t+1],e[9*t+2],e[9*t+3],e[9*t+4],e[9*t+5],e[9*t+6],e[9*t+7],e[9*t+8]]},MAT4:function(e,t){return[e[16*t+0],e[16*t+1],e[16*t+2],e[16*t+3],e[16*t+4],e[16*t+5],e[16*t+6],e[16*t+7],e[16*t+8],e[16*t+9],e[16*t+10],e[16*t+11],e[16*t+12],e[16*t+13],e[16*t+14],e[16*t+15]]}},Wo={SCALAR:function(e,t,n){t[n]=e},VEC2:function(e,t,n){t[2*n+0]=e[0],t[2*n+1]=e[1]},VEC3:function(e,t,n){t[3*n+0]=e[0],t[3*n+1]=e[1],t[3*n+2]=e[2]},VEC4:function(e,t,n){t[4*n+0]=e[0],t[4*n+1]=e[1],t[4*n+2]=e[2],t[4*n+3]=e[3]},MAT2:function(e,t,n){t[4*n+0]=e[0],t[4*n+1]=e[1],t[4*n+2]=e[2],t[4*n+3]=e[3]},MAT3:function(e,t,n){t[9*n+0]=e[0],t[9*n+1]=e[1],t[9*n+2]=e[2],t[9*n+3]=e[3],t[9*n+4]=e[4],t[9*n+5]=e[5],t[9*n+6]=e[6],t[9*n+7]=e[7],t[9*n+8]=e[8],t[9*n+9]=e[9]},MAT4:function(e,t,n){t[16*n+0]=e[0],t[16*n+1]=e[1],t[16*n+2]=e[2],t[16*n+3]=e[3],t[16*n+4]=e[4],t[16*n+5]=e[5],t[16*n+6]=e[6],t[16*n+7]=e[7],t[16*n+8]=e[8],t[16*n+9]=e[9],t[16*n+10]=e[10],t[16*n+11]=e[11],t[16*n+12]=e[12],t[16*n+13]=e[13],t[16*n+14]=e[14],t[16*n+15]=e[15]}};function Vo(e){throw new Error('"'+e+'" is read-only')}var Xo=function(e){return void 0!==e};function Zo(e,t,n){if(!t)return null;var r=e.getExtension("3DTILES_batch_table_hierarchy"),i=t.HIERARCHY;return i&&(console.warn("3D Tile Parser: HIERARCHY is deprecated. Use 3DTILES_batch_table_hierarchy."),t.extensions=t.extensions||{},t.extensions["3DTILES_batch_table_hierarchy"]=i,r=i),r?function(e,t){var n,r,i,a,o=e.instancesLength,s=e.classes,u=e.classIds,A=e.parentCounts,c=e.parentIds,l=o;Xo(u.byteOffset)&&(u.componentType=defaultValue(u.componentType,GL.UNSIGNED_SHORT),u.type=AttributeType.SCALAR,i=getBinaryAccessor(u),Vo("classIds"),u=i.createArrayBufferView(t.buffer,t.byteOffset+u.byteOffset,o));if(Xo(A))for(Xo(A.byteOffset)&&(A.componentType=defaultValue(A.componentType,GL.UNSIGNED_SHORT),A.type=AttributeType.SCALAR,i=getBinaryAccessor(A),Vo("parentCounts"),A=i.createArrayBufferView(t.buffer,t.byteOffset+A.byteOffset,o)),a=new Uint16Array(o),Vo("parentIdsLength"),l=0,n=0;n<o;++n)a[n]=l,l+=(Vo("parentIdsLength"),A[n]);Xo(c)&&Xo(c.byteOffset)&&(c.componentType=defaultValue(c.componentType,GL.UNSIGNED_SHORT),c.type=AttributeType.SCALAR,i=getBinaryAccessor(c),Vo("parentIds"),c=i.createArrayBufferView(t.buffer,t.byteOffset+c.byteOffset,l));var f=s.length;for(n=0;n<f;++n){var h=s[n].length,g=s[n].instances,d=getBinaryProperties(h,g,t);s[n].instances=combine(d,g)}var p=new Array(f).fill(0),v=new Uint16Array(o);for(n=0;n<o;++n)r=u[n],v[n]=p[r],++p[r];var y={classes:s,classIds:u,classIndexes:v,parentCounts:A,parentIndexes:a,parentIds:c};return function(e){for(var t=e.classIds.length,n=0;n<t;++n)es(e,n,stack)}(y),y}(r,n):null}function $o(e,t,n){if(e){var r=e.parentCounts;return e.parentIds?n(e,t):r>0?function(e,t,n){var r=e.classIds,i=e.parentCounts,a=e.parentIds,o=e.parentIndexes,s=r.length,u=scratchVisited;u.length=Math.max(u.length,s);var A=++marker,c=scratchStack;c.length=0,c.push(t);for(;c.length>0;)if(t=c.pop(),u[t]!==A){u[t]=A;var l=n(e,t);if(Xo(l))return l;for(var f=i[t],h=o[t],g=0;g<f;++g){var d=a[h+g];d!==t&&c.push(d)}}return null}(e,t,n):function(e,t,n){var r=!0;for(;r;){var i=n(e,t);if(Xo(i))return i;var a=e.parentIds[t];r=a!==t,t=a}throw new Error("traverseHierarchySingleParent")}(e,t,n)}}function es(e,t,n){var r=e.parentCounts,i=e.parentIds,a=e.parentIndexes,o=e.classIds.length;if(Xo(i)){assert(t<o,"Parent index ".concat(t," exceeds the total number of instances: ").concat(o)),assert(-1===n.indexOf(t),"Circular dependency detected in the batch table hierarchy."),n.push(t);for(var s=Xo(r)?r[t]:1,u=Xo(r)?a[t]:t,A=0;A<s;++A){var c=i[u+A];c!==t&&es(e,c,n)}n.pop(t)}}function ts(e){return void 0!==e&&null!==e}var ns=function(e,t){return e},rs={HIERARCHY:!0,extensions:!0,extras:!0},is=function(){function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};for(var a in Object(s.a)(this,e),Object(Si.a)(r>=0),this.json=t||{},this.binary=n,this.featureCount=r,this._extensions=this.json&&this.json.extensions||{},this._properties={},this.json)rs[a]||(this._properties[a]=this.json[a]);this._binaryProperties=this._initializeBinaryProperties(),i["3DTILES_batch_table_hierarchy"]&&(this._hierarchy=Zo(this,this.json,this.binary))}return Object(h.a)(e,[{key:"getExtension",value:function(e){return this.json&&this.json.extensions&&this.json.extensions[e]}},{key:"memorySizeInBytes",value:function(){return 0}},{key:"isClass",value:function(e,t){return this._checkBatchId(e),Object(Si.a)("string"===typeof t,t),!!this._hierarchy&&ts($o(this._hierarchy,e,(function(e,n){var r=e.classIds[n];return e.classes[r].name===t})))}},{key:"isExactClass",value:function(e,t){return Object(Si.a)("string"===typeof t,t),this.getExactClassName(e)===t}},{key:"getExactClassName",value:function(e){if(this._checkBatchId(e),this._hierarchy){var t=this._hierarchy.classIds[e];return this._hierarchy.classes[t].name}}},{key:"hasProperty",value:function(e,t){return this._checkBatchId(e),Object(Si.a)("string"===typeof t,t),ts(this._properties[t])||this._hasPropertyInHierarchy(e,t)}},{key:"getPropertyNames",value:function(e,t){var n;this._checkBatchId(e),(t=ts(t)?t:[]).length=0;var r=Object.keys(this._properties);return(n=t).push.apply(n,Object(q.a)(r)),this._hierarchy&&this._getPropertyNamesInHierarchy(e,t),t}},{key:"getProperty",value:function(e,t){if(this._checkBatchId(e),Object(Si.a)("string"===typeof t,t),this._binaryProperties){var n=this._binaryProperties[t];if(ts(n))return this._getBinaryProperty(n,e)}var r=this._properties[t];if(ts(r))return ns(r[e]);if(this._hierarchy){var i=this._getHierarchyProperty(e,t);if(ts(i))return i}}},{key:"setProperty",value:function(e,t,n){var r=this.featureCount;if(this._checkBatchId(e),Object(Si.a)("string"===typeof t,t),this._binaryProperties){var i=this._binaryProperties[t];if(i)return void this._setBinaryProperty(i,e,n)}if(!this._hierarchy||!this._setHierarchyProperty(this,e,t,n)){var a=this._properties[t];ts(a)||(this._properties[t]=new Array(r),a=this._properties[t]),a[e]=ns(n)}}},{key:"_checkBatchId",value:function(e){if(!(e>=0&&e<this.featureCount))throw new Error("batchId not in range [0, featureCount - 1].")}},{key:"_getBinaryProperty",value:function(e,t){return e.unpack(e.typedArray,t)}},{key:"_setBinaryProperty",value:function(e,t,n){e.pack(n,e.typedArray,t)}},{key:"_initializeBinaryProperties",value:function(){var e=null;for(var t in this._properties){var n=this._properties[t],r=this._initializeBinaryProperty(t,n);r&&((e=e||{})[t]=r)}return e}},{key:"_initializeBinaryProperty",value:function(e,t){if("byteOffset"in t){var n=t;Object(Si.a)(this.binary,"Property ".concat(e," requires a batch table binary.")),Object(Si.a)(n.type,"Property ".concat(e," requires a type."));var r=function(e,t,n,r){var i=e.componentType;Object(Si.a)(e.componentType);var a="string"===typeof i?Yo.fromName(i):i,o=zo[e.type],s=Ko[e.type],u=Wo[e.type];return n+=e.byteOffset,{values:Yo.createTypedArray(a,t,n,o*r),type:a,size:o,unpacker:s,packer:u}}(n,this.binary.buffer,0|this.binary.byteOffset,this.featureCount);return{typedArray:r.values,componentCount:r.size,unpack:r.unpacker,pack:r.packer}}return null}},{key:"_hasPropertyInHierarchy",value:function(e,t){if(!this._hierarchy)return!1;var n=$o(this._hierarchy,e,(function(e,n){var r=e.classIds[n];return ts(e.classes[r].instances[t])}));return ts(n)}},{key:"_getPropertyNamesInHierarchy",value:function(e,t){$o(this._hierarchy,e,(function(e,n){var r=e.classIds[n],i=e.classes[r].instances;for(var a in i)i.hasOwnProperty(a)&&-1===t.indexOf(a)&&t.push(a)}))}},{key:"_getHierarchyProperty",value:function(e,t){var n=this;return $o(this._hierarchy,e,(function(e,r){var i=e.classIds[r],a=e.classes[i],o=e.classIndexes[r],s=a.instances[t];return ts(s)?ts(s.typedArray)?n._getBinaryProperty(s,o):ns(s[o]):null}))}},{key:"_setHierarchyProperty",value:function(e,t,n,r){var i=this,a=$o(this._hierarchy,t,(function(e,a){var o=e.classIds[a],s=e.classes[o],u=e.classIndexes[a],A=s.instances[n];return!!ts(A)&&(Object(Si.a)(a===t,'Inherited property "'.concat(n,'" is read-only.')),ts(A.typedArray)?i._setBinaryProperty(A,u,r):A[u]=ns(r),!0)}));return ts(a)}}]),e}();function as(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=new DataView(t);if(e.magic=r.getUint32(n,!0),n+=4,e.version=r.getUint32(n,!0),n+=4,e.byteLength=r.getUint32(n,!0),n+=4,1!==e.version)throw new Error("3D Tile Version ".concat(e.version," not supported"));return n}function os(e,t,n){var r=new DataView(t);return e.header=e.header||{},e.header.featureTableJsonByteLength=r.getUint32(n,!0),n+=4,e.header.featureTableBinaryByteLength=r.getUint32(n,!0),n+=4,e.header.batchTableJsonByteLength=r.getUint32(n,!0),n+=4,e.header.batchTableBinaryByteLength=r.getUint32(n,!0),n+=4}function ss(e,t,n,r){return n=function(e,t,n,r){var i=e.header,a=i.featureTableJsonByteLength,o=i.featureTableBinaryByteLength;if(e.featureTableJson={BATCH_LENGTH:0},a>0){var s=Wa(t,n,a);e.featureTableJson=JSON.parse(s)}return n+=a,e.featureTableBinary=new Uint8Array(t,n,o),n+=o}(e,t,n),n=function(e,t,n,r){var i=e.header,a=i.batchTableJsonByteLength,o=i.batchTableBinaryByteLength;if(a>0){var s=Wa(t,n,a);e.batchTableJson=JSON.parse(s),n+=a,o>0&&(e.batchTableBinary=new Uint8Array(t,n,o),e.batchTableBinary=new Uint8Array(e.batchTableBinary),n+=o)}return n}(e,t,n)}function us(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0],n=e>>11&31,r=e>>5&63,i=31&e;return t[0]=n<<3,t[1]=r<<2,t[2]=i<<3,t}function As(e,t,n){if(!t&&(!e||!e.batchIds||!n))return null;var r=e.batchIds,i=e.isRGB565,a=e.pointCount;if(r&&n){for(var o=new Uint8ClampedArray(3*a),s=0;s<a;s++){var u=r[s],A=n.getProperty(u,"dimensions").map((function(e){return 255*e}));o[3*s]=A[0],o[3*s+1]=A[1],o[3*s+2]=A[2]}return{type:bo.UNSIGNED_BYTE,value:o,size:3,normalized:!0}}if(i){for(var c=new Uint8ClampedArray(3*a),l=0;l<a;l++){var f=us(t[l]);c[3*l]=f[0],c[3*l+1]=f[1],c[3*l+2]=f[2]}return{type:bo.UNSIGNED_BYTE,value:c,size:3,normalized:!0}}return t&&t.length===3*a?{type:bo.UNSIGNED_BYTE,value:t,size:3,normalized:!0}:{type:bo.UNSIGNED_BYTE,value:t,size:4,normalized:!0}}function cs(e,t){if(!e)throw new Error("math.gl assertion ".concat(t))}Math.PI,Math.PI;var ls={};function fs(e){return Math.round(e/ls.EPSILON)*ls.EPSILON}function hs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.precision,r=void 0===n?ls.precision||4:n;return e=fs(e),"".concat(parseFloat(e.toPrecision(r)))}function gs(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ds(e,t,n){if(gs(e)){n=n||((i=e).clone?i.clone():new Array(i.length));for(var r=0;r<n.length&&r<e.length;++r)n[r]=t(e[r],r,n);return n}var i;return t(e)}function ps(e,t,n){return ds(e,(function(e){return Math.max(t,Math.min(n,e))}))}function vs(e,t,n){var r=ls.EPSILON;n&&(ls.EPSILON=n);try{if(e===t)return!0;if(gs(e)&&gs(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;++i)if(!vs(e[i],t[i]))return!1;return!0}return e&&e.equals?e.equals(t):t&&t.equals?t.equals(e):!(!Number.isFinite(e)||!Number.isFinite(t))&&Math.abs(e-t)<=ls.EPSILON*Math.max(1,Math.abs(e),Math.abs(t))}finally{ls.EPSILON=r}}function ys(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}ls.EPSILON=1e-12,ls.debug=!1,ls.precision=4,ls.printTypes=!1,ls.printDegrees=!1,ls.printRowMajor=!0;var ms=function(e){Object(u.a)(n,e);var t=ys(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}},{key:"fromArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)this[n]=e[n+t];return this.check()}},{key:"to",value:function(e){return e===this?this:gs(e)?this.toArray(e):this.toObject(e)}},{key:"toTarget",value:function(e){return e?this.to(e):this}},{key:"toArray",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0;n<this.ELEMENTS;++n)e[t+n]=this[n];return e}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(ls)}},{key:"formatString",value:function(e){for(var t="",n=0;n<this.ELEMENTS;++n)t+=(n>0?", ":"")+hs(this[n],e);return"".concat(e.printTypes?this.constructor.name:"","[").concat(t,"]")}},{key:"equals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(!vs(this[t],e[t]))return!1;return!0}},{key:"exactEquals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(this[t]!==e[t])return!1;return!0}},{key:"negate",value:function(){for(var e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}},{key:"lerp",value:function(e,t,n){void 0===n&&(n=t,t=e,e=this);for(var r=0;r<this.ELEMENTS;++r){var i=e[r];this[r]=i+n*(t[r]-i)}return this.check()}},{key:"min",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}},{key:"max",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}},{key:"clamp",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e[n]),t[n]);return this.check()}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]+=a[o];return this.check()}},{key:"subtract",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]-=a[o];return this.check()}},{key:"scale",value:function(e){if(Array.isArray(e))return this.multiply(e);for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"sub",value:function(e){return this.subtract(e)}},{key:"setScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}},{key:"addScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}},{key:"subScalar",value:function(e){return this.addScalar(-e)}},{key:"multiplyScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"divideScalar",value:function(e){return this.scale(1/e)}},{key:"clampScalar",value:function(e,t){for(var n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],e),t);return this.check()}},{key:"multiplyByScalar",value:function(e){return this.scale(e)}},{key:"check",value:function(){if(ls.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}},{key:"validate",value:function(){for(var e=this.length===this.ELEMENTS,t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}},{key:"ELEMENTS",get:function(){return cs(!1),0}},{key:"RANK",get:function(){return cs(!1),0}},{key:"elements",get:function(){return this}}]),n}(Object(U.a)(Array));function Is(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}function bs(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var Es=function(e){Object(u.a)(n,e);var t=bs(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"copy",value:function(e){return cs(!1),this}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var e=0,t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(e){return Math.sqrt(this.distanceSquared(e))}},{key:"distanceSquared",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n){var r=this[n]-e[n];t+=r*r}return Is(t)}},{key:"dot",value:function(e){for(var t=0,n=0;n<this.ELEMENTS;++n)t+=this[n]*e[n];return Is(t)}},{key:"normalize",value:function(){var e=this.magnitude();if(0!==e)for(var t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}},{key:"multiply",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]*=a[o];return this.check()}},{key:"divide",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++)for(var a=i[r],o=0;o<this.ELEMENTS;++o)this[o]/=a[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(e){return this.distance(e)}},{key:"distanceToSquared",value:function(e){return this.distanceSquared(e)}},{key:"getComponent",value:function(e){return cs(e>=0&&e<this.ELEMENTS,"index is out of range"),Is(this[e])}},{key:"setComponent",value:function(e,t){return cs(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=t,this.check()}},{key:"addVectors",value:function(e,t){return this.copy(e).add(t)}},{key:"subVectors",value:function(e,t){return this.copy(e).subtract(t)}},{key:"multiplyVectors",value:function(e,t){return this.copy(e).multiply(t)}},{key:"addScaledVector",value:function(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}},{key:"x",get:function(){return this[0]},set:function(e){this[0]=Is(e)}},{key:"y",get:function(){return this[1]},set:function(e){this[1]=Is(e)}}]),n}(ms);function Cs(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var Bs=function(e){Object(u.a)(n,e);var t=Cs(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(s.a)(this,n),e=t.call(this,2),gs(r)&&1===arguments.length?e.copy(r):(ls.debug&&(Is(r),Is(i)),e[0]=r,e[1]=i),e}return Object(h.a)(n,[{key:"set",value:function(e,t){return this[0]=e,this[1]=t,this.check()}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this.check()}},{key:"fromObject",value:function(e){return ls.debug&&(Is(e.x),Is(e.y)),this[0]=e.x,this[1]=e.y,this.check()}},{key:"toObject",value:function(e){return e.x=this[0],e.y=this[1],e}},{key:"horizontalAngle",value:function(){return Math.atan2(this.y,this.x)}},{key:"verticalAngle",value:function(){return Math.atan2(this.x,this.y)}},{key:"transform",value:function(e){return this.transformAsPoint(e)}},{key:"transformAsPoint",value:function(e){return be.j(this,this,e),this.check()}},{key:"transformAsVector",value:function(e){return function(e,t,n){var r=t[0],i=t[1],a=n[3]*r+n[7]*i||1;e[0]=(n[0]*r+n[4]*i)/a,e[1]=(n[1]*r+n[5]*i)/a}(this,this,e),this.check()}},{key:"transformByMatrix3",value:function(e){return be.i(this,this,e),this.check()}},{key:"transformByMatrix2x3",value:function(e){return be.h(this,this,e),this.check()}},{key:"transformByMatrix2",value:function(e){return be.g(this,this,e),this.check()}},{key:"ELEMENTS",get:function(){return 2}}]),n}(Es);function ws(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var Qs=[0,0,0],ks={},_s=function(e){Object(u.a)(n,e);var t=ws(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object(s.a)(this,n),e=t.call(this,-0,-0,-0),1===arguments.length&&gs(r)?e.copy(r):(ls.debug&&(Is(r),Is(i),Is(a)),e[0]=r,e[1]=i,e[2]=a),e}return Object(h.a)(n,null,[{key:"ZERO",get:function(){return ks.ZERO=ks.ZERO||Object.freeze(new n(0,0,0,0))}}]),Object(h.a)(n,[{key:"set",value:function(e,t,n){return this[0]=e,this[1]=t,this[2]=n,this.check()}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}},{key:"fromObject",value:function(e){return ls.debug&&(Is(e.x),Is(e.y),Is(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}},{key:"toObject",value:function(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}},{key:"angle",value:function(e){return ae.a(this,e)}},{key:"cross",value:function(e){return ae.c(this,this,e),this.check()}},{key:"rotateX",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?Qs:n;return ae.k(this,this,r,t),this.check()}},{key:"rotateY",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?Qs:n;return ae.l(this,this,r,t),this.check()}},{key:"rotateZ",value:function(e){var t=e.radians,n=e.origin,r=void 0===n?Qs:n;return ae.m(this,this,r,t),this.check()}},{key:"transform",value:function(e){return this.transformAsPoint(e)}},{key:"transformAsPoint",value:function(e){return ae.q(this,this,e),this.check()}},{key:"transformAsVector",value:function(e){return function(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[3]*r+n[7]*i+n[11]*a||1;e[0]=(n[0]*r+n[4]*i+n[8]*a)/o,e[1]=(n[1]*r+n[5]*i+n[9]*a)/o,e[2]=(n[2]*r+n[6]*i+n[10]*a)/o}(this,this,e),this.check()}},{key:"transformByMatrix3",value:function(e){return ae.p(this,this,e),this.check()}},{key:"transformByMatrix2",value:function(e){return function(e,t,n){var r=t[0],i=t[1];e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e[2]=t[2]}(this,this,e),this.check()}},{key:"transformByQuaternion",value:function(e){return ae.r(this,this,e),this.check()}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(e){this[2]=Is(e)}}]),n}(Es);Math.PI,Math.PI,Math.PI,Math.PI;function xs(e,t){if(!e)throw new Error("math.gl assertion failed. ".concat(t))}new Bs,new _s,new Bs,new Bs,new Uint8Array(1);function Ss(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:255;return ps(e,0,t)/t*2-1}function Os(e){return e<0?-1:1}function Ds(e,t,n,r){if(xs(r),e<0||e>n||t<0||t>n)throw new Error("x and y must be unsigned normalized integers between 0 and ".concat(n));if(r.x=Ss(e,n),r.y=Ss(t,n),r.z=1-(Math.abs(r.x)+Math.abs(r.y)),r.z<0){var i=r.x;r.x=(1-Math.abs(r.y))*Os(i),r.y=(1-Math.abs(i))*Os(r.y)}return r.normalize()}function Rs(e,t,n){return Ds(e,t,255,n)}var js=new Go;function Ms(e,t,n){return e.isQuantized?n["3d-tiles"]&&n["3d-tiles"].decodeQuantizedPositions?(e.isQuantized=!1,function(e,t){for(var n=new Go,r=new Float32Array(3*e.pointCount),i=0;i<e.pointCount;i++)n.set(t[3*i],t[3*i+1],t[3*i+2]).scale(1/e.quantizedRange).multiply(e.quantizedVolumeScale).add(e.quantizedVolumeOffset).toArray(r,3*i);return r}(e,t)):{type:bo.UNSIGNED_SHORT,value:t,size:3,normalized:!0}:t}function Ns(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 Fs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ns(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ns(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ts(e,t,n,r,i){return Ls.apply(this,arguments)}function Ls(){return(Ls=Object(F.a)(N.a.mark((function e(t,n,r,i,a){var o,s,u;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=as(t,n,r),r=os(t,n,r),r=ss(t,n,r),Ps(t),o=Us(t),s=o.featureTable,u=o.batchTable,e.next=7,Ys(t,s,u,i,a);case 7:return Gs(t,s,i),qs(t,s,u),Hs(t,s),e.abrupt("return",r);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ps(e){e.attributes={positions:null,colors:null,normals:null,batchIds:null},e.isQuantized=!1,e.isTranslucent=!1,e.isRGB565=!1,e.isOctEncoded16P=!1}function Us(e){var t=new Jo(e.featureTableJson,e.featureTableBinary),n=t.getGlobalProperty("POINTS_LENGTH");if(!Number.isFinite(n))throw new Error("POINTS_LENGTH must be defined");t.featuresLength=n,e.featuresLength=n,e.pointsLength=n,e.pointCount=n,e.rtcCenter=t.getGlobalProperty("RTC_CENTER",bo.FLOAT,3);var r=function(e,t){var n=null;if(!e.batchIds&&t.hasProperty("BATCH_ID")&&(e.batchIds=t.getPropertyArray("BATCH_ID",bo.UNSIGNED_SHORT,1),e.batchIds)){var r=t.getGlobalProperty("BATCH_LENGTH");if(!r)throw new Error("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");var i=e.batchTableJson,a=e.batchTableBinary;n=new is(i,a,r)}return n}(e,t);return{featureTable:t,batchTable:r}}function Gs(e,t,n){if(!e.attributes.positions)if(t.hasProperty("POSITION"))e.attributes.positions=t.getPropertyArray("POSITION",bo.FLOAT,3);else if(t.hasProperty("POSITION_QUANTIZED")){var r=t.getPropertyArray("POSITION_QUANTIZED",bo.UNSIGNED_SHORT,3);if(e.isQuantized=!0,e.quantizedRange=65535,e.quantizedVolumeScale=t.getGlobalProperty("QUANTIZED_VOLUME_SCALE",bo.FLOAT,3),!e.quantizedVolumeScale)throw new Error("QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");if(e.quantizedVolumeOffset=t.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",bo.FLOAT,3),!e.quantizedVolumeOffset)throw new Error("QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");e.attributes.positions=Ms(e,r,n)}if(!e.attributes.positions)throw new Error("Either POSITION or POSITION_QUANTIZED must be defined.")}function qs(e,t,n){if(!e.attributes.colors){var r=null;t.hasProperty("RGBA")?(r=t.getPropertyArray("RGBA",bo.UNSIGNED_BYTE,4),e.isTranslucent=!0):t.hasProperty("RGB")?r=t.getPropertyArray("RGB",bo.UNSIGNED_BYTE,3):t.hasProperty("RGB565")&&(r=t.getPropertyArray("RGB565",bo.UNSIGNED_SHORT,1),e.isRGB565=!0),e.attributes.colors=As(e,r,n)}t.hasProperty("CONSTANT_RGBA")&&(e.constantRGBA=t.getGlobalProperty("CONSTANT_RGBA",bo.UNSIGNED_BYTE,4))}function Hs(e,t){if(!e.attributes.normals){var n=null;t.hasProperty("NORMAL")?n=t.getPropertyArray("NORMAL",bo.FLOAT,3):t.hasProperty("NORMAL_OCT16P")&&(n=t.getPropertyArray("NORMAL_OCT16P",bo.UNSIGNED_BYTE,2),e.isOctEncoded16P=!0),e.attributes.normals=function(e,t){if(!t)return null;if(e.isOctEncoded16P){for(var n=new Float32Array(3*e.pointsLength),r=0;r<e.pointsLength;r++)Rs(t[2*r],t[2*r+1],js),js.toArray(n,3*r);return{type:bo.FLOAT,size:2,value:n}}return{type:bo.FLOAT,size:2,value:t}}(e,n)}}function Ys(e,t,n,r,i){return Js.apply(this,arguments)}function Js(){return(Js=Object(F.a)(N.a.mark((function e(t,n,r,i,a){var o,s,u,A,c,l,f,h;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((A=t.batchTableJson&&t.batchTableJson.extensions&&t.batchTableJson.extensions["3DTILES_draco_point_compression"])&&(u=A.properties),!(c=n.getExtension("3DTILES_draco_point_compression"))){e.next=15;break}if(s=c.properties,l=c.byteOffset,f=c.byteLength,s&&Number.isFinite(l)&&f){e.next=9;break}throw new Error("Draco properties, byteOffset, and byteLength must be defined");case 9:o=t.featureTableBinary.slice(l,l+f),t.hasPositions=Number.isFinite(s.POSITION),t.hasColors=Number.isFinite(s.RGB)||Number.isFinite(s.RGBA),t.hasNormals=Number.isFinite(s.NORMAL),t.hasBatchIds=Number.isFinite(s.BATCH_ID),t.isTranslucent=Number.isFinite(s.RGBA);case 15:if(o){e.next=17;break}return e.abrupt("return",!0);case 17:return h={buffer:o,properties:Fs(Fs({},s),u),featureTableProperties:s,batchTableProperties:u,dequantizeInShader:!1},e.next=20,zs(t,h,i,a);case 20:return e.abrupt("return",e.sent);case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zs(e,t,n,r){return Ks.apply(this,arguments)}function Ks(){return(Ks=Object(F.a)(N.a.mark((function e(t,n,r,i){var a,o,s,u,A,c,l,f,h,g,d,p,v,y;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.parse,e.next=3,a(n.buffer,po,{draco:{extraAttributes:n.batchTableProperties||{}}});case 3:if(o=e.sent,s=o.attributes.POSITION&&o.attributes.POSITION.value,u=o.attributes.COLOR_0&&o.attributes.COLOR_0.value,A=o.attributes.NORMAL&&o.attributes.NORMAL.value,c=o.attributes.BATCH_ID&&o.attributes.BATCH_ID.value,l=s&&o.attributes.POSITION.value.quantization,f=A&&o.attributes.NORMAL.value.quantization,l&&(h=o.POSITION.data.quantization,g=h.range,t.quantizedVolumeScale=new Go(g,g,g),t.quantizedVolumeOffset=new Go(h.minValues),t.quantizedRange=(1<<h.quantizationBits)-1,t.isQuantizedDraco=!0),f&&(t.octEncodedRange=(1<<o.NORMAL.data.quantization.quantizationBits)-1,t.isOctEncodedDraco=!0),d={},n.batchTableProperties)for(p=0,v=Object.keys(n.batchTableProperties);p<v.length;p++)y=v[p],o.attributes[y]&&o.attributes[y].value&&(d[y.toLowerCase()]=o.attributes[y].value);t.attributes=Fs({positions:s,colors:As(t,u),normals:A,batchIds:c},d);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ws=n(926),Vs=n(431),Xs=n(208);function Zs(e,t){if(!e)throw new Error(t||"assert failed: gltf")}function $s(e,t){if(e.startsWith("data:")||e.startsWith("http:")||e.startsWith("https:"))return e;var n=t.baseUri||t.uri;if(!n)throw new Error("'baseUri' must be provided to resolve relative url ".concat(e));return n.substr(0,n.lastIndexOf("/")+1)+e}function eu(e,t,n){var r=e.bufferViews[n];Zs(r);var i=t[r.buffer];Zs(i);var a=(r.byteOffset||0)+i.byteOffset;return new Uint8Array(i.arrayBuffer,a,r.byteLength)}var tu=n(170);var nu=["SCALAR","VEC2","VEC3","VEC4"],ru=new Map([[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126]]),iu={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},au={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},ou={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function su(e){return nu[e-1]||nu[0]}function uu(e){var t=ru.get(e.constructor);if(!t)throw new Error("Illegal typed array");return t}function Au(e,t){var n=ou[e.componentType],r=iu[e.type],i=au[e.componentType],a=e.count*r,o=e.count*r*i;return Zs(o>=0&&o<=t.byteLength),{ArrayType:n,length:a,byteLength:o}}var cu=function(){function e(t){if(Object(s.a)(this,e),t instanceof e)return t;t||(t={json:{asset:{version:"2.0",generator:"loaders.gl"},buffers:[]},buffers:[]}),this.byteLength=0,this.gltf=t,Zs(this.gltf.json)}return Object(h.a)(e,[{key:"getApplicationData",value:function(e){return this.json[e]}},{key:"getExtraData",value:function(e){return(this.json.extras||{})[e]}},{key:"getExtension",value:function(e){var t=this.getUsedExtensions().find((function(t){return t===e})),n=this.json.extensions||{};return t?n[e]||!0:null}},{key:"getRequiredExtension",value:function(e){return this.getRequiredExtensions().find((function(t){return t===e}))?this.getExtension(e):null}},{key:"getRequiredExtensions",value:function(){return this.json.extensionsRequired||[]}},{key:"getUsedExtensions",value:function(){return this.json.extensionsUsed||[]}},{key:"getObjectExtension",value:function(e,t){return(e.extensions||{})[t]}},{key:"getScene",value:function(e){return this.getObject("scenes",e)}},{key:"getNode",value:function(e){return this.getObject("nodes",e)}},{key:"getSkin",value:function(e){return this.getObject("skins",e)}},{key:"getMesh",value:function(e){return this.getObject("meshes",e)}},{key:"getMaterial",value:function(e){return this.getObject("materials",e)}},{key:"getAccessor",value:function(e){return this.getObject("accessors",e)}},{key:"getCamera",value:function(e){return null}},{key:"getTexture",value:function(e){return this.getObject("textures",e)}},{key:"getSampler",value:function(e){return this.getObject("samplers",e)}},{key:"getImage",value:function(e){return this.getObject("images",e)}},{key:"getBufferView",value:function(e){return this.getObject("bufferViews",e)}},{key:"getBuffer",value:function(e){return this.getObject("buffers",e)}},{key:"getObject",value:function(e,t){if("object"===Object(G.a)(t))return t;var n=this.json[e]&&this.json[e][t];if(!n)throw new Error("glTF file error: Could not find ".concat(e,"[").concat(t,"]"));return n}},{key:"getTypedArrayForBufferView",value:function(e){var t=(e=this.getBufferView(e)).buffer,n=this.gltf.buffers[t];Zs(n);var r=(e.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,r,e.byteLength)}},{key:"getTypedArrayForAccessor",value:function(e){e=this.getAccessor(e);var t=this.getBufferView(e.bufferView),n=this.getBuffer(t.buffer).data,r=Au(e,t),i=r.ArrayType,a=r.length;return new i(n,t.byteOffset+e.byteOffset,a)}},{key:"getTypedArrayForImageData",value:function(e){e=this.getAccessor(e);var t=this.getBufferView(e.bufferView),n=this.getBuffer(t.buffer).data,r=t.byteOffset||0;return new Uint8Array(n,r,t.byteLength)}},{key:"addApplicationData",value:function(e,t){return this.json[e]=t,this}},{key:"addExtraData",value:function(e,t){return this.json.extras=this.json.extras||{},this.json.extras[e]=t,this}},{key:"addObjectExtension",value:function(e,t,n){return Zs(n),e.extensions=e.extensions||{},e.extensions[t]=n,this.registerUsedExtension(t),this}},{key:"setObjectExtension",value:function(e,t,n){(e.extensions||{})[t]=n}},{key:"removeObjectExtension",value:function(e,t){var n=e.extensions||{},r=n[t];return delete n[t],r}},{key:"addExtension",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Zs(t),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=t,this.registerUsedExtension(e),t}},{key:"addRequiredExtension",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Zs(t),this.addExtension(e,t),this.registerRequiredExtension(e),t}},{key:"registerUsedExtension",value:function(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find((function(t){return t===e}))||this.json.extensionsUsed.push(e)}},{key:"registerRequiredExtension",value:function(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find((function(t){return t===e}))||this.json.extensionsRequired.push(e)}},{key:"removeExtension",value:function(e){this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,e),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,e),this.json.extensions&&delete this.json.extensions[e]}},{key:"addMesh",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,r=this._addAttributes(e),i={primitives:[{attributes:r,indices:t,mode:n}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(i),this.json.meshes.length-1}},{key:"addPointCloud",value:function(e){var t={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(t),this.json.meshes.length-1}},{key:"addImage",value:function(e,t){t=t||function(e){var t=Object(tu.a)(e);return t?t.mimeType:null}(e);var n={bufferView:this.addBufferView(e),mimeType:t};return this.json.images=this.json.images||[],this.json.images.push(n),this.json.images.length-1}},{key:"addBufferView",value:function(e){var t=e.byteLength;Zs(Number.isFinite(t)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);var n={buffer:0,byteOffset:this.byteLength,byteLength:t};return this.byteLength+=Object(Xs.c)(t),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(n),this.json.bufferViews.length-1}},{key:"addAccessor",value:function(e,t){var n={bufferView:e,type:su(t.size),componentType:t.componentType,count:t.count};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(n),this.json.accessors.length-1}},{key:"addBinaryBuffer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{size:3},n=this.addBufferView(e),r={size:t.size,componentType:uu(e),count:Math.round(e.length/t.size)};return this.addAccessor(n,Object.assign(r,t))}},{key:"createBinaryChunk",value:function(){if(!this.arrayBuffer){for(var e=this.byteLength,t=new ArrayBuffer(e),n=new Uint8Array(t),r=0,i=0;i<this.sourceBuffers.length;i++){var a=this.sourceBuffers[i];r=Object(Xs.a)(a,n,r)}this.json.buffers[0].byteLength=e,this.arrayBuffer=t,this.sourceBuffers=[]}}},{key:"_removeStringFromArray",value:function(e,t){for(var n=!0;n;){var r=e.indexOf(t);r>-1?e.splice(r,1):n=!1}}},{key:"json",get:function(){return this.gltf.json}}]),e}();function lu(e){var t={};for(var n in e){var r=e[n];if("indices"!==n){var i=fu(r);t[n]=i}}return t}function fu(e,t){var n=function(e,t){var n=e,r=1,i=0;e&&e.value&&(n=e.value,r=e.size||1);n&&(ArrayBuffer.isView(n)||(n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return null;if(Array.isArray(e))return new t(e);if(n&&!(e instanceof t))return new t(e);return e}(n,Float32Array)),i=n.length/r);return{buffer:n,size:r,count:i}}(e),r=n.buffer,i=n.size;return{value:r,size:i,bufferView:null,byteOffset:0,count:n.count,type:su(i),componentType:uu(r)}}var hu=N.a.mark(Cu);function gu(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return du(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return du(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function du(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pu(e,t,n){return vu.apply(this,arguments)}function vu(){return(vu=Object(F.a)(N.a.mark((function e(t,n,r){var i,a,o,s,u;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.gltf.decompressMeshes){e.next=2;break}return e.abrupt("return");case 2:i=new cu(t),a=[],o=gu(Cu(i));try{for(o.s();!(s=o.n()).done;)u=s.value,i.getObjectExtension(u,"KHR_draco_mesh_compression")&&a.push(mu(u,i,n,r))}catch(A){o.e(A)}finally{o.f()}return e.next=8,Promise.all(a);case 8:i.removeExtension("KHR_draco_mesh_compression");case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function yu(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new cu(e),i=gu(r.json.meshes||[]);try{for(i.s();!(t=i.n()).done;){var a=t.value;bu(a,n),r.addRequiredExtension("KHR_draco_mesh_compression")}}catch(o){i.e(o)}finally{i.f()}}function mu(e,t,n,r){return Iu.apply(this,arguments)}function Iu(){return(Iu=Object(F.a)(N.a.mark((function e(t,n,r,i){var a,o,s,u,A;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.getObjectExtension(t,"KHR_draco_mesh_compression"),o=n.getTypedArrayForBufferView(a.bufferView),s=Object(Xs.b)(o.buffer,o.byteOffset),u=i.parse,e.next=6,u(s,po,r,i);case 6:A=e.sent,t.attributes=lu(A.attributes),A.indices&&(t.indices=fu(A.indices)),Eu(t);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;if(!r.DracoWriter||!r.DracoLoader)throw new Error("DracoWriter/DracoLoader not available");var a=r.DracoWriter.encodeSync({attributes:e}),o=i.parseSync,s=o({attributes:e}),u=r._addFauxAttributes(s.attributes),A=r.addBufferView(a),c={primitives:[{attributes:u,mode:n,extensions:Object(O.a)({},"KHR_draco_mesh_compression",{bufferView:A,attributes:u})}]};return c}function Eu(e){if(!e.attributes&&Object.keys(e.attributes).length>0)throw new Error("Empty glTF primitive detected: Draco decompression failure?")}function Cu(e){var t,n,r,i,a,o;return N.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:t=gu(e.json.meshes||[]),s.prev=1,t.s();case 3:if((n=t.n()).done){s.next=24;break}r=n.value,i=gu(r.primitives),s.prev=6,i.s();case 8:if((a=i.n()).done){s.next=14;break}return o=a.value,s.next=12,o;case 12:s.next=8;break;case 14:s.next=19;break;case 16:s.prev=16,s.t0=s.catch(6),i.e(s.t0);case 19:return s.prev=19,i.f(),s.finish(19);case 22:s.next=3;break;case 24:s.next=29;break;case 26:s.prev=26,s.t1=s.catch(1),t.e(s.t1);case 29:return s.prev=29,t.f(),s.finish(29);case 32:case"end":return s.stop()}}),hu,null,[[1,26,29,32],[6,16,19,22]])}function Bu(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return wu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wu(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function wu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qu(e,t){var n=new cu(e),r=n.json,i=n.getExtension("KHR_lights_punctual");i&&(n.json.lights=i.lights,n.removeExtension("KHR_lights_punctual"));var a,o=Bu(r.nodes||[]);try{for(o.s();!(a=o.n()).done;){var s=a.value,u=n.getObjectExtension(s,"KHR_lights_punctual");u&&(s.light=u.light),n.removeObjectExtension(s,"KHR_lights_punctual")}}catch(A){o.e(A)}finally{o.f()}}function ku(e,t){var n=new cu(e),r=n.json;if(r.lights){var i=n.addExtension("KHR_lights_punctual");Zs(!i.lights),i.lights=r.lights,delete r.lights}if(n.json.lights){var a,o=Bu(n.json.lights);try{for(o.s();!(a=o.n()).done;){var s=a.value,u=s.node;n.addObjectExtension(u,"KHR_lights_punctual",s)}}catch(A){o.e(A)}finally{o.f()}delete n.json.lights}}function _u(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return xu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xu(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function xu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Su(e,t){var n=new cu(e),r=n.json;n.removeExtension("KHR_materials_unlit");var i,a=_u(r.materials||[]);try{for(a.s();!(i=a.n()).done;){var o=i.value;o.extensions&&o.extensions.KHR_materials_unlit&&(o.unlit=!0),n.removeObjectExtension(o,"KHR_materials_unlit")}}catch(s){a.e(s)}finally{a.f()}}function Ou(e,t){var n=new cu(e),r=n.json;if(n.materials){var i,a=_u(r.materials);try{for(a.s();!(i=a.n()).done;){var o=i.value;o.unlit&&(delete o.unlit,n.addObjectExtension(o,"KHR_materials_unlit",{}),n.addExtension("KHR_materials_unlit"))}}catch(s){a.e(s)}finally{a.f()}}}function Du(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return Ru(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ru(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Ru(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ju(e,t){var n=new cu(e),r=n.json,i=n.getExtension("KHR_techniques_webgl");if(i){var a,o=function(e,t){var n=e.programs,r=void 0===n?[]:n,i=e.shaders,a=void 0===i?[]:i,o=e.techniques,s=void 0===o?[]:o,u=new TextDecoder;return a.forEach((function(e){if(!Number.isFinite(e.bufferView))throw new Error("KHR_techniques_webgl: no shader code");e.code=u.decode(t.getTypedArrayForBufferView(e.bufferView))})),r.forEach((function(e){e.fragmentShader=a[e.fragmentShader],e.vertexShader=a[e.vertexShader]})),s.forEach((function(e){e.program=r[e.program]})),s}(i,n),s=Du(r.materials||[]);try{for(s.s();!(a=s.n()).done;){var u=a.value,A=n.getObjectExtension(u,"KHR_techniques_webgl");A&&(u.technique=Object.assign({},A,o[A.technique]),u.technique.values=Nu(u.technique,n)),n.removeObjectExtension(u,"KHR_techniques_webgl")}}catch(c){s.e(c)}finally{s.f()}n.removeExtension("KHR_techniques_webgl")}}function Mu(e,t){}function Nu(e,t){var n=Object.assign({},e.values);return Object.keys(e.uniforms||{}).forEach((function(t){e.uniforms[t].value&&!(t in n)&&(n[t]=e.uniforms[t].value)})),Object.keys(n).forEach((function(e){"object"===Object(G.a)(n[e])&&void 0!==n[e].index&&(n[e].texture=t.getTexture(n[e].index))})),n}var Fu={KHR_draco_mesh_compression:r,KHR_lights_punctual:i,KHR_materials_unlit:a,KHR_techniques_webgl:o};function Tu(e){return Lu.apply(this,arguments)}function Lu(){return(Lu=Object(F.a)(N.a.mark((function e(t){var n,r,i,a,o,s=arguments;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=s.length>1&&void 0!==s[1]?s[1]:{},r=s.length>2?s[2]:void 0,n.gltf=n.gltf||{},e.t0=N.a.keys(Fu);case 4:if((e.t1=e.t0()).done){e.next=14;break}if(i=e.t1.value,a=n.gltf.excludeExtensions||{},i in a&&!a[i]){e.next=12;break}return o=Fu[i],e.next=12,o.decode(t,n,r);case 12:e.next=4;break;case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Pu(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"".concat(String.fromCharCode(e.getUint8(t+0))).concat(String.fromCharCode(e.getUint8(t+1))).concat(String.fromCharCode(e.getUint8(t+2))).concat(String.fromCharCode(e.getUint8(t+3)))}function Uu(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new DataView(e),i=n.magic,a=void 0===i?1735152710:i,o=r.getUint32(t,!1);return o===a||1735152710===o}function Gu(e,t,n,r){Object(Si.a)(e.header.byteLength>20);var i=t.getUint32(n+0,!0),a=t.getUint32(n+4,!0);return n+=8,Object(Si.a)(0===a),Hu(e,t,n,i,r),n+=i,n+=Yu(e,t,n,e.header.byteLength,r)}function qu(e,t,n,r){return Object(Si.a)(e.header.byteLength>20),function(e,t,n,r){for(;n+8<=e.header.byteLength;){var i=t.getUint32(n+0,!0),a=t.getUint32(n+4,!0);switch(n+=8,a){case 1313821514:Hu(e,t,n,i,r);break;case 5130562:Yu(e,t,n,i,r);break;case 0:r.glb.strict||Hu(e,t,n,i,r);break;case 1:r.glb.strict||Yu(e,t,n,i,r)}n+=Object(Xs.c)(i)}}(e,t,n,r),n+e.header.byteLength}function Hu(e,t,n,r,i){var a=new Uint8Array(t.buffer,n,r),o=new TextDecoder("utf8").decode(a);return e.json=JSON.parse(o),Object(Xs.c)(r)}function Yu(e,t,n,r,i){return e.header.hasBinChunk=!0,e.binChunks.push({byteOffset:n,byteLength:r,arrayBuffer:t.buffer}),Object(Xs.c)(r)}function Ju(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return zu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zu(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function zu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ku(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return Wu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wu(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Wu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Vu,Xu={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},Zu={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"},$u=function(){function e(t){Object(s.a)(this,e),this.idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}}}return Object(h.a)(e,[{key:"normalize",value:function(e,t){this.json=e.json;var n=e.json;switch(n.asset&&n.asset.version){case"2.0":return;case void 0:case"1.0":break;default:return void console.warn("glTF: Unknown version ".concat(n.asset.version))}if(!t.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(n),this._convertTopLevelObjectsToArrays(n),function(e,t){var n,r=new cu(e),i=r.json,a=Ju(i.images||[]);try{for(a.s();!(n=a.n()).done;){var o=n.value,s=r.removeObjectExtension(o,"KHR_binary_glTF");s&&Object.assign(o,s)}}catch(u){a.e(u)}finally{a.f()}i.buffers&&i.buffers[0]&&delete i.buffers[0].uri,r.removeExtension("KHR_binary_glTF")}(e),this._convertObjectIdsToArrayIndices(n),this._updateObjects(n)}},{key:"_addAsset",value:function(e){e.asset=e.asset||{},e.asset.version="2.0",e.asset.generator=e.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}},{key:"_convertTopLevelObjectsToArrays",value:function(e){for(var t in Xu)this._convertTopLevelObjectToArray(e,t)}},{key:"_convertTopLevelObjectToArray",value:function(e,t){var n=e[t];if(n&&!Array.isArray(n))for(var r in e[t]=[],n){var i=n[r];i.id=i.id||r;var a=e[t].length;e[t].push(i),this.idToIndexMap[t][r]=a}}},{key:"_convertObjectIdsToArrayIndices",value:function(e){for(var t in Xu)this._convertIdsToIndices(e,t);"scene"in e&&(e.scene=this._convertIdToIndex(e.scene,"scene"));var n,r=Ku(e.textures);try{for(r.s();!(n=r.n()).done;){var i=n.value;this._convertTextureIds(i)}}catch(g){r.e(g)}finally{r.f()}var a,o=Ku(e.meshes);try{for(o.s();!(a=o.n()).done;){var s=a.value;this._convertMeshIds(s)}}catch(g){o.e(g)}finally{o.f()}var u,A=Ku(e.nodes);try{for(A.s();!(u=A.n()).done;){var c=u.value;this._convertNodeIds(c)}}catch(g){A.e(g)}finally{A.f()}var l,f=Ku(e.scenes);try{for(f.s();!(l=f.n()).done;){var h=l.value;this._convertSceneIds(h)}}catch(g){f.e(g)}finally{f.f()}}},{key:"_convertTextureIds",value:function(e){e.source&&(e.source=this._convertIdToIndex(e.source,"image"))}},{key:"_convertMeshIds",value:function(e){var t,n=Ku(e.primitives);try{for(n.s();!(t=n.n()).done;){var r=t.value,i=r.attributes,a=r.indices,o=r.material;for(var s in i)i[s]=this._convertIdToIndex(i[s],"accessor");a&&(r.indices=this._convertIdToIndex(a,"accessor")),o&&(r.material=this._convertIdToIndex(o,"material"))}}catch(u){n.e(u)}finally{n.f()}}},{key:"_convertNodeIds",value:function(e){var t=this;e.children&&(e.children=e.children.map((function(e){return t._convertIdToIndex(e,"node")})))}},{key:"_convertSceneIds",value:function(e){var t=this;e.nodes&&(e.nodes=e.nodes.map((function(e){return t._convertIdToIndex(e,"node")})))}},{key:"_convertIdsToIndices",value:function(e,t){var n,r=Ku(e[t]);try{for(r.s();!(n=r.n()).done;){var i=n.value;for(var a in i){var o=i[a],s=this._convertIdToIndex(o,a);i[a]=s}}}catch(u){r.e(u)}finally{r.f()}}},{key:"_convertIdToIndex",value:function(e,t){var n=Zu[t];if(n in this.idToIndexMap){var r=this.idToIndexMap[n][e];if(!Number.isFinite(r))throw new Error("gltf v1: failed to resolve ".concat(t," with id ").concat(e));return r}return e}},{key:"_updateObjects",value:function(e){var t,n=Ku(this.json.buffers);try{for(n.s();!(t=n.n()).done;){delete t.value.type}}catch(r){n.e(r)}finally{n.f()}}}]),e}();function eA(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(new $u).normalize(e,t)}function tA(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 nA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tA(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var rA={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},iA={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},aA={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},oA={magFilter:aA.TEXTURE_MAG_FILTER,minFilter:aA.TEXTURE_MIN_FILTER,wrapS:aA.TEXTURE_WRAP_S,wrapT:aA.TEXTURE_WRAP_T},sA=(Vu={},Object(O.a)(Vu,aA.TEXTURE_MAG_FILTER,aA.LINEAR),Object(O.a)(Vu,aA.TEXTURE_MIN_FILTER,aA.NEAREST_MIPMAP_LINEAR),Object(O.a)(Vu,aA.TEXTURE_WRAP_S,aA.REPEAT),Object(O.a)(Vu,aA.TEXTURE_WRAP_,aA.REPEAT),Vu);var uA=function(){function e(){Object(s.a)(this,e)}return Object(h.a)(e,[{key:"postProcess",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.json,r=e.buffers,i=void 0===r?[]:r,a=e.images,o=void 0===a?[]:a,s=e.baseUri,u=void 0===s?"":s;return Zs(n),this.baseUri=u,this.json=n,this.buffers=i,this.images=o,this._resolveTree(this.json,t),this.json}},{key:"_resolveTree",value:function(e){var t=this;arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.bufferViews&&(e.bufferViews=e.bufferViews.map((function(e,n){return t._resolveBufferView(e,n)}))),e.images&&(e.images=e.images.map((function(e,n){return t._resolveImage(e,n)}))),e.samplers&&(e.samplers=e.samplers.map((function(e,n){return t._resolveSampler(e,n)}))),e.textures&&(e.textures=e.textures.map((function(e,n){return t._resolveTexture(e,n)}))),e.accessors&&(e.accessors=e.accessors.map((function(e,n){return t._resolveAccessor(e,n)}))),e.materials&&(e.materials=e.materials.map((function(e,n){return t._resolveMaterial(e,n)}))),e.meshes&&(e.meshes=e.meshes.map((function(e,n){return t._resolveMesh(e,n)}))),e.nodes&&(e.nodes=e.nodes.map((function(e,n){return t._resolveNode(e,n)}))),e.skins&&(e.skins=e.skins.map((function(e,n){return t._resolveSkin(e,n)}))),e.scenes&&(e.scenes=e.scenes.map((function(e,n){return t._resolveScene(e,n)}))),void 0!==e.scene&&(e.scene=e.scenes[this.json.scene])}},{key:"getScene",value:function(e){return this._get("scenes",e)}},{key:"getNode",value:function(e){return this._get("nodes",e)}},{key:"getSkin",value:function(e){return this._get("skins",e)}},{key:"getMesh",value:function(e){return this._get("meshes",e)}},{key:"getMaterial",value:function(e){return this._get("materials",e)}},{key:"getAccessor",value:function(e){return this._get("accessors",e)}},{key:"getCamera",value:function(e){return null}},{key:"getTexture",value:function(e){return this._get("textures",e)}},{key:"getSampler",value:function(e){return this._get("samplers",e)}},{key:"getImage",value:function(e){return this._get("images",e)}},{key:"getBufferView",value:function(e){return this._get("bufferViews",e)}},{key:"getBuffer",value:function(e){return this._get("buffers",e)}},{key:"_get",value:function(e,t){if("object"===Object(G.a)(t))return t;var n=this.json[e]&&this.json[e][t];return n||console.warn("glTF file error: Could not find ".concat(e,"[").concat(t,"]")),n}},{key:"_resolveScene",value:function(e,t){var n=this;return e.id=e.id||"scene-".concat(t),e.nodes=(e.nodes||[]).map((function(e){return n.getNode(e)})),e}},{key:"_resolveNode",value:function(e,t){var n=this;return e.id=e.id||"node-".concat(t),e.children&&(e.children=e.children.map((function(e){return n.getNode(e)}))),void 0!==e.mesh&&(e.mesh=this.getMesh(e.mesh)),void 0!==e.camera&&(e.camera=this.getCamera(e.camera)),void 0!==e.skin&&(e.skin=this.getSkin(e.skin)),e}},{key:"_resolveSkin",value:function(e,t){return e.id=e.id||"skin-".concat(t),e.inverseBindMatrices=this.getAccessor(e.inverseBindMatrices),e}},{key:"_resolveMesh",value:function(e,t){var n=this;return e.id=e.id||"mesh-".concat(t),e.primitives&&(e.primitives=e.primitives.map((function(e){var t=(e=nA({},e)).attributes;for(var r in e.attributes={},t)e.attributes[r]=n.getAccessor(t[r]);return void 0!==e.indices&&(e.indices=n.getAccessor(e.indices)),void 0!==e.material&&(e.material=n.getMaterial(e.material)),e}))),e}},{key:"_resolveMaterial",value:function(e,t){if(e.id=e.id||"material-".concat(t),e.normalTexture&&(e.normalTexture=nA({},e.normalTexture),e.normalTexture.texture=this.getTexture(e.normalTexture.index)),e.occlusionTexture&&(e.occlustionTexture=nA({},e.occlustionTexture),e.occlusionTexture.texture=this.getTexture(e.occlusionTexture.index)),e.emissiveTexture&&(e.emmisiveTexture=nA({},e.emmisiveTexture),e.emissiveTexture.texture=this.getTexture(e.emissiveTexture.index)),e.pbrMetallicRoughness){e.pbrMetallicRoughness=nA({},e.pbrMetallicRoughness);var n=e.pbrMetallicRoughness;n.baseColorTexture&&(n.baseColorTexture=nA({},n.baseColorTexture),n.baseColorTexture.texture=this.getTexture(n.baseColorTexture.index)),n.metallicRoughnessTexture&&(n.metallicRoughnessTexture=nA({},n.metallicRoughnessTexture),n.metallicRoughnessTexture.texture=this.getTexture(n.metallicRoughnessTexture.index))}return e}},{key:"_resolveAccessor",value:function(e,t){var n,r;if(e.id=e.id||"accessor-".concat(t),void 0!==e.bufferView&&(e.bufferView=this.getBufferView(e.bufferView)),e.bytesPerComponent=(n=e.componentType,iA[n]),e.components=(r=e.type,rA[r]),e.bytesPerElement=e.bytesPerComponent*e.components,e.bufferView){var i=e.bufferView.buffer,a=Au(e,e.bufferView),o=a.ArrayType,s=a.length,u=(e.bufferView.byteOffset||0)+i.byteOffset;e.value=new o(i.arrayBuffer,u,s)}return e}},{key:"_resolveTexture",value:function(e,t){return e.id=e.id||"texture-".concat(t),e.sampler="sampler"in e?this.getSampler(e.sampler):sA,e.source=this.getImage(e.source),e}},{key:"_resolveSampler",value:function(e,t){for(var n in e.id=e.id||"sampler-".concat(t),e.parameters={},e){var r=this._enumSamplerParameter(n);void 0!==r&&(e.parameters[r]=e[n])}return e}},{key:"_enumSamplerParameter",value:function(e){return oA[e]}},{key:"_resolveImage",value:function(e,t){e.id=e.id||"image-".concat(t),void 0!==e.bufferView&&(e.bufferView=this.getBufferView(e.bufferView));var n=this.images[t];return n&&(e.image=n),e}},{key:"_resolveBufferView",value:function(e,t){e.id=e.id||"bufferView-".concat(t);var n=e.buffer;e.buffer=this.buffers[n];var r=this.buffers[n].arrayBuffer,i=this.buffers[n].byteOffset||0;return"byteOffset"in e&&(i+=e.byteOffset),e.data=new Uint8Array(r,i,e.byteLength),e}},{key:"_resolveCamera",value:function(e,t){return e.id=e.id||"camera-".concat(t),e.perspective,e.orthographic,e}}]),e}();function AA(e,t){return(new uA).postProcess(e,t)}function cA(e,t){return lA.apply(this,arguments)}function lA(){return(lA=Object(F.a)(N.a.mark((function e(t,n){var r,i,a,o,s,u,A=arguments;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=A.length>2&&void 0!==A[2]?A[2]:0,i=A.length>3?A[3]:void 0,a=A.length>4?A[4]:void 0,fA(t,n,r,i),eA(t,{normalize:i.gltf.normalize}),o=[],i.gltf.loadImages&&(s=dA(t,i,a),o.push(s)),!i.gltf.loadBuffers){e.next=10;break}return e.next=10,hA(t,i,a);case 10:return u=Tu(t,i,a),o.push(u),e.next=14,Promise.all(o);case 14:return e.abrupt("return",i.gltf.postProcess?AA(t,i):t);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fA(e,t,n,r){(r.uri&&(e.baseUri=r.uri),t instanceof ArrayBuffer&&!Uu(t,n,r))&&(t=(new TextDecoder).decode(t));if("string"===typeof t)e.json=Object(Vs.a)(t);else if(t instanceof ArrayBuffer){var i={};n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=(arguments.length>3&&void 0!==arguments[3]&&arguments[3],new DataView(t));e.type=Pu(r,n+0),e.version=r.getUint32(n+4,!0);var i=r.getUint32(n+8,!0);switch(e.header={byteOffset:n,byteLength:i},e.json={},e.binChunks=[],n+=12,e.version){case 1:return Gu(e,r,n,{});case 2:return qu(e,r,n,{});default:throw new Error("Invalid GLB version ".concat(e.version,". Only supports v1 and v2."))}}(i,t,n,r),Zs("glTF"===i.type,"Invalid GLB magic string ".concat(i.type)),e._glb=i,e.json=i.json}else Zs(!1,"GLTF: must be ArrayBuffer or string");var a=e.json.buffers||[];if(e.buffers=new Array(a.length).fill(null),e._glb&&e._glb.header.hasBinChunk){var o=e._glb.binChunks;e.buffers[0]={arrayBuffer:o[0].arrayBuffer,byteOffset:o[0].byteOffset,byteLength:o[0].byteLength}}var s=e.json.images||[];e.images=new Array(s.length).fill({})}function hA(e,t,n){return gA.apply(this,arguments)}function gA(){return(gA=Object(F.a)(N.a.mark((function e(t,n,r){var i,a,o,s,u,A;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=0;case 1:if(!(i<t.json.buffers.length)){e.next=18;break}if(!(a=t.json.buffers[i]).uri){e.next=15;break}return Zs(o=r.fetch),s=$s(a.uri,n),e.next=9,o(s);case 9:return u=e.sent,e.next=12,u.arrayBuffer();case 12:A=e.sent,t.buffers[i]={arrayBuffer:A,byteOffset:0,byteLength:A.byteLength},delete a.uri;case 15:++i,e.next=1;break;case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function dA(e,t,n){return pA.apply(this,arguments)}function pA(){return(pA=Object(F.a)(N.a.mark((function e(t,n,r){var i,a,o;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(i=t.json.images||[],a=[],o=0;o<i.length;++o)a.push(vA(t,i[o],o,n,r));return e.next=5,Promise.all(a);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function vA(e,t,n,r,i){return yA.apply(this,arguments)}function yA(){return(yA=Object(F.a)(N.a.mark((function e(t,n,r,i,a){var o,s,u,A,c,l,f;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=a.fetch,s=a.parse,!n.uri){e.next=9;break}return A=$s(n.uri,i),e.next=5,o(A);case 5:return c=e.sent,e.next=8,c.arrayBuffer();case 8:u=e.sent;case 9:return Number.isFinite(n.bufferView)&&(l=eu(t.json,t.buffers,n.bufferView),u=Object(Xs.b)(l.buffer,l.byteOffset,l.byteLength)),Zs(u,"glTF image has no data"),e.next=13,s(u,Ws.a,{},a);case 13:f=e.sent,t.images[r]=f;case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mA(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 IA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mA(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mA(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bA={id:"gltf",name:"glTF",version:"2.3.0",extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:function(e){return CA.apply(this,arguments)},options:{gltf:{normalize:!1,loadBuffers:!0,loadImages:!0,decompressMeshes:!0,postProcess:!0},uri:"",log:console},deprecatedOptions:{fetchImages:"gltf.loadImages",createImages:"gltf.loadImages",decompress:"gltf.decompressMeshes",postProcess:"gltf.postProcess",gltf:{decompress:"gltf.decompressMeshes"}}},EA=bA;function CA(){return(CA=Object(F.a)(N.a.mark((function e(t){var n,r,i,a,o,s=arguments;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:{},r=s.length>2?s[2]:void 0,(n=IA(IA({},bA.options),n)).gltf=IA(IA({},bA.options.gltf),n.gltf),BA(n),i=n.byteOffset,a=void 0===i?0:i,o={},e.next=9,cA(o,t,a,n,r);case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function BA(e){"fetchImages"in e&&(e.gltf.loadImages=e.fetchImages),"createImages"in e&&(e.gltf.loadImages=e.createImages),"fetchLinkedResources"in e&&(e.gltf.fetchBuffers=e.fetchLinkedResources),"decompress"in e&&(e.gltf.decompressMeshes=e.decompress),"decompress"in e.gltf&&(e.gltf.decompressMeshes=e.gltf.decompress),"postProcess"in e&&(e.gltf.postProcess=e.postProcess)}var wA=0,QA=1;function kA(e,t,n){e.rotateYtoZ=!0;var r=e.byteOffset+e.byteLength-n;if(0===r)throw new Error("glTF byte length must be greater than 0.");return e.gltfArrayBuffer=Object(Xs.b)(t,n,r),e.gltfByteOffset=0,e.gltfByteLength=r,n%4===0||console.warn("".concat(e.type,": embedded glb is not aligned to a 4-byte boundary.")),e.byteOffset+e.byteLength}function _A(e,t,n,r){return xA.apply(this,arguments)}function xA(){return(xA=Object(F.a)(N.a.mark((function e(t,n,r,i){var a,o,s;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r["3d-tiles"]||{},SA(t,n,r),!a.loadGLTF){e.next=16;break}if(o=i.parse,s=i.fetch,!t.gltfUrl){e.next=9;break}return e.next=7,s(t.gltfUrl,r);case 7:t.gltfArrayBuffer=e.sent,t.gltfByteOffset=0;case 9:if(!t.gltfArrayBuffer){e.next=16;break}return e.next=12,o(t.gltfArrayBuffer,EA,r,i);case 12:t.gltf=e.sent,delete t.gltfArrayBuffer,delete t.gltfByteOffset,delete t.gltfByteLength;case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function SA(e,t,n){switch(t){case wA:var r=new Uint8Array(e.gltfArrayBuffer,e.gltfByteOffset),i=(new TextDecoder).decode(r);e.gltfUrl=i.replace(/[\s\0]+$/,""),delete e.gltfArrayBuffer,delete e.gltfByteOffset,delete e.gltfByteLength;break;case QA:break;default:throw new Error("b3dm: Illegal glTF format field")}}function OA(e,t,n,r,i){return DA.apply(this,arguments)}function DA(){return(DA=Object(F.a)(N.a.mark((function e(t,n,r,i,a){var o,s;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=RA(t,n,r,i,a),e.next=3,_A(t,QA,i,a);case 3:return o=t.gltf||{},(s=o.extensions)&&s.CESIUM_RTC&&(t.rtcCenter=s.CESIUM_RTC.center),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function RA(e,t,n,r,i){n=kA(e,t,n=ss(e,t,n=os(e,t,n=as(e,t,n))));var a=new Jo(e.featureTableJson,e.featureTableBinary);return e.rtcCenter=a.getGlobalProperty("RTC_CENTER",bo.FLOAT,3),n}function jA(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var MA=function(e){Object(u.a)(n,e);var t=jA(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"toString",value:function(){var e="[";if(Co.printRowMajor){e+="row-major:";for(var t=0;t<this.RANK;++t)for(var n=0;n<this.RANK;++n)e+=" ".concat(this[n*this.RANK+t])}else{e+="column-major:";for(var r=0;r<this.ELEMENTS;++r)e+=" ".concat(this[r])}return e+="]"}},{key:"getElementIndex",value:function(e,t){return t*this.RANK+e}},{key:"getElement",value:function(e,t){return this[t*this.RANK+e]}},{key:"setElement",value:function(e,t,n){return this[t*this.RANK+e]=Oo(n),this}},{key:"getColumn",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),n=e*this.RANK,r=0;r<this.RANK;++r)t[r]=this[n+r];return t}},{key:"setColumn",value:function(e,t){for(var n=e*this.RANK,r=0;r<this.RANK;++r)this[n+r]=t[r];return this}}]),n}(xo);function NA(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var FA=Object.freeze([1,0,0,0,1,0,0,0,1]),TA=Object.freeze([0,0,0,0,0,0,0,0,0]),LA=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL1ROW0:3,COL1ROW1:4,COL1ROW2:5,COL2ROW0:6,COL2ROW1:7,COL2ROW2:8}),PA={},UA=function(e){Object(u.a)(n,e);var t=NA(n);function n(e){var r;return Object(s.a)(this,n),r=t.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(e)?r.copy(e):r.identity(),r}return Object(h.a)(n,[{key:"ELEMENTS",get:function(){return 9}},{key:"RANK",get:function(){return 3}},{key:"INDICES",get:function(){return LA}}],[{key:"IDENTITY",get:function(){return PA.IDENTITY=PA.IDENTITY||Object.freeze(new n(FA)),PA.IDENTITY}},{key:"ZERO",get:function(){return PA.ZERO=PA.ZERO||Object.freeze(new n(TA)),PA.ZERO}}]),Object(h.a)(n,[{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this.check()}},{key:"set",value:function(e,t,n,r,i,a,o,s,u){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this[4]=i,this[5]=a,this[6]=o,this[7]=s,this[8]=u,this.check()}},{key:"setRowMajor",value:function(e,t,n,r,i,a,o,s,u){return this[0]=e,this[1]=r,this[2]=o,this[3]=t,this[4]=i,this[5]=s,this[6]=n,this[7]=a,this[8]=u,this.check()}},{key:"determinant",value:function(){return Ie.b(this)}},{key:"identity",value:function(){return this.copy(FA)}},{key:"fromQuaternion",value:function(e){return Ie.c(this,e),this.check()}},{key:"transpose",value:function(){return Ie.i(this,this),this.check()}},{key:"invert",value:function(){return Ie.d(this,this),this.check()}},{key:"multiplyLeft",value:function(e){return Ie.e(this,e,this),this.check()}},{key:"multiplyRight",value:function(e){return Ie.e(this,this,e),this.check()}},{key:"rotate",value:function(e){return Ie.f(this,this,e),this.check()}},{key:"scale",value:function(e){return Array.isArray(e)?Ie.g(this,this,e):Ie.g(this,this,[e,e,e]),this.check()}},{key:"translate",value:function(e){return Ie.h(this,this,e),this.check()}},{key:"transform",value:function(e,t){switch(e.length){case 2:t=be.i(t||[-0,-0],e,this);break;case 3:t=ae.p(t||[-0,-0,-0],e,this);break;case 4:t=function(e,t,n){var r=t[0],i=t[1],a=t[2];return e[0]=n[0]*r+n[3]*i+n[6]*a,e[1]=n[1]*r+n[4]*i+n[7]*a,e[2]=n[2]*r+n[5]*i+n[8]*a,e[3]=t[3],e}(t||[-0,-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return Do(t,e.length),t}},{key:"transformVector",value:function(e,t){return jo("Matrix3.transformVector"),this.transform(e,t)}},{key:"transformVector2",value:function(e,t){return jo("Matrix3.transformVector"),this.transform(e,t)}},{key:"transformVector3",value:function(e,t){return jo("Matrix3.transformVector"),this.transform(e,t)}}]),n}(MA);function GA(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var qA=[0,0,0,1],HA=function(e){Object(u.a)(n,e);var t=GA(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return Object(s.a)(this,n),e=t.call(this,-0,-0,-0,-0),Array.isArray(r)&&1===arguments.length?e.copy(r):e.set(r,i,a,o),e}return Object(h.a)(n,[{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this.check()}},{key:"set",value:function(e,t,n,r){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this.check()}},{key:"fromMatrix3",value:function(e){return _e.e(this,e),this.check()}},{key:"identity",value:function(){return _e.f(this),this.check()}},{key:"fromAxisRotation",value:function(e,t){return _e.p(this,e,t),this.check()}},{key:"setAxisAngle",value:function(e,t){return this.fromAxisRotation(e,t)}},{key:"len",value:function(){return _e.h(this)}},{key:"lengthSquared",value:function(){return _e.r(this)}},{key:"dot",value:function(e,t){if(void 0!==t)throw new Error("Quaternion.dot only takes one argument");return _e.d(this,e)}},{key:"rotationTo",value:function(e,t){return _e.n(this,e,t),this.check()}},{key:"add",value:function(e,t){if(void 0!==t)throw new Error("Quaternion.add only takes one argument");return _e.a(this,this,e),this.check()}},{key:"calculateW",value:function(){return _e.b(this,this),this.check()}},{key:"conjugate",value:function(){return _e.c(this,this),this.check()}},{key:"invert",value:function(){return _e.g(this,this),this.check()}},{key:"lerp",value:function(e,t,n){return _e.i(this,e,t,n),this.check()}},{key:"multiplyRight",value:function(e,t){return Eo(!t),_e.j(this,this,e),this.check()}},{key:"multiplyLeft",value:function(e,t){return Eo(!t),_e.j(this,e,this),this.check()}},{key:"normalize",value:function(){var e=this.len(),t=e>0?1/e:0;return this[0]=this[0]*t,this[1]=this[1]*t,this[2]=this[2]*t,this[3]=this[3]*t,0===e&&(this[3]=1),this.check()}},{key:"rotateX",value:function(e){return _e.k(this,this,e),this.check()}},{key:"rotateY",value:function(e){return _e.l(this,this,e),this.check()}},{key:"rotateZ",value:function(e){return _e.m(this,this,e),this.check()}},{key:"scale",value:function(e){return _e.o(this,this,e),this.check()}},{key:"slerp",value:function(e,t,n){switch(arguments.length){case 1:var r=arguments[0],i=r.start;e=void 0===i?qA:i,t=r.target,n=r.ratio;break;case 2:var a=Array.prototype.slice.call(arguments);t=a[0],n=a[1],e=this}return _e.q(this,e,t,n),this.check()}},{key:"transformVector4",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return xe.o(t,e,this),Do(t,4)}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"setFromAxisAngle",value:function(e,t){return this.setAxisAngle(e,t)}},{key:"premultiply",value:function(e,t){return this.multiplyLeft(e,t)}},{key:"multiply",value:function(e,t){return this.multiplyRight(e,t)}},{key:"ELEMENTS",get:function(){return 4}},{key:"x",get:function(){return this[0]},set:function(e){this[0]=Oo(e)}},{key:"y",get:function(){return this[1]},set:function(e){this[1]=Oo(e)}},{key:"z",get:function(){return this[2]},set:function(e){this[2]=Oo(e)}},{key:"w",get:function(){return this[3]},set:function(e){this[3]=Oo(e)}}]),n}(xo);function YA(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var JA=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),zA=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),KA=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),WA={},VA=function(e){Object(u.a)(n,e);var t=YA(n);function n(e){var r;return Object(s.a)(this,n),r=t.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(e)?r.copy(e):r.identity(),r}return Object(h.a)(n,[{key:"INDICES",get:function(){return KA}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}}],[{key:"IDENTITY",get:function(){return WA.IDENTITY=WA.IDENTITY||Object.freeze(new n(JA)),WA.IDENTITY}},{key:"ZERO",get:function(){return WA.ZERO=WA.ZERO||Object.freeze(new n(zA)),WA.ZERO}}]),Object(h.a)(n,[{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this[9]=e[9],this[10]=e[10],this[11]=e[11],this[12]=e[12],this[13]=e[13],this[14]=e[14],this[15]=e[15],this.check()}},{key:"set",value:function(e,t,n,r,i,a,o,s,u,A,c,l,f,h,g,d){return this[0]=e,this[1]=t,this[2]=n,this[3]=r,this[4]=i,this[5]=a,this[6]=o,this[7]=s,this[8]=u,this[9]=A,this[10]=c,this[11]=l,this[12]=f,this[13]=h,this[14]=g,this[15]=d,this.check()}},{key:"setRowMajor",value:function(e,t,n,r,i,a,o,s,u,A,c,l,f,h,g,d){return this[0]=e,this[1]=i,this[2]=u,this[3]=f,this[4]=t,this[5]=a,this[6]=A,this[7]=h,this[8]=n,this[9]=o,this[10]=c,this[11]=g,this[12]=r,this[13]=s,this[14]=l,this[15]=d,this.check()}},{key:"toRowMajor",value:function(e){return e[0]=this[0],e[1]=this[4],e[2]=this[8],e[3]=this[12],e[4]=this[1],e[5]=this[5],e[6]=this[9],e[7]=this[13],e[8]=this[2],e[9]=this[6],e[10]=this[10],e[11]=this[14],e[12]=this[3],e[13]=this[7],e[14]=this[11],e[15]=this[15],e}},{key:"identity",value:function(){return this.copy(JA)}},{key:"fromQuaternion",value:function(e){return ge.c(this,e),this.check()}},{key:"frustum",value:function(e){var t=e.left,r=e.right,i=e.bottom,a=e.top,o=e.near,s=e.far;return s===1/0?n._computeInfinitePerspectiveOffCenter(this,t,r,i,a,o):ge.d(this,t,r,i,a,o,s),this.check()}},{key:"lookAt",value:function(e,t,n){if(1===arguments.length){var r=e;e=r.eye,t=r.center,n=r.up}return t=t||[0,0,0],n=n||[0,1,0],ge.g(this,e,t,n),this.check()}},{key:"ortho",value:function(e){var t=e.left,n=e.right,r=e.bottom,i=e.top,a=e.near,o=void 0===a?.1:a,s=e.far,u=void 0===s?500:s;return ge.i(this,t,n,r,i,o,u),this.check()}},{key:"orthographic",value:function(e){var t=e.fovy,r=void 0===t?45*Math.PI/180:t,i=e.aspect,a=void 0===i?1:i,o=e.focalDistance,s=void 0===o?1:o,u=e.near,A=void 0===u?.1:u,c=e.far,l=void 0===c?500:c;if(r>2*Math.PI)throw Error("radians");var f=r/2,h=s*Math.tan(f),g=h*a;return(new n).ortho({left:-g,right:g,bottom:-h,top:h,near:A,far:l})}},{key:"perspective",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fovy,n=void 0===t?void 0:t,r=e.fov,i=void 0===r?45*Math.PI/180:r,a=e.aspect,o=void 0===a?1:a,s=e.near,u=void 0===s?.1:s,A=e.far,c=void 0===A?500:A;if((n=n||i)>2*Math.PI)throw Error("radians");return ge.j(this,n,o,u,c),this.check()}},{key:"determinant",value:function(){return ge.a(this)}},{key:"getScale",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),e[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),e[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),e}},{key:"getTranslation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return e[0]=this[12],e[1]=this[13],e[2]=this[14],e}},{key:"getRotation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(t||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=0,e[4]=this[4]*r,e[5]=this[5]*i,e[6]=this[6]*a,e[7]=0,e[8]=this[8]*r,e[9]=this[9]*i,e[10]=this[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},{key:"getRotationMatrix3",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getScale(t||[-0,-0,-0]),r=1/n[0],i=1/n[1],a=1/n[2];return e[0]=this[0]*r,e[1]=this[1]*i,e[2]=this[2]*a,e[3]=this[4]*r,e[4]=this[5]*i,e[5]=this[6]*a,e[6]=this[8]*r,e[7]=this[9]*i,e[8]=this[10]*a,e}},{key:"transpose",value:function(){return ge.q(this,this),this.check()}},{key:"invert",value:function(){return ge.f(this,this),this.check()}},{key:"multiplyLeft",value:function(e){return ge.h(this,e,this),this.check()}},{key:"multiplyRight",value:function(e){return ge.h(this,this,e),this.check()}},{key:"rotateX",value:function(e){return ge.l(this,this,e),this.check()}},{key:"rotateY",value:function(e){return ge.m(this,this,e),this.check()}},{key:"rotateZ",value:function(e){return ge.n(this,this,e),this.check()}},{key:"rotateXYZ",value:function(e){var t=Object(p.a)(e,3),n=t[0],r=t[1],i=t[2];return this.rotateX(n).rotateY(r).rotateZ(i)}},{key:"rotateAxis",value:function(e,t){return ge.k(this,this,e,t),this.check()}},{key:"scale",value:function(e){return Array.isArray(e)?ge.o(this,this,e):ge.o(this,this,[e,e,e]),this.check()}},{key:"translate",value:function(e){return ge.p(this,this,e),this.check()}},{key:"transform",value:function(e,t){return 4===e.length?(Do(t=xe.n(t||[-0,-0,-0,-0],e,this),4),t):this.transformAsPoint(e,t)}},{key:"transformAsPoint",value:function(e,t){switch(e.length){case 2:t=be.j(t||[-0,-0],e,this);break;case 3:t=ae.q(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return Do(t,e.length),t}},{key:"transformAsVector",value:function(e,t){switch(e.length){case 2:t=function(e,t,n){var r=t[0],i=t[1],a=n[3]*r+n[7]*i||1;return e[0]=(n[0]*r+n[4]*i)/a,e[1]=(n[1]*r+n[5]*i)/a,e}(t||[-0,-0],e,this);break;case 3:t=Fo(t||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return Do(t,e.length),t}},{key:"makeRotationX",value:function(e){return this.identity().rotateX(e)}},{key:"makeTranslation",value:function(e,t,n){return this.identity().translate([e,t,n])}},{key:"transformPoint",value:function(e,t){return jo("Matrix4.transformPoint","3.0"),this.transformAsPoint(e,t)}},{key:"transformVector",value:function(e,t){return jo("Matrix4.transformVector","3.0"),this.transformAsPoint(e,t)}},{key:"transformDirection",value:function(e,t){return jo("Matrix4.transformDirection","3.0"),this.transformAsVector(e,t)}}],[{key:"_computeInfinitePerspectiveOffCenter",value:function(e,t,n,r,i,a){var o=2*a/(n-t),s=2*a/(i-r),u=(n+t)/(n-t),A=(i+r)/(i-r),c=-2*a;return e[0]=o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=u,e[9]=A,e[10]=-1,e[11]=-1,e[12]=0,e[13]=0,e[14]=c,e[15]=0,e}}]),n}(MA);function XA(e,t,n,r,i){return ZA.apply(this,arguments)}function ZA(){return(ZA=Object(F.a)(N.a.mark((function e(t,n,r,i,a){return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=$A(t,n,r,i,a),e.next=3,_A(t,t.gltfFormat,i,a);case 3:return e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $A(e,t,n,r,i){if(n=as(e,t,n),1!==e.version)throw new Error("Instanced 3D Model version ".concat(e.version," is not supported"));n=os(e,t,n);var a=new DataView(t);if(e.gltfFormat=a.getUint32(n,!0),n=kA(e,t,n=ss(e,t,n+=4)),0===e.featureTableJsonByteLength)throw new Error("i3dm parser: featureTableJsonByteLength is zero.");var o=new Jo(e.featureTableJson,e.featureTableBinary),s=o.getGlobalProperty("INSTANCES_LENGTH");if(o.featuresLength=s,!Number.isFinite(s))throw new Error("i3dm parser: INSTANCES_LENGTH must be defined");e.eastNorthUp=o.getGlobalProperty("EAST_NORTH_UP"),e.rtcCenter=o.getGlobalProperty("RTC_CENTER",bo.FLOAT,3);new is(e.batchTableJson,e.batchTableBinary,s);return function(e,t,n,r){for(var i=[new Array(r),e._batchTable][0],a=new Go,o=(new Go,new Go,new Go,new UA),s=new HA,u=new Go,A={},c=new VA,l=[],f=[],h=new Go,g=new Go,d=0;d<r;d++){var p=void 0;if(t.hasProperty("POSITION"))p=t.getProperty("POSITION",bo.FLOAT,3,d,a);else if(t.hasProperty("POSITION_QUANTIZED")){p=t.getProperty("POSITION_QUANTIZED",bo.UNSIGNED_SHORT,3,d,a);var v=t.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",bo.FLOAT,3,h);if(!v)throw new Error("i3dm parser: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");var y=t.getGlobalProperty("QUANTIZED_VOLUME_SCALE",bo.FLOAT,3,g);if(!y)throw new Error("i3dm parser: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");for(var m=0;m<3;m++)p[m]=p[m]/65535*y[m]+v[m]}if(!p)throw new Error("i3dm: POSITION or POSITION_QUANTIZED must be defined for each instance.");a.copy(p),A.translation=a,e.normalUp=t.getProperty("NORMAL_UP",bo.FLOAT,3,d,l),e.normalRight=t.getProperty("NORMAL_RIGHT",bo.FLOAT,3,d,f);if(e.normalUp){if(!e.normalRight)throw new Error("i3dm: Custom orientation requires both NORMAL_UP and NORMAL_RIGHT.");e.hasCustomOrientation=!0}else{if(e.octNormalUp=t.getProperty("NORMAL_UP_OCT32P",bo.UNSIGNED_SHORT,2,l),e.octNormalRight=t.getProperty("NORMAL_RIGHT_OCT32P",bo.UNSIGNED_SHORT,2,f),e.octNormalUp){if(!e.octNormalRight)throw new Error("i3dm: oct-encoded orientation requires NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P");throw new Error("i3dm: oct-encoded orientation not implemented")}e.eastNorthUp?(_i.WGS84.eastNorthUpToFixedFrame(a,c),c.getRotationMatrix3(o)):o.identity()}!1,s.fromMatrix3(o),A.rotation=s,u.set(1,1,1);var I=t.getProperty("SCALE",bo.FLOAT,1,d);Number.isFinite(I)&&u.multiplyByScalar(I);var b=t.getProperty("SCALE_NON_UNIFORM",bo.FLOAT,3,d,l);b&&u.scale(b),A.scale=u;var E=t.getProperty("BATCH_ID",bo.UNSIGNED_SHORT,1,d);void 0===E&&(E=d);var C=(new VA).fromQuaternion(A.rotation);c.identity(),c.translate(A.translation),c.multiplyRight(C),c.scale(A.scale);var B=c.clone();i[d]={modelMatrix:B,batchId:E}}e.instances=i}(e,o,0,s),n}function ec(e,t,n,r,i,a){return tc.apply(this,arguments)}function tc(){return(tc=Object(F.a)(N.a.mark((function e(t,n,r,i,a,o){var s,u;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=as(t,n,r),s=new DataView(n),t.tilesLength=s.getUint32(r,!0),r+=4,t.tiles=[];case 5:if(!(t.tiles.length<t.tilesLength&&t.byteLength-r>12)){e.next=13;break}return u={},t.tiles.push(u),e.next=10,o(n,r,i,a,u);case 10:r=e.sent,e.next=5;break;case 13:return e.abrupt("return",r);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function nc(e){return rc.apply(this,arguments)}function rc(){return(rc=Object(F.a)(N.a.mark((function e(t){var n,r,i,a,o=arguments;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=o.length>1&&void 0!==o[1]?o[1]:0,r=o.length>2?o[2]:void 0,i=o.length>3?o[3]:void 0,(a=o.length>4&&void 0!==o[4]?o[4]:{}).byteOffset=n,a.type=Va(t,n),e.t0=a.type,e.next=e.t0===Ka.COMPOSITE?9:e.t0===Ka.BATCHED_3D_MODEL?12:e.t0===Ka.INSTANCED_3D_MODEL?15:e.t0===Ka.POINT_CLOUD?18:21;break;case 9:return e.next=11,ec(a,t,n,r,i,nc);case 11:return e.abrupt("return",e.sent);case 12:return e.next=14,OA(a,t,n,r,i);case 14:return e.abrupt("return",e.sent);case 15:return e.next=17,XA(a,t,n,r,i);case 17:return e.abrupt("return",e.sent);case 18:return e.next=20,Ts(a,t,n,r,i);case 20:return e.abrupt("return",e.sent);case 21:throw new Error("3DTileLoader: unknown type ".concat(a.type));case 22:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ic(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return ac(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ac(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function ac(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oc(e,t){if(e.content){var n=e.content.uri||e.content.url;e.contentUrl="".concat(t.basePath,"/").concat(n)}return e.id=e.contentUrl,e.lodMetricType=ea,e.lodMetricValue=e.geometricError,e.transformMatrix=e.transform,e.type=function(e){if(!e.contentUrl)return Ki;var t=e.contentUrl.split(".").pop();switch(t){case"pnts":return Vi;case"i3dm":case"b3dm":return Wi;default:return t}}(e),e.refine=function(e){switch(e){case"REPLACE":case"replace":return zi;case"ADD":case"add":return Ji;default:return e}}(e.refine),e}function sc(e){var t=e.basePath,n=oc(e.root,e),r=[];for(r.push(n);r.length>0;){var i,a=ic(r.pop().children||[]);try{for(a.s();!(i=a.n()).done;){var o=i.value;oc(o,{basePath:t}),r.push(o)}}catch(s){a.e(s)}finally{a.f()}}return n}function uc(e){return Oi.a.dirname(e.url)}function Ac(e,t,n){return cc.apply(this,arguments)}function cc(){return(cc=Object(F.a)(N.a.mark((function e(t,n,r){var i;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i={}).content=i.content||{},0,e.next=5,nc(t,0,n,r,i.content);case 5:return e.abrupt("return",i.content);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function lc(e,t,n){return fc.apply(this,arguments)}function fc(){return(fc=Object(F.a)(N.a.mark((function e(t,n,r){var i;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=JSON.parse((new TextDecoder).decode(t))).loader=n.loader||gc,i.url=r.url,i.basePath=uc(i),i.root=sc(i),i.type=$i,i.lodMetricType=ea,i.lodMetricValue=i.root.lodMetricValue,e.abrupt("return",i);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function hc(){return(hc=Object(F.a)(N.a.mark((function e(t,n,r,i){var a;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n["3d-tiles"]||{},!("auto"===a.isTileset?r.url&&-1!==r.url.indexOf(".json"):a.isTileset)){e.next=8;break}return e.next=5,lc(t,n,r);case 5:t=e.sent,e.next=11;break;case 8:return e.next=10,Ac(t,n,r);case 10:t=e.sent;case 11:return e.abrupt("return",t);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var gc={id:"3d-tiles",name:"3D Tiles",version:"2.3.0",extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:function(e,t,n,r){return hc.apply(this,arguments)},options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",tile:null,tileset:null}}},dc=gc;function pc(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 vc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pc(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yc(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var mc=new kn.b,Ic={getPointColor:[0,0,0],pointSize:1,data:null,loadOptions:{},loader:dc,onTilesetLoad:function(e){},onTileLoad:function(e){},onTileUnload:function(e){},onTileError:function(e,t,n){}},bc=function(e){Object(u.a)(n,e);var t=yc(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"initializeState",value:function(){"onTileLoadFail"in this.props&&T.a.removed("onTileLoadFail","onTileError")(),this.state={layerMap:{},tileset3d:null}}},{key:"shouldUpdateState",value:function(e){return e.changeFlags.somethingChanged}},{key:"updateState",value:function(e){var t=e.props,n=e.oldProps,r=e.changeFlags;if(t.data&&t.data!==n.data&&this._loadTileset(t.data),r.viewportChanged){var i=this.state.tileset3d;this._updateTileset(i)}}},{key:"getPickingInfo",value:function(e){var t=e.info,n=e.sourceLayer,r=this.state.layerMap,i=n&&n.id;if(i){var a=i.substring(this.id.length+1),o=a.substring(a.indexOf("-")+1);t.object=r[o]&&r[o].tile}return t}},{key:"_loadTileset",value:function(){var e=Object(F.a)(N.a.mark((function e(t){var n,r,i,a,o,s,u;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.props,r=n.loader,i=n.loadOptions,a=vc({},i),!r.preload){e.next=7;break}return e.next=5,r.preload(t,i);case 5:o=e.sent,Object.assign(a,o);case 7:return e.next=9,Object(j.a)(t,r,a);case 9:s=e.sent,u=new za(s,vc({onTileLoad:this._onTileLoad.bind(this),onTileUnload:this._onTileUnload.bind(this),onTileLoadFail:this.props.onTileError},a)),this.setState({tileset3d:u,layerMap:{}}),this._updateTileset(u),this.props.onTilesetLoad(u);case 14:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_onTileLoad",value:function(e){this.props.onTileLoad(e),this._updateTileset(this.state.tileset3d),this.setNeedsUpdate()}},{key:"_onTileUnload",value:function(e){delete this.state.layerMap[e.id],this.props.onTileUnload(e)}},{key:"_updateTileset",value:function(e){var t=this.context,n=t.timeline,r=t.viewport;if(n&&r&&e){var i=e.update(r);this.state.frameNumber!==i&&this.setState({frameNumber:i})}}},{key:"_create3DTileLayer",value:function(e){if(!e.content)return null;switch(e.type){case Vi:return this._createPointCloudTileLayer(e);case Wi:return this._create3DModelTileLayer(e);case Xi:return this._createSimpleMeshLayer(e);default:throw new Error("Tile3DLayer: Failed to render layer of type ".concat(e.content.type))}}},{key:"_createPointCloudTileLayer",value:function(e){var t=e.content,n=t.attributes,r=t.pointCount,i=t.constantRGBA,a=t.cartographicOrigin,o=t.modelMatrix,s=n.positions,u=n.normals,A=n.colors;if(!s)return null;var c=this.props,l=c.pointSize,f=c.getPointColor;return new(this.getSubLayerClass("pointcloud",Pn.a))({pointSize:l},this.getSubLayerProps({id:"pointcloud"}),{id:"".concat(this.id,"-pointcloud-").concat(e.id),data:{header:{vertexCount:r},attributes:{POSITION:s,NORMAL:u,COLOR_0:A}},coordinateSystem:Ln.a.METER_OFFSETS,coordinateOrigin:a,modelMatrix:o,getColor:i||f})}},{key:"_create3DModelTileLayer",value:function(e){var t=e.content,n=t.gltf,r=t.instances,i=t.cartographicOrigin,a=t.modelMatrix;return new(this.getSubLayerClass("scenegraph",Un.a))({_lighting:"pbr"},this.getSubLayerProps({id:"scenegraph"}),{id:"".concat(this.id,"-scenegraph-").concat(e.id),data:r||[{}],scenegraph:n,coordinateSystem:Ln.a.METER_OFFSETS,coordinateOrigin:i,modelMatrix:a,getTransformMatrix:function(e){return e.modelMatrix},getPosition:function(e){return[0,0,0]}})}},{key:"_createSimpleMeshLayer",value:function(e){for(var t=e.content,n=t.attributes,r=t.modelMatrix,i=t.cartographicOrigin,a=t.texture,o=n.normals,s=n.texCoords,u=new Float32Array(n.positions.value.length),A=0;A<u.length;A+=3)mc.copy(n.positions.value.subarray(A,A+3)),u.set(mc,A);var c=new Tn.a({drawMode:4,attributes:{positions:u,normals:o,texCoords:s}});return new(this.getSubLayerClass("mesh",Gn.a))(this.getSubLayerProps({id:"mesh"}),{id:"".concat(this.id,"-mesh-").concat(e.id),mesh:c,data:[{}],getPosition:[0,0,0],getColor:[255,255,255],texture:a,modelMatrix:r,coordinateOrigin:i,coordinateSystem:Ln.a.METER_OFFSETS})}},{key:"renderLayers",value:function(){var e=this,t=this.state,n=t.tileset3d,r=t.layerMap;return n?n.tiles.map((function(t){var n=r[t.id]&&r[t.id].layer;return t.selected?(n||(n=e._create3DTileLayer(t),r[t.id]={layer:n,tile:t}),n&&n.props&&!n.props.visible&&(n=n.clone({visible:!0}),r[t.id].layer=n),n):(n&&n.props&&n.props.visible&&(n=n.clone({visible:!1}),r[t.id].layer=n),n)})).filter(Boolean):null}}]),n}(g.a);bc.layerName="Tile3DLayer",bc.defaultProps=Ic;var Ec=n(11),Cc=n(13),Bc=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:257;Object(Ec.a)(this,e),this.gridSize=t;var n=t-1;if(n&n-1)throw new Error("Expected grid size to be 2^n+1, got ".concat(t,"."));this.numTriangles=n*n*2-2,this.numParentTriangles=this.numTriangles-n*n,this.indices=new Uint32Array(this.gridSize*this.gridSize),this.coords=new Uint16Array(4*this.numTriangles);for(var r=0;r<this.numTriangles;r++){var i=r+2,a=0,o=0,s=0,u=0,A=0,c=0;for(1&i?s=u=A=n:a=o=c=n;(i>>=1)>1;){var l=a+s>>1,f=o+u>>1;1&i?(s=a,u=o,a=A,o=c):(a=s,o=u,s=A,u=c),A=l,c=f}var h=4*r;this.coords[h+0]=a,this.coords[h+1]=o,this.coords[h+2]=s,this.coords[h+3]=u}}return Object(Cc.a)(e,[{key:"createTile",value:function(e){return new wc(e,this)}}]),e}(),wc=function(){function e(t,n){Object(Ec.a)(this,e);var r=n.gridSize;if(t.length!==r*r)throw new Error("Expected terrain data of length ".concat(r*r," (").concat(r," x ").concat(r,"), got ").concat(t.length,"."));this.terrain=t,this.martini=n,this.errors=new Float32Array(t.length),this.update()}return Object(Cc.a)(e,[{key:"update",value:function(){for(var e=this.martini,t=e.numTriangles,n=e.numParentTriangles,r=e.coords,i=e.gridSize,a=this.terrain,o=this.errors,s=t-1;s>=0;s--){var u=4*s,A=r[u+0],c=r[u+1],l=r[u+2],f=r[u+3],h=A+l>>1,g=c+f>>1,d=h+g-c,p=g+A-h,v=(a[c*i+A]+a[f*i+l])/2,y=g*i+h,m=Math.abs(v-a[y]);if(o[y]=Math.max(o[y],m),s<n){var I=(c+p>>1)*i+(A+d>>1),b=(f+p>>1)*i+(l+d>>1);o[y]=Math.max(o[y],o[I],o[b])}}}},{key:"getMesh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.martini,n=t.gridSize,r=t.indices,i=this.errors,a=0,o=0,s=n-1;function u(t,s,A,c,l,f){var h=t+A>>1,g=s+c>>1;Math.abs(t-l)+Math.abs(s-f)>1&&i[g*n+h]>e?(u(l,f,t,s,h,g),u(A,c,l,f,h,g)):(r[s*n+t]=r[s*n+t]||++a,r[c*n+A]=r[c*n+A]||++a,r[f*n+l]=r[f*n+l]||++a,o++)}r.fill(0),u(0,0,s,s,s,0),u(s,s,0,0,0,s);var A=new Uint16Array(2*a),c=new Uint32Array(3*o),l=0;function f(t,a,o,s,u,h){var g=t+o>>1,d=a+s>>1;if(Math.abs(t-u)+Math.abs(a-h)>1&&i[d*n+g]>e)f(u,h,t,a,g,d),f(o,s,u,h,g,d);else{var p=r[a*n+t]-1,v=r[s*n+o]-1,y=r[h*n+u]-1;A[2*p]=t,A[2*p+1]=a,A[2*v]=o,A[2*v+1]=s,A[2*y]=u,A[2*y+1]=h,c[l++]=p,c[l++]=v,c[l++]=y}}return f(0,0,s,s,s,0),f(s,s,0,0,0,s),{vertices:A,triangles:c}}}]),e}();function Qc(e,t){if(null===e)return null;var n=t.meshMaxError,r=t.bounds,i=t.elevationDecoder,a=e.data,o=e.width,s=o+1,u=function(e,t,n){for(var r=n.rScaler,i=n.bScaler,a=n.gScaler,o=n.offset,s=t+1,u=new Float32Array(s*s),A=0,c=0;c<t;c++)for(var l=0;l<t;l++,A++){var f=4*A,h=e[f+0],g=e[f+1],d=e[f+2];u[A+c]=h*r+g*a+d*i+o}for(var p=s*(s-1),v=0;v<s-1;v++,p++)u[p]=u[p-s];for(var y=s-1,m=0;m<s;m++,y+=s)u[y]=u[y-1];return u}(a,o,i),A=new Bc(s).createTile(u).getMesh(n),c=A.vertices,l=A.triangles,f=function(e,t,n,r){for(var i=n+1,a=e.length/2,o=new Float32Array(3*a),s=new Float32Array(2*a),u=r||[0,0,n,n],A=Object(p.a)(u,4),c=A[0],l=A[1],f=A[2],h=A[3],g=(f-c)/n,d=(h-l)/n,v=0;v<a;v++){var y=e[2*v],m=e[2*v+1],I=m*i+y;o[3*v+0]=y*g+c,o[3*v+1]=-m*d+h,o[3*v+2]=t[I],s[2*v+0]=y/n,s[2*v+1]=m/n}return{POSITION:{value:o,size:3},TEXCOORD_0:{value:s,size:2}}}(c,u,o,r);return{loaderData:{header:{}},header:{vertexCount:l.length,boundingBox:Object(so.a)(f)},mode:4,indices:{value:l,size:1},attributes:f}}function kc(){return(kc=Object(F.a)(N.a.mark((function e(t,n,r){var i;return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.image=n.image||{},n.image.type="data",e.next=4,r.parse(t,n,n.baseUri);case 4:return i=e.sent,e.abrupt("return",Qc(i,n.terrain));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _c(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 xc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_c(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Sc=xc(xc({},{id:"terrain",name:"Terrain",version:"2.3.0",extensions:["png","pngraw"],mimeTypes:["image/png"],options:{terrain:{bounds:null,workerUrl:"https://unpkg.com/@loaders.gl/terrain@".concat("2.3.0","/dist/terrain-loader.worker.js"),meshMaxError:10,elevationDecoder:{rScaler:1,gScaler:0,bScaler:0,offset:0}}}}),{},{parse:function(e,t,n){return kc.apply(this,arguments)}});function Oc(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}function Dc(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 Rc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dc(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var jc=[1],Mc=Rc(Rc({},pn.defaultProps),{},{elevationData:Vt,texture:Vt,meshMaxError:{type:"number",value:4},bounds:{type:"array",value:null,optional:!0,compare:!0},color:{type:"color",value:[255,255,255]},elevationDecoder:{type:"object",value:{rScaler:1,gScaler:0,bScaler:0,offset:0}},workerUrl:{type:"string",value:null},wireframe:!1,material:!0});function Nc(e){return Array.isArray(e)?e.join(";"):e}var Fc=function(e){Object(u.a)(n,e);var t=Oc(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"updateState",value:function(e){var t=e.props,n=e.oldProps,r=t.elevationData!==n.elevationData;if(r){var i=t.elevationData,a=i&&(Array.isArray(i)||i.includes("{x}")&&i.includes("{y}"));this.setState({isTiled:a})}var o=r||t.meshMaxError!==n.meshMaxError||t.elevationDecoder!==n.elevationDecoder||t.bounds!==n.bounds;if(!this.state.isTiled&&o){var s=this.loadTerrain(t);this.setState({terrain:s})}}},{key:"loadTerrain",value:function(e){var t=e.elevationData,n=e.bounds,r=e.elevationDecoder,i=e.meshMaxError,a=e.workerUrl;if(!t)return null;var o={terrain:{bounds:n,meshMaxError:i,elevationDecoder:r}};return null!==a&&(o.terrain.workerUrl=a),Object(j.a)(t,Sc,o)}},{key:"getTiledTerrainData",value:function(e){var t=this.props,n=t.elevationData,r=t.texture,i=t.elevationDecoder,a=t.meshMaxError,o=t.workerUrl,s=Xt(n,e),u=Xt(r,e),A=e.bbox,c=e.z,l=new Qt.a({longitude:(A.west+A.east)/2,latitude:(A.north+A.south)/2,zoom:c}),f=l.projectFlat([A.west,A.south]),h=l.projectFlat([A.east,A.north]),g=[f[0],f[1],h[0],h[1]],d=this.loadTerrain({elevationData:s,bounds:g,elevationDecoder:i,meshMaxError:a,workerUrl:o}),p=u?Object(j.a)(u).catch((function(e){return null})):Promise.resolve(null);return Promise.all([d,p])}},{key:"renderSubLayers",value:function(e){var t=this.getSubLayerClass("mesh",Gn.a),n=e.data,r=e.color;if(!n)return null;var i=Object(p.a)(n,2),a=i[0],o=i[1];return new t(e,{data:jc,mesh:a,texture:o,coordinateSystem:Ln.a.CARTESIAN,getPosition:function(e){return[0,0,0]},getColor:r})}},{key:"onViewportLoad",value:function(e){if(e&&0!==e.length&&!e.every((function(e){return!e}))){var t=this.state.zRange,n=e.filter(Boolean).map((function(e){return e[0].header.boundingBox.map((function(e){return e[2]}))})),r=Math.min.apply(Math,Object(q.a)(n.map((function(e){return e[0]})))),i=Math.max.apply(Math,Object(q.a)(n.map((function(e){return e[1]}))));(!t||r<t[0]||i>t[1])&&this.setState({zRange:[r,i]})}}},{key:"renderLayers",value:function(){var e=this.props,t=e.color,n=e.material,r=e.elevationData,i=e.texture,a=e.wireframe,o=e.meshMaxError,s=e.elevationDecoder,u=e.tileSize,A=e.maxZoom,c=e.minZoom,l=e.extent,f=e.maxRequests;return this.state.isTiled?new pn(this.getSubLayerProps({id:"tiles"}),{wireframe:a,color:t,material:n,getTileData:this.getTiledTerrainData.bind(this),renderSubLayers:this.renderSubLayers.bind(this),updateTriggers:{getTileData:{elevationData:Nc(r),texture:Nc(i),meshMaxError:o,elevationDecoder:s}},onViewportLoad:this.onViewportLoad.bind(this),zRange:this.state.zRange||null,tileSize:u,maxZoom:A,minZoom:c,extent:l,maxRequests:f}):new(this.getSubLayerClass("mesh",Gn.a))(this.getSubLayerProps({id:"mesh"}),{data:jc,mesh:this.state.terrain,texture:i,_instanced:!1,getPosition:function(e){return[0,0,0]},getColor:t,material:n,wireframe:a})}}]),n}(g.a);Fc.layerName="TerrainLayer",Fc.defaultProps=Mc;var Tc=n(473),Lc=n.n(Tc),Pc=function(){function e(t,n,r,i,a){Object(s.a)(this,e),this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=i,this._values=a,t.readFields(Gc,this,n)}return Object(h.a)(e,null,[{key:"types",get:function(){return["Unknown","Point","LineString","Polygon"]}}]),Object(h.a)(e,[{key:"loadGeometry",value:function(){var e=this._pbf;e.pos=this._geometry;for(var t,n=e.readVarint()+e.pos,r=1,i=0,a=0,o=0,s=[];e.pos<n;){if(i<=0){var u=e.readVarint();r=7&u,i=u>>3}if(i--,1===r||2===r)a+=e.readSVarint(),o+=e.readSVarint(),1===r&&(t&&s.push(t),t=[]),t.push(new Lc.a(a,o));else{if(7!==r)throw new Error("unknown command ".concat(r));t&&t.push(t[0].clone())}}return t&&s.push(t),s}},{key:"bbox",value:function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,n=1,r=0,i=0,a=0,o=1/0,s=-1/0,u=1/0,A=-1/0;e.pos<t;){if(r<=0){var c=e.readVarint();n=7&c,r=c>>3}if(r--,1===n||2===n)(i+=e.readSVarint())<o&&(o=i),i>s&&(s=i),(a+=e.readSVarint())<u&&(u=a),a>A&&(A=a);else if(7!==n)throw new Error("unknown command ".concat(n))}return[o,u,s,A]}},{key:"toGeoJSON",value:function(t,n,r){var i,a,o=this.extent*Math.pow(2,r),s=this.extent*t,u=this.extent*n,A=this.loadGeometry(),c=e.types[this.type];function l(e){for(var t=0;t<e.length;t++){var n=e[t],r=180-360*(n.y+u)/o;e[t]=[360*(n.x+s)/o-180,360/Math.PI*Math.atan(Math.exp(r*Math.PI/180))-90]}}switch(this.type){case 1:var f=[];for(i=0;i<A.length;i++)f[i]=A[i][0];l(A=f);break;case 2:for(i=0;i<A.length;i++)l(A[i]);break;case 3:for(A=function(e){var t=e.length;if(t<=1)return[e];for(var n,r,i=[],a=0;a<t;a++){var o=Uc(e[a]);0!==o&&(void 0===r&&(r=o<0),r===o<0?(n&&i.push(n),n=[e[a]]):n.push(e[a]))}n&&i.push(n);return i}(A),i=0;i<A.length;i++)for(a=0;a<A[i].length;a++)l(A[i][a])}return 1===A.length?A=A[0]:c="Multi".concat(c),{type:"Feature",geometry:{type:c,coordinates:A},properties:this.properties}}}]),e}();function Uc(e){for(var t,n,r=0,i=0,a=e.length-1;i<e.length;a=i++)t=e[i],r+=((n=e[a]).x-t.x)*(t.y+n.y);return r}function Gc(e,t,n){1===e?t.id=n.readVarint():2===e?function(e,t){var n=e.readVarint()+e.pos;for(;e.pos<n;){var r=t._keys[e.readVarint()],i=t._values[e.readVarint()];t.properties[r]=i}}(n,t):3===e?t.type=n.readVarint():4===e&&(t._geometry=n.pos)}var qc=function(){function e(t,n){Object(s.a)(this,e),this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(Hc,this,n),this.length=this._features.length}return Object(h.a)(e,[{key:"feature",value:function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new Pc(this._pbf,t,this.extent,this._keys,this._values)}}]),e}();function Hc(e,t,n){15===e?t.version=n.readVarint():1===e?t.name=n.readString():5===e?t.extent=n.readVarint():2===e?t._features.push(n.pos):3===e?t._keys.push(n.readString()):4===e&&t._values.push(function(e){var t=null,n=e.readVarint()+e.pos;for(;e.pos<n;){var r=e.readVarint()>>3;t=1===r?e.readString():2===r?e.readFloat():3===r?e.readDouble():4===r?e.readVarint64():5===r?e.readVarint():6===r?e.readSVarint():7===r?e.readBoolean():null}return t}(n))}var Yc=function e(t,n){Object(s.a)(this,e),this.layers=t.readFields(Jc,{},n)};function Jc(e,t,n){if(3===e){var r=new qc(n,n.readVarint()+n.pos);r.length&&(t[r.name]=r)}}function zc(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return Kc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kc(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Kc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wc(e){var t,n,r=0,i=0,a=0,o=0,s=0,u=0,A=0,c=0,l=0,f=new Set,h={},g=zc(e);try{for(g.s();!(t=g.n()).done;){var d=t.value,p=d.geometry;switch(p.type){case"Point":i++,r++,f.add(p.coordinates.length);break;case"MultiPoint":i++,r+=p.coordinates.length;var v,y=zc(p.coordinates);try{for(y.s();!(v=y.n()).done;){var m=v.value;f.add(m.length)}}catch(P){y.e(P)}finally{y.f()}break;case"LineString":s++,a+=p.coordinates.length,o++;var I,b=zc(p.coordinates);try{for(b.s();!(I=b.n()).done;){var E=I.value;f.add(E.length)}}catch(P){b.e(P)}finally{b.f()}break;case"MultiLineString":s++;var C,B=zc(p.coordinates);try{for(B.s();!(C=B.n()).done;){var w=C.value;a+=w.length,o++;var Q,k=zc(w);try{for(k.s();!(Q=k.n()).done;){var _=Q.value;f.add(_.length)}}catch(P){k.e(P)}finally{k.f()}}}catch(P){B.e(P)}finally{B.f()}break;case"Polygon":l++,A++,c+=p.coordinates.length,u+=sl(p.coordinates).length;var x,S=zc(sl(p.coordinates));try{for(S.s();!(x=S.n()).done;){var O=x.value;f.add(O.length)}}catch(P){S.e(P)}finally{S.f()}break;case"MultiPolygon":l++;var D,R=zc(p.coordinates);try{for(R.s();!(D=R.n()).done;){var j=D.value;A++,c+=j.length,u+=sl(j).length;var M,N=zc(sl(j));try{for(N.s();!(M=N.n()).done;){var F=M.value;f.add(F.length)}}catch(P){N.e(P)}finally{N.f()}}}catch(P){R.e(P)}finally{R.f()}break;default:throw new Error("Unsupported geometry type: ".concat(p.type))}if(d.properties)for(var T in d.properties){var L=d.properties[T];h[T]=h[T]||void 0===h[T]?(n=L,Number.isFinite(n)):h[T]}}}catch(P){g.e(P)}finally{g.f()}return{pointPositionsCount:r,pointFeaturesCount:i,linePositionsCount:a,linePathsCount:o,lineFeaturesCount:s,coordLength:Math.max.apply(Math,Object(q.a)(f)),polygonPositionsCount:u,polygonObjectsCount:A,polygonRingsCount:c,polygonFeaturesCount:l,numericPropKeys:Object.keys(h).filter((function(e){return h[e]}))}}function Vc(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.pointPositionsCount,i=t.pointFeaturesCount,a=t.linePositionsCount,o=t.linePathsCount,s=t.lineFeaturesCount,u=t.polygonPositionsCount,A=t.polygonObjectsCount,c=t.polygonRingsCount,l=t.polygonFeaturesCount,f=n.coordLength,h=n.numericPropKeys,g=n.PositionDataType,d=void 0===g?Float32Array:g,p=e.length>65535?Uint32Array:Uint16Array,v={positions:new d(r*f),globalFeatureIds:new p(r),featureIds:i>65535?new Uint32Array(r):new Uint16Array(r),numericProps:{},properties:[]},y={pathIndices:a>65535?new Uint32Array(o+1):new Uint16Array(o+1),positions:new d(a*f),globalFeatureIds:new p(a),featureIds:s>65535?new Uint32Array(a):new Uint16Array(a),numericProps:{},properties:[]},m={polygonIndices:u>65535?new Uint32Array(A+1):new Uint16Array(A+1),primitivePolygonIndices:u>65535?new Uint32Array(c+1):new Uint16Array(c+1),positions:new d(u*f),globalFeatureIds:new p(u),featureIds:l>65535?new Uint32Array(u):new Uint16Array(u),numericProps:{},properties:[]},I=0,b=[v,y,m];I<b.length;I++){var E,C=b[I],B=zc(h);try{for(B.s();!(E=B.n()).done;){var w=E.value;C.numericProps[w]=new Float32Array(C.positions.length/f)}}catch(D){B.e(D)}finally{B.f()}}y.pathIndices[o]=a,m.polygonIndices[A]=u,m.primitivePolygonIndices[c]=u;var Q,k={pointPosition:0,pointFeature:0,linePosition:0,linePath:0,lineFeature:0,polygonPosition:0,polygonObject:0,polygonRing:0,polygonFeature:0,feature:0},_=zc(e);try{for(_.s();!(Q=_.n()).done;){var x=Q.value,S=x.geometry,O=x.properties;switch(S.type){case"Point":Xc(S.coordinates,v,k,f,O),v.properties.push(al(O,h)),k.pointFeature++;break;case"MultiPoint":Zc(S.coordinates,v,k,f,O),v.properties.push(al(O,h)),k.pointFeature++;break;case"LineString":$c(S.coordinates,y,k,f,O),y.properties.push(al(O,h)),k.lineFeature++;break;case"MultiLineString":el(S.coordinates,y,k,f,O),y.properties.push(al(O,h)),k.lineFeature++;break;case"Polygon":tl(S.coordinates,m,k,f,O),m.properties.push(al(O,h)),k.polygonFeature++;break;case"MultiPolygon":nl(S.coordinates,m,k,f,O),m.properties.push(al(O,h)),k.polygonFeature++;break;default:throw new Error("Invalid geometry type")}k.feature++}}catch(D){_.e(D)}finally{_.f()}return rl(v,y,m,f)}function Xc(e,t,n,r,i){t.positions.set(e,n.pointPosition*r),t.globalFeatureIds[n.pointPosition]=n.feature,t.featureIds[n.pointPosition]=n.pointFeature,il(t,i,n.pointPosition,1),n.pointPosition++}function Zc(e,t,n,r,i){var a,o=zc(e);try{for(o.s();!(a=o.n()).done;){Xc(a.value,t,n,r,i)}}catch(s){o.e(s)}finally{o.f()}}function $c(e,t,n,r,i){t.pathIndices[n.linePath]=n.linePosition,n.linePath++,ol(t.positions,e,n.linePosition,r);var a=e.length;il(t,i,n.linePosition,a),t.globalFeatureIds.set(new Uint32Array(a).fill(n.feature),n.linePosition),t.featureIds.set(new Uint32Array(a).fill(n.lineFeature),n.linePosition),n.linePosition+=a}function el(e,t,n,r,i){var a,o=zc(e);try{for(o.s();!(a=o.n()).done;){$c(a.value,t,n,r,i)}}catch(s){o.e(s)}finally{o.f()}}function tl(e,t,n,r,i){t.polygonIndices[n.polygonObject]=n.polygonPosition,n.polygonObject++;var a,o=zc(e);try{for(o.s();!(a=o.n()).done;){var s=a.value;t.primitivePolygonIndices[n.polygonRing]=n.polygonPosition,n.polygonRing++,ol(t.positions,s,n.polygonPosition,r);var u=s.length;il(t,i,n.polygonPosition,u),t.globalFeatureIds.set(new Uint32Array(u).fill(n.feature),n.polygonPosition),t.featureIds.set(new Uint32Array(u).fill(n.polygonFeature),n.polygonPosition),n.polygonPosition+=u}}catch(A){o.e(A)}finally{o.f()}}function nl(e,t,n,r,i){var a,o=zc(e);try{for(o.s();!(a=o.n()).done;){tl(a.value,t,n,r,i)}}catch(s){o.e(s)}finally{o.f()}}function rl(e,t,n,r){var i={points:{positions:{value:e.positions,size:r},globalFeatureIds:{value:e.globalFeatureIds,size:1},featureIds:{value:e.featureIds,size:1},numericProps:e.numericProps,properties:e.properties},lines:{pathIndices:{value:t.pathIndices,size:1},positions:{value:t.positions,size:r},globalFeatureIds:{value:t.globalFeatureIds,size:1},featureIds:{value:t.featureIds,size:1},numericProps:t.numericProps,properties:t.properties},polygons:{polygonIndices:{value:n.polygonIndices,size:1},primitivePolygonIndices:{value:n.primitivePolygonIndices,size:1},positions:{value:n.positions,size:r},globalFeatureIds:{value:n.globalFeatureIds,size:1},featureIds:{value:n.featureIds,size:1},numericProps:n.numericProps,properties:n.properties}};for(var a in i)for(var o in i[a].numericProps)i[a].numericProps[o]={value:i[a].numericProps[o],size:1};return i}function il(e,t,n,r){for(var i in e.numericProps)i in t&&e.numericProps[i].set(new Array(r).fill(t[i]),n)}function al(e,t){for(var n in e)t.includes(n)&&delete e[n];return e}function ol(e,t,n,r){var i,a=n*r,o=zc(t);try{for(o.s();!(i=o.n()).done;){var s=i.value;e.set(s,a),a+=r}}catch(u){o.e(u)}finally{o.f()}}function sl(e){var t;return(t=[]).concat.apply(t,Object(q.a)(e))}var ul=n(472),Al=n.n(ul),cl=["Unknown","Point","LineString","Polygon"];function ll(e,t){for(var n=0;n<e.length;n++){var r=e[n];e[n]=[r.x/t.extent,r.y/t.extent]}}function fl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e,t){return e},n=cl[e.type],r=e.loadGeometry();switch(e.type){case 1:for(var i=[],a=0;a<r.length;a++)i[a]=r[a][0];t(r=i,e);break;case 2:for(var o=0;o<r.length;o++)t(r[o],e);break;case 3:r=gl(r);for(var s=0;s<r.length;s++)for(var u=0;u<r[s].length;u++)t(r[s][u],e)}return hl(n,e,r)}function hl(e,t,n){var r=e;1===n.length?n=n[0]:r="Multi".concat(e);var i={type:"Feature",geometry:{type:r,coordinates:n},properties:t.properties||{}};return"id"in t&&(i.id=t.id),i}function gl(e){var t=e.length;if(t<=1)return[e];for(var n,r,i=[],a=0;a<t;a++){var o=dl(e[a]);0!==o&&(void 0===r&&(r=o<0),r===o<0?(n&&i.push(n),n=[e[a]]):n&&n.push(e[a]))}return n&&i.push(n),i}function dl(e){for(var t,n,r=e.length,i=0,a=0,o=r-1;a<r;o=a++)t=e[a],i+=((n=e[o]).x-t.x)*(t.y+n.y);return i}function pl(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 vl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pl(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yl(e,t){if((t=t||{}).mvt=t.mvt||{},t.gis=t.gis||{},0===e.byteLength)return[];var n=new Yc(new Al.a(e)),r=t.mvt,i=[];if((Array.isArray(r.layers)?r.layers:Object.keys(n.layers)).forEach((function(e){var t=n.layers[e],a=vl(vl({},r),{},{layerName:e});if(t)for(var o=0;o<t.length;o++){var s=ml(t.feature(o),a);i.push(s)}})),"binary"===t.gis.format){var a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Wc(e);return Vc(e,n,{coordLength:t.coordLength||n.coordLength,numericPropKeys:t.numericPropKeys||n.numericPropKeys,PositionDataType:t.PositionDataType||Float32Array})}(i);return a.byteLength=e.byteLength,a}return i}function ml(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="wgs84"===t.coordinates,r=t.tileIndex&&Number.isFinite(t.tileIndex.x)&&Number.isFinite(t.tileIndex.y)&&Number.isFinite(t.tileIndex.z);if(n&&!r)throw new Error("MVT Loader: WGS84 coordinates need tileIndex property. Check documentation.");var i=n&&r?e.toGeoJSON(t.tileIndex.x,t.tileIndex.y,t.tileIndex.z):fl(e,ll);return t.layerProperty&&(i.properties[t.layerProperty]=t.layerName),i}function Il(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 bl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Il(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Il(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var El=bl(bl({},{id:"mvt",name:"Mapbox Vector Tile",version:"2.3.0",extensions:["mvt"],mimeTypes:["application/x-protobuf"],category:"geometry",options:{mvt:{coordinates:"local",layerProperty:"layerName",layers:null,tileIndex:null,_format:"geojson",workerUrl:"https://unpkg.com/@loaders.gl/mvt@".concat("2.3.0","/dist/mvt-loader.worker.js")}}}),{},{parse:function(){var e=Object(F.a)(N.a.mark((function e(t,n){return N.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",yl(t,n));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),parseSync:yl,binary:!0}),Cl=n(414);function Bl(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}var wl={clipBounds:[0,0,1,1]},Ql="\nuniform vec4 clip_bounds;\n\nbool clip_isInBounds(vec2 position) {\n  return position.x >= clip_bounds[0] && position.y >= clip_bounds[1] && position.x < clip_bounds[2] && position.y < clip_bounds[3];\n}\n",kl={name:"clip-vs",vs:Ql},_l={"vs:#decl":"\nvarying float clip_isVisible;\n","vs:DECKGL_FILTER_GL_POSITION":"\n  clip_isVisible = float(clip_isInBounds(geometry.worldPosition.xy));\n","fs:#decl":"\nvarying float clip_isVisible;\n","fs:DECKGL_FILTER_COLOR":"\n  if (clip_isVisible < 0.5) discard;\n"},xl={name:"clip-fs",fs:Ql},Sl={"vs:#decl":"\nvarying vec2 clip_commonPosition;\n","vs:DECKGL_FILTER_GL_POSITION":"\n  clip_commonPosition = geometry.position.xy;\n","fs:#decl":"\nvarying vec2 clip_commonPosition;\n","fs:DECKGL_FILTER_COLOR":"\n  if (!clip_isInBounds(clip_commonPosition)) discard;\n"},Ol=function(e){Object(u.a)(n,e);var t=Bl(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"getShaders",value:function(){var e="instancePositions"in this.getAttributeManager().attributes;return"clipByInstance"in this.props&&(e=this.props.clipByInstance),this.state.clipByInstance=e,e?{modules:[kl],inject:_l}:{modules:[xl],inject:Sl}}},{key:"draw",value:function(e){var t=e.uniforms,n=this.props.clipBounds,r=void 0===n?wl.clipBounds:n;if(this.state.clipByInstance)t.clip_bounds=r;else{var i=this.projectPosition([r[0],r[1],0]),a=this.projectPosition([r[2],r[3],0]);t.clip_bounds=[Math.min(i[0],a[0]),Math.min(i[1],a[1]),Math.max(i[0],a[0]),Math.max(i[1],a[1])]}}}]),n}(Cl.a);function Dl(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 Rl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dl(Object(n),!0).forEach((function(t){Object(O.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jl(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(A.a)(this,n)}}Ol.extensionName="ClipExtension",Ol.defaultProps=wl;var Ml=function(e){Object(u.a)(n,e);var t=jl(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(h.a)(n,[{key:"getTileData",value:function(e){var t=Xt(this.props.data,e);if(!t)return Promise.reject("Invalid URL");var n=this.getLoadOptions();return n=Rl(Rl({},n),{},{mvt:Rl(Rl({},n&&n.mvt),{},{coordinates:this.context.viewport.resolution?"wgs84":"local",tileIndex:{x:e.x,y:e.y,z:e.z}})}),Object(j.a)(t,El,n)}},{key:"renderSubLayers",value:function(e){var t=e.tile,r=Math.pow(2,t.z),i=512/r,a=-i,o=512*t.x/r,s=512*(1-t.y/r),u=(new kn.a).scale([i,a,1]);return e.autoHighlight=!1,this.context.viewport.resolution||(e.modelMatrix=u,e.coordinateOrigin=[o,s,0],e.coordinateSystem=Ln.a.CARTESIAN,e.extensions=[].concat(Object(q.a)(e.extensions||[]),[new Ol])),Object(vn.a)(Object(c.a)(n.prototype),"renderSubLayers",this).call(this,e)}},{key:"onHover",value:function(e,t){var r=this.props,i=r.uniqueIdProperty;if(r.autoHighlight){var a,o=this.state.hoveredFeatureId,s=e.object;s&&(a=Nl(s,i)),o!==a&&this.setState({hoveredFeatureId:a})}return Object(vn.a)(Object(c.a)(n.prototype),"onHover",this).call(this,e,t)}},{key:"getHighlightedObjectIndex",value:function(e){var t=this.state.hoveredFeatureId,n=this.props,r=n.uniqueIdProperty,i=n.highlightedFeatureId,a=e.data;if(!(Fl(t)||Fl(i))||!Array.isArray(a))return-1;var o=Fl(i)?i:t;return a.findIndex((function(e){return Nl(e,r)===o}))}}]),n}(pn);function Nl(e,t){return t?e.properties[t]:"id"in e?e.id:-1}function Fl(e){return void 0!==e&&null!==e&&""!==e}Ml.layerName="MVTLayer",Ml.defaultProps={uniqueIdProperty:{type:"string",value:""},highlightedFeatureId:null},n.d(t,"GreatCircleLayer",(function(){return f})),n.d(t,"S2Layer",(function(){return S})),n.d(t,"TileLayer",(function(){return pn})),n.d(t,"TripsLayer",(function(){return mn})),n.d(t,"H3ClusterLayer",(function(){return Qn})),n.d(t,"H3HexagonLayer",(function(){return Fn})),n.d(t,"Tile3DLayer",(function(){return bc})),n.d(t,"TerrainLayer",(function(){return Fc})),n.d(t,"MVTLayer",(function(){return Ml}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),i=n.n(r);function a(e){var t=e.x,n=e.y,a=e.parentWidth,o=e.parentHeight,s=e.children,u=Object(r.useRef)(null),A=a<500;return Object(r.useEffect)((function(){var e=u.current,r=A?-5:10,i=t>a/2?-(100+r):r,s=n>o/2?-(100+r):r,c=A?.75:1;e.style.transform="translateX(".concat(i,"%) translateY(").concat(s,"%) scale(").concat(c,")"),e.style.whiteSpace=A?"normal":"nowrap"})),i.a.createElement("div",{ref:u,className:"cell-tooltip bg-primary",style:{left:"".concat(t,"px"),top:"".concat(n,"px")}},s)}},function(e,t,n){"use strict";var r=n(515);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,A=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,h=r?Symbol.for("react.forward_ref"):60112,g=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,p=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,m=r?Symbol.for("react.fundamental"):60117,I=r?Symbol.for("react.responder"):60118,b=r?Symbol.for("react.scope"):60119;function E(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case l:case f:case o:case u:case s:case g:return e;default:switch(e=e&&e.$$typeof){case c:case h:case v:case p:case A:return e;default:return t}}case a:return t}}}function C(e){return E(e)===f}t.AsyncMode=l,t.ConcurrentMode=f,t.ContextConsumer=c,t.ContextProvider=A,t.Element=i,t.ForwardRef=h,t.Fragment=o,t.Lazy=v,t.Memo=p,t.Portal=a,t.Profiler=u,t.StrictMode=s,t.Suspense=g,t.isAsyncMode=function(e){return C(e)||E(e)===l},t.isConcurrentMode=C,t.isContextConsumer=function(e){return E(e)===c},t.isContextProvider=function(e){return E(e)===A},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return E(e)===h},t.isFragment=function(e){return E(e)===o},t.isLazy=function(e){return E(e)===v},t.isMemo=function(e){return E(e)===p},t.isPortal=function(e){return E(e)===a},t.isProfiler=function(e){return E(e)===u},t.isStrictMode=function(e){return E(e)===s},t.isSuspense=function(e){return E(e)===g},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===o||e===f||e===u||e===s||e===g||e===d||"object"===typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===p||e.$$typeof===A||e.$$typeof===c||e.$$typeof===h||e.$$typeof===m||e.$$typeof===I||e.$$typeof===b||e.$$typeof===y)},t.typeOf=E},function(e,t,n){var r=n(601),i=n(602),a=n(342),o=n(603);e.exports=function(e,t){return r(e)||i(e,t)||a(e,t)||o()}},function(e,t,n){var r=n(138).Uint8Array;e.exports=r},function(e,t,n){var r=n(520),i=n(499),a=n(394);e.exports=function(e){return r(e,a,i)}},function(e,t,n){var r=n(498),i=n(203);e.exports=function(e,t,n){var a=t(e);return i(e)?a:r(a,n(e))}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(707),i=n(482),a=n(203),o=n(372),s=n(443),u=n(391),A=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),c=!n&&i(e),l=!n&&!c&&o(e),f=!n&&!c&&!l&&u(e),h=n||c||l||f,g=h?r(e.length,String):[],d=g.length;for(var p in e)!t&&!A.call(e,p)||h&&("length"==p||l&&("offset"==p||"parent"==p)||f&&("buffer"==p||"byteLength"==p||"byteOffset"==p)||s(p,d))||g.push(p);return g}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(199)(n(138),"Set");e.exports=r},function(e,t,n){var r=n(760),i=n(1018),a=n(867),o=Object.defineProperty;t.f=n(506)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return o(e,t,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!==i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!==i--;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;0!==i--;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r,i=n(134);(r=function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r<t-1?e[r+2]:2*a-i;return function(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}((n-r/t)*t,o,i,a,s)}},function(e){var t,n,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(t=0;t<i;++t)n=[e[t][0],e[t][1],e[t][2]],a[t]=n[0]||0,o[t]=n[1]||0,s[t]=n[2]||0;return a=r(a),o=r(o),s=r(s),function(e){return[a(e),o(e),s(e)]}})([[103,0,31],[178,24,43],[214,96,77],[244,165,130],[253,219,199],[247,247,247],[209,229,240],[146,197,222],[67,147,195],[33,102,172],[5,48,97]]);var a=function(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}([[13,8,135],[16,7,136],[19,7,137],[22,7,138],[25,6,140],[27,6,141],[29,6,142],[32,6,143],[34,6,144],[36,6,145],[38,5,145],[40,5,146],[42,5,147],[44,5,148],[46,5,149],[47,5,150],[49,5,151],[51,5,151],[53,4,152],[55,4,153],[56,4,154],[58,4,154],[60,4,155],[62,4,156],[63,4,156],[65,4,157],[67,3,158],[68,3,158],[70,3,159],[72,3,159],[73,3,160],[75,3,161],[76,2,161],[78,2,162],[80,2,162],[81,2,163],[83,2,163],[85,2,164],[86,1,164],[88,1,164],[89,1,165],[91,1,165],[92,1,166],[94,1,166],[96,1,166],[97,0,167],[99,0,167],[100,0,167],[102,0,167],[103,0,168],[105,0,168],[106,0,168],[108,0,168],[110,0,168],[111,0,168],[113,0,168],[114,1,168],[116,1,168],[117,1,168],[119,1,168],[120,1,168],[122,2,168],[123,2,168],[125,3,168],[126,3,168],[128,4,168],[129,4,167],[131,5,167],[132,5,167],[134,6,166],[135,7,166],[136,8,166],[138,9,165],[139,10,165],[141,11,165],[142,12,164],[143,13,164],[145,14,163],[146,15,163],[148,16,162],[149,17,161],[150,19,161],[152,20,160],[153,21,159],[154,22,159],[156,23,158],[157,24,157],[158,25,157],[160,26,156],[161,27,155],[162,29,154],[163,30,154],[165,31,153],[166,32,152],[167,33,151],[168,34,150],[170,35,149],[171,36,148],[172,38,148],[173,39,147],[174,40,146],[176,41,145],[177,42,144],[178,43,143],[179,44,142],[180,46,141],[181,47,140],[182,48,139],[183,49,138],[184,50,137],[186,51,136],[187,52,136],[188,53,135],[189,55,134],[190,56,133],[191,57,132],[192,58,131],[193,59,130],[194,60,129],[195,61,128],[196,62,127],[197,64,126],[198,65,125],[199,66,124],[200,67,123],[201,68,122],[202,69,122],[203,70,121],[204,71,120],[204,73,119],[205,74,118],[206,75,117],[207,76,116],[208,77,115],[209,78,114],[210,79,113],[211,81,113],[212,82,112],[213,83,111],[213,84,110],[214,85,109],[215,86,108],[216,87,107],[217,88,106],[218,90,106],[218,91,105],[219,92,104],[220,93,103],[221,94,102],[222,95,101],[222,97,100],[223,98,99],[224,99,99],[225,100,98],[226,101,97],[226,102,96],[227,104,95],[228,105,94],[229,106,93],[229,107,93],[230,108,92],[231,110,91],[231,111,90],[232,112,89],[233,113,88],[233,114,87],[234,116,87],[235,117,86],[235,118,85],[236,119,84],[237,121,83],[237,122,82],[238,123,81],[239,124,81],[239,126,80],[240,127,79],[240,128,78],[241,129,77],[241,131,76],[242,132,75],[243,133,75],[243,135,74],[244,136,73],[244,137,72],[245,139,71],[245,140,70],[246,141,69],[246,143,68],[247,144,68],[247,145,67],[247,147,66],[248,148,65],[248,149,64],[249,151,63],[249,152,62],[249,154,62],[250,155,61],[250,156,60],[250,158,59],[251,159,58],[251,161,57],[251,162,56],[252,163,56],[252,165,55],[252,166,54],[252,168,53],[252,169,52],[253,171,51],[253,172,51],[253,174,50],[253,175,49],[253,177,48],[253,178,47],[253,180,47],[253,181,46],[254,183,45],[254,184,44],[254,186,44],[254,187,43],[254,189,42],[254,190,42],[254,192,41],[253,194,41],[253,195,40],[253,197,39],[253,198,39],[253,200,39],[253,202,38],[253,203,38],[252,205,37],[252,206,37],[252,208,37],[252,210,37],[251,211,36],[251,213,36],[251,215,36],[250,216,36],[250,218,36],[249,220,36],[249,221,37],[248,223,37],[248,225,37],[247,226,37],[247,228,37],[246,230,38],[246,232,38],[245,233,38],[245,235,39],[244,237,39],[243,238,39],[243,240,39],[242,242,39],[241,244,38],[241,245,37],[240,247,36],[240,249,33]]);function o(e){var t=e.cellColorEncoding,n=e.expressionMatrix,r=e.geneSelection,o=e.cellSets,s=e.cellSetSelection,u=e.cellSetColor;if("geneSelection"===t&&r&&r.length>=1&&n){var A=r[0],c=a,l=n.cols.indexOf(A);if(-1!==l){var f=n.cols.length;return new Map(n.rows.map((function(e,t){var r=n.matrix[t*f+l];return[e,c(r/255)]})))}}else if("cellSetSelection"===t&&s&&o)return Object(i.n)(o,s,u);return new Map}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(18),i=n(25);function a(e){return e&&"object"===Object(i.a)(e)&&e.constructor===Object}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},i=n.clone?Object(r.a)({},e):e;return a(e)&&a(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(a(t[r])&&r in e?i[r]=o(e[r],t[r],n):i[r]=t[r])})),i}},function(e,t,n){"use strict";var r=n(18),i=n(33),a=n(0),o=n.n(a),s=(n(28),n(75)),u=n(37),A=n(68),c=n(92),l=n(48),f="undefined"!==typeof window?a.useLayoutEffect:a.useEffect;var h=function(e){var t=e.children,n=e.defer,r=void 0!==n&&n,i=e.fallback,o=void 0===i?null:i,s=a.useState(!1),u=s[0],A=s[1];return f((function(){r||A(!0)}),[r]),a.useEffect((function(){r&&A(!0)}),[r]),a.createElement(a.Fragment,null,u?t:o)},g=n(237),d=n(23),p=n(175),v=n(58),y=n(202),m=n(267);function I(e,t){var n=Object.create(null);return e&&a.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&Object(a.isValidElement)(e)?t(e):e}(e)})),n}function b(e,t,n){return null!=n[t]?n[t]:e.props[t]}function E(e,t,n){var r=I(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),a=[];for(var o in e)o in t?a.length&&(i[o]=a,a=[]):a.push(o);var s={};for(var u in t){if(i[u])for(r=0;r<i[u].length;r++){var A=i[u][r];s[i[u][r]]=n(A)}s[u]=n(u)}for(r=0;r<a.length;r++)s[a[r]]=n(a[r]);return s}(t,r);return Object.keys(i).forEach((function(o){var s=i[o];if(Object(a.isValidElement)(s)){var u=o in t,A=o in r,c=t[o],l=Object(a.isValidElement)(c)&&!c.props.in;!A||u&&!l?A||!u||l?A&&u&&Object(a.isValidElement)(c)&&(i[o]=Object(a.cloneElement)(s,{onExited:n.bind(null,s),in:c.props.in,exit:b(s,"exit",e),enter:b(s,"enter",e)})):i[o]=Object(a.cloneElement)(s,{in:!1}):i[o]=Object(a.cloneElement)(s,{onExited:n.bind(null,s),in:!0,exit:b(s,"exit",e),enter:b(s,"enter",e)})}})),i}var C=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},B=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(Object(v.a)(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}Object(y.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,I(n.children,(function(e){return Object(a.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:b(e,"appear",n),enter:b(e,"enter",n),exit:b(e,"exit",n)})}))):E(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=I(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=Object(r.a)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Object(p.a)(e,["component","childFactory"]),i=this.state.contextValue,a=C(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?o.a.createElement(m.a.Provider,{value:i},a):o.a.createElement(m.a.Provider,{value:i},o.a.createElement(t,r,a))},t}(o.a.Component);B.propTypes={},B.defaultProps={component:"div",childFactory:function(e){return e}};var w=B,Q="undefined"===typeof window?a.useEffect:a.useLayoutEffect;var k=function(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,i=e.rippleX,o=e.rippleY,s=e.rippleSize,A=e.in,l=e.onExited,f=void 0===l?function(){}:l,h=e.timeout,g=a.useState(!1),d=g[0],p=g[1],v=Object(u.a)(t.ripple,t.rippleVisible,r&&t.ripplePulsate),y={width:s,height:s,top:-s/2+o,left:-s/2+i},m=Object(u.a)(t.child,d&&t.childLeaving,r&&t.childPulsate),I=Object(c.a)(f);return Q((function(){if(!A){p(!0);var e=setTimeout(I,h);return function(){clearTimeout(e)}}}),[I,A,h]),a.createElement("span",{className:v,style:y},a.createElement("span",{className:m}))},_=a.forwardRef((function(e,t){var n=e.center,o=void 0!==n&&n,s=e.classes,A=e.className,c=Object(i.a)(e,["center","classes","className"]),l=a.useState([]),f=l[0],h=l[1],g=a.useRef(0),p=a.useRef(null);a.useEffect((function(){p.current&&(p.current(),p.current=null)}),[f]);var v=a.useRef(!1),y=a.useRef(null),m=a.useRef(null),I=a.useRef(null);a.useEffect((function(){return function(){clearTimeout(y.current)}}),[]);var b=a.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,i=e.rippleSize,o=e.cb;h((function(e){return[].concat(Object(d.a)(e),[a.createElement(k,{key:g.current,classes:s,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i})])})),g.current+=1,p.current=o}),[s]),E=a.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,i=void 0!==r&&r,a=t.center,s=void 0===a?o||t.pulsate:a,u=t.fakeElement,A=void 0!==u&&u;if("mousedown"===e.type&&v.current)v.current=!1;else{"touchstart"===e.type&&(v.current=!0);var c,l,f,h=A?null:I.current,g=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(g.width/2),l=Math.round(g.height/2);else{var d=e.clientX?e.clientX:e.touches[0].clientX,p=e.clientY?e.clientY:e.touches[0].clientY;c=Math.round(d-g.left),l=Math.round(p-g.top)}if(s)(f=Math.sqrt((2*Math.pow(g.width,2)+Math.pow(g.height,2))/3))%2===0&&(f+=1);else{var E=2*Math.max(Math.abs((h?h.clientWidth:0)-c),c)+2,C=2*Math.max(Math.abs((h?h.clientHeight:0)-l),l)+2;f=Math.sqrt(Math.pow(E,2)+Math.pow(C,2))}e.touches?null===m.current&&(m.current=function(){b({pulsate:i,rippleX:c,rippleY:l,rippleSize:f,cb:n})},y.current=setTimeout((function(){m.current&&(m.current(),m.current=null)}),80)):b({pulsate:i,rippleX:c,rippleY:l,rippleSize:f,cb:n})}}),[o,b]),C=a.useCallback((function(){E({},{pulsate:!0})}),[E]),B=a.useCallback((function(e,t){if(clearTimeout(y.current),"touchend"===e.type&&m.current)return e.persist(),m.current(),m.current=null,void(y.current=setTimeout((function(){B(e,t)})));m.current=null,h((function(e){return e.length>0?e.slice(1):e})),p.current=t}),[]);return a.useImperativeHandle(t,(function(){return{pulsate:C,start:E,stop:B}}),[C,E,B]),a.createElement("span",Object(r.a)({className:Object(u.a)(s.root,A),ref:I},c),a.createElement(w,{component:null,exit:!0},f))})),x=Object(l.a)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(a.memo(_)),S=a.forwardRef((function(e,t){var n=e.action,o=e.buttonRef,l=e.centerRipple,f=void 0!==l&&l,d=e.children,p=e.classes,v=e.className,y=e.component,m=void 0===y?"button":y,I=e.disabled,b=void 0!==I&&I,E=e.disableRipple,C=void 0!==E&&E,B=e.disableTouchRipple,w=void 0!==B&&B,Q=e.focusRipple,k=void 0!==Q&&Q,_=e.focusVisibleClassName,S=e.onBlur,O=e.onClick,D=e.onFocus,R=e.onFocusVisible,j=e.onKeyDown,M=e.onKeyUp,N=e.onMouseDown,F=e.onMouseLeave,T=e.onMouseUp,L=e.onTouchEnd,P=e.onTouchMove,U=e.onTouchStart,G=e.onDragLeave,q=e.tabIndex,H=void 0===q?0:q,Y=e.TouchRippleProps,J=e.type,z=void 0===J?"button":J,K=Object(i.a)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),W=a.useRef(null);var V=a.useRef(null),X=a.useState(!1),Z=X[0],$=X[1];b&&Z&&$(!1);var ee=Object(g.a)(),te=ee.isFocusVisible,ne=ee.onBlurVisible,re=ee.ref;function ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w;return Object(c.a)((function(r){return t&&t(r),!n&&V.current&&V.current[e](r),!0}))}a.useImperativeHandle(n,(function(){return{focusVisible:function(){$(!0),W.current.focus()}}}),[]),a.useEffect((function(){Z&&k&&!C&&V.current.pulsate()}),[C,k,Z]);var ae=ie("start",N),oe=ie("stop",G),se=ie("stop",T),ue=ie("stop",(function(e){Z&&e.preventDefault(),F&&F(e)})),Ae=ie("start",U),ce=ie("stop",L),le=ie("stop",P),fe=ie("stop",(function(e){Z&&(ne(e),$(!1)),S&&S(e)}),!1),he=Object(c.a)((function(e){b||(W.current||(W.current=e.currentTarget),te(e)&&($(!0),R&&R(e)),D&&D(e))})),ge=function(){var e=s.findDOMNode(W.current);return m&&"button"!==m&&!("A"===e.tagName&&e.href)},de=a.useRef(!1),pe=Object(c.a)((function(e){k&&!de.current&&Z&&V.current&&" "===e.key&&(de.current=!0,e.persist(),V.current.stop(e,(function(){V.current.start(e)}))),e.target===e.currentTarget&&ge()&&" "===e.key&&e.preventDefault(),j&&j(e),e.target===e.currentTarget&&ge()&&"Enter"===e.key&&(e.preventDefault(),O&&O(e))})),ve=Object(c.a)((function(e){k&&" "===e.key&&V.current&&Z&&!e.defaultPrevented&&(de.current=!1,e.persist(),V.current.stop(e,(function(){V.current.pulsate(e)}))),M&&M(e),O&&e.target===e.currentTarget&&ge()&&" "===e.key&&!e.defaultPrevented&&O(e)})),ye=m;"button"===ye&&K.href&&(ye="a");var me={};"button"===ye?(me.type=z,me.disabled=b):("a"===ye&&K.href||(me.role="button"),me["aria-disabled"]=b);var Ie=Object(A.a)(o,t),be=Object(A.a)(re,W),Ee=Object(A.a)(Ie,be);return a.createElement(ye,Object(r.a)({className:Object(u.a)(p.root,v,Z&&[p.focusVisible,_],b&&p.disabled),onBlur:fe,onClick:O,onFocus:he,onKeyDown:pe,onKeyUp:ve,onMouseDown:ae,onMouseLeave:ue,onMouseUp:se,onDragLeave:oe,onTouchEnd:ce,onTouchMove:le,onTouchStart:Ae,ref:Ee,tabIndex:b?-1:H},me,K),d,a.createElement(h,null,C||b?null:a.createElement(x,Object(r.a)({ref:V,center:f},Y))))}));t.a=Object(l.a)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(S)},function(e,t,n){"use strict";var r=n(33),i=n(18),a=n(0),o=n.n(a),s=n(88),u=n(858),A={set:function(e,t,n,r){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}},c=n(765),l=n(893),f=-1e9;function h(){return f+=1}n(25);var g=n(529);function d(e){var t="function"===typeof e;return{create:function(n,r){var a;try{a=t?e(n):e}catch(u){throw u}if(!r||!n.overrides||!n.overrides[r])return a;var o=n.overrides[r],s=Object(i.a)({},a);return Object.keys(o).forEach((function(e){s[e]=Object(g.a)(s[e],o[e])})),s},options:{}}}var p={};function v(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,i=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,i=!0),i&&(r.cacheClasses.value=Object(u.a)({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function y(e,t){var n=e.state,r=e.theme,a=e.stylesOptions,o=e.stylesCreator,c=e.name;if(!a.disableGeneration){var l=A.get(a.sheetsManager,o,r);l||(l={refs:0,staticSheet:null,dynamicStyles:null},A.set(a.sheetsManager,o,r,l));var f=Object(i.a)({},o.options,{},a,{theme:r,flip:"boolean"===typeof a.flip?a.flip:"rtl"===r.direction});f.generateId=f.serverGenerateClassName||f.generateClassName;var h=a.sheetsRegistry;if(0===l.refs){var g;a.sheetsCache&&(g=A.get(a.sheetsCache,o,r));var d=o.create(r,c);g||((g=a.jss.createStyleSheet(d,Object(i.a)({link:!1},f))).attach(),a.sheetsCache&&A.set(a.sheetsCache,o,r,g)),h&&h.add(g),l.staticSheet=g,l.dynamicStyles=Object(s.d)(d)}if(l.dynamicStyles){var p=a.jss.createStyleSheet(l.dynamicStyles,Object(i.a)({link:!0},f));p.update(t),p.attach(),n.dynamicSheet=p,n.classes=Object(u.a)({baseClasses:l.staticSheet.classes,newClasses:p.classes}),h&&h.add(p)}else n.classes=l.staticSheet.classes;l.refs+=1}}function m(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function I(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var a=A.get(r.sheetsManager,i,n);a.refs-=1;var o=r.sheetsRegistry;0===a.refs&&(A.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(a.staticSheet),o&&o.remove(a.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),o&&o.remove(t.dynamicSheet))}}function b(e,t){var n,r=o.a.useRef([]),i=o.a.useMemo((function(){return{}}),t);r.current!==i&&(r.current=i,n=e()),o.a.useEffect((function(){return function(){n&&n()}}),[i])}function E(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,a=t.classNamePrefix,s=t.Component,u=t.defaultTheme,A=void 0===u?p:u,f=Object(r.a)(t,["name","classNamePrefix","Component","defaultTheme"]),g=d(e),E=n||a||"makeStyles";return g.options={index:h(),name:n,meta:E,classNamePrefix:E},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(c.a)()||A,r=Object(i.a)({},o.a.useContext(l.a),{},f),a=o.a.useRef(),u=o.a.useRef();return b((function(){var i={name:n,state:{},stylesCreator:g,stylesOptions:r,theme:t};return y(i,e),u.current=!1,a.current=i,function(){I(i)}}),[t,g]),o.a.useEffect((function(){u.current&&m(a.current,e),u.current=!0})),v(a.current,e.classes,s)}}n.d(t,"a",(function(){return E}))},function(e,t,n){var r=n(1129);e.exports=function(e,t){if(null==e)return{};var n,i,a=r(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(72),a=n(114),o=r(n(812)),s=n(145),u=r(n(811));function A(e,t){var n=a.getCoords(e),r=a.getCoords(t);if(2!==n.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==r.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var o=n[0][0],s=n[0][1],u=n[1][0],A=n[1][1],c=r[0][0],l=r[0][1],f=r[1][0],h=r[1][1],g=(h-l)*(u-o)-(f-c)*(A-s),d=(f-c)*(s-l)-(h-l)*(o-c),p=(u-o)*(s-l)-(A-s)*(o-c);if(0===g)return null;var v=d/g,y=p/g;if(v>=0&&v<=1&&y>=0&&y<=1){var m=o+v*(u-o),I=s+v*(A-s);return i.point([m,I])}return null}t.default=function(e,t){var n={},r=[];if("LineString"===e.type&&(e=i.feature(e)),"LineString"===t.type&&(t=i.feature(t)),"Feature"===e.type&&"Feature"===t.type&&null!==e.geometry&&null!==t.geometry&&"LineString"===e.geometry.type&&"LineString"===t.geometry.type&&2===e.geometry.coordinates.length&&2===t.geometry.coordinates.length){var c=A(e,t);return c&&r.push(c),i.featureCollection(r)}var l=u.default();return l.load(o.default(t)),s.featureEach(o.default(e),(function(e){s.featureEach(l.search(e),(function(t){var i=A(e,t);if(i){var o=a.getCoords(i).join(",");n[o]||(n[o]=!0,r.push(i))}}))})),i.featureCollection(r)}},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 o(e,t,n){return(o="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=A(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function s(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.TwoClickPolygonMode=void 0;var l=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(h,e);var t,n,r,l,f=(t=h,function(){var e,n=A(t);if(u()){var r=A(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return s(this,e)});function h(){return i(this,h),f.apply(this,arguments)}return n=h,(r=[{key:"handleClick",value:function(e,t){t.modeConfig&&t.modeConfig.dragToDraw||(this.addClickSequence(e),this.checkAndFinishPolygon(t))}},{key:"handleStartDragging",value:function(e,t){t.modeConfig&&t.modeConfig.dragToDraw&&(this.addClickSequence(e),e.cancelPan())}},{key:"handleStopDragging",value:function(e,t){t.modeConfig&&t.modeConfig.dragToDraw&&(this.addClickSequence(e),this.checkAndFinishPolygon(t))}},{key:"checkAndFinishPolygon",value:function(e){var t=this.getClickSequence(),n=this.getTentativeGuide(e);if(t.length>1&&n&&"Polygon"===n.geometry.type){var r={type:"Feature",properties:{shape:n.properties.shape},geometry:{type:"Polygon",coordinates:n.geometry.coordinates}},i=this.getAddFeatureOrBooleanPolygonAction(r,e);this.resetClickSequence(),i&&e.onEdit(i)}}},{key:"getGuides",value:function(e){var t=e.lastPointerMoveEvent,n=e.modeConfig,r=this.getClickSequence(),i={type:"FeatureCollection",features:[]};if(0===r.length)return i;var a=r[0],o=t.mapCoords,s=this.getTwoClickPolygon(a,o,n);return s&&i.features.push({type:"Feature",properties:{shape:s.properties&&s.properties.shape,guideType:"tentative"},geometry:s.geometry}),i}},{key:"getTwoClickPolygon",value:function(e,t,n){return null}},{key:"handlePointerMove",value:function(e,t){t.onUpdateCursor("cell"),o(A(h.prototype),"handlePointerMove",this).call(this,e,t)}},{key:"createTentativeFeature",value:function(e){var t,n=e.lastPointerMoveEvent,r=this.getClickSequence(),i=n?[n.mapCoords]:[];return 1===r.length&&(t=this.getTwoClickPolygon(r[0],i[0],e.modeConfig)),t}}])&&a(n.prototype,r),l&&a(n,l),h}(n(162).GeoJsonEditMode);t.TwoClickPolygonMode=l},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Object.defineProperty(t,"__esModule",{value:!0}),t.toDeckColor=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[255,0,0,255];if(!Array.isArray(e))return t;return[255*e[0],255*e[1],255*e[2],255*e[3]]},t.recursivelyTraverseNestedArrays=function e(t,n,i){if(!Array.isArray(t[0]))return!0;for(var a=0;a<t.length;a++)if(e(t[a],[].concat(function(e){if(Array.isArray(e))return r(e)}(o=n)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(o)||function(e,t){if(!e)return;if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[a]),i)){i(t,n);break}var o;return!1}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(212)),a=n(72),o=n(145),s=r(n(781)),u=r(n(782));t.default=function(e,t){void 0===t&&(t={});var n=t.maxEdge||1/0,r=function(e){var t=[],n={};return o.featureEach(e,(function(e){if(e.geometry){var r=e.geometry.coordinates.join("-");n.hasOwnProperty(r)||(t.push(e),n[r]=!0)}})),a.featureCollection(t)}(e),A=s.default(r);if(A.features=A.features.filter((function(e){var r=e.geometry.coordinates[0][0],a=e.geometry.coordinates[0][1],o=e.geometry.coordinates[0][2],s=i.default(r,a,t),u=i.default(a,o,t),A=i.default(r,o,t);return s<=n&&u<=n&&A<=n})),A.features.length<1)return null;var c=u.default(A);return 1===c.coordinates.length&&(c.coordinates=c.coordinates[0],c.type="Polygon"),a.feature(c)}},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new Error("radians is required");return 180*(e%(2*Math.PI))/Math.PI}function i(e){if(null===e||void 0===e)throw new Error("degrees is required");return e%360*Math.PI/180}function a(e){return!!e&&e.constructor===Object}function o(e){if(!e)throw new Error("coord is required");if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates;if(Array.isArray(e)&&e.length>=2&&void 0===e[0].length&&void 0===e[1].length)return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function s(e,t){var n=i(e[1]),a=i(t[1]),o=i(t[0]-e[0]);o>Math.PI&&(o-=2*Math.PI),o<-Math.PI&&(o+=2*Math.PI);var s=Math.log(Math.tan(a/2+Math.PI/4)/Math.tan(n/2+Math.PI/4));return(r(Math.atan2(o,s))+360)%360}t.a=function(e,t,n){if(!a(n=n||{}))throw new Error("options is invalid");var r,i=n.final;if(!e)throw new Error("start point is required");if(!t)throw new Error("end point is required");return(r=i?s(o(t),o(e)):s(o(e),o(t)))>180?-(360-r):r}},function(e,t,n){"use strict";var r={meters:6371008.8,metres:6371008.8,millimeters:6371008800,millimetres:6371008800,centimeters:637100880,centimetres:637100880,kilometers:6371.0088,kilometres:6371.0088,miles:3958.761333810546,nauticalmiles:6371008.8/1852,inches:6371008.8*39.37,yards:6371008.8/1.0936,feet:20902260.511392,radians:1,degrees:6371008.8/111325};function i(e,t){if(void 0===e||null===e)throw new Error("distance is required");if(t&&"string"!==typeof t)throw new Error("units must be a string");var n=r[t||"kilometers"];if(!n)throw new Error(t+" units is invalid");return e/n}function a(e,t,n){if(null===e||void 0===e)throw new Error("length is required");if(!(e>=0))throw new Error("length must be a positive number");return function(e,t){if(void 0===e||null===e)throw new Error("radians is required");if(t&&"string"!==typeof t)throw new Error("units must be a string");var n=r[t||"kilometers"];if(!n)throw new Error(t+" units is invalid");return e*n}(i(e,t),n||"kilometers")}function o(e){return!!e&&e.constructor===Object}function s(e){if(!e)throw new Error("coord is required");if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates;if(Array.isArray(e)&&e.length>=2&&void 0===e[0].length&&void 0===e[1].length)return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}t.a=function(e,t,n){if(!o(n=n||{}))throw new Error("options is invalid");var r=n.units;if(!e)throw new Error("from point is required");if(!t)throw new Error("to point is required");var i=s(e),u=s(t);return u[0]+=u[0]-i[0]>180?-360:i[0]-u[0]>180?360:0,a(function(e,t,n){var r=n=void 0===n?6371008.8:Number(n),i=e[1]*Math.PI/180,a=t[1]*Math.PI/180,o=a-i,s=Math.abs(t[0]-e[0])*Math.PI/180;s>Math.PI&&(s-=2*Math.PI);var u=Math.log(Math.tan(a/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),A=Math.abs(u)>1e-11?o/u:Math.cos(i);return Math.sqrt(o*o+A*A*s*s)*r}(i,u),"meters",r)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a}));var r=n(0),i=r.createContext();function a(){return r.useContext(i)}t.a=i},function(e,t,n){"use strict";var r=n(1096),i=n(864),a=n(1100),o=n(1001),s=n(488),u=n(1101),A=n(1102),c=n(1123),l=n(716);e.exports=v,v.prototype.validate=function(e,t){var n;if("string"==typeof e){if(!(n=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var r=this._addSchema(e);n=r.validate||this._compile(r)}var i=n(t);!0!==n.$async&&(this.errors=n.errors);return i},v.prototype.compile=function(e,t){var n=this._addSchema(e,void 0,t);return n.validate||this._compile(n)},v.prototype.addSchema=function(e,t,n,r){if(Array.isArray(e)){for(var a=0;a<e.length;a++)this.addSchema(e[a],void 0,n,r);return this}var o=this._getId(e);if(void 0!==o&&"string"!=typeof o)throw new Error("schema id must be string");return C(this,t=i.normalizeId(t||o)),this._schemas[t]=this._addSchema(e,n,r,!0),this},v.prototype.addMetaSchema=function(e,t,n){return this.addSchema(e,t,n,!0),this},v.prototype.validateSchema=function(e,t){var n=e.$schema;if(void 0!==n&&"string"!=typeof n)throw new Error("$schema must be a string");if(!(n=n||this._opts.defaultMeta||function(e){var t=e._opts.meta;return e._opts.defaultMeta="object"==typeof t?e._getId(t)||t:e.getSchema(g)?g:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var r=this.validate(n,e);if(!r&&t){var i="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(i);this.logger.error(i)}return r},v.prototype.getSchema=function(e){var t=y(this,e);switch(typeof t){case"object":return t.validate||this._compile(t);case"string":return this.getSchema(t);case"undefined":return function(e,t){var n=i.schema.call(e,{schema:{}},t);if(n){var a=n.schema,s=n.root,u=n.baseId,A=r.call(e,a,s,void 0,u);return e._fragments[t]=new o({ref:t,fragment:!0,schema:a,root:s,baseId:u,validate:A}),A}}(this,e)}},v.prototype.removeSchema=function(e){if(e instanceof RegExp)return m(this,this._schemas,e),m(this,this._refs,e),this;switch(typeof e){case"undefined":return m(this,this._schemas),m(this,this._refs),this._cache.clear(),this;case"string":var t=y(this,e);return t&&this._cache.del(t.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":var n=this._opts.serialize,r=n?n(e):e;this._cache.del(r);var a=this._getId(e);a&&(a=i.normalizeId(a),delete this._schemas[a],delete this._refs[a])}return this},v.prototype.addFormat=function(e,t){"string"==typeof t&&(t=new RegExp(t));return this._formats[e]=t,this},v.prototype.errorsText=function(e,t){if(!(e=e||this.errors))return"No errors";for(var n=void 0===(t=t||{}).separator?", ":t.separator,r=void 0===t.dataVar?"data":t.dataVar,i="",a=0;a<e.length;a++){var o=e[a];o&&(i+=r+o.dataPath+" "+o.message+n)}return i.slice(0,-n.length)},v.prototype._addSchema=function(e,t,n,r){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var a=this._opts.serialize,s=a?a(e):e,u=this._cache.get(s);if(u)return u;r=r||!1!==this._opts.addUsedSchema;var A=i.normalizeId(this._getId(e));A&&r&&C(this,A);var c,l=!1!==this._opts.validateSchema&&!t;l&&!(c=A&&A==i.normalizeId(e.$schema))&&this.validateSchema(e,!0);var f=i.ids.call(this,e),h=new o({id:A,schema:e,localRefs:f,cacheKey:s,meta:n});"#"!=A[0]&&r&&(this._refs[A]=h);this._cache.put(s,h),l&&c&&this.validateSchema(e,!0);return h},v.prototype._compile=function(e,t){if(e.compiling)return e.validate=a,a.schema=e.schema,a.errors=null,a.root=t||a,!0===e.schema.$async&&(a.$async=!0),a;var n,i;e.compiling=!0,e.meta&&(n=this._opts,this._opts=this._metaOpts);try{i=r.call(this,e.schema,t,e.localRefs)}catch(o){throw delete e.validate,o}finally{e.compiling=!1,e.meta&&(this._opts=n)}return e.validate=i,e.refs=i.refs,e.refVal=i.refVal,e.root=i.root,i;function a(){var t=e.validate,n=t.apply(this,arguments);return a.errors=t.errors,n}},v.prototype.compileAsync=n(1124);var f=n(1125);v.prototype.addKeyword=f.add,v.prototype.getKeyword=f.get,v.prototype.removeKeyword=f.remove,v.prototype.validateKeyword=f.validate;var h=n(865);v.ValidationError=h.Validation,v.MissingRefError=h.MissingRef,v.$dataMetaSchema=c;var g="http://json-schema.org/draft-07/schema",d=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],p=["/properties"];function v(e){if(!(this instanceof v))return new v(e);e=this._opts=l.copy(e)||{},function(e){var t=e._opts.logger;if(!1===t)e.logger={log:B,warn:B,error:B};else{if(void 0===t&&(t=console),!("object"==typeof t&&t.log&&t.warn&&t.error))throw new Error("logger must implement log, warn and error methods");e.logger=t}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=u(e.format),this._cache=e.cache||new a,this._loadingSchemas={},this._compilations=[],this.RULES=A(),this._getId=function(e){switch(e.schemaId){case"auto":return E;case"id":return I;default:return b}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=s),this._metaOpts=function(e){for(var t=l.copy(e._opts),n=0;n<d.length;n++)delete t[d[n]];return t}(this),e.formats&&function(e){for(var t in e._opts.formats){var n=e._opts.formats[t];e.addFormat(t,n)}}(this),e.keywords&&function(e){for(var t in e._opts.keywords){var n=e._opts.keywords[t];e.addKeyword(t,n)}}(this),function(e){var t;e._opts.$data&&(t=n(1128),e.addMetaSchema(t,t.$id,!0));if(!1===e._opts.meta)return;var r=n(1007);e._opts.$data&&(r=c(r,p));e.addMetaSchema(r,g,!0),e._refs["http://json-schema.org/schema"]=g}(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(e){var t=e._opts.schemas;if(!t)return;if(Array.isArray(t))e.addSchema(t);else for(var n in t)e.addSchema(t[n],n)}(this)}function y(e,t){return t=i.normalizeId(t),e._schemas[t]||e._refs[t]||e._fragments[t]}function m(e,t,n){for(var r in t){var i=t[r];i.meta||n&&!n.test(r)||(e._cache.del(i.cacheKey),delete t[r])}}function I(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function b(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function E(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function C(e,t){if(e._schemas[t]||e._refs[t])throw new Error('schema with key or id "'+t+'" already exists')}function B(){}},function(e,t,n){"use strict";var r,i=n(11),a=n(13),o=n(14),s=n(15),u=n(393),A=n(322),c=n(47),l=n(728),f=n(39),h=n(20),g=n(72),d=n(835),p=n.n(d),v=n(836),y=n.n(v),m=n(837),I=n.n(m),b=n(510),E=n.n(b),C=n(320),B=n(366),w=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"handleClick",value:function(e,t){t.onEdit({editType:"clearFeatures"})}}]),n}(B.DrawRectangleMode),Q=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"handleClick",value:function(e,t){t.onEdit({editType:"clearFeatures"})}}]),n}(B.DrawPolygonByDraggingMode),k=(r={},Object(h.a)(r,C.SELECTION_TYPE.RECTANGLE,w),Object(h.a)(r,C.SELECTION_TYPE.POLYGON,Q),r),_={selectionType:C.SELECTION_TYPE.RECTANGLE,layerIds:[],onSelect:function(){}},x={type:"FeatureCollection",features:[]},S=["lineWidthScale","lineWidthMinPixels","lineWidthMaxPixels","lineWidthUnits","lineJointRounded","lineMiterLimit","pointRadiusScale","pointRadiusMinPixels","pointRadiusMaxPixels","lineDashJustified","getLineColor","getFillColor","getRadius","getLineWidth","getLineDashArray","getTentativeLineDashArray","getTentativeLineColor","getTentativeFillColor","getTentativeLineWidth","editHandlePointRadiusScale","editHandlePointRadiusMinPixels","editHandlePointRadiusMaxPixels","getEditHandlePointColor","getEditHandlePointRadius","modeHandlers"],O=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"_selectPolygonObjects",value:function(e){var t=this.props,n=t.onSelect,r=t.getCellCoords,i=t.cellsQuadTree,a=t.flipY?e.map((function(e){return e.map((function(e){return[e[0],-e[1]]}))})):e,o=Object(g.polygon)(a),s=[];i.visit((function(e,t,n,i,a){var u=[[[t,n],[i,n],[i,a],[t,a],[t,n]]],A=Object(g.polygon)(u),c=y()(A,o),l=p()(A,o),f=I()(A,o);return!(c||l||f)||(e.data&&E()(Object(g.point)(r(e.data[1])),o)&&s.push(e.data),!1)})),n({pickingInfos:s})}},{key:"renderLayers",value:function(){var e=this,t=this.props.onSelect,n=k[this.props.selectionType]||B.ViewMode,r={};return S.forEach((function(t){void 0!==e.props[t]&&(r[t]=e.props[t])})),[new C.EditableGeoJsonLayer(this.getSubLayerProps(Object(c.a)({id:"selection-geojson",pickable:!0,mode:n,modeConfig:{dragToDraw:!0},selectedFeatureIndexes:[],data:x,onEdit:function(n){var r=n.updatedData,i=n.editType;if("addFeature"===i){var a=r.features[0].geometry.coordinates;e._selectPolygonObjects(a)}else"clearFeatures"===i&&t({pickingInfos:[]})}},r)))]}}]),n}(A.a);function D(e){return"base-".concat(e)}function R(e,t,n,r,i,a){var o=arguments.length>6&&void 0!==arguments[6]&&arguments[6];if(!e)return[];var s=D(n),u=5/(t+16);return[new O({id:"selection",flipY:o,cellsQuadTree:a,getCellCoords:r,coordinateSystem:f.a.CARTESIAN,selectionType:e,onSelect:function(e){var t=e.pickingInfos.map((function(e){return e[0]}));i&&i(t)},layerIds:[s],getTentativeFillColor:function(){return[255,255,255,95]},getTentativeLineColor:function(){return[143,143,143,255]},getTentativeLineDashArray:function(){return[7,4]},lineWidthMinPixels:2,lineWidthMaxPixels:2,getEditHandlePointColor:function(){return[255,255,255,255]},getEditHandlePointRadius:function(){return u},editHandlePointRadiusScale:1,editHandlePointRadiusMinPixels:u,editHandlePointRadiusMaxPixels:2*u})]}function j(e,t){return function(n){var r=e(n);return[.5*(t[0]-r[0])+r[0],.5*(t[1]-r[1])+r[1],.5*(t[2]-r[2])+r[2]]}}function M(e){var t,n=e.id,r=e.backgroundColor,i=e.getColor,a=e.data,o=e.isSelected,s=Object(l.a)(e,["id","backgroundColor","getColor","data","isSelected"]);return{overlay:Object(c.a)({id:(t=n,"selected-".concat(t)),getFillColor:i,getLineColor:i,data:a.filter(o)},s),base:Object(c.a)({id:D(n),getLineColor:i?j(i,r):void 0,getFillColor:i?j(i,r):void 0,data:a.slice()},s)}}O.layerName="SelectionLayer",O.defaultProps=_;var N=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"renderLayers",value:function(){var e=M(this.props);return[new u.a(e.base),new u.a(e.overlay)]}}]),n}(A.a);N.layerName="SelectablePolygonLayer";var F=n(269),T=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"renderLayers",value:function(){var e=M(this.props);return[new F.a(e.base),new F.a(e.overlay)]}}]),n}(A.a);T.layerName="SelectableScatterplotLayer";n(727),n(726),n(725);n.d(t,"a",(function(){return N})),n.d(t,"b",(function(){return T})),n.d(t,"c",(function(){return R}))},function(e,t,n){!function(e){"use strict";function t(){}function n(e){this.message=e||""}function r(e){this.message=e||""}function i(e){this.message=e||""}function a(){}function o(e){return null===e?je:e.color}function s(e){return null===e?null:e.parent}function u(e,t){null!==e&&(e.color=t)}function A(e){return null===e?null:e.left}function c(e){return null===e?null:e.right}function l(){this.root_=null,this.size_=0}function f(){}function h(){this.array_=[],arguments[0]instanceof Ie&&this.addAll(arguments[0])}function g(){}function d(e){this.message=e||""}function p(){this.array_=[]}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(e){if(void 0===this||null===this)throw new TypeError(this+" is not an object");var t=Object(this),n=Math.max(Math.min(t.length,9007199254740991),0)||0,r=1 in arguments&&parseInt(Number(arguments[1]),10)||0;r=r<0?Math.max(n+r,0):Math.min(r,n);var i=2 in arguments&&void 0!==arguments[2]?parseInt(Number(arguments[2]),10)||0:n;for(i=i<0?Math.max(n+arguments[2],0):Math.min(i,n);r<i;)t[r]=e,++r;return t},writable:!0}),Number.isFinite=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},Number.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(e){return e!=e},Math.trunc=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};var v=function(){};v.prototype.interfaces_=function(){return[]},v.prototype.getClass=function(){return v},v.prototype.equalsWithTolerance=function(e,t,n){return Math.abs(e-t)<=n};var y=function(e){function t(t){e.call(this,t),this.name="IllegalArgumentException",this.message=t,this.stack=(new e).stack}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Error),m=function(){},I={MAX_VALUE:{configurable:!0}};m.isNaN=function(e){return Number.isNaN(e)},m.doubleToLongBits=function(e){return e},m.longBitsToDouble=function(e){return e},m.isInfinite=function(e){return!Number.isFinite(e)},I.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(m,I);var b=function(){},E=function(){},C=function(){},B=function e(){if(this.x=null,this.y=null,this.z=null,0===arguments.length)this.x=0,this.y=0,this.z=e.NULL_ORDINATE;else if(1===arguments.length){var t=arguments[0];this.x=t.x,this.y=t.y,this.z=t.z}else 2===arguments.length?(this.x=arguments[0],this.y=arguments[1],this.z=e.NULL_ORDINATE):3===arguments.length&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},w={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};B.prototype.setOrdinate=function(e,t){switch(e){case B.X:this.x=t;break;case B.Y:this.y=t;break;case B.Z:this.z=t;break;default:throw new y("Invalid ordinate index: "+e)}},B.prototype.equals2D=function(){if(1===arguments.length){var e=arguments[0];return this.x===e.x&&this.y===e.y}if(2===arguments.length){var t=arguments[0],n=arguments[1];return!!v.equalsWithTolerance(this.x,t.x,n)&&!!v.equalsWithTolerance(this.y,t.y,n)}},B.prototype.getOrdinate=function(e){switch(e){case B.X:return this.x;case B.Y:return this.y;case B.Z:return this.z}throw new y("Invalid ordinate index: "+e)},B.prototype.equals3D=function(e){return this.x===e.x&&this.y===e.y&&(this.z===e.z||m.isNaN(this.z))&&m.isNaN(e.z)},B.prototype.equals=function(e){return e instanceof B&&this.equals2D(e)},B.prototype.equalInZ=function(e,t){return v.equalsWithTolerance(this.z,e.z,t)},B.prototype.compareTo=function(e){var t=e;return this.x<t.x?-1:this.x>t.x?1:this.y<t.y?-1:this.y>t.y?1:0},B.prototype.clone=function(){},B.prototype.copy=function(){return new B(this)},B.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},B.prototype.distance3D=function(e){var t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return Math.sqrt(t*t+n*n+r*r)},B.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},B.prototype.hashCode=function(){var e=17;return 37*(e=37*e+B.hashCode(this.x))+B.hashCode(this.y)},B.prototype.setCoordinate=function(e){this.x=e.x,this.y=e.y,this.z=e.z},B.prototype.interfaces_=function(){return[b,E,t]},B.prototype.getClass=function(){return B},B.hashCode=function(){if(1===arguments.length){var e=arguments[0],t=m.doubleToLongBits(e);return Math.trunc((t^t)>>>32)}},w.DimensionalComparator.get=function(){return Q},w.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},w.NULL_ORDINATE.get=function(){return m.NaN},w.X.get=function(){return 0},w.Y.get=function(){return 1},w.Z.get=function(){return 2},Object.defineProperties(B,w);var Q=function(e){if(this._dimensionsToTest=2,0===arguments.length);else if(1===arguments.length){var t=arguments[0];if(2!==t&&3!==t)throw new y("only 2 or 3 dimensions may be specified");this._dimensionsToTest=t}};Q.prototype.compare=function(e,t){var n=e,r=t,i=Q.compare(n.x,r.x);if(0!==i)return i;var a=Q.compare(n.y,r.y);return 0!==a?a:this._dimensionsToTest<=2?0:Q.compare(n.z,r.z)},Q.prototype.interfaces_=function(){return[C]},Q.prototype.getClass=function(){return Q},Q.compare=function(e,t){return e<t?-1:e>t?1:m.isNaN(e)?m.isNaN(t)?0:-1:m.isNaN(t)?1:0};var k=function(){};k.prototype.create=function(){},k.prototype.interfaces_=function(){return[]},k.prototype.getClass=function(){return k};var _=function(){},x={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};_.prototype.interfaces_=function(){return[]},_.prototype.getClass=function(){return _},_.toLocationSymbol=function(e){switch(e){case _.EXTERIOR:return"e";case _.BOUNDARY:return"b";case _.INTERIOR:return"i";case _.NONE:return"-"}throw new y("Unknown location value: "+e)},x.INTERIOR.get=function(){return 0},x.BOUNDARY.get=function(){return 1},x.EXTERIOR.get=function(){return 2},x.NONE.get=function(){return-1},Object.defineProperties(_,x);var S=function(e,t){return e.interfaces_&&e.interfaces_().indexOf(t)>-1},O=function(){},D={LOG_10:{configurable:!0}};O.prototype.interfaces_=function(){return[]},O.prototype.getClass=function(){return O},O.log10=function(e){var t=Math.log(e);return m.isInfinite(t)||m.isNaN(t)?t:t/O.LOG_10},O.min=function(e,t,n,r){var i=e;return t<i&&(i=t),n<i&&(i=n),r<i&&(i=r),i},O.clamp=function(){if("number"==typeof arguments[2]&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]){var e=arguments[0],t=arguments[1],n=arguments[2];return e<t?t:e>n?n:e}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],i=arguments[1],a=arguments[2];return r<i?i:r>a?a:r}},O.wrap=function(e,t){return e<0?t- -e%t:e%t},O.max=function(){if(3===arguments.length){var e=arguments[0],t=arguments[1],n=arguments[2],r=e;return t>r&&(r=t),n>r&&(r=n),r}if(4===arguments.length){var i=arguments[0],a=arguments[1],o=arguments[2],s=arguments[3],u=i;return a>u&&(u=a),o>u&&(u=o),s>u&&(u=s),u}},O.average=function(e,t){return(e+t)/2},D.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(O,D);var R=function(e){this.str=e};R.prototype.append=function(e){this.str+=e},R.prototype.setCharAt=function(e,t){this.str=this.str.substr(0,e)+t+this.str.substr(e+1)},R.prototype.toString=function(e){return this.str};var j=function(e){this.value=e};j.prototype.intValue=function(){return this.value},j.prototype.compareTo=function(e){return this.value<e?-1:this.value>e?1:0},j.isNaN=function(e){return Number.isNaN(e)};var M=function(){};M.isWhitespace=function(e){return e<=32&&e>=0||127===e},M.toUpperCase=function(e){return e.toUpperCase()};var N=function e(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length){if("number"==typeof arguments[0]){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof e){var n=arguments[0];this.init(n)}else if("string"==typeof arguments[0]){var r=arguments[0];e.call(this,e.parse(r))}}else if(2===arguments.length){var i=arguments[0],a=arguments[1];this.init(i,a)}},F={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};N.prototype.le=function(e){return(this._hi<e._hi||this._hi===e._hi)&&this._lo<=e._lo},N.prototype.extractSignificantDigits=function(e,t){var n=this.abs(),r=N.magnitude(n._hi),i=N.TEN.pow(r);(n=n.divide(i)).gt(N.TEN)?(n=n.divide(N.TEN),r+=1):n.lt(N.ONE)&&(n=n.multiply(N.TEN),r-=1);for(var a=r+1,o=new R,s=N.MAX_PRINT_DIGITS-1,u=0;u<=s;u++){e&&u===a&&o.append(".");var A=Math.trunc(n._hi);if(A<0)break;var c=!1,l=0;A>9?(c=!0,l="9"):l="0"+A,o.append(l),n=n.subtract(N.valueOf(A)).multiply(N.TEN),c&&n.selfAdd(N.TEN);var f=!0,h=N.magnitude(n._hi);if(h<0&&Math.abs(h)>=s-u&&(f=!1),!f)break}return t[0]=r,o.toString()},N.prototype.sqr=function(){return this.multiply(this)},N.prototype.doubleValue=function(){return this._hi+this._lo},N.prototype.subtract=function(){if(arguments[0]instanceof N){var e=arguments[0];return this.add(e.negate())}if("number"==typeof arguments[0]){var t=arguments[0];return this.add(-t)}},N.prototype.equals=function(){if(1===arguments.length){var e=arguments[0];return this._hi===e._hi&&this._lo===e._lo}},N.prototype.isZero=function(){return 0===this._hi&&0===this._lo},N.prototype.selfSubtract=function(){if(arguments[0]instanceof N){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e._hi,-e._lo)}if("number"==typeof arguments[0]){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t,0)}},N.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},N.prototype.min=function(e){return this.le(e)?this:e},N.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof N){var e=arguments[0];return this.selfDivide(e._hi,e._lo)}if("number"==typeof arguments[0]){var t=arguments[0];return this.selfDivide(t,0)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=null,a=null,o=null,s=null,u=null,A=null,c=null,l=null;return u=this._hi/n,l=(i=(A=N.SPLIT*u)-(i=A-u))*(o=(l=N.SPLIT*n)-(o=l-n))-(c=u*n)+i*(s=n-o)+(a=u-i)*o+a*s,l=u+(A=(this._hi-c-l+this._lo-u*r)/n),this._hi=l,this._lo=u-l+A,this}},N.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},N.prototype.divide=function(){if(arguments[0]instanceof N){var e=arguments[0],t=null,n=null,r=null,i=null,a=null,o=null,s=null,u=null;return n=(a=this._hi/e._hi)-(t=(o=N.SPLIT*a)-(t=o-a)),u=t*(r=(u=N.SPLIT*e._hi)-(r=u-e._hi))-(s=a*e._hi)+t*(i=e._hi-r)+n*r+n*i,o=(this._hi-s-u+this._lo-a*e._lo)/e._hi,new N(u=a+o,a-u+o)}if("number"==typeof arguments[0]){var A=arguments[0];return m.isNaN(A)?N.createNaN():N.copy(this).selfDivide(A,0)}},N.prototype.ge=function(e){return(this._hi>e._hi||this._hi===e._hi)&&this._lo>=e._lo},N.prototype.pow=function(e){if(0===e)return N.valueOf(1);var t=new N(this),n=N.valueOf(1),r=Math.abs(e);if(r>1)for(;r>0;)r%2==1&&n.selfMultiply(t),(r/=2)>0&&(t=t.sqr());else n=t;return e<0?n.reciprocal():n},N.prototype.ceil=function(){if(this.isNaN())return N.NaN;var e=Math.ceil(this._hi),t=0;return e===this._hi&&(t=Math.ceil(this._lo)),new N(e,t)},N.prototype.compareTo=function(e){var t=e;return this._hi<t._hi?-1:this._hi>t._hi?1:this._lo<t._lo?-1:this._lo>t._lo?1:0},N.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},N.prototype.setValue=function(){if(arguments[0]instanceof N){var e=arguments[0];return this.init(e),this}if("number"==typeof arguments[0]){var t=arguments[0];return this.init(t),this}},N.prototype.max=function(e){return this.ge(e)?this:e},N.prototype.sqrt=function(){if(this.isZero())return N.valueOf(0);if(this.isNegative())return N.NaN;var e=1/Math.sqrt(this._hi),t=this._hi*e,n=N.valueOf(t),r=this.subtract(n.sqr())._hi*(.5*e);return n.add(r)},N.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof N){var e=arguments[0];return this.selfAdd(e._hi,e._lo)}if("number"==typeof arguments[0]){var t=arguments[0],n=null,r=null,i=null,a=null,o=null,s=null;return a=(i=this._hi+t)-(o=i-this._hi),r=(s=(a=t-o+(this._hi-a))+this._lo)+(i-(n=i+s)),this._hi=n+r,this._lo=r+(n-this._hi),this}}else if(2===arguments.length){var u=arguments[0],A=arguments[1],c=null,l=null,f=null,h=null,g=null,d=null,p=null;h=this._hi+u,l=this._lo+A,g=h-(d=h-this._hi),f=l-(p=l-this._lo);var v=(c=h+(d=(g=u-d+(this._hi-g))+l))+(d=(f=A-p+(this._lo-f))+(d+(h-c))),y=d+(c-v);return this._hi=v,this._lo=y,this}},N.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof N){var e=arguments[0];return this.selfMultiply(e._hi,e._lo)}if("number"==typeof arguments[0]){var t=arguments[0];return this.selfMultiply(t,0)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=null,a=null,o=null,s=null,u=null,A=null;i=(u=N.SPLIT*this._hi)-this._hi,A=N.SPLIT*n,i=u-i,a=this._hi-i,o=A-n;var c=(u=this._hi*n)+(A=i*(o=A-o)-u+i*(s=n-o)+a*o+a*s+(this._hi*r+this._lo*n)),l=A+(i=u-c);return this._hi=c,this._lo=l,this}},N.prototype.selfSqr=function(){return this.selfMultiply(this)},N.prototype.floor=function(){if(this.isNaN())return N.NaN;var e=Math.floor(this._hi),t=0;return e===this._hi&&(t=Math.floor(this._lo)),new N(e,t)},N.prototype.negate=function(){return this.isNaN()?this:new N(-this._hi,-this._lo)},N.prototype.clone=function(){},N.prototype.multiply=function(){if(arguments[0]instanceof N){var e=arguments[0];return e.isNaN()?N.createNaN():N.copy(this).selfMultiply(e)}if("number"==typeof arguments[0]){var t=arguments[0];return m.isNaN(t)?N.createNaN():N.copy(this).selfMultiply(t,0)}},N.prototype.isNaN=function(){return m.isNaN(this._hi)},N.prototype.intValue=function(){return Math.trunc(this._hi)},N.prototype.toString=function(){var e=N.magnitude(this._hi);return e>=-3&&e<=20?this.toStandardNotation():this.toSciNotation()},N.prototype.toStandardNotation=function(){var e=this.getSpecialNumberString();if(null!==e)return e;var t=new Array(1).fill(null),n=this.extractSignificantDigits(!0,t),r=t[0]+1,i=n;if("."===n.charAt(0))i="0"+n;else if(r<0)i="0."+N.stringOfChar("0",-r)+n;else if(-1===n.indexOf(".")){var a=r-n.length;i=n+N.stringOfChar("0",a)+".0"}return this.isNegative()?"-"+i:i},N.prototype.reciprocal=function(){var e,t,n,r,i=null,a=null,o=null,s=null;e=(n=1/this._hi)-(i=(o=N.SPLIT*n)-(i=o-n)),a=(s=N.SPLIT*this._hi)-this._hi;var u=n+(o=(1-(r=n*this._hi)-(s=i*(a=s-a)-r+i*(t=this._hi-a)+e*a+e*t)-n*this._lo)/this._hi);return new N(u,n-u+o)},N.prototype.toSciNotation=function(){if(this.isZero())return N.SCI_NOT_ZERO;var e=this.getSpecialNumberString();if(null!==e)return e;var t=new Array(1).fill(null),n=this.extractSignificantDigits(!1,t),r=N.SCI_NOT_EXPONENT_CHAR+t[0];if("0"===n.charAt(0))throw new Error("Found leading zero: "+n);var i="";n.length>1&&(i=n.substring(1));var a=n.charAt(0)+"."+i;return this.isNegative()?"-"+a+r:a+r},N.prototype.abs=function(){return this.isNaN()?N.NaN:this.isNegative()?this.negate():new N(this)},N.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},N.prototype.lt=function(e){return(this._hi<e._hi||this._hi===e._hi)&&this._lo<e._lo},N.prototype.add=function(){if(arguments[0]instanceof N){var e=arguments[0];return N.copy(this).selfAdd(e)}if("number"==typeof arguments[0]){var t=arguments[0];return N.copy(this).selfAdd(t)}},N.prototype.init=function(){if(1===arguments.length){if("number"==typeof arguments[0]){var e=arguments[0];this._hi=e,this._lo=0}else if(arguments[0]instanceof N){var t=arguments[0];this._hi=t._hi,this._lo=t._lo}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this._hi=n,this._lo=r}},N.prototype.gt=function(e){return(this._hi>e._hi||this._hi===e._hi)&&this._lo>e._lo},N.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},N.prototype.trunc=function(){return this.isNaN()?N.NaN:this.isPositive()?this.floor():this.ceil()},N.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},N.prototype.interfaces_=function(){return[t,b,E]},N.prototype.getClass=function(){return N},N.sqr=function(e){return N.valueOf(e).selfMultiply(e)},N.valueOf=function(){if("string"==typeof arguments[0]){var e=arguments[0];return N.parse(e)}if("number"==typeof arguments[0]){var t=arguments[0];return new N(t)}},N.sqrt=function(e){return N.valueOf(e).sqrt()},N.parse=function(e){for(var t=0,n=e.length;M.isWhitespace(e.charAt(t));)t++;var r=!1;if(t<n){var i=e.charAt(t);"-"!==i&&"+"!==i||(t++,"-"===i&&(r=!0))}for(var a=new N,o=0,s=0,u=0;!(t>=n);){var A=e.charAt(t);if(t++,M.isDigit(A)){var c=A-"0";a.selfMultiply(N.TEN),a.selfAdd(c),o++}else{if("."!==A){if("e"===A||"E"===A){var l=e.substring(t);try{u=j.parseInt(l)}catch(t){throw t instanceof Error?new Error("Invalid exponent "+l+" in string "+e):t}break}throw new Error("Unexpected character '"+A+"' at position "+t+" in string "+e)}s=o}}var f=a,h=o-s-u;if(0===h)f=a;else if(h>0){var g=N.TEN.pow(h);f=a.divide(g)}else if(h<0){var d=N.TEN.pow(-h);f=a.multiply(d)}return r?f.negate():f},N.createNaN=function(){return new N(m.NaN,m.NaN)},N.copy=function(e){return new N(e)},N.magnitude=function(e){var t=Math.abs(e),n=Math.log(t)/Math.log(10),r=Math.trunc(Math.floor(n));return 10*Math.pow(10,r)<=t&&(r+=1),r},N.stringOfChar=function(e,t){for(var n=new R,r=0;r<t;r++)n.append(e);return n.toString()},F.PI.get=function(){return new N(3.141592653589793,12246467991473532e-32)},F.TWO_PI.get=function(){return new N(6.283185307179586,24492935982947064e-32)},F.PI_2.get=function(){return new N(1.5707963267948966,6123233995736766e-32)},F.E.get=function(){return new N(2.718281828459045,14456468917292502e-32)},F.NaN.get=function(){return new N(m.NaN,m.NaN)},F.EPS.get=function(){return 123259516440783e-46},F.SPLIT.get=function(){return 134217729},F.MAX_PRINT_DIGITS.get=function(){return 32},F.TEN.get=function(){return N.valueOf(10)},F.ONE.get=function(){return N.valueOf(1)},F.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},F.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(N,F);var T=function(){},L={DP_SAFE_EPSILON:{configurable:!0}};T.prototype.interfaces_=function(){return[]},T.prototype.getClass=function(){return T},T.orientationIndex=function(e,t,n){var r=T.orientationIndexFilter(e,t,n);if(r<=1)return r;var i=N.valueOf(t.x).selfAdd(-e.x),a=N.valueOf(t.y).selfAdd(-e.y),o=N.valueOf(n.x).selfAdd(-t.x),s=N.valueOf(n.y).selfAdd(-t.y);return i.selfMultiply(s).selfSubtract(a.selfMultiply(o)).signum()},T.signOfDet2x2=function(e,t,n,r){return e.multiply(r).selfSubtract(t.multiply(n)).signum()},T.intersection=function(e,t,n,r){var i=N.valueOf(r.y).selfSubtract(n.y).selfMultiply(N.valueOf(t.x).selfSubtract(e.x)),a=N.valueOf(r.x).selfSubtract(n.x).selfMultiply(N.valueOf(t.y).selfSubtract(e.y)),o=i.subtract(a),s=N.valueOf(r.x).selfSubtract(n.x).selfMultiply(N.valueOf(e.y).selfSubtract(n.y)),u=N.valueOf(r.y).selfSubtract(n.y).selfMultiply(N.valueOf(e.x).selfSubtract(n.x)),A=s.subtract(u).selfDivide(o).doubleValue(),c=N.valueOf(e.x).selfAdd(N.valueOf(t.x).selfSubtract(e.x).selfMultiply(A)).doubleValue(),l=N.valueOf(t.x).selfSubtract(e.x).selfMultiply(N.valueOf(e.y).selfSubtract(n.y)),f=N.valueOf(t.y).selfSubtract(e.y).selfMultiply(N.valueOf(e.x).selfSubtract(n.x)),h=l.subtract(f).selfDivide(o).doubleValue(),g=N.valueOf(n.y).selfAdd(N.valueOf(r.y).selfSubtract(n.y).selfMultiply(h)).doubleValue();return new B(c,g)},T.orientationIndexFilter=function(e,t,n){var r=null,i=(e.x-n.x)*(t.y-n.y),a=(e.y-n.y)*(t.x-n.x),o=i-a;if(i>0){if(a<=0)return T.signum(o);r=i+a}else{if(!(i<0))return T.signum(o);if(a>=0)return T.signum(o);r=-i-a}var s=T.DP_SAFE_EPSILON*r;return o>=s||-o>=s?T.signum(o):2},T.signum=function(e){return e>0?1:e<0?-1:0},L.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(T,L);var P=function(){},U={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};U.X.get=function(){return 0},U.Y.get=function(){return 1},U.Z.get=function(){return 2},U.M.get=function(){return 3},P.prototype.setOrdinate=function(e,t,n){},P.prototype.size=function(){},P.prototype.getOrdinate=function(e,t){},P.prototype.getCoordinate=function(){},P.prototype.getCoordinateCopy=function(e){},P.prototype.getDimension=function(){},P.prototype.getX=function(e){},P.prototype.clone=function(){},P.prototype.expandEnvelope=function(e){},P.prototype.copy=function(){},P.prototype.getY=function(e){},P.prototype.toCoordinateArray=function(){},P.prototype.interfaces_=function(){return[E]},P.prototype.getClass=function(){return P},Object.defineProperties(P,U);var G=function(){},q=function(e){function t(){e.call(this,"Projective point not representable on the Cartesian plane.")}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(G),H=function(){};H.arraycopy=function(e,t,n,r,i){for(var a=0,o=t;o<t+i;o++)n[r+a]=e[o],a++},H.getProperty=function(e){return{"line.separator":"\n"}[e]};var Y=function e(){if(this.x=null,this.y=null,this.w=null,0===arguments.length)this.x=0,this.y=0,this.w=1;else if(1===arguments.length){var t=arguments[0];this.x=t.x,this.y=t.y,this.w=1}else if(2===arguments.length){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var n=arguments[0],r=arguments[1];this.x=n,this.y=r,this.w=1}else if(arguments[0]instanceof e&&arguments[1]instanceof e){var i=arguments[0],a=arguments[1];this.x=i.y*a.w-a.y*i.w,this.y=a.x*i.w-i.x*a.w,this.w=i.x*a.y-a.x*i.y}else if(arguments[0]instanceof B&&arguments[1]instanceof B){var o=arguments[0],s=arguments[1];this.x=o.y-s.y,this.y=s.x-o.x,this.w=o.x*s.y-s.x*o.y}}else if(3===arguments.length){var u=arguments[0],A=arguments[1],c=arguments[2];this.x=u,this.y=A,this.w=c}else if(4===arguments.length){var l=arguments[0],f=arguments[1],h=arguments[2],g=arguments[3],d=l.y-f.y,p=f.x-l.x,v=l.x*f.y-f.x*l.y,y=h.y-g.y,m=g.x-h.x,I=h.x*g.y-g.x*h.y;this.x=p*I-m*v,this.y=y*v-d*I,this.w=d*m-y*p}};Y.prototype.getY=function(){var e=this.y/this.w;if(m.isNaN(e)||m.isInfinite(e))throw new q;return e},Y.prototype.getX=function(){var e=this.x/this.w;if(m.isNaN(e)||m.isInfinite(e))throw new q;return e},Y.prototype.getCoordinate=function(){var e=new B;return e.x=this.getX(),e.y=this.getY(),e},Y.prototype.interfaces_=function(){return[]},Y.prototype.getClass=function(){return Y},Y.intersection=function(e,t,n,r){var i=e.y-t.y,a=t.x-e.x,o=e.x*t.y-t.x*e.y,s=n.y-r.y,u=r.x-n.x,A=n.x*r.y-r.x*n.y,c=i*u-s*a,l=(a*A-u*o)/c,f=(s*o-i*A)/c;if(m.isNaN(l)||m.isInfinite(l)||m.isNaN(f)||m.isInfinite(f))throw new q;return new B(l,f)};var J=function e(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,0===arguments.length)this.init();else if(1===arguments.length){if(arguments[0]instanceof B){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof e){var n=arguments[0];this.init(n)}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(4===arguments.length){var a=arguments[0],o=arguments[1],s=arguments[2],u=arguments[3];this.init(a,o,s,u)}},z={serialVersionUID:{configurable:!0}};J.prototype.getArea=function(){return this.getWidth()*this.getHeight()},J.prototype.equals=function(e){if(!(e instanceof J))return!1;var t=e;return this.isNull()?t.isNull():this._maxx===t.getMaxX()&&this._maxy===t.getMaxY()&&this._minx===t.getMinX()&&this._miny===t.getMinY()},J.prototype.intersection=function(e){if(this.isNull()||e.isNull()||!this.intersects(e))return new J;var t=this._minx>e._minx?this._minx:e._minx,n=this._miny>e._miny?this._miny:e._miny,r=this._maxx<e._maxx?this._maxx:e._maxx,i=this._maxy<e._maxy?this._maxy:e._maxy;return new J(t,r,n,i)},J.prototype.isNull=function(){return this._maxx<this._minx},J.prototype.getMaxX=function(){return this._maxx},J.prototype.covers=function(){if(1===arguments.length){if(arguments[0]instanceof B){var e=arguments[0];return this.covers(e.x,e.y)}if(arguments[0]instanceof J){var t=arguments[0];return!this.isNull()&&!t.isNull()&&t.getMinX()>=this._minx&&t.getMaxX()<=this._maxx&&t.getMinY()>=this._miny&&t.getMaxY()<=this._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return!this.isNull()&&n>=this._minx&&n<=this._maxx&&r>=this._miny&&r<=this._maxy}},J.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof J){var e=arguments[0];return!this.isNull()&&!e.isNull()&&!(e._minx>this._maxx||e._maxx<this._minx||e._miny>this._maxy||e._maxy<this._miny)}if(arguments[0]instanceof B){var t=arguments[0];return this.intersects(t.x,t.y)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return!this.isNull()&&!(n>this._maxx||n<this._minx||r>this._maxy||r<this._miny)}},J.prototype.getMinY=function(){return this._miny},J.prototype.getMinX=function(){return this._minx},J.prototype.expandToInclude=function(){if(1===arguments.length){if(arguments[0]instanceof B){var e=arguments[0];this.expandToInclude(e.x,e.y)}else if(arguments[0]instanceof J){var t=arguments[0];if(t.isNull())return null;this.isNull()?(this._minx=t.getMinX(),this._maxx=t.getMaxX(),this._miny=t.getMinY(),this._maxy=t.getMaxY()):(t._minx<this._minx&&(this._minx=t._minx),t._maxx>this._maxx&&(this._maxx=t._maxx),t._miny<this._miny&&(this._miny=t._miny),t._maxy>this._maxy&&(this._maxy=t._maxy))}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=r,this._maxy=r):(n<this._minx&&(this._minx=n),n>this._maxx&&(this._maxx=n),r<this._miny&&(this._miny=r),r>this._maxy&&(this._maxy=r))}},J.prototype.minExtent=function(){if(this.isNull())return 0;var e=this.getWidth(),t=this.getHeight();return e<t?e:t},J.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},J.prototype.compareTo=function(e){var t=e;return this.isNull()?t.isNull()?0:-1:t.isNull()?1:this._minx<t._minx?-1:this._minx>t._minx?1:this._miny<t._miny?-1:this._miny>t._miny?1:this._maxx<t._maxx?-1:this._maxx>t._maxx?1:this._maxy<t._maxy?-1:this._maxy>t._maxy?1:0},J.prototype.translate=function(e,t){if(this.isNull())return null;this.init(this.getMinX()+e,this.getMaxX()+e,this.getMinY()+t,this.getMaxY()+t)},J.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},J.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},J.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},J.prototype.maxExtent=function(){if(this.isNull())return 0;var e=this.getWidth(),t=this.getHeight();return e>t?e:t},J.prototype.expandBy=function(){if(1===arguments.length){var e=arguments[0];this.expandBy(e,e)}else if(2===arguments.length){var t=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=t,this._maxx+=t,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},J.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof J){var e=arguments[0];return this.covers(e)}if(arguments[0]instanceof B){var t=arguments[0];return this.covers(t)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return this.covers(n,r)}},J.prototype.centre=function(){return this.isNull()?null:new B((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},J.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof B){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof J){var t=arguments[0];this._minx=t._minx,this._maxx=t._maxx,this._miny=t._miny,this._maxy=t._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(4===arguments.length){var i=arguments[0],a=arguments[1],o=arguments[2],s=arguments[3];i<a?(this._minx=i,this._maxx=a):(this._minx=a,this._maxx=i),o<s?(this._miny=o,this._maxy=s):(this._miny=s,this._maxy=o)}},J.prototype.getMaxY=function(){return this._maxy},J.prototype.distance=function(e){if(this.intersects(e))return 0;var t=0;this._maxx<e._minx?t=e._minx-this._maxx:this._minx>e._maxx&&(t=this._minx-e._maxx);var n=0;return this._maxy<e._miny?n=e._miny-this._maxy:this._miny>e._maxy&&(n=this._miny-e._maxy),0===t?n:0===n?t:Math.sqrt(t*t+n*n)},J.prototype.hashCode=function(){var e=17;return 37*(e=37*(e=37*(e=37*e+B.hashCode(this._minx))+B.hashCode(this._maxx))+B.hashCode(this._miny))+B.hashCode(this._maxy)},J.prototype.interfaces_=function(){return[b,t]},J.prototype.getClass=function(){return J},J.intersects=function(){if(3===arguments.length){var e=arguments[0],t=arguments[1],n=arguments[2];return n.x>=(e.x<t.x?e.x:t.x)&&n.x<=(e.x>t.x?e.x:t.x)&&n.y>=(e.y<t.y?e.y:t.y)&&n.y<=(e.y>t.y?e.y:t.y)}if(4===arguments.length){var r=arguments[0],i=arguments[1],a=arguments[2],o=arguments[3],s=Math.min(a.x,o.x),u=Math.max(a.x,o.x),A=Math.min(r.x,i.x),c=Math.max(r.x,i.x);return!(A>u)&&!(c<s)&&(s=Math.min(a.y,o.y),u=Math.max(a.y,o.y),A=Math.min(r.y,i.y),c=Math.max(r.y,i.y),!(A>u)&&!(c<s))}},z.serialVersionUID.get=function(){return 0x51845cd552189800},Object.defineProperties(J,z);var K={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},W=function(e){this.geometryFactory=e||new vt};W.prototype.read=function(e){var t,n,r;e=e.replace(/[\n\r]/g," ");var i=K.typeStr.exec(e);if(-1!==e.search("EMPTY")&&((i=K.emptyTypeStr.exec(e))[2]=void 0),i&&(n=i[1].toLowerCase(),r=i[2],X[n]&&(t=X[n].apply(this,[r]))),void 0===t)throw new Error("Could not parse WKT "+e);return t},W.prototype.write=function(e){return this.extractGeometry(e)},W.prototype.extractGeometry=function(e){var t=e.getGeometryType().toLowerCase();if(!V[t])return null;var n=t.toUpperCase();return e.isEmpty()?n+" EMPTY":n+"("+V[t].apply(this,[e])+")"};var V={coordinate:function(e){return e.x+" "+e.y},point:function(e){return V.coordinate.call(this,e._coordinates._coordinates[0])},multipoint:function(e){for(var t=[],n=0,r=e._geometries.length;n<r;++n)t.push("("+V.point.apply(this,[e._geometries[n]])+")");return t.join(",")},linestring:function(e){for(var t=[],n=0,r=e._points._coordinates.length;n<r;++n)t.push(V.coordinate.apply(this,[e._points._coordinates[n]]));return t.join(",")},linearring:function(e){for(var t=[],n=0,r=e._points._coordinates.length;n<r;++n)t.push(V.coordinate.apply(this,[e._points._coordinates[n]]));return t.join(",")},multilinestring:function(e){for(var t=[],n=0,r=e._geometries.length;n<r;++n)t.push("("+V.linestring.apply(this,[e._geometries[n]])+")");return t.join(",")},polygon:function(e){var t=[];t.push("("+V.linestring.apply(this,[e._shell])+")");for(var n=0,r=e._holes.length;n<r;++n)t.push("("+V.linestring.apply(this,[e._holes[n]])+")");return t.join(",")},multipolygon:function(e){for(var t=[],n=0,r=e._geometries.length;n<r;++n)t.push("("+V.polygon.apply(this,[e._geometries[n]])+")");return t.join(",")},geometrycollection:function(e){for(var t=[],n=0,r=e._geometries.length;n<r;++n)t.push(this.extractGeometry(e._geometries[n]));return t.join(",")}},X={point:function(e){if(void 0===e)return this.geometryFactory.createPoint();var t=e.trim().split(K.spaces);return this.geometryFactory.createPoint(new B(Number.parseFloat(t[0]),Number.parseFloat(t[1])))},multipoint:function(e){if(void 0===e)return this.geometryFactory.createMultiPoint();for(var t,n=e.trim().split(","),r=[],i=0,a=n.length;i<a;++i)t=n[i].replace(K.trimParens,"$1"),r.push(X.point.apply(this,[t]));return this.geometryFactory.createMultiPoint(r)},linestring:function(e){if(void 0===e)return this.geometryFactory.createLineString();for(var t,n=e.trim().split(","),r=[],i=0,a=n.length;i<a;++i)t=n[i].trim().split(K.spaces),r.push(new B(Number.parseFloat(t[0]),Number.parseFloat(t[1])));return this.geometryFactory.createLineString(r)},linearring:function(e){if(void 0===e)return this.geometryFactory.createLinearRing();for(var t,n=e.trim().split(","),r=[],i=0,a=n.length;i<a;++i)t=n[i].trim().split(K.spaces),r.push(new B(Number.parseFloat(t[0]),Number.parseFloat(t[1])));return this.geometryFactory.createLinearRing(r)},multilinestring:function(e){if(void 0===e)return this.geometryFactory.createMultiLineString();for(var t,n=e.trim().split(K.parenComma),r=[],i=0,a=n.length;i<a;++i)t=n[i].replace(K.trimParens,"$1"),r.push(X.linestring.apply(this,[t]));return this.geometryFactory.createMultiLineString(r)},polygon:function(e){if(void 0===e)return this.geometryFactory.createPolygon();for(var t,n,r,i,a=e.trim().split(K.parenComma),o=[],s=0,u=a.length;s<u;++s)t=a[s].replace(K.trimParens,"$1"),n=X.linestring.apply(this,[t]),r=this.geometryFactory.createLinearRing(n._points),0===s?i=r:o.push(r);return this.geometryFactory.createPolygon(i,o)},multipolygon:function(e){if(void 0===e)return this.geometryFactory.createMultiPolygon();for(var t,n=e.trim().split(K.doubleParenComma),r=[],i=0,a=n.length;i<a;++i)t=n[i].replace(K.trimParens,"$1"),r.push(X.polygon.apply(this,[t]));return this.geometryFactory.createMultiPolygon(r)},geometrycollection:function(e){if(void 0===e)return this.geometryFactory.createGeometryCollection();for(var t=(e=e.replace(/,\s*([A-Za-z])/g,"|$1")).trim().split("|"),n=[],r=0,i=t.length;r<i;++r)n.push(this.read(t[r]));return this.geometryFactory.createGeometryCollection(n)}},Z=function(e){this.parser=new W(e)};Z.prototype.write=function(e){return this.parser.write(e)},Z.toLineString=function(e,t){if(2!==arguments.length)throw new Error("Not implemented");return"LINESTRING ( "+e.x+" "+e.y+", "+t.x+" "+t.y+" )"};var $=function(e){function t(t){e.call(this,t),this.name="RuntimeException",this.message=t,this.stack=(new e).stack}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Error),ee=function(e){function t(){if(e.call(this),0===arguments.length)e.call(this);else if(1===arguments.length){var t=arguments[0];e.call(this,t)}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}($),te=function(){};te.prototype.interfaces_=function(){return[]},te.prototype.getClass=function(){return te},te.shouldNeverReachHere=function(){if(0===arguments.length)te.shouldNeverReachHere(null);else if(1===arguments.length){var e=arguments[0];throw new ee("Should never reach here"+(null!==e?": "+e:""))}},te.isTrue=function(){var e,t;if(1===arguments.length)e=arguments[0],te.isTrue(e,null);else if(2===arguments.length&&(e=arguments[0],t=arguments[1],!e))throw null===t?new ee:new ee(t)},te.equals=function(){var e,t,n;if(2===arguments.length)e=arguments[0],t=arguments[1],te.equals(e,t,null);else if(3===arguments.length&&(e=arguments[0],t=arguments[1],n=arguments[2],!t.equals(e)))throw new ee("Expected "+e+" but encountered "+t+(null!==n?": "+n:""))};var ne=function(){this._result=null,this._inputLines=Array(2).fill().map((function(){return Array(2)})),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new B,this._intPt[1]=new B,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},re={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};ne.prototype.getIndexAlongSegment=function(e,t){return this.computeIntLineIndex(),this._intLineIndex[e][t]},ne.prototype.getTopologySummary=function(){var e=new R;return this.isEndPoint()&&e.append(" endpoint"),this._isProper&&e.append(" proper"),this.isCollinear()&&e.append(" collinear"),e.toString()},ne.prototype.computeIntersection=function(e,t,n,r){this._inputLines[0][0]=e,this._inputLines[0][1]=t,this._inputLines[1][0]=n,this._inputLines[1][1]=r,this._result=this.computeIntersect(e,t,n,r)},ne.prototype.getIntersectionNum=function(){return this._result},ne.prototype.computeIntLineIndex=function(){if(0===arguments.length)null===this._intLineIndex&&(this._intLineIndex=Array(2).fill().map((function(){return Array(2)})),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(1===arguments.length){var e=arguments[0];this.getEdgeDistance(e,0)>this.getEdgeDistance(e,1)?(this._intLineIndex[e][0]=0,this._intLineIndex[e][1]=1):(this._intLineIndex[e][0]=1,this._intLineIndex[e][1]=0)}},ne.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},ne.prototype.setPrecisionModel=function(e){this._precisionModel=e},ne.prototype.isInteriorIntersection=function(){if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var e=arguments[0],t=0;t<this._result;t++)if(!this._intPt[t].equals2D(this._inputLines[e][0])&&!this._intPt[t].equals2D(this._inputLines[e][1]))return!0;return!1}},ne.prototype.getIntersection=function(e){return this._intPt[e]},ne.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},ne.prototype.hasIntersection=function(){return this._result!==ne.NO_INTERSECTION},ne.prototype.getEdgeDistance=function(e,t){return ne.computeEdgeDistance(this._intPt[t],this._inputLines[e][0],this._inputLines[e][1])},ne.prototype.isCollinear=function(){return this._result===ne.COLLINEAR_INTERSECTION},ne.prototype.toString=function(){return Z.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+Z.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},ne.prototype.getEndpoint=function(e,t){return this._inputLines[e][t]},ne.prototype.isIntersection=function(e){for(var t=0;t<this._result;t++)if(this._intPt[t].equals2D(e))return!0;return!1},ne.prototype.getIntersectionAlongSegment=function(e,t){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[e][t]]},ne.prototype.interfaces_=function(){return[]},ne.prototype.getClass=function(){return ne},ne.computeEdgeDistance=function(e,t,n){var r=Math.abs(n.x-t.x),i=Math.abs(n.y-t.y),a=-1;if(e.equals(t))a=0;else if(e.equals(n))a=r>i?r:i;else{var o=Math.abs(e.x-t.x),s=Math.abs(e.y-t.y);0!==(a=r>i?o:s)||e.equals(t)||(a=Math.max(o,s))}return te.isTrue(!(0===a&&!e.equals(t)),"Bad distance calculation"),a},ne.nonRobustComputeEdgeDistance=function(e,t,n){var r=e.x-t.x,i=e.y-t.y,a=Math.sqrt(r*r+i*i);return te.isTrue(!(0===a&&!e.equals(t)),"Invalid distance calculation"),a},re.DONT_INTERSECT.get=function(){return 0},re.DO_INTERSECT.get=function(){return 1},re.COLLINEAR.get=function(){return 2},re.NO_INTERSECTION.get=function(){return 0},re.POINT_INTERSECTION.get=function(){return 1},re.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(ne,re);var ie=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.isInSegmentEnvelopes=function(e){var t=new J(this._inputLines[0][0],this._inputLines[0][1]),n=new J(this._inputLines[1][0],this._inputLines[1][1]);return t.contains(e)&&n.contains(e)},t.prototype.computeIntersection=function(){if(3!==arguments.length)return e.prototype.computeIntersection.apply(this,arguments);var t=arguments[0],n=arguments[1],r=arguments[2];if(this._isProper=!1,J.intersects(n,r,t)&&0===se.orientationIndex(n,r,t)&&0===se.orientationIndex(r,n,t))return this._isProper=!0,(t.equals(n)||t.equals(r))&&(this._isProper=!1),this._result=e.POINT_INTERSECTION,null;this._result=e.NO_INTERSECTION},t.prototype.normalizeToMinimum=function(e,t,n,r,i){i.x=this.smallestInAbsValue(e.x,t.x,n.x,r.x),i.y=this.smallestInAbsValue(e.y,t.y,n.y,r.y),e.x-=i.x,e.y-=i.y,t.x-=i.x,t.y-=i.y,n.x-=i.x,n.y-=i.y,r.x-=i.x,r.y-=i.y},t.prototype.safeHCoordinateIntersection=function(e,n,r,i){var a=null;try{a=Y.intersection(e,n,r,i)}catch(o){if(!(o instanceof q))throw o;a=t.nearestEndpoint(e,n,r,i)}return a},t.prototype.intersection=function(e,n,r,i){var a=this.intersectionWithNormalization(e,n,r,i);return this.isInSegmentEnvelopes(a)||(a=new B(t.nearestEndpoint(e,n,r,i))),null!==this._precisionModel&&this._precisionModel.makePrecise(a),a},t.prototype.smallestInAbsValue=function(e,t,n,r){var i=e,a=Math.abs(i);return Math.abs(t)<a&&(i=t,a=Math.abs(t)),Math.abs(n)<a&&(i=n,a=Math.abs(n)),Math.abs(r)<a&&(i=r),i},t.prototype.checkDD=function(e,t,n,r,i){var a=T.intersection(e,t,n,r),o=this.isInSegmentEnvelopes(a);H.out.println("DD in env = "+o+"  --------------------- "+a),i.distance(a)>1e-4&&H.out.println("Distance = "+i.distance(a))},t.prototype.intersectionWithNormalization=function(e,t,n,r){var i=new B(e),a=new B(t),o=new B(n),s=new B(r),u=new B;this.normalizeToEnvCentre(i,a,o,s,u);var A=this.safeHCoordinateIntersection(i,a,o,s);return A.x+=u.x,A.y+=u.y,A},t.prototype.computeCollinearIntersection=function(t,n,r,i){var a=J.intersects(t,n,r),o=J.intersects(t,n,i),s=J.intersects(r,i,t),u=J.intersects(r,i,n);return a&&o?(this._intPt[0]=r,this._intPt[1]=i,e.COLLINEAR_INTERSECTION):s&&u?(this._intPt[0]=t,this._intPt[1]=n,e.COLLINEAR_INTERSECTION):a&&s?(this._intPt[0]=r,this._intPt[1]=t,!r.equals(t)||o||u?e.COLLINEAR_INTERSECTION:e.POINT_INTERSECTION):a&&u?(this._intPt[0]=r,this._intPt[1]=n,!r.equals(n)||o||s?e.COLLINEAR_INTERSECTION:e.POINT_INTERSECTION):o&&s?(this._intPt[0]=i,this._intPt[1]=t,!i.equals(t)||a||u?e.COLLINEAR_INTERSECTION:e.POINT_INTERSECTION):o&&u?(this._intPt[0]=i,this._intPt[1]=n,!i.equals(n)||a||s?e.COLLINEAR_INTERSECTION:e.POINT_INTERSECTION):e.NO_INTERSECTION},t.prototype.normalizeToEnvCentre=function(e,t,n,r,i){var a=e.x<t.x?e.x:t.x,o=e.y<t.y?e.y:t.y,s=e.x>t.x?e.x:t.x,u=e.y>t.y?e.y:t.y,A=n.x<r.x?n.x:r.x,c=n.y<r.y?n.y:r.y,l=n.x>r.x?n.x:r.x,f=n.y>r.y?n.y:r.y,h=((a>A?a:A)+(s<l?s:l))/2,g=((o>c?o:c)+(u<f?u:f))/2;i.x=h,i.y=g,e.x-=i.x,e.y-=i.y,t.x-=i.x,t.y-=i.y,n.x-=i.x,n.y-=i.y,r.x-=i.x,r.y-=i.y},t.prototype.computeIntersect=function(t,n,r,i){if(this._isProper=!1,!J.intersects(t,n,r,i))return e.NO_INTERSECTION;var a=se.orientationIndex(t,n,r),o=se.orientationIndex(t,n,i);if(a>0&&o>0||a<0&&o<0)return e.NO_INTERSECTION;var s=se.orientationIndex(r,i,t),u=se.orientationIndex(r,i,n);return s>0&&u>0||s<0&&u<0?e.NO_INTERSECTION:0===a&&0===o&&0===s&&0===u?this.computeCollinearIntersection(t,n,r,i):(0===a||0===o||0===s||0===u?(this._isProper=!1,t.equals2D(r)||t.equals2D(i)?this._intPt[0]=t:n.equals2D(r)||n.equals2D(i)?this._intPt[0]=n:0===a?this._intPt[0]=new B(r):0===o?this._intPt[0]=new B(i):0===s?this._intPt[0]=new B(t):0===u&&(this._intPt[0]=new B(n))):(this._isProper=!0,this._intPt[0]=this.intersection(t,n,r,i)),e.POINT_INTERSECTION)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.nearestEndpoint=function(e,t,n,r){var i=e,a=se.distancePointLine(e,n,r),o=se.distancePointLine(t,n,r);return o<a&&(a=o,i=t),(o=se.distancePointLine(n,e,t))<a&&(a=o,i=n),(o=se.distancePointLine(r,e,t))<a&&(a=o,i=r),i},t}(ne),ae=function(){};ae.prototype.interfaces_=function(){return[]},ae.prototype.getClass=function(){return ae},ae.orientationIndex=function(e,t,n){var r=t.x-e.x,i=t.y-e.y,a=n.x-t.x,o=n.y-t.y;return ae.signOfDet2x2(r,i,a,o)},ae.signOfDet2x2=function(e,t,n,r){var i=null,a=null,o=null;if(i=1,0===e||0===r)return 0===t||0===n?0:t>0?n>0?-i:i:n>0?i:-i;if(0===t||0===n)return r>0?e>0?i:-i:e>0?-i:i;if(t>0?r>0?t<=r||(i=-i,a=e,e=n,n=a,a=t,t=r,r=a):t<=-r?(i=-i,n=-n,r=-r):(a=e,e=-n,n=a,a=t,t=-r,r=a):r>0?-t<=r?(i=-i,e=-e,t=-t):(a=-e,e=n,n=a,a=-t,t=r,r=a):t>=r?(e=-e,t=-t,n=-n,r=-r):(i=-i,a=-e,e=-n,n=a,a=-t,t=-r,r=a),e>0){if(!(n>0))return i;if(!(e<=n))return i}else{if(n>0)return-i;if(!(e>=n))return-i;i=-i,e=-e,n=-n}for(;;){if((r-=(o=Math.floor(n/e))*t)<0)return-i;if(r>t)return i;if(e>(n-=o*e)+n){if(t<r+r)return i}else{if(t>r+r)return-i;n=e-n,r=t-r,i=-i}if(0===r)return 0===n?0:-i;if(0===n)return i;if((t-=(o=Math.floor(e/n))*r)<0)return i;if(t>r)return-i;if(n>(e-=o*n)+e){if(r<t+t)return-i}else{if(r>t+t)return i;e=n-e,t=r-t,i=-i}if(0===t)return 0===e?0:i;if(0===e)return-i}};var oe=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var e=arguments[0];this._p=e};oe.prototype.countSegment=function(e,t){if(e.x<this._p.x&&t.x<this._p.x)return null;if(this._p.x===t.x&&this._p.y===t.y)return this._isPointOnSegment=!0,null;if(e.y===this._p.y&&t.y===this._p.y){var n=e.x,r=t.x;return n>r&&(n=t.x,r=e.x),this._p.x>=n&&this._p.x<=r&&(this._isPointOnSegment=!0),null}if(e.y>this._p.y&&t.y<=this._p.y||t.y>this._p.y&&e.y<=this._p.y){var i=e.x-this._p.x,a=e.y-this._p.y,o=t.x-this._p.x,s=t.y-this._p.y,u=ae.signOfDet2x2(i,a,o,s);if(0===u)return this._isPointOnSegment=!0,null;s<a&&(u=-u),u>0&&this._crossingCount++}},oe.prototype.isPointInPolygon=function(){return this.getLocation()!==_.EXTERIOR},oe.prototype.getLocation=function(){return this._isPointOnSegment?_.BOUNDARY:this._crossingCount%2==1?_.INTERIOR:_.EXTERIOR},oe.prototype.isOnSegment=function(){return this._isPointOnSegment},oe.prototype.interfaces_=function(){return[]},oe.prototype.getClass=function(){return oe},oe.locatePointInRing=function(){if(arguments[0]instanceof B&&S(arguments[1],P)){for(var e=arguments[0],t=arguments[1],n=new oe(e),r=new B,i=new B,a=1;a<t.size();a++)if(t.getCoordinate(a,r),t.getCoordinate(a-1,i),n.countSegment(r,i),n.isOnSegment())return n.getLocation();return n.getLocation()}if(arguments[0]instanceof B&&arguments[1]instanceof Array){for(var o=arguments[0],s=arguments[1],u=new oe(o),A=1;A<s.length;A++){var c=s[A],l=s[A-1];if(u.countSegment(c,l),u.isOnSegment())return u.getLocation()}return u.getLocation()}};var se=function(){},ue={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};se.prototype.interfaces_=function(){return[]},se.prototype.getClass=function(){return se},se.orientationIndex=function(e,t,n){return T.orientationIndex(e,t,n)},se.signedArea=function(){if(arguments[0]instanceof Array){var e=arguments[0];if(e.length<3)return 0;for(var t=0,n=e[0].x,r=1;r<e.length-1;r++){var i=e[r].x-n,a=e[r+1].y;t+=i*(e[r-1].y-a)}return t/2}if(S(arguments[0],P)){var o=arguments[0],s=o.size();if(s<3)return 0;var u=new B,A=new B,c=new B;o.getCoordinate(0,A),o.getCoordinate(1,c);var l=A.x;c.x-=l;for(var f=0,h=1;h<s-1;h++)u.y=A.y,A.x=c.x,A.y=c.y,o.getCoordinate(h+1,c),c.x-=l,f+=A.x*(u.y-c.y);return f/2}},se.distanceLineLine=function(e,t,n,r){if(e.equals(t))return se.distancePointLine(e,n,r);if(n.equals(r))return se.distancePointLine(r,e,t);var i=!1;if(J.intersects(e,t,n,r)){var a=(t.x-e.x)*(r.y-n.y)-(t.y-e.y)*(r.x-n.x);if(0===a)i=!0;else{var o=(e.y-n.y)*(r.x-n.x)-(e.x-n.x)*(r.y-n.y),s=((e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y))/a,u=o/a;(u<0||u>1||s<0||s>1)&&(i=!0)}}else i=!0;return i?O.min(se.distancePointLine(e,n,r),se.distancePointLine(t,n,r),se.distancePointLine(n,e,t),se.distancePointLine(r,e,t)):0},se.isPointInRing=function(e,t){return se.locatePointInRing(e,t)!==_.EXTERIOR},se.computeLength=function(e){var t=e.size();if(t<=1)return 0;var n=0,r=new B;e.getCoordinate(0,r);for(var i=r.x,a=r.y,o=1;o<t;o++){e.getCoordinate(o,r);var s=r.x,u=r.y,A=s-i,c=u-a;n+=Math.sqrt(A*A+c*c),i=s,a=u}return n},se.isCCW=function(e){var t=e.length-1;if(t<3)throw new y("Ring has fewer than 4 points, so orientation cannot be determined");for(var n=e[0],r=0,i=1;i<=t;i++){var a=e[i];a.y>n.y&&(n=a,r=i)}var o=r;do{(o-=1)<0&&(o=t)}while(e[o].equals2D(n)&&o!==r);var s=r;do{s=(s+1)%t}while(e[s].equals2D(n)&&s!==r);var u=e[o],A=e[s];if(u.equals2D(n)||A.equals2D(n)||u.equals2D(A))return!1;var c=se.computeOrientation(u,n,A);return 0===c?u.x>A.x:c>0},se.locatePointInRing=function(e,t){return oe.locatePointInRing(e,t)},se.distancePointLinePerpendicular=function(e,t,n){var r=(n.x-t.x)*(n.x-t.x)+(n.y-t.y)*(n.y-t.y),i=((t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y))/r;return Math.abs(i)*Math.sqrt(r)},se.computeOrientation=function(e,t,n){return se.orientationIndex(e,t,n)},se.distancePointLine=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];if(0===t.length)throw new y("Line array must contain at least one vertex");for(var n=e.distance(t[0]),r=0;r<t.length-1;r++){var i=se.distancePointLine(e,t[r],t[r+1]);i<n&&(n=i)}return n}if(3===arguments.length){var a=arguments[0],o=arguments[1],s=arguments[2];if(o.x===s.x&&o.y===s.y)return a.distance(o);var u=(s.x-o.x)*(s.x-o.x)+(s.y-o.y)*(s.y-o.y),A=((a.x-o.x)*(s.x-o.x)+(a.y-o.y)*(s.y-o.y))/u;if(A<=0)return a.distance(o);if(A>=1)return a.distance(s);var c=((o.y-a.y)*(s.x-o.x)-(o.x-a.x)*(s.y-o.y))/u;return Math.abs(c)*Math.sqrt(u)}},se.isOnLine=function(e,t){for(var n=new ie,r=1;r<t.length;r++){var i=t[r-1],a=t[r];if(n.computeIntersection(e,i,a),n.hasIntersection())return!0}return!1},ue.CLOCKWISE.get=function(){return-1},ue.RIGHT.get=function(){return se.CLOCKWISE},ue.COUNTERCLOCKWISE.get=function(){return 1},ue.LEFT.get=function(){return se.COUNTERCLOCKWISE},ue.COLLINEAR.get=function(){return 0},ue.STRAIGHT.get=function(){return se.COLLINEAR},Object.defineProperties(se,ue);var Ae=function(){};Ae.prototype.filter=function(e){},Ae.prototype.interfaces_=function(){return[]},Ae.prototype.getClass=function(){return Ae};var ce=function(){var e=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=e,this._SRID=e.getSRID()},le={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};ce.prototype.isGeometryCollection=function(){return this.getSortIndex()===ce.SORTINDEX_GEOMETRYCOLLECTION},ce.prototype.getFactory=function(){return this._factory},ce.prototype.getGeometryN=function(e){return this},ce.prototype.getArea=function(){return 0},ce.prototype.isRectangle=function(){return!1},ce.prototype.equals=function(){if(arguments[0]instanceof ce){var e=arguments[0];return null!==e&&this.equalsTopo(e)}if(arguments[0]instanceof Object){var t=arguments[0];if(!(t instanceof ce))return!1;var n=t;return this.equalsExact(n)}},ce.prototype.equalsExact=function(e){return this===e||this.equalsExact(e,0)},ce.prototype.geometryChanged=function(){this.apply(ce.geometryChangedFilter)},ce.prototype.geometryChangedAction=function(){this._envelope=null},ce.prototype.equalsNorm=function(e){return null!==e&&this.norm().equalsExact(e.norm())},ce.prototype.getLength=function(){return 0},ce.prototype.getNumGeometries=function(){return 1},ce.prototype.compareTo=function(){if(1===arguments.length){var e=arguments[0],t=e;return this.getSortIndex()!==t.getSortIndex()?this.getSortIndex()-t.getSortIndex():this.isEmpty()&&t.isEmpty()?0:this.isEmpty()?-1:t.isEmpty()?1:this.compareToSameClass(e)}if(2===arguments.length){var n=arguments[0],r=arguments[1];return this.getSortIndex()!==n.getSortIndex()?this.getSortIndex()-n.getSortIndex():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(n,r)}},ce.prototype.getUserData=function(){return this._userData},ce.prototype.getSRID=function(){return this._SRID},ce.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},ce.prototype.checkNotGeometryCollection=function(e){if(e.getSortIndex()===ce.SORTINDEX_GEOMETRYCOLLECTION)throw new y("This method does not support GeometryCollection arguments")},ce.prototype.equal=function(e,t,n){return 0===n?e.equals(t):e.distance(t)<=n},ce.prototype.norm=function(){var e=this.copy();return e.normalize(),e},ce.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},ce.prototype.getEnvelopeInternal=function(){return null===this._envelope&&(this._envelope=this.computeEnvelopeInternal()),new J(this._envelope)},ce.prototype.setSRID=function(e){this._SRID=e},ce.prototype.setUserData=function(e){this._userData=e},ce.prototype.compare=function(e,t){for(var n=e.iterator(),r=t.iterator();n.hasNext()&&r.hasNext();){var i=n.next(),a=r.next(),o=i.compareTo(a);if(0!==o)return o}return n.hasNext()?1:r.hasNext()?-1:0},ce.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},ce.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===ce.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===ce.SORTINDEX_MULTIPOINT||this.getSortIndex()===ce.SORTINDEX_MULTILINESTRING||this.getSortIndex()===ce.SORTINDEX_MULTIPOLYGON},ce.prototype.interfaces_=function(){return[E,b,t]},ce.prototype.getClass=function(){return ce},ce.hasNonEmptyElements=function(e){for(var t=0;t<e.length;t++)if(!e[t].isEmpty())return!0;return!1},ce.hasNullElements=function(e){for(var t=0;t<e.length;t++)if(null===e[t])return!0;return!1},le.serialVersionUID.get=function(){return 0x799ea46522854c00},le.SORTINDEX_POINT.get=function(){return 0},le.SORTINDEX_MULTIPOINT.get=function(){return 1},le.SORTINDEX_LINESTRING.get=function(){return 2},le.SORTINDEX_LINEARRING.get=function(){return 3},le.SORTINDEX_MULTILINESTRING.get=function(){return 4},le.SORTINDEX_POLYGON.get=function(){return 5},le.SORTINDEX_MULTIPOLYGON.get=function(){return 6},le.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},le.geometryChangedFilter.get=function(){return fe},Object.defineProperties(ce,le);var fe=function(){};fe.interfaces_=function(){return[Ae]},fe.filter=function(e){e.geometryChangedAction()};var he=function(){};he.prototype.filter=function(e){},he.prototype.interfaces_=function(){return[]},he.prototype.getClass=function(){return he};var ge=function(){},de={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};ge.prototype.isInBoundary=function(e){},ge.prototype.interfaces_=function(){return[]},ge.prototype.getClass=function(){return ge},de.Mod2BoundaryNodeRule.get=function(){return pe},de.EndPointBoundaryNodeRule.get=function(){return ve},de.MultiValentEndPointBoundaryNodeRule.get=function(){return ye},de.MonoValentEndPointBoundaryNodeRule.get=function(){return me},de.MOD2_BOUNDARY_RULE.get=function(){return new pe},de.ENDPOINT_BOUNDARY_RULE.get=function(){return new ve},de.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new ye},de.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new me},de.OGC_SFS_BOUNDARY_RULE.get=function(){return ge.MOD2_BOUNDARY_RULE},Object.defineProperties(ge,de);var pe=function(){};pe.prototype.isInBoundary=function(e){return e%2==1},pe.prototype.interfaces_=function(){return[ge]},pe.prototype.getClass=function(){return pe};var ve=function(){};ve.prototype.isInBoundary=function(e){return e>0},ve.prototype.interfaces_=function(){return[ge]},ve.prototype.getClass=function(){return ve};var ye=function(){};ye.prototype.isInBoundary=function(e){return e>1},ye.prototype.interfaces_=function(){return[ge]},ye.prototype.getClass=function(){return ye};var me=function(){};me.prototype.isInBoundary=function(e){return 1===e},me.prototype.interfaces_=function(){return[ge]},me.prototype.getClass=function(){return me};var Ie=function(){};Ie.prototype.add=function(){},Ie.prototype.addAll=function(){},Ie.prototype.isEmpty=function(){},Ie.prototype.iterator=function(){},Ie.prototype.size=function(){},Ie.prototype.toArray=function(){},Ie.prototype.remove=function(){},(n.prototype=new Error).name="IndexOutOfBoundsException";var be=function(){};be.prototype.hasNext=function(){},be.prototype.next=function(){},be.prototype.remove=function(){};var Ee=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(){},t.prototype.set=function(){},t.prototype.isEmpty=function(){},t}(Ie);(r.prototype=new Error).name="NoSuchElementException";var Ce=function(e){function t(){e.call(this),this.array_=[],arguments[0]instanceof Ie&&this.addAll(arguments[0])}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.ensureCapacity=function(){},t.prototype.interfaces_=function(){return[e,Ie]},t.prototype.add=function(e){return 1===arguments.length?this.array_.push(e):this.array_.splice(arguments[0],arguments[1]),!0},t.prototype.clear=function(){this.array_=[]},t.prototype.addAll=function(e){for(var t=e.iterator();t.hasNext();)this.add(t.next());return!0},t.prototype.set=function(e,t){var n=this.array_[e];return this.array_[e]=t,n},t.prototype.iterator=function(){return new Be(this)},t.prototype.get=function(e){if(e<0||e>=this.size())throw new n;return this.array_[e]},t.prototype.isEmpty=function(){return 0===this.array_.length},t.prototype.size=function(){return this.array_.length},t.prototype.toArray=function(){for(var e=[],t=0,n=this.array_.length;t<n;t++)e.push(this.array_[t]);return e},t.prototype.remove=function(e){for(var t=!1,n=0,r=this.array_.length;n<r;n++)if(this.array_[n]===e){this.array_.splice(n,1),t=!0;break}return t},t}(Ee),Be=function(e){function t(t){e.call(this),this.arrayList_=t,this.position_=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new r;return this.arrayList_.get(this.position_++)},t.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},t.prototype.set=function(e){return this.arrayList_.set(this.position_-1,e)},t.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},t}(be),we=function(e){function t(){if(e.call(this),0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.ensureCapacity(t.length),this.add(t,!0)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.ensureCapacity(n.length),this.add(n,r)}}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var n={coordArrayType:{configurable:!0}};return n.coordArrayType.get=function(){return new Array(0).fill(null)},t.prototype.getCoordinate=function(e){return this.get(e)},t.prototype.addAll=function(){if(2===arguments.length){for(var t=arguments[0],n=arguments[1],r=!1,i=t.iterator();i.hasNext();)this.add(i.next(),n),r=!0;return r}return e.prototype.addAll.apply(this,arguments)},t.prototype.clone=function(){for(var t=e.prototype.clone.call(this),n=0;n<this.size();n++)t.add(n,this.get(n).copy());return t},t.prototype.toCoordinateArray=function(){return this.toArray(t.coordArrayType)},t.prototype.add=function(){if(1===arguments.length){var t=arguments[0];e.prototype.add.call(this,t)}else if(2===arguments.length){if(arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var n=arguments[0],r=arguments[1];return this.add(n,r,!0),!0}if(arguments[0]instanceof B&&"boolean"==typeof arguments[1]){var i=arguments[0];if(!arguments[1]&&this.size()>=1&&this.get(this.size()-1).equals2D(i))return null;e.prototype.add.call(this,i)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var a=arguments[0],o=arguments[1];return this.add(a,o),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var s=arguments[0],u=arguments[1];if(arguments[2])for(var A=0;A<s.length;A++)this.add(s[A],u);else for(var c=s.length-1;c>=0;c--)this.add(s[c],u);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof B){var l=arguments[0],f=arguments[1];if(!arguments[2]){var h=this.size();if(h>0){if(l>0&&this.get(l-1).equals2D(f))return null;if(l<h&&this.get(l).equals2D(f))return null}}e.prototype.add.call(this,l,f)}}else if(4===arguments.length){var g=arguments[0],d=arguments[1],p=arguments[2],v=arguments[3],y=1;p>v&&(y=-1);for(var m=p;m!==v;m+=y)this.add(g[m],d);return!0}},t.prototype.closeRing=function(){this.size()>0&&this.add(new B(this.get(0)),!1)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},Object.defineProperties(t,n),t}(Ce),Qe=function(){},ke={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};ke.ForwardComparator.get=function(){return _e},ke.BidirectionalComparator.get=function(){return xe},ke.coordArrayType.get=function(){return new Array(0).fill(null)},Qe.prototype.interfaces_=function(){return[]},Qe.prototype.getClass=function(){return Qe},Qe.isRing=function(e){return!(e.length<4)&&!!e[0].equals2D(e[e.length-1])},Qe.ptNotInList=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(Qe.indexOf(r,t)<0)return r}return null},Qe.scroll=function(e,t){var n=Qe.indexOf(t,e);if(n<0)return null;var r=new Array(e.length).fill(null);H.arraycopy(e,n,r,0,e.length-n),H.arraycopy(e,0,r,e.length-n,n),H.arraycopy(r,0,e,0,e.length)},Qe.equals=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];if(e===t)return!0;if(null===e||null===t)return!1;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].equals(t[n]))return!1;return!0}if(3===arguments.length){var r=arguments[0],i=arguments[1],a=arguments[2];if(r===i)return!0;if(null===r||null===i)return!1;if(r.length!==i.length)return!1;for(var o=0;o<r.length;o++)if(0!==a.compare(r[o],i[o]))return!1;return!0}},Qe.intersection=function(e,t){for(var n=new we,r=0;r<e.length;r++)t.intersects(e[r])&&n.add(e[r],!0);return n.toCoordinateArray()},Qe.hasRepeatedPoints=function(e){for(var t=1;t<e.length;t++)if(e[t-1].equals(e[t]))return!0;return!1},Qe.removeRepeatedPoints=function(e){return Qe.hasRepeatedPoints(e)?new we(e,!1).toCoordinateArray():e},Qe.reverse=function(e){for(var t=e.length-1,n=Math.trunc(t/2),r=0;r<=n;r++){var i=e[r];e[r]=e[t-r],e[t-r]=i}},Qe.removeNull=function(e){for(var t=0,n=0;n<e.length;n++)null!==e[n]&&t++;var r=new Array(t).fill(null);if(0===t)return r;for(var i=0,a=0;a<e.length;a++)null!==e[a]&&(r[i++]=e[a]);return r},Qe.copyDeep=function(){if(1===arguments.length){for(var e=arguments[0],t=new Array(e.length).fill(null),n=0;n<e.length;n++)t[n]=new B(e[n]);return t}if(5===arguments.length)for(var r=arguments[0],i=arguments[1],a=arguments[2],o=arguments[3],s=arguments[4],u=0;u<s;u++)a[o+u]=new B(r[i+u])},Qe.isEqualReversed=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[e.length-n-1];if(0!==r.compareTo(i))return!1}return!0},Qe.envelope=function(e){for(var t=new J,n=0;n<e.length;n++)t.expandToInclude(e[n]);return t},Qe.toCoordinateArray=function(e){return e.toArray(Qe.coordArrayType)},Qe.atLeastNCoordinatesOrNothing=function(e,t){return t.length>=e?t:[]},Qe.indexOf=function(e,t){for(var n=0;n<t.length;n++)if(e.equals(t[n]))return n;return-1},Qe.increasingDirection=function(e){for(var t=0;t<Math.trunc(e.length/2);t++){var n=e.length-1-t,r=e[t].compareTo(e[n]);if(0!==r)return r}return 1},Qe.compare=function(e,t){for(var n=0;n<e.length&&n<t.length;){var r=e[n].compareTo(t[n]);if(0!==r)return r;n++}return n<t.length?-1:n<e.length?1:0},Qe.minCoordinate=function(e){for(var t=null,n=0;n<e.length;n++)(null===t||t.compareTo(e[n])>0)&&(t=e[n]);return t},Qe.extract=function(e,t,n){t=O.clamp(t,0,e.length);var r=(n=O.clamp(n,-1,e.length))-t+1;n<0&&(r=0),t>=e.length&&(r=0),n<t&&(r=0);var i=new Array(r).fill(null);if(0===r)return i;for(var a=0,o=t;o<=n;o++)i[a++]=e[o];return i},Object.defineProperties(Qe,ke);var _e=function(){};_e.prototype.compare=function(e,t){return Qe.compare(e,t)},_e.prototype.interfaces_=function(){return[C]},_e.prototype.getClass=function(){return _e};var xe=function(){};xe.prototype.compare=function(e,t){var n=e,r=t;if(n.length<r.length)return-1;if(n.length>r.length)return 1;if(0===n.length)return 0;var i=Qe.compare(n,r);return Qe.isEqualReversed(n,r)?0:i},xe.prototype.OLDcompare=function(e,t){var n=e,r=t;if(n.length<r.length)return-1;if(n.length>r.length)return 1;if(0===n.length)return 0;for(var i=Qe.increasingDirection(n),a=Qe.increasingDirection(r),o=i>0?0:n.length-1,s=a>0?0:n.length-1,u=0;u<n.length;u++){var A=n[o].compareTo(r[s]);if(0!==A)return A;o+=i,s+=a}return 0},xe.prototype.interfaces_=function(){return[C]},xe.prototype.getClass=function(){return xe};var Se=function(){};Se.prototype.get=function(){},Se.prototype.put=function(){},Se.prototype.size=function(){},Se.prototype.values=function(){},Se.prototype.entrySet=function(){};var Oe=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Se);(i.prototype=new Error).name="OperationNotSupported",(a.prototype=new Ie).contains=function(){};var De=function(e){function t(){e.call(this),this.array_=[],arguments[0]instanceof Ie&&this.addAll(arguments[0])}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.contains=function(e){for(var t=0,n=this.array_.length;t<n;t++)if(this.array_[t]===e)return!0;return!1},t.prototype.add=function(e){return!this.contains(e)&&(this.array_.push(e),!0)},t.prototype.addAll=function(e){for(var t=e.iterator();t.hasNext();)this.add(t.next());return!0},t.prototype.remove=function(e){throw new Error},t.prototype.size=function(){return this.array_.length},t.prototype.isEmpty=function(){return 0===this.array_.length},t.prototype.toArray=function(){for(var e=[],t=0,n=this.array_.length;t<n;t++)e.push(this.array_[t]);return e},t.prototype.iterator=function(){return new Re(this)},t}(a),Re=function(e){function t(t){e.call(this),this.hashSet_=t,this.position_=0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new r;return this.hashSet_.array_[this.position_++]},t.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},t.prototype.remove=function(){throw new i},t}(be),je=0;(l.prototype=new Oe).get=function(e){for(var t=this.root_;null!==t;){var n=e.compareTo(t.key);if(n<0)t=t.left;else{if(!(n>0))return t.value;t=t.right}}return null},l.prototype.put=function(e,t){if(null===this.root_)return this.root_={key:e,value:t,left:null,right:null,parent:null,color:je,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,r,i=this.root_;do{if(n=i,(r=e.compareTo(i.key))<0)i=i.left;else{if(!(r>0)){var a=i.value;return i.value=t,a}i=i.right}}while(null!==i);var o={key:e,left:null,right:null,value:t,parent:n,color:je,getValue:function(){return this.value},getKey:function(){return this.key}};return r<0?n.left=o:n.right=o,this.fixAfterInsertion(o),this.size_++,null},l.prototype.fixAfterInsertion=function(e){for(e.color=1;null!=e&&e!==this.root_&&1===e.parent.color;)if(s(e)===A(s(s(e)))){var t=c(s(s(e)));1===o(t)?(u(s(e),je),u(t,je),u(s(s(e)),1),e=s(s(e))):(e===c(s(e))&&(e=s(e),this.rotateLeft(e)),u(s(e),je),u(s(s(e)),1),this.rotateRight(s(s(e))))}else{var n=A(s(s(e)));1===o(n)?(u(s(e),je),u(n,je),u(s(s(e)),1),e=s(s(e))):(e===A(s(e))&&(e=s(e),this.rotateRight(e)),u(s(e),je),u(s(s(e)),1),this.rotateLeft(s(s(e))))}this.root_.color=je},l.prototype.values=function(){var e=new Ce,t=this.getFirstEntry();if(null!==t)for(e.add(t.value);null!==(t=l.successor(t));)e.add(t.value);return e},l.prototype.entrySet=function(){var e=new De,t=this.getFirstEntry();if(null!==t)for(e.add(t);null!==(t=l.successor(t));)e.add(t);return e},l.prototype.rotateLeft=function(e){if(null!=e){var t=e.right;e.right=t.left,null!=t.left&&(t.left.parent=e),t.parent=e.parent,null===e.parent?this.root_=t:e.parent.left===e?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t}},l.prototype.rotateRight=function(e){if(null!=e){var t=e.left;e.left=t.right,null!=t.right&&(t.right.parent=e),t.parent=e.parent,null===e.parent?this.root_=t:e.parent.right===e?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t}},l.prototype.getFirstEntry=function(){var e=this.root_;if(null!=e)for(;null!=e.left;)e=e.left;return e},l.successor=function(e){if(null===e)return null;if(null!==e.right){for(var t=e.right;null!==t.left;)t=t.left;return t}for(var n=e.parent,r=e;null!==n&&r===n.right;)r=n,n=n.parent;return n},l.prototype.size=function(){return this.size_};var Me=function(){};Me.prototype.interfaces_=function(){return[]},Me.prototype.getClass=function(){return Me},f.prototype=new a,(h.prototype=new f).contains=function(e){for(var t=0,n=this.array_.length;t<n;t++)if(0===this.array_[t].compareTo(e))return!0;return!1},h.prototype.add=function(e){if(this.contains(e))return!1;for(var t=0,n=this.array_.length;t<n;t++)if(1===this.array_[t].compareTo(e))return this.array_.splice(t,0,e),!0;return this.array_.push(e),!0},h.prototype.addAll=function(e){for(var t=e.iterator();t.hasNext();)this.add(t.next());return!0},h.prototype.remove=function(e){throw new i},h.prototype.size=function(){return this.array_.length},h.prototype.isEmpty=function(){return 0===this.array_.length},h.prototype.toArray=function(){for(var e=[],t=0,n=this.array_.length;t<n;t++)e.push(this.array_[t]);return e},h.prototype.iterator=function(){return new Ne(this)};var Ne=function(e){this.treeSet_=e,this.position_=0};Ne.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new r;return this.treeSet_.array_[this.position_++]},Ne.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},Ne.prototype.remove=function(){throw new i};var Fe=function(){};Fe.sort=function(){var e,t,n,r,i=arguments[0];if(1===arguments.length)r=function(e,t){return e.compareTo(t)},i.sort(r);else if(2===arguments.length)n=arguments[1],r=function(e,t){return n.compare(e,t)},i.sort(r);else if(3===arguments.length){(t=i.slice(arguments[1],arguments[2])).sort();var a=i.slice(0,arguments[1]).concat(t,i.slice(arguments[2],i.length));for(i.splice(0,i.length),e=0;e<a.length;e++)i.push(a[e])}else if(4===arguments.length)for(t=i.slice(arguments[1],arguments[2]),n=arguments[3],r=function(e,t){return n.compare(e,t)},t.sort(r),a=i.slice(0,arguments[1]).concat(t,i.slice(arguments[2],i.length)),i.splice(0,i.length),e=0;e<a.length;e++)i.push(a[e])},Fe.asList=function(e){for(var t=new Ce,n=0,r=e.length;n<r;n++)t.add(e[n]);return t};var Te=function(){},Le={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};Le.P.get=function(){return 0},Le.L.get=function(){return 1},Le.A.get=function(){return 2},Le.FALSE.get=function(){return-1},Le.TRUE.get=function(){return-2},Le.DONTCARE.get=function(){return-3},Le.SYM_FALSE.get=function(){return"F"},Le.SYM_TRUE.get=function(){return"T"},Le.SYM_DONTCARE.get=function(){return"*"},Le.SYM_P.get=function(){return"0"},Le.SYM_L.get=function(){return"1"},Le.SYM_A.get=function(){return"2"},Te.prototype.interfaces_=function(){return[]},Te.prototype.getClass=function(){return Te},Te.toDimensionSymbol=function(e){switch(e){case Te.FALSE:return Te.SYM_FALSE;case Te.TRUE:return Te.SYM_TRUE;case Te.DONTCARE:return Te.SYM_DONTCARE;case Te.P:return Te.SYM_P;case Te.L:return Te.SYM_L;case Te.A:return Te.SYM_A}throw new y("Unknown dimension value: "+e)},Te.toDimensionValue=function(e){switch(M.toUpperCase(e)){case Te.SYM_FALSE:return Te.FALSE;case Te.SYM_TRUE:return Te.TRUE;case Te.SYM_DONTCARE:return Te.DONTCARE;case Te.SYM_P:return Te.P;case Te.SYM_L:return Te.L;case Te.SYM_A:return Te.A}throw new y("Unknown dimension symbol: "+e)},Object.defineProperties(Te,Le);var Pe=function(){};Pe.prototype.filter=function(e){},Pe.prototype.interfaces_=function(){return[]},Pe.prototype.getClass=function(){return Pe};var Ue=function(){};Ue.prototype.filter=function(e,t){},Ue.prototype.isDone=function(){},Ue.prototype.isGeometryChanged=function(){},Ue.prototype.interfaces_=function(){return[]},Ue.prototype.getClass=function(){return Ue};var Ge=function(e){function t(t,n){if(e.call(this,n),this._geometries=t||[],e.hasNullElements(this._geometries))throw new y("geometries must not contain null elements")}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var n={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){for(var e=new J,t=0;t<this._geometries.length;t++)e.expandToInclude(this._geometries[t].getEnvelopeInternal());return e},t.prototype.getGeometryN=function(e){return this._geometries[e]},t.prototype.getSortIndex=function(){return e.SORTINDEX_GEOMETRYCOLLECTION},t.prototype.getCoordinates=function(){for(var e=new Array(this.getNumPoints()).fill(null),t=-1,n=0;n<this._geometries.length;n++)for(var r=this._geometries[n].getCoordinates(),i=0;i<r.length;i++)e[++t]=r[i];return e},t.prototype.getArea=function(){for(var e=0,t=0;t<this._geometries.length;t++)e+=this._geometries[t].getArea();return e},t.prototype.equalsExact=function(){if(2===arguments.length){var t=arguments[0],n=arguments[1];if(!this.isEquivalentClass(t))return!1;var r=t;if(this._geometries.length!==r._geometries.length)return!1;for(var i=0;i<this._geometries.length;i++)if(!this._geometries[i].equalsExact(r._geometries[i],n))return!1;return!0}return e.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var e=0;e<this._geometries.length;e++)this._geometries[e].normalize();Fe.sort(this._geometries)},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},t.prototype.getBoundaryDimension=function(){for(var e=Te.FALSE,t=0;t<this._geometries.length;t++)e=Math.max(e,this._geometries[t].getBoundaryDimension());return e},t.prototype.getDimension=function(){for(var e=Te.FALSE,t=0;t<this._geometries.length;t++)e=Math.max(e,this._geometries[t].getDimension());return e},t.prototype.getLength=function(){for(var e=0,t=0;t<this._geometries.length;t++)e+=this._geometries[t].getLength();return e},t.prototype.getNumPoints=function(){for(var e=0,t=0;t<this._geometries.length;t++)e+=this._geometries[t].getNumPoints();return e},t.prototype.getNumGeometries=function(){return this._geometries.length},t.prototype.reverse=function(){for(var e=this._geometries.length,t=new Array(e).fill(null),n=0;n<this._geometries.length;n++)t[n]=this._geometries[n].reverse();return this.getFactory().createGeometryCollection(t)},t.prototype.compareToSameClass=function(){if(1===arguments.length){var e=arguments[0],t=new h(Fe.asList(this._geometries)),n=new h(Fe.asList(e._geometries));return this.compare(t,n)}if(2===arguments.length){for(var r=arguments[0],i=arguments[1],a=r,o=this.getNumGeometries(),s=a.getNumGeometries(),u=0;u<o&&u<s;){var A=this.getGeometryN(u),c=a.getGeometryN(u),l=A.compareToSameClass(c,i);if(0!==l)return l;u++}return u<o?1:u<s?-1:0}},t.prototype.apply=function(){if(S(arguments[0],he))for(var e=arguments[0],t=0;t<this._geometries.length;t++)this._geometries[t].apply(e);else if(S(arguments[0],Ue)){var n=arguments[0];if(0===this._geometries.length)return null;for(var r=0;r<this._geometries.length&&(this._geometries[r].apply(n),!n.isDone());r++);n.isGeometryChanged()&&this.geometryChanged()}else if(S(arguments[0],Pe)){var i=arguments[0];i.filter(this);for(var a=0;a<this._geometries.length;a++)this._geometries[a].apply(i)}else if(S(arguments[0],Ae)){var o=arguments[0];o.filter(this);for(var s=0;s<this._geometries.length;s++)this._geometries[s].apply(o)}},t.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),te.shouldNeverReachHere(),null},t.prototype.clone=function(){var t=e.prototype.clone.call(this);t._geometries=new Array(this._geometries.length).fill(null);for(var n=0;n<this._geometries.length;n++)t._geometries[n]=this._geometries[n].clone();return t},t.prototype.getGeometryType=function(){return"GeometryCollection"},t.prototype.copy=function(){for(var e=new Array(this._geometries.length).fill(null),n=0;n<e.length;n++)e[n]=this._geometries[n].copy();return new t(e,this._factory)},t.prototype.isEmpty=function(){for(var e=0;e<this._geometries.length;e++)if(!this._geometries[e].isEmpty())return!1;return!0},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},n.serialVersionUID.get=function(){return-0x4f07bcb1f857d800},Object.defineProperties(t,n),t}(ce),qe=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var n={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return ce.SORTINDEX_MULTILINESTRING},t.prototype.equalsExact=function(){if(2===arguments.length){var t=arguments[0],n=arguments[1];return!!this.isEquivalentClass(t)&&e.prototype.equalsExact.call(this,t,n)}return e.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?Te.FALSE:0},t.prototype.isClosed=function(){if(this.isEmpty())return!1;for(var e=0;e<this._geometries.length;e++)if(!this._geometries[e].isClosed())return!1;return!0},t.prototype.getDimension=function(){return 1},t.prototype.reverse=function(){for(var e=this._geometries.length,t=new Array(e).fill(null),n=0;n<this._geometries.length;n++)t[e-1-n]=this._geometries[n].reverse();return this.getFactory().createMultiLineString(t)},t.prototype.getBoundary=function(){return new He(this).getBoundary()},t.prototype.getGeometryType=function(){return"MultiLineString"},t.prototype.copy=function(){for(var e=new Array(this._geometries.length).fill(null),n=0;n<e.length;n++)e[n]=this._geometries[n].copy();return new t(e,this._factory)},t.prototype.interfaces_=function(){return[Me]},t.prototype.getClass=function(){return t},n.serialVersionUID.get=function(){return 0x7155d2ab4afa8000},Object.defineProperties(t,n),t}(Ge),He=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,1===arguments.length){var e=arguments[0],t=ge.MOD2_BOUNDARY_RULE;this._geom=e,this._geomFact=e.getFactory(),this._bnRule=t}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this._geom=n,this._geomFact=n.getFactory(),this._bnRule=r}};He.prototype.boundaryMultiLineString=function(e){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var t=this.computeBoundaryCoordinates(e);return 1===t.length?this._geomFact.createPoint(t[0]):this._geomFact.createMultiPointFromCoords(t)},He.prototype.getBoundary=function(){return this._geom instanceof We?this.boundaryLineString(this._geom):this._geom instanceof qe?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},He.prototype.boundaryLineString=function(e){return this._geom.isEmpty()?this.getEmptyMultiPoint():e.isClosed()?this._bnRule.isInBoundary(2)?e.getStartPoint():this._geomFact.createMultiPoint():this._geomFact.createMultiPoint([e.getStartPoint(),e.getEndPoint()])},He.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},He.prototype.computeBoundaryCoordinates=function(e){var t=new Ce;this._endpointMap=new l;for(var n=0;n<e.getNumGeometries();n++){var r=e.getGeometryN(n);0!==r.getNumPoints()&&(this.addEndpoint(r.getCoordinateN(0)),this.addEndpoint(r.getCoordinateN(r.getNumPoints()-1)))}for(var i=this._endpointMap.entrySet().iterator();i.hasNext();){var a=i.next(),o=a.getValue().count;this._bnRule.isInBoundary(o)&&t.add(a.getKey())}return Qe.toCoordinateArray(t)},He.prototype.addEndpoint=function(e){var t=this._endpointMap.get(e);null===t&&(t=new Ye,this._endpointMap.put(e,t)),t.count++},He.prototype.interfaces_=function(){return[]},He.prototype.getClass=function(){return He},He.getBoundary=function(){if(1===arguments.length){var e=arguments[0];return new He(e).getBoundary()}if(2===arguments.length){var t=arguments[0],n=arguments[1];return new He(t,n).getBoundary()}};var Ye=function(){this.count=null};Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye};var Je=function(){},ze={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};Je.prototype.interfaces_=function(){return[]},Je.prototype.getClass=function(){return Je},Je.chars=function(e,t){for(var n=new Array(t).fill(null),r=0;r<t;r++)n[r]=e;return String(n)},Je.getStackTrace=function(){if(1===arguments.length){var e=arguments[0],t=new function(){},n=new function(){}(t);return e.printStackTrace(n),t.toString()}if(2===arguments.length){for(var r=arguments[0],i=arguments[1],a="",o=new function(){}(new function(){}(Je.getStackTrace(r))),s=0;s<i;s++)try{a+=o.readLine()+Je.NEWLINE}catch(e){if(!(e instanceof g))throw e;te.shouldNeverReachHere()}return a}},Je.split=function(e,t){for(var n=t.length,r=new Ce,i=""+e,a=i.indexOf(t);a>=0;){var o=i.substring(0,a);r.add(o),a=(i=i.substring(a+n)).indexOf(t)}i.length>0&&r.add(i);for(var s=new Array(r.size()).fill(null),u=0;u<s.length;u++)s[u]=r.get(u);return s},Je.toString=function(){if(1===arguments.length){var e=arguments[0];return Je.SIMPLE_ORDINATE_FORMAT.format(e)}},Je.spaces=function(e){return Je.chars(" ",e)},ze.NEWLINE.get=function(){return H.getProperty("line.separator")},ze.SIMPLE_ORDINATE_FORMAT.get=function(){return new function(){}("0.#")},Object.defineProperties(Je,ze);var Ke=function(){};Ke.prototype.interfaces_=function(){return[]},Ke.prototype.getClass=function(){return Ke},Ke.copyCoord=function(e,t,n,r){for(var i=Math.min(e.getDimension(),n.getDimension()),a=0;a<i;a++)n.setOrdinate(r,a,e.getOrdinate(t,a))},Ke.isRing=function(e){var t=e.size();return 0===t||!(t<=3)&&e.getOrdinate(0,P.X)===e.getOrdinate(t-1,P.X)&&e.getOrdinate(0,P.Y)===e.getOrdinate(t-1,P.Y)},Ke.isEqual=function(e,t){var n=e.size();if(n!==t.size())return!1;for(var r=Math.min(e.getDimension(),t.getDimension()),i=0;i<n;i++)for(var a=0;a<r;a++){var o=e.getOrdinate(i,a),s=t.getOrdinate(i,a);if(e.getOrdinate(i,a)!==t.getOrdinate(i,a)&&(!m.isNaN(o)||!m.isNaN(s)))return!1}return!0},Ke.extend=function(e,t,n){var r=e.create(n,t.getDimension()),i=t.size();if(Ke.copy(t,0,r,0,i),i>0)for(var a=i;a<n;a++)Ke.copy(t,i-1,r,a,1);return r},Ke.reverse=function(e){for(var t=e.size()-1,n=Math.trunc(t/2),r=0;r<=n;r++)Ke.swap(e,r,t-r)},Ke.swap=function(e,t,n){if(t===n)return null;for(var r=0;r<e.getDimension();r++){var i=e.getOrdinate(t,r);e.setOrdinate(t,r,e.getOrdinate(n,r)),e.setOrdinate(n,r,i)}},Ke.copy=function(e,t,n,r,i){for(var a=0;a<i;a++)Ke.copyCoord(e,t+a,n,r+a)},Ke.toString=function(){if(1===arguments.length){var e=arguments[0],t=e.size();if(0===t)return"()";var n=e.getDimension(),r=new R;r.append("(");for(var i=0;i<t;i++){i>0&&r.append(" ");for(var a=0;a<n;a++)a>0&&r.append(","),r.append(Je.toString(e.getOrdinate(i,a)))}return r.append(")"),r.toString()}},Ke.ensureValidRing=function(e,t){var n=t.size();return 0===n?t:n<=3?Ke.createClosedRing(e,t,4):t.getOrdinate(0,P.X)===t.getOrdinate(n-1,P.X)&&t.getOrdinate(0,P.Y)===t.getOrdinate(n-1,P.Y)?t:Ke.createClosedRing(e,t,n+1)},Ke.createClosedRing=function(e,t,n){var r=e.create(n,t.getDimension()),i=t.size();Ke.copy(t,0,r,0,i);for(var a=i;a<n;a++)Ke.copy(t,0,r,a,1);return r};var We=function(e){function t(t,n){e.call(this,n),this._points=null,this.init(t)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var n={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new J:this._points.expandEnvelope(new J)},t.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},t.prototype.getSortIndex=function(){return e.SORTINDEX_LINESTRING},t.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},t.prototype.equalsExact=function(){if(2===arguments.length){var t=arguments[0],n=arguments[1];if(!this.isEquivalentClass(t))return!1;var r=t;if(this._points.size()!==r._points.size())return!1;for(var i=0;i<this._points.size();i++)if(!this.equal(this._points.getCoordinate(i),r._points.getCoordinate(i),n))return!1;return!0}return e.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var e=0;e<Math.trunc(this._points.size()/2);e++){var t=this._points.size()-1-e;if(!this._points.getCoordinate(e).equals(this._points.getCoordinate(t)))return this._points.getCoordinate(e).compareTo(this._points.getCoordinate(t))>0&&Ke.reverse(this._points),null}},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?Te.FALSE:0},t.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},t.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},t.prototype.getDimension=function(){return 1},t.prototype.getLength=function(){return se.computeLength(this._points)},t.prototype.getNumPoints=function(){return this._points.size()},t.prototype.reverse=function(){var e=this._points.copy();return Ke.reverse(e),this.getFactory().createLineString(e)},t.prototype.compareToSameClass=function(){if(1===arguments.length){for(var e=arguments[0],t=0,n=0;t<this._points.size()&&n<e._points.size();){var r=this._points.getCoordinate(t).compareTo(e._points.getCoordinate(n));if(0!==r)return r;t++,n++}return t<this._points.size()?1:n<e._points.size()?-1:0}if(2===arguments.length){var i=arguments[0];return arguments[1].compare(this._points,i._points)}},t.prototype.apply=function(){if(S(arguments[0],he))for(var e=arguments[0],t=0;t<this._points.size();t++)e.filter(this._points.getCoordinate(t));else if(S(arguments[0],Ue)){var n=arguments[0];if(0===this._points.size())return null;for(var r=0;r<this._points.size()&&(n.filter(this._points,r),!n.isDone());r++);n.isGeometryChanged()&&this.geometryChanged()}else(S(arguments[0],Pe)||S(arguments[0],Ae))&&arguments[0].filter(this)},t.prototype.getBoundary=function(){return new He(this).getBoundary()},t.prototype.isEquivalentClass=function(e){return e instanceof t},t.prototype.clone=function(){var t=e.prototype.clone.call(this);return t._points=this._points.clone(),t},t.prototype.getCoordinateN=function(e){return this._points.getCoordinate(e)},t.prototype.getGeometryType=function(){return"LineString"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._points},t.prototype.isEmpty=function(){return 0===this._points.size()},t.prototype.init=function(e){if(null===e&&(e=this.getFactory().getCoordinateSequenceFactory().create([])),1===e.size())throw new y("Invalid number of points in LineString (found "+e.size()+" - must be 0 or >= 2)");this._points=e},t.prototype.isCoordinate=function(e){for(var t=0;t<this._points.size();t++)if(this._points.getCoordinate(t).equals(e))return!0;return!1},t.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},t.prototype.getPointN=function(e){return this.getFactory().createPoint(this._points.getCoordinate(e))},t.prototype.interfaces_=function(){return[Me]},t.prototype.getClass=function(){return t},n.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(t,n),t}(ce),Ve=function(){};Ve.prototype.interfaces_=function(){return[]},Ve.prototype.getClass=function(){return Ve};var Xe=function(e){function t(t,n){e.call(this,n),this._coordinates=t||null,this.init(this._coordinates)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var n={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new J;var e=new J;return e.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),e},t.prototype.getSortIndex=function(){return e.SORTINDEX_POINT},t.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},t.prototype.equalsExact=function(){if(2===arguments.length){var t=arguments[0],n=arguments[1];return!!this.isEquivalentClass(t)&&(!(!this.isEmpty()||!t.isEmpty())||this.isEmpty()===t.isEmpty()&&this.equal(t.getCoordinate(),this.getCoordinate(),n))}return e.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){},t.prototype.getCoordinate=function(){return 0!==this._coordinates.size()?this._coordinates.getCoordinate(0):null},t.prototype.getBoundaryDimension=function(){return Te.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getNumPoints=function(){return this.isEmpty()?0:1},t.prototype.reverse=function(){return this.copy()},t.prototype.getX=function(){if(null===this.getCoordinate())throw new Error("getX called on empty Point");return this.getCoordinate().x},t.prototype.compareToSameClass=function(){if(1===arguments.length){var e=arguments[0];return this.getCoordinate().compareTo(e.getCoordinate())}if(2===arguments.length){var t=arguments[0];return arguments[1].compare(this._coordinates,t._coordinates)}},t.prototype.apply=function(){if(S(arguments[0],he)){var e=arguments[0];if(this.isEmpty())return null;e.filter(this.getCoordinate())}else if(S(arguments[0],Ue)){var t=arguments[0];if(this.isEmpty())return null;t.filter(this._coordinates,0),t.isGeometryChanged()&&this.geometryChanged()}else(S(arguments[0],Pe)||S(arguments[0],Ae))&&arguments[0].filter(this)},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.clone=function(){var t=e.prototype.clone.call(this);return t._coordinates=this._coordinates.clone(),t},t.prototype.getGeometryType=function(){return"Point"},t.prototype.copy=function(){return new t(this._coordinates.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._coordinates},t.prototype.getY=function(){if(null===this.getCoordinate())throw new Error("getY called on empty Point");return this.getCoordinate().y},t.prototype.isEmpty=function(){return 0===this._coordinates.size()},t.prototype.init=function(e){null===e&&(e=this.getFactory().getCoordinateSequenceFactory().create([])),te.isTrue(e.size()<=1),this._coordinates=e},t.prototype.isSimple=function(){return!0},t.prototype.interfaces_=function(){return[Ve]},t.prototype.getClass=function(){return t},n.serialVersionUID.get=function(){return 0x44077bad161cbc00},Object.defineProperties(t,n),t}(ce),Ze=function(){};Ze.prototype.interfaces_=function(){return[]},Ze.prototype.getClass=function(){return Ze};var $e=function(e){function t(t,n,r){if(e.call(this,r),this._shell=null,this._holes=null,null===t&&(t=this.getFactory().createLinearRing()),null===n&&(n=[]),e.hasNullElements(n))throw new y("holes must not contain null elements");if(t.isEmpty()&&e.hasNonEmptyElements(n))throw new y("shell is empty but holes are not");this._shell=t,this._holes=n}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var n={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},t.prototype.getSortIndex=function(){return e.SORTINDEX_POLYGON},t.prototype.getCoordinates=function(){if(this.isEmpty())return[];for(var e=new Array(this.getNumPoints()).fill(null),t=-1,n=this._shell.getCoordinates(),r=0;r<n.length;r++)e[++t]=n[r];for(var i=0;i<this._holes.length;i++)for(var a=this._holes[i].getCoordinates(),o=0;o<a.length;o++)e[++t]=a[o];return e},t.prototype.getArea=function(){var e=0;e+=Math.abs(se.signedArea(this._shell.getCoordinateSequence()));for(var t=0;t<this._holes.length;t++)e-=Math.abs(se.signedArea(this._holes[t].getCoordinateSequence()));return e},t.prototype.isRectangle=function(){if(0!==this.getNumInteriorRing())return!1;if(null===this._shell)return!1;if(5!==this._shell.getNumPoints())return!1;for(var e=this._shell.getCoordinateSequence(),t=this.getEnvelopeInternal(),n=0;n<5;n++){var r=e.getX(n);if(r!==t.getMinX()&&r!==t.getMaxX())return!1;var i=e.getY(n);if(i!==t.getMinY()&&i!==t.getMaxY())return!1}for(var a=e.getX(0),o=e.getY(0),s=1;s<=4;s++){var u=e.getX(s),A=e.getY(s);if(u!==a===(A!==o))return!1;a=u,o=A}return!0},t.prototype.equalsExact=function(){if(2===arguments.length){var t=arguments[0],n=arguments[1];if(!this.isEquivalentClass(t))return!1;var r=t,i=this._shell,a=r._shell;if(!i.equalsExact(a,n))return!1;if(this._holes.length!==r._holes.length)return!1;for(var o=0;o<this._holes.length;o++)if(!this._holes[o].equalsExact(r._holes[o],n))return!1;return!0}return e.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){if(0===arguments.length){this.normalize(this._shell,!0);for(var e=0;e<this._holes.length;e++)this.normalize(this._holes[e],!1);Fe.sort(this._holes)}else if(2===arguments.length){var t=arguments[0],n=arguments[1];if(t.isEmpty())return null;var r=new Array(t.getCoordinates().length-1).fill(null);H.arraycopy(t.getCoordinates(),0,r,0,r.length);var i=Qe.minCoordinate(t.getCoordinates());Qe.scroll(r,i),H.arraycopy(r,0,t.getCoordinates(),0,r.length),t.getCoordinates()[r.length]=r[0],se.isCCW(t.getCoordinates())===n&&Qe.reverse(t.getCoordinates())}},t.prototype.getCoordinate=function(){return this._shell.getCoordinate()},t.prototype.getNumInteriorRing=function(){return this._holes.length},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.getLength=function(){var e=0;e+=this._shell.getLength();for(var t=0;t<this._holes.length;t++)e+=this._holes[t].getLength();return e},t.prototype.getNumPoints=function(){for(var e=this._shell.getNumPoints(),t=0;t<this._holes.length;t++)e+=this._holes[t].getNumPoints();return e},t.prototype.reverse=function(){var e=this.copy();e._shell=this._shell.copy().reverse(),e._holes=new Array(this._holes.length).fill(null);for(var t=0;t<this._holes.length;t++)e._holes[t]=this._holes[t].copy().reverse();return e},t.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},t.prototype.compareToSameClass=function(){if(1===arguments.length){var e=arguments[0],t=this._shell,n=e._shell;return t.compareToSameClass(n)}if(2===arguments.length){var r=arguments[0],i=arguments[1],a=r,o=this._shell,s=a._shell,u=o.compareToSameClass(s,i);if(0!==u)return u;for(var A=this.getNumInteriorRing(),c=a.getNumInteriorRing(),l=0;l<A&&l<c;){var f=this.getInteriorRingN(l),h=a.getInteriorRingN(l),g=f.compareToSameClass(h,i);if(0!==g)return g;l++}return l<A?1:l<c?-1:0}},t.prototype.apply=function(e){if(S(e,he)){this._shell.apply(e);for(var t=0;t<this._holes.length;t++)this._holes[t].apply(e)}else if(S(e,Ue)){if(this._shell.apply(e),!e.isDone())for(var n=0;n<this._holes.length&&(this._holes[n].apply(e),!e.isDone());n++);e.isGeometryChanged()&&this.geometryChanged()}else if(S(e,Pe))e.filter(this);else if(S(e,Ae)){e.filter(this),this._shell.apply(e);for(var r=0;r<this._holes.length;r++)this._holes[r].apply(e)}},t.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();var e=new Array(this._holes.length+1).fill(null);e[0]=this._shell;for(var t=0;t<this._holes.length;t++)e[t+1]=this._holes[t];return e.length<=1?this.getFactory().createLinearRing(e[0].getCoordinateSequence()):this.getFactory().createMultiLineString(e)},t.prototype.clone=function(){var t=e.prototype.clone.call(this);t._shell=this._shell.clone(),t._holes=new Array(this._holes.length).fill(null);for(var n=0;n<this._holes.length;n++)t._holes[n]=this._holes[n].clone();return t},t.prototype.getGeometryType=function(){return"Polygon"},t.prototype.copy=function(){for(var e=this._shell.copy(),n=new Array(this._holes.length).fill(null),r=0;r<n.length;r++)n[r]=this._holes[r].copy();return new t(e,n,this._factory)},t.prototype.getExteriorRing=function(){return this._shell},t.prototype.isEmpty=function(){return this._shell.isEmpty()},t.prototype.getInteriorRingN=function(e){return this._holes[e]},t.prototype.interfaces_=function(){return[Ze]},t.prototype.getClass=function(){return t},n.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(t,n),t}(ce),et=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var n={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return ce.SORTINDEX_MULTIPOINT},t.prototype.isValid=function(){return!0},t.prototype.equalsExact=function(){if(2===arguments.length){var t=arguments[0],n=arguments[1];return!!this.isEquivalentClass(t)&&e.prototype.equalsExact.call(this,t,n)}return e.prototype.equalsExact.apply(this,arguments)},t.prototype.getCoordinate=function(){if(1===arguments.length){var t=arguments[0];return this._geometries[t].getCoordinate()}return e.prototype.getCoordinate.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return Te.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.getGeometryType=function(){return"MultiPoint"},t.prototype.copy=function(){for(var e=new Array(this._geometries.length).fill(null),n=0;n<e.length;n++)e[n]=this._geometries[n].copy();return new t(e,this._factory)},t.prototype.interfaces_=function(){return[Ve]},t.prototype.getClass=function(){return t},n.serialVersionUID.get=function(){return-0x6fb1ed4162e0fc00},Object.defineProperties(t,n),t}(Ge),tt=function(e){function t(t,n){t instanceof B&&n instanceof vt&&(t=n.getCoordinateSequenceFactory().create(t)),e.call(this,t,n),this.validateConstruction()}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var n={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return ce.SORTINDEX_LINEARRING},t.prototype.getBoundaryDimension=function(){return Te.FALSE},t.prototype.isClosed=function(){return!!this.isEmpty()||e.prototype.isClosed.call(this)},t.prototype.reverse=function(){var e=this._points.copy();return Ke.reverse(e),this.getFactory().createLinearRing(e)},t.prototype.validateConstruction=function(){if(!this.isEmpty()&&!e.prototype.isClosed.call(this))throw new y("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<t.MINIMUM_VALID_SIZE)throw new y("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},t.prototype.getGeometryType=function(){return"LinearRing"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(t,n),t}(We),nt=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var n={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return ce.SORTINDEX_MULTIPOLYGON},t.prototype.equalsExact=function(){if(2===arguments.length){var t=arguments[0],n=arguments[1];return!!this.isEquivalentClass(t)&&e.prototype.equalsExact.call(this,t,n)}return e.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.reverse=function(){for(var e=this._geometries.length,t=new Array(e).fill(null),n=0;n<this._geometries.length;n++)t[n]=this._geometries[n].reverse();return this.getFactory().createMultiPolygon(t)},t.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();for(var e=new Ce,t=0;t<this._geometries.length;t++)for(var n=this._geometries[t].getBoundary(),r=0;r<n.getNumGeometries();r++)e.add(n.getGeometryN(r));var i=new Array(e.size()).fill(null);return this.getFactory().createMultiLineString(e.toArray(i))},t.prototype.getGeometryType=function(){return"MultiPolygon"},t.prototype.copy=function(){for(var e=new Array(this._geometries.length).fill(null),n=0;n<e.length;n++)e[n]=this._geometries[n].copy();return new t(e,this._factory)},t.prototype.interfaces_=function(){return[Ze]},t.prototype.getClass=function(){return t},n.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(t,n),t}(Ge),rt=function(e){this._factory=e||null,this._isUserDataCopied=!1},it={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};rt.prototype.setCopyUserData=function(e){this._isUserDataCopied=e},rt.prototype.edit=function(e,t){if(null===e)return null;var n=this.editInternal(e,t);return this._isUserDataCopied&&n.setUserData(e.getUserData()),n},rt.prototype.editInternal=function(e,t){return null===this._factory&&(this._factory=e.getFactory()),e instanceof Ge?this.editGeometryCollection(e,t):e instanceof $e?this.editPolygon(e,t):e instanceof Xe||e instanceof We?t.edit(e,this._factory):(te.shouldNeverReachHere("Unsupported Geometry class: "+e.getClass().getName()),null)},rt.prototype.editGeometryCollection=function(e,t){for(var n=t.edit(e,this._factory),r=new Ce,i=0;i<n.getNumGeometries();i++){var a=this.edit(n.getGeometryN(i),t);null===a||a.isEmpty()||r.add(a)}return n.getClass()===et?this._factory.createMultiPoint(r.toArray([])):n.getClass()===qe?this._factory.createMultiLineString(r.toArray([])):n.getClass()===nt?this._factory.createMultiPolygon(r.toArray([])):this._factory.createGeometryCollection(r.toArray([]))},rt.prototype.editPolygon=function(e,t){var n=t.edit(e,this._factory);if(null===n&&(n=this._factory.createPolygon(null)),n.isEmpty())return n;var r=this.edit(n.getExteriorRing(),t);if(null===r||r.isEmpty())return this._factory.createPolygon();for(var i=new Ce,a=0;a<n.getNumInteriorRing();a++){var o=this.edit(n.getInteriorRingN(a),t);null===o||o.isEmpty()||i.add(o)}return this._factory.createPolygon(r,i.toArray([]))},rt.prototype.interfaces_=function(){return[]},rt.prototype.getClass=function(){return rt},rt.GeometryEditorOperation=function(){},it.NoOpGeometryOperation.get=function(){return at},it.CoordinateOperation.get=function(){return ot},it.CoordinateSequenceOperation.get=function(){return st},Object.defineProperties(rt,it);var at=function(){};at.prototype.edit=function(e,t){return e},at.prototype.interfaces_=function(){return[rt.GeometryEditorOperation]},at.prototype.getClass=function(){return at};var ot=function(){};ot.prototype.edit=function(e,t){var n=this.editCoordinates(e.getCoordinates(),e);return null===n?e:e instanceof tt?t.createLinearRing(n):e instanceof We?t.createLineString(n):e instanceof Xe?n.length>0?t.createPoint(n[0]):t.createPoint():e},ot.prototype.interfaces_=function(){return[rt.GeometryEditorOperation]},ot.prototype.getClass=function(){return ot};var st=function(){};st.prototype.edit=function(e,t){return e instanceof tt?t.createLinearRing(this.edit(e.getCoordinateSequence(),e)):e instanceof We?t.createLineString(this.edit(e.getCoordinateSequence(),e)):e instanceof Xe?t.createPoint(this.edit(e.getCoordinateSequence(),e)):e},st.prototype.interfaces_=function(){return[rt.GeometryEditorOperation]},st.prototype.getClass=function(){return st};var ut=function(){if(this._dimension=3,this._coordinates=null,1===arguments.length){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var t=0;t<e;t++)this._coordinates[t]=new B}else if(S(arguments[0],P)){var n=arguments[0];if(null===n)return this._coordinates=new Array(0).fill(null),null;this._dimension=n.getDimension(),this._coordinates=new Array(n.size()).fill(null);for(var r=0;r<this._coordinates.length;r++)this._coordinates[r]=n.getCoordinateCopy(r)}}else if(2===arguments.length)if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var i=arguments[0],a=arguments[1];this._coordinates=i,this._dimension=a,null===i&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var o=arguments[0],s=arguments[1];this._coordinates=new Array(o).fill(null),this._dimension=s;for(var u=0;u<o;u++)this._coordinates[u]=new B}},At={serialVersionUID:{configurable:!0}};ut.prototype.setOrdinate=function(e,t,n){switch(t){case P.X:this._coordinates[e].x=n;break;case P.Y:this._coordinates[e].y=n;break;case P.Z:this._coordinates[e].z=n;break;default:throw new y("invalid ordinateIndex")}},ut.prototype.size=function(){return this._coordinates.length},ut.prototype.getOrdinate=function(e,t){switch(t){case P.X:return this._coordinates[e].x;case P.Y:return this._coordinates[e].y;case P.Z:return this._coordinates[e].z}return m.NaN},ut.prototype.getCoordinate=function(){if(1===arguments.length){var e=arguments[0];return this._coordinates[e]}if(2===arguments.length){var t=arguments[0],n=arguments[1];n.x=this._coordinates[t].x,n.y=this._coordinates[t].y,n.z=this._coordinates[t].z}},ut.prototype.getCoordinateCopy=function(e){return new B(this._coordinates[e])},ut.prototype.getDimension=function(){return this._dimension},ut.prototype.getX=function(e){return this._coordinates[e].x},ut.prototype.clone=function(){for(var e=new Array(this.size()).fill(null),t=0;t<this._coordinates.length;t++)e[t]=this._coordinates[t].clone();return new ut(e,this._dimension)},ut.prototype.expandEnvelope=function(e){for(var t=0;t<this._coordinates.length;t++)e.expandToInclude(this._coordinates[t]);return e},ut.prototype.copy=function(){for(var e=new Array(this.size()).fill(null),t=0;t<this._coordinates.length;t++)e[t]=this._coordinates[t].copy();return new ut(e,this._dimension)},ut.prototype.toString=function(){if(this._coordinates.length>0){var e=new R(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(var t=1;t<this._coordinates.length;t++)e.append(", "),e.append(this._coordinates[t]);return e.append(")"),e.toString()}return"()"},ut.prototype.getY=function(e){return this._coordinates[e].y},ut.prototype.toCoordinateArray=function(){return this._coordinates},ut.prototype.interfaces_=function(){return[P,t]},ut.prototype.getClass=function(){return ut},At.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(ut,At);var ct=function(){},lt={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};ct.prototype.readResolve=function(){return ct.instance()},ct.prototype.create=function(){if(1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];return new ut(e)}if(S(arguments[0],P)){var t=arguments[0];return new ut(t)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return r>3&&(r=3),r<2?new ut(n):new ut(n,r)}},ct.prototype.interfaces_=function(){return[k,t]},ct.prototype.getClass=function(){return ct},ct.instance=function(){return ct.instanceObject},lt.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},lt.instanceObject.get=function(){return new ct},Object.defineProperties(ct,lt);var ft=function(e){function t(){e.call(this),this.map_=new Map}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e){return this.map_.get(e)||null},t.prototype.put=function(e,t){return this.map_.set(e,t),t},t.prototype.values=function(){for(var e=new Ce,t=this.map_.values(),n=t.next();!n.done;)e.add(n.value),n=t.next();return e},t.prototype.entrySet=function(){var e=new De;return this.map_.entries().forEach((function(t){return e.add(t)})),e},t.prototype.size=function(){return this.map_.size()},t}(Se),ht=function e(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=e.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof dt){var t=arguments[0];this._modelType=t,t===e.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var n=arguments[0];this._modelType=e.FIXED,this.setScale(n)}else if(arguments[0]instanceof e){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}},gt={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};ht.prototype.equals=function(e){if(!(e instanceof ht))return!1;var t=e;return this._modelType===t._modelType&&this._scale===t._scale},ht.prototype.compareTo=function(e){var t=e,n=this.getMaximumSignificantDigits(),r=t.getMaximumSignificantDigits();return new j(n).compareTo(new j(r))},ht.prototype.getScale=function(){return this._scale},ht.prototype.isFloating=function(){return this._modelType===ht.FLOATING||this._modelType===ht.FLOATING_SINGLE},ht.prototype.getType=function(){return this._modelType},ht.prototype.toString=function(){var e="UNKNOWN";return this._modelType===ht.FLOATING?e="Floating":this._modelType===ht.FLOATING_SINGLE?e="Floating-Single":this._modelType===ht.FIXED&&(e="Fixed (Scale="+this.getScale()+")"),e},ht.prototype.makePrecise=function(){if("number"==typeof arguments[0]){var e=arguments[0];return m.isNaN(e)||this._modelType===ht.FLOATING_SINGLE?e:this._modelType===ht.FIXED?Math.round(e*this._scale)/this._scale:e}if(arguments[0]instanceof B){var t=arguments[0];if(this._modelType===ht.FLOATING)return null;t.x=this.makePrecise(t.x),t.y=this.makePrecise(t.y)}},ht.prototype.getMaximumSignificantDigits=function(){var e=16;return this._modelType===ht.FLOATING?e=16:this._modelType===ht.FLOATING_SINGLE?e=6:this._modelType===ht.FIXED&&(e=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),e},ht.prototype.setScale=function(e){this._scale=Math.abs(e)},ht.prototype.interfaces_=function(){return[t,b]},ht.prototype.getClass=function(){return ht},ht.mostPrecise=function(e,t){return e.compareTo(t)>=0?e:t},gt.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},gt.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(ht,gt);var dt=function e(t){this._name=t||null,e.nameToTypeMap.put(t,this)},pt={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};dt.prototype.readResolve=function(){return dt.nameToTypeMap.get(this._name)},dt.prototype.toString=function(){return this._name},dt.prototype.interfaces_=function(){return[t]},dt.prototype.getClass=function(){return dt},pt.serialVersionUID.get=function(){return-552860263173159e4},pt.nameToTypeMap.get=function(){return new ft},Object.defineProperties(dt,pt),ht.Type=dt,ht.FIXED=new dt("FIXED"),ht.FLOATING=new dt("FLOATING"),ht.FLOATING_SINGLE=new dt("FLOATING SINGLE");var vt=function e(){this._precisionModel=new ht,this._SRID=0,this._coordinateSequenceFactory=e.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?S(arguments[0],k)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof ht&&(this._precisionModel=arguments[0]):2===arguments.length?(this._precisionModel=arguments[0],this._SRID=arguments[1]):3===arguments.length&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},yt={serialVersionUID:{configurable:!0}};vt.prototype.toGeometry=function(e){return e.isNull()?this.createPoint(null):e.getMinX()===e.getMaxX()&&e.getMinY()===e.getMaxY()?this.createPoint(new B(e.getMinX(),e.getMinY())):e.getMinX()===e.getMaxX()||e.getMinY()===e.getMaxY()?this.createLineString([new B(e.getMinX(),e.getMinY()),new B(e.getMaxX(),e.getMaxY())]):this.createPolygon(this.createLinearRing([new B(e.getMinX(),e.getMinY()),new B(e.getMinX(),e.getMaxY()),new B(e.getMaxX(),e.getMaxY()),new B(e.getMaxX(),e.getMinY()),new B(e.getMinX(),e.getMinY())]),null)},vt.prototype.createLineString=function(e){return e?e instanceof Array?new We(this.getCoordinateSequenceFactory().create(e),this):S(e,P)?new We(e,this):void 0:new We(this.getCoordinateSequenceFactory().create([]),this)},vt.prototype.createMultiLineString=function(){if(0===arguments.length)return new qe(null,this);if(1===arguments.length){var e=arguments[0];return new qe(e,this)}},vt.prototype.buildGeometry=function(e){for(var t=null,n=!1,r=!1,i=e.iterator();i.hasNext();){var a=i.next(),o=a.getClass();null===t&&(t=o),o!==t&&(n=!0),a.isGeometryCollectionOrDerived()&&(r=!0)}if(null===t)return this.createGeometryCollection();if(n||r)return this.createGeometryCollection(vt.toGeometryArray(e));var s=e.iterator().next();if(e.size()>1){if(s instanceof $e)return this.createMultiPolygon(vt.toPolygonArray(e));if(s instanceof We)return this.createMultiLineString(vt.toLineStringArray(e));if(s instanceof Xe)return this.createMultiPoint(vt.toPointArray(e));te.shouldNeverReachHere("Unhandled class: "+s.getClass().getName())}return s},vt.prototype.createMultiPointFromCoords=function(e){return this.createMultiPoint(null!==e?this.getCoordinateSequenceFactory().create(e):null)},vt.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof B){var e=arguments[0];return this.createPoint(null!==e?this.getCoordinateSequenceFactory().create([e]):null)}if(S(arguments[0],P)){var t=arguments[0];return new Xe(t,this)}}},vt.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},vt.prototype.createPolygon=function(){if(0===arguments.length)return new $e(null,null,this);if(1===arguments.length){if(S(arguments[0],P)){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof Array){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof tt){var n=arguments[0];return this.createPolygon(n,null)}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];return new $e(r,i,this)}},vt.prototype.getSRID=function(){return this._SRID},vt.prototype.createGeometryCollection=function(){if(0===arguments.length)return new Ge(null,this);if(1===arguments.length){var e=arguments[0];return new Ge(e,this)}},vt.prototype.createGeometry=function(e){return new rt(this).edit(e,{edit:function(){if(2===arguments.length){var e=arguments[0];return this._coordinateSequenceFactory.create(e)}}})},vt.prototype.getPrecisionModel=function(){return this._precisionModel},vt.prototype.createLinearRing=function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];return this.createLinearRing(null!==e?this.getCoordinateSequenceFactory().create(e):null)}if(S(arguments[0],P)){var t=arguments[0];return new tt(t,this)}}},vt.prototype.createMultiPolygon=function(){if(0===arguments.length)return new nt(null,this);if(1===arguments.length){var e=arguments[0];return new nt(e,this)}},vt.prototype.createMultiPoint=function(){if(0===arguments.length)return new et(null,this);if(1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];return new et(e,this)}if(arguments[0]instanceof Array){var t=arguments[0];return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(S(arguments[0],P)){var n=arguments[0];if(null===n)return this.createMultiPoint(new Array(0).fill(null));for(var r=new Array(n.size()).fill(null),i=0;i<n.size();i++){var a=this.getCoordinateSequenceFactory().create(1,n.getDimension());Ke.copy(n,i,a,0,1),r[i]=this.createPoint(a)}return this.createMultiPoint(r)}}},vt.prototype.interfaces_=function(){return[t]},vt.prototype.getClass=function(){return vt},vt.toMultiPolygonArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},vt.toGeometryArray=function(e){if(null===e)return null;var t=new Array(e.size()).fill(null);return e.toArray(t)},vt.getDefaultCoordinateSequenceFactory=function(){return ct.instance()},vt.toMultiLineStringArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},vt.toLineStringArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},vt.toMultiPointArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},vt.toLinearRingArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},vt.toPointArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},vt.toPolygonArray=function(e){var t=new Array(e.size()).fill(null);return e.toArray(t)},vt.createPointFromInternalCoord=function(e,t){return t.getPrecisionModel().makePrecise(e),t.getFactory().createPoint(e)},yt.serialVersionUID.get=function(){return-0x5ea75f2051eeb400},Object.defineProperties(vt,yt);var mt=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],It=function(e){this.geometryFactory=e||new vt};It.prototype.read=function(e){var t,n=(t="string"==typeof e?JSON.parse(e):e).type;if(!bt[n])throw new Error("Unknown GeoJSON type: "+t.type);return-1!==mt.indexOf(n)?bt[n].apply(this,[t.coordinates]):"GeometryCollection"===n?bt[n].apply(this,[t.geometries]):bt[n].apply(this,[t])},It.prototype.write=function(e){var t=e.getGeometryType();if(!Et[t])throw new Error("Geometry is not supported");return Et[t].apply(this,[e])};var bt={Feature:function(e){var t={};for(var n in e)t[n]=e[n];if(e.geometry){var r=e.geometry.type;if(!bt[r])throw new Error("Unknown GeoJSON type: "+e.type);t.geometry=this.read(e.geometry)}return e.bbox&&(t.bbox=bt.bbox.apply(this,[e.bbox])),t},FeatureCollection:function(e){var t={};if(e.features){t.features=[];for(var n=0;n<e.features.length;++n)t.features.push(this.read(e.features[n]))}return e.bbox&&(t.bbox=this.parse.bbox.apply(this,[e.bbox])),t},coordinates:function(e){for(var t=[],n=0;n<e.length;++n){var r=e[n];t.push(new B(r[0],r[1]))}return t},bbox:function(e){return this.geometryFactory.createLinearRing([new B(e[0],e[1]),new B(e[2],e[1]),new B(e[2],e[3]),new B(e[0],e[3]),new B(e[0],e[1])])},Point:function(e){var t=new B(e[0],e[1]);return this.geometryFactory.createPoint(t)},MultiPoint:function(e){for(var t=[],n=0;n<e.length;++n)t.push(bt.Point.apply(this,[e[n]]));return this.geometryFactory.createMultiPoint(t)},LineString:function(e){var t=bt.coordinates.apply(this,[e]);return this.geometryFactory.createLineString(t)},MultiLineString:function(e){for(var t=[],n=0;n<e.length;++n)t.push(bt.LineString.apply(this,[e[n]]));return this.geometryFactory.createMultiLineString(t)},Polygon:function(e){for(var t=bt.coordinates.apply(this,[e[0]]),n=this.geometryFactory.createLinearRing(t),r=[],i=1;i<e.length;++i){var a=e[i],o=bt.coordinates.apply(this,[a]),s=this.geometryFactory.createLinearRing(o);r.push(s)}return this.geometryFactory.createPolygon(n,r)},MultiPolygon:function(e){for(var t=[],n=0;n<e.length;++n){var r=e[n];t.push(bt.Polygon.apply(this,[r]))}return this.geometryFactory.createMultiPolygon(t)},GeometryCollection:function(e){for(var t=[],n=0;n<e.length;++n){var r=e[n];t.push(this.read(r))}return this.geometryFactory.createGeometryCollection(t)}},Et={coordinate:function(e){return[e.x,e.y]},Point:function(e){return{type:"Point",coordinates:Et.coordinate.apply(this,[e.getCoordinate()])}},MultiPoint:function(e){for(var t=[],n=0;n<e._geometries.length;++n){var r=e._geometries[n],i=Et.Point.apply(this,[r]);t.push(i.coordinates)}return{type:"MultiPoint",coordinates:t}},LineString:function(e){for(var t=[],n=e.getCoordinates(),r=0;r<n.length;++r){var i=n[r];t.push(Et.coordinate.apply(this,[i]))}return{type:"LineString",coordinates:t}},MultiLineString:function(e){for(var t=[],n=0;n<e._geometries.length;++n){var r=e._geometries[n],i=Et.LineString.apply(this,[r]);t.push(i.coordinates)}return{type:"MultiLineString",coordinates:t}},Polygon:function(e){var t=[],n=Et.LineString.apply(this,[e._shell]);t.push(n.coordinates);for(var r=0;r<e._holes.length;++r){var i=e._holes[r],a=Et.LineString.apply(this,[i]);t.push(a.coordinates)}return{type:"Polygon",coordinates:t}},MultiPolygon:function(e){for(var t=[],n=0;n<e._geometries.length;++n){var r=e._geometries[n],i=Et.Polygon.apply(this,[r]);t.push(i.coordinates)}return{type:"MultiPolygon",coordinates:t}},GeometryCollection:function(e){for(var t=[],n=0;n<e._geometries.length;++n){var r=e._geometries[n],i=r.getGeometryType();t.push(Et[i].apply(this,[r]))}return{type:"GeometryCollection",geometries:t}}},Ct=function(e){this.geometryFactory=e||new vt,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new It(this.geometryFactory)};Ct.prototype.read=function(e){var t=this.parser.read(e);return this.precisionModel.getType()===ht.FIXED&&this.reducePrecision(t),t},Ct.prototype.reducePrecision=function(e){var t,n;if(e.coordinate)this.precisionModel.makePrecise(e.coordinate);else if(e.points)for(t=0,n=e.points.length;t<n;t++)this.precisionModel.makePrecise(e.points[t]);else if(e.geometries)for(t=0,n=e.geometries.length;t<n;t++)this.reducePrecision(e.geometries[t])};var Bt=function(){this.parser=new It(this.geometryFactory)};Bt.prototype.write=function(e){return this.parser.write(e)};var wt=function(){},Qt={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};wt.prototype.interfaces_=function(){return[]},wt.prototype.getClass=function(){return wt},wt.opposite=function(e){return e===wt.LEFT?wt.RIGHT:e===wt.RIGHT?wt.LEFT:e},Qt.ON.get=function(){return 0},Qt.LEFT.get=function(){return 1},Qt.RIGHT.get=function(){return 2},Object.defineProperties(wt,Qt),(d.prototype=new Error).name="EmptyStackException",(p.prototype=new Ee).add=function(e){return this.array_.push(e),!0},p.prototype.get=function(e){if(e<0||e>=this.size())throw new Error;return this.array_[e]},p.prototype.push=function(e){return this.array_.push(e),e},p.prototype.pop=function(e){if(0===this.array_.length)throw new d;return this.array_.pop()},p.prototype.peek=function(){if(0===this.array_.length)throw new d;return this.array_[this.array_.length-1]},p.prototype.empty=function(){return 0===this.array_.length},p.prototype.isEmpty=function(){return this.empty()},p.prototype.search=function(e){return this.array_.indexOf(e)},p.prototype.size=function(){return this.array_.length},p.prototype.toArray=function(){for(var e=[],t=0,n=this.array_.length;t<n;t++)e.push(this.array_[t]);return e};var kt=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};kt.prototype.getCoordinate=function(){return this._minCoord},kt.prototype.getRightmostSide=function(e,t){var n=this.getRightmostSideOfSegment(e,t);return n<0&&(n=this.getRightmostSideOfSegment(e,t-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(e)),n},kt.prototype.findRightmostEdgeAtVertex=function(){var e=this._minDe.getEdge().getCoordinates();te.isTrue(this._minIndex>0&&this._minIndex<e.length,"rightmost point expected to be interior vertex of edge");var t=e[this._minIndex-1],n=e[this._minIndex+1],r=se.computeOrientation(this._minCoord,n,t),i=!1;(t.y<this._minCoord.y&&n.y<this._minCoord.y&&r===se.COUNTERCLOCKWISE||t.y>this._minCoord.y&&n.y>this._minCoord.y&&r===se.CLOCKWISE)&&(i=!0),i&&(this._minIndex=this._minIndex-1)},kt.prototype.getRightmostSideOfSegment=function(e,t){var n=e.getEdge().getCoordinates();if(t<0||t+1>=n.length)return-1;if(n[t].y===n[t+1].y)return-1;var r=wt.LEFT;return n[t].y<n[t+1].y&&(r=wt.RIGHT),r},kt.prototype.getEdge=function(){return this._orientedDe},kt.prototype.checkForRightmostCoordinate=function(e){for(var t=e.getEdge().getCoordinates(),n=0;n<t.length-1;n++)(null===this._minCoord||t[n].x>this._minCoord.x)&&(this._minDe=e,this._minIndex=n,this._minCoord=t[n])},kt.prototype.findRightmostEdgeAtNode=function(){var e=this._minDe.getNode().getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},kt.prototype.findEdge=function(e){for(var t=e.iterator();t.hasNext();){var n=t.next();n.isForward()&&this.checkForRightmostCoordinate(n)}te.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===wt.LEFT&&(this._orientedDe=this._minDe.getSym())},kt.prototype.interfaces_=function(){return[]},kt.prototype.getClass=function(){return kt};var _t=function(e){function t(n,r){e.call(this,t.msgWithCoord(n,r)),this.pt=r?new B(r):null,this.name="TopologyException"}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getCoordinate=function(){return this.pt},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.msgWithCoord=function(e,t){return t?e:e+" [ "+t+" ]"},t}($),xt=function(){this.array_=[]};xt.prototype.addLast=function(e){this.array_.push(e)},xt.prototype.removeFirst=function(){return this.array_.shift()},xt.prototype.isEmpty=function(){return 0===this.array_.length};var St=function(){this._finder=null,this._dirEdgeList=new Ce,this._nodes=new Ce,this._rightMostCoord=null,this._env=null,this._finder=new kt};St.prototype.clearVisitedEdges=function(){for(var e=this._dirEdgeList.iterator();e.hasNext();)e.next().setVisited(!1)},St.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},St.prototype.computeNodeDepth=function(e){for(var t=null,n=e.getEdges().iterator();n.hasNext();){var r=n.next();if(r.isVisited()||r.getSym().isVisited()){t=r;break}}if(null===t)throw new _t("unable to find edge to compute depths at "+e.getCoordinate());e.getEdges().computeDepths(t);for(var i=e.getEdges().iterator();i.hasNext();){var a=i.next();a.setVisited(!0),this.copySymDepths(a)}},St.prototype.computeDepth=function(e){this.clearVisitedEdges();var t=this._finder.getEdge();t.setEdgeDepths(wt.RIGHT,e),this.copySymDepths(t),this.computeDepths(t)},St.prototype.create=function(e){this.addReachable(e),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},St.prototype.findResultEdges=function(){for(var e=this._dirEdgeList.iterator();e.hasNext();){var t=e.next();t.getDepth(wt.RIGHT)>=1&&t.getDepth(wt.LEFT)<=0&&!t.isInteriorAreaEdge()&&t.setInResult(!0)}},St.prototype.computeDepths=function(e){var t=new De,n=new xt,r=e.getNode();for(n.addLast(r),t.add(r),e.setVisited(!0);!n.isEmpty();){var i=n.removeFirst();t.add(i),this.computeNodeDepth(i);for(var a=i.getEdges().iterator();a.hasNext();){var o=a.next().getSym();if(!o.isVisited()){var s=o.getNode();t.contains(s)||(n.addLast(s),t.add(s))}}}},St.prototype.compareTo=function(e){var t=e;return this._rightMostCoord.x<t._rightMostCoord.x?-1:this._rightMostCoord.x>t._rightMostCoord.x?1:0},St.prototype.getEnvelope=function(){if(null===this._env){for(var e=new J,t=this._dirEdgeList.iterator();t.hasNext();)for(var n=t.next().getEdge().getCoordinates(),r=0;r<n.length-1;r++)e.expandToInclude(n[r]);this._env=e}return this._env},St.prototype.addReachable=function(e){var t=new p;for(t.add(e);!t.empty();){var n=t.pop();this.add(n,t)}},St.prototype.copySymDepths=function(e){var t=e.getSym();t.setDepth(wt.LEFT,e.getDepth(wt.RIGHT)),t.setDepth(wt.RIGHT,e.getDepth(wt.LEFT))},St.prototype.add=function(e,t){e.setVisited(!0),this._nodes.add(e);for(var n=e.getEdges().iterator();n.hasNext();){var r=n.next();this._dirEdgeList.add(r);var i=r.getSym().getNode();i.isVisited()||t.push(i)}},St.prototype.getNodes=function(){return this._nodes},St.prototype.getDirectedEdges=function(){return this._dirEdgeList},St.prototype.interfaces_=function(){return[b]},St.prototype.getClass=function(){return St};var Ot=function e(){if(this.location=null,1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];this.init(t.length)}else if(Number.isInteger(arguments[0])){var n=arguments[0];this.init(1),this.location[wt.ON]=n}else if(arguments[0]instanceof e){var r=arguments[0];if(this.init(r.location.length),null!==r)for(var i=0;i<this.location.length;i++)this.location[i]=r.location[i]}}else if(3===arguments.length){var a=arguments[0],o=arguments[1],s=arguments[2];this.init(3),this.location[wt.ON]=a,this.location[wt.LEFT]=o,this.location[wt.RIGHT]=s}};Ot.prototype.setAllLocations=function(e){for(var t=0;t<this.location.length;t++)this.location[t]=e},Ot.prototype.isNull=function(){for(var e=0;e<this.location.length;e++)if(this.location[e]!==_.NONE)return!1;return!0},Ot.prototype.setAllLocationsIfNull=function(e){for(var t=0;t<this.location.length;t++)this.location[t]===_.NONE&&(this.location[t]=e)},Ot.prototype.isLine=function(){return 1===this.location.length},Ot.prototype.merge=function(e){if(e.location.length>this.location.length){var t=new Array(3).fill(null);t[wt.ON]=this.location[wt.ON],t[wt.LEFT]=_.NONE,t[wt.RIGHT]=_.NONE,this.location=t}for(var n=0;n<this.location.length;n++)this.location[n]===_.NONE&&n<e.location.length&&(this.location[n]=e.location[n])},Ot.prototype.getLocations=function(){return this.location},Ot.prototype.flip=function(){if(this.location.length<=1)return null;var e=this.location[wt.LEFT];this.location[wt.LEFT]=this.location[wt.RIGHT],this.location[wt.RIGHT]=e},Ot.prototype.toString=function(){var e=new R;return this.location.length>1&&e.append(_.toLocationSymbol(this.location[wt.LEFT])),e.append(_.toLocationSymbol(this.location[wt.ON])),this.location.length>1&&e.append(_.toLocationSymbol(this.location[wt.RIGHT])),e.toString()},Ot.prototype.setLocations=function(e,t,n){this.location[wt.ON]=e,this.location[wt.LEFT]=t,this.location[wt.RIGHT]=n},Ot.prototype.get=function(e){return e<this.location.length?this.location[e]:_.NONE},Ot.prototype.isArea=function(){return this.location.length>1},Ot.prototype.isAnyNull=function(){for(var e=0;e<this.location.length;e++)if(this.location[e]===_.NONE)return!0;return!1},Ot.prototype.setLocation=function(){if(1===arguments.length){var e=arguments[0];this.setLocation(wt.ON,e)}else if(2===arguments.length){var t=arguments[0],n=arguments[1];this.location[t]=n}},Ot.prototype.init=function(e){this.location=new Array(e).fill(null),this.setAllLocations(_.NONE)},Ot.prototype.isEqualOnSide=function(e,t){return this.location[t]===e.location[t]},Ot.prototype.allPositionsEqual=function(e){for(var t=0;t<this.location.length;t++)if(this.location[t]!==e)return!1;return!0},Ot.prototype.interfaces_=function(){return[]},Ot.prototype.getClass=function(){return Ot};var Dt=function e(){if(this.elt=new Array(2).fill(null),1===arguments.length){if(Number.isInteger(arguments[0])){var t=arguments[0];this.elt[0]=new Ot(t),this.elt[1]=new Ot(t)}else if(arguments[0]instanceof e){var n=arguments[0];this.elt[0]=new Ot(n.elt[0]),this.elt[1]=new Ot(n.elt[1])}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.elt[0]=new Ot(_.NONE),this.elt[1]=new Ot(_.NONE),this.elt[r].setLocation(i)}else if(3===arguments.length){var a=arguments[0],o=arguments[1],s=arguments[2];this.elt[0]=new Ot(a,o,s),this.elt[1]=new Ot(a,o,s)}else if(4===arguments.length){var u=arguments[0],A=arguments[1],c=arguments[2],l=arguments[3];this.elt[0]=new Ot(_.NONE,_.NONE,_.NONE),this.elt[1]=new Ot(_.NONE,_.NONE,_.NONE),this.elt[u].setLocations(A,c,l)}};Dt.prototype.getGeometryCount=function(){var e=0;return this.elt[0].isNull()||e++,this.elt[1].isNull()||e++,e},Dt.prototype.setAllLocations=function(e,t){this.elt[e].setAllLocations(t)},Dt.prototype.isNull=function(e){return this.elt[e].isNull()},Dt.prototype.setAllLocationsIfNull=function(){if(1===arguments.length){var e=arguments[0];this.setAllLocationsIfNull(0,e),this.setAllLocationsIfNull(1,e)}else if(2===arguments.length){var t=arguments[0],n=arguments[1];this.elt[t].setAllLocationsIfNull(n)}},Dt.prototype.isLine=function(e){return this.elt[e].isLine()},Dt.prototype.merge=function(e){for(var t=0;t<2;t++)null===this.elt[t]&&null!==e.elt[t]?this.elt[t]=new Ot(e.elt[t]):this.elt[t].merge(e.elt[t])},Dt.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Dt.prototype.getLocation=function(){if(1===arguments.length){var e=arguments[0];return this.elt[e].get(wt.ON)}if(2===arguments.length){var t=arguments[0],n=arguments[1];return this.elt[t].get(n)}},Dt.prototype.toString=function(){var e=new R;return null!==this.elt[0]&&(e.append("A:"),e.append(this.elt[0].toString())),null!==this.elt[1]&&(e.append(" B:"),e.append(this.elt[1].toString())),e.toString()},Dt.prototype.isArea=function(){if(0===arguments.length)return this.elt[0].isArea()||this.elt[1].isArea();if(1===arguments.length){var e=arguments[0];return this.elt[e].isArea()}},Dt.prototype.isAnyNull=function(e){return this.elt[e].isAnyNull()},Dt.prototype.setLocation=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];this.elt[e].setLocation(wt.ON,t)}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this.elt[n].setLocation(r,i)}},Dt.prototype.isEqualOnSide=function(e,t){return this.elt[0].isEqualOnSide(e.elt[0],t)&&this.elt[1].isEqualOnSide(e.elt[1],t)},Dt.prototype.allPositionsEqual=function(e,t){return this.elt[e].allPositionsEqual(t)},Dt.prototype.toLine=function(e){this.elt[e].isArea()&&(this.elt[e]=new Ot(this.elt[e].location[0]))},Dt.prototype.interfaces_=function(){return[]},Dt.prototype.getClass=function(){return Dt},Dt.toLineLabel=function(e){for(var t=new Dt(_.NONE),n=0;n<2;n++)t.setLocation(n,e.getLocation(n));return t};var Rt=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new Ce,this._pts=new Ce,this._label=new Dt(_.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new Ce,this._geometryFactory=null;var e=arguments[0],t=arguments[1];this._geometryFactory=t,this.computePoints(e),this.computeRing()};Rt.prototype.computeRing=function(){if(null!==this._ring)return null;for(var e=new Array(this._pts.size()).fill(null),t=0;t<this._pts.size();t++)e[t]=this._pts.get(t);this._ring=this._geometryFactory.createLinearRing(e),this._isHole=se.isCCW(this._ring.getCoordinates())},Rt.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},Rt.prototype.computePoints=function(e){this._startDe=e;var t=e,n=!0;do{if(null===t)throw new _t("Found null DirectedEdge");if(t.getEdgeRing()===this)throw new _t("Directed Edge visited twice during ring-building at "+t.getCoordinate());this._edges.add(t);var r=t.getLabel();te.isTrue(r.isArea()),this.mergeLabel(r),this.addPoints(t.getEdge(),t.isForward(),n),n=!1,this.setEdgeRing(t,this),t=this.getNext(t)}while(t!==this._startDe)},Rt.prototype.getLinearRing=function(){return this._ring},Rt.prototype.getCoordinate=function(e){return this._pts.get(e)},Rt.prototype.computeMaxNodeDegree=function(){this._maxNodeDegree=0;var e=this._startDe;do{var t=e.getNode().getEdges().getOutgoingDegree(this);t>this._maxNodeDegree&&(this._maxNodeDegree=t),e=this.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2},Rt.prototype.addPoints=function(e,t,n){var r=e.getCoordinates();if(t){var i=1;n&&(i=0);for(var a=i;a<r.length;a++)this._pts.add(r[a])}else{var o=r.length-2;n&&(o=r.length-1);for(var s=o;s>=0;s--)this._pts.add(r[s])}},Rt.prototype.isHole=function(){return this._isHole},Rt.prototype.setInResult=function(){var e=this._startDe;do{e.getEdge().setInResult(!0),e=e.getNext()}while(e!==this._startDe)},Rt.prototype.containsPoint=function(e){var t=this.getLinearRing();if(!t.getEnvelopeInternal().contains(e))return!1;if(!se.isPointInRing(e,t.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();)if(n.next().containsPoint(e))return!1;return!0},Rt.prototype.addHole=function(e){this._holes.add(e)},Rt.prototype.isShell=function(){return null===this._shell},Rt.prototype.getLabel=function(){return this._label},Rt.prototype.getEdges=function(){return this._edges},Rt.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Rt.prototype.getShell=function(){return this._shell},Rt.prototype.mergeLabel=function(){if(1===arguments.length){var e=arguments[0];this.mergeLabel(e,0),this.mergeLabel(e,1)}else if(2===arguments.length){var t=arguments[0],n=arguments[1],r=t.getLocation(n,wt.RIGHT);if(r===_.NONE)return null;if(this._label.getLocation(n)===_.NONE)return this._label.setLocation(n,r),null}},Rt.prototype.setShell=function(e){this._shell=e,null!==e&&e.addHole(this)},Rt.prototype.toPolygon=function(e){for(var t=new Array(this._holes.size()).fill(null),n=0;n<this._holes.size();n++)t[n]=this._holes.get(n).getLinearRing();return e.createPolygon(this.getLinearRing(),t)},Rt.prototype.interfaces_=function(){return[]},Rt.prototype.getClass=function(){return Rt};var jt=function(e){function t(){var t=arguments[0],n=arguments[1];e.call(this,t,n)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setEdgeRing=function(e,t){e.setMinEdgeRing(t)},t.prototype.getNext=function(e){return e.getNextMin()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Rt),Mt=function(e){function t(){var t=arguments[0],n=arguments[1];e.call(this,t,n)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.buildMinimalRings=function(){var e=new Ce,t=this._startDe;do{if(null===t.getMinEdgeRing()){var n=new jt(t,this._geometryFactory);e.add(n)}t=t.getNext()}while(t!==this._startDe);return e},t.prototype.setEdgeRing=function(e,t){e.setEdgeRing(t)},t.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var e=this._startDe;do{e.getNode().getEdges().linkMinimalDirectedEdges(this),e=e.getNext()}while(e!==this._startDe)},t.prototype.getNext=function(e){return e.getNext()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Rt),Nt=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this._label=e}};Nt.prototype.setVisited=function(e){this._isVisited=e},Nt.prototype.setInResult=function(e){this._isInResult=e},Nt.prototype.isCovered=function(){return this._isCovered},Nt.prototype.isCoveredSet=function(){return this._isCoveredSet},Nt.prototype.setLabel=function(e){this._label=e},Nt.prototype.getLabel=function(){return this._label},Nt.prototype.setCovered=function(e){this._isCovered=e,this._isCoveredSet=!0},Nt.prototype.updateIM=function(e){te.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(e)},Nt.prototype.isInResult=function(){return this._isInResult},Nt.prototype.isVisited=function(){return this._isVisited},Nt.prototype.interfaces_=function(){return[]},Nt.prototype.getClass=function(){return Nt};var Ft=function(e){function t(){e.call(this),this._coord=null,this._edges=null;var t=arguments[0],n=arguments[1];this._coord=t,this._edges=n,this._label=new Dt(0,_.NONE)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.isIncidentEdgeInResult=function(){for(var e=this.getEdges().getEdges().iterator();e.hasNext();)if(e.next().getEdge().isInResult())return!0;return!1},t.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},t.prototype.getCoordinate=function(){return this._coord},t.prototype.print=function(e){e.println("node "+this._coord+" lbl: "+this._label)},t.prototype.computeIM=function(e){},t.prototype.computeMergedLocation=function(e,t){var n=_.NONE;if(n=this._label.getLocation(t),!e.isNull(t)){var r=e.getLocation(t);n!==_.BOUNDARY&&(n=r)}return n},t.prototype.setLabel=function(){if(2!==arguments.length)return e.prototype.setLabel.apply(this,arguments);var t=arguments[0],n=arguments[1];null===this._label?this._label=new Dt(t,n):this._label.setLocation(t,n)},t.prototype.getEdges=function(){return this._edges},t.prototype.mergeLabel=function(){if(arguments[0]instanceof t){var e=arguments[0];this.mergeLabel(e._label)}else if(arguments[0]instanceof Dt)for(var n=arguments[0],r=0;r<2;r++){var i=this.computeMergedLocation(n,r);this._label.getLocation(r)===_.NONE&&this._label.setLocation(r,i)}},t.prototype.add=function(e){this._edges.insert(e),e.setNode(this)},t.prototype.setLabelBoundary=function(e){if(null===this._label)return null;var t=_.NONE;null!==this._label&&(t=this._label.getLocation(e));var n=null;switch(t){case _.BOUNDARY:n=_.INTERIOR;break;case _.INTERIOR:default:n=_.BOUNDARY}this._label.setLocation(e,n)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Nt),Tt=function(){this.nodeMap=new l,this.nodeFact=null;var e=arguments[0];this.nodeFact=e};Tt.prototype.find=function(e){return this.nodeMap.get(e)},Tt.prototype.addNode=function(){if(arguments[0]instanceof B){var e=arguments[0],t=this.nodeMap.get(e);return null===t&&(t=this.nodeFact.createNode(e),this.nodeMap.put(e,t)),t}if(arguments[0]instanceof Ft){var n=arguments[0],r=this.nodeMap.get(n.getCoordinate());return null===r?(this.nodeMap.put(n.getCoordinate(),n),n):(r.mergeLabel(n),r)}},Tt.prototype.print=function(e){for(var t=this.iterator();t.hasNext();)t.next().print(e)},Tt.prototype.iterator=function(){return this.nodeMap.values().iterator()},Tt.prototype.values=function(){return this.nodeMap.values()},Tt.prototype.getBoundaryNodes=function(e){for(var t=new Ce,n=this.iterator();n.hasNext();){var r=n.next();r.getLabel().getLocation(e)===_.BOUNDARY&&t.add(r)}return t},Tt.prototype.add=function(e){var t=e.getCoordinate();this.addNode(t).add(e)},Tt.prototype.interfaces_=function(){return[]},Tt.prototype.getClass=function(){return Tt};var Lt=function(){},Pt={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Lt.prototype.interfaces_=function(){return[]},Lt.prototype.getClass=function(){return Lt},Lt.isNorthern=function(e){return e===Lt.NE||e===Lt.NW},Lt.isOpposite=function(e,t){return e!==t&&2===(e-t+4)%4},Lt.commonHalfPlane=function(e,t){if(e===t)return e;if(2===(e-t+4)%4)return-1;var n=e<t?e:t;return 0===n&&3===(e>t?e:t)?3:n},Lt.isInHalfPlane=function(e,t){return t===Lt.SE?e===Lt.SE||e===Lt.SW:e===t||e===t+1},Lt.quadrant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var e=arguments[0],t=arguments[1];if(0===e&&0===t)throw new y("Cannot compute the quadrant for point ( "+e+", "+t+" )");return e>=0?t>=0?Lt.NE:Lt.SE:t>=0?Lt.NW:Lt.SW}if(arguments[0]instanceof B&&arguments[1]instanceof B){var n=arguments[0],r=arguments[1];if(r.x===n.x&&r.y===n.y)throw new y("Cannot compute the quadrant for two identical points "+n);return r.x>=n.x?r.y>=n.y?Lt.NE:Lt.SE:r.y>=n.y?Lt.NW:Lt.SW}},Pt.NE.get=function(){return 0},Pt.NW.get=function(){return 1},Pt.SW.get=function(){return 2},Pt.SE.get=function(){return 3},Object.defineProperties(Lt,Pt);var Ut=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){var e=arguments[0];this._edge=e}else if(3===arguments.length){var t=arguments[0],n=arguments[1],r=arguments[2];this._edge=t,this.init(n,r),this._label=null}else if(4===arguments.length){var i=arguments[0],a=arguments[1],o=arguments[2],s=arguments[3];this._edge=i,this.init(a,o),this._label=s}};Ut.prototype.compareDirection=function(e){return this._dx===e._dx&&this._dy===e._dy?0:this._quadrant>e._quadrant?1:this._quadrant<e._quadrant?-1:se.computeOrientation(e._p0,e._p1,this._p1)},Ut.prototype.getDy=function(){return this._dy},Ut.prototype.getCoordinate=function(){return this._p0},Ut.prototype.setNode=function(e){this._node=e},Ut.prototype.print=function(e){var t=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),r=n.lastIndexOf("."),i=n.substring(r+1);e.print("  "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+"   "+this._label)},Ut.prototype.compareTo=function(e){var t=e;return this.compareDirection(t)},Ut.prototype.getDirectedCoordinate=function(){return this._p1},Ut.prototype.getDx=function(){return this._dx},Ut.prototype.getLabel=function(){return this._label},Ut.prototype.getEdge=function(){return this._edge},Ut.prototype.getQuadrant=function(){return this._quadrant},Ut.prototype.getNode=function(){return this._node},Ut.prototype.toString=function(){var e=Math.atan2(this._dy,this._dx),t=this.getClass().getName(),n=t.lastIndexOf(".");return"  "+t.substring(n+1)+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+"   "+this._label},Ut.prototype.computeLabel=function(e){},Ut.prototype.init=function(e,t){this._p0=e,this._p1=t,this._dx=t.x-e.x,this._dy=t.y-e.y,this._quadrant=Lt.quadrant(this._dx,this._dy),te.isTrue(!(0===this._dx&&0===this._dy),"EdgeEnd with identical endpoints found")},Ut.prototype.interfaces_=function(){return[b]},Ut.prototype.getClass=function(){return Ut};var Gt=function(e){function t(){var t=arguments[0],n=arguments[1];if(e.call(this,t),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=n,n)this.init(t.getCoordinate(0),t.getCoordinate(1));else{var r=t.getNumPoints()-1;this.init(t.getCoordinate(r),t.getCoordinate(r-1))}this.computeDirectedLabel()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getNextMin=function(){return this._nextMin},t.prototype.getDepth=function(e){return this._depth[e]},t.prototype.setVisited=function(e){this._isVisited=e},t.prototype.computeDirectedLabel=function(){this._label=new Dt(this._edge.getLabel()),this._isForward||this._label.flip()},t.prototype.getNext=function(){return this._next},t.prototype.setDepth=function(e,t){if(-999!==this._depth[e]&&this._depth[e]!==t)throw new _t("assigned depths do not match",this.getCoordinate());this._depth[e]=t},t.prototype.isInteriorAreaEdge=function(){for(var e=!0,t=0;t<2;t++)this._label.isArea(t)&&this._label.getLocation(t,wt.LEFT)===_.INTERIOR&&this._label.getLocation(t,wt.RIGHT)===_.INTERIOR||(e=!1);return e},t.prototype.setNextMin=function(e){this._nextMin=e},t.prototype.print=function(t){e.prototype.print.call(this,t),t.print(" "+this._depth[wt.LEFT]+"/"+this._depth[wt.RIGHT]),t.print(" ("+this.getDepthDelta()+")"),this._isInResult&&t.print(" inResult")},t.prototype.setMinEdgeRing=function(e){this._minEdgeRing=e},t.prototype.isLineEdge=function(){var e=this._label.isLine(0)||this._label.isLine(1),t=!this._label.isArea(0)||this._label.allPositionsEqual(0,_.EXTERIOR),n=!this._label.isArea(1)||this._label.allPositionsEqual(1,_.EXTERIOR);return e&&t&&n},t.prototype.setEdgeRing=function(e){this._edgeRing=e},t.prototype.getMinEdgeRing=function(){return this._minEdgeRing},t.prototype.getDepthDelta=function(){var e=this._edge.getDepthDelta();return this._isForward||(e=-e),e},t.prototype.setInResult=function(e){this._isInResult=e},t.prototype.getSym=function(){return this._sym},t.prototype.isForward=function(){return this._isForward},t.prototype.getEdge=function(){return this._edge},t.prototype.printEdge=function(e){this.print(e),e.print(" "),this._isForward?this._edge.print(e):this._edge.printReverse(e)},t.prototype.setSym=function(e){this._sym=e},t.prototype.setVisitedEdge=function(e){this.setVisited(e),this._sym.setVisited(e)},t.prototype.setEdgeDepths=function(e,t){var n=this.getEdge().getDepthDelta();this._isForward||(n=-n);var r=1;e===wt.LEFT&&(r=-1);var i=wt.opposite(e),a=t+n*r;this.setDepth(e,t),this.setDepth(i,a)},t.prototype.getEdgeRing=function(){return this._edgeRing},t.prototype.isInResult=function(){return this._isInResult},t.prototype.setNext=function(e){this._next=e},t.prototype.isVisited=function(){return this._isVisited},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.depthFactor=function(e,t){return e===_.EXTERIOR&&t===_.INTERIOR?1:e===_.INTERIOR&&t===_.EXTERIOR?-1:0},t}(Ut),qt=function(){};qt.prototype.createNode=function(e){return new Ft(e,null)},qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt};var Ht=function(){if(this._edges=new Ce,this._nodes=null,this._edgeEndList=new Ce,0===arguments.length)this._nodes=new Tt(new qt);else if(1===arguments.length){var e=arguments[0];this._nodes=new Tt(e)}};Ht.prototype.printEdges=function(e){e.println("Edges:");for(var t=0;t<this._edges.size();t++){e.println("edge "+t+":");var n=this._edges.get(t);n.print(e),n.eiList.print(e)}},Ht.prototype.find=function(e){return this._nodes.find(e)},Ht.prototype.addNode=function(){if(arguments[0]instanceof Ft){var e=arguments[0];return this._nodes.addNode(e)}if(arguments[0]instanceof B){var t=arguments[0];return this._nodes.addNode(t)}},Ht.prototype.getNodeIterator=function(){return this._nodes.iterator()},Ht.prototype.linkResultDirectedEdges=function(){for(var e=this._nodes.iterator();e.hasNext();)e.next().getEdges().linkResultDirectedEdges()},Ht.prototype.debugPrintln=function(e){H.out.println(e)},Ht.prototype.isBoundaryNode=function(e,t){var n=this._nodes.find(t);if(null===n)return!1;var r=n.getLabel();return null!==r&&r.getLocation(e)===_.BOUNDARY},Ht.prototype.linkAllDirectedEdges=function(){for(var e=this._nodes.iterator();e.hasNext();)e.next().getEdges().linkAllDirectedEdges()},Ht.prototype.matchInSameDirection=function(e,t,n,r){return!!e.equals(n)&&se.computeOrientation(e,t,r)===se.COLLINEAR&&Lt.quadrant(e,t)===Lt.quadrant(n,r)},Ht.prototype.getEdgeEnds=function(){return this._edgeEndList},Ht.prototype.debugPrint=function(e){H.out.print(e)},Ht.prototype.getEdgeIterator=function(){return this._edges.iterator()},Ht.prototype.findEdgeInSameDirection=function(e,t){for(var n=0;n<this._edges.size();n++){var r=this._edges.get(n),i=r.getCoordinates();if(this.matchInSameDirection(e,t,i[0],i[1]))return r;if(this.matchInSameDirection(e,t,i[i.length-1],i[i.length-2]))return r}return null},Ht.prototype.insertEdge=function(e){this._edges.add(e)},Ht.prototype.findEdgeEnd=function(e){for(var t=this.getEdgeEnds().iterator();t.hasNext();){var n=t.next();if(n.getEdge()===e)return n}return null},Ht.prototype.addEdges=function(e){for(var t=e.iterator();t.hasNext();){var n=t.next();this._edges.add(n);var r=new Gt(n,!0),i=new Gt(n,!1);r.setSym(i),i.setSym(r),this.add(r),this.add(i)}},Ht.prototype.add=function(e){this._nodes.add(e),this._edgeEndList.add(e)},Ht.prototype.getNodes=function(){return this._nodes.values()},Ht.prototype.findEdge=function(e,t){for(var n=0;n<this._edges.size();n++){var r=this._edges.get(n),i=r.getCoordinates();if(e.equals(i[0])&&t.equals(i[1]))return r}return null},Ht.prototype.interfaces_=function(){return[]},Ht.prototype.getClass=function(){return Ht},Ht.linkResultDirectedEdges=function(e){for(var t=e.iterator();t.hasNext();)t.next().getEdges().linkResultDirectedEdges()};var Yt=function(){this._geometryFactory=null,this._shellList=new Ce;var e=arguments[0];this._geometryFactory=e};Yt.prototype.sortShellsAndHoles=function(e,t,n){for(var r=e.iterator();r.hasNext();){var i=r.next();i.isHole()?n.add(i):t.add(i)}},Yt.prototype.computePolygons=function(e){for(var t=new Ce,n=e.iterator();n.hasNext();){var r=n.next().toPolygon(this._geometryFactory);t.add(r)}return t},Yt.prototype.placeFreeHoles=function(e,t){for(var n=t.iterator();n.hasNext();){var r=n.next();if(null===r.getShell()){var i=this.findEdgeRingContaining(r,e);if(null===i)throw new _t("unable to assign hole to a shell",r.getCoordinate(0));r.setShell(i)}}},Yt.prototype.buildMinimalEdgeRings=function(e,t,n){for(var r=new Ce,i=e.iterator();i.hasNext();){var a=i.next();if(a.getMaxNodeDegree()>2){a.linkDirectedEdgesForMinimalEdgeRings();var o=a.buildMinimalRings(),s=this.findShell(o);null!==s?(this.placePolygonHoles(s,o),t.add(s)):n.addAll(o)}else r.add(a)}return r},Yt.prototype.containsPoint=function(e){for(var t=this._shellList.iterator();t.hasNext();)if(t.next().containsPoint(e))return!0;return!1},Yt.prototype.buildMaximalEdgeRings=function(e){for(var t=new Ce,n=e.iterator();n.hasNext();){var r=n.next();if(r.isInResult()&&r.getLabel().isArea()&&null===r.getEdgeRing()){var i=new Mt(r,this._geometryFactory);t.add(i),i.setInResult()}}return t},Yt.prototype.placePolygonHoles=function(e,t){for(var n=t.iterator();n.hasNext();){var r=n.next();r.isHole()&&r.setShell(e)}},Yt.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},Yt.prototype.findEdgeRingContaining=function(e,t){for(var n=e.getLinearRing(),r=n.getEnvelopeInternal(),i=n.getCoordinateN(0),a=null,o=null,s=t.iterator();s.hasNext();){var u=s.next(),A=u.getLinearRing(),c=A.getEnvelopeInternal();null!==a&&(o=a.getLinearRing().getEnvelopeInternal());var l=!1;c.contains(r)&&se.isPointInRing(i,A.getCoordinates())&&(l=!0),l&&(null===a||o.contains(c))&&(a=u)}return a},Yt.prototype.findShell=function(e){for(var t=0,n=null,r=e.iterator();r.hasNext();){var i=r.next();i.isHole()||(n=i,t++)}return te.isTrue(t<=1,"found two shells in MinimalEdgeRing list"),n},Yt.prototype.add=function(){if(1===arguments.length){var e=arguments[0];this.add(e.getEdgeEnds(),e.getNodes())}else if(2===arguments.length){var t=arguments[0],n=arguments[1];Ht.linkResultDirectedEdges(n);var r=this.buildMaximalEdgeRings(t),i=new Ce,a=this.buildMinimalEdgeRings(r,this._shellList,i);this.sortShellsAndHoles(a,this._shellList,i),this.placeFreeHoles(this._shellList,i)}},Yt.prototype.interfaces_=function(){return[]},Yt.prototype.getClass=function(){return Yt};var Jt=function(){};Jt.prototype.getBounds=function(){},Jt.prototype.interfaces_=function(){return[]},Jt.prototype.getClass=function(){return Jt};var zt=function(){this._bounds=null,this._item=null;var e=arguments[0],t=arguments[1];this._bounds=e,this._item=t};zt.prototype.getItem=function(){return this._item},zt.prototype.getBounds=function(){return this._bounds},zt.prototype.interfaces_=function(){return[Jt,t]},zt.prototype.getClass=function(){return zt};var Kt=function(){this._size=null,this._items=null,this._size=0,this._items=new Ce,this._items.add(null)};Kt.prototype.poll=function(){if(this.isEmpty())return null;var e=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),e},Kt.prototype.size=function(){return this._size},Kt.prototype.reorder=function(e){for(var t=null,n=this._items.get(e);2*e<=this._size&&((t=2*e)!==this._size&&this._items.get(t+1).compareTo(this._items.get(t))<0&&t++,this._items.get(t).compareTo(n)<0);e=t)this._items.set(e,this._items.get(t));this._items.set(e,n)},Kt.prototype.clear=function(){this._size=0,this._items.clear()},Kt.prototype.isEmpty=function(){return 0===this._size},Kt.prototype.add=function(e){this._items.add(null),this._size+=1;var t=this._size;for(this._items.set(0,e);e.compareTo(this._items.get(Math.trunc(t/2)))<0;t/=2)this._items.set(t,this._items.get(Math.trunc(t/2)));this._items.set(t,e)},Kt.prototype.interfaces_=function(){return[]},Kt.prototype.getClass=function(){return Kt};var Wt=function(){};Wt.prototype.visitItem=function(e){},Wt.prototype.interfaces_=function(){return[]},Wt.prototype.getClass=function(){return Wt};var Vt=function(){};Vt.prototype.insert=function(e,t){},Vt.prototype.remove=function(e,t){},Vt.prototype.query=function(){},Vt.prototype.interfaces_=function(){return[]},Vt.prototype.getClass=function(){return Vt};var Xt=function(){if(this._childBoundables=new Ce,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this._level=e}},Zt={serialVersionUID:{configurable:!0}};Xt.prototype.getLevel=function(){return this._level},Xt.prototype.size=function(){return this._childBoundables.size()},Xt.prototype.getChildBoundables=function(){return this._childBoundables},Xt.prototype.addChildBoundable=function(e){te.isTrue(null===this._bounds),this._childBoundables.add(e)},Xt.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Xt.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},Xt.prototype.interfaces_=function(){return[Jt,t]},Xt.prototype.getClass=function(){return Xt},Zt.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(Xt,Zt);var $t=function(){};$t.reverseOrder=function(){return{compare:function(e,t){return t.compareTo(e)}}},$t.min=function(e){return $t.sort(e),e.get(0)},$t.sort=function(e,t){var n=e.toArray();t?Fe.sort(n,t):Fe.sort(n);for(var r=e.iterator(),i=0,a=n.length;i<a;i++)r.next(),r.set(n[i])},$t.singletonList=function(e){var t=new Ce;return t.add(e),t};var en=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var e=arguments[0],t=arguments[1],n=arguments[2];this._boundable1=e,this._boundable2=t,this._itemDistance=n,this._distance=this.distance()};en.prototype.expandToQueue=function(e,t){var n=en.isComposite(this._boundable1),r=en.isComposite(this._boundable2);if(n&&r)return en.area(this._boundable1)>en.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,e,t),null):(this.expand(this._boundable2,this._boundable1,e,t),null);if(n)return this.expand(this._boundable1,this._boundable2,e,t),null;if(r)return this.expand(this._boundable2,this._boundable1,e,t),null;throw new y("neither boundable is composite")},en.prototype.isLeaves=function(){return!(en.isComposite(this._boundable1)||en.isComposite(this._boundable2))},en.prototype.compareTo=function(e){var t=e;return this._distance<t._distance?-1:this._distance>t._distance?1:0},en.prototype.expand=function(e,t,n,r){for(var i=e.getChildBoundables().iterator();i.hasNext();){var a=i.next(),o=new en(a,t,this._itemDistance);o.getDistance()<r&&n.add(o)}},en.prototype.getBoundable=function(e){return 0===e?this._boundable1:this._boundable2},en.prototype.getDistance=function(){return this._distance},en.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},en.prototype.interfaces_=function(){return[b]},en.prototype.getClass=function(){return en},en.area=function(e){return e.getBounds().getArea()},en.isComposite=function(e){return e instanceof Xt};var tn=function e(){if(this._root=null,this._built=!1,this._itemBoundables=new Ce,this._nodeCapacity=null,0===arguments.length){var t=e.DEFAULT_NODE_CAPACITY;this._nodeCapacity=t}else if(1===arguments.length){var n=arguments[0];te.isTrue(n>1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},nn={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};tn.prototype.getNodeCapacity=function(){return this._nodeCapacity},tn.prototype.lastNode=function(e){return e.get(e.size()-1)},tn.prototype.size=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var e=0,t=arguments[0].getChildBoundables().iterator();t.hasNext();){var n=t.next();n instanceof Xt?e+=this.size(n):n instanceof zt&&(e+=1)}return e}},tn.prototype.removeItem=function(e,t){for(var n=null,r=e.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof zt&&i.getItem()===t&&(n=i)}return null!==n&&(e.getChildBoundables().remove(n),!0)},tn.prototype.itemsTree=function(){if(0===arguments.length){this.build();var e=this.itemsTree(this._root);return null===e?new Ce:e}if(1===arguments.length){for(var t=arguments[0],n=new Ce,r=t.getChildBoundables().iterator();r.hasNext();){var i=r.next();if(i instanceof Xt){var a=this.itemsTree(i);null!==a&&n.add(a)}else i instanceof zt?n.add(i.getItem()):te.shouldNeverReachHere()}return n.size()<=0?null:n}},tn.prototype.insert=function(e,t){te.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new zt(e,t))},tn.prototype.boundablesAtLevel=function(){if(1===arguments.length){var e=arguments[0],t=new Ce;return this.boundablesAtLevel(e,this._root,t),t}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];if(te.isTrue(n>-2),r.getLevel()===n)return i.add(r),null;for(var a=r.getChildBoundables().iterator();a.hasNext();){var o=a.next();o instanceof Xt?this.boundablesAtLevel(n,o,i):(te.isTrue(o instanceof zt),-1===n&&i.add(o))}return null}},tn.prototype.query=function(){if(1===arguments.length){var e=arguments[0];this.build();var t=new Ce;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,t),t}if(2===arguments.length){var n=arguments[0],r=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.query(n,this._root,r)}else if(3===arguments.length)if(S(arguments[2],Wt)&&arguments[0]instanceof Object&&arguments[1]instanceof Xt)for(var i=arguments[0],a=arguments[1],o=arguments[2],s=a.getChildBoundables(),u=0;u<s.size();u++){var A=s.get(u);this.getIntersectsOp().intersects(A.getBounds(),i)&&(A instanceof Xt?this.query(i,A,o):A instanceof zt?o.visitItem(A.getItem()):te.shouldNeverReachHere())}else if(S(arguments[2],Ee)&&arguments[0]instanceof Object&&arguments[1]instanceof Xt)for(var c=arguments[0],l=arguments[1],f=arguments[2],h=l.getChildBoundables(),g=0;g<h.size();g++){var d=h.get(g);this.getIntersectsOp().intersects(d.getBounds(),c)&&(d instanceof Xt?this.query(c,d,f):d instanceof zt?f.add(d.getItem()):te.shouldNeverReachHere())}},tn.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},tn.prototype.getRoot=function(){return this.build(),this._root},tn.prototype.remove=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.remove(e,this._root,t)}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],a=this.removeItem(r,i);if(a)return!0;for(var o=null,s=r.getChildBoundables().iterator();s.hasNext();){var u=s.next();if(this.getIntersectsOp().intersects(u.getBounds(),n)&&u instanceof Xt&&(a=this.remove(n,u,i))){o=u;break}}return null!==o&&o.getChildBoundables().isEmpty()&&r.getChildBoundables().remove(o),a}},tn.prototype.createHigherLevels=function(e,t){te.isTrue(!e.isEmpty());var n=this.createParentBoundables(e,t+1);return 1===n.size()?n.get(0):this.createHigherLevels(n,t+1)},tn.prototype.depth=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(1===arguments.length){for(var e=0,t=arguments[0].getChildBoundables().iterator();t.hasNext();){var n=t.next();if(n instanceof Xt){var r=this.depth(n);r>e&&(e=r)}}return e+1}},tn.prototype.createParentBoundables=function(e,t){te.isTrue(!e.isEmpty());var n=new Ce;n.add(this.createNode(t));var r=new Ce(e);$t.sort(r,this.getComparator());for(var i=r.iterator();i.hasNext();){var a=i.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(t)),this.lastNode(n).addChildBoundable(a)}return n},tn.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},tn.prototype.interfaces_=function(){return[t]},tn.prototype.getClass=function(){return tn},tn.compareDoubles=function(e,t){return e>t?1:e<t?-1:0},nn.IntersectsOp.get=function(){return rn},nn.serialVersionUID.get=function(){return-0x35ef64c82d4c5400},nn.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(tn,nn);var rn=function(){},an=function(){};an.prototype.distance=function(e,t){},an.prototype.interfaces_=function(){return[]},an.prototype.getClass=function(){return an};var on=function(e){function n(t){t=t||n.DEFAULT_NODE_CAPACITY,e.call(this,t)}e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n;var r={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return n.prototype.createParentBoundablesFromVerticalSlices=function(e,t){te.isTrue(e.length>0);for(var n=new Ce,r=0;r<e.length;r++)n.addAll(this.createParentBoundablesFromVerticalSlice(e[r],t));return n},n.prototype.createNode=function(e){return new sn(e)},n.prototype.size=function(){return 0===arguments.length?e.prototype.size.call(this):e.prototype.size.apply(this,arguments)},n.prototype.insert=function(){if(2!==arguments.length)return e.prototype.insert.apply(this,arguments);var t=arguments[0],n=arguments[1];if(t.isNull())return null;e.prototype.insert.call(this,t,n)},n.prototype.getIntersectsOp=function(){return n.intersectsOp},n.prototype.verticalSlices=function(e,t){for(var n=Math.trunc(Math.ceil(e.size()/t)),r=new Array(t).fill(null),i=e.iterator(),a=0;a<t;a++){r[a]=new Ce;for(var o=0;i.hasNext()&&o<n;){var s=i.next();r[a].add(s),o++}}return r},n.prototype.query=function(){if(1===arguments.length){var t=arguments[0];return e.prototype.query.call(this,t)}if(2===arguments.length){var n=arguments[0],r=arguments[1];e.prototype.query.call(this,n,r)}else if(3===arguments.length)if(S(arguments[2],Wt)&&arguments[0]instanceof Object&&arguments[1]instanceof Xt){var i=arguments[0],a=arguments[1],o=arguments[2];e.prototype.query.call(this,i,a,o)}else if(S(arguments[2],Ee)&&arguments[0]instanceof Object&&arguments[1]instanceof Xt){var s=arguments[0],u=arguments[1],A=arguments[2];e.prototype.query.call(this,s,u,A)}},n.prototype.getComparator=function(){return n.yComparator},n.prototype.createParentBoundablesFromVerticalSlice=function(t,n){return e.prototype.createParentBoundables.call(this,t,n)},n.prototype.remove=function(){if(2===arguments.length){var t=arguments[0],n=arguments[1];return e.prototype.remove.call(this,t,n)}return e.prototype.remove.apply(this,arguments)},n.prototype.depth=function(){return 0===arguments.length?e.prototype.depth.call(this):e.prototype.depth.apply(this,arguments)},n.prototype.createParentBoundables=function(e,t){te.isTrue(!e.isEmpty());var r=Math.trunc(Math.ceil(e.size()/this.getNodeCapacity())),i=new Ce(e);$t.sort(i,n.xComparator);var a=this.verticalSlices(i,Math.trunc(Math.ceil(Math.sqrt(r))));return this.createParentBoundablesFromVerticalSlices(a,t)},n.prototype.nearestNeighbour=function(){if(1===arguments.length){if(S(arguments[0],an)){var e=arguments[0],t=new en(this.getRoot(),this.getRoot(),e);return this.nearestNeighbour(t)}if(arguments[0]instanceof en){var r=arguments[0];return this.nearestNeighbour(r,m.POSITIVE_INFINITY)}}else if(2===arguments.length){if(arguments[0]instanceof n&&S(arguments[1],an)){var i=arguments[0],a=arguments[1],o=new en(this.getRoot(),i.getRoot(),a);return this.nearestNeighbour(o)}if(arguments[0]instanceof en&&"number"==typeof arguments[1]){var s=arguments[0],u=arguments[1],A=null,c=new Kt;for(c.add(s);!c.isEmpty()&&u>0;){var l=c.poll(),f=l.getDistance();if(f>=u)break;l.isLeaves()?(u=f,A=l):l.expandToQueue(c,u)}return[A.getBoundable(0).getItem(),A.getBoundable(1).getItem()]}}else if(3===arguments.length){var h=arguments[0],g=arguments[1],d=arguments[2],p=new zt(h,g),v=new en(this.getRoot(),p,d);return this.nearestNeighbour(v)[0]}},n.prototype.interfaces_=function(){return[Vt,t]},n.prototype.getClass=function(){return n},n.centreX=function(e){return n.avg(e.getMinX(),e.getMaxX())},n.avg=function(e,t){return(e+t)/2},n.centreY=function(e){return n.avg(e.getMinY(),e.getMaxY())},r.STRtreeNode.get=function(){return sn},r.serialVersionUID.get=function(){return 0x39920f7d5f261e0},r.xComparator.get=function(){return{interfaces_:function(){return[C]},compare:function(t,r){return e.compareDoubles(n.centreX(t.getBounds()),n.centreX(r.getBounds()))}}},r.yComparator.get=function(){return{interfaces_:function(){return[C]},compare:function(t,r){return e.compareDoubles(n.centreY(t.getBounds()),n.centreY(r.getBounds()))}}},r.intersectsOp.get=function(){return{interfaces_:function(){return[e.IntersectsOp]},intersects:function(e,t){return e.intersects(t)}}},r.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(n,r),n}(tn),sn=function(e){function t(){var t=arguments[0];e.call(this,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.computeBounds=function(){for(var e=null,t=this.getChildBoundables().iterator();t.hasNext();){var n=t.next();null===e?e=new J(n.getBounds()):e.expandToInclude(n.getBounds())}return e},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Xt),un=function(){};un.prototype.interfaces_=function(){return[]},un.prototype.getClass=function(){return un},un.relativeSign=function(e,t){return e<t?-1:e>t?1:0},un.compare=function(e,t,n){if(t.equals2D(n))return 0;var r=un.relativeSign(t.x,n.x),i=un.relativeSign(t.y,n.y);switch(e){case 0:return un.compareValue(r,i);case 1:return un.compareValue(i,r);case 2:return un.compareValue(i,-r);case 3:return un.compareValue(-r,i);case 4:return un.compareValue(-r,-i);case 5:return un.compareValue(-i,-r);case 6:return un.compareValue(-i,r);case 7:return un.compareValue(r,-i)}return te.shouldNeverReachHere("invalid octant value"),0},un.compareValue=function(e,t){return e<0?-1:e>0?1:t<0?-1:t>0?1:0};var An=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var e=arguments[0],t=arguments[1],n=arguments[2],r=arguments[3];this._segString=e,this.coord=new B(t),this.segmentIndex=n,this._segmentOctant=r,this._isInterior=!t.equals2D(e.getCoordinate(n))};An.prototype.getCoordinate=function(){return this.coord},An.prototype.print=function(e){e.print(this.coord),e.print(" seg # = "+this.segmentIndex)},An.prototype.compareTo=function(e){var t=e;return this.segmentIndex<t.segmentIndex?-1:this.segmentIndex>t.segmentIndex?1:this.coord.equals2D(t.coord)?0:un.compare(this._segmentOctant,this.coord,t.coord)},An.prototype.isEndPoint=function(e){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===e},An.prototype.isInterior=function(){return this._isInterior},An.prototype.interfaces_=function(){return[b]},An.prototype.getClass=function(){return An};var cn=function(){this._nodeMap=new l,this._edge=null;var e=arguments[0];this._edge=e};cn.prototype.getSplitCoordinates=function(){var e=new we;this.addEndpoints();for(var t=this.iterator(),n=t.next();t.hasNext();){var r=t.next();this.addEdgeCoordinates(n,r,e),n=r}return e.toCoordinateArray()},cn.prototype.addCollapsedNodes=function(){var e=new Ce;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(var t=e.iterator();t.hasNext();){var n=t.next().intValue();this.add(this._edge.getCoordinate(n),n)}},cn.prototype.print=function(e){e.println("Intersections:");for(var t=this.iterator();t.hasNext();)t.next().print(e)},cn.prototype.findCollapsesFromExistingVertices=function(e){for(var t=0;t<this._edge.size()-2;t++){var n=this._edge.getCoordinate(t),r=this._edge.getCoordinate(t+2);n.equals2D(r)&&e.add(new j(t+1))}},cn.prototype.addEdgeCoordinates=function(e,t,n){var r=this._edge.getCoordinate(t.segmentIndex),i=t.isInterior()||!t.coord.equals2D(r);n.add(new B(e.coord),!1);for(var a=e.segmentIndex+1;a<=t.segmentIndex;a++)n.add(this._edge.getCoordinate(a));i&&n.add(new B(t.coord))},cn.prototype.iterator=function(){return this._nodeMap.values().iterator()},cn.prototype.addSplitEdges=function(e){this.addEndpoints(),this.addCollapsedNodes();for(var t=this.iterator(),n=t.next();t.hasNext();){var r=t.next(),i=this.createSplitEdge(n,r);e.add(i),n=r}},cn.prototype.findCollapseIndex=function(e,t,n){if(!e.coord.equals2D(t.coord))return!1;var r=t.segmentIndex-e.segmentIndex;return t.isInterior()||r--,1===r&&(n[0]=e.segmentIndex+1,!0)},cn.prototype.findCollapsesFromInsertedNodes=function(e){for(var t=new Array(1).fill(null),n=this.iterator(),r=n.next();n.hasNext();){var i=n.next();this.findCollapseIndex(r,i,t)&&e.add(new j(t[0])),r=i}},cn.prototype.getEdge=function(){return this._edge},cn.prototype.addEndpoints=function(){var e=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(e),e)},cn.prototype.createSplitEdge=function(e,t){var n=t.segmentIndex-e.segmentIndex+2,r=this._edge.getCoordinate(t.segmentIndex),i=t.isInterior()||!t.coord.equals2D(r);i||n--;var a=new Array(n).fill(null),o=0;a[o++]=new B(e.coord);for(var s=e.segmentIndex+1;s<=t.segmentIndex;s++)a[o++]=this._edge.getCoordinate(s);return i&&(a[o]=new B(t.coord)),new gn(a,this._edge.getData())},cn.prototype.add=function(e,t){var n=new An(this._edge,e,t,this._edge.getSegmentOctant(t)),r=this._nodeMap.get(n);return null!==r?(te.isTrue(r.coord.equals2D(e),"Found equal nodes with different coordinates"),r):(this._nodeMap.put(n,n),n)},cn.prototype.checkSplitEdgesCorrectness=function(e){var t=this._edge.getCoordinates(),n=e.get(0).getCoordinate(0);if(!n.equals2D(t[0]))throw new $("bad split edge start point at "+n);var r=e.get(e.size()-1).getCoordinates(),i=r[r.length-1];if(!i.equals2D(t[t.length-1]))throw new $("bad split edge end point at "+i)},cn.prototype.interfaces_=function(){return[]},cn.prototype.getClass=function(){return cn};var ln=function(){};ln.prototype.interfaces_=function(){return[]},ln.prototype.getClass=function(){return ln},ln.octant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var e=arguments[0],t=arguments[1];if(0===e&&0===t)throw new y("Cannot compute the octant for point ( "+e+", "+t+" )");var n=Math.abs(e),r=Math.abs(t);return e>=0?t>=0?n>=r?0:1:n>=r?7:6:t>=0?n>=r?3:2:n>=r?4:5}if(arguments[0]instanceof B&&arguments[1]instanceof B){var i=arguments[0],a=arguments[1],o=a.x-i.x,s=a.y-i.y;if(0===o&&0===s)throw new y("Cannot compute the octant for two identical points "+i);return ln.octant(o,s)}};var fn=function(){};fn.prototype.getCoordinates=function(){},fn.prototype.size=function(){},fn.prototype.getCoordinate=function(e){},fn.prototype.isClosed=function(){},fn.prototype.setData=function(e){},fn.prototype.getData=function(){},fn.prototype.interfaces_=function(){return[]},fn.prototype.getClass=function(){return fn};var hn=function(){};hn.prototype.addIntersection=function(e,t){},hn.prototype.interfaces_=function(){return[fn]},hn.prototype.getClass=function(){return hn};var gn=function(){this._nodeList=new cn(this),this._pts=null,this._data=null;var e=arguments[0],t=arguments[1];this._pts=e,this._data=t};gn.prototype.getCoordinates=function(){return this._pts},gn.prototype.size=function(){return this._pts.length},gn.prototype.getCoordinate=function(e){return this._pts[e]},gn.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},gn.prototype.getSegmentOctant=function(e){return e===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(e),this.getCoordinate(e+1))},gn.prototype.setData=function(e){this._data=e},gn.prototype.safeOctant=function(e,t){return e.equals2D(t)?0:ln.octant(e,t)},gn.prototype.getData=function(){return this._data},gn.prototype.addIntersection=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];this.addIntersectionNode(e,t)}else if(4===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[3],a=new B(n.getIntersection(i));this.addIntersection(a,r)}},gn.prototype.toString=function(){return Z.toLineString(new ut(this._pts))},gn.prototype.getNodeList=function(){return this._nodeList},gn.prototype.addIntersectionNode=function(e,t){var n=t,r=n+1;if(r<this._pts.length){var i=this._pts[r];e.equals2D(i)&&(n=r)}return this._nodeList.add(e,n)},gn.prototype.addIntersections=function(e,t,n){for(var r=0;r<e.getIntersectionNum();r++)this.addIntersection(e,t,n,r)},gn.prototype.interfaces_=function(){return[hn]},gn.prototype.getClass=function(){return gn},gn.getNodedSubstrings=function(){if(1===arguments.length){var e=arguments[0],t=new Ce;return gn.getNodedSubstrings(e,t),t}if(2===arguments.length)for(var n=arguments[0],r=arguments[1],i=n.iterator();i.hasNext();)i.next().getNodeList().addSplitEdges(r)};var dn=function(){if(this.p0=null,this.p1=null,0===arguments.length)this.p0=new B,this.p1=new B;else if(1===arguments.length){var e=arguments[0];this.p0=new B(e.p0),this.p1=new B(e.p1)}else if(2===arguments.length)this.p0=arguments[0],this.p1=arguments[1];else if(4===arguments.length){var t=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3];this.p0=new B(t,n),this.p1=new B(r,i)}},pn={serialVersionUID:{configurable:!0}};dn.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},dn.prototype.orientationIndex=function(){if(arguments[0]instanceof dn){var e=arguments[0],t=se.orientationIndex(this.p0,this.p1,e.p0),n=se.orientationIndex(this.p0,this.p1,e.p1);return t>=0&&n>=0||t<=0&&n<=0?Math.max(t,n):0}if(arguments[0]instanceof B){var r=arguments[0];return se.orientationIndex(this.p0,this.p1,r)}},dn.prototype.toGeometry=function(e){return e.createLineString([this.p0,this.p1])},dn.prototype.isVertical=function(){return this.p0.x===this.p1.x},dn.prototype.equals=function(e){if(!(e instanceof dn))return!1;var t=e;return this.p0.equals(t.p0)&&this.p1.equals(t.p1)},dn.prototype.intersection=function(e){var t=new ie;return t.computeIntersection(this.p0,this.p1,e.p0,e.p1),t.hasIntersection()?t.getIntersection(0):null},dn.prototype.project=function(){if(arguments[0]instanceof B){var e=arguments[0];if(e.equals(this.p0)||e.equals(this.p1))return new B(e);var t=this.projectionFactor(e),n=new B;return n.x=this.p0.x+t*(this.p1.x-this.p0.x),n.y=this.p0.y+t*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof dn){var r=arguments[0],i=this.projectionFactor(r.p0),a=this.projectionFactor(r.p1);if(i>=1&&a>=1)return null;if(i<=0&&a<=0)return null;var o=this.project(r.p0);i<0&&(o=this.p0),i>1&&(o=this.p1);var s=this.project(r.p1);return a<0&&(s=this.p0),a>1&&(s=this.p1),new dn(o,s)}},dn.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},dn.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},dn.prototype.getCoordinate=function(e){return 0===e?this.p0:this.p1},dn.prototype.distancePerpendicular=function(e){return se.distancePointLinePerpendicular(e,this.p0,this.p1)},dn.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},dn.prototype.midPoint=function(){return dn.midPoint(this.p0,this.p1)},dn.prototype.projectionFactor=function(e){if(e.equals(this.p0))return 0;if(e.equals(this.p1))return 1;var t=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,r=t*t+n*n;return r<=0?m.NaN:((e.x-this.p0.x)*t+(e.y-this.p0.y)*n)/r},dn.prototype.closestPoints=function(e){var t=this.intersection(e);if(null!==t)return[t,t];var n=new Array(2).fill(null),r=m.MAX_VALUE,i=null,a=this.closestPoint(e.p0);r=a.distance(e.p0),n[0]=a,n[1]=e.p0;var o=this.closestPoint(e.p1);(i=o.distance(e.p1))<r&&(r=i,n[0]=o,n[1]=e.p1);var s=e.closestPoint(this.p0);(i=s.distance(this.p0))<r&&(r=i,n[0]=this.p0,n[1]=s);var u=e.closestPoint(this.p1);return(i=u.distance(this.p1))<r&&(r=i,n[0]=this.p1,n[1]=u),n},dn.prototype.closestPoint=function(e){var t=this.projectionFactor(e);return t>0&&t<1?this.project(e):this.p0.distance(e)<this.p1.distance(e)?this.p0:this.p1},dn.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},dn.prototype.getLength=function(){return this.p0.distance(this.p1)},dn.prototype.compareTo=function(e){var t=e,n=this.p0.compareTo(t.p0);return 0!==n?n:this.p1.compareTo(t.p1)},dn.prototype.reverse=function(){var e=this.p0;this.p0=this.p1,this.p1=e},dn.prototype.equalsTopo=function(e){return this.p0.equals(e.p0)&&(this.p1.equals(e.p1)||this.p0.equals(e.p1))&&this.p1.equals(e.p0)},dn.prototype.lineIntersection=function(e){try{return Y.intersection(this.p0,this.p1,e.p0,e.p1)}catch(e){if(!(e instanceof q))throw e}return null},dn.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},dn.prototype.pointAlongOffset=function(e,t){var n=this.p0.x+e*(this.p1.x-this.p0.x),r=this.p0.y+e*(this.p1.y-this.p0.y),i=this.p1.x-this.p0.x,a=this.p1.y-this.p0.y,o=Math.sqrt(i*i+a*a),s=0,u=0;if(0!==t){if(o<=0)throw new Error("Cannot compute offset from zero-length line segment");s=t*i/o,u=t*a/o}return new B(n-u,r+s)},dn.prototype.setCoordinates=function(){if(1===arguments.length){var e=arguments[0];this.setCoordinates(e.p0,e.p1)}else if(2===arguments.length){var t=arguments[0],n=arguments[1];this.p0.x=t.x,this.p0.y=t.y,this.p1.x=n.x,this.p1.y=n.y}},dn.prototype.segmentFraction=function(e){var t=this.projectionFactor(e);return t<0?t=0:(t>1||m.isNaN(t))&&(t=1),t},dn.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},dn.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},dn.prototype.distance=function(){if(arguments[0]instanceof dn){var e=arguments[0];return se.distanceLineLine(this.p0,this.p1,e.p0,e.p1)}if(arguments[0]instanceof B){var t=arguments[0];return se.distancePointLine(t,this.p0,this.p1)}},dn.prototype.pointAlong=function(e){var t=new B;return t.x=this.p0.x+e*(this.p1.x-this.p0.x),t.y=this.p0.y+e*(this.p1.y-this.p0.y),t},dn.prototype.hashCode=function(){var e=m.doubleToLongBits(this.p0.x);e^=31*m.doubleToLongBits(this.p0.y);var t=Math.trunc(e)^Math.trunc(e>>32),n=m.doubleToLongBits(this.p1.x);return n^=31*m.doubleToLongBits(this.p1.y),t^Math.trunc(n)^Math.trunc(n>>32)},dn.prototype.interfaces_=function(){return[b,t]},dn.prototype.getClass=function(){return dn},dn.midPoint=function(e,t){return new B((e.x+t.x)/2,(e.y+t.y)/2)},pn.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(dn,pn);var vn=function(){this.tempEnv1=new J,this.tempEnv2=new J,this._overlapSeg1=new dn,this._overlapSeg2=new dn};vn.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var e=arguments[0],t=arguments[1],n=arguments[2],r=arguments[3];e.getLineSegment(t,this._overlapSeg1),n.getLineSegment(r,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},vn.prototype.interfaces_=function(){return[]},vn.prototype.getClass=function(){return vn};var yn=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var e=arguments[0],t=arguments[1],n=arguments[2],r=arguments[3];this._pts=e,this._start=t,this._end=n,this._context=r};yn.prototype.getLineSegment=function(e,t){t.p0=this._pts[e],t.p1=this._pts[e+1]},yn.prototype.computeSelect=function(e,t,n,r){var i=this._pts[t],a=this._pts[n];if(r.tempEnv1.init(i,a),n-t==1)return r.select(this,t),null;if(!e.intersects(r.tempEnv1))return null;var o=Math.trunc((t+n)/2);t<o&&this.computeSelect(e,t,o,r),o<n&&this.computeSelect(e,o,n,r)},yn.prototype.getCoordinates=function(){for(var e=new Array(this._end-this._start+1).fill(null),t=0,n=this._start;n<=this._end;n++)e[t++]=this._pts[n];return e},yn.prototype.computeOverlaps=function(e,t){this.computeOverlapsInternal(this._start,this._end,e,e._start,e._end,t)},yn.prototype.setId=function(e){this._id=e},yn.prototype.select=function(e,t){this.computeSelect(e,this._start,this._end,t)},yn.prototype.getEnvelope=function(){if(null===this._env){var e=this._pts[this._start],t=this._pts[this._end];this._env=new J(e,t)}return this._env},yn.prototype.getEndIndex=function(){return this._end},yn.prototype.getStartIndex=function(){return this._start},yn.prototype.getContext=function(){return this._context},yn.prototype.getId=function(){return this._id},yn.prototype.computeOverlapsInternal=function(e,t,n,r,i,a){var o=this._pts[e],s=this._pts[t],u=n._pts[r],A=n._pts[i];if(t-e==1&&i-r==1)return a.overlap(this,e,n,r),null;if(a.tempEnv1.init(o,s),a.tempEnv2.init(u,A),!a.tempEnv1.intersects(a.tempEnv2))return null;var c=Math.trunc((e+t)/2),l=Math.trunc((r+i)/2);e<c&&(r<l&&this.computeOverlapsInternal(e,c,n,r,l,a),l<i&&this.computeOverlapsInternal(e,c,n,l,i,a)),c<t&&(r<l&&this.computeOverlapsInternal(c,t,n,r,l,a),l<i&&this.computeOverlapsInternal(c,t,n,l,i,a))},yn.prototype.interfaces_=function(){return[]},yn.prototype.getClass=function(){return yn};var mn=function(){};mn.prototype.interfaces_=function(){return[]},mn.prototype.getClass=function(){return mn},mn.getChainStartIndices=function(e){var t=0,n=new Ce;n.add(new j(t));do{var r=mn.findChainEnd(e,t);n.add(new j(r)),t=r}while(t<e.length-1);return mn.toIntArray(n)},mn.findChainEnd=function(e,t){for(var n=t;n<e.length-1&&e[n].equals2D(e[n+1]);)n++;if(n>=e.length-1)return e.length-1;for(var r=Lt.quadrant(e[n],e[n+1]),i=t+1;i<e.length&&(e[i-1].equals2D(e[i])||Lt.quadrant(e[i-1],e[i])===r);)i++;return i-1},mn.getChains=function(){if(1===arguments.length){var e=arguments[0];return mn.getChains(e,null)}if(2===arguments.length){for(var t=arguments[0],n=arguments[1],r=new Ce,i=mn.getChainStartIndices(t),a=0;a<i.length-1;a++){var o=new yn(t,i[a],i[a+1],n);r.add(o)}return r}},mn.toIntArray=function(e){for(var t=new Array(e.size()).fill(null),n=0;n<t.length;n++)t[n]=e.get(n).intValue();return t};var In=function(){};In.prototype.computeNodes=function(e){},In.prototype.getNodedSubstrings=function(){},In.prototype.interfaces_=function(){return[]},In.prototype.getClass=function(){return In};var bn=function(){if(this._segInt=null,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.setSegmentIntersector(e)}};bn.prototype.setSegmentIntersector=function(e){this._segInt=e},bn.prototype.interfaces_=function(){return[In]},bn.prototype.getClass=function(){return bn};var En=function(e){function t(t){t?e.call(this,t):e.call(this),this._monoChains=new Ce,this._index=new on,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}e&&(t.__proto__=e),(t.prototype=Object.create(e&&e.prototype)).constructor=t;var n={SegmentOverlapAction:{configurable:!0}};return t.prototype.getMonotoneChains=function(){return this._monoChains},t.prototype.getNodedSubstrings=function(){return gn.getNodedSubstrings(this._nodedSegStrings)},t.prototype.getIndex=function(){return this._index},t.prototype.add=function(e){for(var t=mn.getChains(e.getCoordinates(),e).iterator();t.hasNext();){var n=t.next();n.setId(this._idCounter++),this._index.insert(n.getEnvelope(),n),this._monoChains.add(n)}},t.prototype.computeNodes=function(e){this._nodedSegStrings=e;for(var t=e.iterator();t.hasNext();)this.add(t.next());this.intersectChains()},t.prototype.intersectChains=function(){for(var e=new Cn(this._segInt),t=this._monoChains.iterator();t.hasNext();)for(var n=t.next(),r=this._index.query(n.getEnvelope()).iterator();r.hasNext();){var i=r.next();if(i.getId()>n.getId()&&(n.computeOverlaps(i,e),this._nOverlaps++),this._segInt.isDone())return null}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},n.SegmentOverlapAction.get=function(){return Cn},Object.defineProperties(t,n),t}(bn),Cn=function(e){function t(){e.call(this),this._si=null;var t=arguments[0];this._si=t}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.overlap=function(){if(4!==arguments.length)return e.prototype.overlap.apply(this,arguments);var t=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3],a=t.getContext(),o=r.getContext();this._si.processIntersections(a,n,o,i)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(vn),Bn=function e(){if(this._quadrantSegments=e.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=e.CAP_ROUND,this._joinStyle=e.JOIN_ROUND,this._mitreLimit=e.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=e.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.setQuadrantSegments(t)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(r)}else if(4===arguments.length){var i=arguments[0],a=arguments[1],o=arguments[2],s=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(a),this.setJoinStyle(o),this.setMitreLimit(s)}},wn={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};Bn.prototype.getEndCapStyle=function(){return this._endCapStyle},Bn.prototype.isSingleSided=function(){return this._isSingleSided},Bn.prototype.setQuadrantSegments=function(e){this._quadrantSegments=e,0===this._quadrantSegments&&(this._joinStyle=Bn.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Bn.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),e<=0&&(this._quadrantSegments=1),this._joinStyle!==Bn.JOIN_ROUND&&(this._quadrantSegments=Bn.DEFAULT_QUADRANT_SEGMENTS)},Bn.prototype.getJoinStyle=function(){return this._joinStyle},Bn.prototype.setJoinStyle=function(e){this._joinStyle=e},Bn.prototype.setSimplifyFactor=function(e){this._simplifyFactor=e<0?0:e},Bn.prototype.getSimplifyFactor=function(){return this._simplifyFactor},Bn.prototype.getQuadrantSegments=function(){return this._quadrantSegments},Bn.prototype.setEndCapStyle=function(e){this._endCapStyle=e},Bn.prototype.getMitreLimit=function(){return this._mitreLimit},Bn.prototype.setMitreLimit=function(e){this._mitreLimit=e},Bn.prototype.setSingleSided=function(e){this._isSingleSided=e},Bn.prototype.interfaces_=function(){return[]},Bn.prototype.getClass=function(){return Bn},Bn.bufferDistanceError=function(e){var t=Math.PI/2/e;return 1-Math.cos(t/2)},wn.CAP_ROUND.get=function(){return 1},wn.CAP_FLAT.get=function(){return 2},wn.CAP_SQUARE.get=function(){return 3},wn.JOIN_ROUND.get=function(){return 1},wn.JOIN_MITRE.get=function(){return 2},wn.JOIN_BEVEL.get=function(){return 3},wn.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},wn.DEFAULT_MITRE_LIMIT.get=function(){return 5},wn.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(Bn,wn);var Qn=function(e){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=se.COUNTERCLOCKWISE,this._inputLine=e||null},kn={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Qn.prototype.isDeletable=function(e,t,n,r){var i=this._inputLine[e],a=this._inputLine[t],o=this._inputLine[n];return!!this.isConcave(i,a,o)&&!!this.isShallow(i,a,o,r)&&this.isShallowSampled(i,a,e,n,r)},Qn.prototype.deleteShallowConcavities=function(){for(var e=1,t=this.findNextNonDeletedIndex(e),n=this.findNextNonDeletedIndex(t),r=!1;n<this._inputLine.length;){var i=!1;this.isDeletable(e,t,n,this._distanceTol)&&(this._isDeleted[t]=Qn.DELETE,i=!0,r=!0),e=i?n:t,t=this.findNextNonDeletedIndex(e),n=this.findNextNonDeletedIndex(t)}return r},Qn.prototype.isShallowConcavity=function(e,t,n,r){return se.computeOrientation(e,t,n)===this._angleOrientation&&se.distancePointLine(t,e,n)<r},Qn.prototype.isShallowSampled=function(e,t,n,r,i){var a=Math.trunc((r-n)/Qn.NUM_PTS_TO_CHECK);a<=0&&(a=1);for(var o=n;o<r;o+=a)if(!this.isShallow(e,t,this._inputLine[o],i))return!1;return!0},Qn.prototype.isConcave=function(e,t,n){return se.computeOrientation(e,t,n)===this._angleOrientation},Qn.prototype.simplify=function(e){this._distanceTol=Math.abs(e),e<0&&(this._angleOrientation=se.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var t=!1;do{t=this.deleteShallowConcavities()}while(t);return this.collapseLine()},Qn.prototype.findNextNonDeletedIndex=function(e){for(var t=e+1;t<this._inputLine.length&&this._isDeleted[t]===Qn.DELETE;)t++;return t},Qn.prototype.isShallow=function(e,t,n,r){return se.distancePointLine(t,e,n)<r},Qn.prototype.collapseLine=function(){for(var e=new we,t=0;t<this._inputLine.length;t++)this._isDeleted[t]!==Qn.DELETE&&e.add(this._inputLine[t]);return e.toCoordinateArray()},Qn.prototype.interfaces_=function(){return[]},Qn.prototype.getClass=function(){return Qn},Qn.simplify=function(e,t){return new Qn(e).simplify(t)},kn.INIT.get=function(){return 0},kn.DELETE.get=function(){return 1},kn.KEEP.get=function(){return 1},kn.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(Qn,kn);var _n=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new Ce},xn={COORDINATE_ARRAY_TYPE:{configurable:!0}};_n.prototype.getCoordinates=function(){return this._ptList.toArray(_n.COORDINATE_ARRAY_TYPE)},_n.prototype.setPrecisionModel=function(e){this._precisionModel=e},_n.prototype.addPt=function(e){var t=new B(e);if(this._precisionModel.makePrecise(t),this.isRedundant(t))return null;this._ptList.add(t)},_n.prototype.revere=function(){},_n.prototype.addPts=function(e,t){if(t)for(var n=0;n<e.length;n++)this.addPt(e[n]);else for(var r=e.length-1;r>=0;r--)this.addPt(e[r])},_n.prototype.isRedundant=function(e){if(this._ptList.size()<1)return!1;var t=this._ptList.get(this._ptList.size()-1);return e.distance(t)<this._minimimVertexDistance},_n.prototype.toString=function(){return(new vt).createLineString(this.getCoordinates()).toString()},_n.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var e=new B(this._ptList.get(0)),t=this._ptList.get(this._ptList.size()-1);if(e.equals(t))return null;this._ptList.add(e)},_n.prototype.setMinimumVertexDistance=function(e){this._minimimVertexDistance=e},_n.prototype.interfaces_=function(){return[]},_n.prototype.getClass=function(){return _n},xn.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(_n,xn);var Sn=function(){},On={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};Sn.prototype.interfaces_=function(){return[]},Sn.prototype.getClass=function(){return Sn},Sn.toDegrees=function(e){return 180*e/Math.PI},Sn.normalize=function(e){for(;e>Math.PI;)e-=Sn.PI_TIMES_2;for(;e<=-Math.PI;)e+=Sn.PI_TIMES_2;return e},Sn.angle=function(){if(1===arguments.length){var e=arguments[0];return Math.atan2(e.y,e.x)}if(2===arguments.length){var t=arguments[0],n=arguments[1],r=n.x-t.x,i=n.y-t.y;return Math.atan2(i,r)}},Sn.isAcute=function(e,t,n){var r=e.x-t.x,i=e.y-t.y;return r*(n.x-t.x)+i*(n.y-t.y)>0},Sn.isObtuse=function(e,t,n){var r=e.x-t.x,i=e.y-t.y;return r*(n.x-t.x)+i*(n.y-t.y)<0},Sn.interiorAngle=function(e,t,n){var r=Sn.angle(t,e),i=Sn.angle(t,n);return Math.abs(i-r)},Sn.normalizePositive=function(e){if(e<0){for(;e<0;)e+=Sn.PI_TIMES_2;e>=Sn.PI_TIMES_2&&(e=0)}else{for(;e>=Sn.PI_TIMES_2;)e-=Sn.PI_TIMES_2;e<0&&(e=0)}return e},Sn.angleBetween=function(e,t,n){var r=Sn.angle(t,e),i=Sn.angle(t,n);return Sn.diff(r,i)},Sn.diff=function(e,t){var n=null;return(n=e<t?t-e:e-t)>Math.PI&&(n=2*Math.PI-n),n},Sn.toRadians=function(e){return e*Math.PI/180},Sn.getTurn=function(e,t){var n=Math.sin(t-e);return n>0?Sn.COUNTERCLOCKWISE:n<0?Sn.CLOCKWISE:Sn.NONE},Sn.angleBetweenOriented=function(e,t,n){var r=Sn.angle(t,e),i=Sn.angle(t,n)-r;return i<=-Math.PI?i+Sn.PI_TIMES_2:i>Math.PI?i-Sn.PI_TIMES_2:i},On.PI_TIMES_2.get=function(){return 2*Math.PI},On.PI_OVER_2.get=function(){return Math.PI/2},On.PI_OVER_4.get=function(){return Math.PI/4},On.COUNTERCLOCKWISE.get=function(){return se.COUNTERCLOCKWISE},On.CLOCKWISE.get=function(){return se.CLOCKWISE},On.NONE.get=function(){return se.COLLINEAR},Object.defineProperties(Sn,On);var Dn=function e(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new dn,this._seg1=new dn,this._offset0=new dn,this._offset1=new dn,this._side=0,this._hasNarrowConcaveAngle=!1;var t=arguments[0],n=arguments[1],r=arguments[2];this._precisionModel=t,this._bufParams=n,this._li=new ie,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===Bn.JOIN_ROUND&&(this._closingSegLengthFactor=e.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},Rn={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};Dn.prototype.addNextSegment=function(e,t){if(this._s0=this._s1,this._s1=this._s2,this._s2=e,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=se.computeOrientation(this._s0,this._s1,this._s2),r=n===se.CLOCKWISE&&this._side===wt.LEFT||n===se.COUNTERCLOCKWISE&&this._side===wt.RIGHT;0===n?this.addCollinear(t):r?this.addOutsideTurn(n,t):this.addInsideTurn(n,t)},Dn.prototype.addLineEndCap=function(e,t){var n=new dn(e,t),r=new dn;this.computeOffsetSegment(n,wt.LEFT,this._distance,r);var i=new dn;this.computeOffsetSegment(n,wt.RIGHT,this._distance,i);var a=t.x-e.x,o=t.y-e.y,s=Math.atan2(o,a);switch(this._bufParams.getEndCapStyle()){case Bn.CAP_ROUND:this._segList.addPt(r.p1),this.addFilletArc(t,s+Math.PI/2,s-Math.PI/2,se.CLOCKWISE,this._distance),this._segList.addPt(i.p1);break;case Bn.CAP_FLAT:this._segList.addPt(r.p1),this._segList.addPt(i.p1);break;case Bn.CAP_SQUARE:var u=new B;u.x=Math.abs(this._distance)*Math.cos(s),u.y=Math.abs(this._distance)*Math.sin(s);var A=new B(r.p1.x+u.x,r.p1.y+u.y),c=new B(i.p1.x+u.x,i.p1.y+u.y);this._segList.addPt(A),this._segList.addPt(c)}},Dn.prototype.getCoordinates=function(){return this._segList.getCoordinates()},Dn.prototype.addMitreJoin=function(e,t,n,r){var i=!0,a=null;try{a=Y.intersection(t.p0,t.p1,n.p0,n.p1),(r<=0?1:a.distance(e)/Math.abs(r))>this._bufParams.getMitreLimit()&&(i=!1)}catch(e){if(!(e instanceof q))throw e;a=new B(0,0),i=!1}i?this._segList.addPt(a):this.addLimitedMitreJoin(t,n,r,this._bufParams.getMitreLimit())},Dn.prototype.addFilletCorner=function(e,t,n,r,i){var a=t.x-e.x,o=t.y-e.y,s=Math.atan2(o,a),u=n.x-e.x,A=n.y-e.y,c=Math.atan2(A,u);r===se.CLOCKWISE?s<=c&&(s+=2*Math.PI):s>=c&&(s-=2*Math.PI),this._segList.addPt(t),this.addFilletArc(e,s,c,r,i),this._segList.addPt(n)},Dn.prototype.addOutsideTurn=function(e,t){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*Dn.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===Bn.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===Bn.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(t&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,e,this._distance),this._segList.addPt(this._offset1.p0))},Dn.prototype.createSquare=function(e){this._segList.addPt(new B(e.x+this._distance,e.y+this._distance)),this._segList.addPt(new B(e.x+this._distance,e.y-this._distance)),this._segList.addPt(new B(e.x-this._distance,e.y-this._distance)),this._segList.addPt(new B(e.x-this._distance,e.y+this._distance)),this._segList.closeRing()},Dn.prototype.addSegments=function(e,t){this._segList.addPts(e,t)},Dn.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},Dn.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},Dn.prototype.initSideSegments=function(e,t,n){this._s1=e,this._s2=t,this._side=n,this._seg1.setCoordinates(e,t),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)},Dn.prototype.addLimitedMitreJoin=function(e,t,n,r){var i=this._seg0.p1,a=Sn.angle(i,this._seg0.p0),o=Sn.angleBetweenOriented(this._seg0.p0,i,this._seg1.p1)/2,s=Sn.normalize(a+o),u=Sn.normalize(s+Math.PI),A=r*n,c=n-A*Math.abs(Math.sin(o)),l=i.x+A*Math.cos(u),f=i.y+A*Math.sin(u),h=new B(l,f),g=new dn(i,h),d=g.pointAlongOffset(1,c),p=g.pointAlongOffset(1,-c);this._side===wt.LEFT?(this._segList.addPt(d),this._segList.addPt(p)):(this._segList.addPt(p),this._segList.addPt(d))},Dn.prototype.computeOffsetSegment=function(e,t,n,r){var i=t===wt.LEFT?1:-1,a=e.p1.x-e.p0.x,o=e.p1.y-e.p0.y,s=Math.sqrt(a*a+o*o),u=i*n*a/s,A=i*n*o/s;r.p0.x=e.p0.x-A,r.p0.y=e.p0.y+u,r.p1.x=e.p1.x-A,r.p1.y=e.p1.y+u},Dn.prototype.addFilletArc=function(e,t,n,r,i){var a=r===se.CLOCKWISE?-1:1,o=Math.abs(t-n),s=Math.trunc(o/this._filletAngleQuantum+.5);if(s<1)return null;for(var u=o/s,A=0,c=new B;A<o;){var l=t+a*A;c.x=e.x+i*Math.cos(l),c.y=e.y+i*Math.sin(l),this._segList.addPt(c),A+=u}},Dn.prototype.addInsideTurn=function(e,t){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*Dn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var n=new B((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var r=new B((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},Dn.prototype.createCircle=function(e){var t=new B(e.x+this._distance,e.y);this._segList.addPt(t),this.addFilletArc(e,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},Dn.prototype.addBevelJoin=function(e,t){this._segList.addPt(e.p1),this._segList.addPt(t.p0)},Dn.prototype.init=function(e){this._distance=e,this._maxCurveSegmentError=e*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new _n,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(e*Dn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},Dn.prototype.addCollinear=function(e){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===Bn.JOIN_BEVEL||this._bufParams.getJoinStyle()===Bn.JOIN_MITRE?(e&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,se.CLOCKWISE,this._distance))},Dn.prototype.closeRing=function(){this._segList.closeRing()},Dn.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},Dn.prototype.interfaces_=function(){return[]},Dn.prototype.getClass=function(){return Dn},Rn.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},Rn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},Rn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},Rn.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(Dn,Rn);var jn=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var e=arguments[0],t=arguments[1];this._precisionModel=e,this._bufParams=t};jn.prototype.getOffsetCurve=function(e,t){if(this._distance=t,0===t)return null;var n=t<0,r=Math.abs(t),i=this.getSegGen(r);e.length<=1?this.computePointCurve(e[0],i):this.computeOffsetCurve(e,n,i);var a=i.getCoordinates();return n&&Qe.reverse(a),a},jn.prototype.computeSingleSidedBufferCurve=function(e,t,n){var r=this.simplifyTolerance(this._distance);if(t){n.addSegments(e,!0);var i=Qn.simplify(e,-r),a=i.length-1;n.initSideSegments(i[a],i[a-1],wt.LEFT),n.addFirstSegment();for(var o=a-2;o>=0;o--)n.addNextSegment(i[o],!0)}else{n.addSegments(e,!1);var s=Qn.simplify(e,r),u=s.length-1;n.initSideSegments(s[0],s[1],wt.LEFT),n.addFirstSegment();for(var A=2;A<=u;A++)n.addNextSegment(s[A],!0)}n.addLastSegment(),n.closeRing()},jn.prototype.computeRingBufferCurve=function(e,t,n){var r=this.simplifyTolerance(this._distance);t===wt.RIGHT&&(r=-r);var i=Qn.simplify(e,r),a=i.length-1;n.initSideSegments(i[a-1],i[0],t);for(var o=1;o<=a;o++){var s=1!==o;n.addNextSegment(i[o],s)}n.closeRing()},jn.prototype.computeLineBufferCurve=function(e,t){var n=this.simplifyTolerance(this._distance),r=Qn.simplify(e,n),i=r.length-1;t.initSideSegments(r[0],r[1],wt.LEFT);for(var a=2;a<=i;a++)t.addNextSegment(r[a],!0);t.addLastSegment(),t.addLineEndCap(r[i-1],r[i]);var o=Qn.simplify(e,-n),s=o.length-1;t.initSideSegments(o[s],o[s-1],wt.LEFT);for(var u=s-2;u>=0;u--)t.addNextSegment(o[u],!0);t.addLastSegment(),t.addLineEndCap(o[1],o[0]),t.closeRing()},jn.prototype.computePointCurve=function(e,t){switch(this._bufParams.getEndCapStyle()){case Bn.CAP_ROUND:t.createCircle(e);break;case Bn.CAP_SQUARE:t.createSquare(e)}},jn.prototype.getLineCurve=function(e,t){if(this._distance=t,t<0&&!this._bufParams.isSingleSided())return null;if(0===t)return null;var n=Math.abs(t),r=this.getSegGen(n);if(e.length<=1)this.computePointCurve(e[0],r);else if(this._bufParams.isSingleSided()){var i=t<0;this.computeSingleSidedBufferCurve(e,i,r)}else this.computeLineBufferCurve(e,r);return r.getCoordinates()},jn.prototype.getBufferParameters=function(){return this._bufParams},jn.prototype.simplifyTolerance=function(e){return e*this._bufParams.getSimplifyFactor()},jn.prototype.getRingCurve=function(e,t,n){if(this._distance=n,e.length<=2)return this.getLineCurve(e,n);if(0===n)return jn.copyCoordinates(e);var r=this.getSegGen(n);return this.computeRingBufferCurve(e,t,r),r.getCoordinates()},jn.prototype.computeOffsetCurve=function(e,t,n){var r=this.simplifyTolerance(this._distance);if(t){var i=Qn.simplify(e,-r),a=i.length-1;n.initSideSegments(i[a],i[a-1],wt.LEFT),n.addFirstSegment();for(var o=a-2;o>=0;o--)n.addNextSegment(i[o],!0)}else{var s=Qn.simplify(e,r),u=s.length-1;n.initSideSegments(s[0],s[1],wt.LEFT),n.addFirstSegment();for(var A=2;A<=u;A++)n.addNextSegment(s[A],!0)}n.addLastSegment()},jn.prototype.getSegGen=function(e){return new Dn(this._precisionModel,this._bufParams,e)},jn.prototype.interfaces_=function(){return[]},jn.prototype.getClass=function(){return jn},jn.copyCoordinates=function(e){for(var t=new Array(e.length).fill(null),n=0;n<t.length;n++)t[n]=new B(e[n]);return t};var Mn=function(){this._subgraphs=null,this._seg=new dn,this._cga=new se;var e=arguments[0];this._subgraphs=e},Nn={DepthSegment:{configurable:!0}};Mn.prototype.findStabbedSegments=function(){if(1===arguments.length){for(var e=arguments[0],t=new Ce,n=this._subgraphs.iterator();n.hasNext();){var r=n.next(),i=r.getEnvelope();e.y<i.getMinY()||e.y>i.getMaxY()||this.findStabbedSegments(e,r.getDirectedEdges(),t)}return t}if(3===arguments.length)if(S(arguments[2],Ee)&&arguments[0]instanceof B&&arguments[1]instanceof Gt){for(var a=arguments[0],o=arguments[1],s=arguments[2],u=o.getEdge().getCoordinates(),A=0;A<u.length-1;A++)if(this._seg.p0=u[A],this._seg.p1=u[A+1],this._seg.p0.y>this._seg.p1.y&&this._seg.reverse(),!(Math.max(this._seg.p0.x,this._seg.p1.x)<a.x)&&!(this._seg.isHorizontal()||a.y<this._seg.p0.y||a.y>this._seg.p1.y||se.computeOrientation(this._seg.p0,this._seg.p1,a)===se.RIGHT)){var c=o.getDepth(wt.LEFT);this._seg.p0.equals(u[A])||(c=o.getDepth(wt.RIGHT));var l=new Fn(this._seg,c);s.add(l)}}else if(S(arguments[2],Ee)&&arguments[0]instanceof B&&S(arguments[1],Ee))for(var f=arguments[0],h=arguments[1],g=arguments[2],d=h.iterator();d.hasNext();){var p=d.next();p.isForward()&&this.findStabbedSegments(f,p,g)}},Mn.prototype.getDepth=function(e){var t=this.findStabbedSegments(e);return 0===t.size()?0:$t.min(t)._leftDepth},Mn.prototype.interfaces_=function(){return[]},Mn.prototype.getClass=function(){return Mn},Nn.DepthSegment.get=function(){return Fn},Object.defineProperties(Mn,Nn);var Fn=function(){this._upwardSeg=null,this._leftDepth=null;var e=arguments[0],t=arguments[1];this._upwardSeg=new dn(e),this._leftDepth=t};Fn.prototype.compareTo=function(e){var t=e;if(this._upwardSeg.minX()>=t._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=t._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(t._upwardSeg);return 0!==n||0!=(n=-1*t._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(t._upwardSeg)},Fn.prototype.compareX=function(e,t){var n=e.p0.compareTo(t.p0);return 0!==n?n:e.p1.compareTo(t.p1)},Fn.prototype.toString=function(){return this._upwardSeg.toString()},Fn.prototype.interfaces_=function(){return[b]},Fn.prototype.getClass=function(){return Fn};var Tn=function(e,t,n){this.p0=e||null,this.p1=t||null,this.p2=n||null};Tn.prototype.area=function(){return Tn.area(this.p0,this.p1,this.p2)},Tn.prototype.signedArea=function(){return Tn.signedArea(this.p0,this.p1,this.p2)},Tn.prototype.interpolateZ=function(e){if(null===e)throw new y("Supplied point is null.");return Tn.interpolateZ(e,this.p0,this.p1,this.p2)},Tn.prototype.longestSideLength=function(){return Tn.longestSideLength(this.p0,this.p1,this.p2)},Tn.prototype.isAcute=function(){return Tn.isAcute(this.p0,this.p1,this.p2)},Tn.prototype.circumcentre=function(){return Tn.circumcentre(this.p0,this.p1,this.p2)},Tn.prototype.area3D=function(){return Tn.area3D(this.p0,this.p1,this.p2)},Tn.prototype.centroid=function(){return Tn.centroid(this.p0,this.p1,this.p2)},Tn.prototype.inCentre=function(){return Tn.inCentre(this.p0,this.p1,this.p2)},Tn.prototype.interfaces_=function(){return[]},Tn.prototype.getClass=function(){return Tn},Tn.area=function(e,t,n){return Math.abs(((n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y))/2)},Tn.signedArea=function(e,t,n){return((n.x-e.x)*(t.y-e.y)-(t.x-e.x)*(n.y-e.y))/2},Tn.det=function(e,t,n,r){return e*r-t*n},Tn.interpolateZ=function(e,t,n,r){var i=t.x,a=t.y,o=n.x-i,s=r.x-i,u=n.y-a,A=r.y-a,c=o*A-s*u,l=e.x-i,f=e.y-a,h=(A*l-s*f)/c,g=(-u*l+o*f)/c;return t.z+h*(n.z-t.z)+g*(r.z-t.z)},Tn.longestSideLength=function(e,t,n){var r=e.distance(t),i=t.distance(n),a=n.distance(e),o=r;return i>o&&(o=i),a>o&&(o=a),o},Tn.isAcute=function(e,t,n){return!!Sn.isAcute(e,t,n)&&!!Sn.isAcute(t,n,e)&&!!Sn.isAcute(n,e,t)},Tn.circumcentre=function(e,t,n){var r=n.x,i=n.y,a=e.x-r,o=e.y-i,s=t.x-r,u=t.y-i,A=2*Tn.det(a,o,s,u),c=Tn.det(o,a*a+o*o,u,s*s+u*u),l=Tn.det(a,a*a+o*o,s,s*s+u*u);return new B(r-c/A,i+l/A)},Tn.perpendicularBisector=function(e,t){var n=t.x-e.x,r=t.y-e.y,i=new Y(e.x+n/2,e.y+r/2,1),a=new Y(e.x-r+n/2,e.y+n+r/2,1);return new Y(i,a)},Tn.angleBisector=function(e,t,n){var r=t.distance(e),i=r/(r+t.distance(n)),a=n.x-e.x,o=n.y-e.y;return new B(e.x+i*a,e.y+i*o)},Tn.area3D=function(e,t,n){var r=t.x-e.x,i=t.y-e.y,a=t.z-e.z,o=n.x-e.x,s=n.y-e.y,u=n.z-e.z,A=i*u-a*s,c=a*o-r*u,l=r*s-i*o,f=A*A+c*c+l*l;return Math.sqrt(f)/2},Tn.centroid=function(e,t,n){var r=(e.x+t.x+n.x)/3,i=(e.y+t.y+n.y)/3;return new B(r,i)},Tn.inCentre=function(e,t,n){var r=t.distance(n),i=e.distance(n),a=e.distance(t),o=r+i+a,s=(r*e.x+i*t.x+a*n.x)/o,u=(r*e.y+i*t.y+a*n.y)/o;return new B(s,u)};var Ln=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new Ce;var e=arguments[0],t=arguments[1],n=arguments[2];this._inputGeom=e,this._distance=t,this._curveBuilder=n};Ln.prototype.addPoint=function(e){if(this._distance<=0)return null;var t=e.getCoordinates(),n=this._curveBuilder.getLineCurve(t,this._distance);this.addCurve(n,_.EXTERIOR,_.INTERIOR)},Ln.prototype.addPolygon=function(e){var t=this._distance,n=wt.LEFT;this._distance<0&&(t=-this._distance,n=wt.RIGHT);var r=e.getExteriorRing(),i=Qe.removeRepeatedPoints(r.getCoordinates());if(this._distance<0&&this.isErodedCompletely(r,this._distance))return null;if(this._distance<=0&&i.length<3)return null;this.addPolygonRing(i,t,n,_.EXTERIOR,_.INTERIOR);for(var a=0;a<e.getNumInteriorRing();a++){var o=e.getInteriorRingN(a),s=Qe.removeRepeatedPoints(o.getCoordinates());this._distance>0&&this.isErodedCompletely(o,-this._distance)||this.addPolygonRing(s,t,wt.opposite(n),_.INTERIOR,_.EXTERIOR)}},Ln.prototype.isTriangleErodedCompletely=function(e,t){var n=new Tn(e[0],e[1],e[2]),r=n.inCentre();return se.distancePointLine(r,n.p0,n.p1)<Math.abs(t)},Ln.prototype.addLineString=function(e){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var t=Qe.removeRepeatedPoints(e.getCoordinates()),n=this._curveBuilder.getLineCurve(t,this._distance);this.addCurve(n,_.EXTERIOR,_.INTERIOR)},Ln.prototype.addCurve=function(e,t,n){if(null===e||e.length<2)return null;var r=new gn(e,new Dt(0,_.BOUNDARY,t,n));this._curveList.add(r)},Ln.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},Ln.prototype.addPolygonRing=function(e,t,n,r,i){if(0===t&&e.length<tt.MINIMUM_VALID_SIZE)return null;var a=r,o=i;e.length>=tt.MINIMUM_VALID_SIZE&&se.isCCW(e)&&(a=i,o=r,n=wt.opposite(n));var s=this._curveBuilder.getRingCurve(e,n,t);this.addCurve(s,a,o)},Ln.prototype.add=function(e){if(e.isEmpty())return null;e instanceof $e?this.addPolygon(e):e instanceof We?this.addLineString(e):e instanceof Xe?this.addPoint(e):(e instanceof et||e instanceof qe||e instanceof nt||e instanceof Ge)&&this.addCollection(e)},Ln.prototype.isErodedCompletely=function(e,t){var n=e.getCoordinates();if(n.length<4)return t<0;if(4===n.length)return this.isTriangleErodedCompletely(n,t);var r=e.getEnvelopeInternal(),i=Math.min(r.getHeight(),r.getWidth());return t<0&&2*Math.abs(t)>i},Ln.prototype.addCollection=function(e){for(var t=0;t<e.getNumGeometries();t++){var n=e.getGeometryN(t);this.add(n)}},Ln.prototype.interfaces_=function(){return[]},Ln.prototype.getClass=function(){return Ln};var Pn=function(){};Pn.prototype.locate=function(e){},Pn.prototype.interfaces_=function(){return[]},Pn.prototype.getClass=function(){return Pn};var Un=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var e=arguments[0];this._parent=e,this._atStart=!0,this._index=0,this._max=e.getNumGeometries()};Un.prototype.next=function(){if(this._atStart)return this._atStart=!1,Un.isAtomic(this._parent)&&this._index++,this._parent;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new r;var e=this._parent.getGeometryN(this._index++);return e instanceof Ge?(this._subcollectionIterator=new Un(e),this._subcollectionIterator.next()):e},Un.prototype.remove=function(){throw new Error(this.getClass().getName())},Un.prototype.hasNext=function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},Un.prototype.interfaces_=function(){return[be]},Un.prototype.getClass=function(){return Un},Un.isAtomic=function(e){return!(e instanceof Ge)};var Gn=function(){this._geom=null;var e=arguments[0];this._geom=e};Gn.prototype.locate=function(e){return Gn.locate(e,this._geom)},Gn.prototype.interfaces_=function(){return[Pn]},Gn.prototype.getClass=function(){return Gn},Gn.isPointInRing=function(e,t){return!!t.getEnvelopeInternal().intersects(e)&&se.isPointInRing(e,t.getCoordinates())},Gn.containsPointInPolygon=function(e,t){if(t.isEmpty())return!1;var n=t.getExteriorRing();if(!Gn.isPointInRing(e,n))return!1;for(var r=0;r<t.getNumInteriorRing();r++){var i=t.getInteriorRingN(r);if(Gn.isPointInRing(e,i))return!1}return!0},Gn.containsPoint=function(e,t){if(t instanceof $e)return Gn.containsPointInPolygon(e,t);if(t instanceof Ge)for(var n=new Un(t);n.hasNext();){var r=n.next();if(r!==t&&Gn.containsPoint(e,r))return!0}return!1},Gn.locate=function(e,t){return t.isEmpty()?_.EXTERIOR:Gn.containsPoint(e,t)?_.INTERIOR:_.EXTERIOR};var qn=function(){this._edgeMap=new l,this._edgeList=null,this._ptInAreaLocation=[_.NONE,_.NONE]};qn.prototype.getNextCW=function(e){this.getEdges();var t=this._edgeList.indexOf(e),n=t-1;return 0===t&&(n=this._edgeList.size()-1),this._edgeList.get(n)},qn.prototype.propagateSideLabels=function(e){for(var t=_.NONE,n=this.iterator();n.hasNext();){var r=n.next().getLabel();r.isArea(e)&&r.getLocation(e,wt.LEFT)!==_.NONE&&(t=r.getLocation(e,wt.LEFT))}if(t===_.NONE)return null;for(var i=t,a=this.iterator();a.hasNext();){var o=a.next(),s=o.getLabel();if(s.getLocation(e,wt.ON)===_.NONE&&s.setLocation(e,wt.ON,i),s.isArea(e)){var u=s.getLocation(e,wt.LEFT),A=s.getLocation(e,wt.RIGHT);if(A!==_.NONE){if(A!==i)throw new _t("side location conflict",o.getCoordinate());u===_.NONE&&te.shouldNeverReachHere("found single null side (at "+o.getCoordinate()+")"),i=u}else te.isTrue(s.getLocation(e,wt.LEFT)===_.NONE,"found single null side"),s.setLocation(e,wt.RIGHT,i),s.setLocation(e,wt.LEFT,i)}}},qn.prototype.getCoordinate=function(){var e=this.iterator();return e.hasNext()?e.next().getCoordinate():null},qn.prototype.print=function(e){H.out.println("EdgeEndStar:   "+this.getCoordinate());for(var t=this.iterator();t.hasNext();)t.next().print(e)},qn.prototype.isAreaLabelsConsistent=function(e){return this.computeEdgeEndLabels(e.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},qn.prototype.checkAreaLabelsConsistent=function(e){var t=this.getEdges();if(t.size()<=0)return!0;var n=t.size()-1,r=t.get(n).getLabel().getLocation(e,wt.LEFT);te.isTrue(r!==_.NONE,"Found unlabelled area edge");for(var i=r,a=this.iterator();a.hasNext();){var o=a.next().getLabel();te.isTrue(o.isArea(e),"Found non-area edge");var s=o.getLocation(e,wt.LEFT),u=o.getLocation(e,wt.RIGHT);if(s===u)return!1;if(u!==i)return!1;i=s}return!0},qn.prototype.findIndex=function(e){this.iterator();for(var t=0;t<this._edgeList.size();t++)if(this._edgeList.get(t)===e)return t;return-1},qn.prototype.iterator=function(){return this.getEdges().iterator()},qn.prototype.getEdges=function(){return null===this._edgeList&&(this._edgeList=new Ce(this._edgeMap.values())),this._edgeList},qn.prototype.getLocation=function(e,t,n){return this._ptInAreaLocation[e]===_.NONE&&(this._ptInAreaLocation[e]=Gn.locate(t,n[e].getGeometry())),this._ptInAreaLocation[e]},qn.prototype.toString=function(){var e=new R;e.append("EdgeEndStar:   "+this.getCoordinate()),e.append("\n");for(var t=this.iterator();t.hasNext();){var n=t.next();e.append(n),e.append("\n")}return e.toString()},qn.prototype.computeEdgeEndLabels=function(e){for(var t=this.iterator();t.hasNext();)t.next().computeLabel(e)},qn.prototype.computeLabelling=function(e){this.computeEdgeEndLabels(e[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var t=[!1,!1],n=this.iterator();n.hasNext();)for(var r=n.next().getLabel(),i=0;i<2;i++)r.isLine(i)&&r.getLocation(i)===_.BOUNDARY&&(t[i]=!0);for(var a=this.iterator();a.hasNext();)for(var o=a.next(),s=o.getLabel(),u=0;u<2;u++)if(s.isAnyNull(u)){var A=_.NONE;if(t[u])A=_.EXTERIOR;else{var c=o.getCoordinate();A=this.getLocation(u,c,e)}s.setAllLocationsIfNull(u,A)}},qn.prototype.getDegree=function(){return this._edgeMap.size()},qn.prototype.insertEdgeEnd=function(e,t){this._edgeMap.put(e,t),this._edgeList=null},qn.prototype.interfaces_=function(){return[]},qn.prototype.getClass=function(){return qn};var Hn=function(e){function t(){e.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.linkResultDirectedEdges=function(){this.getResultAreaEdges();for(var e=null,t=null,n=this._SCANNING_FOR_INCOMING,r=0;r<this._resultAreaEdgeList.size();r++){var i=this._resultAreaEdgeList.get(r),a=i.getSym();if(i.getLabel().isArea())switch(null===e&&i.isInResult()&&(e=i),n){case this._SCANNING_FOR_INCOMING:if(!a.isInResult())continue;t=a,n=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(!i.isInResult())continue;t.setNext(i),n=this._SCANNING_FOR_INCOMING}}if(n===this._LINKING_TO_OUTGOING){if(null===e)throw new _t("no outgoing dirEdge found",this.getCoordinate());te.isTrue(e.isInResult(),"unable to link last incoming dirEdge"),t.setNext(e)}},t.prototype.insert=function(e){var t=e;this.insertEdgeEnd(t,t)},t.prototype.getRightmostEdge=function(){var e=this.getEdges(),t=e.size();if(t<1)return null;var n=e.get(0);if(1===t)return n;var r=e.get(t-1),i=n.getQuadrant(),a=r.getQuadrant();return Lt.isNorthern(i)&&Lt.isNorthern(a)?n:Lt.isNorthern(i)||Lt.isNorthern(a)?0!==n.getDy()?n:0!==r.getDy()?r:(te.shouldNeverReachHere("found two horizontal edges incident on node"),null):r},t.prototype.print=function(e){H.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var t=this.iterator();t.hasNext();){var n=t.next();e.print("out "),n.print(e),e.println(),e.print("in "),n.getSym().print(e),e.println()}},t.prototype.getResultAreaEdges=function(){if(null!==this._resultAreaEdgeList)return this._resultAreaEdgeList;this._resultAreaEdgeList=new Ce;for(var e=this.iterator();e.hasNext();){var t=e.next();(t.isInResult()||t.getSym().isInResult())&&this._resultAreaEdgeList.add(t)}return this._resultAreaEdgeList},t.prototype.updateLabelling=function(e){for(var t=this.iterator();t.hasNext();){var n=t.next().getLabel();n.setAllLocationsIfNull(0,e.getLocation(0)),n.setAllLocationsIfNull(1,e.getLocation(1))}},t.prototype.linkAllDirectedEdges=function(){this.getEdges();for(var e=null,t=null,n=this._edgeList.size()-1;n>=0;n--){var r=this._edgeList.get(n),i=r.getSym();null===t&&(t=i),null!==e&&i.setNext(e),e=r}t.setNext(e)},t.prototype.computeDepths=function(){if(1===arguments.length){var e=arguments[0],t=this.findIndex(e),n=e.getDepth(wt.LEFT),r=e.getDepth(wt.RIGHT),i=this.computeDepths(t+1,this._edgeList.size(),n);if(this.computeDepths(0,t,i)!==r)throw new _t("depth mismatch at "+e.getCoordinate())}else if(3===arguments.length){for(var a=arguments[0],o=arguments[1],s=arguments[2],u=a;u<o;u++){var A=this._edgeList.get(u);A.setEdgeDepths(wt.RIGHT,s),s=A.getDepth(wt.LEFT)}return s}},t.prototype.mergeSymLabels=function(){for(var e=this.iterator();e.hasNext();){var t=e.next();t.getLabel().merge(t.getSym().getLabel())}},t.prototype.linkMinimalDirectedEdges=function(e){for(var t=null,n=null,r=this._SCANNING_FOR_INCOMING,i=this._resultAreaEdgeList.size()-1;i>=0;i--){var a=this._resultAreaEdgeList.get(i),o=a.getSym();switch(null===t&&a.getEdgeRing()===e&&(t=a),r){case this._SCANNING_FOR_INCOMING:if(o.getEdgeRing()!==e)continue;n=o,r=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(a.getEdgeRing()!==e)continue;n.setNextMin(a),r=this._SCANNING_FOR_INCOMING}}r===this._LINKING_TO_OUTGOING&&(te.isTrue(null!==t,"found null for first outgoing dirEdge"),te.isTrue(t.getEdgeRing()===e,"unable to link last incoming dirEdge"),n.setNextMin(t))},t.prototype.getOutgoingDegree=function(){if(0===arguments.length){for(var e=0,t=this.iterator();t.hasNext();)t.next().isInResult()&&e++;return e}if(1===arguments.length){for(var n=arguments[0],r=0,i=this.iterator();i.hasNext();)i.next().getEdgeRing()===n&&r++;return r}},t.prototype.getLabel=function(){return this._label},t.prototype.findCoveredLineEdges=function(){for(var e=_.NONE,t=this.iterator();t.hasNext();){var n=t.next(),r=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){e=_.INTERIOR;break}if(r.isInResult()){e=_.EXTERIOR;break}}}if(e===_.NONE)return null;for(var i=e,a=this.iterator();a.hasNext();){var o=a.next(),s=o.getSym();o.isLineEdge()?o.getEdge().setCovered(i===_.INTERIOR):(o.isInResult()&&(i=_.EXTERIOR),s.isInResult()&&(i=_.INTERIOR))}},t.prototype.computeLabelling=function(t){e.prototype.computeLabelling.call(this,t),this._label=new Dt(_.NONE);for(var n=this.iterator();n.hasNext();)for(var r=n.next().getEdge().getLabel(),i=0;i<2;i++){var a=r.getLocation(i);a!==_.INTERIOR&&a!==_.BOUNDARY||this._label.setLocation(i,_.INTERIOR)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(qn),Yn=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.createNode=function(e){return new Ft(e,new Hn)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(qt),Jn=function e(){this._pts=null,this._orientation=null;var t=arguments[0];this._pts=t,this._orientation=e.orientation(t)};Jn.prototype.compareTo=function(e){var t=e;return Jn.compareOriented(this._pts,this._orientation,t._pts,t._orientation)},Jn.prototype.interfaces_=function(){return[b]},Jn.prototype.getClass=function(){return Jn},Jn.orientation=function(e){return 1===Qe.increasingDirection(e)},Jn.compareOriented=function(e,t,n,r){for(var i=t?1:-1,a=r?1:-1,o=t?e.length:-1,s=r?n.length:-1,u=t?0:e.length-1,A=r?0:n.length-1;;){var c=e[u].compareTo(n[A]);if(0!==c)return c;var l=(u+=i)===o,f=(A+=a)===s;if(l&&!f)return-1;if(!l&&f)return 1;if(l&&f)return 0}};var zn=function(){this._edges=new Ce,this._ocaMap=new l};zn.prototype.print=function(e){e.print("MULTILINESTRING ( ");for(var t=0;t<this._edges.size();t++){var n=this._edges.get(t);t>0&&e.print(","),e.print("(");for(var r=n.getCoordinates(),i=0;i<r.length;i++)i>0&&e.print(","),e.print(r[i].x+" "+r[i].y);e.println(")")}e.print(")  ")},zn.prototype.addAll=function(e){for(var t=e.iterator();t.hasNext();)this.add(t.next())},zn.prototype.findEdgeIndex=function(e){for(var t=0;t<this._edges.size();t++)if(this._edges.get(t).equals(e))return t;return-1},zn.prototype.iterator=function(){return this._edges.iterator()},zn.prototype.getEdges=function(){return this._edges},zn.prototype.get=function(e){return this._edges.get(e)},zn.prototype.findEqualEdge=function(e){var t=new Jn(e.getCoordinates());return this._ocaMap.get(t)},zn.prototype.add=function(e){this._edges.add(e);var t=new Jn(e.getCoordinates());this._ocaMap.put(t,e)},zn.prototype.interfaces_=function(){return[]},zn.prototype.getClass=function(){return zn};var Kn=function(){};Kn.prototype.processIntersections=function(e,t,n,r){},Kn.prototype.isDone=function(){},Kn.prototype.interfaces_=function(){return[]},Kn.prototype.getClass=function(){return Kn};var Wn=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var e=arguments[0];this._li=e};Wn.prototype.isTrivialIntersection=function(e,t,n,r){if(e===n&&1===this._li.getIntersectionNum()){if(Wn.isAdjacentSegments(t,r))return!0;if(e.isClosed()){var i=e.size()-1;if(0===t&&r===i||0===r&&t===i)return!0}}return!1},Wn.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Wn.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Wn.prototype.getLineIntersector=function(){return this._li},Wn.prototype.hasProperIntersection=function(){return this._hasProper},Wn.prototype.processIntersections=function(e,t,n,r){if(e===n&&t===r)return null;this.numTests++;var i=e.getCoordinates()[t],a=e.getCoordinates()[t+1],o=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,a,o,s),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(e,t,n,r)||(this._hasIntersection=!0,e.addIntersections(this._li,t,0),n.addIntersections(this._li,r,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},Wn.prototype.hasIntersection=function(){return this._hasIntersection},Wn.prototype.isDone=function(){return!1},Wn.prototype.hasInteriorIntersection=function(){return this._hasInterior},Wn.prototype.interfaces_=function(){return[Kn]},Wn.prototype.getClass=function(){return Wn},Wn.isAdjacentSegments=function(e,t){return 1===Math.abs(e-t)};var Vn=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var e=arguments[0],t=arguments[1],n=arguments[2];this.coord=new B(e),this.segmentIndex=t,this.dist=n};Vn.prototype.getSegmentIndex=function(){return this.segmentIndex},Vn.prototype.getCoordinate=function(){return this.coord},Vn.prototype.print=function(e){e.print(this.coord),e.print(" seg # = "+this.segmentIndex),e.println(" dist = "+this.dist)},Vn.prototype.compareTo=function(e){var t=e;return this.compare(t.segmentIndex,t.dist)},Vn.prototype.isEndPoint=function(e){return 0===this.segmentIndex&&0===this.dist||this.segmentIndex===e},Vn.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},Vn.prototype.getDistance=function(){return this.dist},Vn.prototype.compare=function(e,t){return this.segmentIndex<e?-1:this.segmentIndex>e?1:this.dist<t?-1:this.dist>t?1:0},Vn.prototype.interfaces_=function(){return[b]},Vn.prototype.getClass=function(){return Vn};var Xn=function(){this._nodeMap=new l,this.edge=null;var e=arguments[0];this.edge=e};Xn.prototype.print=function(e){e.println("Intersections:");for(var t=this.iterator();t.hasNext();)t.next().print(e)},Xn.prototype.iterator=function(){return this._nodeMap.values().iterator()},Xn.prototype.addSplitEdges=function(e){this.addEndpoints();for(var t=this.iterator(),n=t.next();t.hasNext();){var r=t.next(),i=this.createSplitEdge(n,r);e.add(i),n=r}},Xn.prototype.addEndpoints=function(){var e=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[e],e,0)},Xn.prototype.createSplitEdge=function(e,t){var n=t.segmentIndex-e.segmentIndex+2,r=this.edge.pts[t.segmentIndex],i=t.dist>0||!t.coord.equals2D(r);i||n--;var a=new Array(n).fill(null),o=0;a[o++]=new B(e.coord);for(var s=e.segmentIndex+1;s<=t.segmentIndex;s++)a[o++]=this.edge.pts[s];return i&&(a[o]=t.coord),new nr(a,new Dt(this.edge._label))},Xn.prototype.add=function(e,t,n){var r=new Vn(e,t,n),i=this._nodeMap.get(r);return null!==i?i:(this._nodeMap.put(r,r),r)},Xn.prototype.isIntersection=function(e){for(var t=this.iterator();t.hasNext();)if(t.next().coord.equals(e))return!0;return!1},Xn.prototype.interfaces_=function(){return[]},Xn.prototype.getClass=function(){return Xn};var Zn=function(){};Zn.prototype.getChainStartIndices=function(e){var t=0,n=new Ce;n.add(new j(t));do{var r=this.findChainEnd(e,t);n.add(new j(r)),t=r}while(t<e.length-1);return Zn.toIntArray(n)},Zn.prototype.findChainEnd=function(e,t){for(var n=Lt.quadrant(e[t],e[t+1]),r=t+1;r<e.length&&Lt.quadrant(e[r-1],e[r])===n;)r++;return r-1},Zn.prototype.interfaces_=function(){return[]},Zn.prototype.getClass=function(){return Zn},Zn.toIntArray=function(e){for(var t=new Array(e.size()).fill(null),n=0;n<t.length;n++)t[n]=e.get(n).intValue();return t};var $n=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new J,this.env2=new J;var e=arguments[0];this.e=e,this.pts=e.getCoordinates();var t=new Zn;this.startIndex=t.getChainStartIndices(this.pts)};$n.prototype.getCoordinates=function(){return this.pts},$n.prototype.getMaxX=function(e){var t=this.pts[this.startIndex[e]].x,n=this.pts[this.startIndex[e+1]].x;return t>n?t:n},$n.prototype.getMinX=function(e){var t=this.pts[this.startIndex[e]].x,n=this.pts[this.startIndex[e+1]].x;return t<n?t:n},$n.prototype.computeIntersectsForChain=function(){if(4===arguments.length){var e=arguments[0],t=arguments[1],n=arguments[2],r=arguments[3];this.computeIntersectsForChain(this.startIndex[e],this.startIndex[e+1],t,t.startIndex[n],t.startIndex[n+1],r)}else if(6===arguments.length){var i=arguments[0],a=arguments[1],o=arguments[2],s=arguments[3],u=arguments[4],A=arguments[5],c=this.pts[i],l=this.pts[a],f=o.pts[s],h=o.pts[u];if(a-i==1&&u-s==1)return A.addIntersections(this.e,i,o.e,s),null;if(this.env1.init(c,l),this.env2.init(f,h),!this.env1.intersects(this.env2))return null;var g=Math.trunc((i+a)/2),d=Math.trunc((s+u)/2);i<g&&(s<d&&this.computeIntersectsForChain(i,g,o,s,d,A),d<u&&this.computeIntersectsForChain(i,g,o,d,u,A)),g<a&&(s<d&&this.computeIntersectsForChain(g,a,o,s,d,A),d<u&&this.computeIntersectsForChain(g,a,o,d,u,A))}},$n.prototype.getStartIndexes=function(){return this.startIndex},$n.prototype.computeIntersects=function(e,t){for(var n=0;n<this.startIndex.length-1;n++)for(var r=0;r<e.startIndex.length-1;r++)this.computeIntersectsForChain(n,e,r,t)},$n.prototype.interfaces_=function(){return[]},$n.prototype.getClass=function(){return $n};var er=function e(){this._depth=Array(2).fill().map((function(){return Array(3)}));for(var t=0;t<2;t++)for(var n=0;n<3;n++)this._depth[t][n]=e.NULL_VALUE},tr={NULL_VALUE:{configurable:!0}};er.prototype.getDepth=function(e,t){return this._depth[e][t]},er.prototype.setDepth=function(e,t,n){this._depth[e][t]=n},er.prototype.isNull=function(){if(0===arguments.length){for(var e=0;e<2;e++)for(var t=0;t<3;t++)if(this._depth[e][t]!==er.NULL_VALUE)return!1;return!0}if(1===arguments.length){var n=arguments[0];return this._depth[n][1]===er.NULL_VALUE}if(2===arguments.length){var r=arguments[0],i=arguments[1];return this._depth[r][i]===er.NULL_VALUE}},er.prototype.normalize=function(){for(var e=0;e<2;e++)if(!this.isNull(e)){var t=this._depth[e][1];this._depth[e][2]<t&&(t=this._depth[e][2]),t<0&&(t=0);for(var n=1;n<3;n++){var r=0;this._depth[e][n]>t&&(r=1),this._depth[e][n]=r}}},er.prototype.getDelta=function(e){return this._depth[e][wt.RIGHT]-this._depth[e][wt.LEFT]},er.prototype.getLocation=function(e,t){return this._depth[e][t]<=0?_.EXTERIOR:_.INTERIOR},er.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},er.prototype.add=function(){if(1===arguments.length)for(var e=arguments[0],t=0;t<2;t++)for(var n=1;n<3;n++){var r=e.getLocation(t,n);r!==_.EXTERIOR&&r!==_.INTERIOR||(this.isNull(t,n)?this._depth[t][n]=er.depthAtLocation(r):this._depth[t][n]+=er.depthAtLocation(r))}else if(3===arguments.length){var i=arguments[0],a=arguments[1];arguments[2]===_.INTERIOR&&this._depth[i][a]++}},er.prototype.interfaces_=function(){return[]},er.prototype.getClass=function(){return er},er.depthAtLocation=function(e){return e===_.EXTERIOR?0:e===_.INTERIOR?1:er.NULL_VALUE},tr.NULL_VALUE.get=function(){return-1},Object.defineProperties(er,tr);var nr=function(e){function t(){if(e.call(this),this.pts=null,this._env=null,this.eiList=new Xn(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new er,this._depthDelta=0,1===arguments.length){var n=arguments[0];t.call(this,n,null)}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getDepth=function(){return this._depth},t.prototype.getCollapsedEdge=function(){var e=new Array(2).fill(null);return e[0]=this.pts[0],e[1]=this.pts[1],new t(e,Dt.toLineLabel(this._label))},t.prototype.isIsolated=function(){return this._isIsolated},t.prototype.getCoordinates=function(){return this.pts},t.prototype.setIsolated=function(e){this._isIsolated=e},t.prototype.setName=function(e){this._name=e},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var n=e;if(this.pts.length!==n.pts.length)return!1;for(var r=!0,i=!0,a=this.pts.length,o=0;o<this.pts.length;o++)if(this.pts[o].equals2D(n.pts[o])||(r=!1),this.pts[o].equals2D(n.pts[--a])||(i=!1),!r&&!i)return!1;return!0},t.prototype.getCoordinate=function(){if(0===arguments.length)return this.pts.length>0?this.pts[0]:null;if(1===arguments.length){var e=arguments[0];return this.pts[e]}},t.prototype.print=function(e){e.print("edge "+this._name+": "),e.print("LINESTRING (");for(var t=0;t<this.pts.length;t++)t>0&&e.print(","),e.print(this.pts[t].x+" "+this.pts[t].y);e.print(")  "+this._label+" "+this._depthDelta)},t.prototype.computeIM=function(e){t.updateIM(this._label,e)},t.prototype.isCollapsed=function(){return!!this._label.isArea()&&3===this.pts.length&&!!this.pts[0].equals(this.pts[2])},t.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},t.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},t.prototype.getDepthDelta=function(){return this._depthDelta},t.prototype.getNumPoints=function(){return this.pts.length},t.prototype.printReverse=function(e){e.print("edge "+this._name+": ");for(var t=this.pts.length-1;t>=0;t--)e.print(this.pts[t]+" ");e.println("")},t.prototype.getMonotoneChainEdge=function(){return null===this._mce&&(this._mce=new $n(this)),this._mce},t.prototype.getEnvelope=function(){if(null===this._env){this._env=new J;for(var e=0;e<this.pts.length;e++)this._env.expandToInclude(this.pts[e])}return this._env},t.prototype.addIntersection=function(e,t,n,r){var i=new B(e.getIntersection(r)),a=t,o=e.getEdgeDistance(n,r),s=a+1;if(s<this.pts.length){var u=this.pts[s];i.equals2D(u)&&(a=s,o=0)}this.eiList.add(i,a,o)},t.prototype.toString=function(){var e=new R;e.append("edge "+this._name+": "),e.append("LINESTRING (");for(var t=0;t<this.pts.length;t++)t>0&&e.append(","),e.append(this.pts[t].x+" "+this.pts[t].y);return e.append(")  "+this._label+" "+this._depthDelta),e.toString()},t.prototype.isPointwiseEqual=function(e){if(this.pts.length!==e.pts.length)return!1;for(var t=0;t<this.pts.length;t++)if(!this.pts[t].equals2D(e.pts[t]))return!1;return!0},t.prototype.setDepthDelta=function(e){this._depthDelta=e},t.prototype.getEdgeIntersectionList=function(){return this.eiList},t.prototype.addIntersections=function(e,t,n){for(var r=0;r<e.getIntersectionNum();r++)this.addIntersection(e,t,n,r)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.updateIM=function(){if(2!==arguments.length)return e.prototype.updateIM.apply(this,arguments);var t=arguments[0],n=arguments[1];n.setAtLeastIfValid(t.getLocation(0,wt.ON),t.getLocation(1,wt.ON),1),t.isArea()&&(n.setAtLeastIfValid(t.getLocation(0,wt.LEFT),t.getLocation(1,wt.LEFT),2),n.setAtLeastIfValid(t.getLocation(0,wt.RIGHT),t.getLocation(1,wt.RIGHT),2))},t}(Nt),rr=function(e){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new zn,this._bufParams=e||null};rr.prototype.setWorkingPrecisionModel=function(e){this._workingPrecisionModel=e},rr.prototype.insertUniqueEdge=function(e){var t=this._edgeList.findEqualEdge(e);if(null!==t){var n=t.getLabel(),r=e.getLabel();t.isPointwiseEqual(e)||(r=new Dt(e.getLabel())).flip(),n.merge(r);var i=rr.depthDelta(r),a=t.getDepthDelta()+i;t.setDepthDelta(a)}else this._edgeList.add(e),e.setDepthDelta(rr.depthDelta(e.getLabel()))},rr.prototype.buildSubgraphs=function(e,t){for(var n=new Ce,r=e.iterator();r.hasNext();){var i=r.next(),a=i.getRightmostCoordinate(),o=new Mn(n).getDepth(a);i.computeDepth(o),i.findResultEdges(),n.add(i),t.add(i.getDirectedEdges(),i.getNodes())}},rr.prototype.createSubgraphs=function(e){for(var t=new Ce,n=e.getNodes().iterator();n.hasNext();){var r=n.next();if(!r.isVisited()){var i=new St;i.create(r),t.add(i)}}return $t.sort(t,$t.reverseOrder()),t},rr.prototype.createEmptyResultGeometry=function(){return this._geomFact.createPolygon()},rr.prototype.getNoder=function(e){if(null!==this._workingNoder)return this._workingNoder;var t=new En,n=new ie;return n.setPrecisionModel(e),t.setSegmentIntersector(new Wn(n)),t},rr.prototype.buffer=function(e,t){var n=this._workingPrecisionModel;null===n&&(n=e.getPrecisionModel()),this._geomFact=e.getFactory();var r=new jn(n,this._bufParams),i=new Ln(e,t,r).getCurves();if(i.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(i,n),this._graph=new Ht(new Yn),this._graph.addEdges(this._edgeList.getEdges());var a=this.createSubgraphs(this._graph),o=new Yt(this._geomFact);this.buildSubgraphs(a,o);var s=o.getPolygons();return s.size()<=0?this.createEmptyResultGeometry():this._geomFact.buildGeometry(s)},rr.prototype.computeNodedEdges=function(e,t){var n=this.getNoder(t);n.computeNodes(e);for(var r=n.getNodedSubstrings().iterator();r.hasNext();){var i=r.next(),a=i.getCoordinates();if(2!==a.length||!a[0].equals2D(a[1])){var o=i.getData(),s=new nr(i.getCoordinates(),new Dt(o));this.insertUniqueEdge(s)}}},rr.prototype.setNoder=function(e){this._workingNoder=e},rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr},rr.depthDelta=function(e){var t=e.getLocation(0,wt.LEFT),n=e.getLocation(0,wt.RIGHT);return t===_.INTERIOR&&n===_.EXTERIOR?1:t===_.EXTERIOR&&n===_.INTERIOR?-1:0},rr.convertSegStrings=function(e){for(var t=new vt,n=new Ce;e.hasNext();){var r=e.next(),i=t.createLineString(r.getCoordinates());n.add(i)}return t.buildGeometry(n)};var ir=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,2===arguments.length){var e=arguments[0],t=arguments[1];this._noder=e,this._scaleFactor=t,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(4===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],a=arguments[3];this._noder=n,this._scaleFactor=r,this._offsetX=i,this._offsetY=a,this._isScaled=!this.isIntegerPrecision()}};ir.prototype.rescale=function(){if(S(arguments[0],Ie))for(var e=arguments[0].iterator();e.hasNext();){var t=e.next();this.rescale(t.getCoordinates())}else if(arguments[0]instanceof Array){for(var n=arguments[0],r=0;r<n.length;r++)n[r].x=n[r].x/this._scaleFactor+this._offsetX,n[r].y=n[r].y/this._scaleFactor+this._offsetY;2===n.length&&n[0].equals2D(n[1])&&H.out.println(n)}},ir.prototype.scale=function(){if(S(arguments[0],Ie)){for(var e=arguments[0],t=new Ce,n=e.iterator();n.hasNext();){var r=n.next();t.add(new gn(this.scale(r.getCoordinates()),r.getData()))}return t}if(arguments[0]instanceof Array){for(var i=arguments[0],a=new Array(i.length).fill(null),o=0;o<i.length;o++)a[o]=new B(Math.round((i[o].x-this._offsetX)*this._scaleFactor),Math.round((i[o].y-this._offsetY)*this._scaleFactor),i[o].z);return Qe.removeRepeatedPoints(a)}},ir.prototype.isIntegerPrecision=function(){return 1===this._scaleFactor},ir.prototype.getNodedSubstrings=function(){var e=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(e),e},ir.prototype.computeNodes=function(e){var t=e;this._isScaled&&(t=this.scale(e)),this._noder.computeNodes(t)},ir.prototype.interfaces_=function(){return[In]},ir.prototype.getClass=function(){return ir};var ar=function(){this._li=new ie,this._segStrings=null;var e=arguments[0];this._segStrings=e},or={fact:{configurable:!0}};ar.prototype.checkEndPtVertexIntersections=function(){if(0===arguments.length)for(var e=this._segStrings.iterator();e.hasNext();){var t=e.next().getCoordinates();this.checkEndPtVertexIntersections(t[0],this._segStrings),this.checkEndPtVertexIntersections(t[t.length-1],this._segStrings)}else if(2===arguments.length)for(var n=arguments[0],r=arguments[1].iterator();r.hasNext();)for(var i=r.next().getCoordinates(),a=1;a<i.length-1;a++)if(i[a].equals(n))throw new $("found endpt/interior pt intersection at index "+a+" :pt "+n)},ar.prototype.checkInteriorIntersections=function(){if(0===arguments.length)for(var e=this._segStrings.iterator();e.hasNext();)for(var t=e.next(),n=this._segStrings.iterator();n.hasNext();){var r=n.next();this.checkInteriorIntersections(t,r)}else if(2===arguments.length)for(var i=arguments[0],a=arguments[1],o=i.getCoordinates(),s=a.getCoordinates(),u=0;u<o.length-1;u++)for(var A=0;A<s.length-1;A++)this.checkInteriorIntersections(i,u,a,A);else if(4===arguments.length){var c=arguments[0],l=arguments[1],f=arguments[2],h=arguments[3];if(c===f&&l===h)return null;var g=c.getCoordinates()[l],d=c.getCoordinates()[l+1],p=f.getCoordinates()[h],v=f.getCoordinates()[h+1];if(this._li.computeIntersection(g,d,p,v),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,g,d)||this.hasInteriorIntersection(this._li,p,v)))throw new $("found non-noded intersection at "+g+"-"+d+" and "+p+"-"+v)}},ar.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},ar.prototype.checkCollapses=function(){if(0===arguments.length)for(var e=this._segStrings.iterator();e.hasNext();){var t=e.next();this.checkCollapses(t)}else if(1===arguments.length)for(var n=arguments[0].getCoordinates(),r=0;r<n.length-2;r++)this.checkCollapse(n[r],n[r+1],n[r+2])},ar.prototype.hasInteriorIntersection=function(e,t,n){for(var r=0;r<e.getIntersectionNum();r++){var i=e.getIntersection(r);if(!i.equals(t)&&!i.equals(n))return!0}return!1},ar.prototype.checkCollapse=function(e,t,n){if(e.equals(n))throw new $("found non-noded collapse at "+ar.fact.createLineString([e,t,n]))},ar.prototype.interfaces_=function(){return[]},ar.prototype.getClass=function(){return ar},or.fact.get=function(){return new vt},Object.defineProperties(ar,or);var sr=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var e=arguments[0],t=arguments[1],n=arguments[2];if(this._originalPt=e,this._pt=e,this._scaleFactor=t,this._li=n,t<=0)throw new y("Scale factor must be non-zero");1!==t&&(this._pt=new B(this.scale(e.x),this.scale(e.y)),this._p0Scaled=new B,this._p1Scaled=new B),this.initCorners(this._pt)},ur={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};sr.prototype.intersectsScaled=function(e,t){var n=Math.min(e.x,t.x),r=Math.max(e.x,t.x),i=Math.min(e.y,t.y),a=Math.max(e.y,t.y),o=this._maxx<n||this._minx>r||this._maxy<i||this._miny>a;if(o)return!1;var s=this.intersectsToleranceSquare(e,t);return te.isTrue(!(o&&s),"Found bad envelope test"),s},sr.prototype.initCorners=function(e){this._minx=e.x-.5,this._maxx=e.x+.5,this._miny=e.y-.5,this._maxy=e.y+.5,this._corner[0]=new B(this._maxx,this._maxy),this._corner[1]=new B(this._minx,this._maxy),this._corner[2]=new B(this._minx,this._miny),this._corner[3]=new B(this._maxx,this._miny)},sr.prototype.intersects=function(e,t){return 1===this._scaleFactor?this.intersectsScaled(e,t):(this.copyScaled(e,this._p0Scaled),this.copyScaled(t,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},sr.prototype.scale=function(e){return Math.round(e*this._scaleFactor)},sr.prototype.getCoordinate=function(){return this._originalPt},sr.prototype.copyScaled=function(e,t){t.x=this.scale(e.x),t.y=this.scale(e.y)},sr.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var e=sr.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new J(this._originalPt.x-e,this._originalPt.x+e,this._originalPt.y-e,this._originalPt.y+e)}return this._safeEnv},sr.prototype.intersectsPixelClosure=function(e,t){return this._li.computeIntersection(e,t,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(e,t,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))},sr.prototype.intersectsToleranceSquare=function(e,t){var n=!1,r=!1;return this._li.computeIntersection(e,t,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(e,t,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(e,t,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(e,t,this._corner[3],this._corner[0]),!!this._li.isProper()||!(!n||!r)||!!e.equals(this._pt)||!!t.equals(this._pt))))},sr.prototype.addSnappedNode=function(e,t){var n=e.getCoordinate(t),r=e.getCoordinate(t+1);return!!this.intersects(n,r)&&(e.addIntersection(this.getCoordinate(),t),!0)},sr.prototype.interfaces_=function(){return[]},sr.prototype.getClass=function(){return sr},ur.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(sr,ur);var Ar=function(){this.tempEnv1=new J,this.selectedSegment=new dn};Ar.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var e=arguments[0],t=arguments[1];e.getLineSegment(t,this.selectedSegment),this.select(this.selectedSegment)}},Ar.prototype.interfaces_=function(){return[]},Ar.prototype.getClass=function(){return Ar};var cr=function(){this._index=null;var e=arguments[0];this._index=e},lr={HotPixelSnapAction:{configurable:!0}};cr.prototype.snap=function(){if(1===arguments.length){var e=arguments[0];return this.snap(e,null,-1)}if(3===arguments.length){var t=arguments[0],n=arguments[1],r=arguments[2],i=t.getSafeEnvelope(),a=new fr(t,n,r);return this._index.query(i,{interfaces_:function(){return[Wt]},visitItem:function(e){e.select(i,a)}}),a.isNodeAdded()}},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr},lr.HotPixelSnapAction.get=function(){return fr},Object.defineProperties(cr,lr);var fr=function(e){function t(){e.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var t=arguments[0],n=arguments[1],r=arguments[2];this._hotPixel=t,this._parentEdge=n,this._hotPixelVertexIndex=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.isNodeAdded=function(){return this._isNodeAdded},t.prototype.select=function(){if(2!==arguments.length)return e.prototype.select.apply(this,arguments);var t=arguments[0],n=arguments[1],r=t.getContext();if(null!==this._parentEdge&&r===this._parentEdge&&n===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(r,n)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ar),hr=function(){this._li=null,this._interiorIntersections=null;var e=arguments[0];this._li=e,this._interiorIntersections=new Ce};hr.prototype.processIntersections=function(e,t,n,r){if(e===n&&t===r)return null;var i=e.getCoordinates()[t],a=e.getCoordinates()[t+1],o=n.getCoordinates()[r],s=n.getCoordinates()[r+1];if(this._li.computeIntersection(i,a,o,s),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var u=0;u<this._li.getIntersectionNum();u++)this._interiorIntersections.add(this._li.getIntersection(u));e.addIntersections(this._li,t,0),n.addIntersections(this._li,r,1)}},hr.prototype.isDone=function(){return!1},hr.prototype.getInteriorIntersections=function(){return this._interiorIntersections},hr.prototype.interfaces_=function(){return[Kn]},hr.prototype.getClass=function(){return hr};var gr=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var e=arguments[0];this._pm=e,this._li=new ie,this._li.setPrecisionModel(e),this._scaleFactor=e.getScale()};gr.prototype.checkCorrectness=function(e){var t=gn.getNodedSubstrings(e),n=new ar(t);try{n.checkValid()}catch(e){if(!(e instanceof G))throw e;e.printStackTrace()}},gr.prototype.getNodedSubstrings=function(){return gn.getNodedSubstrings(this._nodedSegStrings)},gr.prototype.snapRound=function(e,t){var n=this.findInteriorIntersections(e,t);this.computeIntersectionSnaps(n),this.computeVertexSnaps(e)},gr.prototype.findInteriorIntersections=function(e,t){var n=new hr(t);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(e),n.getInteriorIntersections()},gr.prototype.computeVertexSnaps=function(){if(S(arguments[0],Ie))for(var e=arguments[0].iterator();e.hasNext();){var t=e.next();this.computeVertexSnaps(t)}else if(arguments[0]instanceof gn)for(var n=arguments[0],r=n.getCoordinates(),i=0;i<r.length;i++){var a=new sr(r[i],this._scaleFactor,this._li);this._pointSnapper.snap(a,n,i)&&n.addIntersection(r[i],i)}},gr.prototype.computeNodes=function(e){this._nodedSegStrings=e,this._noder=new En,this._pointSnapper=new cr(this._noder.getIndex()),this.snapRound(e,this._li)},gr.prototype.computeIntersectionSnaps=function(e){for(var t=e.iterator();t.hasNext();){var n=t.next(),r=new sr(n,this._scaleFactor,this._li);this._pointSnapper.snap(r)}},gr.prototype.interfaces_=function(){return[In]},gr.prototype.getClass=function(){return gr};var dr=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new Bn,this._resultGeometry=null,this._saveException=null,1===arguments.length){var e=arguments[0];this._argGeom=e}else if(2===arguments.length){var t=arguments[0],n=arguments[1];this._argGeom=t,this._bufParams=n}},pr={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};dr.prototype.bufferFixedPrecision=function(e){var t=new ir(new gr(new ht(1)),e.getScale()),n=new rr(this._bufParams);n.setWorkingPrecisionModel(e),n.setNoder(t),this._resultGeometry=n.buffer(this._argGeom,this._distance)},dr.prototype.bufferReducedPrecision=function(){var e=this;if(0===arguments.length){for(var t=dr.MAX_PRECISION_DIGITS;t>=0;t--){try{e.bufferReducedPrecision(t)}catch(t){if(!(t instanceof _t))throw t;e._saveException=t}if(null!==e._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var n=arguments[0],r=dr.precisionScaleFactor(this._argGeom,this._distance,n),i=new ht(r);this.bufferFixedPrecision(i)}},dr.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var e=this._argGeom.getFactory().getPrecisionModel();e.getType()===ht.FIXED?this.bufferFixedPrecision(e):this.bufferReducedPrecision()},dr.prototype.setQuadrantSegments=function(e){this._bufParams.setQuadrantSegments(e)},dr.prototype.bufferOriginalPrecision=function(){try{var e=new rr(this._bufParams);this._resultGeometry=e.buffer(this._argGeom,this._distance)}catch(e){if(!(e instanceof $))throw e;this._saveException=e}},dr.prototype.getResultGeometry=function(e){return this._distance=e,this.computeGeometry(),this._resultGeometry},dr.prototype.setEndCapStyle=function(e){this._bufParams.setEndCapStyle(e)},dr.prototype.interfaces_=function(){return[]},dr.prototype.getClass=function(){return dr},dr.bufferOp=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];return new dr(e).getResultGeometry(t)}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof ce&&"number"==typeof arguments[1]){var n=arguments[0],r=arguments[1],i=arguments[2],a=new dr(n);return a.setQuadrantSegments(i),a.getResultGeometry(r)}if(arguments[2]instanceof Bn&&arguments[0]instanceof ce&&"number"==typeof arguments[1]){var o=arguments[0],s=arguments[1],u=arguments[2];return new dr(o,u).getResultGeometry(s)}}else if(4===arguments.length){var A=arguments[0],c=arguments[1],l=arguments[2],f=arguments[3],h=new dr(A);return h.setQuadrantSegments(l),h.setEndCapStyle(f),h.getResultGeometry(c)}},dr.precisionScaleFactor=function(e,t,n){var r=e.getEnvelopeInternal(),i=O.max(Math.abs(r.getMaxX()),Math.abs(r.getMaxY()),Math.abs(r.getMinX()),Math.abs(r.getMinY()))+2*(t>0?t:0),a=n-Math.trunc(Math.log(i)/Math.log(10)+1);return Math.pow(10,a)},pr.CAP_ROUND.get=function(){return Bn.CAP_ROUND},pr.CAP_BUTT.get=function(){return Bn.CAP_FLAT},pr.CAP_FLAT.get=function(){return Bn.CAP_FLAT},pr.CAP_SQUARE.get=function(){return Bn.CAP_SQUARE},pr.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(dr,pr);var vr=function(){this._pt=[new B,new B],this._distance=m.NaN,this._isNull=!0};vr.prototype.getCoordinates=function(){return this._pt},vr.prototype.getCoordinate=function(e){return this._pt[e]},vr.prototype.setMinimum=function(){if(1===arguments.length){var e=arguments[0];this.setMinimum(e._pt[0],e._pt[1])}else if(2===arguments.length){var t=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(t,n),null;var r=t.distance(n);r<this._distance&&this.initialize(t,n,r)}},vr.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var e=arguments[0],t=arguments[1];this._pt[0].setCoordinate(e),this._pt[1].setCoordinate(t),this._distance=e.distance(t),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(r),this._distance=i,this._isNull=!1}},vr.prototype.getDistance=function(){return this._distance},vr.prototype.setMaximum=function(){if(1===arguments.length){var e=arguments[0];this.setMaximum(e._pt[0],e._pt[1])}else if(2===arguments.length){var t=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(t,n),null;var r=t.distance(n);r>this._distance&&this.initialize(t,n,r)}},vr.prototype.interfaces_=function(){return[]},vr.prototype.getClass=function(){return vr};var yr=function(){};yr.prototype.interfaces_=function(){return[]},yr.prototype.getClass=function(){return yr},yr.computeDistance=function(){if(arguments[2]instanceof vr&&arguments[0]instanceof We&&arguments[1]instanceof B)for(var e=arguments[0],t=arguments[1],n=arguments[2],r=e.getCoordinates(),i=new dn,a=0;a<r.length-1;a++){i.setCoordinates(r[a],r[a+1]);var o=i.closestPoint(t);n.setMinimum(o,t)}else if(arguments[2]instanceof vr&&arguments[0]instanceof $e&&arguments[1]instanceof B){var s=arguments[0],u=arguments[1],A=arguments[2];yr.computeDistance(s.getExteriorRing(),u,A);for(var c=0;c<s.getNumInteriorRing();c++)yr.computeDistance(s.getInteriorRingN(c),u,A)}else if(arguments[2]instanceof vr&&arguments[0]instanceof ce&&arguments[1]instanceof B){var l=arguments[0],f=arguments[1],h=arguments[2];if(l instanceof We)yr.computeDistance(l,f,h);else if(l instanceof $e)yr.computeDistance(l,f,h);else if(l instanceof Ge)for(var g=l,d=0;d<g.getNumGeometries();d++){var p=g.getGeometryN(d);yr.computeDistance(p,f,h)}else h.setMinimum(l.getCoordinate(),f)}else if(arguments[2]instanceof vr&&arguments[0]instanceof dn&&arguments[1]instanceof B){var v=arguments[0],y=arguments[1],m=arguments[2],I=v.closestPoint(y);m.setMinimum(I,y)}};var mr=function(e){this._maxPtDist=new vr,this._inputGeom=e||null},Ir={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};mr.prototype.computeMaxMidpointDistance=function(e){var t=new Er(this._inputGeom);e.apply(t),this._maxPtDist.setMaximum(t.getMaxPointDistance())},mr.prototype.computeMaxVertexDistance=function(e){var t=new br(this._inputGeom);e.apply(t),this._maxPtDist.setMaximum(t.getMaxPointDistance())},mr.prototype.findDistance=function(e){return this.computeMaxVertexDistance(e),this.computeMaxMidpointDistance(e),this._maxPtDist.getDistance()},mr.prototype.getDistancePoints=function(){return this._maxPtDist},mr.prototype.interfaces_=function(){return[]},mr.prototype.getClass=function(){return mr},Ir.MaxPointDistanceFilter.get=function(){return br},Ir.MaxMidpointDistanceFilter.get=function(){return Er},Object.defineProperties(mr,Ir);var br=function(e){this._maxPtDist=new vr,this._minPtDist=new vr,this._geom=e||null};br.prototype.filter=function(e){this._minPtDist.initialize(),yr.computeDistance(this._geom,e,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},br.prototype.getMaxPointDistance=function(){return this._maxPtDist},br.prototype.interfaces_=function(){return[he]},br.prototype.getClass=function(){return br};var Er=function(e){this._maxPtDist=new vr,this._minPtDist=new vr,this._geom=e||null};Er.prototype.filter=function(e,t){if(0===t)return null;var n=e.getCoordinate(t-1),r=e.getCoordinate(t),i=new B((n.x+r.x)/2,(n.y+r.y)/2);this._minPtDist.initialize(),yr.computeDistance(this._geom,i,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Er.prototype.isDone=function(){return!1},Er.prototype.isGeometryChanged=function(){return!1},Er.prototype.getMaxPointDistance=function(){return this._maxPtDist},Er.prototype.interfaces_=function(){return[Ue]},Er.prototype.getClass=function(){return Er};var Cr=function(e){this._comps=e||null};Cr.prototype.filter=function(e){e instanceof $e&&this._comps.add(e)},Cr.prototype.interfaces_=function(){return[Pe]},Cr.prototype.getClass=function(){return Cr},Cr.getPolygons=function(){if(1===arguments.length){var e=arguments[0];return Cr.getPolygons(e,new Ce)}if(2===arguments.length){var t=arguments[0],n=arguments[1];return t instanceof $e?n.add(t):t instanceof Ge&&t.apply(new Cr(n)),n}};var Br=function(){if(this._lines=null,this._isForcedToLineString=!1,1===arguments.length){var e=arguments[0];this._lines=e}else if(2===arguments.length){var t=arguments[0],n=arguments[1];this._lines=t,this._isForcedToLineString=n}};Br.prototype.filter=function(e){if(this._isForcedToLineString&&e instanceof tt){var t=e.getFactory().createLineString(e.getCoordinateSequence());return this._lines.add(t),null}e instanceof We&&this._lines.add(e)},Br.prototype.setForceToLineString=function(e){this._isForcedToLineString=e},Br.prototype.interfaces_=function(){return[Ae]},Br.prototype.getClass=function(){return Br},Br.getGeometry=function(){if(1===arguments.length){var e=arguments[0];return e.getFactory().buildGeometry(Br.getLines(e))}if(2===arguments.length){var t=arguments[0],n=arguments[1];return t.getFactory().buildGeometry(Br.getLines(t,n))}},Br.getLines=function(){if(1===arguments.length){var e=arguments[0];return Br.getLines(e,!1)}if(2===arguments.length){if(S(arguments[0],Ie)&&S(arguments[1],Ie)){for(var t=arguments[0],n=arguments[1],r=t.iterator();r.hasNext();){var i=r.next();Br.getLines(i,n)}return n}if(arguments[0]instanceof ce&&"boolean"==typeof arguments[1]){var a=arguments[0],o=arguments[1],s=new Ce;return a.apply(new Br(s,o)),s}if(arguments[0]instanceof ce&&S(arguments[1],Ie)){var u=arguments[0],A=arguments[1];return u instanceof We?A.add(u):u.apply(new Br(A)),A}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&S(arguments[0],Ie)&&S(arguments[1],Ie)){for(var c=arguments[0],l=arguments[1],f=arguments[2],h=c.iterator();h.hasNext();){var g=h.next();Br.getLines(g,l,f)}return l}if("boolean"==typeof arguments[2]&&arguments[0]instanceof ce&&S(arguments[1],Ie)){var d=arguments[0],p=arguments[1],v=arguments[2];return d.apply(new Br(p,v)),p}}};var wr=function(){if(this._boundaryRule=ge.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,0===arguments.length);else if(1===arguments.length){var e=arguments[0];if(null===e)throw new y("Rule must be non-null");this._boundaryRule=e}};wr.prototype.locateInternal=function(){if(arguments[0]instanceof B&&arguments[1]instanceof $e){var e=arguments[0],t=arguments[1];if(t.isEmpty())return _.EXTERIOR;var n=t.getExteriorRing(),r=this.locateInPolygonRing(e,n);if(r===_.EXTERIOR)return _.EXTERIOR;if(r===_.BOUNDARY)return _.BOUNDARY;for(var i=0;i<t.getNumInteriorRing();i++){var a=t.getInteriorRingN(i),o=this.locateInPolygonRing(e,a);if(o===_.INTERIOR)return _.EXTERIOR;if(o===_.BOUNDARY)return _.BOUNDARY}return _.INTERIOR}if(arguments[0]instanceof B&&arguments[1]instanceof We){var s=arguments[0],u=arguments[1];if(!u.getEnvelopeInternal().intersects(s))return _.EXTERIOR;var A=u.getCoordinates();return u.isClosed()||!s.equals(A[0])&&!s.equals(A[A.length-1])?se.isOnLine(s,A)?_.INTERIOR:_.EXTERIOR:_.BOUNDARY}if(arguments[0]instanceof B&&arguments[1]instanceof Xe){var c=arguments[0];return arguments[1].getCoordinate().equals2D(c)?_.INTERIOR:_.EXTERIOR}},wr.prototype.locateInPolygonRing=function(e,t){return t.getEnvelopeInternal().intersects(e)?se.locatePointInRing(e,t.getCoordinates()):_.EXTERIOR},wr.prototype.intersects=function(e,t){return this.locate(e,t)!==_.EXTERIOR},wr.prototype.updateLocationInfo=function(e){e===_.INTERIOR&&(this._isIn=!0),e===_.BOUNDARY&&this._numBoundaries++},wr.prototype.computeLocation=function(e,t){if(t instanceof Xe&&this.updateLocationInfo(this.locateInternal(e,t)),t instanceof We)this.updateLocationInfo(this.locateInternal(e,t));else if(t instanceof $e)this.updateLocationInfo(this.locateInternal(e,t));else if(t instanceof qe)for(var n=t,r=0;r<n.getNumGeometries();r++){var i=n.getGeometryN(r);this.updateLocationInfo(this.locateInternal(e,i))}else if(t instanceof nt)for(var a=t,o=0;o<a.getNumGeometries();o++){var s=a.getGeometryN(o);this.updateLocationInfo(this.locateInternal(e,s))}else if(t instanceof Ge)for(var u=new Un(t);u.hasNext();){var A=u.next();A!==t&&this.computeLocation(e,A)}},wr.prototype.locate=function(e,t){return t.isEmpty()?_.EXTERIOR:t instanceof We||t instanceof $e?this.locateInternal(e,t):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(e,t),this._boundaryRule.isInBoundary(this._numBoundaries)?_.BOUNDARY:this._numBoundaries>0||this._isIn?_.INTERIOR:_.EXTERIOR)},wr.prototype.interfaces_=function(){return[]},wr.prototype.getClass=function(){return wr};var Qr=function e(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length){var t=arguments[0],n=arguments[1];e.call(this,t,e.INSIDE_AREA,n)}else if(3===arguments.length){var r=arguments[0],i=arguments[1],a=arguments[2];this._component=r,this._segIndex=i,this._pt=a}},kr={INSIDE_AREA:{configurable:!0}};Qr.prototype.isInsideArea=function(){return this._segIndex===Qr.INSIDE_AREA},Qr.prototype.getCoordinate=function(){return this._pt},Qr.prototype.getGeometryComponent=function(){return this._component},Qr.prototype.getSegmentIndex=function(){return this._segIndex},Qr.prototype.interfaces_=function(){return[]},Qr.prototype.getClass=function(){return Qr},kr.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Qr,kr);var _r=function(e){this._pts=e||null};_r.prototype.filter=function(e){e instanceof Xe&&this._pts.add(e)},_r.prototype.interfaces_=function(){return[Pe]},_r.prototype.getClass=function(){return _r},_r.getPoints=function(){if(1===arguments.length){var e=arguments[0];return e instanceof Xe?$t.singletonList(e):_r.getPoints(e,new Ce)}if(2===arguments.length){var t=arguments[0],n=arguments[1];return t instanceof Xe?n.add(t):t instanceof Ge&&t.apply(new _r(n)),n}};var xr=function(){this._locations=null;var e=arguments[0];this._locations=e};xr.prototype.filter=function(e){(e instanceof Xe||e instanceof We||e instanceof $e)&&this._locations.add(new Qr(e,0,e.getCoordinate()))},xr.prototype.interfaces_=function(){return[Pe]},xr.prototype.getClass=function(){return xr},xr.getLocations=function(e){var t=new Ce;return e.apply(new xr(t)),t};var Sr=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new wr,this._minDistanceLocation=null,this._minDistance=m.MAX_VALUE,2===arguments.length){var e=arguments[0],t=arguments[1];this._geom=[e,t],this._terminateDistance=0}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=r,this._terminateDistance=i}};Sr.prototype.computeContainmentDistance=function(){if(0===arguments.length){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(2===arguments.length){var t=arguments[0],n=arguments[1],r=1-t,i=Cr.getPolygons(this._geom[t]);if(i.size()>0){var a=xr.getLocations(this._geom[r]);if(this.computeContainmentDistance(a,i,n),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[r]=n[0],this._minDistanceLocation[t]=n[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&S(arguments[0],Ee)&&S(arguments[1],Ee)){for(var o=arguments[0],s=arguments[1],u=arguments[2],A=0;A<o.size();A++)for(var c=o.get(A),l=0;l<s.size();l++)if(this.computeContainmentDistance(c,s.get(l),u),this._minDistance<=this._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof Qr&&arguments[1]instanceof $e){var f=arguments[0],h=arguments[1],g=arguments[2],d=f.getCoordinate();if(_.EXTERIOR!==this._ptLocator.locate(d,h))return this._minDistance=0,g[0]=f,g[1]=new Qr(h,d),null}},Sr.prototype.computeMinDistanceLinesPoints=function(e,t,n){for(var r=0;r<e.size();r++)for(var i=e.get(r),a=0;a<t.size();a++){var o=t.get(a);if(this.computeMinDistance(i,o,n),this._minDistance<=this._terminateDistance)return null}},Sr.prototype.computeFacetDistance=function(){var e=new Array(2).fill(null),t=Br.getLines(this._geom[0]),n=Br.getLines(this._geom[1]),r=_r.getPoints(this._geom[0]),i=_r.getPoints(this._geom[1]);return this.computeMinDistanceLines(t,n,e),this.updateMinDistance(e,!1),this._minDistance<=this._terminateDistance?null:(e[0]=null,e[1]=null,this.computeMinDistanceLinesPoints(t,i,e),this.updateMinDistance(e,!1),this._minDistance<=this._terminateDistance?null:(e[0]=null,e[1]=null,this.computeMinDistanceLinesPoints(n,r,e),this.updateMinDistance(e,!0),this._minDistance<=this._terminateDistance?null:(e[0]=null,e[1]=null,this.computeMinDistancePoints(r,i,e),void this.updateMinDistance(e,!1))))},Sr.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},Sr.prototype.updateMinDistance=function(e,t){if(null===e[0])return null;t?(this._minDistanceLocation[0]=e[1],this._minDistanceLocation[1]=e[0]):(this._minDistanceLocation[0]=e[0],this._minDistanceLocation[1]=e[1])},Sr.prototype.nearestPoints=function(){return this.computeMinDistance(),[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()]},Sr.prototype.computeMinDistance=function(){if(0===arguments.length){if(null!==this._minDistanceLocation)return null;if(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance)return null;this.computeFacetDistance()}else if(3===arguments.length)if(arguments[2]instanceof Array&&arguments[0]instanceof We&&arguments[1]instanceof Xe){var e=arguments[0],t=arguments[1],n=arguments[2];if(e.getEnvelopeInternal().distance(t.getEnvelopeInternal())>this._minDistance)return null;for(var r=e.getCoordinates(),i=t.getCoordinate(),a=0;a<r.length-1;a++){var o=se.distancePointLine(i,r[a],r[a+1]);if(o<this._minDistance){this._minDistance=o;var s=new dn(r[a],r[a+1]).closestPoint(i);n[0]=new Qr(e,a,s),n[1]=new Qr(t,0,i)}if(this._minDistance<=this._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof We&&arguments[1]instanceof We){var u=arguments[0],A=arguments[1],c=arguments[2];if(u.getEnvelopeInternal().distance(A.getEnvelopeInternal())>this._minDistance)return null;for(var l=u.getCoordinates(),f=A.getCoordinates(),h=0;h<l.length-1;h++)for(var g=0;g<f.length-1;g++){var d=se.distanceLineLine(l[h],l[h+1],f[g],f[g+1]);if(d<this._minDistance){this._minDistance=d;var p=new dn(l[h],l[h+1]),v=new dn(f[g],f[g+1]),y=p.closestPoints(v);c[0]=new Qr(u,h,y[0]),c[1]=new Qr(A,g,y[1])}if(this._minDistance<=this._terminateDistance)return null}}},Sr.prototype.computeMinDistancePoints=function(e,t,n){for(var r=0;r<e.size();r++)for(var i=e.get(r),a=0;a<t.size();a++){var o=t.get(a),s=i.getCoordinate().distance(o.getCoordinate());if(s<this._minDistance&&(this._minDistance=s,n[0]=new Qr(i,0,i.getCoordinate()),n[1]=new Qr(o,0,o.getCoordinate())),this._minDistance<=this._terminateDistance)return null}},Sr.prototype.distance=function(){if(null===this._geom[0]||null===this._geom[1])throw new y("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},Sr.prototype.computeMinDistanceLines=function(e,t,n){for(var r=0;r<e.size();r++)for(var i=e.get(r),a=0;a<t.size();a++){var o=t.get(a);if(this.computeMinDistance(i,o,n),this._minDistance<=this._terminateDistance)return null}},Sr.prototype.interfaces_=function(){return[]},Sr.prototype.getClass=function(){return Sr},Sr.distance=function(e,t){return new Sr(e,t).distance()},Sr.isWithinDistance=function(e,t,n){return new Sr(e,t,n).distance()<=n},Sr.nearestPoints=function(e,t){return new Sr(e,t).nearestPoints()};var Or=function(){this._pt=[new B,new B],this._distance=m.NaN,this._isNull=!0};Or.prototype.getCoordinates=function(){return this._pt},Or.prototype.getCoordinate=function(e){return this._pt[e]},Or.prototype.setMinimum=function(){if(1===arguments.length){var e=arguments[0];this.setMinimum(e._pt[0],e._pt[1])}else if(2===arguments.length){var t=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(t,n),null;var r=t.distance(n);r<this._distance&&this.initialize(t,n,r)}},Or.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var e=arguments[0],t=arguments[1];this._pt[0].setCoordinate(e),this._pt[1].setCoordinate(t),this._distance=e.distance(t),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(r),this._distance=i,this._isNull=!1}},Or.prototype.toString=function(){return Z.toLineString(this._pt[0],this._pt[1])},Or.prototype.getDistance=function(){return this._distance},Or.prototype.setMaximum=function(){if(1===arguments.length){var e=arguments[0];this.setMaximum(e._pt[0],e._pt[1])}else if(2===arguments.length){var t=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(t,n),null;var r=t.distance(n);r>this._distance&&this.initialize(t,n,r)}},Or.prototype.interfaces_=function(){return[]},Or.prototype.getClass=function(){return Or};var Dr=function(){};Dr.prototype.interfaces_=function(){return[]},Dr.prototype.getClass=function(){return Dr},Dr.computeDistance=function(){if(arguments[2]instanceof Or&&arguments[0]instanceof We&&arguments[1]instanceof B)for(var e=arguments[0],t=arguments[1],n=arguments[2],r=new dn,i=e.getCoordinates(),a=0;a<i.length-1;a++){r.setCoordinates(i[a],i[a+1]);var o=r.closestPoint(t);n.setMinimum(o,t)}else if(arguments[2]instanceof Or&&arguments[0]instanceof $e&&arguments[1]instanceof B){var s=arguments[0],u=arguments[1],A=arguments[2];Dr.computeDistance(s.getExteriorRing(),u,A);for(var c=0;c<s.getNumInteriorRing();c++)Dr.computeDistance(s.getInteriorRingN(c),u,A)}else if(arguments[2]instanceof Or&&arguments[0]instanceof ce&&arguments[1]instanceof B){var l=arguments[0],f=arguments[1],h=arguments[2];if(l instanceof We)Dr.computeDistance(l,f,h);else if(l instanceof $e)Dr.computeDistance(l,f,h);else if(l instanceof Ge)for(var g=l,d=0;d<g.getNumGeometries();d++){var p=g.getGeometryN(d);Dr.computeDistance(p,f,h)}else h.setMinimum(l.getCoordinate(),f)}else if(arguments[2]instanceof Or&&arguments[0]instanceof dn&&arguments[1]instanceof B){var v=arguments[0],y=arguments[1],m=arguments[2],I=v.closestPoint(y);m.setMinimum(I,y)}};var Rr=function(){this._g0=null,this._g1=null,this._ptDist=new Or,this._densifyFrac=0;var e=arguments[0],t=arguments[1];this._g0=e,this._g1=t},jr={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};Rr.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},Rr.prototype.setDensifyFraction=function(e){if(e>1||e<=0)throw new y("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=e},Rr.prototype.compute=function(e,t){this.computeOrientedDistance(e,t,this._ptDist),this.computeOrientedDistance(t,e,this._ptDist)},Rr.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Rr.prototype.computeOrientedDistance=function(e,t,n){var r=new Mr(t);if(e.apply(r),n.setMaximum(r.getMaxPointDistance()),this._densifyFrac>0){var i=new Nr(t,this._densifyFrac);e.apply(i),n.setMaximum(i.getMaxPointDistance())}},Rr.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Rr.prototype.interfaces_=function(){return[]},Rr.prototype.getClass=function(){return Rr},Rr.distance=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];return new Rr(e,t).distance()}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],a=new Rr(n,r);return a.setDensifyFraction(i),a.distance()}},jr.MaxPointDistanceFilter.get=function(){return Mr},jr.MaxDensifiedByFractionDistanceFilter.get=function(){return Nr},Object.defineProperties(Rr,jr);var Mr=function(){this._maxPtDist=new Or,this._minPtDist=new Or,this._euclideanDist=new Dr,this._geom=null;var e=arguments[0];this._geom=e};Mr.prototype.filter=function(e){this._minPtDist.initialize(),Dr.computeDistance(this._geom,e,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Mr.prototype.getMaxPointDistance=function(){return this._maxPtDist},Mr.prototype.interfaces_=function(){return[he]},Mr.prototype.getClass=function(){return Mr};var Nr=function(){this._maxPtDist=new Or,this._minPtDist=new Or,this._geom=null,this._numSubSegs=0;var e=arguments[0],t=arguments[1];this._geom=e,this._numSubSegs=Math.trunc(Math.round(1/t))};Nr.prototype.filter=function(e,t){if(0===t)return null;for(var n=e.getCoordinate(t-1),r=e.getCoordinate(t),i=(r.x-n.x)/this._numSubSegs,a=(r.y-n.y)/this._numSubSegs,o=0;o<this._numSubSegs;o++){var s=n.x+o*i,u=n.y+o*a,A=new B(s,u);this._minPtDist.initialize(),Dr.computeDistance(this._geom,A,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)}},Nr.prototype.isDone=function(){return!1},Nr.prototype.isGeometryChanged=function(){return!1},Nr.prototype.getMaxPointDistance=function(){return this._maxPtDist},Nr.prototype.interfaces_=function(){return[Ue]},Nr.prototype.getClass=function(){return Nr};var Fr=function(e,t,n){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=e||null,this._bufDistance=t||null,this._result=n||null},Tr={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Fr.prototype.checkMaximumDistance=function(e,t,n){var r=new Rr(t,e);if(r.setDensifyFraction(.25),this._maxDistanceFound=r.orientedDistance(),this._maxDistanceFound>n){this._isValid=!1;var i=r.getCoordinates();this._errorLocation=i[1],this._errorIndicator=e.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+Z.toLineString(i[0],i[1])+")"}},Fr.prototype.isValid=function(){var e=Math.abs(this._bufDistance),t=Fr.MAX_DISTANCE_DIFF_FRAC*e;return this._minValidDistance=e-t,this._maxValidDistance=e+t,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Fr.VERBOSE&&H.out.println("Min Dist= "+this._minDistanceFound+"  err= "+(1-this._minDistanceFound/this._bufDistance)+"  Max Dist= "+this._maxDistanceFound+"  err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Fr.prototype.checkNegativeValid=function(){if(!(this._input instanceof $e||this._input instanceof nt||this._input instanceof Ge))return null;var e=this.getPolygonLines(this._input);if(this.checkMinimumDistance(e,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(e,this._result,this._maxValidDistance)},Fr.prototype.getErrorIndicator=function(){return this._errorIndicator},Fr.prototype.checkMinimumDistance=function(e,t,n){var r=new Sr(e,t,n);if(this._minDistanceFound=r.distance(),this._minDistanceFound<n){this._isValid=!1;var i=r.nearestPoints();this._errorLocation=r.nearestPoints()[1],this._errorIndicator=e.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+Z.toLineString(i[0],i[1])+" )"}},Fr.prototype.checkPositiveValid=function(){var e=this._result.getBoundary();if(this.checkMinimumDistance(this._input,e,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,e,this._maxValidDistance)},Fr.prototype.getErrorLocation=function(){return this._errorLocation},Fr.prototype.getPolygonLines=function(e){for(var t=new Ce,n=new Br(t),r=Cr.getPolygons(e).iterator();r.hasNext();)r.next().apply(n);return e.getFactory().buildGeometry(t)},Fr.prototype.getErrorMessage=function(){return this._errMsg},Fr.prototype.interfaces_=function(){return[]},Fr.prototype.getClass=function(){return Fr},Tr.VERBOSE.get=function(){return!1},Tr.MAX_DISTANCE_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Fr,Tr);var Lr=function(e,t,n){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=e||null,this._distance=t||null,this._result=n||null},Pr={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};Lr.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},Lr.prototype.checkEnvelope=function(){if(this._distance<0)return null;var e=this._distance*Lr.MAX_ENV_DIFF_FRAC;0===e&&(e=.001);var t=new J(this._input.getEnvelopeInternal());t.expandBy(this._distance);var n=new J(this._result.getEnvelopeInternal());n.expandBy(e),n.contains(t)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(n)),this.report("Envelope")},Lr.prototype.checkDistance=function(){var e=new Fr(this._input,this._distance,this._result);e.isValid()||(this._isValid=!1,this._errorMsg=e.getErrorMessage(),this._errorLocation=e.getErrorLocation(),this._errorIndicator=e.getErrorIndicator()),this.report("Distance")},Lr.prototype.checkArea=function(){var e=this._input.getArea(),t=this._result.getArea();this._distance>0&&e>t&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&e<t&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},Lr.prototype.checkPolygonal=function(){this._result instanceof $e||this._result instanceof nt||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},Lr.prototype.getErrorIndicator=function(){return this._errorIndicator},Lr.prototype.getErrorLocation=function(){return this._errorLocation},Lr.prototype.checkExpectedEmpty=function(){return this._input.getDimension()>=2||this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),void this.report("ExpectedEmpty"))},Lr.prototype.report=function(e){if(!Lr.VERBOSE)return null;H.out.println("Check "+e+": "+(this._isValid?"passed":"FAILED"))},Lr.prototype.getErrorMessage=function(){return this._errorMsg},Lr.prototype.interfaces_=function(){return[]},Lr.prototype.getClass=function(){return Lr},Lr.isValidMsg=function(e,t,n){var r=new Lr(e,t,n);return r.isValid()?null:r.getErrorMessage()},Lr.isValid=function(e,t,n){return!!new Lr(e,t,n).isValid()},Pr.VERBOSE.get=function(){return!1},Pr.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Lr,Pr);var Ur=function(){this._pts=null,this._data=null;var e=arguments[0],t=arguments[1];this._pts=e,this._data=t};Ur.prototype.getCoordinates=function(){return this._pts},Ur.prototype.size=function(){return this._pts.length},Ur.prototype.getCoordinate=function(e){return this._pts[e]},Ur.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Ur.prototype.getSegmentOctant=function(e){return e===this._pts.length-1?-1:ln.octant(this.getCoordinate(e),this.getCoordinate(e+1))},Ur.prototype.setData=function(e){this._data=e},Ur.prototype.getData=function(){return this._data},Ur.prototype.toString=function(){return Z.toLineString(new ut(this._pts))},Ur.prototype.interfaces_=function(){return[fn]},Ur.prototype.getClass=function(){return Ur};var Gr=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new Ce,this._intersectionCount=0,this._keepIntersections=!0;var e=arguments[0];this._li=e,this._interiorIntersection=null};Gr.prototype.getInteriorIntersection=function(){return this._interiorIntersection},Gr.prototype.setCheckEndSegmentsOnly=function(e){this._isCheckEndSegmentsOnly=e},Gr.prototype.getIntersectionSegments=function(){return this._intSegments},Gr.prototype.count=function(){return this._intersectionCount},Gr.prototype.getIntersections=function(){return this._intersections},Gr.prototype.setFindAllIntersections=function(e){this._findAllIntersections=e},Gr.prototype.setKeepIntersections=function(e){this._keepIntersections=e},Gr.prototype.processIntersections=function(e,t,n,r){if(!this._findAllIntersections&&this.hasIntersection())return null;if(e===n&&t===r)return null;if(this._isCheckEndSegmentsOnly&&!this.isEndSegment(e,t)&&!this.isEndSegment(n,r))return null;var i=e.getCoordinates()[t],a=e.getCoordinates()[t+1],o=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,a,o,s),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=i,this._intSegments[1]=a,this._intSegments[2]=o,this._intSegments[3]=s,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},Gr.prototype.isEndSegment=function(e,t){return 0===t||t>=e.size()-2},Gr.prototype.hasIntersection=function(){return null!==this._interiorIntersection},Gr.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},Gr.prototype.interfaces_=function(){return[Kn]},Gr.prototype.getClass=function(){return Gr},Gr.createAllIntersectionsFinder=function(e){var t=new Gr(e);return t.setFindAllIntersections(!0),t},Gr.createAnyIntersectionFinder=function(e){return new Gr(e)},Gr.createIntersectionCounter=function(e){var t=new Gr(e);return t.setFindAllIntersections(!0),t.setKeepIntersections(!1),t};var qr=function(){this._li=new ie,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var e=arguments[0];this._segStrings=e};qr.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},qr.prototype.getIntersections=function(){return this._segInt.getIntersections()},qr.prototype.isValid=function(){return this.execute(),this._isValid},qr.prototype.setFindAllIntersections=function(e){this._findAllIntersections=e},qr.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Gr(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var e=new En;if(e.setSegmentIntersector(this._segInt),e.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},qr.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new _t(this.getErrorMessage(),this._segInt.getInteriorIntersection())},qr.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var e=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+Z.toLineString(e[0],e[1])+" and "+Z.toLineString(e[2],e[3])},qr.prototype.interfaces_=function(){return[]},qr.prototype.getClass=function(){return qr},qr.computeIntersections=function(e){var t=new qr(e);return t.setFindAllIntersections(!0),t.isValid(),t.getIntersections()};var Hr=function e(){this._nv=null;var t=arguments[0];this._nv=new qr(e.toSegmentStrings(t))};Hr.prototype.checkValid=function(){this._nv.checkValid()},Hr.prototype.interfaces_=function(){return[]},Hr.prototype.getClass=function(){return Hr},Hr.toSegmentStrings=function(e){for(var t=new Ce,n=e.iterator();n.hasNext();){var r=n.next();t.add(new Ur(r.getCoordinates(),r))}return t},Hr.checkValid=function(e){new Hr(e).checkValid()};var Yr=function(e){this._mapOp=e};Yr.prototype.map=function(e){for(var t=new Ce,n=0;n<e.getNumGeometries();n++){var r=this._mapOp.map(e.getGeometryN(n));r.isEmpty()||t.add(r)}return e.getFactory().createGeometryCollection(vt.toGeometryArray(t))},Yr.prototype.interfaces_=function(){return[]},Yr.prototype.getClass=function(){return Yr},Yr.map=function(e,t){return new Yr(t).map(e)};var Jr=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new Ce,this._resultLineList=new Ce;var e=arguments[0],t=arguments[1],n=arguments[2];this._op=e,this._geometryFactory=t,this._ptLocator=n};Jr.prototype.collectLines=function(e){for(var t=this._op.getGraph().getEdgeEnds().iterator();t.hasNext();){var n=t.next();this.collectLineEdge(n,e,this._lineEdgesList),this.collectBoundaryTouchEdge(n,e,this._lineEdgesList)}},Jr.prototype.labelIsolatedLine=function(e,t){var n=this._ptLocator.locate(e.getCoordinate(),this._op.getArgGeometry(t));e.getLabel().setLocation(t,n)},Jr.prototype.build=function(e){return this.findCoveredLineEdges(),this.collectLines(e),this.buildLines(e),this._resultLineList},Jr.prototype.collectLineEdge=function(e,t,n){var r=e.getLabel(),i=e.getEdge();e.isLineEdge()&&(e.isVisited()||!Qi.isResultOfOp(r,t)||i.isCovered()||(n.add(i),e.setVisitedEdge(!0)))},Jr.prototype.findCoveredLineEdges=function(){for(var e=this._op.getGraph().getNodes().iterator();e.hasNext();)e.next().getEdges().findCoveredLineEdges();for(var t=this._op.getGraph().getEdgeEnds().iterator();t.hasNext();){var n=t.next(),r=n.getEdge();if(n.isLineEdge()&&!r.isCoveredSet()){var i=this._op.isCoveredByA(n.getCoordinate());r.setCovered(i)}}},Jr.prototype.labelIsolatedLines=function(e){for(var t=e.iterator();t.hasNext();){var n=t.next(),r=n.getLabel();n.isIsolated()&&(r.isNull(0)?this.labelIsolatedLine(n,0):this.labelIsolatedLine(n,1))}},Jr.prototype.buildLines=function(e){for(var t=this._lineEdgesList.iterator();t.hasNext();){var n=t.next(),r=this._geometryFactory.createLineString(n.getCoordinates());this._resultLineList.add(r),n.setInResult(!0)}},Jr.prototype.collectBoundaryTouchEdge=function(e,t,n){var r=e.getLabel();return e.isLineEdge()||e.isVisited()||e.isInteriorAreaEdge()||e.getEdge().isInResult()?null:(te.isTrue(!(e.isInResult()||e.getSym().isInResult())||!e.getEdge().isInResult()),void(Qi.isResultOfOp(r,t)&&t===Qi.INTERSECTION&&(n.add(e.getEdge()),e.setVisitedEdge(!0))))},Jr.prototype.interfaces_=function(){return[]},Jr.prototype.getClass=function(){return Jr};var zr=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new Ce;var e=arguments[0],t=arguments[1];this._op=e,this._geometryFactory=t};zr.prototype.filterCoveredNodeToPoint=function(e){var t=e.getCoordinate();if(!this._op.isCoveredByLA(t)){var n=this._geometryFactory.createPoint(t);this._resultPointList.add(n)}},zr.prototype.extractNonCoveredResultNodes=function(e){for(var t=this._op.getGraph().getNodes().iterator();t.hasNext();){var n=t.next();if(!n.isInResult()&&!n.isIncidentEdgeInResult()&&(0===n.getEdges().getDegree()||e===Qi.INTERSECTION)){var r=n.getLabel();Qi.isResultOfOp(r,e)&&this.filterCoveredNodeToPoint(n)}}},zr.prototype.build=function(e){return this.extractNonCoveredResultNodes(e),this._resultPointList},zr.prototype.interfaces_=function(){return[]},zr.prototype.getClass=function(){return zr};var Kr=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};Kr.prototype.transformPoint=function(e,t){return this._factory.createPoint(this.transformCoordinates(e.getCoordinateSequence(),e))},Kr.prototype.transformPolygon=function(e,t){var n=!0,r=this.transformLinearRing(e.getExteriorRing(),e);null!==r&&r instanceof tt&&!r.isEmpty()||(n=!1);for(var i=new Ce,a=0;a<e.getNumInteriorRing();a++){var o=this.transformLinearRing(e.getInteriorRingN(a),e);null===o||o.isEmpty()||(o instanceof tt||(n=!1),i.add(o))}if(n)return this._factory.createPolygon(r,i.toArray([]));var s=new Ce;return null!==r&&s.add(r),s.addAll(i),this._factory.buildGeometry(s)},Kr.prototype.createCoordinateSequence=function(e){return this._factory.getCoordinateSequenceFactory().create(e)},Kr.prototype.getInputGeometry=function(){return this._inputGeom},Kr.prototype.transformMultiLineString=function(e,t){for(var n=new Ce,r=0;r<e.getNumGeometries();r++){var i=this.transformLineString(e.getGeometryN(r),e);null!==i&&(i.isEmpty()||n.add(i))}return this._factory.buildGeometry(n)},Kr.prototype.transformCoordinates=function(e,t){return this.copy(e)},Kr.prototype.transformLineString=function(e,t){return this._factory.createLineString(this.transformCoordinates(e.getCoordinateSequence(),e))},Kr.prototype.transformMultiPoint=function(e,t){for(var n=new Ce,r=0;r<e.getNumGeometries();r++){var i=this.transformPoint(e.getGeometryN(r),e);null!==i&&(i.isEmpty()||n.add(i))}return this._factory.buildGeometry(n)},Kr.prototype.transformMultiPolygon=function(e,t){for(var n=new Ce,r=0;r<e.getNumGeometries();r++){var i=this.transformPolygon(e.getGeometryN(r),e);null!==i&&(i.isEmpty()||n.add(i))}return this._factory.buildGeometry(n)},Kr.prototype.copy=function(e){return e.copy()},Kr.prototype.transformGeometryCollection=function(e,t){for(var n=new Ce,r=0;r<e.getNumGeometries();r++){var i=this.transform(e.getGeometryN(r));null!==i&&(this._pruneEmptyGeometry&&i.isEmpty()||n.add(i))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(vt.toGeometryArray(n)):this._factory.buildGeometry(n)},Kr.prototype.transform=function(e){if(this._inputGeom=e,this._factory=e.getFactory(),e instanceof Xe)return this.transformPoint(e,null);if(e instanceof et)return this.transformMultiPoint(e,null);if(e instanceof tt)return this.transformLinearRing(e,null);if(e instanceof We)return this.transformLineString(e,null);if(e instanceof qe)return this.transformMultiLineString(e,null);if(e instanceof $e)return this.transformPolygon(e,null);if(e instanceof nt)return this.transformMultiPolygon(e,null);if(e instanceof Ge)return this.transformGeometryCollection(e,null);throw new y("Unknown Geometry subtype: "+e.getClass().getName())},Kr.prototype.transformLinearRing=function(e,t){var n=this.transformCoordinates(e.getCoordinateSequence(),e);if(null===n)return this._factory.createLinearRing(null);var r=n.size();return r>0&&r<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},Kr.prototype.interfaces_=function(){return[]},Kr.prototype.getClass=function(){return Kr};var Wr=function e(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new dn,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof We&&"number"==typeof arguments[1]){var t=arguments[0],n=arguments[1];e.call(this,t.getCoordinates(),n)}else if(arguments[0]instanceof Array&&"number"==typeof arguments[1]){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=e.isClosed(r),this._snapTolerance=i}};Wr.prototype.snapVertices=function(e,t){for(var n=this._isClosed?e.size()-1:e.size(),r=0;r<n;r++){var i=e.get(r),a=this.findSnapForVertex(i,t);null!==a&&(e.set(r,new B(a)),0===r&&this._isClosed&&e.set(e.size()-1,new B(a)))}},Wr.prototype.findSnapForVertex=function(e,t){for(var n=0;n<t.length;n++){if(e.equals2D(t[n]))return null;if(e.distance(t[n])<this._snapTolerance)return t[n]}return null},Wr.prototype.snapTo=function(e){var t=new we(this._srcPts);return this.snapVertices(t,e),this.snapSegments(t,e),t.toCoordinateArray()},Wr.prototype.snapSegments=function(e,t){if(0===t.length)return null;var n=t.length;t[0].equals2D(t[t.length-1])&&(n=t.length-1);for(var r=0;r<n;r++){var i=t[r],a=this.findSegmentIndexToSnap(i,e);a>=0&&e.add(a+1,new B(i),!1)}},Wr.prototype.findSegmentIndexToSnap=function(e,t){for(var n=m.MAX_VALUE,r=-1,i=0;i<t.size()-1;i++){if(this._seg.p0=t.get(i),this._seg.p1=t.get(i+1),this._seg.p0.equals2D(e)||this._seg.p1.equals2D(e)){if(this._allowSnappingToSourceVertices)continue;return-1}var a=this._seg.distance(e);a<this._snapTolerance&&a<n&&(n=a,r=i)}return r},Wr.prototype.setAllowSnappingToSourceVertices=function(e){this._allowSnappingToSourceVertices=e},Wr.prototype.interfaces_=function(){return[]},Wr.prototype.getClass=function(){return Wr},Wr.isClosed=function(e){return!(e.length<=1)&&e[0].equals2D(e[e.length-1])};var Vr=function(e){this._srcGeom=e||null},Xr={SNAP_PRECISION_FACTOR:{configurable:!0}};Vr.prototype.snapTo=function(e,t){var n=this.extractTargetCoordinates(e);return new Zr(t,n).transform(this._srcGeom)},Vr.prototype.snapToSelf=function(e,t){var n=this.extractTargetCoordinates(this._srcGeom),r=new Zr(e,n,!0).transform(this._srcGeom),i=r;return t&&S(i,Ze)&&(i=r.buffer(0)),i},Vr.prototype.computeSnapTolerance=function(e){return this.computeMinimumSegmentLength(e)/10},Vr.prototype.extractTargetCoordinates=function(e){for(var t=new h,n=e.getCoordinates(),r=0;r<n.length;r++)t.add(n[r]);return t.toArray(new Array(0).fill(null))},Vr.prototype.computeMinimumSegmentLength=function(e){for(var t=m.MAX_VALUE,n=0;n<e.length-1;n++){var r=e[n].distance(e[n+1]);r<t&&(t=r)}return t},Vr.prototype.interfaces_=function(){return[]},Vr.prototype.getClass=function(){return Vr},Vr.snap=function(e,t,n){var r=new Array(2).fill(null),i=new Vr(e);r[0]=i.snapTo(t,n);var a=new Vr(t);return r[1]=a.snapTo(r[0],n),r},Vr.computeOverlaySnapTolerance=function(){if(1===arguments.length){var e=arguments[0],t=Vr.computeSizeBasedSnapTolerance(e),n=e.getPrecisionModel();if(n.getType()===ht.FIXED){var r=1/n.getScale()*2/1.415;r>t&&(t=r)}return t}if(2===arguments.length){var i=arguments[0],a=arguments[1];return Math.min(Vr.computeOverlaySnapTolerance(i),Vr.computeOverlaySnapTolerance(a))}},Vr.computeSizeBasedSnapTolerance=function(e){var t=e.getEnvelopeInternal();return Math.min(t.getHeight(),t.getWidth())*Vr.SNAP_PRECISION_FACTOR},Vr.snapToSelf=function(e,t,n){return new Vr(e).snapToSelf(t,n)},Xr.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Vr,Xr);var Zr=function(e){function t(t,n,r){e.call(this),this._snapTolerance=t||null,this._snapPts=n||null,this._isSelfSnap=void 0!==r&&r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.snapLine=function(e,t){var n=new Wr(e,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(t)},t.prototype.transformCoordinates=function(e,t){var n=e.toCoordinateArray(),r=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(r)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Kr),$r=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};$r.prototype.getCommon=function(){return m.longBitsToDouble(this._commonBits)},$r.prototype.add=function(e){var t=m.doubleToLongBits(e);return this._isFirst?(this._commonBits=t,this._commonSignExp=$r.signExpBits(this._commonBits),this._isFirst=!1,null):$r.signExpBits(t)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=$r.numCommonMostSigMantissaBits(this._commonBits,t),void(this._commonBits=$r.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},$r.prototype.toString=function(){if(1===arguments.length){var e=arguments[0],t=m.longBitsToDouble(e),n="0000000000000000000000000000000000000000000000000000000000000000"+m.toBinaryString(e),r=n.substring(n.length-64);return r.substring(0,1)+"  "+r.substring(1,12)+"(exp) "+r.substring(12)+" [ "+t+" ]"}},$r.prototype.interfaces_=function(){return[]},$r.prototype.getClass=function(){return $r},$r.getBit=function(e,t){return 0!=(e&1<<t)?1:0},$r.signExpBits=function(e){return e>>52},$r.zeroLowerBits=function(e,t){return e&~((1<<t)-1)},$r.numCommonMostSigMantissaBits=function(e,t){for(var n=0,r=52;r>=0;r--){if($r.getBit(e,r)!==$r.getBit(t,r))return n;n++}return 52};var ei=function(){this._commonCoord=null,this._ccFilter=new ni},ti={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};ei.prototype.addCommonBits=function(e){var t=new ri(this._commonCoord);e.apply(t),e.geometryChanged()},ei.prototype.removeCommonBits=function(e){if(0===this._commonCoord.x&&0===this._commonCoord.y)return e;var t=new B(this._commonCoord);t.x=-t.x,t.y=-t.y;var n=new ri(t);return e.apply(n),e.geometryChanged(),e},ei.prototype.getCommonCoordinate=function(){return this._commonCoord},ei.prototype.add=function(e){e.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},ei.prototype.interfaces_=function(){return[]},ei.prototype.getClass=function(){return ei},ti.CommonCoordinateFilter.get=function(){return ni},ti.Translater.get=function(){return ri},Object.defineProperties(ei,ti);var ni=function(){this._commonBitsX=new $r,this._commonBitsY=new $r};ni.prototype.filter=function(e){this._commonBitsX.add(e.x),this._commonBitsY.add(e.y)},ni.prototype.getCommonCoordinate=function(){return new B(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},ni.prototype.interfaces_=function(){return[he]},ni.prototype.getClass=function(){return ni};var ri=function(){this.trans=null;var e=arguments[0];this.trans=e};ri.prototype.filter=function(e,t){var n=e.getOrdinate(t,0)+this.trans.x,r=e.getOrdinate(t,1)+this.trans.y;e.setOrdinate(t,0,n),e.setOrdinate(t,1,r)},ri.prototype.isDone=function(){return!1},ri.prototype.isGeometryChanged=function(){return!0},ri.prototype.interfaces_=function(){return[Ue]},ri.prototype.getClass=function(){return ri};var ii=function(e,t){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=e,this._geom[1]=t,this.computeSnapTolerance()};ii.prototype.selfSnap=function(e){return new Vr(e).snapTo(e,this._snapTolerance)},ii.prototype.removeCommonBits=function(e){this._cbr=new ei,this._cbr.add(e[0]),this._cbr.add(e[1]);var t=new Array(2).fill(null);return t[0]=this._cbr.removeCommonBits(e[0].copy()),t[1]=this._cbr.removeCommonBits(e[1].copy()),t},ii.prototype.prepareResult=function(e){return this._cbr.addCommonBits(e),e},ii.prototype.getResultGeometry=function(e){var t=this.snap(this._geom),n=Qi.overlayOp(t[0],t[1],e);return this.prepareResult(n)},ii.prototype.checkValid=function(e){e.isValid()||H.out.println("Snapped geometry is invalid")},ii.prototype.computeSnapTolerance=function(){this._snapTolerance=Vr.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},ii.prototype.snap=function(e){var t=this.removeCommonBits(e);return Vr.snap(t[0],t[1],this._snapTolerance)},ii.prototype.interfaces_=function(){return[]},ii.prototype.getClass=function(){return ii},ii.overlayOp=function(e,t,n){return new ii(e,t).getResultGeometry(n)},ii.union=function(e,t){return ii.overlayOp(e,t,Qi.UNION)},ii.intersection=function(e,t){return ii.overlayOp(e,t,Qi.INTERSECTION)},ii.symDifference=function(e,t){return ii.overlayOp(e,t,Qi.SYMDIFFERENCE)},ii.difference=function(e,t){return ii.overlayOp(e,t,Qi.DIFFERENCE)};var ai=function(e,t){this._geom=new Array(2).fill(null),this._geom[0]=e,this._geom[1]=t};ai.prototype.getResultGeometry=function(e){var t=null,n=!1,r=null;try{t=Qi.overlayOp(this._geom[0],this._geom[1],e),n=!0}catch(e){if(!(e instanceof $))throw e;r=e}if(!n)try{t=ii.overlayOp(this._geom[0],this._geom[1],e)}catch(e){throw e instanceof $?r:e}return t},ai.prototype.interfaces_=function(){return[]},ai.prototype.getClass=function(){return ai},ai.overlayOp=function(e,t,n){return new ai(e,t).getResultGeometry(n)},ai.union=function(e,t){return ai.overlayOp(e,t,Qi.UNION)},ai.intersection=function(e,t){return ai.overlayOp(e,t,Qi.INTERSECTION)},ai.symDifference=function(e,t){return ai.overlayOp(e,t,Qi.SYMDIFFERENCE)},ai.difference=function(e,t){return ai.overlayOp(e,t,Qi.DIFFERENCE)};var oi=function(){this.mce=null,this.chainIndex=null;var e=arguments[0],t=arguments[1];this.mce=e,this.chainIndex=t};oi.prototype.computeIntersections=function(e,t){this.mce.computeIntersectsForChain(this.chainIndex,e.mce,e.chainIndex,t)},oi.prototype.interfaces_=function(){return[]},oi.prototype.getClass=function(){return oi};var si=function e(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var t=arguments[0],n=arguments[1];this._eventType=e.DELETE,this._xValue=t,this._insertEvent=n}else if(3===arguments.length){var r=arguments[0],i=arguments[1],a=arguments[2];this._eventType=e.INSERT,this._label=r,this._xValue=i,this._obj=a}},ui={INSERT:{configurable:!0},DELETE:{configurable:!0}};si.prototype.isDelete=function(){return this._eventType===si.DELETE},si.prototype.setDeleteEventIndex=function(e){this._deleteEventIndex=e},si.prototype.getObject=function(){return this._obj},si.prototype.compareTo=function(e){var t=e;return this._xValue<t._xValue?-1:this._xValue>t._xValue?1:this._eventType<t._eventType?-1:this._eventType>t._eventType?1:0},si.prototype.getInsertEvent=function(){return this._insertEvent},si.prototype.isInsert=function(){return this._eventType===si.INSERT},si.prototype.isSameLabel=function(e){return null!==this._label&&this._label===e._label},si.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},si.prototype.interfaces_=function(){return[b]},si.prototype.getClass=function(){return si},ui.INSERT.get=function(){return 1},ui.DELETE.get=function(){return 2},Object.defineProperties(si,ui);var Ai=function(){};Ai.prototype.interfaces_=function(){return[]},Ai.prototype.getClass=function(){return Ai};var ci=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var e=arguments[0],t=arguments[1],n=arguments[2];this._li=e,this._includeProper=t,this._recordIsolated=n};ci.prototype.isTrivialIntersection=function(e,t,n,r){if(e===n&&1===this._li.getIntersectionNum()){if(ci.isAdjacentSegments(t,r))return!0;if(e.isClosed()){var i=e.getNumPoints()-1;if(0===t&&r===i||0===r&&t===i)return!0}}return!1},ci.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},ci.prototype.setIsDoneIfProperInt=function(e){this._isDoneWhenProperInt=e},ci.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},ci.prototype.isBoundaryPointInternal=function(e,t){for(var n=t.iterator();n.hasNext();){var r=n.next().getCoordinate();if(e.isIntersection(r))return!0}return!1},ci.prototype.hasProperIntersection=function(){return this._hasProper},ci.prototype.hasIntersection=function(){return this._hasIntersection},ci.prototype.isDone=function(){return this._isDone},ci.prototype.isBoundaryPoint=function(e,t){return null!==t&&(!!this.isBoundaryPointInternal(e,t[0])||!!this.isBoundaryPointInternal(e,t[1]))},ci.prototype.setBoundaryNodes=function(e,t){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=e,this._bdyNodes[1]=t},ci.prototype.addIntersections=function(e,t,n,r){if(e===n&&t===r)return null;this.numTests++;var i=e.getCoordinates()[t],a=e.getCoordinates()[t+1],o=n.getCoordinates()[r],s=n.getCoordinates()[r+1];this._li.computeIntersection(i,a,o,s),this._li.hasIntersection()&&(this._recordIsolated&&(e.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(e,t,n,r)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(e.addIntersections(this._li,t,0),n.addIntersections(this._li,r,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},ci.prototype.interfaces_=function(){return[]},ci.prototype.getClass=function(){return ci},ci.isAdjacentSegments=function(e,t){return 1===Math.abs(e-t)};var li=function(e){function t(){e.call(this),this.events=new Ce,this.nOverlaps=null}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.prepareEvents=function(){$t.sort(this.events);for(var e=0;e<this.events.size();e++){var t=this.events.get(e);t.isDelete()&&t.getInsertEvent().setDeleteEventIndex(e)}},t.prototype.computeIntersections=function(){if(1===arguments.length){var e=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var t=0;t<this.events.size();t++){var n=this.events.get(t);if(n.isInsert()&&this.processOverlaps(t,n.getDeleteEventIndex(),n,e),e.isDone())break}}else if(3===arguments.length)if(arguments[2]instanceof ci&&S(arguments[0],Ee)&&S(arguments[1],Ee)){var r=arguments[0],i=arguments[1],a=arguments[2];this.addEdges(r,r),this.addEdges(i,i),this.computeIntersections(a)}else if("boolean"==typeof arguments[2]&&S(arguments[0],Ee)&&arguments[1]instanceof ci){var o=arguments[0],s=arguments[1];arguments[2]?this.addEdges(o,null):this.addEdges(o),this.computeIntersections(s)}},t.prototype.addEdge=function(e,t){for(var n=e.getMonotoneChainEdge(),r=n.getStartIndexes(),i=0;i<r.length-1;i++){var a=new oi(n,i),o=new si(t,n.getMinX(i),a);this.events.add(o),this.events.add(new si(n.getMaxX(i),o))}},t.prototype.processOverlaps=function(e,t,n,r){for(var i=n.getObject(),a=e;a<t;a++){var o=this.events.get(a);if(o.isInsert()){var s=o.getObject();n.isSameLabel(o)||(i.computeIntersections(s,r),this.nOverlaps++)}}},t.prototype.addEdges=function(){if(1===arguments.length)for(var e=arguments[0].iterator();e.hasNext();){var t=e.next();this.addEdge(t,t)}else if(2===arguments.length)for(var n=arguments[0],r=arguments[1],i=n.iterator();i.hasNext();){var a=i.next();this.addEdge(a,r)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ai),fi=function(){this._min=m.POSITIVE_INFINITY,this._max=m.NEGATIVE_INFINITY},hi={NodeComparator:{configurable:!0}};fi.prototype.getMin=function(){return this._min},fi.prototype.intersects=function(e,t){return!(this._min>t||this._max<e)},fi.prototype.getMax=function(){return this._max},fi.prototype.toString=function(){return Z.toLineString(new B(this._min,0),new B(this._max,0))},fi.prototype.interfaces_=function(){return[]},fi.prototype.getClass=function(){return fi},hi.NodeComparator.get=function(){return gi},Object.defineProperties(fi,hi);var gi=function(){};gi.prototype.compare=function(e,t){var n=e,r=t,i=(n._min+n._max)/2,a=(r._min+r._max)/2;return i<a?-1:i>a?1:0},gi.prototype.interfaces_=function(){return[C]},gi.prototype.getClass=function(){return gi};var di=function(e){function t(){e.call(this),this._item=null;var t=arguments[0],n=arguments[1],r=arguments[2];this._min=t,this._max=n,this._item=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.query=function(e,t,n){if(!this.intersects(e,t))return null;n.visitItem(this._item)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(fi),pi=function(e){function t(){e.call(this),this._node1=null,this._node2=null;var t=arguments[0],n=arguments[1];this._node1=t,this._node2=n,this.buildExtent(this._node1,this._node2)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.buildExtent=function(e,t){this._min=Math.min(e._min,t._min),this._max=Math.max(e._max,t._max)},t.prototype.query=function(e,t,n){if(!this.intersects(e,t))return null;null!==this._node1&&this._node1.query(e,t,n),null!==this._node2&&this._node2.query(e,t,n)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(fi),vi=function(){this._leaves=new Ce,this._root=null,this._level=0};vi.prototype.buildTree=function(){$t.sort(this._leaves,new fi.NodeComparator);for(var e=this._leaves,t=null,n=new Ce;;){if(this.buildLevel(e,n),1===n.size())return n.get(0);t=e,e=n,n=t}},vi.prototype.insert=function(e,t,n){if(null!==this._root)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new di(e,t,n))},vi.prototype.query=function(e,t,n){this.init(),this._root.query(e,t,n)},vi.prototype.buildRoot=function(){if(null!==this._root)return null;this._root=this.buildTree()},vi.prototype.printNode=function(e){H.out.println(Z.toLineString(new B(e._min,this._level),new B(e._max,this._level)))},vi.prototype.init=function(){if(null!==this._root)return null;this.buildRoot()},vi.prototype.buildLevel=function(e,t){this._level++,t.clear();for(var n=0;n<e.size();n+=2){var r=e.get(n);if(null===(n+1<e.size()?e.get(n):null))t.add(r);else{var i=new pi(e.get(n),e.get(n+1));t.add(i)}}},vi.prototype.interfaces_=function(){return[]},vi.prototype.getClass=function(){return vi};var yi=function(){this._items=new Ce};yi.prototype.visitItem=function(e){this._items.add(e)},yi.prototype.getItems=function(){return this._items},yi.prototype.interfaces_=function(){return[Wt]},yi.prototype.getClass=function(){return yi};var mi=function(){this._index=null;var e=arguments[0];if(!S(e,Ze))throw new y("Argument must be Polygonal");this._index=new Ei(e)},Ii={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};mi.prototype.locate=function(e){var t=new oe(e),n=new bi(t);return this._index.query(e.y,e.y,n),t.getLocation()},mi.prototype.interfaces_=function(){return[Pn]},mi.prototype.getClass=function(){return mi},Ii.SegmentVisitor.get=function(){return bi},Ii.IntervalIndexedGeometry.get=function(){return Ei},Object.defineProperties(mi,Ii);var bi=function(){this._counter=null;var e=arguments[0];this._counter=e};bi.prototype.visitItem=function(e){var t=e;this._counter.countSegment(t.getCoordinate(0),t.getCoordinate(1))},bi.prototype.interfaces_=function(){return[Wt]},bi.prototype.getClass=function(){return bi};var Ei=function(){this._index=new vi;var e=arguments[0];this.init(e)};Ei.prototype.init=function(e){for(var t=Br.getLines(e).iterator();t.hasNext();){var n=t.next().getCoordinates();this.addLine(n)}},Ei.prototype.addLine=function(e){for(var t=1;t<e.length;t++){var n=new dn(e[t-1],e[t]),r=Math.min(n.p0.y,n.p1.y),i=Math.max(n.p0.y,n.p1.y);this._index.insert(r,i,n)}},Ei.prototype.query=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1],n=new yi;return this._index.query(e,t,n),n.getItems()}if(3===arguments.length){var r=arguments[0],i=arguments[1],a=arguments[2];this._index.query(r,i,a)}},Ei.prototype.interfaces_=function(){return[]},Ei.prototype.getClass=function(){return Ei};var Ci=function(e){function t(){if(e.call(this),this._parentGeom=null,this._lineEdgeMap=new ft,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new wr,2===arguments.length){var t=arguments[0],n=arguments[1],r=ge.OGC_SFS_BOUNDARY_RULE;this._argIndex=t,this._parentGeom=n,this._boundaryNodeRule=r,null!==n&&this.add(n)}else if(3===arguments.length){var i=arguments[0],a=arguments[1],o=arguments[2];this._argIndex=i,this._parentGeom=a,this._boundaryNodeRule=o,null!==a&&this.add(a)}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.insertBoundaryPoint=function(e,n){var r=this._nodes.addNode(n).getLabel(),i=1;r.getLocation(e,wt.ON)===_.BOUNDARY&&i++;var a=t.determineBoundary(this._boundaryNodeRule,i);r.setLocation(e,a)},t.prototype.computeSelfNodes=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1];return this.computeSelfNodes(e,t,!1)}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],a=new ci(n,!0,!1);a.setIsDoneIfProperInt(i);var o=this.createEdgeSetIntersector(),s=this._parentGeom instanceof tt||this._parentGeom instanceof $e||this._parentGeom instanceof nt,u=r||!s;return o.computeIntersections(this._edges,a,u),this.addSelfIntersectionNodes(this._argIndex),a}},t.prototype.computeSplitEdges=function(e){for(var t=this._edges.iterator();t.hasNext();)t.next().eiList.addSplitEdges(e)},t.prototype.computeEdgeIntersections=function(e,t,n){var r=new ci(t,n,!0);return r.setBoundaryNodes(this.getBoundaryNodes(),e.getBoundaryNodes()),this.createEdgeSetIntersector().computeIntersections(this._edges,e._edges,r),r},t.prototype.getGeometry=function(){return this._parentGeom},t.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},t.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},t.prototype.addPoint=function(){if(arguments[0]instanceof Xe){var e=arguments[0].getCoordinate();this.insertPoint(this._argIndex,e,_.INTERIOR)}else if(arguments[0]instanceof B){var t=arguments[0];this.insertPoint(this._argIndex,t,_.INTERIOR)}},t.prototype.addPolygon=function(e){this.addPolygonRing(e.getExteriorRing(),_.EXTERIOR,_.INTERIOR);for(var t=0;t<e.getNumInteriorRing();t++){var n=e.getInteriorRingN(t);this.addPolygonRing(n,_.INTERIOR,_.EXTERIOR)}},t.prototype.addEdge=function(e){this.insertEdge(e);var t=e.getCoordinates();this.insertPoint(this._argIndex,t[0],_.BOUNDARY),this.insertPoint(this._argIndex,t[t.length-1],_.BOUNDARY)},t.prototype.addLineString=function(e){var t=Qe.removeRepeatedPoints(e.getCoordinates());if(t.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=t[0],null;var n=new nr(t,new Dt(this._argIndex,_.INTERIOR));this._lineEdgeMap.put(e,n),this.insertEdge(n),te.isTrue(t.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,t[0]),this.insertBoundaryPoint(this._argIndex,t[t.length-1])},t.prototype.getInvalidPoint=function(){return this._invalidPoint},t.prototype.getBoundaryPoints=function(){for(var e=this.getBoundaryNodes(),t=new Array(e.size()).fill(null),n=0,r=e.iterator();r.hasNext();){var i=r.next();t[n++]=i.getCoordinate().copy()}return t},t.prototype.getBoundaryNodes=function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},t.prototype.addSelfIntersectionNode=function(e,t,n){if(this.isBoundaryNode(e,t))return null;n===_.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(e,t):this.insertPoint(e,t,n)},t.prototype.addPolygonRing=function(e,t,n){if(e.isEmpty())return null;var r=Qe.removeRepeatedPoints(e.getCoordinates());if(r.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=r[0],null;var i=t,a=n;se.isCCW(r)&&(i=n,a=t);var o=new nr(r,new Dt(this._argIndex,_.BOUNDARY,i,a));this._lineEdgeMap.put(e,o),this.insertEdge(o),this.insertPoint(this._argIndex,r[0],_.BOUNDARY)},t.prototype.insertPoint=function(e,t,n){var r=this._nodes.addNode(t),i=r.getLabel();null===i?r._label=new Dt(e,n):i.setLocation(e,n)},t.prototype.createEdgeSetIntersector=function(){return new li},t.prototype.addSelfIntersectionNodes=function(e){for(var t=this._edges.iterator();t.hasNext();)for(var n=t.next(),r=n.getLabel().getLocation(e),i=n.eiList.iterator();i.hasNext();){var a=i.next();this.addSelfIntersectionNode(e,a.coord,r)}},t.prototype.add=function(){if(1!==arguments.length)return e.prototype.add.apply(this,arguments);var t=arguments[0];if(t.isEmpty())return null;if(t instanceof nt&&(this._useBoundaryDeterminationRule=!1),t instanceof $e)this.addPolygon(t);else if(t instanceof We)this.addLineString(t);else if(t instanceof Xe)this.addPoint(t);else if(t instanceof et)this.addCollection(t);else if(t instanceof qe)this.addCollection(t);else if(t instanceof nt)this.addCollection(t);else{if(!(t instanceof Ge))throw new Error(t.getClass().getName());this.addCollection(t)}},t.prototype.addCollection=function(e){for(var t=0;t<e.getNumGeometries();t++){var n=e.getGeometryN(t);this.add(n)}},t.prototype.locate=function(e){return S(this._parentGeom,Ze)&&this._parentGeom.getNumGeometries()>50?(null===this._areaPtLocator&&(this._areaPtLocator=new mi(this._parentGeom)),this._areaPtLocator.locate(e)):this._ptLocator.locate(e,this._parentGeom)},t.prototype.findEdge=function(){if(1===arguments.length){var t=arguments[0];return this._lineEdgeMap.get(t)}return e.prototype.findEdge.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.determineBoundary=function(e,t){return e.isInBoundary(t)?_.BOUNDARY:_.INTERIOR},t}(Ht),Bi=function(){if(this._li=new ie,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var e=arguments[0];this.setComputationPrecision(e.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Ci(0,e)}else if(2===arguments.length){var t=arguments[0],n=arguments[1],r=ge.OGC_SFS_BOUNDARY_RULE;t.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(t.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Ci(0,t,r),this._arg[1]=new Ci(1,n,r)}else if(3===arguments.length){var i=arguments[0],a=arguments[1],o=arguments[2];i.getPrecisionModel().compareTo(a.getPrecisionModel())>=0?this.setComputationPrecision(i.getPrecisionModel()):this.setComputationPrecision(a.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Ci(0,i,o),this._arg[1]=new Ci(1,a,o)}};Bi.prototype.getArgGeometry=function(e){return this._arg[e].getGeometry()},Bi.prototype.setComputationPrecision=function(e){this._resultPrecisionModel=e,this._li.setPrecisionModel(this._resultPrecisionModel)},Bi.prototype.interfaces_=function(){return[]},Bi.prototype.getClass=function(){return Bi};var wi=function(){};wi.prototype.interfaces_=function(){return[]},wi.prototype.getClass=function(){return wi},wi.map=function(){if(arguments[0]instanceof ce&&S(arguments[1],wi.MapOp)){for(var e=arguments[0],t=arguments[1],n=new Ce,r=0;r<e.getNumGeometries();r++){var i=t.map(e.getGeometryN(r));null!==i&&n.add(i)}return e.getFactory().buildGeometry(n)}if(S(arguments[0],Ie)&&S(arguments[1],wi.MapOp)){for(var a=arguments[0],o=arguments[1],s=new Ce,u=a.iterator();u.hasNext();){var A=u.next(),c=o.map(A);null!==c&&s.add(c)}return s}},wi.MapOp=function(){};var Qi=function(e){function t(){var t=arguments[0],n=arguments[1];e.call(this,t,n),this._ptLocator=new wr,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new zn,this._resultPolyList=new Ce,this._resultLineList=new Ce,this._resultPointList=new Ce,this._graph=new Ht(new Yn),this._geomFact=t.getFactory()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.insertUniqueEdge=function(e){var t=this._edgeList.findEqualEdge(e);if(null!==t){var n=t.getLabel(),r=e.getLabel();t.isPointwiseEqual(e)||(r=new Dt(e.getLabel())).flip();var i=t.getDepth();i.isNull()&&i.add(n),i.add(r),n.merge(r)}else this._edgeList.add(e)},t.prototype.getGraph=function(){return this._graph},t.prototype.cancelDuplicateResultEdges=function(){for(var e=this._graph.getEdgeEnds().iterator();e.hasNext();){var t=e.next(),n=t.getSym();t.isInResult()&&n.isInResult()&&(t.setInResult(!1),n.setInResult(!1))}},t.prototype.isCoveredByLA=function(e){return!!this.isCovered(e,this._resultLineList)||!!this.isCovered(e,this._resultPolyList)},t.prototype.computeGeometry=function(e,n,r,i){var a=new Ce;return a.addAll(e),a.addAll(n),a.addAll(r),a.isEmpty()?t.createEmptyResult(i,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(a)},t.prototype.mergeSymLabels=function(){for(var e=this._graph.getNodes().iterator();e.hasNext();)e.next().getEdges().mergeSymLabels()},t.prototype.isCovered=function(e,t){for(var n=t.iterator();n.hasNext();){var r=n.next();if(this._ptLocator.locate(e,r)!==_.EXTERIOR)return!0}return!1},t.prototype.replaceCollapsedEdges=function(){for(var e=new Ce,t=this._edgeList.iterator();t.hasNext();){var n=t.next();n.isCollapsed()&&(t.remove(),e.add(n.getCollapsedEdge()))}this._edgeList.addAll(e)},t.prototype.updateNodeLabelling=function(){for(var e=this._graph.getNodes().iterator();e.hasNext();){var t=e.next(),n=t.getEdges().getLabel();t.getLabel().merge(n)}},t.prototype.getResultGeometry=function(e){return this.computeOverlay(e),this._resultGeom},t.prototype.insertUniqueEdges=function(e){for(var t=e.iterator();t.hasNext();){var n=t.next();this.insertUniqueEdge(n)}},t.prototype.computeOverlay=function(e){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var t=new Ce;this._arg[0].computeSplitEdges(t),this._arg[1].computeSplitEdges(t),this.insertUniqueEdges(t),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),Hr.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(e),this.cancelDuplicateResultEdges();var n=new Yt(this._geomFact);n.add(this._graph),this._resultPolyList=n.getPolygons();var r=new Jr(this,this._geomFact,this._ptLocator);this._resultLineList=r.build(e);var i=new zr(this,this._geomFact,this._ptLocator);this._resultPointList=i.build(e),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,e)},t.prototype.labelIncompleteNode=function(e,t){var n=this._ptLocator.locate(e.getCoordinate(),this._arg[t].getGeometry());e.getLabel().setLocation(t,n)},t.prototype.copyPoints=function(e){for(var t=this._arg[e].getNodeIterator();t.hasNext();){var n=t.next();this._graph.addNode(n.getCoordinate()).setLabel(e,n.getLabel().getLocation(e))}},t.prototype.findResultAreaEdges=function(e){for(var n=this._graph.getEdgeEnds().iterator();n.hasNext();){var r=n.next(),i=r.getLabel();i.isArea()&&!r.isInteriorAreaEdge()&&t.isResultOfOp(i.getLocation(0,wt.RIGHT),i.getLocation(1,wt.RIGHT),e)&&r.setInResult(!0)}},t.prototype.computeLabelsFromDepths=function(){for(var e=this._edgeList.iterator();e.hasNext();){var t=e.next(),n=t.getLabel(),r=t.getDepth();if(!r.isNull()){r.normalize();for(var i=0;i<2;i++)n.isNull(i)||!n.isArea()||r.isNull(i)||(0===r.getDelta(i)?n.toLine(i):(te.isTrue(!r.isNull(i,wt.LEFT),"depth of LEFT side has not been initialized"),n.setLocation(i,wt.LEFT,r.getLocation(i,wt.LEFT)),te.isTrue(!r.isNull(i,wt.RIGHT),"depth of RIGHT side has not been initialized"),n.setLocation(i,wt.RIGHT,r.getLocation(i,wt.RIGHT))))}}},t.prototype.computeLabelling=function(){for(var e=this._graph.getNodes().iterator();e.hasNext();)e.next().getEdges().computeLabelling(this._arg);this.mergeSymLabels(),this.updateNodeLabelling()},t.prototype.labelIncompleteNodes=function(){for(var e=this._graph.getNodes().iterator();e.hasNext();){var t=e.next(),n=t.getLabel();t.isIsolated()&&(n.isNull(0)?this.labelIncompleteNode(t,0):this.labelIncompleteNode(t,1)),t.getEdges().updateLabelling(n)}},t.prototype.isCoveredByA=function(e){return!!this.isCovered(e,this._resultPolyList)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Bi);Qi.overlayOp=function(e,t,n){return new Qi(e,t).getResultGeometry(n)},Qi.intersection=function(e,t){if(e.isEmpty()||t.isEmpty())return Qi.createEmptyResult(Qi.INTERSECTION,e,t,e.getFactory());if(e.isGeometryCollection()){var n=t;return Yr.map(e,{interfaces_:function(){return[wi.MapOp]},map:function(e){return e.intersection(n)}})}return e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),ai.overlayOp(e,t,Qi.INTERSECTION)},Qi.symDifference=function(e,t){if(e.isEmpty()||t.isEmpty()){if(e.isEmpty()&&t.isEmpty())return Qi.createEmptyResult(Qi.SYMDIFFERENCE,e,t,e.getFactory());if(e.isEmpty())return t.copy();if(t.isEmpty())return e.copy()}return e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),ai.overlayOp(e,t,Qi.SYMDIFFERENCE)},Qi.resultDimension=function(e,t,n){var r=t.getDimension(),i=n.getDimension(),a=-1;switch(e){case Qi.INTERSECTION:a=Math.min(r,i);break;case Qi.UNION:a=Math.max(r,i);break;case Qi.DIFFERENCE:a=r;break;case Qi.SYMDIFFERENCE:a=Math.max(r,i)}return a},Qi.createEmptyResult=function(e,t,n,r){var i=null;switch(Qi.resultDimension(e,t,n)){case-1:i=r.createGeometryCollection(new Array(0).fill(null));break;case 0:i=r.createPoint();break;case 1:i=r.createLineString();break;case 2:i=r.createPolygon()}return i},Qi.difference=function(e,t){return e.isEmpty()?Qi.createEmptyResult(Qi.DIFFERENCE,e,t,e.getFactory()):t.isEmpty()?e.copy():(e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),ai.overlayOp(e,t,Qi.DIFFERENCE))},Qi.isResultOfOp=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1],n=e.getLocation(0),r=e.getLocation(1);return Qi.isResultOfOp(n,r,t)}if(3===arguments.length){var i=arguments[0],a=arguments[1],o=arguments[2];switch(i===_.BOUNDARY&&(i=_.INTERIOR),a===_.BOUNDARY&&(a=_.INTERIOR),o){case Qi.INTERSECTION:return i===_.INTERIOR&&a===_.INTERIOR;case Qi.UNION:return i===_.INTERIOR||a===_.INTERIOR;case Qi.DIFFERENCE:return i===_.INTERIOR&&a!==_.INTERIOR;case Qi.SYMDIFFERENCE:return i===_.INTERIOR&&a!==_.INTERIOR||i!==_.INTERIOR&&a===_.INTERIOR}return!1}},Qi.INTERSECTION=1,Qi.UNION=2,Qi.DIFFERENCE=3,Qi.SYMDIFFERENCE=4;var ki=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new wr,this._seg=new dn;var e=arguments[0],t=arguments[1];this._g=e,this._boundaryDistanceTolerance=t,this._linework=this.extractLinework(e)};ki.prototype.isWithinToleranceOfBoundary=function(e){for(var t=0;t<this._linework.getNumGeometries();t++)for(var n=this._linework.getGeometryN(t).getCoordinateSequence(),r=0;r<n.size()-1;r++)if(n.getCoordinate(r,this._seg.p0),n.getCoordinate(r+1,this._seg.p1),this._seg.distance(e)<=this._boundaryDistanceTolerance)return!0;return!1},ki.prototype.getLocation=function(e){return this.isWithinToleranceOfBoundary(e)?_.BOUNDARY:this._ptLocator.locate(e,this._g)},ki.prototype.extractLinework=function(e){var t=new _i;e.apply(t);var n=t.getLinework(),r=vt.toLineStringArray(n);return e.getFactory().createMultiLineString(r)},ki.prototype.interfaces_=function(){return[]},ki.prototype.getClass=function(){return ki};var _i=function(){this._linework=null,this._linework=new Ce};_i.prototype.getLinework=function(){return this._linework},_i.prototype.filter=function(e){if(e instanceof $e){var t=e;this._linework.add(t.getExteriorRing());for(var n=0;n<t.getNumInteriorRing();n++)this._linework.add(t.getInteriorRingN(n))}},_i.prototype.interfaces_=function(){return[Pe]},_i.prototype.getClass=function(){return _i};var xi=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var e=arguments[0];this._g=e};xi.prototype.extractPoints=function(e,t,n){for(var r=e.getCoordinates(),i=0;i<r.length-1;i++)this.computeOffsetPoints(r[i],r[i+1],t,n)},xi.prototype.setSidesToGenerate=function(e,t){this._doLeft=e,this._doRight=t},xi.prototype.getPoints=function(e){for(var t=new Ce,n=Br.getLines(this._g).iterator();n.hasNext();){var r=n.next();this.extractPoints(r,e,t)}return t},xi.prototype.computeOffsetPoints=function(e,t,n,r){var i=t.x-e.x,a=t.y-e.y,o=Math.sqrt(i*i+a*a),s=n*i/o,u=n*a/o,A=(t.x+e.x)/2,c=(t.y+e.y)/2;if(this._doLeft){var l=new B(A-u,c+s);r.add(l)}if(this._doRight){var f=new B(A+u,c-s);r.add(f)}},xi.prototype.interfaces_=function(){return[]},xi.prototype.getClass=function(){return xi};var Si=function e(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=e.TOLERANCE,this._testCoords=new Ce;var t=arguments[0],n=arguments[1],r=arguments[2];this._boundaryDistanceTolerance=e.computeBoundaryDistanceTolerance(t,n),this._geom=[t,n,r],this._locFinder=[new ki(this._geom[0],this._boundaryDistanceTolerance),new ki(this._geom[1],this._boundaryDistanceTolerance),new ki(this._geom[2],this._boundaryDistanceTolerance)]},Oi={TOLERANCE:{configurable:!0}};Si.prototype.reportResult=function(e,t,n){H.out.println("Overlay result invalid - A:"+_.toLocationSymbol(t[0])+" B:"+_.toLocationSymbol(t[1])+" expected:"+(n?"i":"e")+" actual:"+_.toLocationSymbol(t[2]))},Si.prototype.isValid=function(e){return this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]),this.checkValid(e)},Si.prototype.checkValid=function(){if(1===arguments.length){for(var e=arguments[0],t=0;t<this._testCoords.size();t++){var n=this._testCoords.get(t);if(!this.checkValid(e,n))return this._invalidLocation=n,!1}return!0}if(2===arguments.length){var r=arguments[0],i=arguments[1];return this._location[0]=this._locFinder[0].getLocation(i),this._location[1]=this._locFinder[1].getLocation(i),this._location[2]=this._locFinder[2].getLocation(i),!!Si.hasLocation(this._location,_.BOUNDARY)||this.isValidResult(r,this._location)}},Si.prototype.addTestPts=function(e){var t=new xi(e);this._testCoords.addAll(t.getPoints(5*this._boundaryDistanceTolerance))},Si.prototype.isValidResult=function(e,t){var n=Qi.isResultOfOp(t[0],t[1],e),r=!(n^t[2]===_.INTERIOR);return r||this.reportResult(e,t,n),r},Si.prototype.getInvalidLocation=function(){return this._invalidLocation},Si.prototype.interfaces_=function(){return[]},Si.prototype.getClass=function(){return Si},Si.hasLocation=function(e,t){for(var n=0;n<3;n++)if(e[n]===t)return!0;return!1},Si.computeBoundaryDistanceTolerance=function(e,t){return Math.min(Vr.computeSizeBasedSnapTolerance(e),Vr.computeSizeBasedSnapTolerance(t))},Si.isValid=function(e,t,n,r){return new Si(e,t,r).isValid(n)},Oi.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Si,Oi);var Di=function e(t){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=e.extractFactory(t),this._inputGeoms=t};Di.prototype.extractElements=function(e,t){if(null===e)return null;for(var n=0;n<e.getNumGeometries();n++){var r=e.getGeometryN(n);this._skipEmpty&&r.isEmpty()||t.add(r)}},Di.prototype.combine=function(){for(var e=new Ce,t=this._inputGeoms.iterator();t.hasNext();){var n=t.next();this.extractElements(n,e)}return 0===e.size()?null!==this._geomFactory?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(e)},Di.prototype.interfaces_=function(){return[]},Di.prototype.getClass=function(){return Di},Di.combine=function(){if(1===arguments.length){var e=arguments[0];return new Di(e).combine()}if(2===arguments.length){var t=arguments[0],n=arguments[1];return new Di(Di.createList(t,n)).combine()}if(3===arguments.length){var r=arguments[0],i=arguments[1],a=arguments[2];return new Di(Di.createList(r,i,a)).combine()}},Di.extractFactory=function(e){return e.isEmpty()?null:e.iterator().next().getFactory()},Di.createList=function(){if(2===arguments.length){var e=arguments[0],t=arguments[1],n=new Ce;return n.add(e),n.add(t),n}if(3===arguments.length){var r=arguments[0],i=arguments[1],a=arguments[2],o=new Ce;return o.add(r),o.add(i),o.add(a),o}};var Ri=function(){this._inputPolys=null,this._geomFactory=null;var e=arguments[0];this._inputPolys=e,null===this._inputPolys&&(this._inputPolys=new Ce)},ji={STRTREE_NODE_CAPACITY:{configurable:!0}};Ri.prototype.reduceToGeometries=function(e){for(var t=new Ce,n=e.iterator();n.hasNext();){var r=n.next(),i=null;S(r,Ee)?i=this.unionTree(r):r instanceof ce&&(i=r),t.add(i)}return t},Ri.prototype.extractByEnvelope=function(e,t,n){for(var r=new Ce,i=0;i<t.getNumGeometries();i++){var a=t.getGeometryN(i);a.getEnvelopeInternal().intersects(e)?r.add(a):n.add(a)}return this._geomFactory.buildGeometry(r)},Ri.prototype.unionOptimized=function(e,t){var n=e.getEnvelopeInternal(),r=t.getEnvelopeInternal();if(!n.intersects(r))return Di.combine(e,t);if(e.getNumGeometries()<=1&&t.getNumGeometries()<=1)return this.unionActual(e,t);var i=n.intersection(r);return this.unionUsingEnvelopeIntersection(e,t,i)},Ri.prototype.union=function(){if(null===this._inputPolys)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var e=new on(Ri.STRTREE_NODE_CAPACITY),t=this._inputPolys.iterator();t.hasNext();){var n=t.next();e.insert(n.getEnvelopeInternal(),n)}this._inputPolys=null;var r=e.itemsTree();return this.unionTree(r)},Ri.prototype.binaryUnion=function(){if(1===arguments.length){var e=arguments[0];return this.binaryUnion(e,0,e.size())}if(3===arguments.length){var t=arguments[0],n=arguments[1],r=arguments[2];if(r-n<=1){var i=Ri.getGeometry(t,n);return this.unionSafe(i,null)}if(r-n==2)return this.unionSafe(Ri.getGeometry(t,n),Ri.getGeometry(t,n+1));var a=Math.trunc((r+n)/2),o=this.binaryUnion(t,n,a),s=this.binaryUnion(t,a,r);return this.unionSafe(o,s)}},Ri.prototype.repeatedUnion=function(e){for(var t=null,n=e.iterator();n.hasNext();){var r=n.next();t=null===t?r.copy():t.union(r)}return t},Ri.prototype.unionSafe=function(e,t){return null===e&&null===t?null:null===e?t.copy():null===t?e.copy():this.unionOptimized(e,t)},Ri.prototype.unionActual=function(e,t){return Ri.restrictToPolygons(e.union(t))},Ri.prototype.unionTree=function(e){var t=this.reduceToGeometries(e);return this.binaryUnion(t)},Ri.prototype.unionUsingEnvelopeIntersection=function(e,t,n){var r=new Ce,i=this.extractByEnvelope(n,e,r),a=this.extractByEnvelope(n,t,r),o=this.unionActual(i,a);return r.add(o),Di.combine(r)},Ri.prototype.bufferUnion=function(){if(1===arguments.length){var e=arguments[0];return e.get(0).getFactory().buildGeometry(e).buffer(0)}if(2===arguments.length){var t=arguments[0],n=arguments[1];return t.getFactory().createGeometryCollection([t,n]).buffer(0)}},Ri.prototype.interfaces_=function(){return[]},Ri.prototype.getClass=function(){return Ri},Ri.restrictToPolygons=function(e){if(S(e,Ze))return e;var t=Cr.getPolygons(e);return 1===t.size()?t.get(0):e.getFactory().createMultiPolygon(vt.toPolygonArray(t))},Ri.getGeometry=function(e,t){return t>=e.size()?null:e.get(t)},Ri.union=function(e){return new Ri(e).union()},ji.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Ri,ji);var Mi=function(){};Mi.prototype.interfaces_=function(){return[]},Mi.prototype.getClass=function(){return Mi},Mi.union=function(e,t){if(e.isEmpty()||t.isEmpty()){if(e.isEmpty()&&t.isEmpty())return Qi.createEmptyResult(Qi.UNION,e,t,e.getFactory());if(e.isEmpty())return t.copy();if(t.isEmpty())return e.copy()}return e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(t),ai.overlayOp(e,t,Qi.UNION)},e.GeoJSONReader=Ct,e.GeoJSONWriter=Bt,e.OverlayOp=Qi,e.UnionOp=Mi,e.BufferOp=dr,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e){e.exports=JSON.parse('{"name":"vitessce","version":"1.1.1","description":"Vitessce app and React component library","author":"C McCallum","homepage":"http://vitessce.io/","license":"MIT","repository":"https://github.com/hubmapconsortium/vitessce/","keywords":["react-component"],"files":["dist","src"],"main":"dist/umd/production/index.min.js","module":"dist/es/production/index.min.js","peerDependencies":{"react":"^16.8.6","react-dom":"^16.8.6"},"dependencies":{"@deck.gl/core":"^8.3.2","@deck.gl/layers":"^8.3.2","@hms-dbmi/viv":"^0.5.0","@loaders.gl/3d-tiles":"^2.3.0","@loaders.gl/core":"^2.3.0","@loaders.gl/images":"^2.3.0","@loaders.gl/loader-utils":"^2.3.0","@luma.gl/constants":"^8.3.1","@luma.gl/core":"^8.3.1","@luma.gl/shadertools":"^8.3.1","@luma.gl/webgl":"^8.3.1","@material-ui/core":"^4.8.3","@material-ui/icons":"^4.9.1","@turf/boolean-contains":"^6.0.1","@turf/boolean-overlap":"^6.0.1","@turf/boolean-point-in-polygon":"^6.0.1","@turf/boolean-within":"^6.0.1","@turf/centroid":"^6.0.2","@turf/concave":"^6.0.5","@turf/helpers":"^6.1.4","ajv":"^6.10.0","bowser":"^2.11.0","classnames":"^2.2.6","d3-array":"^2.4.0","d3-dsv":"^1.1.1","d3-force":"^2.1.1","d3-quadtree":"^1.0.7","d3-scale-chromatic":"^1.3.3","deck.gl":"^8.3.2","dynamic-import-polyfill":"^0.1.1","glslify":"^7.0.0","higlass":"1.11.4","higlass-register":"^0.3.0","higlass-zarr-datafetchers":"^0.2.0","json2csv":"^4.5.2","lodash":"^4.17.15","lz-string":"^1.4.4","math.gl":"^3.1.3","nebula.gl":"^0.21.1","node-sass":"^4.13.1","prop-types":"^15.7.2","rc-tooltip":"^4.0.3","rc-tree":"2.1.0","react-color":"^2.18.0","react-grid-layout":"^1.1.1","react-vega":"^7.3.0","react-virtualized":"^9.22.2","short-number":"^1.0.6","store":"^2.0.12","tinycolor2":"^1.4.1","uuid":"^3.3.2","vega":"^5.13.0","vega-lite":"^4.13.0","vega-lite-api":"^0.11.0","vega-tooltip":"^0.23.0","whatwg-fetch":"^3.0.0","window-pixi":"5.3.3","zarr":"^0.3.0","zustand":"^3.0.2"},"devDependencies":{"@babel/core":"7.9.0","@svgr/webpack":"5.3.1","@typescript-eslint/eslint-plugin":"^2.10.0","@typescript-eslint/parser":"^2.10.0","babel-eslint":"10.0.3","babel-loader":"8.1.0","babel-plugin-glsl":"^1.0.0","babel-plugin-named-asset-import":"^0.3.6","babel-preset-react-app":"^9.1.2","camelcase":"^5.3.1","case-sensitive-paths-webpack-plugin":"2.3.0","css-loader":"3.4.2","cypress":"^3.6.1","dotenv":"8.2.0","dotenv-expand":"5.1.0","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.11.2","eslint":"^6.6.0","eslint-config-airbnb":"^17.1.0","eslint-config-react-app":"^5.2.0","eslint-loader":"3.0.3","eslint-plugin-cypress":"^2.2.1","eslint-plugin-flowtype":"4.6.0","eslint-plugin-import":"2.20.0","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-react":"7.18.0","eslint-plugin-react-hooks":"^1.6.1","eslint-plugin-vitessce-rules":"file:eslint","expect":"^24.5.0","file-loader":"4.3.0","fs-extra":"^8.1.0","glsl-colormap":"^1.0.1","html-webpack-plugin":"4.0.0-beta.11","identity-obj-proxy":"3.0.0","js-yaml":"^3.13.1","karma":"4.4.1","karma-chrome-launcher":"3.1.0","karma-mocha":"1.3.0","karma-mocha-reporter":"2.2.5","karma-sourcemap-loader":"0.3.7","karma-webpack":"4.0.2","mini-css-extract-plugin":"0.9.0","mocha":"7.1.0","object.fromentries":"^2.0.2","optimize-css-assets-webpack-plugin":"5.0.3","pnp-webpack-plugin":"1.6.0","postcss-flexbugs-fixes":"4.1.0","postcss-loader":"3.0.0","postcss-normalize":"8.0.1","postcss-preset-env":"6.7.0","postcss-safe-parser":"4.0.1","react":"^16.8.6","react-app-polyfill":"^1.0.6","react-dev-utils":"^10.2.0","react-dom":"^16.8.6","resolve":"1.15.0","resolve-url-loader":"3.1.1","sass-loader":"8.0.2","semver":"6.3.0","style-loader":"0.23.1","terser-webpack-plugin":"2.3.4","url-loader":"2.3.0","wait-on":"^3.2.0","webpack":"4.41.5","webpack-dev-server":"3.10.2","webpack-node-externals":"^2.5.2","workbox-webpack-plugin":"4.3.1","worker-loader":"^2.0.0"},"resolutions":{"@turf/difference":"6.0.1"},"scripts":{"build-demo:prod":"node scripts/build-demo.js production","build-lib:prod":"node scripts/build-lib.js production","build-demo:dev":"node scripts/build-demo.js development","build-lib:dev":"node scripts/build-lib.js development","build:prod":"npm run build-demo:prod && npm run build-lib:prod","build:dev":"npm run build-demo:dev && npm run build-lib:dev","prepublishOnly":"npm run build-lib:prod","clean":"rm -r dist-demo dist","start":"node scripts/start-demo.js","test":"karma start scripts/karma.config.js --single-run","test:watch":"karma start scripts/karma.config.js --auto-watch","cypress:open":"cypress open","cypress:run":"cypress run","lint-fix":"eslint -c .eslintrc.yml --ext .js --fix src/"},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"babel":{"presets":["react-app"],"plugins":["glsl"]}}')},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){var r=n(138);e.exports=function(){return r.Date.now()}},function(e,t,n){var r=n(316),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(u){}var i=o.call(e);return r&&(t?e[s]=n:delete e[s]),i}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t){},function(e,t,n){var r=n(400),i=n(341),a=n(597),o=n(598);function s(t){var n="function"===typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!a(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return o(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},s(t)}e.exports=s},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,n){var r=n(341),i=n(401);function a(t,n,o){return i()?e.exports=a=Reflect.construct:e.exports=a=function(e,t,n){var i=[null];i.push.apply(i,t);var a=new(Function.bind.apply(e,i));return n&&r(a,n.prototype),a},a.apply(null,arguments)}e.exports=a},function(e,t,n){var r=n(600);function i(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}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){var r=n(341);e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(400),i=n(401),a=n(606);e.exports=function(e){return function(){var t,n=r(e);if(i()){var o=r(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return a(this,t)}}},function(e,t,n){var r=n(607),i=n(608);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?i(e):t}},function(e,t){function n(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function n(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(A){return void n(A)}s.done?t(u):Promise.resolve(u).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,a){var o=e.apply(t,r);function s(e){n(o,i,a,s,u,"next",e)}function u(e){n(o,i,a,s,u,"throw",e)}s(void 0)}))}}},function(e,t){function n(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(A){return void n(A)}s.done?t(u):Promise.resolve(u).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,a){var o=e.apply(t,r);function s(e){n(o,i,a,s,u,"next",e)}function u(e){n(o,i,a,s,u,"throw",e)}s(void 0)}))}}},function(e,t,n){"use strict";var r=n(108),i=n(612);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"self",{enumerable:!0,get:function(){return a.self}}),Object.defineProperty(t,"window",{enumerable:!0,get:function(){return a.window}}),Object.defineProperty(t,"global",{enumerable:!0,get:function(){return a.global}}),Object.defineProperty(t,"document",{enumerable:!0,get:function(){return a.document}}),Object.defineProperty(t,"process",{enumerable:!0,get:function(){return a.process}}),Object.defineProperty(t,"console",{enumerable:!0,get:function(){return a.console}}),Object.defineProperty(t,"isBrowser",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"isBrowserMainThread",{enumerable:!0,get:function(){return o.isBrowserMainThread}}),Object.defineProperty(t,"getBrowser",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"isMobile",{enumerable:!0,get:function(){return s.isMobile}}),Object.defineProperty(t,"isElectron",{enumerable:!0,get:function(){return u.default}});var a=n(407),o=i(n(408)),s=i(n(613)),u=r(n(343))},function(e,t,n){var r=n(206);function i(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}},function(e,t,n){"use strict";var r=n(108);Object.defineProperty(t,"__esModule",{value:!0}),t.isMobile=function(){return"undefined"!==typeof i.window.orientation},t.default=function(e){if(!e&&!(0,a.default)())return"Node";if((0,o.default)(e))return"Electron";var t="undefined"!==typeof navigator?navigator:{},n=e||t.userAgent||"";if(n.indexOf("Edge")>-1)return"Edge";var r=-1!==n.indexOf("MSIE "),s=-1!==n.indexOf("Trident/");if(r||s)return"IE";if(i.window.chrome)return"Chrome";if(i.window.safari)return"Safari";if(i.window.mozInnerScreenX)return"Firefox";return"Unknown"};var i=n(407),a=r(n(408)),o=r(n(343))},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t,n){"use strict";t.byteLength=function(e){var t=A(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=A(e),o=r[0],s=r[1],u=new a(function(e,t,n){return 3*(t+n)/4-n}(0,o,s)),c=0,l=s>0?o-4:o;for(n=0;n<l;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[c++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=0,s=n-i;o<s;o+=16383)a.push(c(e,o,o+16383>s?s:o+16383));1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("")};for(var r=[],i=[],a="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s<u;++s)r[s]=o[s],i[o.charCodeAt(s)]=s;function A(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,a,o=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(r[(a=i)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){var r=n(624);function i(t,n,a){return"undefined"!==typeof Reflect&&Reflect.get?e.exports=i=Reflect.get:e.exports=i=function(e,t,n){var i=r(e,t);if(i){var a=Object.getOwnPropertyDescriptor(i,t);return a.get?a.get.call(n):a.value}},i(t,n,a||t)}e.exports=i},function(e,t,n){var r=n(136);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e}},function(e,t,n){"use strict";function r(e,t,n,r,o){!function e(t,n,r,a,o){for(;a>r;){if(a-r>600){var s=a-r+1,u=n-r+1,A=Math.log(s),c=.5*Math.exp(2*A/3),l=.5*Math.sqrt(A*c*(s-c)/s)*(u-s/2<0?-1:1),f=Math.max(r,Math.floor(n-u*c/s+l)),h=Math.min(a,Math.floor(n+(s-u)*c/s+l));e(t,n,f,h,o)}var g=t[n],d=r,p=a;for(i(t,r,n),o(t[a],g)>0&&i(t,r,a);d<p;){for(i(t,d,p),d++,p--;o(t[d],g)<0;)d++;for(;o(t[p],g)>0;)p--}0===o(t[r],g)?i(t,r,p):(p++,i(t,p,a)),p<=n&&(r=p+1),n<=p&&(a=p-1)}}(e,t,n||0,r||e.length-1,o||a)}function i(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function a(e,t){return e<t?-1:e>t?1:0}n.r(t),n.d(t,"default",(function(){return r}))},function(e,t,n){var r=n(627);e.exports=function(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return i.colors[Math.abs(t)%i.colors.length]}function i(e){var n;function r(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];if(r.enabled){var o=r,s=Number(new Date),u=s-(n||s);o.diff=u,o.prev=n,o.curr=s,n=s,t[0]=i.coerce(t[0]),"string"!==typeof t[0]&&t.unshift("%O");var A=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,n){if("%%"===e)return e;A++;var r=i.formatters[n];if("function"===typeof r){var a=t[A];e=r.call(o,a),t.splice(A,1),A--}return e})),i.formatArgs.call(o,t);var c=o.log||i.log;c.apply(o,t)}}return r.namespace=e,r.enabled=i.enabled(e),r.useColors=i.useColors(),r.color=t(e),r.destroy=a,r.extend=o,"function"===typeof i.init&&i.init(r),i.instances.push(r),r}function a(){var e=i.instances.indexOf(this);return-1!==e&&(i.instances.splice(e,1),!0)}function o(e,t){var n=i(this.namespace+("undefined"===typeof t?":":t)+e);return n.log=this.log,n}function s(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return i.debug=i,i.default=i,i.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},i.disable=function(){var e=[].concat(r(i.names.map(s)),r(i.skips.map(s).map((function(e){return"-"+e})))).join(",");return i.enable(""),e},i.enable=function(e){var t;i.save(e),i.names=[],i.skips=[];var n=("string"===typeof e?e:"").split(/[\s,]+/),r=n.length;for(t=0;t<r;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?i.skips.push(new RegExp("^"+e.substr(1)+"$")):i.names.push(new RegExp("^"+e+"$")));for(t=0;t<i.instances.length;t++){var a=i.instances[t];a.enabled=i.enabled(a.namespace)}},i.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=i.skips.length;t<n;t++)if(i.skips[t].test(e))return!1;for(t=0,n=i.names.length;t<n;t++)if(i.names[t].test(e))return!0;return!1},i.humanize=n(631),Object.keys(e).forEach((function(t){i[t]=e[t]})),i.instances=[],i.names=[],i.skips=[],i.formatters={},i.selectColor=t,i.enable(i.load()),i}},function(e,t,n){var r=n(628),i=n(629),a=n(342),o=n(630);e.exports=function(e){return r(e)||i(e)||a(e)||o()}},function(e,t,n){var r=n(402);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){var n=1e3,r=6e4,i=60*r,a=24*i;function o(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,t){t=t||{};var s=typeof e;if("string"===s&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var o=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*a;case"hours":case"hour":case"hrs":case"hr":case"h":return o*i;case"minutes":case"minute":case"mins":case"min":case"m":return o*r;case"seconds":case"second":case"secs":case"sec":case"s":return o*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}(e);if("number"===s&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=a)return o(e,t,a,"day");if(t>=i)return o(e,t,i,"hour");if(t>=r)return o(e,t,r,"minute");if(t>=n)return o(e,t,n,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=a)return Math.round(e/a)+"d";if(t>=i)return Math.round(e/i)+"h";if(t>=r)return Math.round(e/r)+"m";if(t>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";n.r(t),function(e,r){var i,a=n(471);i="undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof e?e:r;var o=Object(a.a)(i);t.default=o}.call(this,n(70),n(633)(e))},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";var r=n(635),i=n(636);function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=m,t.resolve=function(e,t){return m(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?m(e,!1,!0).resolveObject(t):t},t.format=function(e){i.isString(e)&&(e=m(e));return e instanceof a?e.format():a.prototype.format.call(e)},t.Url=a;var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,A=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(A),l=["%","/","?",";","#"].concat(c),f=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},p={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(637);function m(e,t,n){if(e&&i.isObject(e)&&e instanceof a)return e;var r=new a;return r.parse(e,t,n),r}a.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),s=-1!==a&&a<e.indexOf("#")?"?":"#",A=e.split(s);A[0]=A[0].replace(/\\/g,"/");var m=e=A.join(s);if(m=m.trim(),!n&&1===e.split("#").length){var I=u.exec(m);if(I)return this.path=m,this.href=m,this.pathname=I[1],I[2]?(this.search=I[2],this.query=t?y.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var b=o.exec(m);if(b){var E=(b=b[0]).toLowerCase();this.protocol=E,m=m.substr(b.length)}if(n||b||m.match(/^\/\/[^@\/]+@[^@\/]+/)){var C="//"===m.substr(0,2);!C||b&&p[b]||(m=m.substr(2),this.slashes=!0)}if(!p[b]&&(C||b&&!v[b])){for(var B,w,Q=-1,k=0;k<f.length;k++){-1!==(_=m.indexOf(f[k]))&&(-1===Q||_<Q)&&(Q=_)}-1!==(w=-1===Q?m.lastIndexOf("@"):m.lastIndexOf("@",Q))&&(B=m.slice(0,w),m=m.slice(w+1),this.auth=decodeURIComponent(B)),Q=-1;for(k=0;k<l.length;k++){var _;-1!==(_=m.indexOf(l[k]))&&(-1===Q||_<Q)&&(Q=_)}-1===Q&&(Q=m.length),this.host=m.slice(0,Q),m=m.slice(Q),this.parseHost(),this.hostname=this.hostname||"";var x="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!x)for(var S=this.hostname.split(/\./),O=(k=0,S.length);k<O;k++){var D=S[k];if(D&&!D.match(h)){for(var R="",j=0,M=D.length;j<M;j++)D.charCodeAt(j)>127?R+="x":R+=D[j];if(!R.match(h)){var N=S.slice(0,k),F=S.slice(k+1),T=D.match(g);T&&(N.push(T[1]),F.unshift(T[2])),F.length&&(m="/"+F.join(".")+m),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),x||(this.hostname=r.toASCII(this.hostname));var L=this.port?":"+this.port:"",P=this.hostname||"";this.host=P+L,this.href+=this.host,x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==m[0]&&(m="/"+m))}if(!d[E])for(k=0,O=c.length;k<O;k++){var U=c[k];if(-1!==m.indexOf(U)){var G=encodeURIComponent(U);G===U&&(G=escape(U)),m=m.split(U).join(G)}}var q=m.indexOf("#");-1!==q&&(this.hash=m.substr(q),m=m.slice(0,q));var H=m.indexOf("?");if(-1!==H?(this.search=m.substr(H),this.query=m.substr(H+1),t&&(this.query=y.parse(this.query)),m=m.slice(0,H)):t&&(this.search="",this.query={}),m&&(this.pathname=m),v[E]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){L=this.pathname||"";var Y=this.search||"";this.path=L+Y}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",a=!1,o="";this.host?a=e+this.host:this.hostname&&(a=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(o=y.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||v[t])&&!1!==a?(a="//"+(a||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):a||(a=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+a+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},a.prototype.resolve=function(e){return this.resolveObject(m(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(i.isString(e)){var t=new a;t.parse(e,!1,!0),e=t}for(var n=new a,r=Object.keys(this),o=0;o<r.length;o++){var s=r[o];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),A=0;A<u.length;A++){var c=u[A];"protocol"!==c&&(n[c]=e[c])}return v[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!v[e.protocol]){for(var l=Object.keys(e),f=0;f<l.length;f++){var h=l[f];n[h]=e[h]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||p[e.protocol])n.pathname=e.pathname;else{for(var g=(e.pathname||"").split("/");g.length&&!(e.host=g.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==g[0]&&g.unshift(""),g.length<2&&g.unshift(""),n.pathname=g.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var d=n.pathname||"",y=n.search||"";n.path=d+y}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var m=n.pathname&&"/"===n.pathname.charAt(0),I=e.host||e.pathname&&"/"===e.pathname.charAt(0),b=I||m||n.host&&e.pathname,E=b,C=n.pathname&&n.pathname.split("/")||[],B=(g=e.pathname&&e.pathname.split("/")||[],n.protocol&&!v[n.protocol]);if(B&&(n.hostname="",n.port=null,n.host&&(""===C[0]?C[0]=n.host:C.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===g[0]?g[0]=e.host:g.unshift(e.host)),e.host=null),b=b&&(""===g[0]||""===C[0])),I)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,C=g;else if(g.length)C||(C=[]),C.pop(),C=C.concat(g),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(B)n.hostname=n.host=C.shift(),(x=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=x.shift(),n.host=n.hostname=x.shift());return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!C.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var w=C.slice(-1)[0],Q=(n.host||e.host||C.length>1)&&("."===w||".."===w)||""===w,k=0,_=C.length;_>=0;_--)"."===(w=C[_])?C.splice(_,1):".."===w?(C.splice(_,1),k++):k&&(C.splice(_,1),k--);if(!b&&!E)for(;k--;k)C.unshift("..");!b||""===C[0]||C[0]&&"/"===C[0].charAt(0)||C.unshift(""),Q&&"/"!==C.join("/").substr(-1)&&C.push("");var x,S=""===C[0]||C[0]&&"/"===C[0].charAt(0);B&&(n.hostname=n.host=S?"":C.length?C.shift():"",(x=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=x.shift(),n.host=n.hostname=x.shift()));return(b=b||n.host&&C.length)&&!S&&C.unshift(""),C.length?n.pathname=C.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},a.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){(function(e,r){var i;!function(a){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof r&&r;o.global!==o&&o.window!==o&&o.self;var s,u=2147483647,A=/^xn--/,c=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,g=String.fromCharCode;function d(e){throw new RangeError(f[e])}function p(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function v(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+p((e=e.replace(l,".")).split("."),t).join(".")}function y(e){for(var t,n,r=[],i=0,a=e.length;i<a;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<a?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function m(e){return p(e,(function(e){var t="";return e>65535&&(t+=g((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=g(e)})).join("")}function I(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function b(e,t,n){var r=0;for(e=n?h(e/700):e>>1,e+=h(e/t);e>455;r+=36)e=h(e/35);return h(r+36*e/(e+38))}function E(e){var t,n,r,i,a,o,s,A,c,l,f,g=[],p=e.length,v=0,y=128,I=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&d("not-basic"),g.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<p;){for(a=v,o=1,s=36;i>=p&&d("invalid-input"),((A=(f=e.charCodeAt(i++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||A>h((u-v)/o))&&d("overflow"),v+=A*o,!(A<(c=s<=I?1:s>=I+26?26:s-I));s+=36)o>h(u/(l=36-c))&&d("overflow"),o*=l;I=b(v-a,t=g.length+1,0==a),h(v/t)>u-y&&d("overflow"),y+=h(v/t),v%=t,g.splice(v++,0,y)}return m(g)}function C(e){var t,n,r,i,a,o,s,A,c,l,f,p,v,m,E,C=[];for(p=(e=y(e)).length,t=128,n=0,a=72,o=0;o<p;++o)(f=e[o])<128&&C.push(g(f));for(r=i=C.length,i&&C.push("-");r<p;){for(s=u,o=0;o<p;++o)(f=e[o])>=t&&f<s&&(s=f);for(s-t>h((u-n)/(v=r+1))&&d("overflow"),n+=(s-t)*v,t=s,o=0;o<p;++o)if((f=e[o])<t&&++n>u&&d("overflow"),f==t){for(A=n,c=36;!(A<(l=c<=a?1:c>=a+26?26:c-a));c+=36)E=A-l,m=36-l,C.push(g(I(l+E%m,0))),A=h(E/m);C.push(g(I(A,0))),a=b(n,v,r==i),n=0,++r}++n,++t}return C.join("")}s={version:"1.4.1",ucs2:{decode:y,encode:m},decode:E,encode:C,toASCII:function(e){return v(e,(function(e){return c.test(e)?"xn--"+C(e):e}))},toUnicode:function(e){return v(e,(function(e){return A.test(e)?E(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return s}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(264)(e),n(70))},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"===typeof e},isObject:function(e){return"object"===typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(638),t.encode=t.stringify=n(639)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,a){t=t||"&",n=n||"=";var o={};if("string"!==typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var u=1e3;a&&"number"===typeof a.maxKeys&&(u=a.maxKeys);var A=e.length;u>0&&A>u&&(A=u);for(var c=0;c<A;++c){var l,f,h,g,d=e[c].replace(s,"%20"),p=d.indexOf(n);p>=0?(l=d.substr(0,p),f=d.substr(p+1)):(l=d,f=""),h=decodeURIComponent(l),g=decodeURIComponent(f),r(o,h)?i(o[h])?o[h].push(g):o[h]=[o[h],g]:o[h]=g}return o};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"===typeof e?a(o(e),(function(o){var s=encodeURIComponent(r(o))+n;return i(e[o])?a(e[o],(function(e){return s+encodeURIComponent(r(e))})).join(t):s+encodeURIComponent(r(e[o]))})).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function a(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var o=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){"use strict";n.r(t);var r=n(284);n.d(t,"DeckGL",(function(){return r.a})),n.d(t,"default",(function(){return r.a}))},function(e,t,n){function r(e,t){"use strict";var n=(t=t||{}).pos||0,i="<".charCodeAt(0),a=">".charCodeAt(0),o="-".charCodeAt(0),s="/".charCodeAt(0),u="!".charCodeAt(0),A="'".charCodeAt(0),c='"'.charCodeAt(0),l="[".charCodeAt(0);"]".charCodeAt(0);function f(){for(var t=[];e[n];)if(e.charCodeAt(n)==i){if(e.charCodeAt(n+1)===s)return(n=e.indexOf(">",n))+1&&(n+=1),t;if(e.charCodeAt(n+1)===u){if(e.charCodeAt(n+2)==o){for(;-1!==n&&(e.charCodeAt(n)!==a||e.charCodeAt(n-1)!=o||e.charCodeAt(n-2)!=o||-1==n);)n=e.indexOf(">",n+1);-1===n&&(n=e.length)}else{if(e.charCodeAt(n+2)===l&&e.charCodeAt(n+8)===l&&"cdata"===e.substr(n+3,5).toLowerCase()){var r=e.indexOf("]]>",n);-1==r?(t.push(e.substr(n+8)),n=e.length):(t.push(e.substring(n+9,r)),n=r+3);continue}for(n+=2;e.charCodeAt(n)!==a&&e[n];)n++}n++;continue}var A=p();t.push(A)}else{var c=h();c.trim().length>0&&t.push(c),n++}return t}function h(){var t=n;return-2===(n=e.indexOf("<",n)-1)&&(n=e.length),e.slice(t,n+1)}function g(){for(var t=n;-1==="\r\n\t>/= ".indexOf(e[n])&&e[n];)n++;return e.slice(t,n)}var d=t.noChildNodes||["img","br","input","meta","link"];function p(){n++;for(var t=g(),r={},i=[];e.charCodeAt(n)!==a&&e[n];){var o=e.charCodeAt(n);if(o>64&&o<91||o>96&&o<123){for(var u=g(),l=e.charCodeAt(n);l&&l!==A&&l!==c&&!(l>64&&l<91||l>96&&l<123)&&l!==a;)n++,l=e.charCodeAt(n);if(l===A||l===c){var h=v();if(-1===n)return{tagName:t,attributes:r,children:i}}else h=null,n--;r[u]=h}n++}if(e.charCodeAt(n-1)!==s)if("script"==t){var p=n+1;n=e.indexOf("<\/script>",n),i=[e.slice(p,n)],n+=9}else if("style"==t){p=n+1;n=e.indexOf("</style>",n),i=[e.slice(p,n)],n+=8}else-1==d.indexOf(t)&&(n++,i=f());else n++;return{tagName:t,attributes:r,children:i}}function v(){var t=e[n],r=n+1;return n=e.indexOf(t,r),e.slice(r,n)}function y(){var n=new RegExp("\\s"+t.attrName+"\\s*=['\"]"+t.attrValue+"['\"]").exec(e);return n?n.index:-1}var m=null;if(void 0!==t.attrValue){t.attrName=t.attrName||"id";for(m=[];-1!==(n=y());)-1!==(n=e.lastIndexOf("<",n))&&m.push(p()),e=e.substr(n),n=0}else m=t.parseNode?p():f();return t.filter&&(m=r.filter(m,t.filter)),t.setPos&&(m.pos=n),m}r.simplify=function(e){var t={};if(!e.length)return"";if(1===e.length&&"string"==typeof e[0])return e[0];for(var n in e.forEach((function(e){if("object"===typeof e){t[e.tagName]||(t[e.tagName]=[]);var n=r.simplify(e.children);t[e.tagName].push(n),Object.keys(e.attributes).length&&(n._attributes=e.attributes)}})),t)1==t[n].length&&(t[n]=t[n][0]);return t},r.simplifyLostLess=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};return e.length?1===e.length&&"string"==typeof e[0]?Object.keys(t).length?{_attributes:t,value:e[0]}:e[0]:(e.forEach((function(e){if("object"===typeof e){n[e.tagName]||(n[e.tagName]=[]);var t=r.simplifyLostLess(e.children||[],e.attributes);n[e.tagName].push(t),Object.keys(e.attributes).length&&(t._attributes=e.attributes)}})),n):""},r.filter=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=[];return e.forEach((function(e,o){if("object"===typeof e&&t(e,o,n,i)&&a.push(e),e.children){var s=r.filter(e.children,t,n+1,(i?i+".":"")+o+"."+e.tagName);a=a.concat(s)}})),a},r.stringify=function(e){var t="";function n(e){if(e)for(var n=0;n<e.length;n++)"string"==typeof e[n]?t+=e[n].trim():r(e[n])}function r(e){for(var r in t+="<"+e.tagName,e.attributes)null===e.attributes[r]?t+=" "+r:-1===e.attributes[r].indexOf('"')?t+=" "+r+'="'+e.attributes[r].trim()+'"':t+=" "+r+"='"+e.attributes[r].trim()+"'";t+=">",n(e.children),t+="</"+e.tagName+">"}return n(e),t},r.toContentString=function(e){if(Array.isArray(e)){var t="";return e.forEach((function(e){t=(t+=" "+r.toContentString(e)).trim()})),t}return"object"===typeof e?r.toContentString(e.children):" "+e},r.getElementById=function(e,t,n){var i=r(e,{attrValue:t});return n?r.simplify(i):i[0]},r.getElementsByClassName=function(e,t,n){var i=r(e,{attrName:"class",attrValue:"[a-zA-Z0-9- ]*"+t+"[a-zA-Z0-9- ]*"});return n?r.simplify(i):i},r.parseStream=function(e,t){if("string"===typeof t&&(t=t.length+2),"string"===typeof e){var i=n(642);e=i.createReadStream(e,{start:t}),t=0}var a=t,o="";return e.on("data",(function(t){o+=t;for(var n=0;;){if(!(a=o.indexOf("<",a)+1))return void(a=n);if("/"!==o[a+1]){var i=r(o,{pos:a-1,parseNode:!0,setPos:!0});if((a=i.pos)>o.length-1||a<n)return o=o.slice(n),a=0,void(n=0);e.emit("xml",i),n=a}else a+=1,n=pos}})),e},r.transformStream=function(e){var t=n(643);"string"===typeof e&&(e=e.length+2);var i=e||0,a="";return t({readableObjectMode:!0},(function(e,t,n){a+=e;for(var o=0;;){if(!(i=a.indexOf("<",i)+1))return i=o,n();if("/"!==a[i+1]){var s=r(a,{pos:i-1,parseNode:!0,setPos:!0});if((i=s.pos)>a.length-1||i<o)return a=a.slice(o),i=0,n();this.push(s),o=i}else i+=1,o=pos}n()}))},e.exports=r,r.xml=r},function(e,t){},function(e,t,n){(function(t){var r=n(644).Transform,i=n(210);function a(e){r.call(this,e),this._destroyed=!1}function o(e,t,n){n(null,e)}function s(e){return function(t,n,r){return"function"==typeof t&&(r=n,n=t,t={}),"function"!=typeof n&&(n=o),"function"!=typeof r&&(r=null),e(t,n,r)}}i(a,r),a.prototype.destroy=function(e){if(!this._destroyed){this._destroyed=!0;var n=this;t.nextTick((function(){e&&n.emit("error",e),n.emit("close")}))}},e.exports=s((function(e,t,n){var r=new a(e);return r._transform=t,n&&(r._flush=n),r})),e.exports.ctor=s((function(e,t,n){function r(t){if(!(this instanceof r))return new r(t);this.options=Object.assign({},e,t),a.call(this,this.options)}return i(r,a),r.prototype._transform=t,n&&(r.prototype._flush=n),r})),e.exports.obj=s((function(e,t,n){var r=new a(Object.assign({objectMode:!0,highWaterMark:16},e));return r._transform=t,n&&(r._flush=n),r}))}).call(this,n(86))},function(e,t,n){(t=e.exports=n(434)).Stream=t,t.Readable=t,t.Writable=n(438),t.Duplex=n(211),t.Transform=n(440),t.PassThrough=n(652),t.finished=n(347),t.pipeline=n(653)},function(e,t){},function(e,t,n){"use strict";function r(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 i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(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)}}var o=n(198).Buffer,s=n(647).inspect,u=s&&s.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n,A;return t=e,(n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,r,i=o.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,r=s,o.prototype.copy.call(t,n,r),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,a=e>i.length?i.length:e;if(a===i.length?r+=i:r+=i.slice(0,e),0===(e-=a)){a===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0===(e-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,t}},{key:u,value:function(e,t){return s(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&a(t.prototype,n),A&&a(t,A),e}()},function(e,t){},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(r){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,n(70))},function(e,t,n){var r=n(198),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,n){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!==typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"===typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";(function(t){var r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=n(347),o=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),A=Symbol("ended"),c=Symbol("lastPromise"),l=Symbol("handlePromise"),f=Symbol("stream");function h(e,t){return{value:e,done:t}}function g(e){var t=e[o];if(null!==t){var n=e[f].read();null!==n&&(e[c]=null,e[o]=null,e[s]=null,t(h(n,!1)))}}function d(e){t.nextTick(g,e)}var p=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(r={get stream(){return this[f]},next:function(){var e=this,n=this[u];if(null!==n)return Promise.reject(n);if(this[A])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise((function(n,r){t.nextTick((function(){e[u]?r(e[u]):n(h(void 0,!0))}))}));var r,i=this[c];if(i)r=new Promise(function(e,t){return function(n,r){e.then((function(){t[A]?n(h(void 0,!0)):t[l](n,r)}),r)}}(i,this));else{var a=this[f].read();if(null!==a)return Promise.resolve(h(a,!1));r=new Promise(this[l])}return this[c]=r,r}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[f].destroy(null,(function(e){e?n(e):t(h(void 0,!0))}))}))})),r),p);e.exports=function(e){var t,n=Object.create(v,(i(t={},f,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,A,{value:e._readableState.endEmitted,writable:!0}),i(t,l,{value:function(e,t){var r=n[f].read();r?(n[c]=null,n[o]=null,n[s]=null,e(h(r,!1))):(n[o]=e,n[s]=t)},writable:!0}),t));return n[c]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[s];return null!==t&&(n[c]=null,n[o]=null,n[s]=null,t(e)),void(n[u]=e)}var r=n[o];null!==r&&(n[c]=null,n[o]=null,n[s]=null,r(h(void 0,!0))),n[A]=!0})),e.on("readable",d.bind(null,n)),n}}).call(this,n(86))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,n){"use strict";e.exports=i;var r=n(440);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(210)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){"use strict";var r;var i=n(209).codes,a=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e,t,i,a){a=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(a);var s=!1;e.on("close",(function(){s=!0})),void 0===r&&(r=n(347)),r(e,{readable:t,writable:i},(function(e){if(e)return a(e);s=!0,a()}));var u=!1;return function(t){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"===typeof e.abort}(e)?e.abort():"function"===typeof e.destroy?e.destroy():void a(t||new o("pipe"))}}function A(e){e()}function c(e,t){return e.pipe(t)}function l(e){return e.length?"function"!==typeof e[e.length-1]?s:e.pop():s}e.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=l(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new a("streams");var o=t.map((function(e,n){var a=n<t.length-1;return u(e,a,n>0,(function(e){r||(r=e),e&&o.forEach(A),a||(o.forEach(A),i(r))}))}));return t.reduce(c)}},function(e,t,n){"use strict";n.r(t),n.d(t,"decompress",(function(){return m}));var r,i=n(9),a=n.n(i),o=n(60),s=null;function u(){return null!==s&&s.buffer===r.memory.buffer||(s=new Uint8Array(r.memory.buffer)),s}var A=0,c=null;function l(){return null!==c&&c.buffer===r.memory.buffer||(c=new Int32Array(r.memory.buffer)),c}function f(e){return h.apply(this,arguments)}function h(){return(h=Object(o.a)(a.a.mark((function e(t){var n,i,s;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===t&&(t="".replace(/\.js$/,"_bg.wasm")),("string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL)&&(t=fetch(t)),e.t0=function(){var e=Object(o.a)(a.a.mark((function e(t,n){var r,i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!("function"==typeof Response&&t instanceof Response)){e.next=19;break}if("function"!=typeof WebAssembly.instantiateStreaming){e.next=13;break}return e.prev=2,e.next=5,WebAssembly.instantiateStreaming(t,n);case 5:return e.abrupt("return",e.sent);case 8:if(e.prev=8,e.t0=e.catch(2),"application/wasm"!=t.headers.get("Content-Type")){e.next=12;break}throw e.t0;case 12:console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e.t0);case 13:return e.next=15,t.arrayBuffer();case 15:return r=e.sent,e.next=18,WebAssembly.instantiate(r,n);case 18:return e.abrupt("return",e.sent);case 19:return e.next=21,WebAssembly.instantiate(t,n);case 21:return i=e.sent,e.abrupt("return",i instanceof WebAssembly.Instance?{instance:i,module:t}:i);case 23:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t,n){return e.apply(this,arguments)}}(),e.next=5,t;case 5:return e.t1=e.sent,e.t2={},e.next=9,(0,e.t0)(e.t1,e.t2);case 9:return n=e.sent,i=n.instance,s=n.module,e.abrupt("return",(r=i.exports,f.__wbindgen_wasm_module=s,r));case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var g=Object.freeze({__proto__:null,decompress:function(e,t){try{var n=r.__wbindgen_export_0.value-16;r.__wbindgen_export_0.value=n;var i=function(e,t){var n=t(1*e.length);return u().set(e,n/1),A=e.length,n}(e,r.__wbindgen_malloc),a=A;r.decompress(n,i,a,t);var o=l()[n/4+0],s=l()[n/4+1],c=(f=o,h=s,u().subarray(f/1,f/1+h)).slice();return r.__wbindgen_free(o,1*s),c}finally{r.__wbindgen_export_0.value+=16}var f,h},default:f}),d=[62,0,0,0,63,52,53,54,55,56,57,58,59,60,61,0,0,0,0,0,0,0,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,0,0,0,0,0,0,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];function p(e){return d[e-43]}var v,y=function(e){for(var t,n=e.endsWith("==")?2:e.endsWith("=")?1:0,r=e.length,i=new Uint8Array(r/4*3),a=0,o=0;a<r;a+=4,o+=3)t=p(e.charCodeAt(a))<<18|p(e.charCodeAt(a+1))<<12|p(e.charCodeAt(a+2))<<6|p(e.charCodeAt(a+3)),i[o]=t>>16,i[o+1]=t>>8&255,i[o+2]=255&t;return i.subarray(0,i.length-n)}(" ");function m(e,t){return I.apply(this,arguments)}function I(){return(I=Object(o.a)(a.a.mark((function e(t,n){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=v,e.t0){e.next=5;break}return e.next=4,Object(o.a)(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f(y);case 2:return e.abrupt("return",g);case 3:case"end":return e.stop()}}),e)})))();case 4:v=e.sent;case 5:if(0!==(r=v.decompress(t,n)).length){e.next=8;break}throw Error("Failed to decode with LZW decoder.");case 8:return e.abrupt("return",r);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},function(e,t,n){"use strict";var r=n(656),i=n(278),a=n(661),o=n(662),s=n(663),u=n(664),A=n(665),c=Object.prototype.toString;function l(e){if(!(this instanceof l))return new l(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0===(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==o.Z_OK)throw new Error(s[n]);if(this.header=new A,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"===typeof t.dictionary?t.dictionary=a.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=r.inflateSetDictionary(this.strm,t.dictionary))!==o.Z_OK))throw new Error(s[n])}function f(e,t){var n=new l(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}l.prototype.push=function(e,t){var n,s,u,A,l,f=this.strm,h=this.options.chunkSize,g=this.options.dictionary,d=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?o.Z_FINISH:o.Z_NO_FLUSH,"string"===typeof e?f.input=a.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new i.Buf8(h),f.next_out=0,f.avail_out=h),(n=r.inflate(f,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&g&&(n=r.inflateSetDictionary(this.strm,g)),n===o.Z_BUF_ERROR&&!0===d&&(n=o.Z_OK,d=!1),n!==o.Z_STREAM_END&&n!==o.Z_OK)return this.onEnd(n),this.ended=!0,!1;f.next_out&&(0!==f.avail_out&&n!==o.Z_STREAM_END&&(0!==f.avail_in||s!==o.Z_FINISH&&s!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(u=a.utf8border(f.output,f.next_out),A=f.next_out-u,l=a.buf2string(f.output,u),f.next_out=A,f.avail_out=h-A,A&&i.arraySet(f.output,f.output,u,A,0),this.onData(l)):this.onData(i.shrinkBuf(f.output,f.next_out)))),0===f.avail_in&&0===f.avail_out&&(d=!0)}while((f.avail_in>0||0===f.avail_out)&&n!==o.Z_STREAM_END);return n===o.Z_STREAM_END&&(s=o.Z_FINISH),s===o.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===o.Z_OK):s!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),f.avail_out=0,!0)},l.prototype.onData=function(e){this.chunks.push(e)},l.prototype.onEnd=function(e){e===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=l,t.inflate=f,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},t.ungzip=f},function(e,t,n){"use strict";var r=n(278),i=n(657),a=n(658),o=n(659),s=n(660);function u(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function A(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function c(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):-2}function l(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,c(e)):-2}function f(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,l(e))):-2}function h(e,t){var n,r;return e?(r=new A,e.state=r,r.window=null,0!==(n=f(e,t))&&(e.state=null),n):-2}var g,d,p=!0;function v(e){if(p){var t;for(g=new r.Buf32(512),d=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,g,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,d,0,e.work,{bits:5}),p=!1}e.lencode=g,e.lenbits=9,e.distcode=d,e.distbits=5}function y(e,t,n,i){var a,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new r.Buf8(o.wsize)),i>=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>i&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0}t.inflateReset=l,t.inflateReset2=f,t.inflateResetKeep=c,t.inflateInit=function(e){return h(e,15)},t.inflateInit2=h,t.inflate=function(e,t){var n,A,c,l,f,h,g,d,p,m,I,b,E,C,B,w,Q,k,_,x,S,O,D,R,j=0,M=new r.Buf8(4),N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(n=e.state).mode&&(n.mode=13),f=e.next_out,c=e.output,g=e.avail_out,l=e.next_in,A=e.input,h=e.avail_in,d=n.hold,p=n.bits,m=h,I=g,O=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;p<16;){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}if(2&n.wrap&&35615===d){n.check=0,M[0]=255&d,M[1]=d>>>8&255,n.check=a(n.check,M,2,0),d=0,p=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&d)<<8)+(d>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!==(15&d)){e.msg="unknown compression method",n.mode=30;break}if(p-=4,S=8+(15&(d>>>=4)),0===n.wbits)n.wbits=S;else if(S>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<S,e.adler=n.check=1,n.mode=512&d?10:12,d=0,p=0;break;case 2:for(;p<16;){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}if(n.flags=d,8!==(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=d>>8&1),512&n.flags&&(M[0]=255&d,M[1]=d>>>8&255,n.check=a(n.check,M,2,0)),d=0,p=0,n.mode=3;case 3:for(;p<32;){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}n.head&&(n.head.time=d),512&n.flags&&(M[0]=255&d,M[1]=d>>>8&255,M[2]=d>>>16&255,M[3]=d>>>24&255,n.check=a(n.check,M,4,0)),d=0,p=0,n.mode=4;case 4:for(;p<16;){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}n.head&&(n.head.xflags=255&d,n.head.os=d>>8),512&n.flags&&(M[0]=255&d,M[1]=d>>>8&255,n.check=a(n.check,M,2,0)),d=0,p=0,n.mode=5;case 5:if(1024&n.flags){for(;p<16;){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}n.length=d,n.head&&(n.head.extra_len=d),512&n.flags&&(M[0]=255&d,M[1]=d>>>8&255,n.check=a(n.check,M,2,0)),d=0,p=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((b=n.length)>h&&(b=h),b&&(n.head&&(S=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,A,l,b,S)),512&n.flags&&(n.check=a(n.check,A,b,l)),h-=b,l+=b,n.length-=b),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===h)break e;b=0;do{S=A[l+b++],n.head&&S&&n.length<65536&&(n.head.name+=String.fromCharCode(S))}while(S&&b<h);if(512&n.flags&&(n.check=a(n.check,A,b,l)),h-=b,l+=b,S)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===h)break e;b=0;do{S=A[l+b++],n.head&&S&&n.length<65536&&(n.head.comment+=String.fromCharCode(S))}while(S&&b<h);if(512&n.flags&&(n.check=a(n.check,A,b,l)),h-=b,l+=b,S)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;p<16;){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}if(d!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}d=0,p=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;p<32;){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}e.adler=n.check=u(d),d=0,p=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=f,e.avail_out=g,e.next_in=l,e.avail_in=h,n.hold=d,n.bits=p,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){d>>>=7&p,p-=7&p,n.mode=27;break}for(;p<3;){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}switch(n.last=1&d,p-=1,3&(d>>>=1)){case 0:n.mode=14;break;case 1:if(v(n),n.mode=20,6===t){d>>>=2,p-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}d>>>=2,p-=2;break;case 14:for(d>>>=7&p,p-=7&p;p<32;){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}if((65535&d)!==(d>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&d,d=0,p=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(b=n.length){if(b>h&&(b=h),b>g&&(b=g),0===b)break e;r.arraySet(c,A,l,b,f),h-=b,l+=b,g-=b,f+=b,n.length-=b;break}n.mode=12;break;case 17:for(;p<14;){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}if(n.nlen=257+(31&d),d>>>=5,p-=5,n.ndist=1+(31&d),d>>>=5,p-=5,n.ncode=4+(15&d),d>>>=4,p-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;p<3;){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}n.lens[N[n.have++]]=7&d,d>>>=3,p-=3}for(;n.have<19;)n.lens[N[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,D={bits:n.lenbits},O=s(0,n.lens,0,19,n.lencode,0,n.work,D),n.lenbits=D.bits,O){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;w=(j=n.lencode[d&(1<<n.lenbits)-1])>>>16&255,Q=65535&j,!((B=j>>>24)<=p);){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}if(Q<16)d>>>=B,p-=B,n.lens[n.have++]=Q;else{if(16===Q){for(R=B+2;p<R;){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}if(d>>>=B,p-=B,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}S=n.lens[n.have-1],b=3+(3&d),d>>>=2,p-=2}else if(17===Q){for(R=B+3;p<R;){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}p-=B,S=0,b=3+(7&(d>>>=B)),d>>>=3,p-=3}else{for(R=B+7;p<R;){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}p-=B,S=0,b=11+(127&(d>>>=B)),d>>>=7,p-=7}if(n.have+b>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;b--;)n.lens[n.have++]=S}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,D={bits:n.lenbits},O=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,D),n.lenbits=D.bits,O){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,D={bits:n.distbits},O=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,D),n.distbits=D.bits,O){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(h>=6&&g>=258){e.next_out=f,e.avail_out=g,e.next_in=l,e.avail_in=h,n.hold=d,n.bits=p,o(e,I),f=e.next_out,c=e.output,g=e.avail_out,l=e.next_in,A=e.input,h=e.avail_in,d=n.hold,p=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;w=(j=n.lencode[d&(1<<n.lenbits)-1])>>>16&255,Q=65535&j,!((B=j>>>24)<=p);){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}if(w&&0===(240&w)){for(k=B,_=w,x=Q;w=(j=n.lencode[x+((d&(1<<k+_)-1)>>k)])>>>16&255,Q=65535&j,!(k+(B=j>>>24)<=p);){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}d>>>=k,p-=k,n.back+=k}if(d>>>=B,p-=B,n.back+=B,n.length=Q,0===w){n.mode=26;break}if(32&w){n.back=-1,n.mode=12;break}if(64&w){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&w,n.mode=22;case 22:if(n.extra){for(R=n.extra;p<R;){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}n.length+=d&(1<<n.extra)-1,d>>>=n.extra,p-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;w=(j=n.distcode[d&(1<<n.distbits)-1])>>>16&255,Q=65535&j,!((B=j>>>24)<=p);){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}if(0===(240&w)){for(k=B,_=w,x=Q;w=(j=n.distcode[x+((d&(1<<k+_)-1)>>k)])>>>16&255,Q=65535&j,!(k+(B=j>>>24)<=p);){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}d>>>=k,p-=k,n.back+=k}if(d>>>=B,p-=B,n.back+=B,64&w){e.msg="invalid distance code",n.mode=30;break}n.offset=Q,n.extra=15&w,n.mode=24;case 24:if(n.extra){for(R=n.extra;p<R;){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}n.offset+=d&(1<<n.extra)-1,d>>>=n.extra,p-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===g)break e;if(b=I-g,n.offset>b){if((b=n.offset-b)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}b>n.wnext?(b-=n.wnext,E=n.wsize-b):E=n.wnext-b,b>n.length&&(b=n.length),C=n.window}else C=c,E=f-n.offset,b=n.length;b>g&&(b=g),g-=b,n.length-=b;do{c[f++]=C[E++]}while(--b);0===n.length&&(n.mode=21);break;case 26:if(0===g)break e;c[f++]=n.length,g--,n.mode=21;break;case 27:if(n.wrap){for(;p<32;){if(0===h)break e;h--,d|=A[l++]<<p,p+=8}if(I-=g,e.total_out+=I,n.total+=I,I&&(e.adler=n.check=n.flags?a(n.check,c,I,f-I):i(n.check,c,I,f-I)),I=g,(n.flags?d:u(d))!==n.check){e.msg="incorrect data check",n.mode=30;break}d=0,p=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;p<32;){if(0===h)break e;h--,d+=A[l++]<<p,p+=8}if(d!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}d=0,p=0}n.mode=29;case 29:O=1;break e;case 30:O=-3;break e;case 31:return-4;case 32:default:return-2}return e.next_out=f,e.avail_out=g,e.next_in=l,e.avail_in=h,n.hold=d,n.bits=p,(n.wsize||I!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&y(e,e.output,e.next_out,I-e.avail_out)?(n.mode=31,-4):(m-=e.avail_in,I-=e.avail_out,e.total_in+=m,e.total_out+=I,n.total+=I,n.wrap&&I&&(e.adler=n.check=n.flags?a(n.check,c,I,e.next_out-I):i(n.check,c,I,e.next_out-I)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0===m&&0===I||4===t)&&0===O&&(O=-5),O)},t.inflateEnd=function(e){if(!e||!e.state)return-2;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var n;return e&&e.state?0===(2&(n=e.state).wrap)?-2:(n.head=t,t.done=!1,0):-2},t.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?-2:11===n.mode&&i(1,t,r,0)!==n.check?-3:y(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,0):-2},t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,n){"use strict";e.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;0!==n;){n-=o=n>2e3?2e3:n;do{a=a+(i=i+t[r++]|0)|0}while(--o);i%=65521,a%=65521}return i|a<<16|0}},function(e,t,n){"use strict";var r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s<o;s++)e=e>>>8^a[255&(e^t[s])];return-1^e}},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,i,a,o,s,u,A,c,l,f,h,g,d,p,v,y,m,I,b,E,C,B,w,Q;n=e.state,r=e.next_in,w=e.input,i=r+(e.avail_in-5),a=e.next_out,Q=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),u=n.dmax,A=n.wsize,c=n.whave,l=n.wnext,f=n.window,h=n.hold,g=n.bits,d=n.lencode,p=n.distcode,v=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;e:do{g<15&&(h+=w[r++]<<g,g+=8,h+=w[r++]<<g,g+=8),m=d[h&v];t:for(;;){if(h>>>=I=m>>>24,g-=I,0===(I=m>>>16&255))Q[a++]=65535&m;else{if(!(16&I)){if(0===(64&I)){m=d[(65535&m)+(h&(1<<I)-1)];continue t}if(32&I){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}b=65535&m,(I&=15)&&(g<I&&(h+=w[r++]<<g,g+=8),b+=h&(1<<I)-1,h>>>=I,g-=I),g<15&&(h+=w[r++]<<g,g+=8,h+=w[r++]<<g,g+=8),m=p[h&y];n:for(;;){if(h>>>=I=m>>>24,g-=I,!(16&(I=m>>>16&255))){if(0===(64&I)){m=p[(65535&m)+(h&(1<<I)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(E=65535&m,g<(I&=15)&&(h+=w[r++]<<g,(g+=8)<I&&(h+=w[r++]<<g,g+=8)),(E+=h&(1<<I)-1)>u){e.msg="invalid distance too far back",n.mode=30;break e}if(h>>>=I,g-=I,E>(I=a-o)){if((I=E-I)>c&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(C=0,B=f,0===l){if(C+=A-I,I<b){b-=I;do{Q[a++]=f[C++]}while(--I);C=a-E,B=Q}}else if(l<I){if(C+=A+l-I,(I-=l)<b){b-=I;do{Q[a++]=f[C++]}while(--I);if(C=0,l<b){b-=I=l;do{Q[a++]=f[C++]}while(--I);C=a-E,B=Q}}}else if(C+=l-I,I<b){b-=I;do{Q[a++]=f[C++]}while(--I);C=a-E,B=Q}for(;b>2;)Q[a++]=B[C++],Q[a++]=B[C++],Q[a++]=B[C++],b-=3;b&&(Q[a++]=B[C++],b>1&&(Q[a++]=B[C++]))}else{C=a-E;do{Q[a++]=Q[C++],Q[a++]=Q[C++],Q[a++]=Q[C++],b-=3}while(b>2);b&&(Q[a++]=Q[C++],b>1&&(Q[a++]=Q[C++]))}break}}break}}while(r<i&&a<s);r-=b=g>>3,h&=(1<<(g-=b<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=a<s?s-a+257:257-(a-s),n.hold=h,n.bits=g}},function(e,t,n){"use strict";var r=n(278),i=[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,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[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,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,n,u,A,c,l,f){var h,g,d,p,v,y,m,I,b,E=f.bits,C=0,B=0,w=0,Q=0,k=0,_=0,x=0,S=0,O=0,D=0,R=null,j=0,M=new r.Buf16(16),N=new r.Buf16(16),F=null,T=0;for(C=0;C<=15;C++)M[C]=0;for(B=0;B<u;B++)M[t[n+B]]++;for(k=E,Q=15;Q>=1&&0===M[Q];Q--);if(k>Q&&(k=Q),0===Q)return A[c++]=20971520,A[c++]=20971520,f.bits=1,0;for(w=1;w<Q&&0===M[w];w++);for(k<w&&(k=w),S=1,C=1;C<=15;C++)if(S<<=1,(S-=M[C])<0)return-1;if(S>0&&(0===e||1!==Q))return-1;for(N[1]=0,C=1;C<15;C++)N[C+1]=N[C]+M[C];for(B=0;B<u;B++)0!==t[n+B]&&(l[N[t[n+B]]++]=B);if(0===e?(R=F=l,y=19):1===e?(R=i,j-=257,F=a,T-=257,y=256):(R=o,F=s,y=-1),D=0,B=0,C=w,v=c,_=k,x=0,d=-1,p=(O=1<<k)-1,1===e&&O>852||2===e&&O>592)return 1;for(;;){m=C-x,l[B]<y?(I=0,b=l[B]):l[B]>y?(I=F[T+l[B]],b=R[j+l[B]]):(I=96,b=0),h=1<<C-x,w=g=1<<_;do{A[v+(D>>x)+(g-=h)]=m<<24|I<<16|b|0}while(0!==g);for(h=1<<C-1;D&h;)h>>=1;if(0!==h?(D&=h-1,D+=h):D=0,B++,0===--M[C]){if(C===Q)break;C=t[n+l[B]]}if(C>k&&(D&p)!==d){for(0===x&&(x=k),v+=w,S=1<<(_=C-x);_+x<Q&&!((S-=M[_+x])<=0);)_++,S<<=1;if(O+=1<<_,1===e&&O>852||2===e&&O>592)return 1;A[d=D&p]=k<<24|_<<16|v-c|0}}return 0!==D&&(A[v+D]=C-x<<24|64<<16|0),f.bits=k,0}},function(e,t,n){"use strict";var r=n(278),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch(A){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(A){a=!1}for(var o=new r.Buf8(256),s=0;s<256;s++)o[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function u(e,t){if(t<65534&&(e.subarray&&a||!e.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",o=0;o<t;o++)n+=String.fromCharCode(e[o]);return n}o[254]=o[254]=1,t.string2buf=function(e){var t,n,i,a,o,s=e.length,u=0;for(a=0;a<s;a++)55296===(64512&(n=e.charCodeAt(a)))&&a+1<s&&56320===(64512&(i=e.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(i-56320),a++),u+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(u),o=0,a=0;o<u;a++)55296===(64512&(n=e.charCodeAt(a)))&&a+1<s&&56320===(64512&(i=e.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(i-56320),a++),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},t.buf2binstring=function(e){return u(e,e.length)},t.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},t.buf2string=function(e,t){var n,r,i,a,s=t||e.length,A=new Array(2*s);for(r=0,n=0;n<s;)if((i=e[n++])<128)A[r++]=i;else if((a=o[i])>4)A[r++]=65533,n+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&n<s;)i=i<<6|63&e[n++],a--;a>1?A[r++]=65533:i<65536?A[r++]=i:(i-=65536,A[r++]=55296|i>>10&1023,A[r++]=56320|1023&i)}return u(A,r)},t.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128===(192&e[n]);)n--;return n<0||0===n?t:n+o[e[n]]>t?n:t}},function(e,t,n){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,n){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,n){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t,n){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},function(e,t,n){"use strict";var r=n(667),i=n(279),a=n(279),o=n(153).buildOptions,s=n(669);t.parse=function(e,t,n){if(n){!0===n&&(n={});var u=s.validate(e,n);if(!0!==u)throw Error(u.err.msg)}t=o(t,a.defaultOptions,a.props);var A=i.getTraversalObj(e,t);return r.convertToJson(A,t)},t.convertTonimn=n(670).convert2nimn,t.getTraversalObj=i.getTraversalObj,t.convertToJson=r.convertToJson,t.convertToJsonString=n(671).convertToJsonString,t.validate=s.validate,t.j2xParser=n(672),t.parseToNimn=function(e,n,r){return t.convertTonimn(t.getTraversalObj(e,r),n,r)}},function(e,t,n){"use strict";var r=n(153);t.convertToJson=function e(t,n){var i={};if(!(t.child&&!r.isEmptyObject(t.child)||t.attrsMap&&!r.isEmptyObject(t.attrsMap)))return r.isExist(t.val)?t.val:"";r.isExist(t.val)&&("string"!==typeof t.val||""!==t.val&&t.val!==n.cdataPositionChar)&&("strict"===n.arrayMode?i[n.textNodeName]=[t.val]:i[n.textNodeName]=t.val),r.merge(i,t.attrsMap,n.arrayMode);for(var a=Object.keys(t.child),o=0;o<a.length;o++){var s=a[o];if(t.child[s]&&t.child[s].length>1)for(var u in i[s]=[],t.child[s])i[s].push(e(t.child[s][u],n));else if(!0===n.arrayMode){var A=e(t.child[s][0],n);i[s]="object"===typeof A?[A]:A}else"strict"===n.arrayMode?i[s]=[e(t.child[s][0],n)]:i[s]=e(t.child[s][0],n)}return i}},function(e,t,n){"use strict";e.exports=function(e,t,n){this.tagname=e,this.parent=t,this.child={},this.attrsMap={},this.val=n,this.addChild=function(e){Array.isArray(this.child[e.tagname])?this.child[e.tagname].push(e):this.child[e.tagname]=[e]}}},function(e,t,n){"use strict";var r=n(153),i={allowBooleanAttributes:!1},a=["allowBooleanAttributes"];function o(e,t){for(var n=t;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{var r=e.substr(n,t-n);if(t>5&&"xml"===r)return f("InvalidXml","XML declaration allowed only at the start of the document.",g(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function s(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){var n=1;for(t+=8;t<e.length;t++)if("<"===e[t])n++;else if(">"===e[t]&&0===--n)break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}t.validate=function(e,t){t=r.buildOptions(t,i,a);var n,A=[],h=!1,d=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(var p=0;p<e.length;p++){if("<"!==e[p]){if(" "===e[p]||"\t"===e[p]||"\n"===e[p]||"\r"===e[p])continue;return f("InvalidChar","char '"+e[p]+"' is not expected.",g(e,p))}if("?"===e[++p]){if((p=o(e,++p)).err)return p}else{if("!"===e[p]){p=s(e,p);continue}var v=!1;"/"===e[p]&&(v=!0,p++);for(var y="";p<e.length&&">"!==e[p]&&" "!==e[p]&&"\t"!==e[p]&&"\n"!==e[p]&&"\r"!==e[p];p++)y+=e[p];if("/"===(y=y.trim())[y.length-1]&&(y=y.substring(0,y.length-1),p--),n=y,!r.isName(n)){return f("InvalidTag",0===y.trim().length?"There is an unnecessary space between tag name and backward slash '</ ..'.":"Tag '"+y+"' is an invalid name.",g(e,p))}var m=u(e,p);if(!1===m)return f("InvalidAttr","Attributes for '"+y+"' have open quote.",g(e,p));var I=m.value;if(p=m.index,"/"===I[I.length-1]){var b=c(I=I.substring(0,I.length-1),t);if(!0!==b)return f(b.err.code,b.err.msg,g(e,p-I.length+b.err.line));h=!0}else if(v){if(!m.tagClosed)return f("InvalidTag","Closing tag '"+y+"' doesn't have proper closing.",g(e,p));if(I.trim().length>0)return f("InvalidTag","Closing tag '"+y+"' can't have attributes or invalid starting.",g(e,p));var E=A.pop();if(y!==E)return f("InvalidTag","Closing tag '"+E+"' is expected inplace of '"+y+"'.",g(e,p));0==A.length&&(d=!0)}else{var C=c(I,t);if(!0!==C)return f(C.err.code,C.err.msg,g(e,p-I.length+C.err.line));if(!0===d)return f("InvalidXml","Multiple possible root nodes found.",g(e,p));A.push(y),h=!0}for(p++;p<e.length;p++){if("<"===e[p]){if("!"===e[p+1]){p=s(e,++p);continue}break}if("&"===e[p]){var B=l(e,p);if(-1==B)return f("InvalidChar","char '&' is not expected.",g(e,p));p=B}}"<"===e[p]&&p--}}return h?!(A.length>0)||f("InvalidXml","Invalid '"+JSON.stringify(A,null,4).replace(/\r?\n/g,"")+"' found.",1):f("InvalidXml","Start tag expected.",1)};function u(e,t){for(var n="",r="",i=!1;t<e.length;t++){if('"'===e[t]||"'"===e[t])if(""===r)r=e[t];else{if(r!==e[t])continue;r=""}else if(">"===e[t]&&""===r){i=!0;break}n+=e[t]}return""===r&&{value:n,index:t,tagClosed:i}}var A=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function c(e,t){for(var n=r.getAllMatches(e,A),i={},a=0;a<n.length;a++){if(0===n[a][1].length)return f("InvalidAttr","Attribute '"+n[a][2]+"' has no space in starting.",d(e,n[a][0]));if(void 0===n[a][3]&&!t.allowBooleanAttributes)return f("InvalidAttr","boolean attribute '"+n[a][2]+"' is not allowed.",d(e,n[a][0]));var o=n[a][2];if(!h(o))return f("InvalidAttr","Attribute '"+o+"' is an invalid name.",d(e,n[a][0]));if(i.hasOwnProperty(o))return f("InvalidAttr","Attribute '"+o+"' is repeated.",d(e,n[a][0]));i[o]=1}return!0}function l(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){var n=/\d/;for("x"===e[t]&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(n))break}return-1}(e,++t);for(var n=0;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(";"===e[t])break;return-1}return t}function f(e,t,n){return{err:{code:e,msg:t,line:n}}}function h(e){return r.isName(e)}function g(e,t){return e.substring(0,t).split(/\r?\n/).length}function d(e,t){return e.indexOf(t)+t.length}},function(e,t,n){"use strict";var r=function(e){return String.fromCharCode(e)},i={nilChar:r(176),missingChar:r(201),nilPremitive:r(175),missingPremitive:r(200),emptyChar:r(178),emptyValue:r(177),boundryChar:r(179),objStart:r(198),arrStart:r(204),arrayEnd:r(185)},a=[i.nilChar,i.nilPremitive,i.missingChar,i.missingPremitive,i.boundryChar,i.emptyChar,i.emptyValue,i.arrayEnd,i.objStart,i.arrStart],o=function e(t,n,r){if("string"===typeof n)return t&&t[0]&&void 0!==t[0].val?s(t[0].val,n):s(t,n);var a,o=void 0===(a=t)?i.missingChar:null===a?i.nilChar:!(a.child&&0===Object.keys(a.child).length&&(!a.attrsMap||0===Object.keys(a.attrsMap).length))||i.emptyChar;if(!0===o){var A="";if(Array.isArray(n)){A+=i.arrStart;var c=n[0],l=t.length;if("string"===typeof c)for(var f=0;f<l;f++){var h=s(t[f].val,c);A=u(A,h)}else for(var g=0;g<l;g++){var d=e(t[g],c,r);A=u(A,d)}A+=i.arrayEnd}else{A+=i.objStart;var p=Object.keys(n);for(var v in Array.isArray(t)&&(t=t[0]),p){var y=p[v],m=void 0;m=!r.ignoreAttributes&&t.attrsMap&&t.attrsMap[y]?e(t.attrsMap[y],n[y],r):y===r.textNodeName?e(t.val,n[y],r):e(t.child[y],n[y],r),A=u(A,m)}}return A}return o},s=function(e){switch(e){case void 0:return i.missingPremitive;case null:return i.nilPremitive;case"":return i.emptyValue;default:return e}},u=function(e,t){return A(t[0])||A(e[e.length-1])||(e+=i.boundryChar),e+t},A=function(e){return-1!==a.indexOf(e)};var c=n(279),l=n(153).buildOptions;t.convert2nimn=function(e,t,n){return n=l(n,c.defaultOptions,c.props),o(e,t,n)}},function(e,t,n){"use strict";var r=n(153),i=n(153).buildOptions,a=n(279),o=function e(t,n,i){for(var a,o="{",s=Object.keys(t.child),u=0;u<s.length;u++){var A=s[u];if(t.child[A]&&t.child[A].length>1){for(var c in o+='"'+A+'" : [ ',t.child[A])o+=e(t.child[A][c],n)+" , ";o=o.substr(0,o.length-1)+" ] "}else o+='"'+A+'" : '+e(t.child[A][0],n)+" ,"}return r.merge(o,t.attrsMap),r.isEmptyObject(o)?r.isExist(t.val)?t.val:"":(r.isExist(t.val)&&("string"!==typeof t.val||""!==t.val&&t.val!==n.cdataPositionChar)&&(o+='"'+n.textNodeName+'" : '+(!0!==(a=t.val)&&!1!==a&&isNaN(a)?'"'+a+'"':a)),","===o[o.length-1]&&(o=o.substr(0,o.length-2)),o+"}")};t.convertToJsonString=function(e,t){return(t=i(t,a.defaultOptions,a.props)).indentBy=t.indentBy||"",o(e,t,0)}},function(e,t,n){"use strict";var r=n(153).buildOptions,i={attributeNamePrefix:"@_",attrNodeName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataTagName:!1,cdataPositionChar:"\\c",format:!1,indentBy:"  ",supressEmptyNode:!1,tagValueProcessor:function(e){return e},attrValueProcessor:function(e){return e}},a=["attributeNamePrefix","attrNodeName","textNodeName","ignoreAttributes","cdataTagName","cdataPositionChar","format","indentBy","supressEmptyNode","tagValueProcessor","attrValueProcessor"];function o(e){this.options=r(e,i,a),this.options.ignoreAttributes||this.options.attrNodeName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=g),this.options.cdataTagName?this.isCDATA=d:this.isCDATA=function(){return!1},this.replaceCDATAstr=s,this.replaceCDATAarr=u,this.options.format?(this.indentate=h,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""),this.options.supressEmptyNode?(this.buildTextNode=f,this.buildObjNode=c):(this.buildTextNode=l,this.buildObjNode=A),this.buildTextValNode=l,this.buildObjectNode=A}function s(e,t){return e=this.options.tagValueProcessor(""+e),""===this.options.cdataPositionChar||""===e?e+"<![CDATA["+t+"]]"+this.tagEndChar:e.replace(this.options.cdataPositionChar,"<![CDATA["+t+"]]"+this.tagEndChar)}function u(e,t){if(e=this.options.tagValueProcessor(""+e),""===this.options.cdataPositionChar||""===e)return e+"<![CDATA["+t.join("]]><![CDATA[")+"]]"+this.tagEndChar;for(var n in t)e=e.replace(this.options.cdataPositionChar,"<![CDATA["+t[n]+"]]>");return e+this.newLine}function A(e,t,n,r){return n&&!e.includes("<")?this.indentate(r)+"<"+t+n+">"+e+"</"+t+this.tagEndChar:this.indentate(r)+"<"+t+n+this.tagEndChar+e+this.indentate(r)+"</"+t+this.tagEndChar}function c(e,t,n,r){return""!==e?this.buildObjectNode(e,t,n,r):this.indentate(r)+"<"+t+n+"/"+this.tagEndChar}function l(e,t,n,r){return this.indentate(r)+"<"+t+n+">"+this.options.tagValueProcessor(e)+"</"+t+this.tagEndChar}function f(e,t,n,r){return""!==e?this.buildTextValNode(e,t,n,r):this.indentate(r)+"<"+t+n+"/"+this.tagEndChar}function h(e){return this.options.indentBy.repeat(e)}function g(e){return!!e.startsWith(this.options.attributeNamePrefix)&&e.substr(this.attrPrefixLen)}function d(e){return e===this.options.cdataTagName}o.prototype.parse=function(e){return this.j2x(e,0).val},o.prototype.j2x=function(e,t){for(var n="",r="",i=Object.keys(e),a=i.length,o=0;o<a;o++){var s=i[o];if("undefined"===typeof e[s]);else if(null===e[s])r+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(e[s]instanceof Date)r+=this.buildTextNode(e[s],s,"",t);else if("object"!==typeof e[s]){var u=this.isAttribute(s);u?n+=" "+u+'="'+this.options.attrValueProcessor(""+e[s])+'"':this.isCDATA(s)?e[this.options.textNodeName]?r+=this.replaceCDATAstr(e[this.options.textNodeName],e[s]):r+=this.replaceCDATAstr("",e[s]):s===this.options.textNodeName?e[this.options.cdataTagName]||(r+=this.options.tagValueProcessor(""+e[s])):r+=this.buildTextNode(e[s],s,"",t)}else if(Array.isArray(e[s]))if(this.isCDATA(s))r+=this.indentate(t),e[this.options.textNodeName]?r+=this.replaceCDATAarr(e[this.options.textNodeName],e[s]):r+=this.replaceCDATAarr("",e[s]);else for(var A=e[s].length,c=0;c<A;c++){var l=e[s][c];if("undefined"===typeof l);else if(null===l)r+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if("object"===typeof l){var f=this.j2x(l,t+1);r+=this.buildObjNode(f.val,s,f.attrStr,t)}else r+=this.buildTextNode(l,s,"",t)}else if(this.options.attrNodeName&&s===this.options.attrNodeName)for(var h=Object.keys(e[s]),g=h.length,d=0;d<g;d++)n+=" "+h[d]+'="'+this.options.attrValueProcessor(""+e[s][h[d]])+'"';else{var p=this.j2x(e[s],t+1);r+=this.buildObjNode(p.val,s,p.attrStr,t)}}return{attrStr:n,val:r}},e.exports=o},function(e,t,n){var r=n(481),i=n(442),a=n(703),o=n(705),s=n(484),u=n(203),A=n(372),c=n(391),l="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,h,g,d){var p=u(e),v=u(t),y=p?"[object Array]":s(e),m=v?"[object Array]":s(t),I=(y="[object Arguments]"==y?l:y)==l,b=(m="[object Arguments]"==m?l:m)==l,E=y==m;if(E&&A(e)){if(!A(t))return!1;p=!0,I=!1}if(E&&!I)return d||(d=new r),p||c(e)?i(e,t,n,h,g,d):a(e,t,y,n,h,g,d);if(!(1&n)){var C=I&&f.call(e,"__wrapped__"),B=b&&f.call(t,"__wrapped__");if(C||B){var w=C?e.value():e,Q=B?t.value():t;return d||(d=new r),g(w,Q,n,h,d)}}return!!E&&(d||(d=new r),o(e,t,n,h,g,d))}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(281),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(281);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(281);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(281);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},function(e,t,n){var r=n(280);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(280),i=n(348),a=n(390);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(389),i=n(685),a=n(195),o=n(441),s=/^\[object .+?Constructor\]$/,u=Function.prototype,A=Object.prototype,c=u.toString,l=A.hasOwnProperty,f=RegExp("^"+c.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||i(e))&&(r(e)?f:s).test(o(e))}},function(e,t,n){var r=n(686),i=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},function(e,t,n){var r=n(138)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(689),i=n(280),a=n(348);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},function(e,t,n){var r=n(690),i=n(691),a=n(692),o=n(693),s=n(694);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=s,e.exports=u},function(e,t,n){var r=n(282);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(282),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(282),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},function(e,t,n){var r=n(282);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(283);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(283);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(283);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(283);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t,n){var r=n(316),i=n(518),a=n(325),o=n(442),s=n(704),u=n(497),A=r?r.prototype:void 0,c=A?A.valueOf:void 0;e.exports=function(e,t,n,r,A,l,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!l(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=s;case"[object Set]":var g=1&r;if(h||(h=u),e.size!=t.size&&!g)return!1;var d=f.get(e);if(d)return d==t;r|=2,f.set(e,t);var p=o(h(e),h(t),r,A,l,f);return f.delete(e),p;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t,n){var r=n(519),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,a,o,s){var u=1&n,A=r(e),c=A.length;if(c!=r(t).length&&!u)return!1;for(var l=c;l--;){var f=A[l];if(!(u?f in t:i.call(t,f)))return!1}var h=s.get(e);if(h&&s.get(t))return h==t;var g=!0;s.set(e,t),s.set(t,e);for(var d=u;++l<c;){var p=e[f=A[l]],v=t[f];if(a)var y=u?a(v,p,f,t,e,s):a(p,v,f,e,t,s);if(!(void 0===y?p===v||o(p,v,n,a,s):y)){g=!1;break}d||(d="constructor"==f)}if(g&&!d){var m=e.constructor,I=t.constructor;m==I||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof I&&I instanceof I||(g=!1)}return s.delete(e),s.delete(t),g}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(239),i=n(197);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(239),i=n(392),a=n(197),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return a(e)&&i(e.length)&&!!o[r(e)]}},function(e,t,n){var r=n(501),i=n(712),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(523)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(199)(n(138),"DataView");e.exports=r},function(e,t,n){var r=n(199)(n(138),"Promise");e.exports=r},function(e,t,n){var r=n(199)(n(138),"WeakMap");e.exports=r},function(e,t,n){"use strict";function r(e,t,n){var r=n?" !== ":" === ",i=n?" || ":" && ",a=n?"!":"",o=n?"":"!";switch(e){case"null":return t+r+"null";case"array":return a+"Array.isArray("+t+")";case"object":return"("+a+t+i+"typeof "+t+r+'"object"'+i+o+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+r+'"number"'+i+o+"("+t+" % 1)"+i+t+r+t+")";default:return"typeof "+t+r+'"'+e+'"'}}e.exports={copy:function(e,t){for(var n in t=t||{},e)t[n]=e[n];return t},checkDataType:r,checkDataTypes:function(e,t){switch(e.length){case 1:return r(e[0],t,!0);default:var n="",i=a(e);for(var o in i.array&&i.object&&(n=i.null?"(":"(!"+t+" || ",n+="typeof "+t+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer,i)n+=(n?" && ":"")+r(o,t,!0);return n}},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var n=[],r=0;r<t.length;r++){var a=t[r];(i[a]||"array"===e&&"array"===a)&&(n[n.length]=a)}if(n.length)return n}else{if(i[t])return[t];if("array"===e&&"array"===t)return["array"]}},toHash:a,getProperty:u,escapeQuotes:A,equal:n(527),ucs2length:n(1098),varOccurences:function(e,t){t+="[^0-9]";var n=e.match(new RegExp(t,"g"));return n?n.length:0},varReplace:function(e,t,n){return t+="([^0-9])",n=n.replace(/\$/g,"$$$$"),e.replace(new RegExp(t,"g"),n+"$1")},cleanUpCode:function(e){return e.replace(c,"").replace(l,"").replace(f,"if (!($1))")},finalCleanUpCode:function(e,t){var n=e.match(h);n&&2==n.length&&(e=t?e.replace(d,"").replace(p,"return data;"):e.replace(g,"").replace("return errors === 0;","validate.errors = null; return true;"));return(n=e.match(v))&&3===n.length?e.replace(y,""):e},schemaHasRules:function(e,t){if("boolean"==typeof e)return!e;for(var n in e)if(t[n])return!0},schemaHasRulesExcept:function(e,t,n){if("boolean"==typeof e)return!e&&"not"!=n;for(var r in e)if(r!=n&&t[r])return!0},schemaUnknownRules:function(e,t){if("boolean"==typeof e)return;for(var n in e)if(!t[n])return n},toQuotedString:m,getPathExpr:function(e,t,n,r){return E(e,n?"'/' + "+t+(r?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):r?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'")},getPath:function(e,t,n){var r=m(n?"/"+C(t):u(t));return E(e,r)},getData:function(e,t,n){var r,i,a,o;if(""===e)return"rootData";if("/"==e[0]){if(!I.test(e))throw new Error("Invalid JSON-pointer: "+e);i=e,a="rootData"}else{if(!(o=e.match(b)))throw new Error("Invalid JSON-pointer: "+e);if(r=+o[1],"#"==(i=o[2])){if(r>=t)throw new Error("Cannot access property/index "+r+" levels up, current level is "+t);return n[t-r]}if(r>t)throw new Error("Cannot access data "+r+" levels up, current level is "+t);if(a="data"+(t-r||""),!i)return a}for(var s=a,A=i.split("/"),c=0;c<A.length;c++){var l=A[c];l&&(a+=u(B(l)),s+=" && "+a)}return s},unescapeFragment:function(e){return B(decodeURIComponent(e))},unescapeJsonPointer:B,escapeFragment:function(e){return encodeURIComponent(C(e))},escapeJsonPointer:C};var i=a(["string","number","integer","boolean","null"]);function a(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}var o=/^[a-z$_][a-z$_0-9]*$/i,s=/'|\\/g;function u(e){return"number"==typeof e?"["+e+"]":o.test(e)?"."+e:"['"+A(e)+"']"}function A(e){return e.replace(s,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}var c=/else\s*{\s*}/g,l=/if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g,f=/if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g;var h=/[^v.]errors/g,g=/var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g,d=/var errors = 0;|var vErrors = null;/g,p=/if \(errors === 0\) return data;\s*else throw new ValidationError\(vErrors\);/,v=/[^A-Za-z_$]rootData[^A-Za-z0-9_$]/g,y=/if \(rootData === undefined\) rootData = data;/;function m(e){return"'"+A(e)+"'"}var I=/^\/(?:[^~]|~0|~1)*$/,b=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function E(e,t){return'""'==e?t:(e+" + "+t).replace(/' \+ '/g,"")}function C(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function B(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}},function(e,t,n){var r=n(504),i=n(505),a=n(1017),o=n(718),s=n(526),u=function e(t,n,u){var A,c,l,f=t&e.F,h=t&e.G,g=t&e.S,d=t&e.P,p=t&e.B,v=t&e.W,y=h?i:i[n]||(i[n]={}),m=y.prototype,I=h?r:g?r[n]:(r[n]||{}).prototype;for(A in h&&(u=n),u)(c=!f&&I&&void 0!==I[A])&&s(y,A)||(l=c?I[A]:u[A],y[A]=h&&"function"!=typeof I[A]?u[A]:p&&c?a(l,r):v&&I[A]==l?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(l):d&&"function"==typeof l?a(Function.call,l):l,d&&((y.virtual||(y.virtual={}))[A]=l,t&e.R&&m&&!m[A]&&o(m,A,l)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){var r=n(525),i=n(785);e.exports=n(506)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},function(e,t,n){var r=n(1021),i=n(868);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(871)("wks"),i=n(788),a=n(504).Symbol,o="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=r},function(e,t,n){var r=n(792).MAX_SAFE_COMPONENT_LENGTH,i=n(793),a=(t=e.exports={}).re=[],o=t.src=[],s=t.t={},u=0,A=function(e,t,n){var r=u++;i(r,t),s[e]=r,o[r]=t,a[r]=new RegExp(t,n?"g":void 0)};A("NUMERICIDENTIFIER","0|[1-9]\\d*"),A("NUMERICIDENTIFIERLOOSE","[0-9]+"),A("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),A("MAINVERSION","(".concat(o[s.NUMERICIDENTIFIER],")\\.")+"(".concat(o[s.NUMERICIDENTIFIER],")\\.")+"(".concat(o[s.NUMERICIDENTIFIER],")")),A("MAINVERSIONLOOSE","(".concat(o[s.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(o[s.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(o[s.NUMERICIDENTIFIERLOOSE],")")),A("PRERELEASEIDENTIFIER","(?:".concat(o[s.NUMERICIDENTIFIER],"|").concat(o[s.NONNUMERICIDENTIFIER],")")),A("PRERELEASEIDENTIFIERLOOSE","(?:".concat(o[s.NUMERICIDENTIFIERLOOSE],"|").concat(o[s.NONNUMERICIDENTIFIER],")")),A("PRERELEASE","(?:-(".concat(o[s.PRERELEASEIDENTIFIER],"(?:\\.").concat(o[s.PRERELEASEIDENTIFIER],")*))")),A("PRERELEASELOOSE","(?:-?(".concat(o[s.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(o[s.PRERELEASEIDENTIFIERLOOSE],")*))")),A("BUILDIDENTIFIER","[0-9A-Za-z-]+"),A("BUILD","(?:\\+(".concat(o[s.BUILDIDENTIFIER],"(?:\\.").concat(o[s.BUILDIDENTIFIER],")*))")),A("FULLPLAIN","v?".concat(o[s.MAINVERSION]).concat(o[s.PRERELEASE],"?").concat(o[s.BUILD],"?")),A("FULL","^".concat(o[s.FULLPLAIN],"$")),A("LOOSEPLAIN","[v=\\s]*".concat(o[s.MAINVERSIONLOOSE]).concat(o[s.PRERELEASELOOSE],"?").concat(o[s.BUILD],"?")),A("LOOSE","^".concat(o[s.LOOSEPLAIN],"$")),A("GTLT","((?:<|>)?=?)"),A("XRANGEIDENTIFIERLOOSE","".concat(o[s.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),A("XRANGEIDENTIFIER","".concat(o[s.NUMERICIDENTIFIER],"|x|X|\\*")),A("XRANGEPLAIN","[v=\\s]*(".concat(o[s.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(o[s.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(o[s.XRANGEIDENTIFIER],")")+"(?:".concat(o[s.PRERELEASE],")?").concat(o[s.BUILD],"?")+")?)?"),A("XRANGEPLAINLOOSE","[v=\\s]*(".concat(o[s.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(o[s.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(o[s.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(o[s.PRERELEASELOOSE],")?").concat(o[s.BUILD],"?")+")?)?"),A("XRANGE","^".concat(o[s.GTLT],"\\s*").concat(o[s.XRANGEPLAIN],"$")),A("XRANGELOOSE","^".concat(o[s.GTLT],"\\s*").concat(o[s.XRANGEPLAINLOOSE],"$")),A("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(r,"})")+"(?:\\.(\\d{1,".concat(r,"}))?")+"(?:\\.(\\d{1,".concat(r,"}))?")+"(?:$|[^\\d])"),A("COERCERTL",o[s.COERCE],!0),A("LONETILDE","(?:~>?)"),A("TILDETRIM","(\\s*)".concat(o[s.LONETILDE],"\\s+"),!0),t.tildeTrimReplace="$1~",A("TILDE","^".concat(o[s.LONETILDE]).concat(o[s.XRANGEPLAIN],"$")),A("TILDELOOSE","^".concat(o[s.LONETILDE]).concat(o[s.XRANGEPLAINLOOSE],"$")),A("LONECARET","(?:\\^)"),A("CARETTRIM","(\\s*)".concat(o[s.LONECARET],"\\s+"),!0),t.caretTrimReplace="$1^",A("CARET","^".concat(o[s.LONECARET]).concat(o[s.XRANGEPLAIN],"$")),A("CARETLOOSE","^".concat(o[s.LONECARET]).concat(o[s.XRANGEPLAINLOOSE],"$")),A("COMPARATORLOOSE","^".concat(o[s.GTLT],"\\s*(").concat(o[s.LOOSEPLAIN],")$|^$")),A("COMPARATOR","^".concat(o[s.GTLT],"\\s*(").concat(o[s.FULLPLAIN],")$|^$")),A("COMPARATORTRIM","(\\s*)".concat(o[s.GTLT],"\\s*(").concat(o[s.LOOSEPLAIN],"|").concat(o[s.XRANGEPLAIN],")"),!0),t.comparatorTrimReplace="$1$2$3",A("HYPHENRANGE","^\\s*(".concat(o[s.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(o[s.XRANGEPLAIN],")")+"\\s*$"),A("HYPHENRANGELOOSE","^\\s*(".concat(o[s.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(o[s.XRANGEPLAINLOOSE],")")+"\\s*$"),A("STAR","(<|>)?=?\\s*\\*"),A("GTE0","^\\s*>=\\s*0.0.0\\s*$"),A("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},function(e,t,n){var r=n(792).MAX_LENGTH,i=n(722),a=i.re,o=i.t,s=n(321);e.exports=function(e,t){if(t&&"object"===typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof s)return e;if("string"!==typeof e)return null;if(e.length>r)return null;if(!(t.loose?a[o.LOOSE]:a[o.FULL]).test(e))return null;try{return new s(e,t)}catch(n){return null}}},function(e,t,n){"use strict";n.r(t);var r,i=n(84),a=n(13),o=n(14),s=n(15),u=n(93),A=n(11);function c(){return r||(r=function(){try{throw new Error}catch(t){var e=(""+t.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);if(e)return(""+e[0]).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)?\/[^/]+(?:\?.*)?$/,"$1")+"/"}return"/"}()),r}var l,f="undefined"!==typeof navigator&&navigator.hardwareConcurrency?navigator.hardwareConcurrency:4,h=function(e){return/^(file|https?:)?\/\//i.test(e)};function g(e){var t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function d(){return l||(l=function(){if("undefined"===typeof Worker)return function e(){throw Object(A.a)(this,e),Error("No web worker implementation available. You might have tried to spawn a worker within a worker in a browser that doesn't support workers in workers.")};var e=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e,r){return Object(A.a)(this,n),"string"===typeof e&&r&&r._baseURL?e=new URL(e,r._baseURL):"string"===typeof e&&!h(e)&&c().match(/^file:\/\//i)&&(e=new URL(e,c().replace(/\/[^\/]+$/,"/")),e=g("importScripts(".concat(JSON.stringify(e),");"))),"string"===typeof e&&h(e)&&(e=g("importScripts(".concat(JSON.stringify(e),");"))),t.call(this,e,r)}return n}(Object(u.a)(Worker));return{blob:function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e,r){Object(A.a)(this,n);var i=window.URL.createObjectURL(e);return t.call(this,i,r)}return Object(a.a)(n,null,[{key:"fromText",value:function(e,t){return new n(new window.Blob([e],{type:"text/javascript"}),t)}}]),n}(e),default:e}}()),l}function p(){var e="undefined"!==typeof self&&"undefined"!==typeof Window&&self instanceof Window;return!("undefined"===typeof self||!self.postMessage||e)}var v,y=n(9),m=n.n(y),I=n(22),b=n(171),E=n.n(b),C=n(468),B=n(932),w=n(255);function Q(e){return Promise.all(e.map((function(e){var t=Promise.resolve(e);try{return t.then((function(e){return{status:"fulfilled",value:e}}),(function(e){return{status:"rejected",reason:e}}))}catch(n){return Promise.reject(n)}})))}!function(e){e.initialized="initialized",e.taskCanceled="taskCanceled",e.taskCompleted="taskCompleted",e.taskFailed="taskFailed",e.taskQueued="taskQueued",e.taskQueueDrained="taskQueueDrained",e.taskStart="taskStart",e.terminated="terminated"}(v||(v={}));var k=n(113);function _(e){throw Error(e)}var x={errors:function(e){return e[k.a]||_("Error observable not found. Make sure to pass a thread instance as returned by the spawn() promise.")},events:function(e){return e[k.b]||_("Events observable not found. Make sure to pass a thread instance as returned by the spawn() promise.")},terminate:function(e){return e[k.c]()}},S=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},O=1;function D(e){return new Promise((function(t){return setTimeout(t,e)}))}function R(e,t){return e.reduce((function(e,n){return[].concat(Object(I.a)(e),Object(I.a)(t(n)))}),[])}var j=function(){function e(t,n){var r=this;Object(A.a)(this,e),this.eventSubject=new C.a,this.initErrors=[],this.isClosing=!1,this.nextTaskID=1,this.taskQueue=[];var i="number"===typeof n?{size:n}:n||{},a=i.size,o=void 0===a?f:a;this.debug=E()("threads:pool:".concat((i.name||String(O++)).replace(/\W/g," ").trim().replace(/\s+/g,"-"))),this.options=i,this.workers=function(e,t){return function(e){for(var t=[],n=0;n<e;n++)t.push(n);return t}(t).map((function(){return{init:e(),runningTasks:[]}}))}(t,o),this.eventObservable=Object(B.a)(w.a.from(this.eventSubject)),Promise.all(this.workers.map((function(e){return e.init}))).then((function(){return r.eventSubject.next({type:v.initialized,size:r.workers.length})}),(function(e){r.debug("Error while initializing pool worker:",e),r.eventSubject.error(e),r.initErrors.push(e)}))}return Object(a.a)(e,[{key:"findIdlingWorker",value:function(){var e=this.options.concurrency,t=void 0===e?1:e;return this.workers.find((function(e){return e.runningTasks.length<t}))}},{key:"runPoolTask",value:function(e,t){return S(this,void 0,void 0,m.a.mark((function n(){var r,i;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=this.workers.indexOf(e)+1,this.debug("Running task #".concat(t.id," on worker #").concat(r,"...")),this.eventSubject.next({type:v.taskStart,taskID:t.id,workerID:r}),n.prev=3,n.t0=t,n.next=7,e.init;case 7:return n.t1=n.sent,n.next=10,n.t0.run.call(n.t0,n.t1);case 10:i=n.sent,this.debug("Task #".concat(t.id," completed successfully")),this.eventSubject.next({type:v.taskCompleted,returnValue:i,taskID:t.id,workerID:r}),n.next=19;break;case 15:n.prev=15,n.t2=n.catch(3),this.debug("Task #".concat(t.id," failed")),this.eventSubject.next({type:v.taskFailed,taskID:t.id,error:n.t2,workerID:r});case 19:case"end":return n.stop()}}),n,this,[[3,15]])})))}},{key:"run",value:function(e,t){return S(this,void 0,void 0,m.a.mark((function n(){var r,i=this;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=S(i,void 0,void 0,m.a.mark((function n(){var i;return m.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=function(){e.runningTasks=e.runningTasks.filter((function(e){return e!==r}))},n.next=3,D(0);case 3:return n.prev=3,n.next=6,this.runPoolTask(e,t);case 6:return n.prev=6,i(),this.isClosing||this.scheduleWork(),n.finish(6);case 10:case"end":return n.stop()}}),n,this,[[3,,6,10]])}))),e.runningTasks.push(r);case 2:case"end":return n.stop()}}),n)})))}},{key:"scheduleWork",value:function(){this.debug("Attempt de-queueing a task in order to run it...");var e=this.findIdlingWorker();if(e){var t=this.taskQueue.shift();if(!t)return this.debug("Task queue is empty"),void this.eventSubject.next({type:v.taskQueueDrained});this.run(e,t)}}},{key:"taskCompletion",value:function(e){var t=this;return new Promise((function(n,r){var i=t.events().subscribe((function(t){t.type===v.taskCompleted&&t.taskID===e?(i.unsubscribe(),n(t.returnValue)):t.type===v.taskFailed&&t.taskID===e?(i.unsubscribe(),r(t.error)):t.type===v.terminated&&(i.unsubscribe(),r(Error("Pool has been terminated before task was run.")))}))}))}},{key:"settled",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return S(this,void 0,void 0,m.a.mark((function t(){var n,r,i,a=this;return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(){return R(a.workers,(function(e){return e.runningTasks}))},r=[],i=this.eventObservable.subscribe((function(e){e.type===v.taskFailed&&r.push(e.error)})),!(this.initErrors.length>0)){t.next=5;break}return t.abrupt("return",Promise.reject(this.initErrors[0]));case 5:if(!e||0!==this.taskQueue.length){t.next=9;break}return t.next=8,Q(n());case 8:return t.abrupt("return",r);case 9:return t.next=11,new Promise((function(e,t){var n=a.eventObservable.subscribe({next:function(t){t.type===v.taskQueueDrained&&(n.unsubscribe(),e())},error:t})}));case 11:return t.next=13,Q(n());case 13:return i.unsubscribe(),t.abrupt("return",r);case 15:case"end":return t.stop()}}),t,this)})))}},{key:"completed",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return S(this,void 0,void 0,m.a.mark((function t(){var n,r,i,a=this;return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.settled(e),r=new Promise((function(e,t){var r=a.eventObservable.subscribe({next:function(i){i.type===v.taskQueueDrained?(r.unsubscribe(),e(n)):i.type===v.taskFailed&&(r.unsubscribe(),t(i.error))},error:t})})),t.next=4,Promise.race([n,r]);case 4:if(!((i=t.sent).length>0)){t.next=7;break}throw i[0];case 7:case"end":return t.stop()}}),t,this)})))}},{key:"events",value:function(){return this.eventObservable}},{key:"queue",value:function(e){var t=this,n=this.options.maxQueuedJobs,r=void 0===n?1/0:n;if(this.isClosing)throw Error("Cannot schedule pool tasks after terminate() has been called.");if(this.initErrors.length>0)throw this.initErrors[0];var i=this.nextTaskID++,a=this.taskCompletion(i);a.catch((function(e){t.debug("Task #".concat(i," errored:"),e)}));var o={id:i,run:e,cancel:function(){-1!==t.taskQueue.indexOf(o)&&(t.taskQueue=t.taskQueue.filter((function(e){return e!==o})),t.eventSubject.next({type:v.taskCanceled,taskID:o.id}))},then:a.then.bind(a)};if(this.taskQueue.length>=r)throw Error("Maximum number of pool tasks queued. Refusing to queue another one.\nThis usually happens for one of two reasons: We are either at peak workload right now or some tasks just won't finish, thus blocking the pool.");return this.debug("Queueing task #".concat(o.id,"...")),this.taskQueue.push(o),this.eventSubject.next({type:v.taskQueued,taskID:o.id}),this.scheduleWork(),o}},{key:"terminate",value:function(e){return S(this,void 0,void 0,m.a.mark((function t(){var n=this;return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.isClosing=!0,e){t.next=4;break}return t.next=4,this.completed(!0);case 4:return this.eventSubject.next({type:v.terminated,remainingQueue:Object(I.a)(this.taskQueue)}),this.eventSubject.complete(),t.next=8,Promise.all(this.workers.map((function(e){return S(n,void 0,void 0,m.a.mark((function t(){return m.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=x,t.next=3,e.init;case 3:return t.t1=t.sent,t.abrupt("return",t.t0.terminate.call(t.t0,t.t1));case 5:case"end":return t.stop()}}),t)})))})));case 8:case"end":return t.stop()}}),t,this)})))}}]),e}();function M(e,t){return new j(e,t)}j.EventType=v,M.EventType=v;var N=M,F=n(427),T=d().blob,L=d().default,P=n(428),U=n(248),G=n(165);n.d(t,"registerSerializer",(function(){return i.b})),n.d(t,"Pool",(function(){return N})),n.d(t,"spawn",(function(){return F.a})),n.d(t,"Thread",(function(){return x})),n.d(t,"isWorkerRuntime",(function(){return p})),n.d(t,"BlobWorker",(function(){return T})),n.d(t,"Worker",(function(){return L})),n.d(t,"expose",(function(){return P.a})),n.d(t,"DefaultSerializer",(function(){return U.a})),n.d(t,"Transfer",(function(){return G.a}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(11),i=n(13),a=n(14),o=n(15),s=n(39),u=n(322),A=n(270),c=n(74),l=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"_renderAxisTopLayers",value:function(){var e=this.props,t=e.axisTopLabelData,n=e.matrixLeft,r=e.width,i=e.matrixWidth,a=e.viewWidth,o=e.theme,u=e.targetX,l=e.targetY,f=e.axisTopTitle,h=e.cellWidth,g=e.axisOffsetTop,d=e.scaleFactor,p=h>=c.b,v=l+(g-c.c)/2/d;return[new A.a({id:"axisTopLabels",coordinateSystem:s.a.CARTESIAN,data:t,getText:function(e){return e[1]},getPosition:function(e){return[n+(e[0]+.5)/r*i,v]},getTextAnchor:"start",getColor:function(){return c.k[o]},getSize:p?c.b:0,getAngle:75,fontFamily:c.a,updateTriggers:{getPosition:[v,n,i,a],getSize:[p],getColor:[o]}}),new A.a({id:"axisTopTitle",coordinateSystem:s.a.CARTESIAN,data:[{title:f}],getText:function(e){return e.title},getPosition:[u,l],getTextAnchor:"middle",getColor:function(){return c.k[o]},getSize:p?0:c.f,getAngle:0,fontFamily:c.a,updateTriggers:{getSize:[p],getColor:[o]}})]}},{key:"_renderAxisLeftLayers",value:function(){var e=this.props,t=e.axisLeftLabelData,n=e.matrixTop,r=e.height,i=e.matrixHeight,a=e.viewHeight,o=e.theme,u=e.axisLeftTitle,l=e.targetX,f=e.targetY,h=e.cellHeight,g=e.axisOffsetLeft,d=e.scaleFactor,p=h>=c.b,v=l+(g-c.c)/2/d;return[new A.a({id:"axisLeftLabels",coordinateSystem:s.a.CARTESIAN,data:t,getText:function(e){return e[1]},getPosition:function(e){return[v,n+(e[0]+.5)/r*i]},getTextAnchor:"end",getColor:function(){return c.k[o]},getSize:p?c.b:0,getAngle:0,fontFamily:c.a,updateTriggers:{getPosition:[v,n,i,a],getSize:[p],getColor:[o]}}),new A.a({id:"axisLeftTitle",coordinateSystem:s.a.CARTESIAN,data:[{title:u}],getText:function(e){return e.title},getPosition:[l,f],getTextAnchor:"middle",getColor:function(){return c.k[o]},getSize:p?0:c.f,getAngle:90,fontFamily:c.a,updateTriggers:{getSize:[p],getColor:[o]}})]}},{key:"renderLayers",value:function(){return[this._renderAxisTopLayers(),this._renderAxisLeftLayers()]}}]),n}(u.a);l.layerName="HeatmapCompositeTextLayer"},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(11),i=n(13),a=n(14),o=n(15),s=n(373),u=n(179),A=n(74),c=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"loadTexture",value:function(e){var t=this.context.gl;this.state.bitmapTexture&&this.state.bitmapTexture.delete(),e instanceof u.a?this.setState({bitmapTexture:e}):e&&this.setState({bitmapTexture:new u.a(t,{data:e,parameters:A.j})})}}]),n}(s.a);c.layerName="PixelatedBitmapLayer",c.defaultProps={image:{type:"object",value:null,async:!0},bounds:{type:"array",value:[1,0,0,1],compare:!0},desaturate:{type:"number",min:0,max:1,value:0},transparentColor:{type:"color",value:[0,0,0,0]},tintColor:{type:"color",value:[255,255,255]}}},function(e,t,n){"use strict";var r=n(11),i=n(13),a=n(14),o=n(15),s=n(148),u=n(290),A=n(412),c=n(411),l=n(373),f=n(179),h=n(74);n.d(t,"a",(function(){return g}));var g=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"_getShaders",value:function(e){var t=this;return this.props.extensions.forEach((function(n){e=Object(u.a)(e,n.getShaders.call(t,n))})),e}},{key:"getShaders",value:function(){var e=this.props.colormap;return this._getShaders({vs:"\n#define SHADER_NAME heatmap-bitmap-layer-vertex-shader\n\nattribute vec2 texCoords;\nattribute vec3 positions;\nattribute vec3 positions64Low;\n\nvarying vec2 vTexCoord;\n\nconst vec3 pickingColor = vec3(1.0, 0.0, 0.0);\n\nvoid main(void) {\n  geometry.worldPosition = positions;\n  geometry.uv = texCoords;\n  geometry.pickingColor = pickingColor;\n\n  gl_Position = project_position_to_clipspace(positions, positions64Low, vec3(0.0), geometry.position);\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  vTexCoord = texCoords;\n\n  vec4 color = vec4(0.0);\n  DECKGL_FILTER_COLOR(color, geometry);\n}\n",fs:"\n#define SHADER_NAME heatmap-bitmap-layer-fragment-shader\n\n#ifdef GL_ES\nprecision mediump float;\n#endif\n\nvec4 rdbu (float x_354677415) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.0196078431372549,0.0392156862745098,0.6745098039215687,1);\n  const float e1 = 0.35;\n  const vec4 v1 = vec4(0.41568627450980394,0.5372549019607843,0.9686274509803922,1);\n  const float e2 = 0.5;\n  const vec4 v2 = vec4(0.7450980392156863,0.7450980392156863,0.7450980392156863,1);\n  const float e3 = 0.6;\n  const vec4 v3 = vec4(0.8627450980392157,0.6666666666666666,0.5176470588235295,1);\n  const float e4 = 0.7;\n  const vec4 v4 = vec4(0.9019607843137255,0.5686274509803921,0.35294117647058826,1);\n  const float e5 = 1.0;\n  const vec4 v5 = vec4(0.6980392156862745,0.0392156862745098,0.10980392156862745,1);\n  float a0 = smoothstep(e0,e1,x_354677415);\n  float a1 = smoothstep(e1,e2,x_354677415);\n  float a2 = smoothstep(e2,e3,x_354677415);\n  float a3 = smoothstep(e3,e4,x_354677415);\n  float a4 = smoothstep(e4,e5,x_354677415);\n  return max(mix(v0,v1,a0)*step(e0,x_354677415)*step(x_354677415,e1),\n    max(mix(v1,v2,a1)*step(e1,x_354677415)*step(x_354677415,e2),\n    max(mix(v2,v3,a2)*step(e2,x_354677415)*step(x_354677415,e3),\n    max(mix(v3,v4,a3)*step(e3,x_354677415)*step(x_354677415,e4),mix(v4,v5,a4)*step(e4,x_354677415)*step(x_354677415,e5)\n  ))));\n}\n\nvec4 jet (float x_3419531890) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.5137254901960784,1);\n  const float e1 = 0.125;\n  const vec4 v1 = vec4(0,0.23529411764705882,0.6666666666666666,1);\n  const float e2 = 0.375;\n  const vec4 v2 = vec4(0.0196078431372549,1,1,1);\n  const float e3 = 0.625;\n  const vec4 v3 = vec4(1,1,0,1);\n  const float e4 = 0.875;\n  const vec4 v4 = vec4(0.9803921568627451,0,0,1);\n  const float e5 = 1.0;\n  const vec4 v5 = vec4(0.5019607843137255,0,0,1);\n  float a0 = smoothstep(e0,e1,x_3419531890);\n  float a1 = smoothstep(e1,e2,x_3419531890);\n  float a2 = smoothstep(e2,e3,x_3419531890);\n  float a3 = smoothstep(e3,e4,x_3419531890);\n  float a4 = smoothstep(e4,e5,x_3419531890);\n  return max(mix(v0,v1,a0)*step(e0,x_3419531890)*step(x_3419531890,e1),\n    max(mix(v1,v2,a1)*step(e1,x_3419531890)*step(x_3419531890,e2),\n    max(mix(v2,v3,a2)*step(e2,x_3419531890)*step(x_3419531890,e3),\n    max(mix(v3,v4,a3)*step(e3,x_3419531890)*step(x_3419531890,e4),mix(v4,v5,a4)*step(e4,x_3419531890)*step(x_3419531890,e5)\n  ))));\n}\n\nvec4 viridis (float x_98747489) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.26666666666666666,0.00392156862745098,0.32941176470588235,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.2784313725490196,0.17254901960784313,0.47843137254901963,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.23137254901960785,0.3176470588235294,0.5450980392156862,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.17254901960784313,0.44313725490196076,0.5568627450980392,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.12941176470588237,0.5647058823529412,0.5529411764705883,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.15294117647058825,0.6784313725490196,0.5058823529411764,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.3607843137254902,0.7843137254901961,0.38823529411764707,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.6666666666666666,0.8627450980392157,0.19607843137254902,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9921568627450981,0.9058823529411765,0.1450980392156863,1);\n  float a0 = smoothstep(e0,e1,x_98747489);\n  float a1 = smoothstep(e1,e2,x_98747489);\n  float a2 = smoothstep(e2,e3,x_98747489);\n  float a3 = smoothstep(e3,e4,x_98747489);\n  float a4 = smoothstep(e4,e5,x_98747489);\n  float a5 = smoothstep(e5,e6,x_98747489);\n  float a6 = smoothstep(e6,e7,x_98747489);\n  float a7 = smoothstep(e7,e8,x_98747489);\n  return max(mix(v0,v1,a0)*step(e0,x_98747489)*step(x_98747489,e1),\n    max(mix(v1,v2,a1)*step(e1,x_98747489)*step(x_98747489,e2),\n    max(mix(v2,v3,a2)*step(e2,x_98747489)*step(x_98747489,e3),\n    max(mix(v3,v4,a3)*step(e3,x_98747489)*step(x_98747489,e4),\n    max(mix(v4,v5,a4)*step(e4,x_98747489)*step(x_98747489,e5),\n    max(mix(v5,v6,a5)*step(e5,x_98747489)*step(x_98747489,e6),\n    max(mix(v6,v7,a6)*step(e6,x_98747489)*step(x_98747489,e7),mix(v7,v8,a7)*step(e7,x_98747489)*step(x_98747489,e8)\n  )))))));\n}\n\nvec4 inferno (float x_2396186301) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.12156862745098039,0.047058823529411764,0.2823529411764706,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.3333333333333333,0.058823529411764705,0.42745098039215684,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.5333333333333333,0.13333333333333333,0.41568627450980394,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.7294117647058823,0.21176470588235294,0.3333333333333333,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8901960784313725,0.34901960784313724,0.2,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.9764705882352941,0.5490196078431373,0.0392156862745098,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9764705882352941,0.788235294117647,0.19607843137254902,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9882352941176471,1,0.6431372549019608,1);\n  float a0 = smoothstep(e0,e1,x_2396186301);\n  float a1 = smoothstep(e1,e2,x_2396186301);\n  float a2 = smoothstep(e2,e3,x_2396186301);\n  float a3 = smoothstep(e3,e4,x_2396186301);\n  float a4 = smoothstep(e4,e5,x_2396186301);\n  float a5 = smoothstep(e5,e6,x_2396186301);\n  float a6 = smoothstep(e6,e7,x_2396186301);\n  float a7 = smoothstep(e7,e8,x_2396186301);\n  return max(mix(v0,v1,a0)*step(e0,x_2396186301)*step(x_2396186301,e1),\n    max(mix(v1,v2,a1)*step(e1,x_2396186301)*step(x_2396186301,e2),\n    max(mix(v2,v3,a2)*step(e2,x_2396186301)*step(x_2396186301,e3),\n    max(mix(v3,v4,a3)*step(e3,x_2396186301)*step(x_2396186301,e4),\n    max(mix(v4,v5,a4)*step(e4,x_2396186301)*step(x_2396186301,e5),\n    max(mix(v5,v6,a5)*step(e5,x_2396186301)*step(x_2396186301,e6),\n    max(mix(v6,v7,a6)*step(e6,x_2396186301)*step(x_2396186301,e7),mix(v7,v8,a7)*step(e7,x_2396186301)*step(x_2396186301,e8)\n  )))))));\n}\n\nvec4 magma (float x_4140671788) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.10980392156862745,0.06274509803921569,0.26666666666666666,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.30980392156862746,0.07058823529411765,0.4823529411764706,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.5058823529411764,0.1450980392156863,0.5058823529411764,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.7098039215686275,0.21176470588235294,0.47843137254901963,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8980392156862745,0.3137254901960784,0.39215686274509803,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.984313725490196,0.5294117647058824,0.3803921568627451,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.996078431372549,0.7607843137254902,0.5294117647058824,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9882352941176471,0.9921568627450981,0.7490196078431373,1);\n  float a0 = smoothstep(e0,e1,x_4140671788);\n  float a1 = smoothstep(e1,e2,x_4140671788);\n  float a2 = smoothstep(e2,e3,x_4140671788);\n  float a3 = smoothstep(e3,e4,x_4140671788);\n  float a4 = smoothstep(e4,e5,x_4140671788);\n  float a5 = smoothstep(e5,e6,x_4140671788);\n  float a6 = smoothstep(e6,e7,x_4140671788);\n  float a7 = smoothstep(e7,e8,x_4140671788);\n  return max(mix(v0,v1,a0)*step(e0,x_4140671788)*step(x_4140671788,e1),\n    max(mix(v1,v2,a1)*step(e1,x_4140671788)*step(x_4140671788,e2),\n    max(mix(v2,v3,a2)*step(e2,x_4140671788)*step(x_4140671788,e3),\n    max(mix(v3,v4,a3)*step(e3,x_4140671788)*step(x_4140671788,e4),\n    max(mix(v4,v5,a4)*step(e4,x_4140671788)*step(x_4140671788,e5),\n    max(mix(v5,v6,a5)*step(e5,x_4140671788)*step(x_4140671788,e6),\n    max(mix(v6,v7,a6)*step(e6,x_4140671788)*step(x_4140671788,e7),mix(v7,v8,a7)*step(e7,x_4140671788)*step(x_4140671788,e8)\n  )))))));\n}\n\nvec4 plasma (float x_1580529385) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.050980392156862744,0.03137254901960784,0.5294117647058824,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.29411764705882354,0.011764705882352941,0.6313725490196078,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.49019607843137253,0.011764705882352941,0.6588235294117647,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.6588235294117647,0.13333333333333333,0.5882352941176471,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.796078431372549,0.27450980392156865,0.4745098039215686,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8980392156862745,0.4196078431372549,0.36470588235294116,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.9725490196078431,0.5803921568627451,0.2549019607843137,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9921568627450981,0.7647058823529411,0.1568627450980392,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9411764705882353,0.9764705882352941,0.12941176470588237,1);\n  float a0 = smoothstep(e0,e1,x_1580529385);\n  float a1 = smoothstep(e1,e2,x_1580529385);\n  float a2 = smoothstep(e2,e3,x_1580529385);\n  float a3 = smoothstep(e3,e4,x_1580529385);\n  float a4 = smoothstep(e4,e5,x_1580529385);\n  float a5 = smoothstep(e5,e6,x_1580529385);\n  float a6 = smoothstep(e6,e7,x_1580529385);\n  float a7 = smoothstep(e7,e8,x_1580529385);\n  return max(mix(v0,v1,a0)*step(e0,x_1580529385)*step(x_1580529385,e1),\n    max(mix(v1,v2,a1)*step(e1,x_1580529385)*step(x_1580529385,e2),\n    max(mix(v2,v3,a2)*step(e2,x_1580529385)*step(x_1580529385,e3),\n    max(mix(v3,v4,a3)*step(e3,x_1580529385)*step(x_1580529385,e4),\n    max(mix(v4,v5,a4)*step(e4,x_1580529385)*step(x_1580529385,e5),\n    max(mix(v5,v6,a5)*step(e5,x_1580529385)*step(x_1580529385,e6),\n    max(mix(v6,v7,a6)*step(e6,x_1580529385)*step(x_1580529385,e7),mix(v7,v8,a7)*step(e7,x_1580529385)*step(x_1580529385,e8)\n  )))))));\n}\n\n// The texture (GL.LUMINANCE & Uint8Array).\nuniform sampler2D uBitmapTexture;\n\n// What are the dimensions of the texture (width, height)?\nuniform vec2 uTextureSize;\n\n// How many consecutive pixels should be aggregated together along each axis?\nuniform vec2 uAggSize;\n\n// What are the values of the color scale sliders?\nuniform vec2 uColorScaleRange;\n\n// The texture coordinate, varying (interpolated between values set by the vertex shader).\nvarying vec2 vTexCoord;\n\nvoid main(void) {\n  // Compute 1 pixel in texture coordinates\n  vec2 onePixel = vec2(1.0, 1.0) / uTextureSize;\n  \n  vec2 viewCoord = vec2(floor(vTexCoord.x * uTextureSize.x), floor(vTexCoord.y * uTextureSize.y));\n\n  // Compute (x % aggSizeX, y % aggSizeY).\n  // These values will be the number of values to the left / above the current position to consider.\n  vec2 modAggSize = vec2(-1.0 * mod(viewCoord.x, uAggSize.x), -1.0 * mod(viewCoord.y, uAggSize.y));\n\n  // Take the sum of values along each axis.\n  float intensitySum = 0.0;\n  vec2 offsetPixels = vec2(0.0, 0.0);\n\n  for(int i = 0; i < 16; i++) {\n    // Check to break outer loop early.\n    // Uniforms cannot be used as conditions in GLSL for loops.\n    if(float(i) >= uAggSize.y) {\n      // Done in the y direction.\n      break;\n    }\n\n    offsetPixels = vec2(offsetPixels.x, (modAggSize.y + float(i)) * onePixel.y);\n\n    for(int j = 0; j < 16; j++) {\n      // Check to break inner loop early.\n      // Uniforms cannot be used as conditions in GLSL for loops.\n      if(float(j) >= uAggSize.x) {\n        // Done in the x direction.\n        break;\n      }\n\n      offsetPixels = vec2((modAggSize.x + float(j)) * onePixel.x, offsetPixels.y);\n      intensitySum += texture2D(uBitmapTexture, vTexCoord + offsetPixels).r;\n    }\n  }\n  \n  // Compute the mean value.\n  float intensityMean = intensitySum / (uAggSize.x * uAggSize.y);\n  \n  // Re-scale using the color scale slider values.\n  float scaledIntensityMean = (intensityMean - uColorScaleRange[0]) / max(0.005, (uColorScaleRange[1] - uColorScaleRange[0]));\n\n  gl_FragColor = __colormap(clamp(scaledIntensityMean, 0.0, 1.0));\n\n  geometry.uv = vTexCoord;\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n".replace("__colormap",e),modules:[A.a,c.a]})}},{key:"draw",value:function(e){var t=e.uniforms,n=this.state,r=n.bitmapTexture,i=n.model,a=this.props,o=a.aggSizeX,s=a.aggSizeY,u=a.colorScaleLo,A=a.colorScaleHi;r&&i&&i.setUniforms(Object.assign({},t,{uBitmapTexture:r,uTextureSize:[h.l,h.l],uAggSize:[o,s],uColorScaleRange:[u,A]})).draw()}},{key:"loadTexture",value:function(e){var t=this.context.gl;this.state.bitmapTexture&&this.state.bitmapTexture.delete(),e instanceof f.a?this.setState({bitmapTexture:e}):e&&this.setState({bitmapTexture:new f.a(t,{data:e,mipmaps:!1,parameters:h.j,format:s.default.LUMINANCE,dataFormat:s.default.LUMINANCE,type:s.default.UNSIGNED_BYTE,width:h.l,height:h.l})})}}]),n}(l.a);g.layerName="HeatmapBitmapLayer",g.defaultProps={image:{type:"object",value:null,async:!0},colormap:{type:"string",value:"plasma",compare:!0},bounds:{type:"array",value:[1,0,0,1],compare:!0},aggSizeX:{type:"number",value:8,compare:!0},aggSizeY:{type:"number",value:8,compare:!0},colorScaleLo:{type:"number",value:0,compare:!0},colorScaleHi:{type:"number",value:1,compare:!0}}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(1023),a=(r=i)&&r.__esModule?r:{default:r};t.default=function(){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),(0,a.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(1024),a=(r=i)&&r.__esModule?r:{default:r};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"===typeof t?"undefined":(0,a.default)(t))&&"function"!==typeof t?e:t}},function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(1171)),i=o(n(1175)),a=o(n(1024));function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof t?"undefined":(0,a.default)(t)));e.prototype=(0,i.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(21);function i(e,t,n,i){var a="See luma.gl ".concat(n," Upgrade Guide at https://luma.gl/docs/upgrade-guide"),o=Object.getPrototypeOf(e);i.forEach((function(e){o.methodName||(o[e]=function(){throw r.h.removed("Calling removed method ".concat(t,".").concat(e,": "),a)(),new Error(e)})}))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return u}));var r=n(359),i=n(21),a=n(51);function o(e,t){return s(e,t)}function s(e,t){return(t=Array.isArray(t)?t:[t]).every((function(t){return A(e,t)}))}function u(e){for(var t in e.luma=e.luma||{},e.luma.caps=e.luma.caps||{},r.b)void 0===e.luma.caps[t]&&(e.luma.caps[t]=A(e,t));return e.luma.caps}function A(e,t){return e.luma=e.luma||{},e.luma.caps=e.luma.caps||{},void 0===e.luma.caps[t]&&(e.luma.caps[t]=function(e,t){var n,o=r.b[t];Object(a.a)(o,t);var s=Object(i.g)(e)&&o[1]||o[0];if("function"===typeof s)n=s(e);else if(Array.isArray(s)){n=!0;var u=!0,A=!1,c=void 0;try{for(var l,f=s[Symbol.iterator]();!(u=(l=f.next()).done);u=!0){var h=l.value;n=n&&Boolean(e.getExtension(h))}}catch(g){A=!0,c=g}finally{try{u||null==f.return||f.return()}finally{if(A)throw c}}}else"string"===typeof s?n=Boolean(e.getExtension(s)):"boolean"===typeof s?n=s:Object(a.a)(!1);return n}(e,t)),e.luma.caps[t]||i.h.log(2,"Feature: ".concat(t," not supported"))(),e.luma.caps[t]}},function(e,t,n){"use strict";var r={pickingSelectedColor:null,pickingHighlightColor:new Uint8Array([0,255,255,255]),pickingActive:!1,pickingAttribute:!1};t.a={name:"picking",vs:"uniform bool picking_uActive;\nuniform bool picking_uAttribute;\nuniform vec3 picking_uSelectedColor;\nuniform bool picking_uSelectedColorValid;\n\nout vec4 picking_vRGBcolor_Avalid;\n\nconst float COLOR_SCALE = 1. / 255.;\n\nbool picking_isColorValid(vec3 color) {\n  return dot(color, vec3(1.0)) > 0.001;\n}\n\nbool isVertexPicked(vec3 vertexColor) {\n  return\n    picking_uSelectedColorValid &&\n    !picking_isColorValid(abs(vertexColor - picking_uSelectedColor));\n}\n\nvoid picking_setPickingColor(vec3 pickingColor) {\n  if (picking_uActive) {\n    picking_vRGBcolor_Avalid.a = float(picking_isColorValid(pickingColor));\n\n    if (!picking_uAttribute) {\n      picking_vRGBcolor_Avalid.rgb = pickingColor * COLOR_SCALE;\n    }\n  } else {\n    picking_vRGBcolor_Avalid.a = float(isVertexPicked(pickingColor));\n  }\n}\n\nvoid picking_setPickingAttribute(float value) {\n  if (picking_uAttribute) {\n    picking_vRGBcolor_Avalid.r = value;\n  }\n}\nvoid picking_setPickingAttribute(vec2 value) {\n  if (picking_uAttribute) {\n    picking_vRGBcolor_Avalid.rg = value;\n  }\n}\nvoid picking_setPickingAttribute(vec3 value) {\n  if (picking_uAttribute) {\n    picking_vRGBcolor_Avalid.rgb = value;\n  }\n}\n",fs:"uniform bool picking_uActive;\nuniform vec3 picking_uSelectedColor;\nuniform vec4 picking_uHighlightColor;\n\nin vec4 picking_vRGBcolor_Avalid;\nvec4 picking_filterHighlightColor(vec4 color) {\n  if (picking_uActive) {\n    return color;\n  }\n  bool selected = bool(picking_vRGBcolor_Avalid.a);\n\n  if (selected) {\n    float highLightAlpha = picking_uHighlightColor.a;\n    float blendedAlpha = highLightAlpha + color.a * (1.0 - highLightAlpha);\n    float highLightRatio = highLightAlpha / blendedAlpha;\n\n    vec3 blendedRGB = mix(color.rgb, picking_uHighlightColor.rgb, highLightRatio);\n    return vec4(blendedRGB, blendedAlpha);\n  } else {\n    return color;\n  }\n}\nvec4 picking_filterPickingColor(vec4 color) {\n  if (picking_uActive) {\n    if (picking_vRGBcolor_Avalid.a == 0.0) {\n      discard;\n    }\n    return picking_vRGBcolor_Avalid;\n  }\n  return color;\n}\nvec4 picking_filterColor(vec4 color) {\n  vec4 highightColor = picking_filterHighlightColor(color);\n  return picking_filterPickingColor(highightColor);\n}\n\n",getUniforms:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,t={};if(void 0!==e.pickingSelectedColor)if(e.pickingSelectedColor){var n=e.pickingSelectedColor.slice(0,3);t.picking_uSelectedColorValid=1,t.picking_uSelectedColor=n}else t.picking_uSelectedColorValid=0;if(e.pickingHighlightColor){var i=Array.from(e.pickingHighlightColor,(function(e){return e/255}));Number.isFinite(i[3])||(i[3]=1),t.picking_uHighlightColor=i}return void 0!==e.pickingActive&&(t.picking_uActive=Boolean(e.pickingActive),t.picking_uAttribute=Boolean(e.pickingAttribute)),t}}},function(e,t,n){"use strict";var r=n(25),i=n(23),a=n(1),o=n(3),s=n(2),u=n(301),A="undefined"!==typeof __VERSION__?__VERSION__:"untranspiled source",c=Object(u.a)();function l(e){try{var t=window[e],n="__storage_test__";return t.setItem(n,n),t.removeItem(n),t}catch(r){return null}}var f=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sessionStorage";Object(o.a)(this,e),this.storage=l(r),this.id=t,this.config={},Object.assign(this.config,n),this._loadConfiguration()}return Object(s.a)(e,[{key:"getConfiguration",value:function(){return this.config}},{key:"setConfiguration",value:function(e){return this.config={},this.updateConfiguration(e)}},{key:"updateConfiguration",value:function(e){if(Object.assign(this.config,e),this.storage){var t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}return this}},{key:"_loadConfiguration",value:function(){var e={};if(this.storage){var t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}]),e}();function h(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:600,i=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>r&&(n=Math.min(n,r/e.width));var a=e.width*n,o=e.height*n,s=["font-size:1px;","padding:".concat(Math.floor(o/2),"px ").concat(Math.floor(a/2),"px;"),"line-height:".concat(o,"px;"),"background:url(".concat(i,");"),"background-size:".concat(a,"px ").concat(o,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),s]}var g={BLACK:30,RED:31,GREEN:32,YELLOW:33,BLUE:34,MAGENTA:35,CYAN:36,WHITE:37,BRIGHT_BLACK:90,BRIGHT_RED:91,BRIGHT_GREEN:92,BRIGHT_YELLOW:93,BRIGHT_BLUE:94,BRIGHT_MAGENTA:95,BRIGHT_CYAN:96,BRIGHT_WHITE:97};function d(e){return"string"===typeof e?g[e.toUpperCase()]||g.WHITE:e}function p(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"===typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,i,a=!0,o=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["constructor"],r=Object.getPrototypeOf(e),i=Object.getOwnPropertyNames(r),a=p(i);try{var o=function(){var r=t.value;"function"===typeof e[r]&&(n.find((function(e){return r===e}))||(e[r]=e[r].bind(e)))};for(a.s();!(t=a.n()).done;)o()}catch(s){a.e(s)}finally{a.f()}}function m(e,t){if(!e)throw new Error(t||"Assertion failed")}var I=n(116);function b(){var e;if(c&&I.b.performance)e=I.b.performance.now();else if(I.a.hrtime){var t=I.a.hrtime();e=1e3*t[0]+t[1]/1e6}else e=Date.now();return e}n.d(t,"a",(function(){return _}));var E={debug:c&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},C={enabled:!0,level:0};function B(){}var w={},Q={once:!0};function k(e){for(var t in e)for(var n in e[t])return n||"untitled";return"empty"}var _=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id;Object(o.a)(this,e),this.id=n,this.VERSION=A,this._startTs=b(),this._deltaTs=b(),this.LOG_THROTTLE_TIMEOUT=0,this._storage=new f("__probe-".concat(this.id,"__"),C),this.userData={},this.timeStamp("".concat(this.id," started")),y(this),Object.seal(this)}return Object(s.a)(e,[{key:"isEnabled",value:function(){return this._storage.config.enabled}},{key:"getLevel",value:function(){return this._storage.config.level}},{key:"getTotal",value:function(){return Number((b()-this._startTs).toPrecision(10))}},{key:"getDelta",value:function(){return Number((b()-this._deltaTs).toPrecision(10))}},{key:"getPriority",value:function(){return this.level}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._storage.updateConfiguration({enabled:e}),this}},{key:"setLevel",value:function(e){return this._storage.updateConfiguration({level:e}),this}},{key:"assert",value:function(e,t){m(e,t)}},{key:"warn",value:function(e){return this._getLogFunction(0,e,E.warn,arguments,Q)}},{key:"error",value:function(e){return this._getLogFunction(0,e,E.error,arguments)}},{key:"deprecated",value:function(e,t){return this.warn("`".concat(e,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}},{key:"removed",value:function(e,t){return this.error("`".concat(e,"` has been removed. Use `").concat(t,"` instead"))}},{key:"probe",value:function(e,t){return this._getLogFunction(e,t,E.log,arguments,{time:!0,once:!0})}},{key:"log",value:function(e,t){return this._getLogFunction(e,t,E.debug,arguments)}},{key:"info",value:function(e,t){return this._getLogFunction(e,t,console.info,arguments)}},{key:"once",value:function(e,t){return this._getLogFunction(e,t,E.debug||E.info,arguments,Q)}},{key:"table",value:function(e,t,n){return t?this._getLogFunction(e,t,console.table||B,n&&[n],{tag:k(t)}):B}},{key:"image",value:function(e){var t=e.logLevel,r=e.priority,a=e.image,o=e.message,s=void 0===o?"":o,u=e.scale,A=void 0===u?1:u;return this._shouldLog(t||r)?c?function(e){var t=e.image,n=e.message,r=void 0===n?"":n,a=e.scale,o=void 0===a?1:a;if("string"===typeof t){var s=new Image;return s.onload=function(){var e,t=h(s,r,o);(e=console).log.apply(e,Object(i.a)(t))},s.src=t,B}var u=t.nodeName||"";if("img"===u.toLowerCase()){var A;return(A=console).log.apply(A,Object(i.a)(h(t,r,o))),B}if("canvas"===u.toLowerCase()){var c=new Image;return c.onload=function(){var e;return(e=console).log.apply(e,Object(i.a)(h(c,r,o)))},c.src=t.toDataURL(),B}return B}({image:a,message:s,scale:A}):function(e){var t=e.image,r=(e.message,e.scale),i=void 0===r?1:r,a=null;try{a=n(595)}catch(o){}if(a)return function(){return a(t,{fit:"box",width:"".concat(Math.round(80*i),"%")}).then((function(e){return console.log(e)}))};return B}({image:a,message:s,scale:A}):B}},{key:"settings",value:function(){console.table?console.table(this._storage.config):console.log(this._storage.config)}},{key:"get",value:function(e){return this._storage.config[e]}},{key:"set",value:function(e,t){this._storage.updateConfiguration(Object(a.a)({},e,t))}},{key:"time",value:function(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}},{key:"timeEnd",value:function(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}},{key:"timeStamp",value:function(e,t){return this._getLogFunction(e,t,console.timeStamp||B)}},{key:"group",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collapsed:!1},r=n=S({logLevel:e,message:t,opts:n}),i=r.collapsed;return n.method=(i?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}},{key:"groupCollapsed",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.group(e,t,Object.assign({},n,{collapsed:!0}))}},{key:"groupEnd",value:function(e){return this._getLogFunction(e,"",console.groupEnd||B)}},{key:"withGroup",value:function(e,t,n){this.group(e,t)();try{n()}finally{this.groupEnd(e)()}}},{key:"trace",value:function(){console.trace&&console.trace()}},{key:"_shouldLog",value:function(e){return this.isEnabled()&&this.getLevel()>=x(e)}},{key:"_getLogFunction",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4?arguments[4]:void 0;if(this._shouldLog(e)){var o;a=S({logLevel:e,message:t,args:r,opts:a}),m(n=n||a.method),a.total=this.getTotal(),a.delta=this.getDelta(),this._deltaTs=b();var s=a.tag||a.message;if(a.once){if(w[s])return B;w[s]=b()}return t=O(this.id,a.message,a),(o=n).bind.apply(o,[console,t].concat(Object(i.a)(a.args)))}return B}},{key:"level",set:function(e){this.setLevel(e)},get:function(){return this.getLevel()}},{key:"priority",set:function(e){this.level=e},get:function(){return this.level}}]),e}();function x(e){if(!e)return 0;var t;switch(Object(r.a)(e)){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return m(Number.isFinite(t)&&t>=0),t}function S(e){var t=e.logLevel,n=e.message;e.logLevel=x(t);for(var i=e.args?Array.from(e.args):[];i.length&&i.shift()!==n;);switch(e.args=i,Object(r.a)(t)){case"string":case"function":void 0!==n&&i.unshift(n),e.message=t;break;case"object":Object.assign(e,t)}"function"===typeof e.message&&(e.message=e.message());var a=Object(r.a)(e.message);return m("string"===a||"object"===a),Object.assign(e,e.opts)}function O(e,t,n){if("string"===typeof t){var r=n.time?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,n=Math.max(t-e.length,0);return"".concat(" ".repeat(n)).concat(e)}((s=n.total)<10?"".concat(s.toFixed(2),"ms"):s<100?"".concat(s.toFixed(1),"ms"):s<1e3?"".concat(s.toFixed(0),"ms"):"".concat((s/1e3).toFixed(2),"s")):"";t=n.time?"".concat(e,": ").concat(r,"  ").concat(t):"".concat(e,": ").concat(t),i=t,a=n.color,o=n.background,c||"string"!==typeof i||(a&&(a=d(a),i="\x1b[".concat(a,"m").concat(i,"\x1b[39m")),o&&(a=d(o),i="\x1b[".concat(o+10,"m").concat(i,"\x1b[49m"))),t=i}var i,a,o,s;return t}_.VERSION=A},function(e,t){e.exports=function(e){return e}},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(29),o=n(6),s=n(7),u=n(4),A=n(25),c=n(44),l=n(412),f=n(411),h=n(217),g=n(21),d=n(930),p=n(432),v=n(193),y=n(51),m=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r.a)(this,e);var n=t.id;this.id=n||Object(v.c)(this.constructor.name),this.display=!0,this.position=new p.c,this.rotation=new p.c,this.scale=new p.c(1,1,1),this.matrix=new p.a,this.userData={},this.props={},this._setScenegraphNodeProps(t)}return Object(i.a)(e,[{key:"delete",value:function(){}},{key:"setProps",value:function(e){return this._setScenegraphNodeProps(e),this}},{key:"toString",value:function(){return"{type: ScenegraphNode, id: ".concat(this.id,")}")}},{key:"setPosition",value:function(e){return Object(y.a)(3===e.length,"setPosition requires vector argument"),this.position=e,this}},{key:"setRotation",value:function(e){return Object(y.a)(3===e.length,"setRotation requires vector argument"),this.rotation=e,this}},{key:"setScale",value:function(e){return Object(y.a)(3===e.length,"setScale requires vector argument"),this.scale=e,this}},{key:"setMatrix",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t?this.matrix.copy(e):this.matrix=e}},{key:"setMatrixComponents",value:function(e){var t=e.position,n=e.rotation,r=e.scale,i=e.update,a=void 0===i||i;return t&&this.setPosition(t),n&&this.setRotation(n),r&&this.setScale(r),a&&this.updateMatrix(),this}},{key:"updateMatrix",value:function(){var e=this.position,t=this.rotation,n=this.scale;return this.matrix.identity(),this.matrix.translate(e),this.matrix.rotateXYZ(t),this.matrix.scale(n),this}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.position,n=e.rotation,r=e.scale;return t&&this.setPosition(t),n&&this.setRotation(n),r&&this.setScale(r),this.updateMatrix(),this}},{key:"getCoordinateUniforms",value:function(e,t){Object(y.a)(e),t=t||this.matrix;var n=new p.a(e).multiplyRight(t),r=n.invert(),i=r.transpose();return{viewMatrix:e,modelMatrix:t,objectMatrix:t,worldMatrix:n,worldInverseMatrix:r,worldInverseTransposeMatrix:i}}},{key:"_setScenegraphNodeProps",value:function(e){"display"in e&&(this.display=e.display),"position"in e&&this.setPosition(e.position),"rotation"in e&&this.setRotation(e.rotation),"scale"in e&&this.setScale(e.scale),"matrix"in e&&this.setMatrix(e.matrix),Object.assign(this.props,e)}}]),e}(),I=n(82),b=n(122),E=n(23),C=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r.a)(this,t);var i=n=Array.isArray(n)?{children:n}:n,a=i.children,o=void 0===a?[]:a;return g.h.assert(o.every((function(e){return e instanceof m})),"every child must an instance of ScenegraphNode"),(e=Object(s.a)(this,Object(u.a)(t).call(this,n))).children=o,e}return Object(o.a)(t,e),Object(i.a)(t,[{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var a=i[r];Array.isArray(a)?this.add.apply(this,Object(E.a)(a)):this.children.push(a)}return this}},{key:"remove",value:function(e){var t=this.children,n=t.indexOf(e);return n>-1&&t.splice(n,1),this}},{key:"removeAll",value:function(){return this.children=[],this}},{key:"delete",value:function(){this.children.forEach((function(e){return e.delete()})),this.removeAll(),Object(a.a)(Object(u.a)(t.prototype),"delete",this).call(this)}},{key:"traverse",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.worldMatrix,i=void 0===r?new p.a:r,a=new p.a(i).multiplyRight(this.matrix),o=!0,s=!1,u=void 0;try{for(var A,c=this.children[Symbol.iterator]();!(o=(A=c.next()).done);o=!0){var l=A.value;l instanceof t?l.traverse(e,{worldMatrix:a}):e(l,{worldMatrix:a})}}catch(f){s=!0,u=f}finally{try{o||null==c.return||c.return()}finally{if(s)throw u}}}}]),t}(m),B={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},w={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function Q(e){if(!e._animation){var t=w[e.componentType],n=B[e.type],r=n*e.count,i=e.bufferView.data,a=new t(i.buffer,i.byteOffset+(e.byteOffset||0),r);if(1===n)e._animation=Array.from(a);else{for(var o=[],s=0;s<a.length;s+=n)o.push(Array.from(a.slice(s,s+n)));e._animation=o}}return e._animation}var k=new p.a;var _=new p.b;function x(e,t,n,r){var i=t.input,a=t.interpolation,o=t.output,s=e%i[i.length-1],u=i.findIndex((function(e){return e>=s})),A=Math.max(0,u-1);if(!Array.isArray(n[r]))switch(r){case"translation":n[r]=[0,0,0];break;case"rotation":n[r]=[0,0,0,1];break;case"scale":n[r]=[1,1,1];break;default:g.h.warn("Bad animation path ".concat(r))()}Object(y.a)(n[r].length===o[A].length);var c=i[A],l=i[u];switch(a){case"STEP":!function(e,t,n){for(var r=0;r<n.length;r++)e[t][r]=n[r]}(n,r,o[A]);break;case"LINEAR":if(l>c){var f=(s-c)/(l-c);!function(e,t,n,r,i){if("rotation"===t){_.slerp({start:n,target:r,ratio:i});for(var a=0;a<_.length;a++)e[t][a]=_[a]}else for(var o=0;o<n.length;o++)e[t][o]=i*r[o]+(1-i)*n[o]}(n,r,o[A],o[u],f)}break;case"CUBICSPLINE":if(l>c){var h=(s-c)/(l-c),d=l-c;!function(e,t,n){for(var r=n.p0,i=n.outTangent0,a=n.inTangent1,o=n.p1,s=n.tDiff,u=n.ratio,A=0;A<e[t].length;A++){var c=i[A]*s,l=a[A]*s;e[t][A]=(2*Math.pow(u,3)-3*Math.pow(u,2)+1)*r[A]+(Math.pow(u,3)-2*Math.pow(u,2)+u)*c+(-2*Math.pow(u,3)+3*Math.pow(u,2))*o[A]+(Math.pow(u,3)-Math.pow(u,2))*l}}(n,r,{p0:o[3*A+1],outTangent0:o[3*A+2],inTangent1:o[3*u+0],p1:o[3*u+1],tDiff:d,ratio:h})}break;default:g.h.warn("Interpolation ".concat(a," not supported"))()}}var S=function(){function e(t){Object(r.a)(this,e),this.startTime=0,this.playing=!0,this.speed=1,Object.assign(this,t)}return Object(i.a)(e,[{key:"animate",value:function(e){if(this.playing){var t=(e/1e3-this.startTime)*this.speed;this.channels.forEach((function(e){var n=e.sampler,r=e.target,i=e.path;x(t,n,r,i),function(e,t){if(t.matrix.identity(),e.translation&&t.matrix.translate(e.translation),e.rotation){var n=k.fromQuaternion(e.rotation);t.matrix.multiplyRight(n)}e.scale&&t.matrix.scale(e.scale)}(r,r._node)}))}}}]),e}(),O=function(){function e(t){Object(r.a)(this,e),this.animations=t.animations.map((function(e,n){var r=e.name||"Animation-".concat(n),i=e.samplers.map((function(e){var n=e.input,r=e.interpolation,i=void 0===r?"LINEAR":r,a=e.output;return{input:Q(t.accessors[n]),interpolation:i,output:Q(t.accessors[a])}})),a=e.channels.map((function(e){var n=e.sampler,r=e.target;return{sampler:i[n],target:t.nodes[r.node],path:r.path}}));return new S({name:r,channels:a})}))}return Object(i.a)(e,[{key:"animate",value:function(e){this.setTime(e)}},{key:"setTime",value:function(e){this.animations.forEach((function(t){return t.animate(e)}))}},{key:"getAnimations",value:function(){return this.animations}}]),e}(),D=n(311),R=function(e){function t(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r.a)(this,t),(n=Object(s.a)(this,Object(u.a)(t).call(this,i))).onBeforeRender=null,n.AfterRender=null,e instanceof D.a?(n.model=e,n._setModelNodeProps(i)):n.model=new D.a(e,i),n.managedResources=i.managedResources||[],n}return Object(o.a)(t,e),Object(i.a)(t,[{key:"setProps",value:function(e){return Object(a.a)(Object(u.a)(t.prototype),"setProps",this).call(this,e),this._setModelNodeProps(e),this}},{key:"delete",value:function(){this.model&&(this.model.delete(),this.model=null),this.managedResources.forEach((function(e){return e.delete()})),this.managedResources=[]}},{key:"draw",value:function(){var e;return(e=this.model).draw.apply(e,arguments)}},{key:"setUniforms",value:function(){var e;return(e=this.model).setUniforms.apply(e,arguments),this}},{key:"setAttributes",value:function(){var e;return(e=this.model).setAttributes.apply(e,arguments),this}},{key:"updateModuleSettings",value:function(){var e;return(e=this.model).updateModuleSettings.apply(e,arguments),this}},{key:"_setModelNodeProps",value:function(e){this.model.setProps(e)}}]),t}(m),j=n(1),M=n(734),N=n(359),F=n(179),T=function(){function e(t,n){var i=n.attributes,a=n.material,o=n.pbrDebug,s=n.imageBasedLightingEnvironment,u=n.lights,A=n.useTangents;Object(r.a)(this,e),this.gl=t,this.defines={MANUAL_SRGB:1,SRGB_FAST_APPROXIMATION:1},Object(M.b)(t,N.a.GLSL_TEXTURE_LOD)&&(this.defines.USE_TEX_LOD=1),this.uniforms={u_Camera:[0,0,0],u_MetallicRoughnessValues:[1,1]},this.parameters={},this.generatedTextures=[],s&&(this.uniforms.u_DiffuseEnvSampler=s.getDiffuseEnvSampler(),this.uniforms.u_SpecularEnvSampler=s.getSpecularEnvSampler(),this.uniforms.u_brdfLUT=s.getBrdfTexture(),this.uniforms.u_ScaleIBLAmbient=[1,1]),o&&(this.uniforms.u_ScaleDiffBaseMR=[0,0,0,0],this.uniforms.u_ScaleFGDSpec=[0,0,0,0]),this.defineIfPresent(i.NORMAL,"HAS_NORMALS"),this.defineIfPresent(i.TANGENT&&A,"HAS_TANGENTS"),this.defineIfPresent(i.TEXCOORD_0,"HAS_UV"),this.defineIfPresent(s,"USE_IBL"),this.defineIfPresent(u,"USE_LIGHTS"),this.defineIfPresent(o,"PBR_DEBUG"),a&&this.parseMaterial(a)}return Object(i.a)(e,[{key:"defineIfPresent",value:function(e,t){e&&(this.defines[t]=1)}},{key:"parseTexture",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=e.texture&&e.texture.sampler&&e.texture.sampler.parameters||{},i=new F.a(this.gl,{id:e.name||e.id,parameters:r,pixelStore:Object(j.a)({},this.gl.UNPACK_FLIP_Y_WEBGL,!1),data:e.texture.source.image});this.uniforms[t]=i,this.defineIfPresent(n,n),this.generatedTextures.push(i)}},{key:"parsePbrMetallicRoughness",value:function(e){e.baseColorTexture&&this.parseTexture(e.baseColorTexture,"u_BaseColorSampler","HAS_BASECOLORMAP"),this.uniforms.u_BaseColorFactor=e.baseColorFactor||[1,1,1,1],e.metallicRoughnessTexture&&this.parseTexture(e.metallicRoughnessTexture,"u_MetallicRoughnessSampler","HAS_METALROUGHNESSMAP");var t=e.metallicFactor,n=void 0===t?1:t,r=e.roughnessFactor,i=void 0===r?1:r;this.uniforms.u_MetallicRoughnessValues=[n,i]}},{key:"parseMaterial",value:function(e){if(this.uniforms.pbr_uUnlit=Boolean(e.unlit),e.pbrMetallicRoughness&&this.parsePbrMetallicRoughness(e.pbrMetallicRoughness),e.normalTexture){this.parseTexture(e.normalTexture,"u_NormalSampler","HAS_NORMALMAP");var t=e.normalTexture.scale,n=void 0===t?1:t;this.uniforms.u_NormalScale=n}if(e.occlusionTexture){this.parseTexture(e.occlusionTexture,"u_OcclusionSampler","HAS_OCCLUSIONMAP");var r=e.occlusionTexture.strength,i=void 0===r?1:r;this.uniforms.u_OcclusionStrength=i}if(e.emissiveTexture&&(this.parseTexture(e.emissiveTexture,"u_EmissiveSampler","HAS_EMISSIVEMAP"),this.uniforms.u_EmissiveFactor=e.emissiveFactor||[0,0,0]),"MASK"===e.alphaMode){var a=e.alphaCutoff,o=void 0===a?.5:a;this.defines.ALPHA_CUTOFF=1,this.uniforms.u_AlphaCutoff=o}else"BLEND"===e.alphaMode&&(g.h.warn("BLEND alphaMode might not work well because it requires mesh sorting")(),Object.assign(this.parameters,{blend:!0,blendEquation:this.gl.FUNC_ADD,blendFunc:[this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA,this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA]}))}}]),e}();function L(e,t){return Object(g.g)(e)?"#version 300 es\n".concat(t):t}var P={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},U={modelOptions:{},pbrDebug:!1,imageBasedLightingEnvironment:null,lights:!0,useTangents:!1},G=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,e),this.gl=t,this.options=Object.assign({},U,n)}return Object(i.a)(e,[{key:"instantiate",value:function(e){var t=this;return this.gltf=e,(e.scenes||[]).map((function(e){return t.createScene(e)}))}},{key:"createAnimator",value:function(){return Array.isArray(this.gltf.animations)?new O(this.gltf):null}},{key:"createScene",value:function(e){var t=this,n=(e.nodes||[]).map((function(e){return t.createNode(e)}));return new C({id:e.name||e.id,children:n})}},{key:"createNode",value:function(e){var t=this;if(!e._node){var n=(e.children||[]).map((function(e){return t.createNode(e)}));e.mesh&&n.push(this.createMesh(e.mesh));var r=new C({id:e.name||e.id,children:n});if(e.matrix)r.setMatrix(e.matrix);else{if(r.matrix.identity(),e.translation&&r.matrix.translate(e.translation),e.rotation){var i=(new p.a).fromQuaternion(e.rotation);r.matrix.multiplyRight(i)}e.scale&&r.matrix.scale(e.scale)}e._node=r}return e._node}},{key:"createMesh",value:function(e){var t=this;if(!e._mesh){var n=(e.primitives||[]).map((function(n,r){return t.createPrimitive(n,r,e)})),r=new C({id:e.name||e.id,children:n});e._mesh=r}return e._mesh}},{key:"getVertexCount",value:function(e){g.h.warn("getVertexCount() not found")()}},{key:"createPrimitive",value:function(e,t,n){return function(e,t){var n=t.id,r=t.drawMode,i=t.vertexCount,a=t.attributes,o=t.modelOptions,s=new T(e,t);g.h.info(4,"createGLTFModel defines: ",s.defines)();var u=[];u.push.apply(u,Object(E.a)(s.generatedTextures)),u.push.apply(u,Object(E.a)(Object.values(a).map((function(e){return e.buffer}))));var A=new R(e,Object.assign({id:n,drawMode:r,vertexCount:i,modules:[d.a],defines:s.defines,parameters:s.parameters,vs:L(e,"\n#if (__VERSION__ < 300)\n  #define _attr attribute\n#else\n  #define _attr in\n#endif\n\n  _attr vec4 POSITION;\n\n  #ifdef HAS_NORMALS\n    _attr vec4 NORMAL;\n  #endif\n\n  #ifdef HAS_TANGENTS\n    _attr vec4 TANGENT;\n  #endif\n\n  #ifdef HAS_UV\n    _attr vec2 TEXCOORD_0;\n  #endif\n\n  void main(void) {\n    vec4 _NORMAL = vec4(0.);\n    vec4 _TANGENT = vec4(0.);\n    vec2 _TEXCOORD_0 = vec2(0.);\n\n    #ifdef HAS_NORMALS\n      _NORMAL = NORMAL;\n    #endif\n\n    #ifdef HAS_TANGENTS\n      _TANGENT = TANGENT;\n    #endif\n\n    #ifdef HAS_UV\n      _TEXCOORD_0 = TEXCOORD_0;\n    #endif\n\n    pbr_setPositionNormalTangentUV(POSITION, _NORMAL, _TANGENT, _TEXCOORD_0);\n    gl_Position = u_MVPMatrix * POSITION;\n  }\n"),fs:L(e,"\n#if (__VERSION__ < 300)\n  #define fragmentColor gl_FragColor\n#else\n  out vec4 fragmentColor;\n#endif\n\n  void main(void) {\n    fragmentColor = pbr_filterColor(vec4(0));\n  }\n"),managedResources:u},o));return A.setProps({attributes:a}),A.setUniforms(s.uniforms),A}(this.gl,Object.assign({id:e.name||"".concat(n.name||n.id,"-primitive-").concat(t),drawMode:e.mode||4,vertexCount:e.indices?e.indices.count:this.getVertexCount(e.attributes),attributes:this.createAttributes(e.attributes,e.indices),material:e.material},this.options))}},{key:"createAttributes",value:function(e,t){var n=this,r={};return Object.keys(e).forEach((function(t){r[t]=n.createAccessor(e[t],n.createBuffer(e[t],n.gl.ARRAY_BUFFER))})),t&&(r.indices=this.createAccessor(t,this.createBuffer(t,this.gl.ELEMENT_ARRAY_BUFFER))),g.h.info(4,"glTF Attributes",{attributes:e,indices:t,generated:r})(),r}},{key:"createBuffer",value:function(e,t){e.bufferView||(e.bufferView={});var n=e.bufferView;return n.lumaBuffers||(n.lumaBuffers={}),n.lumaBuffers[t]||(n.lumaBuffers[t]=new I.a(this.gl,{id:"from-".concat(n.id),data:n.data||e.value,target:t})),n.lumaBuffers[t]}},{key:"createAccessor",value:function(e,t){return new b.a({buffer:t,offset:e.byteOffset||0,stride:e.bufferView.byteStride||0,type:e.componentType,size:P[e.type]})}},{key:"createSampler",value:function(e){return e}},{key:"needsPOT",value:function(){return!1}}]),e}();var q=n(12),H=n.n(q),Y=n(26);function J(){return(J=Object(Y.a)(H.a.mark((function e(t){var n;return H.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=[],t.scenes.forEach((function(e){e.traverse((function(e){Object.values(e.model.getUniforms()).forEach((function(e){!1===e.loaded&&n.push(e)}))}))})),e.next=4,z((function(){return n.some((function(e){return!e.loaded}))}));case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function z(e){return K.apply(this,arguments)}function K(){return(K=Object(Y.a)(H.a.mark((function e(t){return H.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t()){e.next=5;break}return e.next=3,new Promise((function(e){return requestAnimationFrame(e)}));case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var W=n(231);function V(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}n.d(t,"a",(function(){return $}));var X=[255,255,255,255],Z={scenegraph:{type:"object",value:null,async:!0},getScene:function(e){return e&&e.scenes?"object"===Object(A.a)(e.scene)?e.scene:e.scenes[e.scene||0]:e},getAnimator:function(e){return e&&e.animator},_animations:null,sizeScale:{type:"number",value:1,min:0},sizeMinPixels:{type:"number",min:0,value:0},sizeMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},getPosition:{type:"accessor",value:function(e){return e.position}},getColor:{type:"accessor",value:X},_lighting:"flat",_imageBasedLightingEnvironment:null,getOrientation:{type:"accessor",value:[0,0,0]},getScale:{type:"accessor",value:[1,1,1]},getTranslation:{type:"accessor",value:[0,0,0]},getTransformMatrix:{type:"accessor",value:[]}},$=function(e){Object(o.a)(n,e);var t=V(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"initializeState",value:function(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),accessor:"getPosition",transition:!0},instanceColors:{type:5121,size:this.props.colorFormat.length,accessor:"getColor",normalized:!0,defaultValue:X,transition:!0},instanceModelMatrix:W.a})}},{key:"updateState",value:function(e){Object(a.a)(Object(u.a)(n.prototype),"updateState",this).call(this,e);var t=e.props,r=e.oldProps;t.scenegraph!==r.scenegraph?this._updateScenegraph(t):t._animations!==r._animations&&this._applyAnimationsProp(this.state.scenegraph,this.state.animator,t._animations)}},{key:"finalizeState",value:function(){Object(a.a)(Object(u.a)(n.prototype),"finalizeState",this).call(this),this._deleteScenegraph()}},{key:"_updateScenegraph",value:function(e){var t,n=this,r=this.context.gl;if(e.scenegraph instanceof m)t={scenes:[e.scenegraph]};else if(e.scenegraph&&!e.scenegraph.gltf){var i=e.scenegraph,a=function(e,t,n){var r=new G(e,n);return{scenes:r.instantiate(t),animator:r.createAnimator()}}(r,i,this.getLoadOptions());t=Object.assign({gltf:i},a),function(e){return J.apply(this,arguments)}(a).then((function(){return n.setNeedsRedraw()}))}else c.a.deprecated("ScenegraphLayer.props.scenegraph","Use GLTFLoader instead of GLTFScenegraphLoader")(),t=e.scenegraph;var o={layer:this,gl:r},s=e.getScene(t,o),u=e.getAnimator(t,o);s instanceof m?(this._deleteScenegraph(),this._applyAllAttributes(s),this._applyAnimationsProp(s,u,e._animations),this.setState({scenegraph:s,animator:u})):null!==s&&c.a.warn("invalid scenegraph:",s)()}},{key:"_applyAllAttributes",value:function(e){var t=this;if(this.state.attributesAvailable){var n=this.getAttributeManager().getAttributes();e.traverse((function(e){t._setModelAttributes(e.model,n)}))}}},{key:"_applyAnimationsProp",value:function(e,t,n){if(e&&t&&n){var r=t.getAnimations();Object.keys(n).sort().forEach((function(e){var t=n[e];if("*"===e)r.forEach((function(e){Object.assign(e,t)}));else if(Number.isFinite(Number(e))){var i=Number(e);i>=0&&i<r.length?Object.assign(r[i],t):c.a.warn("animation ".concat(e," not found"))()}else{var a=r.find((function(t){return t.name===e}));a?Object.assign(a,t):c.a.warn("animation ".concat(e," not found"))()}}))}}},{key:"_deleteScenegraph",value:function(){var e=this.state.scenegraph;e instanceof m&&e.delete()}},{key:"getLoadOptions",value:function(){var e=[l.a,f.a],t=this.props,n=t._lighting,r=t._imageBasedLightingEnvironment;"pbr"===n&&e.push(d.a);var i=null;return r&&(i="function"===typeof r?r({gl:this.context.gl,layer:this}):r),{gl:this.context.gl,waitForFullLoad:!0,imageBasedLightingEnvironment:i,modelOptions:{vs:"#version 300 es\nin vec3 instancePositions;\nin vec3 instancePositions64Low;\nin vec4 instanceColors;\nin vec3 instancePickingColors;\nin mat3 instanceModelMatrix;\nin vec3 instanceTranslation;\nuniform float sizeScale;\nuniform float sizeMinPixels;\nuniform float sizeMaxPixels;\nuniform mat4 sceneModelMatrix;\nuniform bool composeModelMatrix;\nin vec4 POSITION;\n\n#ifdef HAS_UV\n  in vec2 TEXCOORD_0;\n#endif\n\n#ifdef MODULE_PBR\n  #ifdef HAS_NORMALS\n    in vec4 NORMAL;\n  #endif\n#endif\nout vec4 vColor;\n#ifndef MODULE_PBR\n  #ifdef HAS_UV\n    out vec2 vTEXCOORD_0;\n  #endif\n#endif\nvoid main(void) {\n  #if defined(HAS_UV) && !defined(MODULE_PBR)\n    vTEXCOORD_0 = TEXCOORD_0;\n    geometry.uv = vTEXCOORD_0;\n  #endif\n\n  geometry.worldPosition = instancePositions;\n  geometry.pickingColor = instancePickingColors;\n\n  #ifdef MODULE_PBR\n    #ifdef HAS_NORMALS\n      pbr_vNormal = project_normal(instanceModelMatrix * (sceneModelMatrix * vec4(NORMAL.xyz, 0.0)).xyz);\n      geometry.normal = pbr_vNormal;\n    #endif\n\n    #ifdef HAS_UV\n      pbr_vUV = TEXCOORD_0;\n    #else\n      pbr_vUV = vec2(0., 0.);\n    #endif\n    geometry.uv = pbr_vUV;\n  #endif\n\n  float originalSize = project_size_to_pixel(sizeScale);\n  float clampedSize = clamp(originalSize, sizeMinPixels, sizeMaxPixels);\n\n  vec3 pos = (instanceModelMatrix * (sceneModelMatrix * POSITION).xyz) * sizeScale * (clampedSize / originalSize) + instanceTranslation;\n  if(composeModelMatrix) {\n    DECKGL_FILTER_SIZE(pos, geometry);\n    gl_Position = project_position_to_clipspace(pos + instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n  }\n  else {\n    pos = project_size(pos);\n    DECKGL_FILTER_SIZE(pos, geometry);\n    gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, pos, geometry.position);\n  }\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  #ifdef MODULE_PBR\n    pbr_vPosition = geometry.position.xyz;\n  #endif\n\n  vColor = instanceColors;\n  DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#version 300 es\nuniform float opacity;\nin vec4 vColor;\n\nout vec4 fragmentColor;\n#ifndef MODULE_PBR\n  #if defined(HAS_UV) && defined(HAS_BASECOLORMAP)\n    in vec2 vTEXCOORD_0;\n    uniform sampler2D u_BaseColorSampler;\n  #endif\n#endif\n\nvoid main(void) {\n  #ifdef MODULE_PBR\n    fragmentColor = vColor * pbr_filterColor(vec4(0));\n    geometry.uv = pbr_vUV;\n  #else\n    #if defined(HAS_UV) && defined(HAS_BASECOLORMAP)\n      fragmentColor = vColor * texture2D(u_BaseColorSampler, vTEXCOORD_0);\n      geometry.uv = vTEXCOORD_0;\n    #else\n      fragmentColor = vColor;\n    #endif\n  #endif\n\n  fragmentColor.a *= opacity;\n  DECKGL_FILTER_COLOR(fragmentColor, geometry);\n}\n",modules:e,isInstanced:!0,transpileToGLSL100:!Object(g.g)(this.context.gl)},useTangents:!1}}},{key:"updateAttributes",value:function(e){var t=this;this.setState({attributesAvailable:!0}),this.state.scenegraph&&this.state.scenegraph.traverse((function(n){t._setModelAttributes(n.model,e)}))}},{key:"draw",value:function(e){var t=e.moduleParameters,n=void 0===t?null:t,r=e.parameters,i=void 0===r?{}:r,a=e.context;if(this.state.scenegraph){this.props._animations&&this.state.animator&&(this.state.animator.animate(a.timeline.getTime()),this.setNeedsRedraw());var o=this.context.viewport,s=this.props,u=s.sizeScale,A=s.sizeMinPixels,c=s.sizeMaxPixels,l=s.opacity,f=s.coordinateSystem,h=this.getNumInstances();this.state.scenegraph.traverse((function(e,t){var r=t.worldMatrix;e.model.setInstanceCount(h),e.updateModuleSettings(n),e.draw({parameters:i,uniforms:{sizeScale:u,opacity:l,sizeMinPixels:A,sizeMaxPixels:c,composeModelMatrix:Object(W.b)(o,f),sceneModelMatrix:r,u_Camera:e.model.getUniforms().project_uCameraPosition}})}))}}}]),n}(h.a);$.layerName="ScenegraphLayer",$.defaultProps=Z},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(29),o=n(6),s=n(7),u=n(4),A=n(44),c=n(412),l=n(931),f=n(411),h=n(217),g=n(179),d=n(121),p=n(21),v=n(311),y=n(734),m=n(359),I=n(231);function b(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(u.a)(e);if(t){var i=Object(u.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}function E(e,t){(e.COLOR_0||e.colors)&&t||(e.colors={constant:!0,value:new Float32Array([1,1,1])}),A.a.assert(e.positions||e.POSITION,'SimpleMeshLayer requires "postions" or "POSITION" attribute in mesh property.')}function C(e,t){if(e.attributes)return E(e.attributes,t),e instanceof d.a?e:new d.a(e);if(e.positions||e.POSITION)return E(e,t),new d.a({attributes:e});throw Error("Invalid mesh")}n.d(t,"a",(function(){return w}));var B={mesh:{value:null,type:"object",async:!0},texture:{type:"object",value:null,async:!0},sizeScale:{type:"number",value:1,min:0},_useMeshColors:{type:"boolean",value:!1},parameters:{depthTest:!0,depthFunc:515},_instanced:!0,wireframe:!1,material:!0,getPosition:{type:"accessor",value:function(e){return e.position}},getColor:{type:"accessor",value:[0,0,0,255]},getOrientation:{type:"accessor",value:[0,0,0]},getScale:{type:"accessor",value:[1,1,1]},getTranslation:{type:"accessor",value:[0,0,0]},getTransformMatrix:{type:"accessor",value:[]}},w=function(e){Object(o.a)(n,e);var t=b(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"getShaders",value:function(){var e=!Object(p.g)(this.context.gl),t={};return Object(y.b)(this.context.gl,m.a.GLSL_DERIVATIVES)&&(t.DERIVATIVES_AVAILABLE=1),Object(a.a)(Object(u.a)(n.prototype),"getShaders",this).call(this,{vs:"#version 300 es\n#define SHADER_NAME simple-mesh-layer-vs\nuniform float sizeScale;\nuniform bool composeModelMatrix;\nin vec3 positions;\nin vec3 normals;\nin vec3 colors;\nin vec2 texCoords;\nin vec3 instancePositions;\nin vec3 instancePositions64Low;\nin vec4 instanceColors;\nin vec3 instancePickingColors;\nin mat3 instanceModelMatrix;\nin vec3 instanceTranslation;\nout vec2 vTexCoord;\nout vec3 cameraPosition;\nout vec3 normals_commonspace;\nout vec4 position_commonspace;\nout vec4 vColor;\n\nvoid main(void) {\n  geometry.worldPosition = instancePositions;\n  geometry.uv = texCoords;\n  geometry.pickingColor = instancePickingColors;\n\n  vTexCoord = texCoords;\n  cameraPosition = project_uCameraPosition;\n  normals_commonspace = project_normal(instanceModelMatrix * normals);\n  vColor = vec4(colors * instanceColors.rgb, instanceColors.a);\n  geometry.normal = normals_commonspace;\n\n  vec3 pos = (instanceModelMatrix * positions) * sizeScale + instanceTranslation;\n\n  if (composeModelMatrix) {\n    DECKGL_FILTER_SIZE(pos, geometry);\n    gl_Position = project_position_to_clipspace(pos + instancePositions, instancePositions64Low, vec3(0.0), position_commonspace);\n  }\n  else {\n    pos = project_size(pos);\n    DECKGL_FILTER_SIZE(pos, geometry);\n    gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, pos, position_commonspace);\n  }\n\n  geometry.position = position_commonspace;\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#version 300 es\n#define SHADER_NAME simple-mesh-layer-fs\n\nprecision highp float;\n\nuniform bool hasTexture;\nuniform sampler2D sampler;\nuniform bool flatShading;\nuniform float opacity;\n\nin vec2 vTexCoord;\nin vec3 cameraPosition;\nin vec3 normals_commonspace;\nin vec4 position_commonspace;\nin vec4 vColor;\n\nout vec4 fragColor;\n\nvoid main(void) {\n  geometry.uv = vTexCoord;\n\n  vec3 normal;\n  if (flatShading) {\n#ifdef DERIVATIVES_AVAILABLE\n    normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n#else\n    normal = vec3(0.0, 0.0, 1.0);\n#endif\n  } else {\n    normal = normals_commonspace;\n  }\n\n  vec4 color = hasTexture ? texture(sampler, vTexCoord) : vColor;\n  vec3 lightColor = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);\n  fragColor = vec4(lightColor, color.a * opacity);\n\n  DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n",modules:[c.a,l.b,f.a],transpileToGLSL100:e,defines:t})}},{key:"initializeState",value:function(){this.getAttributeManager().addInstanced({instancePositions:{transition:!0,type:5130,fp64:this.use64bitPositions(),size:3,accessor:"getPosition"},instanceColors:{type:5121,transition:!0,size:this.props.colorFormat.length,normalized:!0,accessor:"getColor",defaultValue:[0,0,0,255]},instanceModelMatrix:I.a}),this.setState({emptyTexture:new g.a(this.context.gl,{data:new Uint8Array(4),width:1,height:1})})}},{key:"updateState",value:function(e){var t=e.props,r=e.oldProps,i=e.changeFlags;if(Object(a.a)(Object(u.a)(n.prototype),"updateState",this).call(this,{props:t,oldProps:r,changeFlags:i}),t.mesh!==r.mesh||i.extensionsChanged){if(this.state.model&&this.state.model.delete(),t.mesh){this.setState({model:this.getModel(t.mesh)});var o=t.mesh.attributes||t.mesh;this.setState({hasNormals:Boolean(o.NORMAL||o.normals)})}this.getAttributeManager().invalidateAll()}t.texture!==r.texture&&this.setTexture(t.texture),this.state.model&&this.state.model.setDrawMode(this.props.wireframe?3:4)}},{key:"finalizeState",value:function(){Object(a.a)(Object(u.a)(n.prototype),"finalizeState",this).call(this),this.state.emptyTexture.delete(),this.state.texture&&this.state.texture.delete()}},{key:"draw",value:function(e){var t=e.uniforms;if(this.state.model){var n=this.context.viewport,r=this.props,i=r.sizeScale,a=r.coordinateSystem,o=r._instanced;this.state.model.draw({uniforms:Object.assign({},t,{sizeScale:i,composeModelMatrix:!o||Object(I.b)(n,a),flatShading:!this.state.hasNormals})})}}},{key:"getModel",value:function(e){var t=new v.a(this.context.gl,Object.assign({},this.getShaders(),{id:this.props.id,geometry:C(e,this.props._useMeshColors),isInstanced:!0})),n=this.state,r=n.texture,i=n.emptyTexture;return t.setUniforms({sampler:r||i,hasTexture:Boolean(r)}),t}},{key:"setTexture",value:function(e){var t=this.context.gl,n=this.state,r=n.emptyTexture,i=n.model;this.state.texture&&this.state.texture.delete();var a=e?function(e,t,n){return t instanceof g.a?t:new g.a(e,Object.assign({data:t},n))}(t,e):null;this.setState({texture:a}),i&&i.setUniforms({sampler:a||r,hasTexture:Boolean(a)})}}]),n}(h.a);w.layerName="SimpleMeshLayer",w.defaultProps=B},,,,,,function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t,n){var r=n(325),i=n(349),a=n(443),o=n(195);e.exports=function(e,t,n){if(!o(n))return!1;var s=typeof t;return!!("number"==s?i(n)&&a(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(114);function i(e,t,n,r){var i=n[0],a=n[1],o=e[0],s=e[1],u=t[0],A=t[1],c=u-o,l=A-s;return 0===(n[0]-o)*l-(n[1]-s)*c&&(r?"start"===r?Math.abs(c)>=Math.abs(l)?c>0?o<i&&i<=u:u<=i&&i<o:l>0?s<a&&a<=A:A<=a&&a<s:"end"===r?Math.abs(c)>=Math.abs(l)?c>0?o<=i&&i<u:u<i&&i<=o:l>0?s<=a&&a<A:A<a&&a<=s:"both"===r&&(Math.abs(c)>=Math.abs(l)?c>0?o<i&&i<u:u<i&&i<o:l>0?s<a&&a<A:A<a&&a<s):Math.abs(c)>=Math.abs(l)?c>0?o<=i&&i<=u:u<=i&&i<=o:l>0?s<=a&&a<=A:A<=a&&a<=s)}t.default=function(e,t,n){void 0===n&&(n={});for(var a=r.getCoord(e),o=r.getCoords(t),s=0;s<o.length-1;s++){var u=!1;if(n.ignoreEndVertices&&(0===s&&(u="start"),s===o.length-2&&(u="end"),0===s&&s+1===o.length-1&&(u="both")),i(o[s],o[s+1],a,u))return!0}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(272),i=n(212),a=n(444),o=n(534),s=n(145),u=n(72),A=n(114);t.default=function(e,t,n){void 0===n&&(n={});var c=u.point([1/0,1/0],{dist:1/0}),l=0;return s.flattenEach(e,(function(e){for(var s=A.getCoords(e),f=0;f<s.length-1;f++){var h=u.point(s[f]);h.properties.dist=i.default(t,h,n);var g=u.point(s[f+1]);g.properties.dist=i.default(t,g,n);var d=i.default(h,g,n),p=Math.max(h.properties.dist,g.properties.dist),v=r.default(h,g),y=a.default(t,p,v+90,n),m=a.default(t,p,v-90,n),I=o.default(u.lineString([y.geometry.coordinates,m.geometry.coordinates]),u.lineString([h.geometry.coordinates,g.geometry.coordinates])),b=null;I.features.length>0&&((b=I.features[0]).properties.dist=i.default(t,b,n),b.properties.location=l+i.default(h,b,n)),h.properties.dist<c.properties.dist&&((c=h).properties.index=f,c.properties.location=l),g.properties.dist<c.properties.dist&&((c=g).properties.index=f+1,c.properties.location=l+d),b&&b.properties.dist<c.properties.dist&&((c=b).properties.index=f),l+=d}})),c}},function(e,t,n){"use strict";var r=n(946);e.exports=Function.prototype.bind||r},function(e,t,n){"use strict";var r=n(814),i="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),a=Object.prototype.toString,o=Array.prototype.concat,s=Object.defineProperty,u=s&&function(){var e={};try{for(var t in s(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(n){return!1}}(),A=function(e,t,n,r){var i;(!(t in e)||"function"===typeof(i=r)&&"[object Function]"===a.call(i)&&r())&&(u?s(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},c=function(e,t){var n=arguments.length>2?arguments[2]:{},a=r(t);i&&(a=o.call(a,Object.getOwnPropertySymbols(t)));for(var s=0;s<a.length;s+=1)A(e,a[s],t[a[s]],n[a[s]])};c.supportsDescriptors=!!u,e.exports=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ArrowStyles",{enumerable:!0,get:function(){return r.ArrowStyles}}),Object.defineProperty(t,"DEFAULT_ARROWS",{enumerable:!0,get:function(){return r.DEFAULT_ARROWS}}),Object.defineProperty(t,"MAX_ARROWS",{enumerable:!0,get:function(){return r.MAX_ARROWS}}),Object.defineProperty(t,"EditableGeoJsonLayer",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"EditableH3ClusterLayer",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"SelectionLayer",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"ElevatedEditHandleLayer",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"PathOutlineLayer",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"PathMarkerLayer",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"JunctionScatterplotLayer",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"toDeckColor",{enumerable:!0,get:function(){return l.toDeckColor}});var r=n(958),i=f(n(753)),a=f(n(985)),o=f(n(986)),s=f(n(988)),u=f(n(829)),A=f(n(990)),c=f(n(994)),l=n(995);function f(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=n(105),a=n(366),o=(r=n(828))&&r.__esModule?r:{default:r};function s(e){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(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 c(e,t,n){return(c="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function l(e,t){return!t||"object"!==s(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=[0,0,0,153],v=[0,0,0,144],y=[0,0,0,255],m=[0,0,144,144],I=[144,144,144,255],b=[144,144,144,144],E=[192,0,0,255],C=[0,0,0,128],B=[124,0,192,255],w=[255,255,255,255],Q=a.DrawPolygonMode;function k(e){return e&&"function"===typeof e?function(t){return e(function(e){if(e.__source)return e.__source.object;if(e.sourceFeature)return e.sourceFeature.feature;return e}(t))}:e}function _(e){switch(e.properties.editHandleType){case"existing":return E;case"snap-source":return B;case"intermediate":default:return C}}var x={mode:Q,onEdit:function(){},pickable:!0,pickingRadius:10,pickingDepth:5,fp64:!1,filled:!0,stroked:!0,lineWidthScale:1,lineWidthMinPixels:1,lineWidthMaxPixels:Number.MAX_SAFE_INTEGER,lineWidthUnits:"pixels",lineJointRounded:!1,lineMiterLimit:4,pointRadiusScale:1,pointRadiusMinPixels:2,pointRadiusMaxPixels:Number.MAX_SAFE_INTEGER,getLineColor:function(e,t,n){return t?y:p},getFillColor:function(e,t,n){return t?m:v},getRadius:function(e){return e&&e.properties&&e.properties.radius||e&&e.properties&&e.properties.size||1},getLineWidth:function(e){return e&&e.properties&&e.properties.lineWidth||3},getTentativeLineColor:function(e){return I},getTentativeFillColor:function(e){return b},getTentativeLineWidth:function(e){return e&&e.properties&&e.properties.lineWidth||3},editHandleType:"point",editHandlePointRadiusScale:1,editHandlePointOutline:!0,editHandlePointStrokeWidth:2,editHandlePointRadiusMinPixels:4,editHandlePointRadiusMaxPixels:8,getEditHandlePointColor:_,getEditHandlePointOutlineColor:function(e){return w},getEditHandlePointRadius:function(e){switch(e.properties.editHandleType){case"existing":return 5;case"snap":return 7;case"intermediate":default:return 3}},editHandleIconAtlas:null,editHandleIconMapping:null,editHandleIconSizeScale:1,getEditHandleIcon:function(e){return e.properties.editHandleType},getEditHandleIconSize:10,getEditHandleIconColor:_,getEditHandleIconAngle:0,billboard:!0},S={view:a.ViewMode,modify:a.ModifyMode,translate:new a.SnappableMode(new a.TranslateMode),transform:new a.SnappableMode(new a.TransformMode),scale:a.ScaleMode,rotate:a.RotateMode,duplicate:a.DuplicateMode,split:a.SplitPolygonMode,extrude:a.ExtrudeMode,elevation:a.ElevationMode,drawPoint:a.DrawPointMode,drawLineString:a.DrawLineStringMode,drawPolygon:a.DrawPolygonMode,drawRectangle:a.DrawRectangleMode,drawCircleFromCenter:a.DrawCircleFromCenterMode,drawCircleByBoundingBox:a.DrawCircleByDiameterMode,drawEllipseByBoundingBox:a.DrawEllipseByBoundingBoxMode,drawRectangleUsing3Points:a.DrawRectangleUsingThreePointsMode,drawEllipseUsing3Points:a.DrawEllipseUsingThreePointsMode,draw90DegreePolygon:a.Draw90DegreePolygonMode,drawPolygonByDragging:a.DrawPolygonByDraggingMode},O=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(s,e);var t,n,r,a,o=(t=s,function(){var e,n=h(t);if(f()){var r=h(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return l(this,e)});function s(){return u(this,s),o.apply(this,arguments)}return n=s,(r=[{key:"renderLayers",value:function(){var e=this.getSubLayerProps({id:"geojson",data:this.props.data,fp64:this.props.fp64,filled:this.props.filled,stroked:this.props.stroked,lineWidthScale:this.props.lineWidthScale,lineWidthMinPixels:this.props.lineWidthMinPixels,lineWidthMaxPixels:this.props.lineWidthMaxPixels,lineWidthUnits:this.props.lineWidthUnits,lineJointRounded:this.props.lineJointRounded,lineMiterLimit:this.props.lineMiterLimit,pointRadiusScale:this.props.pointRadiusScale,pointRadiusMinPixels:this.props.pointRadiusMinPixels,pointRadiusMaxPixels:this.props.pointRadiusMaxPixels,getLineColor:this.selectionAwareAccessor(this.props.getLineColor),getFillColor:this.selectionAwareAccessor(this.props.getFillColor),getRadius:this.selectionAwareAccessor(this.props.getRadius),getLineWidth:this.selectionAwareAccessor(this.props.getLineWidth),_subLayerProps:{"line-strings":{billboard:this.props.billboard},"polygons-stroke":{billboard:this.props.billboard}},updateTriggers:{getLineColor:[this.props.selectedFeatureIndexes,this.props.mode],getFillColor:[this.props.selectedFeatureIndexes,this.props.mode],getRadius:[this.props.selectedFeatureIndexes,this.props.mode],getLineWidth:[this.props.selectedFeatureIndexes,this.props.mode]}}),t=[new i.GeoJsonLayer(e)];return t=t.concat(this.createGuidesLayers(),this.createTooltipsLayers())}},{key:"initializeState",value:function(){c(h(s.prototype),"initializeState",this).call(this),this.setState({selectedFeatures:[],editHandles:[]})}},{key:"shouldUpdateState",value:function(e){return c(h(s.prototype),"shouldUpdateState",this).call(this,e)||e.changeFlags.stateChanged}},{key:"updateState",value:function(e){var t,n=e.props,r=e.oldProps,i=e.changeFlags;(c(h(s.prototype),"updateState",this).call(this,{oldProps:r,props:n,changeFlags:i}),!i.propsOrDataChanged||0!==Object.keys(r).length&&n.mode===r.mode)||("function"===typeof n.mode?t=new(0,n.mode):"string"===typeof n.mode?(t=S[n.mode],console.warn("Deprecated use of passing `mode` as a string. Pass the mode's class constructor instead.")):t=n.mode,t||(console.warn("No mode configured for ".concat(String(n.mode))),t=new Q),t!==this.state.mode&&this.setState({mode:t,cursor:null}));var a=[];Array.isArray(n.selectedFeatureIndexes)&&(a=n.selectedFeatureIndexes.map((function(e){return n.data.features[e]}))),this.setState({selectedFeatures:a})}},{key:"getModeProps",value:function(e){var t=this;return{modeConfig:e.modeConfig,data:e.data,selectedIndexes:e.selectedFeatureIndexes,lastPointerMoveEvent:this.state.lastPointerMoveEvent,cursor:this.state.cursor,onEdit:function(n){t.setNeedsUpdate(),e.onEdit(n)},onUpdateCursor:function(e){t.setState({cursor:e})}}}},{key:"selectionAwareAccessor",value:function(e){var t=this;return"function"!==typeof e?e:function(n){return e(n,t.isFeatureSelected(n),t.props.mode)}}},{key:"isFeatureSelected",value:function(e){if(!this.props.data||!this.props.selectedFeatureIndexes)return!1;if(!this.props.selectedFeatureIndexes.length)return!1;var t=this.props.data.features.indexOf(e);return this.props.selectedFeatureIndexes.includes(t)}},{key:"getPickingInfo",value:function(e){var t=e.info;return e.sourceLayer.id.endsWith("guides")&&(t.isGuide=!0),t}},{key:"createGuidesLayers",value:function(){var e,t=this.getActiveMode().getGuides(this.getModeProps(this.props));return t&&t.features.length?(e="icon"===this.props.editHandleType?{type:i.IconLayer,iconAtlas:this.props.editHandleIconAtlas,iconMapping:this.props.editHandleIconMapping,sizeScale:this.props.editHandleIconSizeScale,getIcon:k(this.props.getEditHandleIcon),getSize:k(this.props.getEditHandleIconSize),getColor:k(this.props.getEditHandleIconColor),getAngle:k(this.props.getEditHandleIconAngle)}:{type:i.ScatterplotLayer,radiusScale:this.props.editHandlePointRadiusScale,stroked:this.props.editHandlePointOutline,getLineWidth:this.props.editHandlePointStrokeWidth,radiusMinPixels:this.props.editHandlePointRadiusMinPixels,radiusMaxPixels:this.props.editHandlePointRadiusMaxPixels,getRadius:k(this.props.getEditHandlePointRadius),getFillColor:k(this.props.getEditHandlePointColor),getLineColor:k(this.props.getEditHandlePointOutlineColor)},[new i.GeoJsonLayer(this.getSubLayerProps({id:"guides",data:t,fp64:this.props.fp64,_subLayerProps:{points:e},lineWidthScale:this.props.lineWidthScale,lineWidthMinPixels:this.props.lineWidthMinPixels,lineWidthMaxPixels:this.props.lineWidthMaxPixels,lineWidthUnits:this.props.lineWidthUnits,lineJointRounded:this.props.lineJointRounded,lineMiterLimit:this.props.lineMiterLimit,getLineColor:k(this.props.getTentativeLineColor),getLineWidth:k(this.props.getTentativeLineWidth),getFillColor:k(this.props.getTentativeFillColor)}))]):[]}},{key:"createTooltipsLayers",value:function(){var e=this.getActiveMode().getTooltips(this.getModeProps(this.props));return[new i.TextLayer(this.getSubLayerProps({id:"tooltips",data:e}))]}},{key:"onLayerClick",value:function(e){this.getActiveMode().handleClick(e,this.getModeProps(this.props))}},{key:"onLayerKeyUp",value:function(e){this.getActiveMode().handleKeyUp(e,this.getModeProps(this.props))}},{key:"onStartDragging",value:function(e){this.getActiveMode().handleStartDragging(e,this.getModeProps(this.props))}},{key:"onDragging",value:function(e){this.getActiveMode().handleDragging(e,this.getModeProps(this.props))}},{key:"onStopDragging",value:function(e){this.getActiveMode().handleStopDragging(e,this.getModeProps(this.props))}},{key:"onPointerMove",value:function(e){this.setState({lastPointerMoveEvent:e}),this.getActiveMode().handlePointerMove(e,this.getModeProps(this.props))}},{key:"getCursor",value:function(e){var t=e.isDragging,n=this.state.cursor;return n||(n=t?"grabbing":"grab"),n}},{key:"getActiveMode",value:function(){return this.state.mode}}])&&A(n.prototype,r),a&&A(n,a),s}(o.default);t.default=O,d(O,"layerName","EditableGeoJsonLayer"),d(O,"defaultProps",x)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModifyMode=void 0;var r,i=(r=n(749))&&r.__esModule?r:{default:r},a=n(72),o=n(241),s=n(162),u=n(326);function A(e){return(A="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"===typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(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 d(e,t){return!t||"object"!==A(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(f,e);var t,n,r,s,A=(t=f,function(){var e,n=v(t);if(p()){var r=v(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return d(this,e)});function f(){return h(this,f),A.apply(this,arguments)}return n=f,(r=[{key:"getGuides",value:function(e){var t,n=this,r=[],i=e.data,s=e.lastPointerMoveEvent,u=i.features,A=s&&s.picks,f=s&&s.mapCoords,h=function(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=l(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,i,a=!0,o=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}(e.selectedIndexes);try{for(h.s();!(t=h.n()).done;){var g=t.value;if(g<u.length){var d=u[g].geometry;r.push.apply(r,c((0,o.getEditHandlesForGeometry)(d,g)))}else console.warn("selectedFeatureIndexes out of range ".concat(g))}}catch(C){h.e(C)}finally{h.f()}if(A&&A.length&&f){var p=!(0,o.getPickedExistingEditHandle)(A)&&A.find((function(e){return!e.isGuide}));if(p&&!p.object.geometry.type.includes("Point")&&e.selectedIndexes.includes(p.index)){var v=null,y=[],m=(0,a.point)(f);if((0,o.recursivelyTraverseNestedArrays)(p.object.geometry.coordinates,[],(function(t,r){var i=(0,a.lineString)(t),o=n.nearestPointOnLine(i,m,e.modeConfig&&e.modeConfig.viewport);(!v||o.properties.dist<v.properties.dist)&&(v=o,y=r)})),v){var I=v,b=I.geometry.coordinates,E=I.properties.index;r.push({type:"Feature",properties:{guideType:"editHandle",editHandleType:"intermediate",featureIndex:p.index,positionIndexes:[].concat(c(y),[E+1])},geometry:{type:"Point",coordinates:b}})}}}return{type:"FeatureCollection",features:r}}},{key:"nearestPointOnLine",value:function(e,t,n){if(e.geometry.coordinates.some((function(e){return e.length>2}))){if(n)return(0,o.nearestPointOnProjectedLine)(e,t,n);console.log("Editing 3D point but modeConfig.viewport not provided. Falling back to 2D logic.")}return(0,i.default)(e,t)}},{key:"handleClick",value:function(e,t){var n=(0,o.getPickedExistingEditHandle)(e.picks),r=(0,o.getPickedIntermediateEditHandle)(e.picks);if(n){var i,a=n.properties,s=a.featureIndex,A=a.positionIndexes;try{i=new u.ImmutableFeatureCollection(t.data).removePosition(s,A).getObject()}catch(g){}i&&t.onEdit({updatedData:i,editType:"removePosition",editContext:{featureIndexes:[s],positionIndexes:A,position:n.geometry.coordinates}})}else if(r){var c=r.properties,l=c.featureIndex,f=c.positionIndexes,h=new u.ImmutableFeatureCollection(t.data).addPosition(l,f,r.geometry.coordinates).getObject();h&&t.onEdit({updatedData:h,editType:"addPosition",editContext:{featureIndexes:[l],positionIndexes:f,position:r.geometry.coordinates}})}}},{key:"handleDragging",value:function(e,t){var n=(0,o.getPickedEditHandle)(e.pointerDownPicks);if(n){e.cancelPan();var r=n.properties,i=new u.ImmutableFeatureCollection(t.data).replacePosition(r.featureIndex,r.positionIndexes,e.mapCoords).getObject();t.onEdit({updatedData:i,editType:"movePosition",editContext:{featureIndexes:[r.featureIndex],positionIndexes:r.positionIndexes,position:e.mapCoords}})}}},{key:"handlePointerMove",value:function(e,t){var n=this.getCursor(e);t.onUpdateCursor(n)}},{key:"handleStartDragging",value:function(e,t){var n=t.selectedIndexes,r=(0,o.getPickedIntermediateEditHandle)(e.picks);if(n.length&&r){var i=r.properties,a=new u.ImmutableFeatureCollection(t.data).addPosition(i.featureIndex,i.positionIndexes,e.mapCoords).getObject();t.onEdit({updatedData:a,editType:"addPosition",editContext:{featureIndexes:[i.featureIndex],positionIndexes:i.positionIndexes,position:e.mapCoords}})}}},{key:"handleStopDragging",value:function(e,t){var n=t.selectedIndexes,r=(0,o.getPickedEditHandle)(e.picks);if(n.length&&r){var i=r.properties,a=new u.ImmutableFeatureCollection(t.data).replacePosition(i.featureIndex,i.positionIndexes,e.mapCoords).getObject();t.onEdit({updatedData:a,editType:"finishMovePosition",editContext:{featureIndexes:[i.featureIndex],positionIndexes:i.positionIndexes,position:e.mapCoords}})}}},{key:"getCursor",value:function(e){var t=e&&e.picks||[];return(0,o.getPickedEditHandles)(t).length?"cell":null}}])&&g(n.prototype,r),s&&g(n,s),f}(s.GeoJsonEditMode);t.ModifyMode=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TranslateMode=void 0;var r=A(n(272)),i=A(n(212)),a=A(n(1055)),o=n(72),s=n(162),u=n(326);function A(e){return e&&e.__esModule?e:{default:e}}function c(e){return(c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(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 h(e,t){return!t||"object"!==c(t)&&"function"!==typeof t?g(e):t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(m,e);var t,n,s,A,c=(t=m,function(){var e,n=p(t);if(d()){var r=p(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return h(this,e)});function m(){var e;l(this,m);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return y(g(e=c.call.apply(c,[this].concat(n))),"_geometryBeforeTranslate",void 0),y(g(e),"_isTranslatable",void 0),e}return n=m,(s=[{key:"handleDragging",value:function(e,t){if(this._isTranslatable){if(this._geometryBeforeTranslate){var n=this.getTranslateAction(e.pointerDownMapCoords,e.mapCoords,"translating",t);n&&t.onEdit(n)}e.cancelPan()}}},{key:"handlePointerMove",value:function(e,t){this._isTranslatable=this.isSelectionPicked(e.pointerDownPicks||e.picks,t),this.updateCursor(t)}},{key:"handleStartDragging",value:function(e,t){this._isTranslatable&&(this._geometryBeforeTranslate=this.getSelectedFeaturesAsFeatureCollection(t))}},{key:"handleStopDragging",value:function(e,t){if(this._geometryBeforeTranslate){var n=this.getTranslateAction(e.pointerDownMapCoords,e.mapCoords,"translated",t);n&&t.onEdit(n),this._geometryBeforeTranslate=null}}},{key:"updateCursor",value:function(e){this._isTranslatable?e.onUpdateCursor("move"):e.onUpdateCursor(null)}},{key:"getTranslateAction",value:function(e,t,n,s){if(!this._geometryBeforeTranslate)return null;for(var A=(0,o.point)(e),c=(0,o.point)(t),l=(0,i.default)(A,c),f=(0,r.default)(A,c),h=(0,a.default)(this._geometryBeforeTranslate,l,f),g=new u.ImmutableFeatureCollection(s.data),d=s.selectedIndexes,p=0;p<d.length;p++){var v=d[p],y=h.features[p];g=g.replaceGeometry(v,y.geometry)}return{updatedData:g.getObject(),editType:n,editContext:{featureIndexes:d}}}}])&&f(n.prototype,s),A&&f(n,A),m}(s.GeoJsonEditMode);t.TranslateMode=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72),i=n(114);function a(e,t){void 0===t&&(t={});var n=i.getGeom(e);n.type;return s(n.coordinates,t.properties?t.properties:"Feature"===e.type?e.properties:{})}function o(e,t){void 0===t&&(t={});var n=i.getGeom(e),a=(n.type,n.coordinates),o=t.properties?t.properties:"Feature"===e.type?e.properties:{},u=[];return a.forEach((function(e){u.push(s(e,o))})),r.featureCollection(u)}function s(e,t){return e.length>1?r.multiLineString(e,t):r.lineString(e[0],t)}t.default=function(e,t){void 0===t&&(t={});var n=i.getGeom(e);switch(t.properties||"Feature"!==e.type||(t.properties=e.properties),n.type){case"Polygon":return a(n,t);case"MultiPolygon":return o(n,t);default:throw new Error("invalid poly")}},t.polygonToLine=a,t.multiPolygonToLine=o,t.coordsToLine=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawPolygonMode=void 0;var r=n(241);function i(e){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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 A(e,t,n){return(A="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function c(e,t){return!t||"object"!==i(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(d,e);var t,n,i,o,g=(t=d,function(){var e,n=f(t);if(l()){var r=f(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return c(this,e)});function d(){return s(this,d),g.apply(this,arguments)}return n=d,(i=[{key:"createTentativeFeature",value:function(e){var t,n=e.lastPointerMoveEvent,r=this.getClickSequence(),i=n?[n.mapCoords]:[];return 1===r.length||2===r.length?t={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(a(r),i)}}:r.length>2&&(t={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"Polygon",coordinates:[[].concat(a(r),i,[r[0]])]}}),t}},{key:"getGuides",value:function(e){var t,n=this.getClickSequence(),r={type:"FeatureCollection",features:[]},i=this.createTentativeFeature(e);i&&r.features.push(i);var o=n.map((function(e,t){return{type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[t]},geometry:{type:"Point",coordinates:e}}}));return(t=r.features).push.apply(t,a(o)),r}},{key:"handleClick",value:function(e,t){var n=e.picks,i=(0,r.getPickedEditHandle)(n),o=!1;i||(this.addClickSequence(e),o=!0);var s=this.getClickSequence();if(s.length>2&&i&&Array.isArray(i.properties.positionIndexes)&&(0===i.properties.positionIndexes[0]||i.properties.positionIndexes[0]===s.length-1)){var u={type:"Polygon",coordinates:[[].concat(a(s),[s[0]])]};this.resetClickSequence();var A=this.getAddFeatureOrBooleanPolygonAction(u,t);A&&t.onEdit(A)}else o&&t.onEdit({updatedData:t.data,editType:"addTentativePosition",editContext:{position:e.mapCoords}})}},{key:"handleKeyUp",value:function(e,t){if("Enter"===e.key){var n=this.getClickSequence();if(n.length>2){var r={type:"Polygon",coordinates:[[].concat(a(n),[n[0]])]};this.resetClickSequence();var i=this.getAddFeatureOrBooleanPolygonAction(r,t);i&&t.onEdit(i)}}}},{key:"handlePointerMove",value:function(e,t){t.onUpdateCursor("cell"),A(f(d.prototype),"handlePointerMove",this).call(this,e,t)}}])&&u(n.prototype,i),o&&u(n,o),d}(n(162).GeoJsonEditMode);t.DrawPolygonMode=g},function(e,t,n){"use strict";function r(e,t){if(e===t)return!0;if(Array.isArray(e)){var n=e.length;if(!t||t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n={};return function(i){for(var a in i)if(!r(i[a],n[a])){t=e(i),n=i;break}return t}}},function(e,t,n){"use strict";function r(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 i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"objects",void 0),i(this,"originals",void 0),i(this,"updateTrigger",void 0),i(this,"_idToPosition",void 0),i(this,"_getData",void 0),i(this,"_convert",void 0),this.objects=[],this.originals=[],this.updateTrigger=0,this._idToPosition=new Map,this._getData=t,this._convert=n}var t,n,a;return t=e,(n=[{key:"updateAllDeckObjects",value:function(){var e=this;this._getData&&this._convert&&(this.originals.length=0,this.objects.length=0,this._idToPosition.clear(),this._getData().forEach((function(t){e._idToPosition.set(t.id,e.objects.length),e.originals.push(t),e.objects.push(e._convert(t))})),this.triggerUpdate())}},{key:"updateDeckObjectsByIds",value:function(e){var t=this;this._getData&&this._convert&&(e.forEach((function(e){var n=t._idToPosition.get(e);void 0!==n&&(t.objects[n]=t._convert(t.originals[n]))})),this.triggerUpdate())}},{key:"triggerUpdate",value:function(){this.updateTrigger++}},{key:"getDeckObjectById",value:function(e){var t=this._idToPosition.get(e);return void 0!==t?this.objects[t]:null}},{key:"getOriginalById",value:function(e){var t=this._idToPosition.get(e);return void 0!==t?this.originals[t]:null}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a},function(e,t,n){var r=n(719);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){var r=n(1039),i=n(883);e.exports=function(e,t,n,a){var o=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var A=t[s],c=a?a(n[A],e[A],A,n,e):void 0;void 0===c&&(c=e[A]),o?i(n,A,c):r(n,A,c)}return n}},function(e,t,n){"use strict";n.r(t);var r={meters:6371008.8,metres:6371008.8,millimeters:6371008800,millimetres:6371008800,centimeters:637100880,centimetres:637100880,kilometers:6371.0088,kilometres:6371.0088,miles:3958.761333810546,nauticalmiles:6371008.8/1852,inches:6371008.8*39.37,yards:6371008.8/1.0936,feet:20902260.511392,radians:1,degrees:6371008.8/111325};function i(e,t,n){if(!c(n=n||{}))throw new Error("options is invalid");var r=n.bbox,i=n.id;if(void 0===e)throw new Error("geometry is required");if(t&&t.constructor!==Object)throw new Error("properties must be an Object");r&&l(r),i&&f(i);var a={type:"Feature"};return i&&(a.id=i),r&&(a.bbox=r),a.properties=t||{},a.geometry=e,a}function a(e,t,n){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!A(e[0])||!A(e[1]))throw new Error("coordinates must contain numbers");return i({type:"Point",coordinates:e},t,n)}function o(e,t){if(!c(t=t||{}))throw new Error("options is invalid");var n=t.bbox,r=t.id;if(!e)throw new Error("No features passed");if(!Array.isArray(e))throw new Error("features must be an Array");n&&l(n),r&&f(r);var i={type:"FeatureCollection"};return r&&(i.id=r),n&&(i.bbox=n),i.features=e,i}function s(e,t){if(void 0===e||null===e)throw new Error("radians is required");if(t&&"string"!==typeof t)throw new Error("units must be a string");var n=r[t||"kilometers"];if(!n)throw new Error(t+" units is invalid");return e*n}function u(e,t){if(void 0===e||null===e)throw new Error("distance is required");if(t&&"string"!==typeof t)throw new Error("units must be a string");var n=r[t||"kilometers"];if(!n)throw new Error(t+" units is invalid");return e/n}function A(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function c(e){return!!e&&e.constructor===Object}function l(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!A(e))throw new Error("bbox must only contain numbers")}))}function f(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}function h(e,t,n){if(null!==e)for(var r,i,a,o,s,u,A,c,l=0,f=0,g=e.type,d="FeatureCollection"===g,p="Feature"===g,v=d?e.features.length:1,y=0;y<v;y++){s=(c=!!(A=d?e.features[y].geometry:p?e.geometry:e)&&"GeometryCollection"===A.type)?A.geometries.length:1;for(var m=0;m<s;m++){var I=0,b=0;if(null!==(o=c?A.geometries[m]:A)){u=o.coordinates;var E=o.type;switch(l=!n||"Polygon"!==E&&"MultiPolygon"!==E?0:1,E){case null:break;case"Point":if(!1===t(u,f,y,I,b))return!1;f++,I++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(!1===t(u[r],f,y,I,b))return!1;f++,"MultiPoint"===E&&I++}"LineString"===E&&I++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-l;i++){if(!1===t(u[r][i],f,y,I,b))return!1;f++}"MultiLineString"===E&&I++,"Polygon"===E&&b++}"Polygon"===E&&I++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for("MultiPolygon"===E&&(b=0),i=0;i<u[r].length;i++){for(a=0;a<u[r][i].length-l;a++){if(!1===t(u[r][i][a],f,y,I,b))return!1;f++}b++}I++}break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===h(o.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function g(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function d(e,t){var n,r,i,a,o,s,u,A,c,l,f=0,h="FeatureCollection"===e.type,g="Feature"===e.type,d=h?e.features.length:1;for(n=0;n<d;n++){for(s=h?e.features[n].geometry:g?e.geometry:e,A=h?e.features[n].properties:g?e.properties:{},c=h?e.features[n].bbox:g?e.bbox:void 0,l=h?e.features[n].id:g?e.id:void 0,o=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<o;i++)if(null!==(a=u?s.geometries[i]:s))switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(a,f,A,c,l))return!1;break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===t(a.geometries[r],f,A,c,l))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,f,A,c,l))return!1;f++}}var p=function(e){var t=[1/0,1/0,-1/0,-1/0];return h(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t};var v=function(e,t){if(!c(t=t||{}))throw new Error("options is invalid");var n=t.properties;if(!e)throw new Error("geojson is required");var r=p(e);return a([(r[0]+r[2])/2,(r[1]+r[3])/2],n)},y=n(543);function m(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function I(e){return!!e&&e.constructor===Object}function b(e,t,n){if(null!==e)for(var r,i,a,o,s,u,A,c,l=0,f=0,h=e.type,g="FeatureCollection"===h,d="Feature"===h,p=g?e.features.length:1,v=0;v<p;v++){s=(c=!!(A=g?e.features[v].geometry:d?e.geometry:e)&&"GeometryCollection"===A.type)?A.geometries.length:1;for(var y=0;y<s;y++){var m=0,I=0;if(null!==(o=c?A.geometries[y]:A)){u=o.coordinates;var E=o.type;switch(l=!n||"Polygon"!==E&&"MultiPolygon"!==E?0:1,E){case null:break;case"Point":if(!1===t(u,f,v,m,I))return!1;f++,m++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(!1===t(u[r],f,v,m,I))return!1;f++,"MultiPoint"===E&&m++}"LineString"===E&&m++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-l;i++){if(!1===t(u[r][i],f,v,m,I))return!1;f++}"MultiLineString"===E&&m++,"Polygon"===E&&I++}"Polygon"===E&&m++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for("MultiPolygon"===E&&(I=0),i=0;i<u[r].length;i++){for(a=0;a<u[r][i].length-l;a++){if(!1===t(u[r][i][a],f,v,m,I))return!1;f++}I++}m++}break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===b(o.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}var E=n(319);function C(e,t,n){if(!I(n=n||{}))throw new Error("options is invalid");var r=n.mutate;if(!e)throw new Error("geojson is required");return Array.isArray(e)&&m(e[0])?e="mercator"===t?B(e):w(e):(!0!==r&&(e=Object(E.a)(e)),b(e,(function(e){var n="mercator"===t?B(e):w(e);e[0]=n[0],e[1]=n[1]}))),e}function B(e){var t,n=Math.PI/180,r=6378137,i=20037508.342789244,a=[r*(Math.abs(e[0])<=180?e[0]:e[0]-360*((t=e[0])<0?-1:t>0?1:0))*n,r*Math.log(Math.tan(.25*Math.PI+.5*e[1]*n))];return a[0]>i&&(a[0]=i),a[0]<-i&&(a[0]=-i),a[1]>i&&(a[1]=i),a[1]<-i&&(a[1]=-i),a}function w(e){var t=180/Math.PI,n=6378137;return[e[0]*t/n,(.5*Math.PI-2*Math.atan(Math.exp(-e[1]/n)))*t]}var Q=function(){return new k};function k(){this.reset()}k.prototype={constructor:k,reset:function(){this.s=this.t=0},add:function(e){x(_,e,this.t),x(this,_.s,this.s),this.s?this.t+=_.t:this.s=_.t},valueOf:function(){return this.s}};var _=new k;function x(e,t,n){var r=e.s=t+n,i=r-t,a=r-i;e.t=t-a+(n-i)}var S=1e-6,O=Math.PI,D=O/2,R=O/4,j=2*O,M=180/O,N=O/180,F=Math.abs,T=Math.atan,L=Math.atan2,P=Math.cos,U=(Math.ceil,Math.exp),G=(Math.floor,Math.log),q=(Math.pow,Math.sin),H=(Math.sign,Math.sqrt),Y=Math.tan;function J(e){return e>1?0:e<-1?O:Math.acos(e)}function z(e){return e>1?D:e<-1?-D:Math.asin(e)}function K(){}function W(e,t){e&&X.hasOwnProperty(e.type)&&X[e.type](e,t)}var V={Feature:function(e,t){W(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)W(n[r].geometry,t)}},X={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){Z(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Z(n[r],t,0)},Polygon:function(e,t){$(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)$(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)W(n[r],t)}};function Z(e,t,n){var r,i=-1,a=e.length-n;for(t.lineStart();++i<a;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function $(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)Z(e[n],t,1);t.polygonEnd()}var ee=function(e,t){e&&V.hasOwnProperty(e.type)?V[e.type](e,t):W(e,t)};Q(),Q();function te(e){return[L(e[1],e[0]),z(e[2])]}function ne(e){var t=e[0],n=e[1],r=P(n);return[r*P(t),r*q(t),q(n)]}function re(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function ie(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function ae(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function oe(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function se(e){var t=H(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}Q();var ue=function(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n};function Ae(e,t){return[e>O?e-j:e<-O?e+j:e,t]}function ce(e,t,n){return(e%=j)?t||n?ue(fe(e),he(t,n)):fe(e):t||n?he(t,n):Ae}function le(e){return function(t,n){return[(t+=e)>O?t-j:t<-O?t+j:t,n]}}function fe(e){var t=le(e);return t.invert=le(-e),t}function he(e,t){var n=P(e),r=q(e),i=P(t),a=q(t);function o(e,t){var o=P(t),s=P(e)*o,u=q(e)*o,A=q(t),c=A*n+s*r;return[L(u*i-c*a,s*n-A*r),z(c*i+u*a)]}return o.invert=function(e,t){var o=P(t),s=P(e)*o,u=q(e)*o,A=q(t),c=A*i-u*a;return[L(u*i+A*a,s*n+c*r),z(c*n-s*r)]},o}Ae.invert=Ae;function ge(e,t,n,r,i,a){if(n){var o=P(t),s=q(t),u=r*n;null==i?(i=t+r*j,a=t-u/2):(i=de(o,i),a=de(o,a),(r>0?i<a:i>a)&&(i+=r*j));for(var A,c=i;r>0?c>a:c<a;c-=u)A=te([o,-s*P(c),-s*q(c)]),e.point(A[0],A[1])}}function de(e,t){(t=ne(t))[0]-=e,se(t);var n=J(-t[1]);return((-t[2]<0?-n:n)+j-S)%j}var pe=function(){var e,t=[];return{point:function(t,n){e.push([t,n])},lineStart:function(){t.push(e=[])},lineEnd:K,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}},ve=function(e,t){return F(e[0]-t[0])<S&&F(e[1]-t[1])<S};function ye(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var me=function(e,t,n,r,i){var a,o,s=[],u=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n,r=e[0],o=e[t];if(ve(r,o)){for(i.lineStart(),a=0;a<t;++a)i.point((r=e[a])[0],r[1]);i.lineEnd()}else s.push(n=new ye(r,e,null,!0)),u.push(n.o=new ye(r,null,n,!1)),s.push(n=new ye(o,e,null,!1)),u.push(n.o=new ye(o,null,n,!0))}})),s.length){for(u.sort(t),Ie(s),Ie(u),a=0,o=u.length;a<o;++a)u[a].e=n=!n;for(var A,c,l=s[0];;){for(var f=l,h=!0;f.v;)if((f=f.n)===l)return;A=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(h)for(a=0,o=A.length;a<o;++a)i.point((c=A[a])[0],c[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(h)for(A=f.p.z,a=A.length-1;a>=0;--a)i.point((c=A[a])[0],c[1]);else r(f.x,f.p.x,-1,i);f=f.p}A=(f=f.o).z,h=!h}while(!f.v);i.lineEnd()}}};function Ie(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r<t;)i.n=n=e[r],n.p=i,i=n;i.n=n=e[0],n.p=i}}var be=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN};var Ee=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return be(t(e),n)}),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)<0?r=a+1:i=a}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)>0?i=a:r=a+1}return r}}}(be);Ee.right,Ee.left;var Ce=Array.prototype;Ce.slice,Ce.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);var Be=function(e){for(var t,n,r,i=e.length,a=-1,o=0;++a<i;)o+=e[a].length;for(n=new Array(o);--i>=0;)for(t=(r=e[i]).length;--t>=0;)n[--o]=r[t];return n};function we(e,t,n,r){function i(i,a){return e<=i&&i<=n&&t<=a&&a<=r}function a(i,a,s,A){var c=0,l=0;if(null==i||(c=o(i,s))!==(l=o(a,s))||u(i,a)<0^s>0)do{A.point(0===c||3===c?e:n,c>1?r:t)}while((c=(c+s+4)%4)!==l);else A.point(a[0],a[1])}function o(r,i){return F(r[0]-e)<S?i>0?0:3:F(r[0]-n)<S?i>0?2:1:F(r[1]-t)<S?i>0?1:0:i>0?3:2}function s(e,t){return u(e.x,t.x)}function u(e,t){var n=o(e,1),r=o(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(o){var u,A,c,l,f,h,g,d,p,v,y,m=o,I=pe(),b={point:E,lineStart:function(){b.point=C,A&&A.push(c=[]);v=!0,p=!1,g=d=NaN},lineEnd:function(){u&&(C(l,f),h&&p&&I.rejoin(),u.push(I.result()));b.point=E,p&&m.lineEnd()},polygonStart:function(){m=I,u=[],A=[],y=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,i=A.length;n<i;++n)for(var a,o,s=A[n],u=1,c=s.length,l=s[0],f=l[0],h=l[1];u<c;++u)a=f,o=h,l=s[u],f=l[0],h=l[1],o<=r?h>r&&(f-a)*(r-o)>(h-o)*(e-a)&&++t:h<=r&&(f-a)*(r-o)<(h-o)*(e-a)&&--t;return t}(),n=y&&t,i=(u=Be(u)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&me(u,s,t,a,o),o.polygonEnd());m=o,u=A=c=null}};function E(e,t){i(e,t)&&m.point(e,t)}function C(a,o){var s=i(a,o);if(A&&c.push([a,o]),v)l=a,f=o,h=s,v=!1,s&&(m.lineStart(),m.point(a,o));else if(s&&p)m.point(a,o);else{var u=[g=Math.max(-1e9,Math.min(1e9,g)),d=Math.max(-1e9,Math.min(1e9,d))],I=[a=Math.max(-1e9,Math.min(1e9,a)),o=Math.max(-1e9,Math.min(1e9,o))];!function(e,t,n,r,i,a){var o,s=e[0],u=e[1],A=0,c=1,l=t[0]-s,f=t[1]-u;if(o=n-s,l||!(o>0)){if(o/=l,l<0){if(o<A)return;o<c&&(c=o)}else if(l>0){if(o>c)return;o>A&&(A=o)}if(o=i-s,l||!(o<0)){if(o/=l,l<0){if(o>c)return;o>A&&(A=o)}else if(l>0){if(o<A)return;o<c&&(c=o)}if(o=r-u,f||!(o>0)){if(o/=f,f<0){if(o<A)return;o<c&&(c=o)}else if(f>0){if(o>c)return;o>A&&(A=o)}if(o=a-u,f||!(o<0)){if(o/=f,f<0){if(o>c)return;o>A&&(A=o)}else if(f>0){if(o<A)return;o<c&&(c=o)}return A>0&&(e[0]=s+A*l,e[1]=u+A*f),c<1&&(t[0]=s+c*l,t[1]=u+c*f),!0}}}}}(u,I,e,t,n,r)?s&&(m.lineStart(),m.point(a,o),y=!1):(p||(m.lineStart(),m.point(u[0],u[1])),m.point(I[0],I[1]),s||m.lineEnd(),y=!1)}g=a,d=o,p=s}return b}}var Qe=Q(),ke=function(e,t){var n=t[0],r=t[1],i=[q(n),-P(n),0],a=0,o=0;Qe.reset();for(var s=0,u=e.length;s<u;++s)if(c=(A=e[s]).length)for(var A,c,l=A[c-1],f=l[0],h=l[1]/2+R,g=q(h),d=P(h),p=0;p<c;++p,f=y,g=I,d=b,l=v){var v=A[p],y=v[0],m=v[1]/2+R,I=q(m),b=P(m),E=y-f,C=E>=0?1:-1,B=C*E,w=B>O,Q=g*I;if(Qe.add(L(Q*C*q(B),d*b+Q*P(B))),a+=w?E+C*j:E,w^f>=n^y>=n){var k=ie(ne(l),ne(v));se(k);var _=ie(i,k);se(_);var x=(w^E>=0?-1:1)*z(_[2]);(r>x||r===x&&(k[0]||k[1]))&&(o+=w^E>=0?1:-1)}}return(a<-S||a<S&&Qe<-S)^1&o};Q();var _e=function(e){return e};Q(),Q();var xe=1/0,Se=xe,Oe=-xe,De=Oe;var Re={point:function(e,t){e<xe&&(xe=e);e>Oe&&(Oe=e);t<Se&&(Se=t);t>De&&(De=t)},lineStart:K,lineEnd:K,polygonStart:K,polygonEnd:K,result:function(){var e=[[xe,Se],[Oe,De]];return Oe=De=-(Se=xe=1/0),e}};function je(e){this._context=e}je.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,j)}},result:K};Q();function Me(){this._string=[]}function Ne(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}Me.prototype={_radius:4.5,_circle:Ne(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=Ne(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}};var Fe=function(e,t,n,r){return function(i,a){var o,s,u,A=t(a),c=i.invert(r[0],r[1]),l=pe(),f=t(l),h=!1,g={point:d,lineStart:v,lineEnd:y,polygonStart:function(){g.point=m,g.lineStart=I,g.lineEnd=b,s=[],o=[]},polygonEnd:function(){g.point=d,g.lineStart=v,g.lineEnd=y,s=Be(s);var e=ke(o,c);s.length?(h||(a.polygonStart(),h=!0),me(s,Le,e,n,a)):e&&(h||(a.polygonStart(),h=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),h&&(a.polygonEnd(),h=!1),s=o=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function d(t,n){var r=i(t,n);e(t=r[0],n=r[1])&&a.point(t,n)}function p(e,t){var n=i(e,t);A.point(n[0],n[1])}function v(){g.point=p,A.lineStart()}function y(){g.point=d,A.lineEnd()}function m(e,t){u.push([e,t]);var n=i(e,t);f.point(n[0],n[1])}function I(){f.lineStart(),u=[]}function b(){m(u[0][0],u[0][1]),f.lineEnd();var e,t,n,r,i=f.clean(),A=l.result(),c=A.length;if(u.pop(),o.push(u),u=null,c)if(1&i){if((t=(n=A[0]).length-1)>0){for(h||(a.polygonStart(),h=!0),a.lineStart(),e=0;e<t;++e)a.point((r=n[e])[0],r[1]);a.lineEnd()}}else c>1&&2&i&&A.push(A.pop().concat(A.shift())),s.push(A.filter(Te))}return g}};function Te(e){return e.length>1}function Le(e,t){return((e=e.x)[0]<0?e[1]-D-S:D-e[1])-((t=t.x)[0]<0?t[1]-D-S:D-t[1])}var Pe=Fe((function(){return!0}),(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(a,o){var s=a>0?O:-O,u=F(a-n);F(u-O)<S?(e.point(n,r=(r+o)/2>0?D:-D),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(a,r),t=0):i!==s&&u>=O&&(F(n-i)<S&&(n-=i*S),F(a-s)<S&&(a-=s*S),r=function(e,t,n,r){var i,a,o=q(e-n);return F(o)>S?T((q(t)*(a=P(r))*q(n)-q(r)*(i=P(t))*q(e))/(i*a*o)):(t+r)/2}(n,r,a,o),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=a,r=o),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*D,r.point(-O,i),r.point(0,i),r.point(O,i),r.point(O,0),r.point(O,-i),r.point(0,-i),r.point(-O,-i),r.point(-O,0),r.point(-O,i);else if(F(e[0]-t[0])>S){var a=e[0]<t[0]?O:-O;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(t[0],t[1])}),[-O,-D]);var Ue=function(e,t){var n=P(e),r=n>0,i=F(n)>S;function a(e,t){return P(e)*P(t)>n}function o(e,t,r){var i=[1,0,0],a=ie(ne(e),ne(t)),o=re(a,a),s=a[0],u=o-s*s;if(!u)return!r&&e;var A=n*o/u,c=-n*s/u,l=ie(i,a),f=oe(i,A);ae(f,oe(a,c));var h=l,g=re(f,h),d=re(h,h),p=g*g-d*(re(f,f)-1);if(!(p<0)){var v=H(p),y=oe(h,(-g-v)/d);if(ae(y,f),y=te(y),!r)return y;var m,I=e[0],b=t[0],E=e[1],C=t[1];b<I&&(m=I,I=b,b=m);var B=b-I,w=F(B-O)<S;if(!w&&C<E&&(m=E,E=C,C=m),w||B<S?w?E+C>0^y[1]<(F(y[0]-I)<S?E:C):E<=y[1]&&y[1]<=C:B>O^(I<=y[0]&&y[0]<=b)){var Q=oe(h,(-g+v)/d);return ae(Q,f),[y,te(Q)]}}}function s(t,n){var i=r?e:O-e,a=0;return t<-i?a|=1:t>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return Fe(a,(function(e){var t,n,u,A,c;return{lineStart:function(){A=u=!1,c=1},point:function(l,f){var h,g=[l,f],d=a(l,f),p=r?d?0:s(l,f):d?s(l+(l<0?O:-O),f):0;if(!t&&(A=u=d)&&e.lineStart(),d!==u&&(!(h=o(t,g))||ve(t,h)||ve(g,h))&&(g[0]+=S,g[1]+=S,d=a(g[0],g[1])),d!==u)c=0,d?(e.lineStart(),h=o(g,t),e.point(h[0],h[1])):(h=o(t,g),e.point(h[0],h[1]),e.lineEnd()),t=h;else if(i&&t&&r^d){var v;p&n||!(v=o(g,t,!0))||(c=0,r?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1])))}!d||t&&ve(t,g)||e.point(g[0],g[1]),t=g,u=d,n=p},lineEnd:function(){u&&e.lineEnd(),t=null},clean:function(){return c|(A&&u)<<1}}}),(function(n,r,i,a){ge(a,e,t,i,n,r)}),r?[0,-e]:[-O,e-O])};function Ge(e){return function(t){var n=new qe;for(var r in e)n[r]=e[r];return n.stream=t,n}}function qe(){}function He(e,t,n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=e.clipExtent&&e.clipExtent();e.scale(150).translate([0,0]),null!=a&&e.clipExtent(null),ee(n,e.stream(Re));var o=Re.result(),s=Math.min(r/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),u=+t[0][0]+(r-s*(o[1][0]+o[0][0]))/2,A=+t[0][1]+(i-s*(o[1][1]+o[0][1]))/2;return null!=a&&e.clipExtent(a),e.scale(150*s).translate([u,A])}function Ye(e,t,n){return He(e,[[0,0],t],n)}qe.prototype={constructor:qe,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Je=P(30*N),ze=function(e,t){return+t?function(e,t){function n(r,i,a,o,s,u,A,c,l,f,h,g,d,p){var v=A-r,y=c-i,m=v*v+y*y;if(m>4*t&&d--){var I=o+f,b=s+h,E=u+g,C=H(I*I+b*b+E*E),B=z(E/=C),w=F(F(E)-1)<S||F(a-l)<S?(a+l)/2:L(b,I),Q=e(w,B),k=Q[0],_=Q[1],x=k-r,O=_-i,D=y*x-v*O;(D*D/m>t||F((v*x+y*O)/m-.5)>.3||o*f+s*h+u*g<Je)&&(n(r,i,a,o,s,u,k,_,w,I/=C,b/=C,E,d,p),p.point(k,_),n(k,_,w,I,b,E,A,c,l,f,h,g,d,p))}}return function(t){var r,i,a,o,s,u,A,c,l,f,h,g,d={point:p,lineStart:v,lineEnd:m,polygonStart:function(){t.polygonStart(),d.lineStart=I},polygonEnd:function(){t.polygonEnd(),d.lineStart=v}};function p(n,r){n=e(n,r),t.point(n[0],n[1])}function v(){c=NaN,d.point=y,t.lineStart()}function y(r,i){var a=ne([r,i]),o=e(r,i);n(c,l,A,f,h,g,c=o[0],l=o[1],A=r,f=a[0],h=a[1],g=a[2],16,t),t.point(c,l)}function m(){d.point=p,t.lineEnd()}function I(){v(),d.point=b,d.lineEnd=E}function b(e,t){y(r=e,t),i=c,a=l,o=f,s=h,u=g,d.point=y}function E(){n(c,l,A,f,h,g,i,a,r,o,s,u,16,t),d.lineEnd=m,m()}return d}}(e,t):function(e){return Ge({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}(e)};var Ke=Ge({point:function(e,t){this.stream.point(e*N,t*N)}});function We(e){return Ve((function(){return e}))()}function Ve(e){var t,n,r,i,a,o,s,u,A,c,l=150,f=480,h=250,g=0,d=0,p=0,v=0,y=0,m=null,I=Pe,b=null,E=_e,C=.5,B=ze(k,C);function w(e){return[(e=a(e[0]*N,e[1]*N))[0]*l+n,r-e[1]*l]}function Q(e){return(e=a.invert((e[0]-n)/l,(r-e[1])/l))&&[e[0]*M,e[1]*M]}function k(e,i){return[(e=t(e,i))[0]*l+n,r-e[1]*l]}function _(){a=ue(i=ce(p,v,y),t);var e=t(g,d);return n=f-e[0]*l,r=h+e[1]*l,x()}function x(){return A=c=null,w}return w.stream=function(e){return A&&c===e?A:A=Ke(I(i,B(E(c=e))))},w.clipAngle=function(e){return arguments.length?(I=+e?Ue(m=e*N,6*N):(m=null,Pe),x()):m*M},w.clipExtent=function(e){return arguments.length?(E=null==e?(b=o=s=u=null,_e):we(b=+e[0][0],o=+e[0][1],s=+e[1][0],u=+e[1][1]),x()):null==b?null:[[b,o],[s,u]]},w.scale=function(e){return arguments.length?(l=+e,_()):l},w.translate=function(e){return arguments.length?(f=+e[0],h=+e[1],_()):[f,h]},w.center=function(e){return arguments.length?(g=e[0]%360*N,d=e[1]%360*N,_()):[g*M,d*M]},w.rotate=function(e){return arguments.length?(p=e[0]%360*N,v=e[1]%360*N,y=e.length>2?e[2]%360*N:0,_()):[p*M,v*M,y*M]},w.precision=function(e){return arguments.length?(B=ze(k,C=e*e),x()):H(C)},w.fitExtent=function(e,t){return He(w,e,t)},w.fitSize=function(e,t){return Ye(w,e,t)},function(){return t=e.apply(this,arguments),w.invert=t.invert&&Q,_()}}function Xe(e){return function(t,n){var r=P(t),i=P(n),a=e(r*i);return[a*i*q(t),a*q(n)]}}function Ze(e){return function(t,n){var r=H(t*t+n*n),i=e(r),a=q(i),o=P(i);return[L(t*a,r*o),z(r&&n*a/r)]}}var $e=Xe((function(e){return H(2/(1+e))}));$e.invert=Ze((function(e){return 2*z(e/2)}));var et=Xe((function(e){return(e=J(e))&&e/q(e)}));et.invert=Ze((function(e){return e}));function tt(e,t){return[e,G(Y((D+t)/2))]}tt.invert=function(e,t){return[e,2*T(U(t))-D]};function nt(e){var t,n,r,i=We(e),a=i.center,o=i.scale,s=i.translate,u=i.clipExtent,A=null;function c(){var a=O*o(),s=i(function(e){function t(t){return(t=e(t[0]*N,t[1]*N))[0]*=M,t[1]*=M,t}return e=ce(e[0]*N,e[1]*N,e.length>2?e[2]*N:0),t.invert=function(t){return(t=e.invert(t[0]*N,t[1]*N))[0]*=M,t[1]*=M,t},t}(i.rotate()).invert([0,0]));return u(null==A?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:e===tt?[[Math.max(s[0]-a,A),t],[Math.min(s[0]+a,n),r]]:[[A,Math.max(s[1]-a,t)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(e){return arguments.length?(o(e),c()):o()},i.translate=function(e){return arguments.length?(s(e),c()):s()},i.center=function(e){return arguments.length?(a(e),c()):a()},i.clipExtent=function(e){return arguments.length?(null==e?A=t=n=r=null:(A=+e[0][0],t=+e[0][1],n=+e[1][0],r=+e[1][1]),c()):null==A?null:[[A,t],[n,r]]},c()}function rt(e,t){return[e,t]}rt.invert=rt;function it(e,t){var n=P(t),r=P(e)*n;return[n*q(e)/r,q(t)/r]}it.invert=Ze(T);function at(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),t*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}at.invert=function(e,t){var n,r=t,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-t)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(F(n)>S&&--i>0);return[e/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]};function ot(e,t){return[P(t)*q(e),q(t)]}ot.invert=Ze(z);function st(e,t){var n=P(t),r=1+P(e)*n;return[n*q(e)/r,q(t)/r]}st.invert=Ze((function(e){return 2*T(e)}));function ut(e,t){return[G(Y((D+t)/2)),-e]}ut.invert=function(e,t){return[-t,2*T(U(e))-D]};function At(e,t,n,r){var a,A=e.properties||{},c="Feature"===e.type?e.geometry:e;if("GeometryCollection"===c.type){var l=[];return d(e,(function(e){var i=At(e,t,n,r);i&&l.push(i)})),o(l)}var f=p(e),h=f[1]>50&&f[3]>50;a=h?{type:c.type,coordinates:ct(c.coordinates,ft(c))}:function(e,t){return C(e,"mercator",t)}(c);var g,v=(new y.GeoJSONReader).read(a),m=s(u(t,n),"meters"),I=y.BufferOp.bufferOp(v,m);if(!function e(t){return Array.isArray(t[0])?e(t[0]):isNaN(t[0])}((I=(new y.GeoJSONWriter).write(I)).coordinates))return(g=h?{type:I.type,coordinates:lt(I.coordinates,ft(c))}:function(e,t){return C(e,"wgs84",t)}(I)).geometry?g:i(g,A)}function ct(e,t){return"object"!==typeof e[0]?t(e):e.map((function(e){return ct(e,t)}))}function lt(e,t){return"object"!==typeof e[0]?t.invert(e):e.map((function(e){return lt(e,t)}))}function ft(e){var t=v(e).geometry.coordinates.reverse(),n=t.map((function(e){return-e}));return function(){var e=nt(ut),t=e.center,n=e.rotate;return e.center=function(e){return arguments.length?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return arguments.length?n([e[0],e[1],e.length>2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90]).scale(159.155)}().center(t).rotate(n).scale(6371008.8)}t.default=function(e,t,n){var r=(n=n||{}).units,i=n.steps||64;if(!e)throw new Error("geojson is required");if("object"!==typeof n)throw new Error("options must be an object");if("number"!==typeof i)throw new Error("steps must be an number");if(void 0===t)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");i=i||64,r=r||"kilometers";var a=[];switch(e.type){case"GeometryCollection":return d(e,(function(e){var n=At(e,t,r,i);n&&a.push(n)})),o(a);case"FeatureCollection":return g(e,(function(e){var n=At(e,t,r,i);n&&g(n,(function(e){e&&a.push(e)}))})),o(a)}return At(e,t,r,i)}},function(e,t,n){"use strict";n.r(t);function r(e,t,n){if(!o(n=n||{}))throw new Error("options is invalid");var r=n.bbox,i=n.id;if(void 0===e)throw new Error("geometry is required");if(t&&t.constructor!==Object)throw new Error("properties must be an Object");r&&s(r),i&&u(i);var a={type:"Feature"};return i&&(a.id=i),r&&(a.bbox=r),a.properties=t||{},a.geometry=e,a}function i(e,t,n){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!a(e[0])||!a(e[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:e},t,n)}function a(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function o(e){return!!e&&e.constructor===Object}function s(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!a(e))throw new Error("bbox must only contain numbers")}))}function u(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}function A(e,t,n){if(null!==e)for(var r,i,a,o,s,u,c,l,f=0,h=0,g=e.type,d="FeatureCollection"===g,p="Feature"===g,v=d?e.features.length:1,y=0;y<v;y++){s=(l=!!(c=d?e.features[y].geometry:p?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var m=0;m<s;m++){var I=0,b=0;if(null!==(o=l?c.geometries[m]:c)){u=o.coordinates;var E=o.type;switch(f=!n||"Polygon"!==E&&"MultiPolygon"!==E?0:1,E){case null:break;case"Point":if(!1===t(u,h,y,I,b))return!1;h++,I++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(!1===t(u[r],h,y,I,b))return!1;h++,"MultiPoint"===E&&I++}"LineString"===E&&I++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-f;i++){if(!1===t(u[r][i],h,y,I,b))return!1;h++}"MultiLineString"===E&&I++,"Polygon"===E&&b++}"Polygon"===E&&I++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for("MultiPolygon"===E&&(b=0),i=0;i<u[r].length;i++){for(a=0;a<u[r][i].length-f;a++){if(!1===t(u[r][i][a],h,y,I,b))return!1;h++}b++}I++}break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===A(o.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}var c=function(e,t){var n=0,r=0,a=0;return A(e,(function(e){n+=e[0],r+=e[1],a++}),!0),i([n/a,r/a],t)},l=n(538),f=n(539),h=n(331),g=n(319);t.default=function(e,t,n){if(!o(n=n||{}))throw new Error("options is invalid");var r=n.pivot,i=n.mutate;if(!e)throw new Error("geojson is required");if(void 0===t||null===t||isNaN(t))throw new Error("angle is required");return 0===t||(r||(r=c(e)),!1!==i&&void 0!==i||(e=Object(g.a)(e)),A(e,(function(e){var n=Object(l.a)(r,e)+t,i=Object(f.a)(r,e),a=function(e){if(!e)throw new Error("coords is required");if("Feature"===e.type&&null!==e.geometry)return e.geometry.coordinates;if(e.coordinates)return e.coordinates;if(Array.isArray(e))return e;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(Object(h.a)(r,i,n));e[0]=a[0],e[1]=a[1]}))),e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n.n(r),a=n(368);function o(){return i.a.useContext(a.a)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(396),i=(Object(r.a)((function(e){return{paper:{backgroundColor:e.palette.background.paper},span:{width:"70px",textAlign:"center",paddingLeft:"2px",paddingRight:"2px"},colors:{"&:hover":{backgroundColor:"transparent"},paddingLeft:"2px",paddingRight:"2px"},popper:{zIndex:4}}})),Object(r.a)((function(e){return{root:{paddingLeft:e.spacing(1),paddingRight:e.spacing(1),width:"100%",flexDirection:"column"}}}))),a=Object(r.a)((function(e){return{root:{marginBottom:e.spacing(-2),top:e.spacing(-1),paddingLeft:e.spacing(1),paddingRight:e.spacing(1),textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},expanded:{marginBottom:e.spacing(-3),top:e.spacing(-1),textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},expandIcon:{"&$expanded":{top:e.spacing(-1.3)}}}}))},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(933);function i(e,t){return e?Object(r.a)().x((function(e){return t(e[1])[0]})).y((function(e){return t(e[1])[1]})).addAll(e):null}},function(e,t,n){"use strict";var r=n(24),i=n(11),a=n(13),o=n(8),s=n(14),u=n(15),A=n(0),c=n.n(A),l=n(284),f=n(413),h=n(320);function g(){return(g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function d(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=A.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),v=A.createElement("path",{d:"M21 3L3 10.53v.98l6.84 2.65L12.48 21h.98L21 3z"});function y(e){var t=e.svgRef,n=e.title,r=e.titleId,i=d(e,["svgRef","title","titleId"]);return A.createElement("svg",g({width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},i),n?A.createElement("title",{id:r},n):null,p,v)}var m=A.forwardRef((function(e,t){return A.createElement(y,g({svgRef:t},e))}));n.p;function I(){return(I=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function b(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var E=A.createElement("path",{d:"       M19 19h2v2h-2v-2zm0-2h2v-2h-2v2z       M3 13h2v-2H3v2zm0 4h2v-2H3v2z       m0-8h2V7H3v2zm0-4h2V3H3v2z       m4 0h2V3H7v2zm8 16h2v-2h-2v2z       m-4 0h2v-2h-2v2z       m4 0h2v-2h-2v2z       m-8 0h2v-2H7v2z       m-4 0h2v-2H3v2z       M11 5h2v-2h-2v2z       M15 5h2v-2h-2v2z       M19 5h2v-2h-2v2z       M19 9h2v-2h-2v2z       M19 13h2v-2h-2v2z     "});function C(e){var t=e.svgRef,n=e.title,r=e.titleId,i=b(e,["svgRef","title","titleId"]);return A.createElement("svg",I({width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},i),n?A.createElement("title",{id:r},n):null,E)}var B=A.forwardRef((function(e,t){return A.createElement(C,I({svgRef:t},e))}));n.p;function w(){return(w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Q(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function k(e){var t=e.svgRef,n=e.title,r=e.titleId,i=Q(e,["svgRef","title","titleId"]);return A.createElement("svg",w({width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},i),n?A.createElement("title",{id:r},n):null,A.createElement("g",{transform:"translate(0,3)"},A.createElement("path",{style:{strokeWidth:.343565},d:"M 23.942314,4.6958443 C 23.446206,1.8868581 19.727461,0 14.687364,0 13.437819,0 12.150138,0.11543779 10.859708,0.34287772 4.1629423,1.5250844 -0.58168816,5.2884937 0.05768601,8.911385 c 0.25355086,1.439193 1.35605049,2.63583 3.04638949,3.461072 -0.2569865,0.387198 -0.4074679,0.826617 -0.4074679,1.29524 0,1.337498 1.1863293,2.457176 2.7639791,2.728248 l -1.3615475,2.333149 c -0.1576963,0.271073 -0.066308,0.61876 0.2047647,0.776457 0.090014,0.05291 0.1886171,0.07799 0.2858459,0.07799 0.1951448,0 0.3851362,-0.100665 0.4912977,-0.281723 l 1.6803757,-2.88148 C 8.41868,16.20561 9.6895264,15.063601 9.6998333,13.683844 c 6.872e-4,-0.0055 0.00137,-0.01065 0.00137,-0.01615 0,-0.02336 -0.00344,-0.04569 -0.00481,-0.06837 1.1292977,-0.0213 2.2847067,-0.130211 3.4435507,-0.334975 6.69711,-1.181863 11.44174,-4.9456164 10.802366,-8.5685077 z M 3.83312,13.667353 c 0,-0.30749 0.1281497,-0.59849 0.3470005,-0.848261 0.1219655,0.04295 0.2456489,0.08383 0.3717372,0.123339 l 1.2234344,2.352045 C 4.6865351,15.149835 3.83312,14.46408 3.83312,13.667353 Z M 7.0141869,15.216144 6.0223152,13.309702 5.4008064,12.114097 c 0.121622,-0.03161 0.2477103,-0.05634 0.3772342,-0.07387 0.1367388,-0.0189 0.2772568,-0.02886 0.420867,-0.02886 0.5067581,0 0.980534,0.11956 1.3701366,0.317454 0.5696305,0.289968 0.9554538,0.750345 0.9904974,1.262944 0.00137,0.02542 0.0055,0.05016 0.0055,0.07593 0,0.698124 -0.6562089,1.310356 -1.5508518,1.548447 z m 5.9185921,-3.126441 c -1.217251,0.214728 -2.429691,0.323982 -3.6060571,0.324669 -0.5765018,-0.911821 -1.7614569,-1.53917 -3.1278143,-1.53917 -0.4717146,0 -0.921441,0.07593 -1.332001,0.211292 -0.3061162,0.100665 -0.5878394,0.237403 -0.8427645,0.39991 C 2.4598914,10.828133 1.4360682,9.8579062 1.2319907,8.7035283 0.72660678,5.8381974 5.2307418,2.5475333 11.067221,1.5175259 c 1.222061,-0.2161023 2.439998,-0.3246688 3.620143,-0.3246688 4.371863,0 7.694479,1.5250844 8.080645,3.7101568 0.505041,2.8653309 -3.998751,6.1566821 -9.83523,7.1866891 z",id:"path10"})))}var _=A.forwardRef((function(e,t){return A.createElement(k,w({svgRef:t},e))}));n.p;function x(e){var t=e.alt,n=e.onClick,r=e.isActive,i=e.children,a="btn btn-outline-secondary mr-2 icon",o="".concat(a," active");return c.a.createElement("button",{className:r?o:a,onClick:n,type:"button",title:t},i)}function S(e){var t=e.setActiveTool,n=e.activeTool,r=e.visibleTools,i=void 0===r?{pan:!0,selectRectangle:!0,selectLasso:!0}:r;return c.a.createElement("div",{className:"tool"},i.pan&&c.a.createElement(x,{alt:"pointer tool",onClick:function(){return t(null)},isActive:null===n},c.a.createElement(m,null)),i.selectRectangle&&c.a.createElement(x,{alt:"select rectangle",onClick:function(){return t(h.SELECTION_TYPE.RECTANGLE)},isActive:n===h.SELECTION_TYPE.RECTANGLE},c.a.createElement(B,null)),i.selectLasso&&c.a.createElement(x,{alt:"select lasso",onClick:function(){return t(h.SELECTION_TYPE.POLYGON)},isActive:n===h.SELECTION_TYPE.POLYGON},c.a.createElement(_,null)))}var O=n(85),D=function(){return"crosshair"},R=function(e){return e.isDragging?"grabbing":"default"};n.d(t,"a",(function(){return j}));var j=function(e){Object(s.a)(n,e);var t=Object(u.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).state={gl:null,tool:null},r.viewport=null,r.onViewStateChange=r.onViewStateChange.bind(Object(o.a)(r)),r.onInitializeViewInfo=r.onInitializeViewInfo.bind(Object(o.a)(r)),r.onWebGLInitialized=r.onWebGLInitialized.bind(Object(o.a)(r)),r.onToolChange=r.onToolChange.bind(Object(o.a)(r)),r}return Object(a.a)(n,[{key:"onViewStateChange",value:function(e){var t=e.viewState;(0,this.props.setViewState)(t)}},{key:"onInitializeViewInfo",value:function(e){var t=e.viewport;this.viewport=t}},{key:"onWebGLInitialized",value:function(e){this.setState({gl:e})}},{key:"onToolChange",value:function(e){var t=this.props.onToolChange;this.setState({tool:e}),t&&t(e)}},{key:"getLayers",value:function(){return[]}},{key:"viewInfoDidUpdate",value:function(e){var t=this.props,n=t.updateViewInfo,i=t.cells,a=t.uuid,o=this.viewport;n&&o&&n({uuid:a,project:function(t){var n=i[t];try{var a=e(n),s=Object(r.a)(a,2),u=s[0],A=s[1];return o.project([u,A])}catch(c){return[null,null]}}})}},{key:"componentDidUpdate",value:function(){}},{key:"render",value:function(){var e=this.props,t=e.deckRef,n=e.viewState,r=e.uuid,i=this.state,a=i.gl,o=i.tool,s=this.getLayers(),u=null!==this.cellsLayer,A=null!==this.cellsLayer;return c.a.createElement(c.a.Fragment,null,c.a.createElement(S,{activeTool:o,setActiveTool:this.onToolChange,visibleTools:{pan:A,selectRectangle:u,selectLasso:u}}),c.a.createElement(l.a,{id:"deckgl-overlay-".concat(r),ref:t,views:[new f.a({id:"ortho"})],layers:a?s:[],glOptions:O.c,onWebGLInitialized:this.onWebGLInitialized,onViewStateChange:this.onViewStateChange,viewState:n,controller:!o||{dragPan:!1},getCursor:o?D:R},this.onInitializeViewInfo))}}]),n}(A.PureComponent)},,,,,,,function(e,t,n){var r=n(779),i=n(747),a=n(780);e.exports=function(e){return function(t,n,o){return o&&"number"!=typeof o&&i(t,n,o)&&(n=o=void 0),t=a(t),void 0===n?(n=t,t=0):n=a(n),o=void 0===o?t<n?1:-1:a(o),r(t,n,o,e)}}},function(e,t){var n=Math.ceil,r=Math.max;e.exports=function(e,t,i,a){for(var o=-1,s=r(n((t-e)/(i||1)),0),u=Array(s);s--;)u[a?s:++o]=e,e+=i;return u}},function(e,t,n){var r=n(387);e.exports=function(e){return e?(e=r(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72);t.default=function(e,t){var n=!1;return r.featureCollection(function(e){if(e.length<3)return[];e.sort(a);var t,n,r,s,u,A,c=e.length-1,l=e[c].x,f=e[0].x,h=e[c].y,g=h;for(;c--;)e[c].y<h&&(h=e[c].y),e[c].y>g&&(g=e[c].y);var d,p=f-l,v=g-h,y=p>v?p:v,m=.5*(f+l),I=.5*(g+h),b=[new i({__sentinel:!0,x:m-20*y,y:I-y},{__sentinel:!0,x:m,y:I+20*y},{__sentinel:!0,x:m+20*y,y:I-y})],E=[],C=[];c=e.length;for(;c--;){for(C.length=0,d=b.length;d--;)(p=e[c].x-b[d].x)>0&&p*p>b[d].r?(E.push(b[d]),b.splice(d,1)):(v=e[c].y-b[d].y,p*p+v*v>b[d].r||(C.push(b[d].a,b[d].b,b[d].b,b[d].c,b[d].c,b[d].a),b.splice(d,1)));for(o(C),d=C.length;d;)n=C[--d],t=C[--d],r=e[c],s=n.x-t.x,u=n.y-t.y,A=2*(s*(r.y-n.y)-u*(r.x-n.x)),Math.abs(A)>1e-12&&b.push(new i(t,n,r))}Array.prototype.push.apply(E,b),c=E.length;for(;c--;)(E[c].a.__sentinel||E[c].b.__sentinel||E[c].c.__sentinel)&&E.splice(c,1);return E}(e.features.map((function(e){var r={x:e.geometry.coordinates[0],y:e.geometry.coordinates[1]};return t?r.z=e.properties[t]:3===e.geometry.coordinates.length&&(n=!0,r.z=e.geometry.coordinates[2]),r}))).map((function(e){var t=[e.a.x,e.a.y],i=[e.b.x,e.b.y],a=[e.c.x,e.c.y],o={};return n?(t.push(e.a.z),i.push(e.b.z),a.push(e.c.z)):o={a:e.a.z,b:e.b.z,c:e.c.z},r.polygon([[t,i,a,t]],o)})))};var i=function(e,t,n){this.a=e,this.b=t,this.c=n;var r,i,a=t.x-e.x,o=t.y-e.y,s=n.x-e.x,u=n.y-e.y,A=a*(e.x+t.x)+o*(e.y+t.y),c=s*(e.x+n.x)+u*(e.y+n.y),l=2*(a*(n.y-t.y)-o*(n.x-t.x));this.x=(u*A-o*c)/l,this.y=(a*c-s*A)/l,r=this.x-e.x,i=this.y-e.y,this.r=r*r+i*i};function a(e,t){return t.x-e.x}function o(e){var t,n,r,i,a,o=e.length;e:for(;o;)for(n=e[--o],t=e[--o],r=o;r;)if(a=e[--r],t===(i=e[--r])&&n===a||t===a&&n===i){e.splice(o,2),e.splice(r,2),o-=2;continue e}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(485)),a=n(72),o=n(114),s=n(145),u=r(n(783)),A=r(n(784));t.default=function(e,t){if(void 0===t&&(t={}),t=t||{},!a.isObject(t))throw new Error("options is invalid");var n=t.mutate;if("FeatureCollection"!==o.getType(e))throw new Error("geojson must be a FeatureCollection");if(!e.features.length)throw new Error("geojson is empty");!1!==n&&void 0!==n||(e=i.default(e));var r=function(e){var t={};s.flattenEach(e,(function(e){t[e.geometry.type]=!0}));var n=Object.keys(t);if(1===n.length)return n[0];return null}(e);if(!r)throw new Error("geojson must be homogenous");var c=e;switch(r){case"LineString":return u.default(c,t);case"Polygon":return A.default(c,t);default:throw new Error(r+" is not supported")}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(485)),a=n(72),o=n(114),s=n(145);function u(e){return e[0].toString()+","+e[1].toString()}t.default=function(e,t){if(void 0===t&&(t={}),t=t||{},!a.isObject(t))throw new Error("options is invalid");var n=t.mutate;if("FeatureCollection"!==o.getType(e))throw new Error("geojson must be a FeatureCollection");if(!e.features.length)throw new Error("geojson is empty");!1!==n&&void 0!==n||(e=i.default(e));var r=[],A=s.lineReduce(e,(function(e,t){var n=function(e,t){var n,r=e.geometry.coordinates,i=t.geometry.coordinates,o=u(r[0]),s=u(r[r.length-1]),A=u(i[0]),c=u(i[i.length-1]);if(o===c)n=i.concat(r.slice(1));else if(A===s)n=r.concat(i.slice(1));else if(o===A)n=r.slice(1).reverse().concat(i);else{if(s!==c)return null;n=r.concat(i.reverse().slice(1))}return a.lineString(n)}(e,t);return n||(r.push(e),t)}));return A&&r.push(A),r.length?1===r.length?r[0]:a.multiLineString(r.map((function(e){return e.coordinates}))):null}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(485)),a=n(72),o=n(114),s=n(145),u=n(797);t.default=function(e,t){if(void 0===t&&(t={}),"FeatureCollection"!==o.getType(e))throw new Error("geojson must be a FeatureCollection");if(!e.features.length)throw new Error("geojson is empty");!1!==t.mutate&&void 0!==t.mutate||(e=i.default(e));var n=[];s.flattenEach(e,(function(e){n.push(e.geometry)}));var r=u.topology({geoms:a.geometryCollection(n).geometry});return u.merge(r,r.objects.geoms.geometries)}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(1020),i=n(872);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t){e.exports=!0},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(478);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){var r=n(522),i=n(1207),a=n(349);e.exports=function(e){return a(e)?r(e,!0):i(e)}},function(e,t){var n=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:n,MAX_SAFE_COMPONENT_LENGTH:16}},function(e,t,n){(function(t){var n="object"===typeof t&&Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0})&&Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).NODE_DEBUG&&/\bsemver\b/i.test(Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).NODE_DEBUG)?function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=console).error.apply(e,["SEMVER"].concat(n))}:function(){};e.exports=n}).call(this,n(86))},function(e,t,n){var r=n(378);e.exports=function(e,t,n){return r(e,t,n)>0}},function(e,t,n){var r=n(479),i=n(480),a=Symbol("SemVer ANY"),o=function(){"use strict";function e(t,n){if(r(this,e),n&&"object"===typeof n||(n={loose:!!n,includePrerelease:!1}),t instanceof e){if(t.loose===!!n.loose)return t;t=t.value}l("comparator",t,n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===a?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}return i(e,null,[{key:"ANY",get:function(){return a}}]),i(e,[{key:"parse",value:function(e){var t=this.options.loose?u[A.COMPARATORLOOSE]:u[A.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: ".concat(e));this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new f(n[2],this.options.loose):this.semver=a}},{key:"toString",value:function(){return this.value}},{key:"test",value:function(e){if(l("Comparator.test",e,this.options.loose),this.semver===a||e===a)return!0;if("string"===typeof e)try{e=new f(e,this.options)}catch(t){return!1}return c(e,this.operator,this.semver,this.options)}},{key:"intersects",value:function(t,n){if(!(t instanceof e))throw new TypeError("a Comparator is required");if(n&&"object"===typeof n||(n={loose:!!n,includePrerelease:!1}),""===this.operator)return""===this.value||new h(t.value,n).test(this.value);if(""===t.operator)return""===t.value||new h(this.value,n).test(t.semver);var r=(">="===this.operator||">"===this.operator)&&(">="===t.operator||">"===t.operator),i=("<="===this.operator||"<"===this.operator)&&("<="===t.operator||"<"===t.operator),a=this.semver.version===t.semver.version,o=(">="===this.operator||"<="===this.operator)&&(">="===t.operator||"<="===t.operator),s=c(this.semver,"<",t.semver,n)&&(">="===this.operator||">"===this.operator)&&("<="===t.operator||"<"===t.operator),u=c(this.semver,">",t.semver,n)&&("<="===this.operator||"<"===this.operator)&&(">="===t.operator||">"===t.operator);return r||i||a&&o||s||u}}]),e}();e.exports=o;var s=n(722),u=s.re,A=s.t,c=n(1050),l=n(793),f=n(321),h=n(379)},function(e,t,n){var r=n(379);e.exports=function(e,t,n){try{t=new r(t,n)}catch(i){return!1}return t.test(e)}},function(e,t,n){"use strict";n.r(t);var r=function(e){return e},i=function(e){if(null==e)return r;var t,n,i=e.scale[0],a=e.scale[1],o=e.translate[0],s=e.translate[1];return function(e,r){r||(t=n=0);var u=2,A=e.length,c=new Array(A);for(c[0]=(t+=e[0])*i+o,c[1]=(n+=e[1])*a+s;u<A;)c[u]=e[u],++u;return c}},a=function(e){var t,n=i(e.transform),r=1/0,a=r,o=-r,s=-r;function u(e){(e=n(e))[0]<r&&(r=e[0]),e[0]>o&&(o=e[0]),e[1]<a&&(a=e[1]),e[1]>s&&(s=e[1])}function A(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(A);break;case"Point":u(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(u)}}for(t in e.arcs.forEach((function(e){for(var t,i=-1,u=e.length;++i<u;)(t=n(e[i],i))[0]<r&&(r=t[0]),t[0]>o&&(o=t[0]),t[1]<a&&(a=t[1]),t[1]>s&&(s=t[1])})),e.objects)A(e.objects[t]);return[r,a,o,s]},o=function(e,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return s(e,t)}))}:s(e,t)};function s(e,t){var n=t.id,r=t.bbox,i=null==t.properties?{}:t.properties,a=u(e,t);return null==n&&null==r?{type:"Feature",properties:i,geometry:a}:null==r?{type:"Feature",id:n,properties:i,geometry:a}:{type:"Feature",id:n,bbox:r,properties:i,geometry:a}}function u(e,t){var n=i(e.transform),r=e.arcs;function a(e,t){t.length&&t.pop();for(var i=r[e<0?~e:e],a=0,o=i.length;a<o;++a)t.push(n(i[a],a));e<0&&function(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}(t,o)}function o(e){return n(e)}function s(e){for(var t=[],n=0,r=e.length;n<r;++n)a(e[n],t);return t.length<2&&t.push(t[0]),t}function u(e){for(var t=s(e);t.length<4;)t.push(t[0]);return t}function A(e){return e.map(u)}return function e(t){var n,r=t.type;switch(r){case"GeometryCollection":return{type:r,geometries:t.geometries.map(e)};case"Point":n=o(t.coordinates);break;case"MultiPoint":n=t.coordinates.map(o);break;case"LineString":n=s(t.arcs);break;case"MultiLineString":n=t.arcs.map(s);break;case"Polygon":n=A(t.arcs);break;case"MultiPolygon":n=t.arcs.map(A);break;default:return null}return{type:r,coordinates:n}}(t)}var A=function(e,t){var n={},r={},i={},a=[],o=-1;function s(e,t){for(var r in e){var i=e[r];delete t[i.start],delete i.start,delete i.end,i.forEach((function(e){n[e<0?~e:e]=1})),a.push(i)}}return t.forEach((function(n,r){var i,a=e.arcs[n<0?~n:n];a.length<3&&!a[1][0]&&!a[1][1]&&(i=t[++o],t[o]=n,t[r]=i)})),t.forEach((function(t){var n,a,o=function(t){var n,r=e.arcs[t<0?~t:t],i=r[0];e.transform?(n=[0,0],r.forEach((function(e){n[0]+=e[0],n[1]+=e[1]}))):n=r[r.length-1];return t<0?[n,i]:[i,n]}(t),s=o[0],u=o[1];if(n=i[s])if(delete i[n.end],n.push(t),n.end=u,a=r[u]){delete r[a.start];var A=a===n?n:n.concat(a);r[A.start=n.start]=i[A.end=a.end]=A}else r[n.start]=i[n.end]=n;else if(n=r[u])if(delete r[n.start],n.unshift(t),n.start=s,a=i[s]){delete i[a.end];var c=a===n?n:a.concat(n);r[c.start=a.start]=i[c.end=n.end]=c}else r[n.start]=i[n.end]=n;else r[(n=[t]).start=s]=i[n.end=u]=n})),s(i,r),s(r,i),t.forEach((function(e){n[e<0?~e:e]||a.push([e])})),a},c=function(e){return u(e,l.apply(this,arguments))};function l(e,t,n){var r,i,a;if(arguments.length>1)r=f(e,t,n);else for(i=0,r=new Array(a=e.arcs.length);i<a;++i)r[i]=i;return{type:"MultiLineString",arcs:A(e,r)}}function f(e,t,n){var r,i=[],a=[];function o(e){var t=e<0?~e:e;(a[t]||(a[t]=[])).push({i:e,g:r})}function s(e){e.forEach(o)}function u(e){e.forEach(s)}return function e(t){switch(r=t,t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"LineString":s(t.arcs);break;case"MultiLineString":case"Polygon":u(t.arcs);break;case"MultiPolygon":!function(e){e.forEach(u)}(t.arcs)}}(t),a.forEach(null==n?function(e){i.push(e[0].i)}:function(e){n(e[0].g,e[e.length-1].g)&&i.push(e[0].i)}),i}var h=function(e){return u(e,g.apply(this,arguments))};function g(e,t){var n={},r=[],i=[];function a(e){e.forEach((function(t){t.forEach((function(t){(n[t=t<0?~t:t]||(n[t]=[])).push(e)}))})),r.push(e)}function o(t){return function(e){for(var t,n=-1,r=e.length,i=e[r-1],a=0;++n<r;)t=i,i=e[n],a+=t[0]*i[1]-t[1]*i[0];return Math.abs(a)}(u(e,{type:"Polygon",arcs:[t]}).coordinates[0])}return t.forEach((function e(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"Polygon":a(t.arcs);break;case"MultiPolygon":t.arcs.forEach(a)}})),r.forEach((function(e){if(!e._){var t=[],r=[e];for(e._=1,i.push(t);e=r.pop();)t.push(e),e.forEach((function(e){e.forEach((function(e){n[e<0?~e:e].forEach((function(e){e._||(e._=1,r.push(e))}))}))}))}})),r.forEach((function(e){delete e._})),{type:"MultiPolygon",arcs:i.map((function(t){var r,i=[];if(t.forEach((function(e){e.forEach((function(e){e.forEach((function(e){n[e<0?~e:e].length<2&&i.push(e)}))}))})),(r=(i=A(e,i)).length)>1)for(var a,s,u=1,c=o(i[0]);u<r;++u)(a=o(i[u]))>c&&(s=i[0],i[0]=i[u],i[u]=s,c=a);return i}))}}var d=function(e,t){for(var n=0,r=e.length;n<r;){var i=n+r>>>1;e[i]<t?n=i+1:r=i}return n},p=function(e){var t={},n=e.map((function(){return[]}));function r(e,n){e.forEach((function(e){e<0&&(e=~e);var r=t[e];r?r.push(n):t[e]=[n]}))}function i(e,t){e.forEach((function(e){r(e,t)}))}var a={LineString:r,MultiLineString:i,Polygon:i,MultiPolygon:function(e,t){e.forEach((function(e){i(e,t)}))}};for(var o in e.forEach((function e(t,n){"GeometryCollection"===t.type?t.geometries.forEach((function(t){e(t,n)})):t.type in a&&a[t.type](t.arcs,n)})),t)for(var s=t[o],u=s.length,A=0;A<u;++A)for(var c=A+1;c<u;++c){var l,f=s[A],h=s[c];(l=n[f])[o=d(l,h)]!==h&&l.splice(o,0,h),(l=n[h])[o=d(l,f)]!==f&&l.splice(o,0,f)}return n},v=function(e){if(null==e)return r;var t,n,i=e.scale[0],a=e.scale[1],o=e.translate[0],s=e.translate[1];return function(e,r){r||(t=n=0);var u=2,A=e.length,c=new Array(A),l=Math.round((e[0]-o)/i),f=Math.round((e[1]-s)/a);for(c[0]=l-t,t=l,c[1]=f-n,n=f;u<A;)c[u]=e[u],++u;return c}},y=function(e,t){if(e.transform)throw new Error("already quantized");if(t&&t.scale)u=e.bbox;else{if(!((n=Math.floor(t))>=2))throw new Error("n must be \u22652");var n,r=(u=e.bbox||a(e))[0],i=u[1],o=u[2],s=u[3];t={scale:[o-r?(o-r)/(n-1):1,s-i?(s-i)/(n-1):1],translate:[r,i]}}var u,A,c=v(t),l=e.objects,f={};function h(e){return c(e)}function g(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(g)};break;case"Point":t={type:"Point",coordinates:h(e.coordinates)};break;case"MultiPoint":t={type:"MultiPoint",coordinates:e.coordinates.map(h)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}for(A in l)f[A]=g(l[A]);return{type:"Topology",bbox:u,transform:t,objects:f,arcs:e.arcs.map((function(e){var t,n=0,r=1,i=e.length,a=new Array(i);for(a[0]=c(e[0],0);++n<i;)((t=c(e[n],n))[0]||t[1])&&(a[r++]=t);return 1===r&&(a[r++]=[0,0]),a.length=r,a}))}},m=function(e,t,n,r,i,a){3===arguments.length&&(r=a=Array,i=null);for(var o=new r(e=1<<Math.max(4,Math.ceil(Math.log(e)/Math.LN2))),s=new a(e),u=e-1,A=0;A<e;++A)o[A]=i;function c(r,a){for(var A=t(r)&u,c=o[A],l=0;c!=i;){if(n(c,r))return s[A]=a;if(++l>=e)throw new Error("full hashmap");c=o[A=A+1&u]}return o[A]=r,s[A]=a,a}function l(r,a){for(var A=t(r)&u,c=o[A],l=0;c!=i;){if(n(c,r))return s[A];if(++l>=e)throw new Error("full hashmap");c=o[A=A+1&u]}return o[A]=r,s[A]=a,a}function f(r,a){for(var A=t(r)&u,c=o[A],l=0;c!=i;){if(n(c,r))return s[A];if(++l>=e)break;c=o[A=A+1&u]}return a}function h(){for(var e=[],t=0,n=o.length;t<n;++t){var r=o[t];r!=i&&e.push(r)}return e}return{set:c,maybeSet:l,get:f,keys:h}},I=function(e,t){return e[0]===t[0]&&e[1]===t[1]},b=new ArrayBuffer(16),E=new Float64Array(b),C=new Uint32Array(b),B=function(e){E[0]=e[0],E[1]=e[1];var t=C[0]^C[1];return 2147483647&(t=t<<5^t>>7^C[2]^C[3])},w=function(e){var t,n,r,i,a=e.coordinates,o=e.lines,s=e.rings,u=function(){for(var e=m(1.4*a.length,C,w,Int32Array,-1,Int32Array),t=new Int32Array(a.length),n=0,r=a.length;n<r;++n)t[n]=e.maybeSet(n,n);return t}(),A=new Int32Array(a.length),c=new Int32Array(a.length),l=new Int32Array(a.length),f=new Int8Array(a.length),h=0;for(t=0,n=a.length;t<n;++t)A[t]=c[t]=l[t]=-1;for(t=0,n=o.length;t<n;++t){var g=o[t],d=g[0],p=g[1];for(r=u[d],i=u[++d],++h,f[r]=1;++d<=p;)E(t,r,r=i,i=u[d]);++h,f[i]=1}for(t=0,n=a.length;t<n;++t)A[t]=-1;for(t=0,n=s.length;t<n;++t){var v=s[t],y=v[0]+1,b=v[1];for(E(t,u[b-1],r=u[y-1],i=u[y]);++y<=b;)E(t,r,r=i,i=u[y])}function E(e,t,n,r){if(A[n]!==e){A[n]=e;var i=c[n];if(i>=0){var a=l[n];i===t&&a===r||i===r&&a===t||(++h,f[n]=1)}else c[n]=t,l[n]=r}}function C(e){return B(a[e])}function w(e,t){return I(a[e],a[t])}A=c=l=null;var Q,k=function(e,t,n,r,i){3===arguments.length&&(r=Array,i=null);for(var a=new r(e=1<<Math.max(4,Math.ceil(Math.log(e)/Math.LN2))),o=e-1,s=0;s<e;++s)a[s]=i;function u(r){for(var s=t(r)&o,u=a[s],A=0;u!=i;){if(n(u,r))return!0;if(++A>=e)throw new Error("full hashset");u=a[s=s+1&o]}return a[s]=r,!0}function A(r){for(var s=t(r)&o,u=a[s],A=0;u!=i;){if(n(u,r))return!0;if(++A>=e)break;u=a[s=s+1&o]}return!1}function c(){for(var e=[],t=0,n=a.length;t<n;++t){var r=a[t];r!=i&&e.push(r)}return e}return{add:u,has:A,values:c}}(1.4*h,B,I);for(t=0,n=a.length;t<n;++t)f[Q=u[t]]&&k.add(a[Q]);return k};function Q(e,t,n,r){k(e,t,n),k(e,t,t+r),k(e,t+r,n)}function k(e,t,n){for(var r,i=t+(n---t>>1);t<i;++t,--n)r=e[t],e[t]=e[n],e[n]=r}var _=function(e){var t,n,r={};for(t in e)r[t]=null==(n=e[t])?{type:null}:("FeatureCollection"===n.type?x:"Feature"===n.type?S:O)(n);return r};function x(e){var t={type:"GeometryCollection",geometries:e.features.map(S)};return null!=e.bbox&&(t.bbox=e.bbox),t}function S(e){var t,n=O(e.geometry);for(t in null!=e.id&&(n.id=e.id),null!=e.bbox&&(n.bbox=e.bbox),e.properties){n.properties=e.properties;break}return n}function O(e){if(null==e)return{type:null};var t="GeometryCollection"===e.type?{type:"GeometryCollection",geometries:e.geometries.map(O)}:"Point"===e.type||"MultiPoint"===e.type?{type:e.type,coordinates:e.coordinates}:{type:e.type,arcs:e.coordinates};return null!=e.bbox&&(t.bbox=e.bbox),t}var D=function(e,t){var n=function(e){var t=1/0,n=1/0,r=-1/0,i=-1/0;function a(e){null!=e&&o.hasOwnProperty(e.type)&&o[e.type](e)}var o={GeometryCollection:function(e){e.geometries.forEach(a)},Point:function(e){s(e.coordinates)},MultiPoint:function(e){e.coordinates.forEach(s)},LineString:function(e){u(e.arcs)},MultiLineString:function(e){e.arcs.forEach(u)},Polygon:function(e){e.arcs.forEach(u)},MultiPolygon:function(e){e.arcs.forEach(A)}};function s(e){var a=e[0],o=e[1];a<t&&(t=a),a>r&&(r=a),o<n&&(n=o),o>i&&(i=o)}function u(e){e.forEach(s)}function A(e){e.forEach(u)}for(var c in e)a(e[c]);return r>=t&&i>=n?[t,n,r,i]:void 0}(e=_(e)),r=t>0&&n&&function(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=a-r?(n-1)/(a-r):1,u=o-i?(n-1)/(o-i):1;function A(e){return[Math.round((e[0]-r)*s),Math.round((e[1]-i)*u)]}function c(e,t){for(var n,a,o,A,c,l=-1,f=0,h=e.length,g=new Array(h);++l<h;)n=e[l],A=Math.round((n[0]-r)*s),c=Math.round((n[1]-i)*u),A===a&&c===o||(g[f++]=[a=A,o=c]);for(g.length=f;f<t;)f=g.push([g[0][0],g[0][1]]);return g}function l(e){return c(e,2)}function f(e){return c(e,4)}function h(e){return e.map(f)}function g(e){null!=e&&d.hasOwnProperty(e.type)&&d[e.type](e)}var d={GeometryCollection:function(e){e.geometries.forEach(g)},Point:function(e){e.coordinates=A(e.coordinates)},MultiPoint:function(e){e.coordinates=e.coordinates.map(A)},LineString:function(e){e.arcs=l(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(l)},Polygon:function(e){e.arcs=h(e.arcs)},MultiPolygon:function(e){e.arcs=e.arcs.map(h)}};for(var p in e)g(e[p]);return{scale:[1/s,1/u],translate:[r,i]}}(e,n,t),i=function(e){var t,n,r,i,a=e.coordinates,o=e.lines,s=e.rings,u=o.length+s.length;for(delete e.lines,delete e.rings,r=0,i=o.length;r<i;++r)for(t=o[r];t=t.next;)++u;for(r=0,i=s.length;r<i;++r)for(n=s[r];n=n.next;)++u;var A=m(2*u*1.4,B,I),c=e.arcs=[];for(r=0,i=o.length;r<i;++r){t=o[r];do{l(t)}while(t=t.next)}for(r=0,i=s.length;r<i;++r)if((n=s[r]).next)do{l(n)}while(n=n.next);else f(n);function l(e){var t,n,r,i,o,s,u,l;if(r=A.get(t=a[e[0]]))for(u=0,l=r.length;u<l;++u)if(h(i=r[u],e))return e[0]=i[0],void(e[1]=i[1]);if(o=A.get(n=a[e[1]]))for(u=0,l=o.length;u<l;++u)if(g(s=o[u],e))return e[1]=s[0],void(e[0]=s[1]);r?r.push(e):A.set(t,[e]),o?o.push(e):A.set(n,[e]),c.push(e)}function f(e){var t,n,r,i,o;if(n=A.get(a[e[0]]))for(i=0,o=n.length;i<o;++i){if(d(r=n[i],e))return e[0]=r[0],void(e[1]=r[1]);if(p(r,e))return e[0]=r[1],void(e[1]=r[0])}if(n=A.get(t=a[e[0]+v(e)]))for(i=0,o=n.length;i<o;++i){if(d(r=n[i],e))return e[0]=r[0],void(e[1]=r[1]);if(p(r,e))return e[0]=r[1],void(e[1]=r[0])}n?n.push(e):A.set(t,[e]),c.push(e)}function h(e,t){var n=e[0],r=t[0],i=e[1];if(n-i!==r-t[1])return!1;for(;n<=i;++n,++r)if(!I(a[n],a[r]))return!1;return!0}function g(e,t){var n=e[0],r=t[0],i=e[1],o=t[1];if(n-i!==r-o)return!1;for(;n<=i;++n,--o)if(!I(a[n],a[o]))return!1;return!0}function d(e,t){var n=e[0],r=t[0],i=e[1]-n;if(i!==t[1]-r)return!1;for(var o=v(e),s=v(t),u=0;u<i;++u)if(!I(a[n+(u+o)%i],a[r+(u+s)%i]))return!1;return!0}function p(e,t){var n=e[0],r=t[0],i=e[1],o=t[1],s=i-n;if(s!==o-r)return!1;for(var u=v(e),A=s-v(t),c=0;c<s;++c)if(!I(a[n+(c+u)%s],a[o-(c+A)%s]))return!1;return!0}function v(e){for(var t=e[0],n=e[1],r=t,i=r,o=a[r];++r<n;){var s=a[r];(s[0]<o[0]||s[0]===o[0]&&s[1]<o[1])&&(i=r,o=s)}return i-t}return e}(function(e){var t,n,r,i=w(e),a=e.coordinates,o=e.lines,s=e.rings;for(n=0,r=o.length;n<r;++n)for(var u=o[n],A=u[0],c=u[1];++A<c;)i.has(a[A])&&(t={0:A,1:u[1]},u[1]=A,u=u.next=t);for(n=0,r=s.length;n<r;++n)for(var l=s[n],f=l[0],h=f,g=l[1],d=i.has(a[f]);++h<g;)i.has(a[h])&&(d?(t={0:h,1:l[1]},l[1]=h,l=l.next=t):(Q(a,f,g,g-h),a[g]=a[f],d=!0,h=f));return e}(function(e){var t=-1,n=[],r=[],i=[];function a(e){e&&o.hasOwnProperty(e.type)&&o[e.type](e)}var o={GeometryCollection:function(e){e.geometries.forEach(a)},LineString:function(e){e.arcs=s(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(s)},Polygon:function(e){e.arcs=e.arcs.map(u)},MultiPolygon:function(e){e.arcs=e.arcs.map(A)}};function s(e){for(var r=0,a=e.length;r<a;++r)i[++t]=e[r];var o={0:t-a+1,1:t};return n.push(o),o}function u(e){for(var n=0,a=e.length;n<a;++n)i[++t]=e[n];var o={0:t-a+1,1:t};return r.push(o),o}function A(e){return e.map(u)}for(var c in e)a(e[c]);return{type:"Topology",coordinates:i,lines:n,rings:r,objects:e}}(e))),a=i.coordinates,o=m(1.4*i.arcs.length,R,j);function s(e){e&&u.hasOwnProperty(e.type)&&u[e.type](e)}e=i.objects,i.bbox=n,i.arcs=i.arcs.map((function(e,t){return o.set(e,t),a.slice(e[0],e[1]+1)})),delete i.coordinates,a=null;var u={GeometryCollection:function(e){e.geometries.forEach(s)},LineString:function(e){e.arcs=A(e.arcs)},MultiLineString:function(e){e.arcs=e.arcs.map(A)},Polygon:function(e){e.arcs=e.arcs.map(A)},MultiPolygon:function(e){e.arcs=e.arcs.map(c)}};function A(e){var t=[];do{var n=o.get(e);t.push(e[0]<e[1]?n:~n)}while(e=e.next);return t}function c(e){return e.map(A)}for(var l in e)s(e[l]);return r&&(i.transform=r,i.arcs=function(e){for(var t=-1,n=e.length;++t<n;){for(var r,i,a=e[t],o=0,s=1,u=a.length,A=a[0],c=A[0],l=A[1];++o<u;)r=(A=a[o])[0],i=A[1],r===c&&i===l||(a[s++]=[r-c,i-l],c=r,l=i);1===s&&(a[s++]=[0,0]),a.length=s}return e}(i.arcs)),i};function R(e){var t,n=e[0],r=e[1];return r<n&&(t=n,n=r,r=t),n+31*r}function j(e,t){var n,r=e[0],i=e[1],a=t[0],o=t[1];return i<r&&(n=r,r=i,i=n),o<a&&(n=a,a=o,o=n),r===a&&i===o}var M=function(e,t){var n,r=e.objects,i={};function a(e){var t,n;switch(e.type){case"Polygon":t=(n=o(e.arcs))?{type:"Polygon",arcs:n}:{type:null};break;case"MultiPolygon":t=(n=e.arcs.map(o).filter(F)).length?{type:"MultiPolygon",arcs:n}:{type:null};break;case"GeometryCollection":t=(n=e.geometries.map(a).filter(T)).length?{type:"GeometryCollection",geometries:n}:{type:null};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function o(e){return e.length&&(n=e[0],t(n,!1))?[e[0]].concat(e.slice(1).filter(s)):null;var n}function s(e){return t(e,!0)}for(n in null==t&&(t=N),r)i[n]=a(r[n]);return function(e){var t,n,r=e.objects,i={},a=e.arcs,o=a.length,s=-1,u=new Array(o),A=0,c=-1;function l(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(l);break;case"LineString":h(e.arcs);break;case"MultiLineString":case"Polygon":e.arcs.forEach(h);break;case"MultiPolygon":e.arcs.forEach(g)}}function f(e){e<0&&(e=~e),u[e]||(u[e]=1,++A)}function h(e){e.forEach(f)}function g(e){e.forEach(h)}function d(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(d)};break;case"LineString":t={type:"LineString",arcs:v(e.arcs)};break;case"MultiLineString":t={type:"MultiLineString",arcs:e.arcs.map(v)};break;case"Polygon":t={type:"Polygon",arcs:e.arcs.map(v)};break;case"MultiPolygon":t={type:"MultiPolygon",arcs:e.arcs.map(y)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}function p(e){return e<0?~u[~e]:u[e]}function v(e){return e.map(p)}function y(e){return e.map(v)}for(n in r)l(r[n]);for(t=new Array(A);++s<o;)u[s]&&(u[s]=++c,t[c]=a[s]);for(n in r)i[n]=d(r[n]);return{type:"Topology",bbox:e.bbox,transform:e.transform,objects:i,arcs:t}}({type:"Topology",bbox:e.bbox,transform:e.transform,objects:i,arcs:e.arcs})};function N(){return!0}function F(e){return e}function T(e){return null!=e.type}var L=function(e){var t,n=new Array(e.arcs.length),r=0;function i(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(i);break;case"Polygon":a(e.arcs);break;case"MultiPolygon":e.arcs.forEach(a)}}function a(e){for(var t=0,i=e.length;t<i;++t,++r)for(var a=e[t],o=0,s=a.length;o<s;++o){var u=a[o];u<0&&(u=~u);var A=n[u];null==A?n[u]=r:A!==r&&(n[u]=-1)}}for(t in e.objects)i(e.objects[t]);return function(e){for(var t,r=0,i=e.length;r<i;++r)if(-1===n[(t=e[r])<0?~t:t])return!0;return!1}};function P(e){var t=e[0],n=e[1],r=e[2];return Math.abs((t[0]-r[0])*(n[1]-t[1])-(t[0]-n[0])*(r[1]-t[1]))/2}function U(e){for(var t,n=-1,r=e.length,i=e[r-1],a=0;++n<r;)t=i,i=e[n],a+=t[0]*i[1]-t[1]*i[0];return Math.abs(a)/2}var G=function(e,t,n){return t=null==t?Number.MIN_VALUE:+t,null==n&&(n=U),function(r,i){return n(o(e,{type:"Polygon",arcs:[r]}).geometry.coordinates[0],i)>=t}},q=function(e,t,n){var r=L(e),i=G(e,t,n);return function(e,t){return r(e,t)||i(e,t)}};function H(e,t){return e[1][2]-t[1][2]}function Y(e){return[e[0],e[1],0]}var J=function(e,t){var n=e.transform?i(e.transform):Y,r=function(){var e={},t=[],n=0;function r(e,n){for(;n>0;){var r=(n+1>>1)-1,i=t[r];if(H(e,i)>=0)break;t[i._=n]=i,t[e._=n=r]=e}}function i(e,r){for(;;){var i=r+1<<1,a=i-1,o=r,s=t[o];if(a<n&&H(t[a],s)<0&&(s=t[o=a]),i<n&&H(t[i],s)<0&&(s=t[o=i]),o===r)break;t[s._=r]=s,t[e._=r=o]=e}}return e.push=function(e){return r(t[e._=n]=e,n++),n},e.pop=function(){if(!(n<=0)){var e,r=t[0];return--n>0&&(e=t[n],i(t[e._=0]=e,0)),r}},e.remove=function(e){var a,o=e._;if(t[o]===e)return o!==--n&&(H(a=t[n],e)<0?r:i)(t[a._=o]=a,o),o},e}();null==t&&(t=P);var a=e.arcs.map((function(e){var i,a,s,u=[],A=0;for(a=1,s=(e=e.map(n)).length-1;a<s;++a)(i=[e[a-1],e[a],e[a+1]])[1][2]=t(i),u.push(i),r.push(i);for(e[0][2]=e[s][2]=1/0,a=0,s=u.length;a<s;++a)(i=u[a]).previous=u[a-1],i.next=u[a+1];for(;i=r.pop();){var c=i.previous,l=i.next;i[1][2]<A?i[1][2]=A:A=i[1][2],c&&(c.next=l,c[2]=i[2],o(c)),l&&(l.previous=c,l[0]=i[0],o(l))}return e}));function o(e){r.remove(e),e[1][2]=t(e),r.push(e)}return{type:"Topology",bbox:e.bbox,objects:e.objects,arcs:a}},z=function(e,t){var n=[];return e.arcs.forEach((function(e){e.forEach((function(e){isFinite(e[2])&&n.push(e[2])}))})),n.length&&function(e,t){if(!(n=e.length))return;if((t=+t)<=0||n<2)return e[0];if(t>=1)return e[n-1];var n,r=(n-1)*t,i=Math.floor(r),a=e[i],o=e[i+1];return a+(o-a)*(r-i)}(n.sort(K),t)};function K(e,t){return t-e}var W=function(e,t){t=null==t?Number.MIN_VALUE:+t;var n=e.arcs.map((function(e){for(var n,r=-1,i=0,a=e.length,o=new Array(a);++r<a;)(n=e[r])[2]>=t&&(o[i++]=[n[0],n[1]]);return o.length=i,o}));return{type:"Topology",transform:e.transform,bbox:e.bbox,objects:e.objects,arcs:n}},V=Math.PI,X=2*V,Z=V/4,$=V/180,ee=Math.abs,te=Math.atan2,ne=Math.cos,re=Math.sin;function ie(e,t){for(var n,r,i=0,a=e.length,o=0,s=e[t?i++:a-1],u=s[0]*$,A=s[1]*$/2+Z,c=ne(A),l=re(A);i<a;++i){n=u,u=(s=e[i])[0]*$,A=s[1]*$/2+Z,r=c,c=ne(A);var f=u-n,h=f>=0?1:-1,g=h*f,d=l*(l=re(A)),p=r*c+d*ne(g),v=d*h*re(g);o+=te(v,p)}return o}function ae(e,t){var n=ie(e,!0);return t&&(n*=-1),2*(n<0?X+n:n)}function oe(e){return 2*ee(ie(e,!1))}n.d(t,"bbox",(function(){return a})),n.d(t,"feature",(function(){return o})),n.d(t,"mesh",(function(){return c})),n.d(t,"meshArcs",(function(){return l})),n.d(t,"merge",(function(){return h})),n.d(t,"mergeArcs",(function(){return g})),n.d(t,"neighbors",(function(){return p})),n.d(t,"quantize",(function(){return y})),n.d(t,"transform",(function(){return i})),n.d(t,"untransform",(function(){return v})),n.d(t,"topology",(function(){return D})),n.d(t,"filter",(function(){return M})),n.d(t,"filterAttached",(function(){return L})),n.d(t,"filterAttachedWeight",(function(){return q})),n.d(t,"filterWeight",(function(){return G})),n.d(t,"planarRingArea",(function(){return U})),n.d(t,"planarTriangleArea",(function(){return P})),n.d(t,"presimplify",(function(){return J})),n.d(t,"quantile",(function(){return z})),n.d(t,"simplify",(function(){return W})),n.d(t,"sphericalRingArea",(function(){return ae})),n.d(t,"sphericalTriangleArea",(function(){return oe}))},function(e,t,n){"use strict";var r=n(33),i=n(18),a=n(0),o=(n(28),n(37)),s=n(48),u=a.forwardRef((function(e,t){var n=e.classes,s=e.className,u=e.component,A=void 0===u?"div":u,c=e.square,l=void 0!==c&&c,f=e.elevation,h=void 0===f?1:f,g=e.variant,d=void 0===g?"elevation":g,p=Object(r.a)(e,["classes","className","component","square","elevation","variant"]);return a.createElement(A,Object(i.a)({className:Object(o.a)(n.root,s,"outlined"===d?n.outlined:n["elevation".concat(h)],!l&&n.rounded),ref:t},p))}));t.a=Object(s.a)((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),Object(i.a)({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(u)},function(e,t,n){"use strict";var r=n(18),i=n(33),a=n(0),o=(n(28),n(37)),s=n(48),u=n(73),A={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},c=a.forwardRef((function(e,t){var n=e.align,s=void 0===n?"inherit":n,c=e.classes,l=e.className,f=e.color,h=void 0===f?"initial":f,g=e.component,d=e.display,p=void 0===d?"initial":d,v=e.gutterBottom,y=void 0!==v&&v,m=e.noWrap,I=void 0!==m&&m,b=e.paragraph,E=void 0!==b&&b,C=e.variant,B=void 0===C?"body1":C,w=e.variantMapping,Q=void 0===w?A:w,k=Object(i.a)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),_=g||(E?"p":Q[B]||A[B])||"span";return a.createElement(_,Object(r.a)({className:Object(o.a)(c.root,l,"inherit"!==B&&c[B],"initial"!==h&&c["color".concat(Object(u.a)(h))],I&&c.noWrap,y&&c.gutterBottom,E&&c.paragraph,"inherit"!==s&&c["align".concat(Object(u.a)(s))],"initial"!==p&&c["display".concat(Object(u.a)(p))]),ref:t},k))}));t.a=Object(s.a)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(c)},function(e,t,n){"use strict";var r=n(24),i=n(22),a=n(47),o=n(11),s=n(13),u=n(42),A=n(46),c=n(14),l=n(15),f=n(0),h=n.n(f),g=n(97),d=n.n(g),p=n(269),v=n(39),y=n(393),m=n(189),I=n(542),b=n(85),E=n(271),C=n(771),B=n(770),w=function(e){return e.xy},Q=function(e){Object(c.a)(n,e);var t=Object(l.a)(n);function n(e){var r;return Object(o.a)(this,n),(r=t.call(this,e)).cellsEntries=[],r.moleculesEntries=[],r.cellsQuadTree=null,r.cellsLayer=null,r.moleculesLayer=null,r.neighborhoodsLayer=null,r.imageLayers=[],r.layerLoaderSelections={},r.onUpdateCellsData(),r.onUpdateCellsLayer(),r.onUpdateMoleculesData(),r.onUpdateMoleculesLayer(),r.onUpdateNeighborhoodsData(),r.onUpdateNeighborhoodsLayer(),r.onUpdateImages(),r}return Object(s.a)(n,[{key:"createCellsLayer",value:function(e){var t=e.radius,n=e.stroked,r=e.visible,i=e.opacity,o=this.props,s=o.cellFilter,u=o.cellSelection,A=o.setCellHighlight,c=o.setComponentHover,l=o.getCellIsSelected,f=void 0===l?function(e){return function(t){return!e||e.includes(t[0])}}(u):l,h=o.cellColors,g=o.getCellColor,d=void 0===g?function(e){return function(t){return e&&e.get(t[0])||b.b}}(h):g,p=o.getCellPolygon,v=void 0===p?function(e){return function(t){var n,r=t[1];return(null===(n=r.poly)||void 0===n?void 0:n.length)?r.poly:Object(E.f)(r.xy[0],r.xy[1],e)}}(t):p,y=o.onCellClick,m=o.lineWidthScale,C=void 0===m?10:m,B=o.lineWidthMaxPixels,w=void 0===B?2:B,Q=this.cellsEntries,k=s?Q.filter((function(e){return s.includes(e[0])})):Q;return new I.a(Object(a.a)({id:"cells-layer",backgroundColor:[0,0,0],isSelected:f,getPolygon:v,updateTriggers:{getFillColor:[i],getLineWidth:[n]},getFillColor:function(e){var t=d(e);return t[3]=255*i,t},getLineColor:function(e){var t=d(e);return t[3]=255,t},onClick:function(e){y&&y(e)},visible:r,getLineWidth:n?1:0,lineWidthScale:C,lineWidthMaxPixels:w},Object(b.g)(k,void 0,A,c,!0)))}},{key:"createMoleculesLayer",value:function(e){var t=this.props,n=t.setMoleculeHighlight,r=t.getMoleculeColor,i=void 0===r?function(e){return b.d[e[2]%b.d.length]}:r,a=t.getMoleculePosition,o=void 0===a?function(e){return[e[0],e[1],0]}:a,s=this.moleculesEntries;return new p.a({id:"molecules-layer",coordinateSystem:v.a.CARTESIAN,data:s,pickable:!0,autoHighlight:!0,radiusMaxPixels:3,opacity:e.opacity,visible:e.visible,getRadius:e.radius,getPosition:o,getLineColor:i,getFillColor:i,onHover:function(e){n&&(e.object?n(e.object[3]):n(null))}})}},{key:"createNeighborhoodsLayer",value:function(e){var t=this.props.getNeighborhoodPolygon,n=void 0===t?function(e){return e[1].poly}:t,r=this.neighborhoodsEntries;return new y.a({id:"neighborhoods-layer",getPolygon:n,coordinateSystem:v.a.CARTESIAN,data:r,pickable:!0,autoHighlight:!0,stroked:!0,filled:!1,getElevation:0,getLineWidth:10,visible:e.visible})}},{key:"createSelectionLayers",value:function(){var e=this.props,t=e.viewState,n=e.getCellCoords,r=void 0===n?w:n,i=e.setCellSelection,a=this.state.tool,o=this.cellsQuadTree;return Object(I.c)(a,t.zoom,"cells-layer",r,i,o)}},{key:"createScaleBarLayer",value:function(){var e=this.props,t=e.viewState,n=e.width,r=e.height,i=e.imageLayerLoaders,o=void 0===i?{}:i,s=Object.values(o);if(!t||!n||!r||s.length<1)return null;var u=s[0];if(!u)return null;var A=u.physicalSizes;if(A){var c=A.x,l=c.unit,f=c.value;return l&&f?new m.ScaleBarLayer({id:"scalebar-layer",loader:u,unit:l,size:f,viewState:Object(a.a)({},t,{width:n,height:r})}):null}return null}},{key:"createImageLayer",value:function(e,t,n){var r,i=Object(a.a)({},e,{channels:e.channels.filter((function(e){return e.selection&&e.color&&e.slider}))}),o=i.channels.map((function(e){return e.selection})),s=this.layerLoaderSelections[i.index];d()(s,o)?r=s:(r=o,this.layerLoaderSelections[i.index]=o);var u={colormap:i.colormap,opacity:i.opacity,colors:i.channels.map((function(e){return e.color})),sliders:i.channels.map((function(e){return e.slider})),visibilities:i.channels.map((function(e){return e.visible}))};if(!t||!u)return null;var A=t.scale,c=t.translate;return new(t.isPyramid?m.MultiscaleImageLayer:m.ImageLayer)({loader:t,id:"image-layer-".concat(i.index,"-").concat(n),colorValues:u.colors,sliderValues:u.sliders,loaderSelection:r,channelIsOn:u.visibilities,opacity:u.opacity,colormap:u.colormap?u.colormap:"",scale:A||1,translate:c?[c.x,c.y]:[0,0]})}},{key:"createImageLayers",value:function(){var e=this,t=this.props,n=t.layers,r=t.imageLayerLoaders,i=void 0===r?{}:r;return(n||[]).filter((function(e){return"raster"===e.type})).map((function(t,n){return e.createImageLayer(t,i[t.index],n)}))}},{key:"getLayers",value:function(){var e=this.imageLayers,t=this.cellsLayer,n=this.neighborhoodsLayer,r=this.moleculesLayer;return[].concat(Object(i.a)(e),[t,n,r,this.createScaleBarLayer()],Object(i.a)(this.createSelectionLayers()))}},{key:"onUpdateCellsData",value:function(){var e=this.props,t=e.cells,n=void 0===t?{}:t,r=e.getCellCoords,i=void 0===r?w:r,a=Object.entries(n);this.cellsEntries=a,this.cellsQuadTree=Object(B.a)(a,i)}},{key:"onUpdateCellsLayer",value:function(){var e=(this.props.layers||[]).find((function(e){return"cells"===e.type}));this.cellsLayer=e?this.createCellsLayer(e):null}},{key:"onUpdateMoleculesData",value:function(){var e=this.props.molecules,t=void 0===e?{}:e,n=Object.entries(t).flatMap((function(e,t){var n=Object(r.a)(e,2),i=n[0];return n[1].map((function(e){var n=Object(r.a)(e,2);return[n[0],n[1],t,i]}))}));this.moleculesEntries=n}},{key:"onUpdateMoleculesLayer",value:function(){var e=(this.props.layers||[]).find((function(e){return"molecules"===e.type}));this.moleculesLayer=e?this.createMoleculesLayer(e):null}},{key:"onUpdateNeighborhoodsData",value:function(){var e=this.props.neighborhoods,t=void 0===e?{}:e,n=Object.entries(t);this.neighborhoodsEntries=n}},{key:"onUpdateNeighborhoodsLayer",value:function(){var e=(this.props.layers||[]).find((function(e){return"neighborhoods"===e.type}));this.neighborhoodsLayer=e?this.createNeighborhoodsLayer(e):null}},{key:"onUpdateImages",value:function(){this.imageLayers=this.createImageLayers()}},{key:"viewInfoDidUpdate",value:function(){var e=this.props.getCellCoords,t=void 0===e?w:e;Object(A.a)(Object(u.a)(n.prototype),"viewInfoDidUpdate",this).call(this,t)}},{key:"componentDidUpdate",value:function(e){var t=this;this.viewInfoDidUpdate();var n=function(n){return e[n]!==t.props[n]};["cells"].some(n)&&(this.onUpdateCellsData(),this.forceUpdate()),["layers","cells","cellFilter","cellSelection","cellColors"].some(n)&&(this.onUpdateCellsLayer(),this.forceUpdate()),["molecules"].some(n)&&(this.onUpdateMoleculesData(),this.forceUpdate()),["layers","molecules"].some(n)&&(this.onUpdateMoleculesLayer(),this.forceUpdate()),["neighborhoods"].some(n)&&(this.onUpdateNeighborhoodsData(),this.forceUpdate()),["layers","neighborhoods"].some(n)&&(this.onUpdateNeighborhoodsLayer(),this.forceUpdate()),["layers","imageLayerLoaders"].some(n)&&(this.onUpdateImages(),this.forceUpdate())}}]),n}(C.a),k=Object(f.forwardRef)((function(e,t){return h.a.createElement(Q,Object.assign({},e,{deckRef:t}))}));t.a=k},function(e,t,n){"use strict";var r=n(22),i=n(24),a=n(47),o=n(0),s=n.n(o),u=n(330),A=n.n(u),c=n(284),l=n(413),f=n(318),h=n.n(f),g=n(332),d=n.n(g),p=n(97),v=n.n(p),y=n(19);function m(e,t){var n;if(void 0===t){var r,i=Object(y.a)(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;null!=a&&(n<a||void 0===n&&a>=a)&&(n=a)}}catch(c){i.e(c)}finally{i.f()}}else{var o,s=-1,u=Object(y.a)(e);try{for(u.s();!(o=u.n()).done;){var A=o.value;null!=(A=t(A,++s,e))&&(n<A||void 0===n&&A>=A)&&(n=A)}}catch(c){u.e(c)}finally{u.f()}}return n}var I=n(1317),b=n(1075),E=n(396),C=Object(E.a)((function(){return{box:{opacity:.5,height:"80px",bottom:0,right:0,backgroundColor:"transparent",position:"absolute",padding:"10px 0",transition:"opacity 0.1s","&:hover":{opacity:1}}}}));function B(e){var t=e.colorScaleLo,n=e.colorScaleHi,r=e.onColorScaleChange,i=C();return s.a.createElement(I.a,{component:"div",m:1,className:i.box},s.a.createElement(b.a,{orientation:"vertical",value:[t,n],onChange:r,"aria-labelledby":"colorscale-slider",min:0,max:1,step:.005}))}var w=n(725),Q=n(726),k=n(727),_=n(85),x=n(1061),S=n.n(x),O=n(74);function D(e){var t=e.layer,n=e.viewport;return"axisLeft"===n.id?t.id.startsWith("axisLeft"):"axisTop"===n.id?t.id.startsWith("axisTop"):"heatmap"===n.id?t.id.startsWith("heatmap"):"colorsLeft"===n.id?t.id.startsWith("colorsLeft"):"colorsTop"===n.id&&t.id.startsWith("colorsTop")}var R=Object(o.forwardRef)((function(e,t){var n=e.uuid,u=e.theme,f=e.viewState,g=e.setViewState,p=e.setHeatmapControls,y=e.heatmapControls,I=void 0===y?[0,1]:y,b=e.width,E=e.height,C=e.expressionMatrix,x=e.cellColors,R=e.clearPleaseWait,j=e.setComponentHover,M=e.setCellHighlight,N=void 0===M?Object(_.i)("Heatmap"):M,F=e.setGeneHighlight,T=void 0===F?Object(_.j)("Heatmap"):F,L=e.updateViewInfo,P=void 0===L?Object(_.k)("Heatmap"):L,U=e.setIsRendering,G=void 0===U?function(){}:U,q=e.transpose,H=void 0!==q&&q,Y=e.variablesTitle,J=void 0===Y?"Genes":Y,z=e.observationsTitle,K=void 0===z?"Cells":z,W=Object(a.a)({},f,{target:H?[f.target[1],f.target[0]]:f.target,minZoom:0}),V=H?J:K,X=H?K:J;Object(o.useEffect)((function(){R&&C&&R("expression-matrix")}),[R,C]);var Z=Object(o.useRef)(new S.a),$=Object(o.useRef)(),ee=Object(o.useRef)(),te=Object(o.useState)([]),ne=Object(i.a)(te,2),re=ne[0],ie=ne[1],ae=Object(o.useState)([]),oe=Object(i.a)(ae,2),se=oe[0],ue=oe[1],Ae=Object(o.useState)(I[0]),ce=Object(i.a)(Ae,2),le=ce[0],fe=ce[1],he=Object(o.useState)(I[1]),ge=Object(i.a)(he,2),de=ge[0],pe=ge[1],ve=Object(o.useCallback)((function(e,t){fe(t[0]),pe(t[1]),p(t)}),[p]),ye=Object(o.useReducer)((function(e){return e+1}),0),me=Object(i.a)(ye,2),Ie=me[0],be=me[1],Ee=Object(o.useState)([]),Ce=Object(i.a)(Ee,2),Be=Ce[0],we=Ce[1];Object(o.useEffect)((function(){Z.current.addEventListener("message",(function(e){$.current=e.data.tiles,ee.current=new Uint8Array(e.data.buffer),be();var t=e.data.curr;we((function(e){var n=e.indexOf(t);return e.slice(n+1,e.length)}))}))}),[Z,$]),Object(o.useEffect)((function(){C&&C.matrix&&(ee.current=Object(_.h)(C.matrix))}),[ee,C]),Object(o.useEffect)((function(){if(C){var e=x&&0!==x.size?Array.from(x.keys()):C.rows,t=H?se:re;v()(t,e)||(H?ue(e):ie(e))}}),[C,x,se,re,H]),Object(o.useEffect)((function(){C&&(H?ie(C.cols):ue(C.cols))}),[C,H]);var Qe=Object(o.useMemo)((function(){return C?[m(C.rows.map((function(e){return e.length}))),m(C.cols.map((function(e){return e.length})))]:[0,0]}),[C]),ke=Object(i.a)(Qe,2),_e=ke[0],xe=ke[1],Se=se.length,Oe=re.length,De=function(e,t,n){return[d()((e?t:n)*O.b,O.e,O.d),d()((e?n:t)*O.b,O.e,O.d)]}(H,xe,_e),Re=Object(i.a)(De,2),je=Re[0],Me=Re[1],Ne=Me+O.g,Fe=je+O.g,Te=b-Fe,Le=E-Ne,Pe=-Te/2,Ue=Te/2,Ge=-Le/2,qe=Le/2,He=Math.ceil(Se/O.l),Ye=Math.ceil(Oe/O.l),Je=1-(O.l-Se%O.l)/(He*O.l),ze=1-(O.l-Oe%O.l)/(Ye*O.l),Ke=Te/Je/He,We=Le/ze/Ye,Ve=Math.pow(2,W.zoom),Xe=Le*Ve/Oe,Ze=Te*Ve/Se,$e=d()(Math.pow(2,Math.ceil(Math.log2(1/Ze))),O.i,O.h),et=d()(Math.pow(2,Math.ceil(Math.log2(1/Xe))),O.i,O.h),tt=Object(i.a)(W.target,2),nt=tt[0],rt=tt[1];Object(o.useEffect)((function(){P({uuid:n,project:function(e,t){return function(e,t,n){var r=n.offsetLeft,i=n.offsetTop,a=n.targetX,o=n.targetY,s=n.scaleFactor,u=n.matrixWidth,A=n.matrixHeight,c=n.numRows,l=n.numCols,f=null,h=null;if(null!==t){var g=-A*s/2,d=o*s-A/2,p=o*s+A/2,v=g+(t+.5)/c*(A*s/2-g);d<=v&&v<=p&&(f=i+(v-d)/(p-d)*A)}if(null!==e){var y=-u*s/2,m=a*s-u/2,I=a*s+u/2,b=y+(e+.5)/l*(u*s/2-y);m<=b&&b<=I&&(h=r+(b-m)/(I-m)*u)}return[h,f]}(H?se.indexOf(e):se.indexOf(t),H?re.indexOf(t):re.indexOf(e),{offsetLeft:Fe,offsetTop:Ne,targetX:W.target[0],targetY:W.target[1],scaleFactor:Ve,matrixWidth:Te,matrixHeight:Le,numRows:Oe,numCols:Se})}})}),[n,P,H,se,re,Fe,Ne,W,Ve,Te,Le,Oe,Se]);var it=Object(o.useCallback)((function(e){var t=e.viewState,n=t.zoom,r=Math.pow(2,n),i=0===n?0:-(Ue-Ue/r),a=-1*i,o=0===n?0:-(qe-qe/r),s=-1*o,u=[d()(t.target[0],i,a),d()(t.target[1],o,s)];g({zoom:n,target:H?[u[1],u[0]]:u})}),[Ue,qe,H,g]);Object(o.useEffect)((function(){C&&we((function(e){return[].concat(Object(r.a)(e),[A()()])}))}),[ee,C,se,re,He,Ye]),Object(o.useEffect)((function(){if(!(Be.length<1)){var e=Be[Be.length-1];if(ee.current&&ee.current.buffer.byteLength){var t=C.rows,n=C.cols;Z.current.postMessage(["getTiles",{curr:e,xTiles:He,yTiles:Ye,tileSize:O.l,cellOrdering:H?se:re,rows:t,cols:n,transpose:H,data:ee.current.buffer}],[ee.current.buffer])}}}),[re,se,Be,C,H,He,Ye]),Object(o.useEffect)((function(){G(Be.length>0)}),[Be,G]);var at=Object(o.useMemo)((function(){if(!$.current||Be.length)return[];return $.current.flatMap((function(e,t){return e.map((function(e,n){return function(e,t,n){return new k.a({id:"heatmapLayer-".concat(Ie,"-").concat(e,"-").concat(t),image:n,bounds:[Pe+t*Ke,Ge+e*We,Pe+(t+1)*Ke,Ge+(e+1)*We],aggSizeX:$e,aggSizeY:et,colorScaleLo:le,colorScaleHi:de,updateTriggers:{image:[re,se],bounds:[We,Ke]}})}(t,n,e)}))}))}),[Be,Ie,Pe,Ke,Ge,We,$e,et,le,de,re,se]),ot=Object(o.useMemo)((function(){return se.map((function(e,t){return[t,e]}))}),[se]),st=Object(o.useMemo)((function(){return re.map((function(e,t){return[t,e]}))}),[re]),ut=[new w.a({targetX:nt,targetY:rt,scaleFactor:Ve,axisLeftLabelData:st,matrixTop:Ge,height:Oe,matrixHeight:Le,cellHeight:Xe,cellWidth:Ze,axisTopLabelData:ot,matrixLeft:Pe,width:Se,matrixWidth:Te,viewHeight:E,viewWidth:b,theme:u,axisLeftTitle:V,axisTopTitle:X,axisOffsetLeft:je,axisOffsetTop:Me})],At=Object(o.useMemo)((function(){if(!x)return null;var e,t,n,r,a=H?se:re,o=H?O.l:1,s=H?1:O.l;return h()(H?He:Ye).map((function(u){var A=new Uint8ClampedArray(1*O.l*4);return h()(O.l).forEach((function(o){if((r=u*O.l+o)<a.length&&(e=a[r],n=x.get(e),t=4*(H?o:O.l-o-1),n)){var s=n,c=Object(i.a)(s,3),l=c[0],f=c[1],h=c[2];A[t+0]=l,A[t+1]=f,A[t+2]=h,A[t+3]=255}})),new ImageData(A,o,s)}))}),[x,H,se,re,He,Ye]),ct=Object(o.useMemo)((function(){return At?At.map((function(e,t){return new Q.a({id:"".concat(H?"colorsTopLayer":"colorsLeftLayer","-").concat(t,"-").concat(A()()),image:e,bounds:H?[Pe+t*Ke,-Le/2,Pe+(t+1)*Ke,Le/2]:[-Te/2,Ge+t*We,Te/2,Ge+(t+1)*We]})})):[]}),[At,Ge,Pe,Le,Te,Ke,We,H]),lt=at.concat(ut).concat(ct);return s.a.createElement(s.a.Fragment,null,s.a.createElement(c.a,{id:"deckgl-overlay-".concat(n),ref:t,views:[new l.a({id:"heatmap",controller:!0,x:Fe,y:Ne,width:Te,height:Le}),new l.a({id:"axisLeft",controller:!1,x:H?O.g:0,y:Ne,width:je,height:Le}),new l.a({id:"axisTop",controller:!1,x:Fe,y:H?0:O.g,width:Te,height:Me}),new l.a({id:"colorsLeft",controller:!1,x:je,y:Ne,width:O.g-O.c,height:Le}),new l.a({id:"colorsTop",controller:!1,x:Fe,y:Me,width:Te,height:O.g-O.c})],layers:lt,layerFilter:D,getCursor:function(e){return e.isDragging?"grabbing":"default"},glOptions:_.c,onViewStateChange:it,viewState:W,onHover:function(e,t){if(C){var n=t.offsetCenter,r=function(e,t,n){var r=n.offsetLeft,i=n.offsetTop,a=n.targetX,o=n.targetY,s=n.scaleFactor,u=n.matrixWidth,A=n.matrixHeight,c=n.numRows,l=n.numCols,f=e-r,h=t-i;if(f<0||h<0)return[null,null];var g=(a*s+u*s/2-u/2)/(u*s)+f/(u*s),d=(o*s+A*s/2-A/2)/(A*s)+h/(A*s),p=Math.floor(d*c);return[Math.floor(g*l),p]}(n.x,n.y,{offsetLeft:Fe,offsetTop:Ne,targetX:nt,targetY:rt,scaleFactor:Ve,matrixWidth:Te,matrixHeight:Le,numRows:Oe,numCols:Se}),a=Object(i.a)(r,2),o=a[0],s=a[1];null===o&&(H?N(null):T(null)),null===s&&(H?T(null):N(null));var u=C.rows.indexOf(H?se[o]:re[s]),A=C.cols.indexOf(H?re[s]:se[o]),c=C.rows[u],l=C.cols[A];j&&j(),N(c||null),T(l||null)}}}),s.a.createElement(B,{colorScaleLo:le,colorScaleHi:de,onColorScaleChange:ve}))}));t.a=R},function(e,t,n){"use strict";var r=n(22),i=n(47),a=n(11),o=n(13),s=n(42),u=n(46),A=n(14),c=n(15),l=n(0),f=n.n(l),h=n(393),g=n(270),d=n(839),p=n(542),v=n(85),y=n(770),m=n(771),I=n(933);function b(e){return function(){return e}}function E(e){return e+1e-6*(Math.random()-.5)}var C=function(e){return function(t){var n=t[1].mappings;if(!(e in n)){var r=Object.keys(n).map((function(e){return'"'.concat(e,'"')})).join(", ");throw new Error('Expected to find "'.concat(e,'", but available mappings are: ').concat(r))}var i=n[e];return[i[0],-i[1],0]}},B=function(e){return function(t){return t.mappings[e]}},w=function(e){Object(A.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(a.a)(this,n),(r=t.call(this,e)).cellsEntries=[],r.cellsQuadTree=null,r.cellsLayer=null,r.cellSetsForceSimulation=function(){var e,t,n,r=1,i=1,a=b([0,0]);function o(e){return e.x+e.vx+n[e.index][0]/2}function s(e){return e.y+e.vy+n[e.index][1]/2}function u(e){if(e.data)e.size=n[e.data.index];else{e.size=[0,0];for(var t=0;t<4;t++)e[t]&&e[t].size&&(e.size[0]=Math.max(e.size[0],e[t].size[0]),e.size[1]=Math.max(e.size[1],e[t].size[1]))}}function A(){var a,A,c,l,f,h=Object(I.a)(e,o,s).visitAfter(u);function g(e,n,i,u,h){var g=e.data,d=(A[0]+e.size[0])/2,p=(A[1]+e.size[1])/2;if(g&&g.index>a.index){var v=E(l-o(g)),y=E(f-s(g)),m=Math.abs(v)-d,I=Math.abs(y)-p;if(m<0&&I<0){var b=Math.sqrt(v*v+y*y),C=t[g.index]/(c+t[g.index]);Math.abs(m)<Math.abs(I)?(a.vx-=(v*=m/b*r)*C,g.vx+=v*(1-C)):(a.vy-=(y*=I/b*r)*C,g.vy+=y*(1-C))}return n>l+d||u<l-d||i>f+p||h<f-p}return!1}function d(){for(var r=0;r<e.length;r++)a=e[r],A=n[r],c=t[r],l=o(a),f=s(a),h.visit(g)}for(var p=0;p<i;p++)d()}return A.initialize=function(r){n=(e=r).map(a),t=n.map((function(e){return e[0]+e[1]}))},A.iterations=function(){return arguments.length?(i=+(arguments.length<=0?void 0:arguments[0]),A):i},A.strength=function(){return arguments.length?(r=+(arguments.length<=0?void 0:arguments[0]),A):r},A.size=function(){return arguments.length?(a="function"===typeof(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:b(arguments.length<=0?void 0:arguments[0]),A):a},A}(),r.cellSetsLabelPrevZoom=null,r.cellSetsLayers=[],r.onUpdateCellsData(),r.onUpdateCellsLayer(),r.onUpdateCellSetsLayers(),r}return Object(o.a)(n,[{key:"createCellsLayer",value:function(){var e=this.props,t=e.theme,n=e.mapping,r=e.getCellPosition,a=void 0===r?C(n):r,o=e.cellRadiusScale,s=void 0===o?.2:o,u=e.cellOpacity,A=void 0===u?1:u,c=e.cellFilter,l=e.cellSelection,f=e.setCellHighlight,h=e.setComponentHover,g=e.getCellIsSelected,d=void 0===g?function(e){return function(t){return!e||e.includes(t[0])}}(l):g,y=e.cellColors,m=e.getCellColor,I=void 0===m?function(e){return function(t){return e&&e.get(t[0])||v.b}}(y):m,b=e.onCellClick,E=this.cellsEntries,B=c?E.filter((function(e){return c.includes(e[0])})):E;return new p.b(Object(i.a)({id:"scatterplot",backgroundColor:"dark"===t?[0,0,0]:[241,241,241],isSelected:d,opacity:A,radiusScale:s,radiusMinPixels:1,radiusMaxPixels:10,getPosition:a,getColor:I,getLineWidth:0,onClick:function(e){b&&b(e)}},Object(v.g)(B,void 0,f,h)))}},{key:"createCellSetsLayers",value:function(){var e=this.props,t=e.theme,n=e.cellSetPolygons,r=e.viewState,i=e.cellSetPolygonsVisible,a=e.cellSetLabelsVisible,o=e.cellSetLabelSize,s=[];if(i&&s.push(new h.a({id:"cell-sets-polygon-layer",data:n,stroked:!0,filled:!1,wireframe:!0,lineWidthMaxPixels:1,getPolygon:function(e){return e.hull},getLineColor:function(e){return e.color},getLineWidth:1})),a){var u=r.zoom,A=n.map((function(e){return{x:e.centroid[0],y:e.centroid[1],label:e.name}})),c=this.cellSetsForceSimulation.size((function(e){return[1*o/Math.pow(2,u)*4*e.label.length,1*o/Math.pow(2,u)*1.5]}));Object(d.a)().nodes(A).force("collision",c).tick(100),s.push(new g.a({id:"cell-sets-text-layer",data:A,getPosition:function(e){return[e.x,e.y]},getText:function(e){return e.label},getColor:"dark"===t?[255,255,255]:[0,0,0],getSize:o,getAngle:0,getTextAnchor:"middle",getAlignmentBaseline:"center",fontFamily:"-apple-system, 'Helvetica Neue', Arial, sans-serif",fontWeight:"normal"}))}return s}},{key:"createSelectionLayers",value:function(){var e=this.props,t=e.viewState,n=e.mapping,r=e.getCellCoords,i=void 0===r?B(n):r,a=e.setCellSelection,o=this.state.tool,s=this.cellsQuadTree;return Object(p.c)(o,t.zoom,"scatterplot",i,a,s,!0)}},{key:"getLayers",value:function(){var e=this.cellsLayer,t=this.cellSetsLayers;return[e].concat(Object(r.a)(t),Object(r.a)(this.createSelectionLayers()))}},{key:"onUpdateCellsData",value:function(){var e=this.props,t=e.cells,n=void 0===t?{}:t,r=e.mapping,i=e.getCellCoords,a=void 0===i?B(r):i,o=Object.entries(n);this.cellsEntries=o,this.cellsQuadTree=Object(y.a)(o,a)}},{key:"onUpdateCellsLayer",value:function(){this.cellsLayer=this.createCellsLayer()}},{key:"onUpdateCellSetsLayers",value:function(e){if(e){var t=this.props,n=t.viewState,r=t.cellSetLabelsVisible,i=n.zoom,a=this.cellSetsLabelPrevZoom;r&&(null===a||Math.abs(a-i)>.25)&&(this.cellSetsLayers=this.createCellSetsLayers(),this.cellSetsLabelPrevZoom=i)}else this.cellSetsLayers=this.createCellSetsLayers()}},{key:"viewInfoDidUpdate",value:function(){var e=this.props,t=e.mapping,r=e.getCellPosition,i=void 0===r?C(t):r;Object(u.a)(Object(s.a)(n.prototype),"viewInfoDidUpdate",this).call(this,(function(e){return i([null,e])}))}},{key:"componentDidUpdate",value:function(e){var t=this;this.viewInfoDidUpdate();var n=function(n){return e[n]!==t.props[n]};["cells"].some(n)&&(this.onUpdateCellsData(),this.forceUpdate()),["cells","cellFilter","cellSelection","cellColors","cellRadiusScale"].some(n)&&(this.onUpdateCellsLayer(),this.forceUpdate()),["cellSetPolygons","cellSetPolygonsVisible","cellSetLabelsVisible","cellSetLabelSize"].some(n)&&(this.onUpdateCellSetsLayers(!1),this.forceUpdate()),n("viewState")&&(this.onUpdateCellSetsLayers(!0),this.forceUpdate())}}]),n}(m.a),Q=Object(l.forwardRef)((function(e,t){return f.a.createElement(w,Object.assign({},e,{deckRef:t}))}));t.a=Q},function(e,t,n){"use strict";(function(e){function r(t,n){var r,i="undefined"!==typeof(r="undefined"!==typeof n?n:"undefined"!==typeof window?window:"undefined"!==typeof self?self:e).document&&r.document.attachEvent;if(!i){var a=function(){var e=r.requestAnimationFrame||r.mozRequestAnimationFrame||r.webkitRequestAnimationFrame||function(e){return r.setTimeout(e,20)};return function(t){return e(t)}}(),o=function(){var e=r.cancelAnimationFrame||r.mozCancelAnimationFrame||r.webkitCancelAnimationFrame||r.clearTimeout;return function(t){return e(t)}}(),s=function(e){var t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+"px",i.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},u=function(e){if(!(e.target.className&&"function"===typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var t=this;s(this),this.__resizeRAF__&&o(this.__resizeRAF__),this.__resizeRAF__=a((function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))}},A=!1,c="",l="animationstart",f="Webkit Moz O ms".split(" "),h="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),g=r.document.createElement("fakeelement");if(void 0!==g.style.animationName&&(A=!0),!1===A)for(var d=0;d<f.length;d++)if(void 0!==g.style[f[d]+"AnimationName"]){c="-"+f[d].toLowerCase()+"-",l=h[d],A=!0;break}var p="resizeanim",v="@"+c+"keyframes "+p+" { from { opacity: 0; } to { opacity: 0; } } ",y=c+"animation: 1ms "+p+"; "}return{addResizeListener:function(e,n){if(i)e.attachEvent("onresize",n);else{if(!e.__resizeTriggers__){var a=e.ownerDocument,o=r.getComputedStyle(e);o&&"static"==o.position&&(e.style.position="relative"),function(e){if(!e.getElementById("detectElementResize")){var n=(v||"")+".resize-triggers { "+(y||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',r=e.head||e.getElementsByTagName("head")[0],i=e.createElement("style");i.id="detectElementResize",i.type="text/css",null!=t&&i.setAttribute("nonce",t),i.styleSheet?i.styleSheet.cssText=n:i.appendChild(e.createTextNode(n)),r.appendChild(i)}}(a),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=a.createElement("div")).className="resize-triggers",e.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',e.appendChild(e.__resizeTriggers__),s(e),e.addEventListener("scroll",u,!0),l&&(e.__resizeTriggers__.__animationListener__=function(t){t.animationName==p&&s(e)},e.__resizeTriggers__.addEventListener(l,e.__resizeTriggers__.__animationListener__))}e.__resizeListeners__.push(n)}},removeResizeListener:function(e,t){if(i)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",u,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(l,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(n){}}}}}n.d(t,"a",(function(){return r}))}).call(this,n(70))},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){"use strict";var r=n(108);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),a=(0,r(n(182)).default)(i.default.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.default=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(47),i=n(0),a=n.n(i),o=n(809),s=n(1083),u=n(798),A=n(799),c=n(1075),l=n(766);function f(e){var t=e.label,n=e.layer,i=e.handleLayerChange,f=n.opacity,h=n.visible;var g=Object(l.a)();return a.a.createElement(o.a,{item:!0,style:{marginTop:"10px"}},a.a.createElement(u.a,{className:g.root},a.a.createElement(A.a,{style:{paddingTop:"15px",paddingLeft:"10px",marginBottom:"-5px"}},t),a.a.createElement(o.a,{container:!0,direction:"row",justify:"space-between"},a.a.createElement(o.a,{item:!0,xs:2},a.a.createElement(s.a,{color:"primary",checked:h,onChange:function(e,t){return function(e){i(Object(r.a)({},n,{visible:e}))}(t)}})),a.a.createElement(o.a,{item:!0,xs:9,style:{paddingRight:"8px"}},a.a.createElement(c.a,{value:f,min:0,max:1,step:.001,onChange:function(e,t){return function(e){if("cells"===n.type){var t=e<.7;i(Object(r.a)({},n,{opacity:e,stroked:t}))}else i(Object(r.a)({},n,{opacity:e}))}(t)},style:{marginTop:"7px"},orientation:"horizontal"})))))}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i}));var r=n(5);function i(t,n){var i,a=n&&n.property?Object(r.t)(n.property):r.x;return!Object(r.F)(t)||(i=t,"function"===typeof e&&Object(r.D)(e.isBuffer)&&e.isBuffer(i))?a(JSON.parse(t)):function(e,t){return t&&t.copy?JSON.parse(JSON.stringify(e)):e}(a(t))}i.responseType="json"}).call(this,n(198).Buffer)},function(e,t,n){"use strict";var r=/("(?:[^\\"]|\\.)*")|[:,]/g;e.exports=function(e,t){var n,i,a;return t=t||{},n=JSON.stringify([1],void 0,void 0===t.indent?2:t.indent).slice(2,-3),i=""===n?1/0:void 0===t.maxLength?80:t.maxLength,a=t.replacer,function e(t,o,s){var u,A,c,l,f,h,g,d,p,v,y,m;if(t&&"function"===typeof t.toJSON&&(t=t.toJSON()),void 0===(y=JSON.stringify(t,a)))return y;if(g=i-o.length-s,y.length<=g&&(p=y.replace(r,(function(e,t){return t||e+" "}))).length<=g)return p;if(null!=a&&(t=JSON.parse(y),a=void 0),"object"===typeof t&&null!==t){if(d=o+n,c=[],A=0,Array.isArray(t))for(v="[",u="]",g=t.length;A<g;A++)c.push(e(t[A],d,A===g-1?0:1)||"null");else for(v="{",u="}",g=(h=Object.keys(t)).length;A<g;A++)l=h[A],f=JSON.stringify(l)+": ",void 0!==(m=e(t[l],d,f.length+(A===g-1?0:1)))&&c.push(f+m);if(c.length>0)return[v,n+c.join(",\n"+d),u].join("\n"+o)}return y}(e,"",0)}},function(e,t,n){"use strict";var r=n(33),i=n(18),a=n(0),o=(n(28),n(37)),s=n(48),u=[0,1,2,3,4,5,6,7,8,9,10],A=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=parseFloat(e);return"".concat(n/t).concat(String(e).replace(String(n),"")||"px")}var l=a.forwardRef((function(e,t){var n=e.alignContent,s=void 0===n?"stretch":n,u=e.alignItems,A=void 0===u?"stretch":u,c=e.classes,l=e.className,f=e.component,h=void 0===f?"div":f,g=e.container,d=void 0!==g&&g,p=e.direction,v=void 0===p?"row":p,y=e.item,m=void 0!==y&&y,I=e.justify,b=void 0===I?"flex-start":I,E=e.lg,C=void 0!==E&&E,B=e.md,w=void 0!==B&&B,Q=e.sm,k=void 0!==Q&&Q,_=e.spacing,x=void 0===_?0:_,S=e.wrap,O=void 0===S?"wrap":S,D=e.xl,R=void 0!==D&&D,j=e.xs,M=void 0!==j&&j,N=e.zeroMinWidth,F=void 0!==N&&N,T=Object(r.a)(e,["alignContent","alignItems","classes","className","component","container","direction","item","justify","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),L=Object(o.a)(c.root,l,d&&[c.container,0!==x&&c["spacing-xs-".concat(String(x))]],m&&c.item,F&&c.zeroMinWidth,"row"!==v&&c["direction-xs-".concat(String(v))],"wrap"!==O&&c["wrap-xs-".concat(String(O))],"stretch"!==A&&c["align-items-xs-".concat(String(A))],"stretch"!==s&&c["align-content-xs-".concat(String(s))],"flex-start"!==b&&c["justify-xs-".concat(String(b))],!1!==M&&c["grid-xs-".concat(String(M))],!1!==k&&c["grid-sm-".concat(String(k))],!1!==w&&c["grid-md-".concat(String(w))],!1!==C&&c["grid-lg-".concat(String(C))],!1!==R&&c["grid-xl-".concat(String(R))]);return a.createElement(h,Object(i.a)({className:L,ref:t},T))})),f=Object(s.a)((function(e){return Object(i.a)({root:{},container:{boxSizing:"border-box",display:"flex",flexWrap:"wrap",width:"100%"},item:{boxSizing:"border-box",margin:"0"},zeroMinWidth:{minWidth:0},"direction-xs-column":{flexDirection:"column"},"direction-xs-column-reverse":{flexDirection:"column-reverse"},"direction-xs-row-reverse":{flexDirection:"row-reverse"},"wrap-xs-nowrap":{flexWrap:"nowrap"},"wrap-xs-wrap-reverse":{flexWrap:"wrap-reverse"},"align-items-xs-center":{alignItems:"center"},"align-items-xs-flex-start":{alignItems:"flex-start"},"align-items-xs-flex-end":{alignItems:"flex-end"},"align-items-xs-baseline":{alignItems:"baseline"},"align-content-xs-center":{alignContent:"center"},"align-content-xs-flex-start":{alignContent:"flex-start"},"align-content-xs-flex-end":{alignContent:"flex-end"},"align-content-xs-space-between":{alignContent:"space-between"},"align-content-xs-space-around":{alignContent:"space-around"},"justify-xs-center":{justifyContent:"center"},"justify-xs-flex-end":{justifyContent:"flex-end"},"justify-xs-space-between":{justifyContent:"space-between"},"justify-xs-space-around":{justifyContent:"space-around"},"justify-xs-space-evenly":{justifyContent:"space-evenly"}},function(e,t){var n={};return u.forEach((function(r){var i=e.spacing(r);0!==i&&(n["spacing-".concat(t,"-").concat(r)]={margin:"-".concat(c(i,2)),width:"calc(100% + ".concat(c(i),")"),"& > $item":{padding:c(i,2)}})})),n}(e,"xs"),{},e.breakpoints.keys.reduce((function(t,n){return function(e,t,n){var r={};A.forEach((function(e){var t="grid-".concat(n,"-").concat(e);if(!0!==e)if("auto"!==e){var i="".concat(Math.round(e/12*1e8)/1e6,"%");r[t]={flexBasis:i,flexGrow:0,maxWidth:i}}else r[t]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};else r[t]={flexBasis:0,flexGrow:1,maxWidth:"100%"}})),"xs"===n?Object(i.a)(e,r):e[t.breakpoints.up(n)]=r}(t,e,n),t}),{}))}),{name:"MuiGrid"})(l);t.a=f},,function(e,t,n){var r=n(939),i=n(72),a=n(145),o=n(376).default,s=a.featureEach,u=(a.coordEach,i.polygon,i.featureCollection);function A(e){var t=r(e);return t.insert=function(e){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:o(e),r.prototype.insert.call(this,e)},t.load=function(e){var t=[];return Array.isArray(e)?e.forEach((function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:o(e),t.push(e)})):s(e,(function(e){if("Feature"!==e.type)throw new Error("invalid features");e.bbox=e.bbox?e.bbox:o(e),t.push(e)})),r.prototype.load.call(this,t)},t.remove=function(e,t){if("Feature"!==e.type)throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:o(e),r.prototype.remove.call(this,e,t)},t.clear=function(){return r.prototype.clear.call(this)},t.search=function(e){var t=r.prototype.search.call(this,this.toBBox(e));return u(t)},t.collides=function(e){return r.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=r.prototype.all.call(this);return u(e)},t.toJSON=function(){return r.prototype.toJSON.call(this)},t.fromJSON=function(e){return r.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var t;if(e.bbox)t=e.bbox;else if(Array.isArray(e)&&4===e.length)t=e;else if(Array.isArray(e)&&6===e.length)t=[e[0],e[1],e[3],e[4]];else if("Feature"===e.type)t=o(e);else{if("FeatureCollection"!==e.type)throw new Error("invalid geojson");t=o(e)}return{minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},t}e.exports=A,e.exports.default=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72),i=n(114),a=n(145);t.default=function(e){if(!e)throw new Error("geojson is required");var t=[];return a.flattenEach(e,(function(e){!function(e,t){var n=[],a=e.geometry;if(null!==a){switch(a.type){case"Polygon":n=i.getCoords(a);break;case"LineString":n=[i.getCoords(a)]}n.forEach((function(n){(function(e,t){var n=[];return e.reduce((function(e,i){var a=r.lineString([e,i],t);return a.bbox=function(e,t){var n=e[0],r=e[1],i=t[0],a=t[1];return[n<i?n:i,r<a?r:a,n>i?n:i,r>a?r:a]}(e,i),n.push(a),i})),n})(n,e.properties).forEach((function(e){e.id=t.length,t.push(e)}))}))}}(e,t)})),r.featureCollection(t)}},function(e,t,n){var r=n(814),i=n(942),a=n(943),o=n(944),s=n(947),u=n(953),A=Date.prototype.getTime;function c(e,t,n){var h=n||{};return!!(h.strict?a(e,t):e===t)||(!e||!t||"object"!==typeof e&&"object"!==typeof t?h.strict?a(e,t):e==t:function(e,t,n){var a,h;if(typeof e!==typeof t)return!1;if(l(e)||l(t))return!1;if(e.prototype!==t.prototype)return!1;if(i(e)!==i(t))return!1;var g=o(e),d=o(t);if(g!==d)return!1;if(g||d)return e.source===t.source&&s(e)===s(t);if(u(e)&&u(t))return A.call(e)===A.call(t);var p=f(e),v=f(t);if(p!==v)return!1;if(p||v){if(e.length!==t.length)return!1;for(a=0;a<e.length;a++)if(e[a]!==t[a])return!1;return!0}if(typeof e!==typeof t)return!1;try{var y=r(e),m=r(t)}catch(I){return!1}if(y.length!==m.length)return!1;for(y.sort(),m.sort(),a=y.length-1;a>=0;a--)if(y[a]!=m[a])return!1;for(a=y.length-1;a>=0;a--)if(h=y[a],!c(e[h],t[h],n))return!1;return!0}(e,t,h))}function l(e){return null===e||void 0===e}function f(e){return!(!e||"object"!==typeof e||"number"!==typeof e.length)&&("function"===typeof e.copy&&"function"===typeof e.slice&&!(e.length>0&&"number"!==typeof e[0]))}e.exports=c},function(e,t,n){"use strict";var r=Array.prototype.slice,i=n(815),a=Object.keys,o=a?function(e){return a(e)}:n(941),s=Object.keys;o.shim=function(){Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return i(e)?s(r.call(e)):s(e)}):Object.keys=o;return Object.keys||o},e.exports=o},function(e,t,n){"use strict";var r=Object.prototype.toString;e.exports=function(e){var t=r.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Function]"===r.call(e.callee)),n}},function(e,t,n){"use strict";var r=Object,i=TypeError;e.exports=function(){if(null!=this&&this!==r(this))throw new i("RegExp.prototype.flags getter called on non-object");var e="";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.sticky&&(e+="y"),e}},function(e,t,n){"use strict";var r=n(816),i=n(751).supportsDescriptors,a=Object.getOwnPropertyDescriptor,o=TypeError;e.exports=function(){if(!i)throw new o("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=a(RegExp.prototype,"flags");if(e&&"function"===typeof e.get&&"boolean"===typeof/a/.dotAll)return e.get}return r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_STYLE=t.MAX_ARROWS=t.DEFAULT_ARROWS=t.ArrowStyles=void 0;var r={NONE:0,FORWARD:1,BACKWARD:2,BOTH:3};t.ArrowStyles=r;t.DEFAULT_ARROWS=1;t.MAX_ARROWS=3;var i={arrowColor:[0,0,0,1],arrowCount:1,arrowStyle:r.NONE,fillColor:[0,0,0,1],lineColor:[0,0,0,1],lineWidthMeters:5,outlineRadiusMeters:0,opacity:1,zLevel:0};t.DEFAULT_STYLE=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SELECTION_TYPE=void 0;var r=n(105),i=n(72),a=c(n(376)),o=c(n(502)),s=c(n(763)),u=c(n(955)),A=c(n(212));function c(e){return e&&e.__esModule?e:{default:e}}function l(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 f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||g(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||g(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){if(e){if("string"===typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(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 v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=[0,255,0,255],m=[255,255,255,90],I=[20,20],b="DeckDrawerPick",E={NONE:null,RECTANGLE:"rectangle",POLYGON:"polygon"};t.SELECTION_TYPE=E;var C=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),v(this,"nebula",void 0),v(this,"usePolygon",void 0),v(this,"validPolygon",void 0),v(this,"landPoints",void 0),v(this,"mousePoints",void 0),this.nebula=t,this.usePolygon=!1,this.landPoints=[],this.mousePoints=[]}var t,n,c;return t=e,(n=[{key:"_getLayerIds",value:function(){return this.nebula.deckgl.props.layers.filter((function(e){return e&&e.props&&e.props.nebulaLayer&&e.props.nebulaLayer.enableSelection})).map((function(e){return e.id}))}},{key:"_selectFromPickingInfos",value:function(e){var t=e.map((function(e){var t=e.layer,n=e.index;return e.object.original||t.props.nebulaLayer.deckCache.originals[n]}));this.nebula.props.onSelection(t)}},{key:"_getBoundingBox",value:function(){var e=this.mousePoints,t=e.map((function(e){return e[0]})),n=e.map((function(e){return e[1]})),r=Math.min.apply(Math,h(t)),i=Math.min.apply(Math,h(n));return{x:r,y:i,width:Math.max.apply(Math,h(t))-r,height:Math.max.apply(Math,h(n))-i}}},{key:"_selectRectangleObjects",value:function(){if(2===this.landPoints.length){var e=f(this.mousePoints[0],2),t=e[0],n=e[1],r=f(this.mousePoints[1],2),i=r[0],a=r[1],o=this.nebula.deckgl.pickObjects({x:Math.min(t,i),y:Math.min(n,a),width:Math.abs(i-t),height:Math.abs(a-n),layerIds:this._getLayerIds()});this._selectFromPickingInfos(o)}}},{key:"_selectPolygonObjects",value:function(){var e=this.nebula.deckgl.pickObjects(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},this._getBoundingBox(),{layerIds:[b].concat(h(this._getLayerIds()))}));this._selectFromPickingInfos(e.filter((function(e){return e.layer.id!==b})))}},{key:"_getMousePosFromEvent",value:function(e){return[e.offsetX,e.offsetY]}},{key:"handleEvent",value:function(e,t,n){"mouseup"!==e.type&&e.stopPropagation(),this.usePolygon=n===E.POLYGON;var r=!1,i=!1,a=this.usePolygon,o=this.landPoints,s=this.mousePoints;if("mousedown"===e.type){if(a&&o.length)(this.landPoints.length<3||this.validPolygon)&&(o.push(t),s.push(this._getMousePosFromEvent(e)));else{this.landPoints=[t,t];var u=this._getMousePosFromEvent(e);this.mousePoints=[u,u]}r=!0}else"mousemove"===e.type&&o.length?(o[o.length-1]=t,s[s.length-1]=this._getMousePosFromEvent(e),r=!0):"mouseup"===e.type&&(a?o.length>4&&(0,A.default)(o[0],o[o.length-1])<.01&&this.validPolygon&&(this._selectPolygonObjects(),this.reset(),r=!0,i=!0):(this._selectRectangleObjects(),this.reset(),r=!0,i=!0));return{redraw:r,deactivate:i}}},{key:"reset",value:function(){this.landPoints=[],this.mousePoints=[]}},{key:"_makeStartPointHighlight",value:function(e){var t=(0,s.default)((0,i.point)(e),.0025);return(0,o.default)((0,a.default)(t)).geometry.coordinates}},{key:"render",value:function(){var e=this,t=[],n=[];if(this.usePolygon||2!==this.landPoints.length){if(this.usePolygon&&this.landPoints.length&&(t.push({polygon:this.landPoints,lineColor:y,fillColor:m}),this.landPoints.length>=3)){var a,o=(0,i.polygon)([[].concat(h(this.landPoints),[this.landPoints[0]])]),A=(0,s.default)((0,i.point)(this.landPoints[0]),10);try{a=(0,u.default)(A,o),n.push({polygon:a.geometry.coordinates,fillColor:[0,0,0,1]}),this.validPolygon=!0}catch(B){this.validPolygon=!1}}}else{var c=f(this.mousePoints,2),l=f(c[0],2),g=l[0],d=l[1],p=f(c[1],2),v=p[0],E=p[1],C=[[g,d],[g,E],[v,E],[v,d],[g,d]].map((function(t){return e.nebula.unprojectMousePosition(t)}));t.push({polygon:C,lineColor:y,fillColor:m})}return this.landPoints.length&&t.push({polygon:this._makeStartPointHighlight(this.landPoints[0]),lineColor:[0,0,0,0],fillColor:y}),t.push({polygon:[[0,0]]}),n.push({polygon:[[0,0]]}),[new r.PolygonLayer({id:"DeckDrawerView",data:t,fp64:!1,opacity:1,pickable:!1,lineWidthMinPixels:2,lineWidthMaxPixels:2,lineDashJustified:!0,getLineDashArray:function(e){return I},getLineColor:function(e){return e.lineColor||[0,0,0,255]},getFillColor:function(e){return e.fillColor||[0,0,0,255]},getPolygon:function(e){return e.polygon}}),new r.PolygonLayer({id:b,data:n,getLineColor:function(e){return e.lineColor||[0,0,0,255]},getFillColor:function(e){return e.fillColor||[0,0,0,255]},fp64:!1,opacity:1,stroked:!1,pickable:!0,getPolygon:function(e){return e.polygon}})]}}])&&p(t.prototype,n),c&&p(t,c),e}();t.default=C},function(e,t,n){"use strict";function r(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 i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(){function e(t,n){var r=n.data,a=n.groundPoint,o=n.nebula,s=n.metadata;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"canceled",void 0),i(this,"data",void 0),i(this,"metadata",void 0),i(this,"groundPoint",void 0),i(this,"nativeEvent",void 0),i(this,"nebula",void 0),this.nativeEvent=t,this.data=r,this.groundPoint=a,this.nebula=o,this.metadata=s}var t,n,a;return t=e,(n=[{key:"stopPropagation",value:function(){this.nativeEvent.stopPropagation(),this.canceled=!0}}])&&r(t.prototype,n),a&&r(t,a),e}();t.default=a},function(e,t,n){"use strict";function r(e){return e&&"object"===typeof e&&"default"in e?e.default:e}var i=r(n(456)),a=r(n(457)),o=n(72),s=n(114),u=n(145);function A(e){switch(e.type){case"Polygon":return a(e)>1?e:null;case"MultiPolygon":var t=[];if(u.flattenEach(e,(function(e){a(e)>1&&t.push(e.geometry.coordinates)})),t.length)return{type:"MultiPolygon",coordinates:t}}}e.exports=function(e,t){var n=s.getGeom(e),r=s.getGeom(t),a=e.properties||{};if(n=A(n),r=A(r),!n)return null;if(!r)return o.feature(n,a);var u=i.diff(n.coordinates,r.coordinates);return 0===u.length?null:1===u.length?o.polygon(u[0],a):o.multiPolygon(u,a)}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(212)),a=n(72),o=n(114),s=n(145),u=r(n(961));function A(e,t){return e[0]*t[0]+e[1]*t[1]}function c(e,t,n){return"planar"===n.method?u.default(e,t,n):i.default(e,t,n)}t.default=function(e,t,n){if(void 0===n&&(n={}),n.method||(n.method="geodesic"),n.units||(n.units="kilometers"),!e)throw new Error("pt is required");if(Array.isArray(e)?e=a.point(e):"Point"===e.type?e=a.feature(e):o.featureOf(e,"Point","point"),!t)throw new Error("line is required");Array.isArray(t)?t=a.lineString(t):"LineString"===t.type?t=a.feature(t):o.featureOf(t,"LineString","line");var r=1/0,i=e.geometry.coordinates;return s.segmentEach(t,(function(e){var t=e.geometry.coordinates[0],a=e.geometry.coordinates[1],o=function(e,t,n,r){var i=[n[0]-t[0],n[1]-t[1]],a=A([e[0]-t[0],e[1]-t[1]],i);if(a<=0)return c(e,t,{method:r.method,units:"degrees"});var o=A(i,i);if(o<=a)return c(e,n,{method:r.method,units:"degrees"});var s=a/o,u=[t[0]+s*i[0],t[1]+s*i[1]];return c(e,u,{method:r.method,units:"degrees"})}(i,t,a,n);o<r&&(r=o)})),a.convertLength(r,"degrees",n.units)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScaleMode=void 0;var r=p(n(376)),i=p(n(380)),a=p(n(272)),o=p(n(502)),s=n(72),u=p(n(756)),A=n(145),c=p(n(212)),l=p(n(1054)),f=n(114),h=n(241),g=n(162),d=n(326);function p(e){return e&&e.__esModule?e:{default:e}}function v(e){return(v="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(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 E(e,t){return!t||"object"!==v(t)&&"function"!==typeof t?C(e):t}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Q(e,t){return(Q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Q(e,t)}(v,e);var t,n,c,g,p=(t=v,function(){var e,n=w(t);if(B()){var r=w(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return E(this,e)});function v(){var e;I(this,v);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return k(C(e=p.call.apply(p,[this].concat(n))),"_geometryBeingScaled",void 0),k(C(e),"_selectedEditHandle",void 0),k(C(e),"_cornerGuidePoints",void 0),k(C(e),"_cursor",void 0),k(C(e),"_isScaling",!1),k(C(e),"_isSinglePointGeometrySelected",(function(e){var t=(e||{}).features;return!(!Array.isArray(t)||1!==t.length)&&"Point"===(0,f.getGeom)(t[0]).type})),k(C(e),"_getOppositeScaleHandle",(function(t){var n=t&&t.properties&&Array.isArray(t.properties.positionIndexes)&&t.properties.positionIndexes[0];if("number"!==typeof n)return null;var r=e._cornerGuidePoints.length,i=(n+r/2)%r;return e._cornerGuidePoints.find((function(e){return!!Array.isArray(e.properties.positionIndexes)&&e.properties.positionIndexes[0]===i}))})),k(C(e),"_getUpdatedData",(function(e,t){for(var n=new d.ImmutableFeatureCollection(e.data),r=e.selectedIndexes,i=0;i<r.length;i++){var a=r[i],o=t.features[i];n=n.replaceGeometry(a,o.geometry)}return n.getObject()})),k(C(e),"isEditHandleSelected",(function(){return Boolean(e._selectedEditHandle)})),k(C(e),"getScaleAction",(function(t,n,r,i){if(!e._selectedEditHandle)return null;var a=e._getOppositeScaleHandle(e._selectedEditHandle),o=(0,f.getCoord)(a),s=x(o,t,n),u=(0,l.default)(e._geometryBeingScaled,s,{origin:o});return{updatedData:e._getUpdatedData(i,u),editType:r,editContext:{featureIndexes:i.selectedIndexes}}})),k(C(e),"updateCursor",(function(t){if(e._selectedEditHandle){e._cursor&&t.onUpdateCursor(e._cursor);var n=e.getSelectedFeaturesAsFeatureCollection(t),r=(0,i.default)(n),o=(0,a.default)(r,e._selectedEditHandle),s=o<0?o+180:o;s>=0&&s<=90||s>=180&&s<=270?(e._cursor="nesw-resize",t.onUpdateCursor("nesw-resize")):(e._cursor="nwse-resize",t.onUpdateCursor("nwse-resize"))}else t.onUpdateCursor(null),e._cursor=null})),e}return n=v,(c=[{key:"handlePointerMove",value:function(e,t){if(!this._isScaling){var n=(0,h.getPickedEditHandle)(e.picks);this._selectedEditHandle=n&&"scale"===n.properties.editHandleType?n:null,n&&this.updateCursor(t)}}},{key:"handleStartDragging",value:function(e,t){this._selectedEditHandle&&(this._isScaling=!0,this._geometryBeingScaled=this.getSelectedFeaturesAsFeatureCollection(t))}},{key:"handleDragging",value:function(e,t){if(this._isScaling){t.onUpdateCursor(this._cursor);var n=this.getScaleAction(e.pointerDownMapCoords,e.mapCoords,"scaling",t);n&&t.onEdit(n),e.cancelPan()}}},{key:"handleStopDragging",value:function(e,t){if(this._isScaling){var n=this.getScaleAction(e.pointerDownMapCoords,e.mapCoords,"scaled",t);n&&t.onEdit(n),t.onUpdateCursor(null),this._geometryBeingScaled=null,this._selectedEditHandle=null,this._cursor=null,this._isScaling=!1}}},{key:"getGuides",value:function(e){this._cornerGuidePoints=[];var t=this.getSelectedFeaturesAsFeatureCollection(e);if(this._isSinglePointGeometrySelected(t))return{type:"FeatureCollection",features:[]};var n=(0,o.default)((0,r.default)(t));n.properties.mode="scale";var i=[];return(0,A.coordEach)(n,(function(e,t){if(t<4){var n=(0,s.point)(e,{guideType:"editHandle",editHandleType:"scale",positionIndexes:[t]});i.push(n)}})),this._cornerGuidePoints=i,(0,s.featureCollection)([(0,u.default)(n)].concat(y(this._cornerGuidePoints)))}}])&&b(n.prototype,c),g&&b(n,g),v}(g.GeoJsonEditMode);function x(e,t,n){var r=(0,c.default)(e,t);return(0,c.default)(e,n)/r}t.ScaleMode=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RotateMode=void 0;var r=p(n(376)),i=p(n(380)),a=p(n(272)),o=p(n(502)),s=p(n(212)),u=n(145),A=n(114),c=n(72),l=p(n(764)),f=p(n(756)),h=n(241),g=n(162),d=n(326);function p(e){return e&&e.__esModule?e:{default:e}}function v(e){return(v="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(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 I(e,t){return!t||"object"!==v(t)&&"function"!==typeof t?b(e):t}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Q=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&B(e,t)}(k,e);var t,n,p,v,Q=(t=k,function(){var e,n=C(t);if(E()){var r=C(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return I(this,e)});function k(){var e;y(this,k);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return w(b(e=Q.call.apply(Q,[this].concat(n))),"_selectedEditHandle",void 0),w(b(e),"_geometryBeingRotated",void 0),w(b(e),"_isRotating",!1),w(b(e),"_isSinglePointGeometrySelected",(function(e){var t=(e||{}).features;return!(!Array.isArray(t)||1!==t.length)&&"Point"===(0,A.getGeom)(t[0]).type})),w(b(e),"getIsRotating",(function(){return e._isRotating})),e}return n=k,(p=[{key:"getGuides",value:function(e){var t=this._geometryBeingRotated||this.getSelectedFeaturesAsFeatureCollection(e);if(this._isSinglePointGeometrySelected(t))return{type:"FeatureCollection",features:[]};if(this._isRotating)return(0,c.featureCollection)([(0,i.default)(t)]);var n=(0,o.default)((0,r.default)(t)),a=null,A=null,l=0;(0,u.coordEach)(n,(function(e){if(a){var t=(0,g.getIntermediatePosition)(e,a);(!A||t[1]>A[1])&&(A=t);var n=(0,s.default)(e,a);l=Math.max(l,n)}a=e}));var h=A&&[A[0],A[1]+l/1e3],d=(0,c.lineString)([A,h]),p=(0,c.point)(h,{guideType:"editHandle",editHandleType:"rotate"});return(0,c.featureCollection)([(0,f.default)(n),p,d])}},{key:"handleDragging",value:function(e,t){if(this._isRotating){var n=this.getRotateAction(e.pointerDownMapCoords,e.mapCoords,"rotating",t);n&&t.onEdit(n),e.cancelPan()}}},{key:"handlePointerMove",value:function(e,t){if(!this._isRotating){var n=(0,h.getPickedEditHandle)(e.picks);this._selectedEditHandle=n&&"rotate"===n.properties.editHandleType?n:null}this.updateCursor(t)}},{key:"handleStartDragging",value:function(e,t){this._selectedEditHandle&&(this._isRotating=!0,this._geometryBeingRotated=this.getSelectedFeaturesAsFeatureCollection(t))}},{key:"handleStopDragging",value:function(e,t){if(this._isRotating){var n=this.getRotateAction(e.pointerDownMapCoords,e.mapCoords,"rotated",t);n&&t.onEdit(n),this._geometryBeingRotated=null,this._selectedEditHandle=null,this._isRotating=!1}}},{key:"updateCursor",value:function(e){this._selectedEditHandle?e.onUpdateCursor("crosshair"):e.onUpdateCursor(null)}},{key:"getRotateAction",value:function(e,t,n,r){if(!this._geometryBeingRotated)return null;for(var o=(0,i.default)(this._geometryBeingRotated),s=function(e,t,n){var r=(0,a.default)(e,t);return(0,a.default)(e,n)-r}(o,e,t),u=(0,l.default)(this._geometryBeingRotated,s,{pivot:o}),A=new d.ImmutableFeatureCollection(r.data),c=r.selectedIndexes,f=0;f<c.length;f++){var h=c[f],g=u.features[f];A=A.replaceGeometry(h,g.geometry)}return{updatedData:A.getObject(),editType:n,editContext:{featureIndexes:c}}}}])&&m(n.prototype,p),v&&m(n,v),k}(g.GeoJsonEditMode);t.RotateMode=Q},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"===typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(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 u(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?A(e):t}function A(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeMode=void 0;var h=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(g,e);var t,n,r,o,h=(t=g,function(){var e,n=l(t);if(c()){var r=l(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return u(this,e)});function g(e){var t,n,r,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),t=h.call(this),n=A(t),i=void 0,(r="_modes")in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,t._modes=e,t}return n=g,(r=[{key:"_coalesce",value:function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=0;r<this._modes.length&&(t=e(this._modes[r]),!(n?n(t):t));r++);return t}},{key:"handleClick",value:function(e,t){this._coalesce((function(n){return n.handleClick(e,t)}))}},{key:"handlePointerMove",value:function(e,t){return this._coalesce((function(n){return n.handlePointerMove(e,t)}))}},{key:"handleStartDragging",value:function(e,t){return this._coalesce((function(n){return n.handleStartDragging(e,t)}))}},{key:"handleStopDragging",value:function(e,t){return this._coalesce((function(n){return n.handleStopDragging(e,t)}))}},{key:"handleDragging",value:function(e,t){return this._coalesce((function(n){return n.handleDragging(e,t)}))}},{key:"getGuides",value:function(e){var t,n=[],r=function(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=a(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,i,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}(this._modes);try{for(r.s();!(t=r.n()).done;){var o=t.value;n.push.apply(n,i(o.getGuides(e).features))}}catch(s){r.e(s)}finally{r.f()}return{type:"FeatureCollection",features:n}}}])&&s(n.prototype,r),o&&s(n,o),g}(n(162).GeoJsonEditMode);t.CompositeMode=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(444),i=n(72);t.default=function(e,t,n){void 0===n&&(n={});for(var a=n.steps||64,o=n.properties?n.properties:!Array.isArray(e)&&"Feature"===e.type&&e.properties?e.properties:{},s=[],u=0;u<a;u++)s.push(r.default(e,t,-360*u/a,n).geometry.coordinates);return s.push(s[0]),i.polygon([s],o)}},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 o(e,t,n){return(o="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=A(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function s(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ThreeClickPolygonMode=void 0;var l=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(h,e);var t,n,r,l,f=(t=h,function(){var e,n=A(t);if(u()){var r=A(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return s(this,e)});function h(){return i(this,h),f.apply(this,arguments)}return n=h,(r=[{key:"handleClick",value:function(e,t){this.addClickSequence(e);var n=this.getClickSequence(),r=this.getTentativeGuide(t);if(n.length>2&&r&&"Polygon"===r.geometry.type){var i=this.getAddFeatureOrBooleanPolygonAction(r.geometry,t);this.resetClickSequence(),i&&t.onEdit(i)}}},{key:"getGuides",value:function(e){var t=e.lastPointerMoveEvent,n=e.modeConfig,r=this.getClickSequence(),i={type:"FeatureCollection",features:[]};if(0===r.length)return i;var a=t.mapCoords;if(1===r.length)i.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[r[0],a]}});else{var o=this.getThreeClickPolygon(r[0],r[1],a,n);o&&i.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:o.geometry})}return i}},{key:"getThreeClickPolygon",value:function(e,t,n,r){return null}},{key:"handlePointerMove",value:function(e,t){t.onUpdateCursor("cell"),o(A(h.prototype),"handlePointerMove",this).call(this,e,t)}},{key:"createTentativeFeature",value:function(e){var t,n=e.lastPointerMoveEvent,r=this.getClickSequence(),i=n?[n.mapCoords]:[];return 2===r.length&&(t=this.getThreeClickPolygon(r[0],r[1],i[0],e.modeConfig)),t}}])&&a(n.prototype,r),l&&a(n,l),h}(n(162).GeoJsonEditMode);t.ThreeClickPolygonMode=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(49);function i(e){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(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 o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"===typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,i,a=!0,o=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(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 l(e,t){return!t||"object"!==i(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=["anyclick","pointermove","panstart","panmove","panend","keyup"],v=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(u,e);var t,n,r,i,a=(t=u,function(){var e,n=h(t);if(f()){var r=h(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return l(this,e)});function u(){return A(this,u),a.apply(this,arguments)}return n=u,(r=[{key:"onLayerClick",value:function(e){}},{key:"onStartDragging",value:function(e){}},{key:"onStopDragging",value:function(e){}},{key:"onDragging",value:function(e){}},{key:"onPointerMove",value:function(e){}},{key:"onLayerKeyUp",value:function(e){}},{key:"initializeState",value:function(){this.setState({_editableLayerState:{pointerDownPicks:null,pointerDownScreenCoords:null,pointerDownMapCoords:null,eventHandler:this._forwardEventToCurrentLayer.bind(this)}}),this._addEventHandlers()}},{key:"finalizeState",value:function(){this._removeEventHandlers()}},{key:"_addEventHandlers",value:function(){var e,t=this.context.deck.eventManager,n=this.state._editableLayerState.eventHandler,r=s(p);try{for(r.s();!(e=r.n()).done;){var i=e.value;t.on(i,n,{priority:100})}}catch(a){r.e(a)}finally{r.f()}}},{key:"_removeEventHandlers",value:function(){var e,t=this.context.deck.eventManager,n=this.state._editableLayerState.eventHandler,r=s(p);try{for(r.s();!(e=r.n()).done;){var i=e.value;t.off(i,n)}}catch(a){r.e(a)}finally{r.f()}}},{key:"_forwardEventToCurrentLayer",value:function(e){var t=this.getCurrentLayer(),n=t["_on".concat(e.type)].bind(t);n?n(e):console.warn("no handler for mjolnir.js event ".concat(e.type))}},{key:"_onanyclick",value:function(e){var t=e.srcEvent,n=this.getScreenCoords(t),r=this.getMapCoords(n),i=this.getPicks(n);this.onLayerClick({mapCoords:r,screenCoords:n,picks:i,sourceEvent:t})}},{key:"_onkeyup",value:function(e){var t=e.srcEvent;this.onLayerKeyUp(t)}},{key:"_onpanstart",value:function(e){var t=this.getScreenCoords(e.srcEvent),n=this.getMapCoords(t),r=this.getPicks(t);this.setState({_editableLayerState:o({},this.state._editableLayerState,{pointerDownScreenCoords:t,pointerDownMapCoords:n,pointerDownPicks:r})}),this.onStartDragging({picks:r,screenCoords:t,mapCoords:n,pointerDownScreenCoords:t,pointerDownMapCoords:n,cancelPan:e.stopImmediatePropagation,sourceEvent:e.srcEvent})}},{key:"_onpanmove",value:function(e){var t=e.srcEvent,n=this.getScreenCoords(t),r=this.getMapCoords(n),i=this.state._editableLayerState,a=i.pointerDownPicks,o=i.pointerDownScreenCoords,s=i.pointerDownMapCoords,u=this.getPicks(n);this.onDragging({screenCoords:n,mapCoords:r,picks:u,pointerDownPicks:a,pointerDownScreenCoords:o,pointerDownMapCoords:s,sourceEvent:t,cancelPan:e.stopImmediatePropagation})}},{key:"_onpanend",value:function(e){var t=e.srcEvent,n=this.getScreenCoords(t),r=this.getMapCoords(n),i=this.state._editableLayerState,a=i.pointerDownPicks,s=i.pointerDownScreenCoords,u=i.pointerDownMapCoords,A=this.getPicks(n);this.onStopDragging({picks:A,screenCoords:n,mapCoords:r,pointerDownPicks:a,pointerDownScreenCoords:s,pointerDownMapCoords:u,sourceEvent:t}),this.setState({_editableLayerState:o({},this.state._editableLayerState,{pointerDownScreenCoords:null,pointerDownMapCoords:null,pointerDownPicks:null})})}},{key:"_onpointermove",value:function(e){var t=e.srcEvent,n=this.getScreenCoords(t),r=this.getMapCoords(n),i=this.state._editableLayerState,a=i.pointerDownPicks,o=i.pointerDownScreenCoords,s=i.pointerDownMapCoords,u=this.getPicks(n);this.onPointerMove({screenCoords:n,mapCoords:r,picks:u,pointerDownPicks:a,pointerDownScreenCoords:o,pointerDownMapCoords:s,sourceEvent:t})}},{key:"getPicks",value:function(e){return this.context.deck.pickMultipleObjects({x:e[0],y:e[1],layerIds:[this.props.id],radius:this.props.pickingRadius,depth:this.props.pickingDepth})}},{key:"getScreenCoords",value:function(e){return[e.clientX-this.context.gl.canvas.getBoundingClientRect().left,e.clientY-this.context.gl.canvas.getBoundingClientRect().top]}},{key:"getMapCoords",value:function(e){return this.context.viewport.unproject([e[0],e[1]])}}])&&c(n.prototype,r),i&&c(n,i),u}(r.CompositeLayer);t.default=v,d(v,"layerName","EditableLayer")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(105),i=s(n(148)),a=n(50),o=s(n(989));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(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 l(e,t,n){return(l="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function f(e,t){return!t||"object"!==u(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){var t=e.source,n=e.code,r=void 0===n?"":n;return t.replace(/}[^{}]*$/,r.concat("\n}\n"))}var y=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(p,e);var t,n,r,s,u=(t=p,function(){var e,n=g(t);if(h()){var r=g(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return f(this,e)});function p(){return A(this,p),u.apply(this,arguments)}return n=p,(r=[{key:"getShaders",value:function(){var e=l(g(p.prototype),"getShaders",this).call(this);return Object.assign({},e,{modules:e.modules.concat([o.default]),vs:v({source:e.vs,code:"  outline_setUV(gl_Position);\n  outline_setZLevel(instanceZLevel);\n"}),fs:v({source:e.fs,code:"  gl_FragColor = outline_filterColor(gl_FragColor);\n"})})}},{key:"initializeState",value:function(e){l(g(p.prototype),"initializeState",this).call(this,e),this.setState({outlineFramebuffer:new a.Framebuffer(e.gl),dummyTexture:new a.Texture2D(e.gl)}),this.state.attributeManager.addInstanced({instanceZLevel:{size:1,type:i.default.UNSIGNED_BYTE,update:this.calculateZLevels,accessor:"getZLevel"}})}},{key:"draw",value:function(e){e.moduleParameters,e.parameters;var t=e.uniforms,n=(e.context,this.props),r=n.rounded,a=n.miterLimit,o=n.widthScale,s=n.widthMinPixels,u=n.widthMaxPixels,A=n.dashJustified;t=Object.assign({},t,{jointType:Number(r),alignMode:Number(A),widthScale:o,miterLimit:a,widthMinPixels:s,widthMaxPixels:u});var c=this.state,l=c.outlineFramebuffer,f=c.dummyTexture;l.resize(),l.clear({color:!0,depth:!0}),this.state.model.updateModuleSettings({outlineEnabled:!0,outlineRenderShadowmap:!0,outlineShadowmap:f}),this.state.model.draw({uniforms:Object.assign({},t,{jointType:0,widthScale:1.3*this.props.widthScale}),parameters:{depthTest:!1,blendEquation:i.default.MAX},framebuffer:l}),this.state.model.updateModuleSettings({outlineEnabled:!0,outlineRenderShadowmap:!1,outlineShadowmap:l}),this.state.model.draw({uniforms:Object.assign({},t,{jointType:Number(r),widthScale:this.props.widthScale}),parameters:{depthTest:!1}})}},{key:"calculateZLevels",value:function(e){var t=this.props.getZLevel,n=this.state.pathTesselator;e.value=n._updateAttribute({target:e.value,size:1,getValue:function(e,n){return[t(e,n)||0]}})}}])&&c(n.prototype,r),s&&c(n,s),p}(r.PathLayer);t.default=y,p(y,"layerName","PathOutlineLayer"),p(y,"defaultProps",{getZLevel:{type:"accessor",value:0}})},function(e,t,n){var r=n(737),i=n(1009),a=n(1011);e.exports=function(e,t){return a(i(e,t,r),e+"")}},function(e,t,n){var r=n(349),i=n(197);e.exports=function(e){return i(e)&&r(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},function(e,t,n){"use strict";n.r(t);var r=n(23),i=n(16),a=n(3),o=n(2),s=n(40);function u(e,t){var n=s.n([],t,e);return s.k(n,n,1/n[3]),n}function A(e,t){var n=e%t;return n<0?t+n:n}function c(e,t,n){return n*t+(1-n)*e}var l=n(10),f=n(32),h=n(17);function g(e,t){if(!e)throw new Error(t||"@math.gl/web-mercator: assertion failed.")}var d=Math.PI,p=d/4,v=d/180,y=180/d;function m(e){return Math.pow(2,e)}function I(e){return Math.log2(e)}function b(e){var t=Object(i.a)(e,2),n=t[0],r=t[1];g(Number.isFinite(n)),g(Number.isFinite(r)&&r>=-90&&r<=90,"invalid latitude");var a=r*v;return[512*(n*v+d)/(2*d),512*(d+Math.log(Math.tan(p+.5*a)))/(2*d)]}function E(e){var t=Object(i.a)(e,2),n=t[0],r=t[1],a=n/512*(2*d)-d,o=2*(Math.atan(Math.exp(r/512*(2*d)-d))-p);return[a*y,o*y]}function C(e){var t=e.latitude;return g(Number.isFinite(t)),I(4003e4*Math.cos(t*v))-9}function B(e){var t=e.latitude,n=e.longitude,r=e.highPrecision,i=void 0!==r&&r;g(Number.isFinite(t)&&Number.isFinite(n));var a={},o=Math.cos(t*v),s=512/360/o,u=512/4003e4/o;if(a.unitsPerMeter=[u,u,u],a.metersPerUnit=[1/u,1/u,1/u],a.unitsPerDegree=[512/360,s,u],a.degreesPerUnit=[.703125,1/s,1/u],i){var A=v*Math.tan(t*v)/o,c=512/360*A/2,l=512/4003e4*A,f=l/s*u;a.unitsPerDegree2=[0,c,l],a.unitsPerMeter2=[f,0,f]}return a}function w(e,t){var n=Object(i.a)(e,3),r=n[0],a=n[1],o=n[2],s=Object(i.a)(t,3),u=s[0],A=s[1],c=s[2],l=B({longitude:r,latitude:a,highPrecision:!0}),f=l.unitsPerMeter,h=l.unitsPerMeter2,g=b(e);g[0]+=u*(f[0]+h[0]*A),g[1]+=A*(f[1]+h[1]*A);var d=E(g),p=(o||0)+(c||0);return Number.isFinite(o)||Number.isFinite(c)?[d[0],d[1],p]:d}function Q(e){var t=e.height,n=e.pitch,r=e.bearing,i=e.altitude,a=e.scale,o=e.center,s=void 0===o?null:o,u=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return l.p(u,u,[0,0,-i]),l.l(u,u,-n*v),l.n(u,u,r*v),a/=t,l.o(u,u,[a,a,a]),s&&l.p(u,u,h.i([],s)),u}function k(e){var t=e.width,n=e.height,r=e.altitude,i=void 0===r?1.5:r,a=e.pitch,o=void 0===a?0:a,s=e.nearZMultiplier,u=void 0===s?1:s,A=e.farZMultiplier,c=void 0===A?1:A,l=o*v,f=Math.atan(.5/i),h=Math.sin(f)*i/Math.sin(Math.min(Math.max(Math.PI/2-l-f,.01),Math.PI-.01));return{fov:2*f,aspect:t/n,focalDistance:i,near:u,far:(Math.sin(l)*h+i)*c}}function _(e){var t=e.width,n=e.height,r=e.pitch,i=k({width:t,height:n,altitude:e.altitude,pitch:r,nearZMultiplier:e.nearZMultiplier,farZMultiplier:e.farZMultiplier}),a=i.fov,o=i.aspect,s=i.near,u=i.far;return l.j([],a,o,s,u)}function x(e,t){var n=Object(i.a)(e,3),r=n[0],a=n[1],o=n[2],s=void 0===o?0:o;return g(Number.isFinite(r)&&Number.isFinite(a)&&Number.isFinite(s)),u(t,[r,a,s,1])}function S(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Object(i.a)(e,3),a=r[0],o=r[1],s=r[2];if(g(Number.isFinite(a)&&Number.isFinite(o),"invalid pixel coordinate"),Number.isFinite(s)){var A=u(t,[a,o,s,1]);return A}var c=u(t,[a,o,0,1]),l=u(t,[a,o,1,1]),h=c[2],d=l[2],p=h===d?0:((n||0)-h)/(d-h);return f.c([],c,l,p)}function O(e){var t=e.width,n=e.height,r=e.bounds,a=e.minExtent,o=void 0===a?0:a,s=e.maxZoom,u=void 0===s?24:s,A=e.padding,c=void 0===A?0:A,l=e.offset,f=void 0===l?[0,0]:l,h=Object(i.a)(r,2),d=Object(i.a)(h[0],2),p=d[0],v=d[1],y=Object(i.a)(h[1],2),m=y[0],I=y[1];if(Number.isFinite(c)){c={top:c,bottom:c,left:c,right:c}}else g(Number.isFinite(c.top)&&Number.isFinite(c.bottom)&&Number.isFinite(c.left)&&Number.isFinite(c.right));var b=new M({width:t,height:n,longitude:0,latitude:0,zoom:0}),E=b.project([p,I]),C=b.project([m,v]),B=[Math.max(Math.abs(C[0]-E[0]),o),Math.max(Math.abs(C[1]-E[1]),o)],w=[t-c.left-c.right-2*Math.abs(f[0]),n-c.top-c.bottom-2*Math.abs(f[1])];g(w[0]>0&&w[1]>0);var Q=w[0]/B[0],k=w[1]/B[1],_=(c.right-c.left)/2/Q,x=(c.bottom-c.top)/2/k,S=[(C[0]+E[0])/2+_,(C[1]+E[1])/2+x],O=b.unproject(S),D=Math.min(u,b.zoom+Math.log2(Math.abs(Math.min(Q,k))));return g(Number.isFinite(D)),{longitude:O[0],latitude:O[1],zoom:D}}var D=Math.PI/180;function R(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=e.width,a=e.height,o=e.unproject,s={targetZ:r},u=o([0,a],s),A=o([i,a],s),c=Math.atan(.5/e.altitude),l=(90-e.pitch)*D;return c>l-.01?(t=j(e,0,r),n=j(e,i,r)):(t=o([0,0],s),n=o([i,0],s)),[u,A,n,t]}function j(e,t,n){var r=e.pixelUnprojectionMatrix,i=u(r,[t,0,1,1]),a=u(r,[t,e.height,1,1]),o=(n*e.distanceScales.unitsPerMeter[2]-i[2])/(a[2]-i[2]),s=E(f.c([],i,a,o));return s[2]=n,s}var M=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{width:1,height:1},n=t.width,r=t.height,i=t.latitude,o=void 0===i?0:i,s=t.longitude,u=void 0===s?0:s,A=t.zoom,c=void 0===A?0:A,l=t.pitch,f=void 0===l?0:l,h=t.bearing,g=void 0===h?0:h,d=t.altitude,p=void 0===d?1.5:d,v=t.nearZMultiplier,y=void 0===v?.02:v,I=t.farZMultiplier,E=void 0===I?1.01:I;Object(a.a)(this,e),n=n||1,r=r||1;var C=m(c);p=Math.max(.75,p);var w=b([u,o]);w[2]=0,this.projectionMatrix=_({width:n,height:r,pitch:f,altitude:p,nearZMultiplier:y,farZMultiplier:E}),this.viewMatrix=Q({height:r,scale:C,center:w,pitch:f,bearing:g,altitude:p}),this.width=n,this.height=r,this.scale=C,this.latitude=o,this.longitude=u,this.zoom=c,this.pitch=f,this.bearing=g,this.altitude=p,this.center=w,this.distanceScales=B(this),this._initMatrices(),this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),Object.freeze(this)}return Object(o.a)(e,[{key:"_initMatrices",value:function(){var e=this.width,t=this.height,n=this.projectionMatrix,r=this.viewMatrix,i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];l.h(i,i,n),l.h(i,i,r),this.viewProjectionMatrix=i;var a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];l.o(a,a,[e/2,-t/2,1]),l.p(a,a,[1,-1,0]),l.h(a,a,i);var o=l.f([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],a);if(!o)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=a,this.pixelUnprojectionMatrix=o}},{key:"equals",value:function(t){return t instanceof e&&(t.width===this.width&&t.height===this.height&&l.b(t.projectionMatrix,this.projectionMatrix)&&l.b(t.viewMatrix,this.viewMatrix))}},{key:"project",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.topLeft,r=void 0===n||n,a=this.projectPosition(e),o=x(a,this.pixelProjectionMatrix),s=Object(i.a)(o,2),u=s[0],A=s[1],c=r?A:this.height-A;return 2===e.length?[u,c]:[u,c,o[2]]}},{key:"unproject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.topLeft,r=void 0===n||n,a=t.targetZ,o=void 0===a?void 0:a,s=Object(i.a)(e,3),u=s[0],A=s[1],c=s[2],l=r?A:this.height-A,f=o&&o*this.distanceScales.unitsPerMeter[2],h=S([u,l,c],this.pixelUnprojectionMatrix,f),g=this.unprojectPosition(h),d=Object(i.a)(g,3),p=d[0],v=d[1],y=d[2];return Number.isFinite(c)?[p,v,y]:Number.isFinite(o)?[p,v,o]:[p,v]}},{key:"projectPosition",value:function(e){var t=b(e),n=Object(i.a)(t,2);return[n[0],n[1],(e[2]||0)*this.distanceScales.unitsPerMeter[2]]}},{key:"unprojectPosition",value:function(e){var t=E(e),n=Object(i.a)(t,2);return[n[0],n[1],(e[2]||0)*this.distanceScales.metersPerUnit[2]]}},{key:"projectFlat",value:function(e){return b(e)}},{key:"unprojectFlat",value:function(e){return E(e)}},{key:"getMapCenterByLngLatPosition",value:function(e){var t=e.lngLat,n=S(e.pos,this.pixelUnprojectionMatrix),r=b(t),i=f.a([],r,f.d([],n));return E(f.a([],this.center,i))}},{key:"getLocationAtPoint",value:function(e){var t=e.lngLat,n=e.pos;return this.getMapCenterByLngLatPosition({lngLat:t,pos:n})}},{key:"fitBounds",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.width,i=this.height,a=O(Object.assign({width:r,height:i,bounds:t},n)),o=a.longitude,s=a.latitude,u=a.zoom;return new e({width:r,height:i,longitude:o,latitude:s,zoom:u})}},{key:"getBounds",value:function(e){var t=this.getBoundingRegion(e),n=Math.min.apply(Math,Object(r.a)(t.map((function(e){return e[0]})))),i=Math.max.apply(Math,Object(r.a)(t.map((function(e){return e[0]}))));return[[n,Math.min.apply(Math,Object(r.a)(t.map((function(e){return e[1]}))))],[i,Math.max.apply(Math,Object(r.a)(t.map((function(e){return e[1]}))))]]}},{key:"getBoundingRegion",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return R(this,e.z||0)}}]),e}();function N(e){var t=e.width,n=e.height,r=e.longitude,i=e.latitude,a=e.zoom,o=e.pitch,s=void 0===o?0:o,u=e.bearing,c=void 0===u?0:u;(r<-180||r>180)&&(r=A(r+180,360)-180),(c<-180||c>180)&&(c=A(c+180,360)-180);var l=new M({width:t,height:n,longitude:r,latitude:i,zoom:a}),f=l.project([r,85.05113])[1],h=l.project([r,-85.05113])[1],g=0;return h-f<n&&(a+=Math.log2(n/(h-f)),f=(l=new M({width:t,height:n,longitude:r,latitude:i,zoom:a})).project([r,85.05113])[1],h=l.project([r,-85.05113])[1]),f>0?g=f:h<n&&(g=h-n),g&&(i=l.unproject([t/2,n/2+g])[1]),{width:t,height:n,longitude:r,latitude:i,zoom:a,pitch:s,bearing:c}}function F(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return T(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var L=["longitude","latitude","zoom"],P={curve:1.414,speed:1.2};function U(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i={},a=q(e,t,r),o=a.startZoom,s=a.startCenterXY,u=a.uDelta,A=a.w0,l=a.u1,h=a.S,g=a.rho,d=a.rho2,p=a.r0;if(l<.01){var v,y=F(L);try{for(y.s();!(v=y.n()).done;){var m=v.value,b=e[m],C=t[m];i[m]=c(b,C,n)}}catch(O){y.e(O)}finally{y.f()}return i}var B=n*h,w=Math.cosh(p)/Math.cosh(p+g*B),Q=A*((Math.cosh(p)*Math.tanh(p+g*B)-Math.sinh(p))/d)/l,k=1/w,_=o+I(k),x=f.e([],u,Q);f.a(x,x,s);var S=E(x);return i.longitude=S[0],i.latitude=S[1],i.zoom=_,i}function G(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r=Object.assign({},P,r),a=i.screenSpeed,o=i.speed,s=i.maxDuration,u=q(e,t,r),A=u.S,c=u.rho,l=1e3*A;return n=Number.isFinite(a)?l/(a/c):l/o,Number.isFinite(s)&&n>s?0:n}function q(e,t,n){var r=(n=Object.assign({},P,n)).curve,i=e.zoom,a=[e.longitude,e.latitude],o=m(i),s=t.zoom,u=[t.longitude,t.latitude],A=m(s-i),c=b(a),l=b(u),h=f.f([],l,c),g=Math.max(e.width,e.height),d=g/A,p=f.b(h)*o,v=Math.max(p,.01),y=r*r,I=(d*d-g*g+y*y*v*v)/(2*g*y*v),E=(d*d-g*g-y*y*v*v)/(2*d*y*v),C=Math.log(Math.sqrt(I*I+1)-I),B=Math.log(Math.sqrt(E*E+1)-E);return{startZoom:i,startCenterXY:c,uDelta:h,w0:g,u1:p,S:(B-C)/r,rho:r,rho2:y,r0:C,r1:B}}n.d(t,"default",(function(){return M})),n.d(t,"WebMercatorViewport",(function(){return M})),n.d(t,"getBounds",(function(){return R})),n.d(t,"fitBounds",(function(){return O})),n.d(t,"normalizeViewportProps",(function(){return N})),n.d(t,"flyToViewport",(function(){return U})),n.d(t,"getFlyToDuration",(function(){return G})),n.d(t,"lngLatToWorld",(function(){return b})),n.d(t,"worldToLngLat",(function(){return E})),n.d(t,"worldToPixels",(function(){return x})),n.d(t,"pixelsToWorld",(function(){return S})),n.d(t,"zoomToScale",(function(){return m})),n.d(t,"scaleToZoom",(function(){return I})),n.d(t,"getMeterZoom",(function(){return C})),n.d(t,"getDistanceScales",(function(){return B})),n.d(t,"addMetersToLngLat",(function(){return w})),n.d(t,"getViewMatrix",(function(){return Q})),n.d(t,"getProjectionMatrix",(function(){return _})),n.d(t,"getProjectionParameters",(function(){return k}))},function(e,t,n){"use strict";n.r(t);function r(e,t,n){if(!o(n=n||{}))throw new Error("options is invalid");var r=n.bbox,i=n.id;if(void 0===e)throw new Error("geometry is required");if(t&&t.constructor!==Object)throw new Error("properties must be an Object");r&&s(r),i&&u(i);var a={type:"Feature"};return i&&(a.id=i),r&&(a.bbox=r),a.properties=t||{},a.geometry=e,a}function i(e,t,n){if(!e)throw new Error("coordinates is required");for(var i=0;i<e.length;i++){var o=e[i];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++){if(0===i&&0===s&&!a(o[0][0])||!a(o[0][1]))throw new Error("coordinates must contain numbers");if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}}return r({type:"Polygon",coordinates:e},t,n)}function a(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function o(e){return!!e&&e.constructor===Object}function s(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!a(e))throw new Error("bbox must only contain numbers")}))}function u(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}var A=n(331),c=n(764);function l(e){if(!e)throw new Error("coord is required");if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates;if(Array.isArray(e)&&e.length>=2&&void 0===e[0].length&&void 0===e[1].length)return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function f(e){var t=e*Math.PI/180;return Math.tan(t)}t.default=function(e,t,n,r){var s=(r=r||{}).steps||64,u=r.units||"kilometers",h=r.angle||0,g=r.pivot||e,d=r.properties||e.properties||{};if(!e)throw new Error("center is required");if(!t)throw new Error("xSemiAxis is required");if(!n)throw new Error("ySemiAxis is required");if(!o(r))throw new Error("options must be an object");if(!a(s))throw new Error("steps must be a number");if(!a(h))throw new Error("angle must be a number");var p=l(e);if("degrees"===u)var v=function(e){if(null===e||void 0===e)throw new Error("degrees is required");return e%360*Math.PI/180}(h);else t=Object(A.a)(e,t,90,{units:u}),n=Object(A.a)(e,n,0,{units:u}),t=l(t)[0]-p[0],n=l(n)[1]-p[1];for(var y=[],m=0;m<s;m+=1){var I=-360*m/s,b=t*n/Math.sqrt(Math.pow(n,2)+Math.pow(t,2)*Math.pow(f(I),2)),E=t*n/Math.sqrt(Math.pow(t,2)+Math.pow(n,2)/Math.pow(f(I),2));if(I<-90&&I>=-270&&(b=-b),I<-180&&I>=-360&&(E=-E),"degrees"===u){var C=b*Math.cos(v)+E*Math.sin(v),B=E*Math.cos(v)-b*Math.sin(v);b=C,E=B}y.push([b+p[0],E+p[1]])}return y.push(y[0]),"degrees"===u?i([y],d):Object(c.default)(i([y],d),h,{pivot:g})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(376),i=n(748),a=n(510),o=n(114);function s(e,t){return!(e[0]>t[0])&&(!(e[2]<t[2])&&(!(e[1]>t[1])&&!(e[3]<t[3])))}function u(e,t){return e[0]===t[0]&&e[1]===t[1]}t.default=function(e,t){var n=o.getType(e),A=o.getType(t),c=o.getGeom(e),l=o.getGeom(t);switch(n){case"Point":switch(A){case"MultiPoint":return function(e,t){var n,r=!1;for(n=0;n<t.coordinates.length;n++)if(u(t.coordinates[n],e.coordinates)){r=!0;break}return r}(c,l);case"LineString":return i.default(c,l,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return a.default(c,l,{ignoreBoundary:!0});default:throw new Error("feature2 "+A+" geometry not supported")}case"MultiPoint":switch(A){case"MultiPoint":return function(e,t){for(var n=0;n<e.coordinates.length;n++){for(var r=!1,i=0;i<t.coordinates.length;i++)u(e.coordinates[n],t.coordinates[i])&&(r=!0);if(!r)return!1}return!0}(c,l);case"LineString":return function(e,t){for(var n=!1,r=0;r<e.coordinates.length;r++){if(!i.default(e.coordinates[r],t))return!1;n||(n=i.default(e.coordinates[r],t,{ignoreEndVertices:!0}))}return n}(c,l);case"Polygon":case"MultiPolygon":return function(e,t){for(var n=!0,r=0;r<e.coordinates.length;r++){var i=a.default(e.coordinates[1],t);if(!i){n=!1;break}i=a.default(e.coordinates[1],t,{ignoreBoundary:!0})}return n&&i}(c,l);default:throw new Error("feature2 "+A+" geometry not supported")}case"LineString":switch(A){case"LineString":return function(e,t){for(var n=0;n<e.coordinates.length;n++)if(!i.default(e.coordinates[n],t))return!1;return!0}(c,l);case"Polygon":case"MultiPolygon":return function(e,t){var n=r.default(t),i=r.default(e);if(!s(n,i))return!1;for(var o=!1,u=0;u<e.coordinates.length-1;u++){if(!a.default(e.coordinates[u],t))return!1;if(o||(o=a.default(e.coordinates[u],t,{ignoreBoundary:!0})),!o){var A=(c=e.coordinates[u],l=e.coordinates[u+1],[(c[0]+l[0])/2,(c[1]+l[1])/2]);o=a.default(A,t,{ignoreBoundary:!0})}}var c,l;return o}(c,l);default:throw new Error("feature2 "+A+" geometry not supported")}case"Polygon":switch(A){case"Polygon":case"MultiPolygon":return function(e,t){var n=r.default(e);if(!s(r.default(t),n))return!1;for(var i=0;i<e.coordinates[0].length;i++)if(!a.default(e.coordinates[0][i],t))return!1;return!0}(c,l);default:throw new Error("feature2 "+A+" geometry not supported")}default:throw new Error("feature1 "+n+" geometry not supported")}}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(376)),a=r(n(510)),o=r(n(748)),s=n(114);function u(e,t){var n,r=!1;for(n=0;n<e.coordinates.length;n++)if(p(e.coordinates[n],t.coordinates)){r=!0;break}return r}function A(e,t){for(var n=0,r=t.coordinates;n<r.length;n++){for(var i=r[n],a=!1,o=0,s=e.coordinates;o<s.length;o++){if(p(i,s[o])){a=!0;break}}if(!a)return!1}return!0}function c(e,t){for(var n=!1,r=0,i=t.coordinates;r<i.length;r++){var a=i[r];if(o.default(a,e,{ignoreEndVertices:!0})&&(n=!0),!o.default(a,e))return!1}return!!n}function l(e,t){for(var n=0,r=t.coordinates;n<r.length;n++){var i=r[n];if(!a.default(i,e,{ignoreBoundary:!0}))return!1}return!0}function f(e,t){for(var n=!1,r=0,i=t.coordinates;r<i.length;r++){var a=i[r];if(o.default({type:"Point",coordinates:a},e,{ignoreEndVertices:!0})&&(n=!0),!o.default({type:"Point",coordinates:a},e,{ignoreEndVertices:!1}))return!1}return n}function h(e,t){var n=!1,r=0;if(!d(i.default(e),i.default(t)))return!1;for(;r<t.coordinates.length-1;r++){var o=v(t.coordinates[r],t.coordinates[r+1]);if(a.default({type:"Point",coordinates:o},e,{ignoreBoundary:!0})){n=!0;break}}return n}function g(e,t){if("Feature"===e.type&&null===e.geometry)return!1;if("Feature"===t.type&&null===t.geometry)return!1;if(!d(i.default(e),i.default(t)))return!1;for(var n=0,r=s.getGeom(t).coordinates;n<r.length;n++)for(var o=0,u=r[n];o<u.length;o++){var A=u[o];if(!a.default(A,e))return!1}return!0}function d(e,t){return!(e[0]>t[0])&&(!(e[2]<t[2])&&(!(e[1]>t[1])&&!(e[3]<t[3])))}function p(e,t){return e[0]===t[0]&&e[1]===t[1]}function v(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}t.default=function(e,t){var n=s.getGeom(e),r=s.getGeom(t),i=s.getType(e),d=s.getType(t),v=s.getCoords(e),y=s.getCoords(t);switch(i){case"Point":switch(d){case"Point":return p(v,y);default:throw new Error("feature2 "+d+" geometry not supported")}case"MultiPoint":switch(d){case"Point":return u(n,r);case"MultiPoint":return A(n,r);default:throw new Error("feature2 "+d+" geometry not supported")}case"LineString":switch(d){case"Point":return o.default(r,n,{ignoreEndVertices:!0});case"LineString":return f(n,r);case"MultiPoint":return c(n,r);default:throw new Error("feature2 "+d+" geometry not supported")}case"Polygon":switch(d){case"Point":return a.default(r,n,{ignoreBoundary:!0});case"LineString":return h(n,r);case"Polygon":return g(n,r);case"MultiPoint":return l(n,r);default:throw new Error("feature2 "+d+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}},t.isPointInMultiPoint=u,t.isMultiPointInMultiPoint=A,t.isMultiPointOnLine=c,t.isMultiPointInPoly=l,t.isLineOnLine=f,t.isLineInPoly=h,t.isPolyInPoly=g,t.doBBoxOverlap=d,t.compareCoords=p,t.getMidpoint=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(145),i=n(114),a=n(938),o=n(534),s=n(954);t.default=function(e,t){if(!e)throw new Error("feature1 is required");if(!t)throw new Error("feature2 is required");var n=i.getType(e);if(n!==i.getType(t))throw new Error("features must be of the same type");if("Point"===n)throw new Error("Point geometry not supported");if(new s({precision:6}).compare(e,t))return!1;var u=0;switch(n){case"MultiPoint":var A=r.coordAll(e),c=r.coordAll(t);A.forEach((function(e){c.forEach((function(t){e[0]===t[0]&&e[1]===t[1]&&u++}))}));break;case"LineString":case"MultiLineString":r.segmentEach(e,(function(e){r.segmentEach(t,(function(t){a.default(e,t).features.length&&u++}))}));break;case"Polygon":case"MultiPolygon":r.segmentEach(e,(function(e){r.segmentEach(t,(function(t){o.default(e,t).features.length&&u++}))}))}return u>0}},function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return p}));var r,i,a=0,o=0,s=0,u=0,A=0,c=0,l="object"===typeof performance&&performance.now?performance:Date,f="object"===typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function h(){return A||(f(g),A=l.now()+c)}function g(){A=0}function d(){this._call=this._time=this._next=null}function p(e,t,n){var r=new d;return r.restart(e,t,n),r}function v(){A=(u=l.now())+c,a=o=0;try{!function(){h(),++a;for(var e,t=r;t;)(e=A-t._time)>=0&&t._call.call(null,e),t=t._next;--a}()}finally{a=0,function(){var e,t,n=r,a=1/0;for(;n;)n._call?(a>n._time&&(a=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:r=t);i=e,m(a)}(),A=0}}function y(){var e=l.now(),t=e-u;t>1e3&&(c-=t,u=e)}function m(e){a||(o&&(o=clearTimeout(o)),e-A>24?(e<1/0&&(o=setTimeout(v,e-l.now()-c)),s&&(s=clearInterval(s))):(s||(u=l.now(),s=setInterval(y,1e3)),a=1,f(v)))}d.prototype=p.prototype={constructor:d,restart:function(e,t,n){if("function"!==typeof e)throw new TypeError("callback is not a function");n=(null==n?h():+n)+(null==t?0:+t),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=e,this._time=n,m()},stop:function(){this._call&&(this._call=null,this._time=1/0,m())}}},function(e,t,n){"use strict";var r={value:function(){}};function i(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new a(r)}function a(e){this._=e}function o(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}function s(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function u(e,t,n){for(var i=0,a=e.length;i<a;++i)if(e[i].name===t){e[i]=r,e=e.slice(0,i).concat(e.slice(i+1));break}return null!=n&&e.push({name:t,value:n}),e}a.prototype=i.prototype={constructor:a,on:function(e,t){var n,r=this._,i=o(e+"",r),a=-1,A=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!==typeof t)throw new Error("invalid callback: "+t);for(;++a<A;)if(n=(e=i[a]).type)r[n]=u(r[n],e.name,t);else if(null==t)for(n in r)r[n]=u(r[n],e.name,null);return this}for(;++a<A;)if((n=(e=i[a]).type)&&(n=s(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new a(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,n=(r=this._[e]).length;a<n;++a)r[a].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};var A=i,c=n(838),l=4294967296;function f(e){return e.x}function h(e){return e.y}n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return h}));var g=Math.PI*(3-Math.sqrt(5));t.a=function(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=new Map,u=Object(c.c)(d),f=A("tick","end"),h=function(){var e=1;return function(){return(e=(1664525*e+1013904223)%l)/l}}();function d(){p(),f.call("tick",t),n<r&&(u.stop(),f.call("end",t))}function p(r){var u,A,c=e.length;void 0===r&&(r=1);for(var l=0;l<r;++l)for(n+=(a-n)*i,s.forEach((function(e){e(n)})),u=0;u<c;++u)null==(A=e[u]).fx?A.x+=A.vx*=o:(A.x=A.fx,A.vx=0),null==A.fy?A.y+=A.vy*=o:(A.y=A.fy,A.vy=0);return t}function v(){for(var t,n=0,r=e.length;n<r;++n){if((t=e[n]).index=n,null!=t.fx&&(t.x=t.fx),null!=t.fy&&(t.y=t.fy),isNaN(t.x)||isNaN(t.y)){var i=10*Math.sqrt(.5+n),a=n*g;t.x=i*Math.cos(a),t.y=i*Math.sin(a)}(isNaN(t.vx)||isNaN(t.vy))&&(t.vx=t.vy=0)}}function y(t){return t.initialize&&t.initialize(e,h),t}return null==e&&(e=[]),v(),t={tick:p,restart:function(){return u.restart(d),t},stop:function(){return u.stop(),t},nodes:function(n){return arguments.length?(e=n,v(),s.forEach(y),t):e},alpha:function(e){return arguments.length?(n=+e,t):n},alphaMin:function(e){return arguments.length?(r=+e,t):r},alphaDecay:function(e){return arguments.length?(i=+e,t):+i},alphaTarget:function(e){return arguments.length?(a=+e,t):a},velocityDecay:function(e){return arguments.length?(o=1-e,t):1-o},randomSource:function(e){return arguments.length?(h=e,s.forEach(y),t):h},force:function(e,n){return arguments.length>1?(null==n?s.delete(e):s.set(e,y(n)),t):s.get(e)},find:function(t,n,r){var i,a,o,s,u,A=0,c=e.length;for(null==r?r=1/0:r*=r,A=0;A<c;++A)(o=(i=t-(s=e[A]).x)*i+(a=n-s.y)*a)<r&&(u=s,r=o);return u},on:function(e,n){return arguments.length>1?(f.on(e,n),t):f.on(e)}}}},,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(18);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;e.Component;if(!n)return t;var i=Object(r.a)({},t);return Object.keys(n).forEach((function(e){n[e]&&(i[e]="".concat(t[e]," ").concat(n[e]))})),i}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(369),i=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,a=e.productionPrefix,o=void 0===a?"jss":a,s=e.seed,u=void 0===s?"":s,A=""===u?"":"".concat(u,"-"),c=0;return function(e,t){c+=1;var a=t.options.name;if(a&&0===a.indexOf("Mui")&&!t.options.link&&!n){if(-1!==i.indexOf(e.key))return"Mui-".concat(e.key);var s="".concat(A).concat(a,"-").concat(e.key);return t.options.theme[r.a]&&""===u?"".concat(s,"-").concat(c):s}return"".concat(A).concat(o).concat(c)}}},function(e,t,n){"use strict";function r(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i,a=t.props[n];for(i in a)void 0===r[i]&&(r[i]=a[i]);return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),i=n(75),a=(n(28),n(115)),o=n(68);var s="undefined"!==typeof window?r.useLayoutEffect:r.useEffect,u=r.forwardRef((function(e,t){var n=e.children,u=e.container,A=e.disablePortal,c=void 0!==A&&A,l=e.onRendered,f=r.useState(null),h=f[0],g=f[1],d=Object(o.a)(r.isValidElement(n)?n.ref:null,t);return s((function(){c||g(function(e){return e="function"===typeof e?e():e,i.findDOMNode(e)}(u)||document.body)}),[u,c]),s((function(){if(h&&!c)return Object(a.a)(t,h),function(){Object(a.a)(t,null)}}),[t,h,c]),s((function(){l&&(h||c)&&l()}),[l,h,c]),c?r.isValidElement(n)?r.cloneElement(n,{ref:d}):n:h?i.createPortal(n,h):h}));t.a=u},function(e,t,n){"use strict";var r=n(18),i=n(33),a=n(0),o=(n(28),n(37)),s=n(48),u=n(87),A=n(530),c=n(73),l=a.forwardRef((function(e,t){var n=e.edge,s=void 0!==n&&n,u=e.children,l=e.classes,f=e.className,h=e.color,g=void 0===h?"default":h,d=e.disabled,p=void 0!==d&&d,v=e.disableFocusRipple,y=void 0!==v&&v,m=e.size,I=void 0===m?"medium":m,b=Object(i.a)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return a.createElement(A.a,Object(r.a)({className:Object(o.a)(l.root,f,"default"!==g&&l["color".concat(Object(c.a)(g))],p&&l.disabled,"small"===I&&l["size".concat(Object(c.a)(I))],{start:l.edgeStart,end:l.edgeEnd}[s]),centerRipple:!0,focusRipple:!y,disabled:p,ref:t},b),a.createElement("span",{className:l.label},u))}));t.a=Object(s.a)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:Object(u.b)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(u.b)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(u.b)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(l)},function(e,t){e.exports=function(e,t,n){return e===e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}},function(e,t,n){"use strict";var r=n(1097),i=n(527),a=n(716),o=n(1001),s=n(1099);function u(e,t,n){var r=this._refs[n];if("string"==typeof r){if(!this._refs[r])return u.call(this,e,t,r);r=this._refs[r]}if((r=r||this._schemas[n])instanceof o)return g(r.schema,this._opts.inlineRefs)?r.schema:r.validate||this._compile(r);var i,a,s,c=A.call(this,t,n);return c&&(i=c.schema,t=c.root,s=c.baseId),i instanceof o?a=i.validate||e.call(this,i.schema,t,void 0,s):void 0!==i&&(a=g(i,this._opts.inlineRefs)?i:e.call(this,i,t,void 0,s)),a}function A(e,t){var n=r.parse(t),i=p(n),a=d(this._getId(e.schema));if(0===Object.keys(e.schema).length||i!==a){var s=y(i),u=this._refs[s];if("string"==typeof u)return c.call(this,e,u,n);if(u instanceof o)u.validate||this._compile(u),e=u;else{if(!((u=this._schemas[s])instanceof o))return;if(u.validate||this._compile(u),s==y(t))return{schema:u,root:e,baseId:a};e=u}if(!e.schema)return;a=d(this._getId(e.schema))}return f.call(this,n,a,e.schema,e)}function c(e,t,n){var r=A.call(this,e,t);if(r){var i=r.schema,a=r.baseId;e=r.root;var o=this._getId(i);return o&&(a=m(a,o)),f.call(this,n,a,i,e)}}e.exports=u,u.normalizeId=y,u.fullPath=d,u.url=m,u.ids=function(e){var t=y(this._getId(e)),n={"":t},o={"":d(t,!1)},u={},A=this;return s(e,{allKeys:!0},(function(e,t,s,c,l,f,h){if(""!==t){var g=A._getId(e),d=n[c],p=o[c]+"/"+l;if(void 0!==h&&(p+="/"+("number"==typeof h?h:a.escapeFragment(h))),"string"==typeof g){g=d=y(d?r.resolve(d,g):g);var v=A._refs[g];if("string"==typeof v&&(v=A._refs[v]),v&&v.schema){if(!i(e,v.schema))throw new Error('id "'+g+'" resolves to more than one schema')}else if(g!=y(p))if("#"==g[0]){if(u[g]&&!i(e,u[g]))throw new Error('id "'+g+'" resolves to more than one schema');u[g]=e}else A._refs[g]=p}n[t]=d,o[t]=p}})),u},u.inlineRef=g,u.schema=A;var l=a.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function f(e,t,n,r){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var i=e.fragment.split("/"),o=1;o<i.length;o++){var s=i[o];if(s){if(void 0===(n=n[s=a.unescapeFragment(s)]))break;var u;if(!l[s]&&((u=this._getId(n))&&(t=m(t,u)),n.$ref)){var c=m(t,n.$ref),f=A.call(this,r,c);f&&(n=f.schema,r=f.root,t=f.baseId)}}}return void 0!==n&&n!==r.schema?{schema:n,root:r,baseId:t}:void 0}}var h=a.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function g(e,t){return!1!==t&&(void 0===t||!0===t?function e(t){var n;if(Array.isArray(t)){for(var r=0;r<t.length;r++)if("object"==typeof(n=t[r])&&!e(n))return!1}else for(var i in t){if("$ref"==i)return!1;if("object"==typeof(n=t[i])&&!e(n))return!1}return!0}(e):t?function e(t){var n,r=0;if(Array.isArray(t)){for(var i=0;i<t.length;i++)if("object"==typeof(n=t[i])&&(r+=e(n)),r==1/0)return 1/0}else for(var a in t){if("$ref"==a)return 1/0;if(h[a])r++;else if("object"==typeof(n=t[a])&&(r+=e(n)+1),r==1/0)return 1/0}return r}(e)<=t:void 0)}function d(e,t){return!1!==t&&(e=y(e)),p(r.parse(e))}function p(e){return r.serialize(e).split("#")[0]+"#"}var v=/#\/?$/;function y(e){return e?e.replace(v,""):""}function m(e,t){return t=y(t),r.resolve(e,t)}},function(e,t,n){"use strict";var r=n(864);function i(e,t,n){this.message=n||i.message(e,t),this.missingRef=r.url(e,t),this.missingSchema=r.normalizeId(r.fullPath(this.missingRef))}function a(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}e.exports={Validation:a((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:a(i)},i.message=function(e,t){return"can't resolve reference "+t+" from id "+e}},function(e,t,n){var r=n(199),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=i},function(e,t,n){var r=n(719);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(871)("keys"),i=n(788);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(505),i=n(504),a=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(787)?"pure":"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(868);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports={}},function(e,t,n){var r=n(760),i=n(1154),a=n(872),o=n(870)("IE_PROTO"),s=function(){},u=function(){var e,t=n(1019)("iframe"),r=a.length;for(t.style.display="none",n(1155).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[a[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[o]=e):n=u(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(525).f,i=n(526),a=n(721)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){t.f=n(721)},function(e,t,n){var r=n(504),i=n(505),a=n(787),o=n(878),s=n(525).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=a?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:o.f(e)})}},function(e,t,n){var r=n(1029),i=n(1031);e.exports=function(e,t){return e&&r(e,i(t))}},function(e,t,n){var r=n(523)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(203),i=n(478),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(o.test(e)||!a.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(866);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(518);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Checkboard=void 0;var r=o(n(0)),i=o(n(124)),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1228));function o(e){return e&&e.__esModule?e:{default:e}}var s=t.Checkboard=function(e){var t=e.white,n=e.grey,o=e.size,s=e.renderers,u=e.borderRadius,A=e.boxShadow,c=(0,i.default)({default:{grid:{borderRadius:u,boxShadow:A,absolute:"0px 0px 0px 0px",background:"url("+a.get(t,n,o,s.canvas)+") center left"}}});return r.default.createElement("div",{style:c.grid})};s.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}},t.default=s},function(e,t){var n=/^[0-9]+$/,r=function(e,t){var r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:function(e,t){return r(t,e)}}},function(e,t,n){var r=n(378);e.exports=function(e,t,n){return 0===r(e,t,n)}},function(e,t,n){var r=n(321);e.exports=function(e,t,n){var i=new r(e,n),a=new r(t,n);return i.compare(a)||i.compareBuild(a)}},function(e,t,n){var r=n(378);e.exports=function(e,t,n){return r(e,t,n)<0}},function(e,t,n){var r=n(378);e.exports=function(e,t,n){return r(e,t,n)>=0}},function(e,t,n){var r=n(378);e.exports=function(e,t,n){return r(e,t,n)<=0}},function(e,t,n){var r=n(321),i=n(795),a=i.ANY,o=n(379),s=n(796),u=n(794),A=n(889),c=n(891),l=n(890);e.exports=function(e,t,n,f){var h,g,d,p,v;switch(e=new r(e,f),t=new o(t,f),n){case">":h=u,g=c,d=A,p=">",v=">=";break;case"<":h=A,g=l,d=u,p="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,f))return!1;for(var y=function(n){var r=t.set[n],o=null,s=null;return r.forEach((function(e){e.semver===a&&(e=new i(">=0.0.0")),o=o||e,s=s||e,h(e.semver,o.semver,f)?o=e:d(e.semver,s.semver,f)&&(s=e)})),o.operator===p||o.operator===v?{v:!1}:s.operator&&s.operator!==p||!g(e,s.semver)?s.operator===v&&d(e,s.semver)?{v:!1}:void 0:{v:!1}},m=0;m<t.set.length;++m){var I=y(m);if("object"===typeof I)return I.v}return!0}},function(e,t,n){"use strict";var r=n(18),i=n(33),a=n(0),o=n.n(a),s=(n(28),n(859)),u=n(88),A=Date.now(),c="fnValues"+A,l="fnStyle"+ ++A;var f=function(){return{onCreateRule:function(e,t,n){if("function"!==typeof t)return null;var r=Object(u.c)(e,{},n);return r[l]=t,r},onProcessStyle:function(e,t){if(c in t||l in t)return e;var n={};for(var r in e){var i=e[r];"function"===typeof i&&(delete e[r],n[r]=i)}return t[c]=n,e},onUpdate:function(e,t,n,r){var i=t,a=i[l];a&&(i.style=a(e)||{});var o=i[c];if(o)for(var s in o)i.prop(s,o[s](e),r)}}},h="@global",g=function(){function e(e,t,n){for(var i in this.type="global",this.at=h,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new u.a(Object(r.a)({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),d=function(){function e(e,t,n){this.type="global",this.at=h,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=n;var i=e.substr("@global ".length);this.rule=n.jss.createRule(i,t,Object(r.a)({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),p=/\s*,\s*/g;function v(e,t){for(var n=e.split(p),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}var y=function(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===h)return new g(e,t,n);if("@"===e[0]&&"@global "===e.substr(0,"@global ".length))return new d(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),!1===n.scoped&&(n.selector=e),null},onProcessRule:function(e){"style"===e.type&&(function(e){var t=e.options,n=e.style,i=n?n[h]:null;if(i){for(var a in i)t.sheet.addRule(a,i[a],Object(r.a)({},t,{selector:v(a,e.selector)}));delete n[h]}}(e),function(e){var t=e.options,n=e.style;for(var i in n)if("@"===i[0]&&i.substr(0,h.length)===h){var a=v(i.substr(h.length),e.selector);t.sheet.addRule(a,n[i],Object(r.a)({},t,{selector:a})),delete n[i]}}(e))}}},m=/\s*,\s*/g,I=/&/g,b=/\$([\w-]+)/g;var E=function(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?(i=i).selector:r}}function t(e,t){for(var n=t.split(m),r=e.split(m),i="",a=0;a<n.length;a++)for(var o=n[a],s=0;s<r.length;s++){var u=r[s];i&&(i+=", "),i+=-1!==u.indexOf("&")?u.replace(I,o):o+" "+u}return i}function n(e,t,n){if(n)return Object(r.a)({},n,{index:n.index+1});var i=e.options.nestingLevel;i=void 0===i?1:i+1;var a=Object(r.a)({},e.options,{nestingLevel:i,index:t.indexOf(e)+1});return delete a.name,a}return{onProcessStyle:function(i,a,o){if("style"!==a.type)return i;var s,u,A=a,c=A.options.parent;for(var l in i){var f=-1!==l.indexOf("&"),h="@"===l[0];if(f||h){if(s=n(A,c,s),f){var g=t(l,A.selector);u||(u=e(c,o)),g=g.replace(b,u),c.addRule(g,i[l],Object(r.a)({},s,{selector:g}))}else h&&c.addRule(l,{},s).addRule(A.key,i[l],{selector:A.selector});delete i[l]}}return i}}},C=/[A-Z]/g,B=/^ms-/,w={};function Q(e){return"-"+e.toLowerCase()}var k=function(e){if(w.hasOwnProperty(e))return w[e];var t=e.replace(C,Q);return w[e]=B.test(t)?"-"+t:t};function _(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:k(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(_):t.fallbacks=_(e.fallbacks)),t}var x=function(){return{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=_(e[t]);return e}return _(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=k(t);return t===r?e:(n.prop(r,e),null)}}},S=u.e&&CSS?CSS.px:"px",O=u.e&&CSS?CSS.ms:"ms",D=u.e&&CSS?CSS.percent:"%";function R(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var j=R({"animation-delay":O,"animation-duration":O,"background-position":S,"background-position-x":S,"background-position-y":S,"background-size":S,border:S,"border-bottom":S,"border-bottom-left-radius":S,"border-bottom-right-radius":S,"border-bottom-width":S,"border-left":S,"border-left-width":S,"border-radius":S,"border-right":S,"border-right-width":S,"border-top":S,"border-top-left-radius":S,"border-top-right-radius":S,"border-top-width":S,"border-width":S,margin:S,"margin-bottom":S,"margin-left":S,"margin-right":S,"margin-top":S,padding:S,"padding-bottom":S,"padding-left":S,"padding-right":S,"padding-top":S,"mask-position-x":S,"mask-position-y":S,"mask-size":S,height:S,width:S,"min-height":S,"max-height":S,"min-width":S,"max-width":S,bottom:S,left:S,top:S,right:S,"box-shadow":S,"text-shadow":S,"column-gap":S,"column-rule":S,"column-rule-width":S,"column-width":S,"font-size":S,"font-size-delta":S,"letter-spacing":S,"text-indent":S,"text-stroke":S,"text-stroke-width":S,"word-spacing":S,motion:S,"motion-offset":S,outline:S,"outline-offset":S,"outline-width":S,perspective:S,"perspective-origin-x":D,"perspective-origin-y":D,"transform-origin":D,"transform-origin-x":D,"transform-origin-y":D,"transform-origin-z":D,"transition-delay":O,"transition-duration":O,"vertical-align":S,"flex-basis":S,"shape-margin":S,size:S,grid:S,"grid-gap":S,"grid-row-gap":S,"grid-column-gap":S,"grid-template-rows":S,"grid-template-columns":S,"grid-auto-rows":S,"grid-auto-columns":S,"box-shadow-x":S,"box-shadow-y":S,"box-shadow-blur":S,"box-shadow-spread":S,"font-line-height":S,"text-shadow-x":S,"text-shadow-y":S,"text-shadow-blur":S});function M(e,t,n){if(!t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=M(e,t[r],n);else if("object"===typeof t)if("fallbacks"===e)for(var i in t)t[i]=M(i,t[i],n);else for(var a in t)t[a]=M(e+"-"+a,t[a],n);else if("number"===typeof t){var o=n[e]||j[e];return o?"function"===typeof o?o(t).toString():""+t+o:t.toString()}return t}var N=function(e){void 0===e&&(e={});var t=R(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=M(r,e[r],t);return e},onChangeValue:function(e,n){return M(n,e,t)}}},F=n(163),T=n(23),L="",P="",U="",G=F.a&&"ontouchstart"in document.documentElement;if(F.a){var q={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},H=document.createElement("p").style;for(var Y in q)if(Y+"Transform"in H){L=Y,P=q[Y];break}"Webkit"===L&&"msHyphens"in H&&(L="ms",P=q.ms,"edge"),"Webkit"===L&&"-apple-trailing-word"in H&&(U="apple")}var J=L,z=P,K=U,W=G;var V={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===J?"-webkit-"+e:z+e)}},X={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===J?z+"print-"+e:e)}},Z=/[-\s]+(.)?/g;function $(e,t){return t?t.toUpperCase():""}function ee(e){return e.replace(Z,$)}function te(e){return ee("-"+e)}var ne,re={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===J){if(ee("mask-image")in t)return e;if(J+te("mask-image")in t)return z+e}return e}},ie={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==K||W?e:z+e)}},ae={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:z+e)}},oe={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:z+e)}},se={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===J||"ms"===J?z+e:e)}},ue={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===J||"ms"===J||"apple"===K?z+e:e)}},Ae={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===J?"WebkitColumn"+te(e)in t&&z+"column-"+e:"Moz"===J&&("page"+te(e)in t&&"page-"+e))}},ce={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===J)return e;var n=e.replace("-inline","");return J+te(n)in t&&z+n}},le={supportedProperty:function(e,t){return ee(e)in t&&e}},fe={supportedProperty:function(e,t){var n=te(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:J+n in t?z+e:"Webkit"!==J&&"Webkit"+n in t&&"-webkit-"+e}},he={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===J?""+z+e:e)}},ge={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===J?z+"scroll-chaining":e)}},de={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},pe={supportedProperty:function(e,t){var n=de[e];return!!n&&(J+te(n)in t&&z+n)}},ve={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},ye=Object.keys(ve),me=function(e){return z+e},Ie=[V,X,re,ie,ae,oe,se,ue,Ae,ce,le,fe,he,ge,pe,{supportedProperty:function(e,t,n){var r=n.multiple;if(ye.indexOf(e)>-1){var i=ve[e];if(!Array.isArray(i))return J+te(i)in t&&z+i;if(!r)return!1;for(var a=0;a<i.length;a++)if(!(J+te(i[0])in t))return!1;return i.map(me)}return!1}}],be=Ie.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),Ee=Ie.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Object(T.a)(t.noPrefill)),e}),[]),Ce={};if(F.a){ne=document.createElement("p");var Be=window.getComputedStyle(document.documentElement,"");for(var we in Be)isNaN(we)||(Ce[Be[we]]=Be[we]);Ee.forEach((function(e){return delete Ce[e]}))}function Qe(e,t){if(void 0===t&&(t={}),!ne)return e;if(null!=Ce[e])return Ce[e];"transition"!==e&&"transform"!==e||(t[e]=e in ne.style);for(var n=0;n<be.length&&(Ce[e]=be[n](e,ne.style,t),!Ce[e]);n++);try{ne.style[e]=""}catch(r){return!1}return Ce[e]}var ke,_e={},xe={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Se=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Oe(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?Qe(t):", "+Qe(n);return r||(t||n)}function De(e,t){var n=t;if(!ke||"content"===e)return t;if("string"!==typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=_e[r])return _e[r];try{ke.style[e]=n}catch(i){return _e[r]=!1,!1}if(xe[e])n=n.replace(Se,Oe);else if(""===ke.style[e]&&("-ms-flex"===(n=z+n)&&(ke.style[e]="-ms-flexbox"),ke.style[e]=n,""===ke.style[e]))return _e[r]=!1,!1;return ke.style[e]="",_e[r]=n,_e[r]}F.a&&(ke=document.createElement("p"));var Re=function(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var i=!1,a=Qe(n);a&&a!==n&&(i=!0);var o=!1,s=De(a,Object(u.f)(r));s&&s!==r&&(o=!0),(i||o)&&(i&&delete t[n],t[a||n]=s||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at="-"===(n=t.at)[1]||"ms"===J?n:"@"+z+"keyframes"+n.substr(10)}var n},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return De(t,Object(u.f)(e))||e}}};var je=function(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),a=0;a<i.length;a++)r[i[a]]=t[i[a]];return r}}};function Me(){return{plugins:[f(),y(),E(),x(),N(),"undefined"===typeof window?null:Re(),je()]}}n.d(t,"a",(function(){return Le})),n.d(t,"b",(function(){return Pe}));var Ne,Fe=Object(u.b)(Me()),Te={disableGeneration:!1,generateClassName:Object(s.a)(),jss:Fe,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Le=o.a.createContext(Te);function Pe(e){var t=e.children,n=e.injectFirst,a=void 0!==n&&n,s=e.disableGeneration,A=void 0!==s&&s,c=Object(i.a)(e,["children","injectFirst","disableGeneration"]),l=o.a.useContext(Le),f=Object(r.a)({},l,{disableGeneration:A},c);if(!f.jss.options.insertionPoint&&a&&"undefined"!==typeof window){if(!Ne){var h=document.head;Ne=document.createComment("mui-inject-first"),h.insertBefore(Ne,h.firstChild)}f.jss=Object(u.b)({plugins:Me().plugins,insertionPoint:Ne})}return o.a.createElement(Le.Provider,{value:f},t)}},function(e,t,n){"use strict";var r=n(33),i=n(1),a=n(18),o=n(0),s=(n(28),n(37)),u=n(48),A=n(530);var c=n(68),l=n(188),f=n(75),h="undefined"===typeof window?o.useEffect:o.useLayoutEffect,g=o.forwardRef((function(e,t){var n=e.alignItems,i=void 0===n?"center":n,u=e.autoFocus,g=void 0!==u&&u,d=e.button,p=void 0!==d&&d,v=e.children,y=e.classes,m=e.className,I=e.component,b=e.ContainerComponent,E=void 0===b?"li":b,C=e.ContainerProps,B=(C=void 0===C?{}:C).className,w=Object(r.a)(C,["className"]),Q=e.dense,k=void 0!==Q&&Q,_=e.disabled,x=void 0!==_&&_,S=e.disableGutters,O=void 0!==S&&S,D=e.divider,R=void 0!==D&&D,j=e.focusVisibleClassName,M=e.selected,N=void 0!==M&&M,F=Object(r.a)(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),T=o.useContext(l.a),L={dense:k||T.dense||!1,alignItems:i},P=o.useRef(null);h((function(){g&&P.current&&P.current.focus()}),[g]);var U,G,q=o.Children.toArray(v),H=q.length&&(U=q[q.length-1],G=["ListItemSecondaryAction"],o.isValidElement(U)&&-1!==G.indexOf(U.type.muiName)),Y=o.useCallback((function(e){P.current=f.findDOMNode(e)}),[]),J=Object(c.a)(Y,t),z=Object(a.a)({className:Object(s.a)(y.root,m,L.dense&&y.dense,!O&&y.gutters,R&&y.divider,x&&y.disabled,p&&y.button,"center"!==i&&y.alignItemsFlexStart,H&&y.secondaryAction,N&&y.selected),disabled:x},F),K=I||"li";return p&&(z.component=I||"div",z.focusVisibleClassName=Object(s.a)(y.focusVisible,j),K=A.a),H?(K=z.component||I?K:"div","li"===E&&("li"===K?K="div":"li"===z.component&&(z.component="div")),o.createElement(l.a.Provider,{value:L},o.createElement(E,Object(a.a)({className:Object(s.a)(y.container,B),ref:J},w),o.createElement(K,z,q),q.pop()))):o.createElement(l.a.Provider,{value:L},o.createElement(K,Object(a.a)({ref:J},z),q))})),d=Object(u.a)((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(g),p=o.forwardRef((function(e,t){var n,i=e.classes,u=e.className,A=e.component,c=void 0===A?"li":A,l=e.disableGutters,f=void 0!==l&&l,h=e.role,g=void 0===h?"menuitem":h,p=e.selected,v=e.tabIndex,y=Object(r.a)(e,["classes","className","component","disableGutters","role","selected","tabIndex"]);return e.disabled||(n=void 0!==v?v:-1),o.createElement(d,Object(a.a)({button:!0,role:g,tabIndex:n,component:c,selected:p,disableGutters:f,classes:{dense:i.dense},className:Object(s.a)(i.root,u,p&&i.selected,!f&&i.gutters),ref:t},y))}));t.a=Object(u.a)((function(e){return{root:Object(a.a)({},e.typography.body1,Object(i.a)({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},e.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:Object(a.a)({},e.typography.body2,{minHeight:"auto"})}}),{name:"MuiMenuItem"})(p)},function(e,t,n){"use strict";var r=n(18),i=n(33),a=n(0),o=(n(317),n(28),n(75)),s=n(107),u=n(37),A=n(48),c=n(188),l=a.forwardRef((function(e,t){var n=e.children,o=e.classes,s=e.className,A=e.component,l=void 0===A?"ul":A,f=e.dense,h=void 0!==f&&f,g=e.disablePadding,d=void 0!==g&&g,p=e.subheader,v=Object(i.a)(e,["children","classes","className","component","dense","disablePadding","subheader"]),y=a.useMemo((function(){return{dense:h}}),[h]);return a.createElement(c.a.Provider,{value:y},a.createElement(l,Object(r.a)({className:Object(u.a)(o.root,s,h&&o.dense,!d&&o.padding,p&&o.subheader),ref:t},v),p,n))})),f=Object(A.a)({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(l),h=n(357),g=n(68);function d(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function p(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function v(e,t){if(void 0===t)return!0;var n=e.innerText;return void 0===n&&(n=e.textContent),0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function y(e,t,n,r,i){for(var a=!1,o=r(e,t,!!t&&n);o;){if(o===e.firstChild){if(a)return!1;a=!0}if(o.hasAttribute("tabindex")&&!o.disabled&&"true"!==o.getAttribute("aria-disabled")&&v(o,i))return o.focus(),!0;o=r(e,o,n)}return!1}var m="undefined"===typeof window?a.useEffect:a.useLayoutEffect,I=a.forwardRef((function(e,t){var n=e.actions,u=e.autoFocus,A=void 0!==u&&u,c=e.autoFocusItem,l=void 0!==c&&c,I=e.children,b=e.className,E=e.onKeyDown,C=e.disableListWrap,B=void 0!==C&&C,w=e.variant,Q=void 0===w?"selectedMenu":w,k=Object(i.a)(e,["actions","autoFocus","autoFocusItem","children","className","onKeyDown","disableListWrap","variant"]),_=a.useRef(null),x=a.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});m((function(){A&&_.current.focus()}),[A]),a.useImperativeHandle(n,(function(){return{adjustStyleForScrollbar:function(e,t){var n=!_.current.style.width;if(e.clientHeight<_.current.clientHeight&&n){var r="".concat(Object(h.a)(!0),"px");_.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=r,_.current.style.width="calc(100% + ".concat(r,")")}return _.current}}}),[]);var S=a.useCallback((function(e){_.current=o.findDOMNode(e)}),[]),O=Object(g.a)(S,t),D=-1;a.Children.forEach(I,(function(e,t){a.isValidElement(e)&&(e.props.disabled||("selectedMenu"===Q&&e.props.selected||-1===D)&&(D=t))}));var R=a.Children.map(I,(function(e,t){if(t===D){var n={};if(l&&(n.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===Q&&(n.tabIndex=0),null!==n)return a.cloneElement(e,n)}return e}));return a.createElement(f,Object(r.a)({role:"menu",ref:O,className:b,onKeyDown:function(e){var t=_.current,n=e.key,r=Object(s.a)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),y(t,r,B,d);else if("ArrowUp"===n)e.preventDefault(),y(t,r,B,p);else if("Home"===n)e.preventDefault(),y(t,null,B,d);else if("End"===n)e.preventDefault(),y(t,null,B,p);else if(1===n.length){var i=x.current,a=n.toLowerCase(),o=performance.now();i.keys.length>0&&(o-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&a!==i.keys[0]&&(i.repeating=!1)),i.lastTime=o,i.keys.push(a);var u=r&&!i.repeating&&v(r,i);i.previousKeyMatched&&(u||y(t,r,!1,d,i))?e.preventDefault():i.previousKeyMatched=!1}E&&E(e)},tabIndex:A?0:-1},k),R)}));t.a=I},function(e,t,n){"use strict";var r=n(16),i=n(329),a=n(200);n.d(t,"a",(function(){return l}));var o={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},u={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},A=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){if(e.length>2){if(!u[e])return[e];e=u[e]}var t=e.split(""),n=Object(r.a)(t,2),i=n[0],a=n[1],A=o[i],c=s[a]||"";return Array.isArray(c)?c.map((function(e){return A+e})):[A+c]})),c=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function l(e){var t=e.spacing||8;return"number"===typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"===typeof t?t:function(){}}function f(e,t){return function(n){return e.reduce((function(e,r){return e[r]=function(e,t){if("string"===typeof t)return t;var n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}(t,n),e}),{})}}function h(e){var t=l(e.theme);return Object.keys(e).map((function(n){if(-1===c.indexOf(n))return null;var r=f(A(n),t),a=e[n];return Object(i.a)(e,a,r)})).reduce(a.a,{})}h.propTypes={},h.filterProps=c;t.b=h},function(e,t,n){"use strict";var r=n(20),i=n(47),a=n(24),o=n(0),s=n.n(o),u=n(1358),A=n(332),c=n.n(A),l=n(240),f=n(100),h=n(161),g=n(85),d=n(134),p=n(178),v=n(528),y=n(802),m=n(22),I=n(491),b=n(492),E=n(67);function C(e){var t=e.parentUuid,n=e.cellHighlight,r=e.width,i=e.height,o=e.getCellInfo,u=Object(E.b)(),A=Object(E.c)(t),c=n&&o?[o(n)].concat(Object(m.a)(A&&A.project?A.project(n):[null,null])):[null,null,null],l=Object(a.a)(c,3),f=l[0],h=l[1],g=l[2];return f?s.a.createElement(I.a,{x:h,y:g,parentUuid:t,sourceUuid:u,parentWidth:r,parentHeight:i},s.a.createElement(b.a,{info:f})):null}var B=n(396),w=n(1317),Q=n(1083),k=n(1075),_=n(33),x=n(18),S=(n(28),n(37)),O=n(48);var D=o.createContext(),R=o.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,a=void 0===i?"table":i,s=e.padding,u=void 0===s?"default":s,A=e.size,c=void 0===A?"medium":A,l=e.stickyHeader,f=void 0!==l&&l,h=Object(_.a)(e,["classes","className","component","padding","size","stickyHeader"]),g=o.useMemo((function(){return{padding:u,size:c,stickyHeader:f}}),[u,c,f]);return o.createElement(D.Provider,{value:g},o.createElement(a,Object(x.a)({ref:t,className:Object(S.a)(n.root,r,f&&n.stickyHeader)},h)))})),j=Object(O.a)((function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":Object(x.a)({},e.typography.body2,{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}}),{name:"MuiTable"})(R);var M=o.createContext(),N={variant:"body"},F=o.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,a=void 0===i?"tbody":i,s=Object(_.a)(e,["classes","className","component"]);return o.createElement(M.Provider,{value:N},o.createElement(a,Object(x.a)({className:Object(S.a)(n.root,r),ref:t},s)))})),T=Object(O.a)({root:{display:"table-row-group"}},{name:"MuiTableBody"})(F),L=n(73),P=n(87),U=o.forwardRef((function(e,t){var n,r=e.align,i=void 0===r?"inherit":r,a=e.classes,s=e.className,u=e.component,A=e.padding,c=e.scope,l=e.size,f=e.sortDirection,h=e.variant,g=Object(_.a)(e,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),d=o.useContext(D),p=o.useContext(M);n=u||(p&&"head"===p.variant?"th":"td");var v=c;!v&&p&&"head"===p.variant&&(v="col");var y=A||(d&&d.padding?d.padding:"default"),m=l||(d&&d.size?d.size:"medium"),I=h||p&&p.variant,b=null;return f&&(b="asc"===f?"ascending":"descending"),o.createElement(n,Object(x.a)({ref:t,className:Object(S.a)(a.root,a[I],s,"inherit"!==i&&a["align".concat(Object(L.a)(i))],"default"!==y&&a["padding".concat(Object(L.a)(y))],"medium"!==m&&a["size".concat(Object(L.a)(m))],"head"===I&&d&&d.stickyHeader&&a.stickyHeader),"aria-sort":b,scope:v},g))})),G=Object(O.a)((function(e){return{root:Object(x.a)({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n    ".concat("light"===e.palette.type?Object(P.d)(Object(P.b)(e.palette.divider,1),.88):Object(P.a)(Object(P.b)(e.palette.divider,1),.68)),textAlign:"left",padding:16}),head:{color:e.palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},body:{color:e.palette.text.primary},footer:{color:e.palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0px 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:2,backgroundColor:e.palette.background.default}}}),{name:"MuiTableCell"})(U),q=o.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,a=void 0===i?"div":i,s=Object(_.a)(e,["classes","className","component"]);return o.createElement(a,Object(x.a)({ref:t,className:Object(S.a)(n.root,r)},s))})),H=Object(O.a)({root:{width:"100%",overflowX:"auto"}},{name:"MuiTableContainer"})(q),Y=o.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,a=void 0===i?"tr":i,s=e.hover,u=void 0!==s&&s,A=e.selected,c=void 0!==A&&A,l=Object(_.a)(e,["classes","className","component","hover","selected"]),f=o.useContext(M);return o.createElement(a,Object(x.a)({ref:t,className:Object(S.a)(n.root,r,f&&{head:n.head,footer:n.footer}[f.variant],u&&n.hover,c&&n.selected)},l))})),J=Object(O.a)((function(e){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$hover:hover":{backgroundColor:e.palette.action.hover},"&$selected, &$selected:hover":{backgroundColor:Object(P.b)(e.palette.secondary.main,e.palette.action.selectedOpacity)}},selected:{},hover:{},head:{},footer:{}}}),{name:"MuiTableRow"})(Y),z=Object(B.a)((function(e){return{box:{boxSizing:"border-box"},checkbox:{padding:"3px",color:e.palette.primaryForeground,"&:checked":{color:e.palette.primaryForeground},"& input":{height:"100%"}},slider:{color:e.palette.primaryForeground,minWidth:"60px",padding:"10px 0 6px 0"},sliderValueLabel:{"& span":{"& span":{color:e.palette.primaryBackground}}},tableContainer:{overflow:"hidden"},labelCell:{padding:"2px 8px 2px 16px"},inputCell:{padding:"2px 16px 2px 8px",overflow:"visible"}}}));function K(e){var t=e.observationsLabel,n=e.cellRadius,r=e.setCellRadius,i=e.cellSetLabelsVisible,a=e.setCellSetLabelsVisible,o=e.cellSetLabelSize,u=e.setCellSetLabelSize,A=e.cellSetPolygonsVisible,c=e.setCellSetPolygonsVisible,l=Object(f.a)(t),h=z();return s.a.createElement(w.a,{className:h.box},s.a.createElement(H,{className:h.tableContainer},s.a.createElement(j,{className:h.table,size:"small"},s.a.createElement(T,null,s.a.createElement(J,null,s.a.createElement(G,{className:h.labelCell},l," Set Labels Visible"),s.a.createElement(G,{className:h.inputCell},s.a.createElement(Q.a,{className:h.checkbox,checked:i,onChange:function(e){a(e.target.checked)},name:"scatterplot-option-cell-set-labels",color:"default"}))),s.a.createElement(J,null,s.a.createElement(G,{className:h.labelCell},l," Set Label Size"),s.a.createElement(G,{className:h.inputCell},s.a.createElement(k.a,{disabled:!i,classes:{root:h.slider,valueLabel:h.sliderValueLabel},value:o,onChange:function(e,t){u(t)},"aria-labelledby":"cell-set-label-size-slider",valueLabelDisplay:"auto",step:1,min:8,max:36}))),s.a.createElement(J,null,s.a.createElement(G,{className:h.labelCell},l," Set Polygons Visible"),s.a.createElement(G,{className:h.inputCell},s.a.createElement(Q.a,{className:h.checkbox,checked:A,onChange:function(e){c(e.target.checked)},name:"scatterplot-option-cell-set-polygons",color:"default"}))),s.a.createElement(J,null,s.a.createElement(G,{className:h.labelCell},l," Radius"),s.a.createElement(G,{className:h.inputCell},s.a.createElement(k.a,{classes:{root:h.slider,valueLabel:h.sliderValueLabel},value:n,onChange:function(e,t){r(t)},"aria-labelledby":"cell-radius-slider",valueLabelDisplay:"auto",step:.25,min:.25,max:8})))))))}var W=n(176);n.d(t,"a",(function(){return X}));var V=["cells","expression-matrix","cell-sets"];function X(e){var t=e.uuid,n=e.coordinationScopes,A=e.removeGridComponent,m=e.theme,I=e.disableTooltip,b=void 0!==I&&I,B=e.observationsLabelOverride,w=void 0===B?"cell":B,Q=e.observationsPluralLabelOverride,k=void 0===Q?"".concat(w,"s"):Q,_=Object(E.h)(),x=Object(E.j)(),S=Object(E.k)(t),O=Object(E.d)(W.b.scatterplot,n),D=Object(a.a)(O,2),R=D[0],j=R.dataset,M=R.embeddingZoom,N=R.embeddingTargetX,F=R.embeddingTargetY,T=R.embeddingTargetZ,L=R.embeddingType,P=R.cellFilter,U=R.cellHighlight,G=R.geneSelection,q=R.cellSetSelection,H=R.cellSetColor,Y=R.cellColorEncoding,J=R.additionalCellSets,z=R.embeddingCellSetPolygonsVisible,X=R.embeddingCellSetLabelsVisible,Z=R.embeddingCellSetLabelSize,$=R.embeddingCellRadius,ee=D[1],te=ee.setEmbeddingZoom,ne=ee.setEmbeddingTargetX,re=ee.setEmbeddingTargetY,ie=ee.setEmbeddingTargetZ,ae=ee.setCellFilter,oe=ee.setCellSetSelection,se=ee.setCellHighlight,ue=ee.setCellSetColor,Ae=ee.setCellColorEncoding,ce=ee.setAdditionalCellSets,le=ee.setEmbeddingCellSetPolygonsVisible,fe=ee.setEmbeddingCellSetLabelsVisible,he=ee.setEmbeddingCellSetLabelSize,ge=ee.setEmbeddingCellRadius,de=Object(h.d)(),pe=Object(a.a)(de,3),ve=pe[0],ye=pe[1],me=pe[2],Ie=Object(h.a)(),be=Object(a.a)(Ie,3),Ee=be[0],Ce=be[1],Be=be[2],we=Object(h.c)(V),Qe=Object(a.a)(we,3),ke=Qe[0],_e=Qe[1],xe=Qe[2];Object(o.useEffect)((function(){me(),xe()}),[_,j]);var Se=Object(p.b)(_,j,_e,ye,!0),Oe=Object(a.a)(Se,2),De=Oe[0],Re=Oe[1],je=Object(p.a)(_,j,_e,ye,!1),Me=Object(a.a)(je,1)[0],Ne=Object(p.c)(_,j,_e,ye,!1),Fe=Object(a.a)(Ne,1)[0],Te=Object(o.useState)(.2),Le=Object(a.a)(Te,2),Pe=Le[0],Ue=Le[1],Ge=Object(o.useMemo)((function(){return Object(g.n)(Me,J)}),[Me,J]),qe=Object(o.useCallback)((function(e){Object(g.o)(e,J,H,oe,ce,ue,Ae)}),[J,H,Ae,ce,ue,oe]),He=Object(o.useMemo)((function(){return Object(v.a)({cellColorEncoding:Y,expressionMatrix:Fe,geneSelection:G,cellSets:Ge,cellSetSelection:q,cellSetColor:H})}),[Y,G,Ge,q,H,Fe]),Ye=Object(o.useMemo)((function(){return Object(d.b)({cells:De,mapping:L,cellSets:Ge,cellSetSelection:q,cellSetColor:H})}),[De,L,Ge,q,H]),Je=Object(o.useMemo)((function(){return Array.from(He.keys())}),[He]);Object(o.useEffect)((function(){if(De){var e=Object.values(De).map((function(e){return e.mappings[L]})),t=Object(u.a)(e,(function(e){return e[0]})),n=Object(u.a)(e,(function(e){return e[1]})),r=t[1]-t[0],i=n[1]-n[0],a=Math.sqrt(Math.pow(r,2)+Math.pow(i,2)),o=c()(a/300,0,.2);o&&Ue(o)}}),[De,L]);var ze=Object(o.useCallback)((function(e){var t=De[e];return Object(i.a)(Object(r.a)({},"".concat(Object(f.a)(w)," ID"),e),t?t.factors:{})}),[De,w]);return s.a.createElement(l.a,{title:"Scatterplot (".concat(L,")"),info:"".concat(Re," ").concat(Object(f.d)(w,k,Re)),removeGridComponent:A,urls:ve,theme:m,isReady:ke,options:s.a.createElement(K,{observationsLabel:w,cellRadius:$,setCellRadius:ge,cellSetLabelsVisible:X,setCellSetLabelsVisible:fe,cellSetLabelSize:Z,setCellSetLabelSize:he,cellSetPolygonsVisible:z,setCellSetPolygonsVisible:le})},s.a.createElement(y.a,{ref:Be,uuid:t,theme:m,viewState:{zoom:M,target:[N,F,T]},setViewState:function(e){var t=e.zoom,n=e.target;te(t),ne(n[0]),re(n[1]),ie(n[2])},cells:De,mapping:L,cellFilter:P,cellSelection:Je,cellHighlight:U,cellColors:He,cellSetPolygons:Ye,cellSetLabelSize:Z,cellSetLabelsVisible:X,cellSetPolygonsVisible:z,setCellFilter:ae,setCellSelection:qe,setCellHighlight:se,cellRadiusScale:Pe*$,setComponentHover:function(){x(t)},updateViewInfo:S}),!b&&s.a.createElement(C,{parentUuid:t,cellHighlight:U,width:Ee,height:Ce,getCellInfo:ze}))}},function(e,t,n){"use strict";var r=n(20),i=n(47),a=n(24),o=n(0),s=n.n(o),u=n(240),A=n(100),c=n(161),l=n(85),f=n(178),h=n(528),g=n(67),d=n(176),p=n(801),v=n(491),y=n(492);function m(e){var t=e.parentUuid,n=e.width,r=e.height,o=e.transpose,u=e.getCellInfo,A=e.getGeneInfo,c=e.cellHighlight,l=e.geneHighlight,f=Object(g.b)(),h=Object(g.c)(t),d=c&&u?[u(c),h&&h.project?h.project(c,null)[o?0:1]:null]:[null,null],p=Object(a.a)(d,2),m=p[0],I=p[1],b=l&&A?[A(l),h&&h.project?h.project(null,l)[o?1:0]:null]:[null,null],E=Object(a.a)(b,2),C=E[0],B=E[1],w=o?I:B,Q=o?B:I;return m||C?s.a.createElement(v.a,{x:w,y:Q,parentUuid:t,parentWidth:n,parentHeight:r,sourceUuid:f},s.a.createElement(y.a,{info:Object(i.a)({},C,{},m)})):null}n.d(t,"a",(function(){return b}));var I=["cells","cell-sets","expression-matrix"];function b(e){var t=e.uuid,n=e.coordinationScopes,v=e.removeGridComponent,y=e.theme,b=e.transpose,E=e.observationsLabelOverride,C=void 0===E?"cell":E,B=e.observationsPluralLabelOverride,w=void 0===B?"".concat(C,"s"):B,Q=e.variablesLabelOverride,k=void 0===Q?"gene":Q,_=e.variablesPluralLabelOverride,x=void 0===_?"".concat(k,"s"):_,S=e.disableTooltip,O=void 0!==S&&S,D=Object(g.h)(),R=Object(g.j)(),j=Object(g.k)(t),M=Object(g.d)(d.b.heatmap,n),N=Object(a.a)(M,2),F=N[0],T=F.dataset,L=F.heatmapZoomX,P=F.heatmapTargetX,U=F.heatmapTargetY,G=F.geneSelection,q=F.cellHighlight,H=F.geneHighlight,Y=F.cellSetSelection,J=F.cellSetColor,z=F.cellColorEncoding,K=F.additionalCellSets,W=F.geneExpressionColormapRange,V=N[1],X=V.setHeatmapZoomX,Z=V.setHeatmapZoomY,$=V.setHeatmapTargetX,ee=V.setHeatmapTargetY,te=V.setCellHighlight,ne=V.setGeneHighlight,re=V.setGeneExpressionColormapRange,ie=Object(A.a)(w),ae=Object(A.a)(x),oe=Object(o.useState)(!1),se=Object(a.a)(oe,2),ue=se[0],Ae=se[1],ce=Object(c.c)(I),le=Object(a.a)(ce,3),fe=le[0],he=le[1],ge=le[2],de=Object(c.d)(),pe=Object(a.a)(de,3),ve=pe[0],ye=pe[1],me=pe[2],Ie=Object(c.a)(),be=Object(a.a)(Ie,3),Ee=be[0],Ce=be[1],Be=be[2];Object(o.useEffect)((function(){me(),ge()}),[D,T]);var we=Object(f.b)(D,T,he,ye,!0),Qe=Object(a.a)(we,1)[0],ke=Object(f.c)(D,T,he,ye,!0),_e=Object(a.a)(ke,1)[0],xe=Object(f.a)(D,T,he,ye,!1),Se=Object(a.a)(xe,1)[0],Oe=Object(o.useMemo)((function(){return Object(l.n)(Se,K)}),[Se,K]),De=Object(o.useMemo)((function(){return Object(h.a)({cellColorEncoding:z,expressionMatrix:_e,geneSelection:G,cellSets:Oe,cellSetSelection:Y,cellSetColor:J})}),[z,G,Oe,J,Y,_e]),Re=Object(o.useCallback)((function(e){if(e){var t=Qe[e];return Object(i.a)(Object(r.a)({},"".concat(Object(A.a)(C)," ID"),e),t?t.factors:{})}return null}),[Qe,C]),je=Object(o.useCallback)((function(e){return e?Object(r.a)({},"".concat(Object(A.a)(k)," ID"),e):null}),[k]),Me=_e&&_e.rows?_e.rows.length:0,Ne=_e&&_e.cols?_e.cols.length:0,Fe=De.size;return s.a.createElement(u.a,{title:"Heatmap",info:"".concat(Me," ").concat(Object(A.d)(C,w,Me)," \xd7 ").concat(Ne," ").concat(Object(A.d)(k,x,Ne),",\n             with ").concat(Fe," ").concat(Object(A.d)(C,w,Fe)," selected"),urls:ve,theme:y,removeGridComponent:v,isReady:fe&&!ue},s.a.createElement(p.a,{ref:Be,transpose:b,viewState:{zoom:L,target:[P,U]},setViewState:function(e){var t=e.zoom,n=e.target;X(t),Z(t),$(n[0]),ee(n[1])},heatmapControls:W,setHeatmapControls:re,height:Ce,width:Ee,theme:y,uuid:t,expressionMatrix:_e,cellColors:De,setIsRendering:Ae,setCellHighlight:te,setGeneHighlight:ne,setComponentHover:function(){R(t)},updateViewInfo:j,observationsTitle:ie,variablesTitle:ae}),!O&&s.a.createElement(m,{parentUuid:t,width:Ee,height:Ce,transpose:b,getCellInfo:Re,getGeneInfo:je,cellHighlight:q,geneHighlight:H}))}},function(e,t,n){"use strict";var r=n(47),i=n(22),a=n(20),o=n(24),s=n(0),u=n.n(s),A=n(240),c=n(100),l=n(161),f=n(85),h=n(178),g=n(528),d=n(800),p=n(491),v=n(492),y=n(67);function m(e){var t=e.parentUuid,n=e.cellHighlight,r=e.width,a=e.height,s=e.getCellInfo,A=Object(y.b)(),c=Object(y.c)(t),l=n&&s?[s(n)].concat(Object(i.a)(c&&c.project?c.project(n):[null,null])):[null,null,null],f=Object(o.a)(l,3),h=f[0],g=f[1],d=f[2];return h?u.a.createElement(p.a,{x:g,y:d,parentUuid:t,sourceUuid:A,parentWidth:r,parentHeight:a},u.a.createElement(v.a,{info:h})):null}var I=n(271),b=n(125),E=n(176);n.d(t,"a",(function(){return w}));var C=["cells","molecules","raster","cell-sets","expression-matrix"],B=["cells","molecules","raster","neighborhoods"];function w(e){var t,n,p,v=e.uuid,w=e.coordinationScopes,Q=e.removeGridComponent,k=e.initializeLayers,_=void 0===k||k,x=e.observationsLabelOverride,S=void 0===x?"cell":x,O=e.observationsPluralLabelOverride,D=void 0===O?"".concat(S,"s"):O,R=e.subobservationsLabelOverride,j=void 0===R?"molecule":R,M=e.subobservationsPluralLabelOverride,N=void 0===M?"".concat(j,"s"):M,F=e.theme,T=e.disableTooltip,L=void 0!==T&&T,P=Object(y.h)(),U=Object(y.j)(),G=Object(y.k)(v),q=Object(y.d)(E.b.spatial,w),H=Object(o.a)(q,2),Y=H[0],J=Y.dataset,z=Y.spatialZoom,K=Y.spatialTargetX,W=Y.spatialTargetY,V=Y.spatialTargetZ,X=Y.spatialLayers,Z=Y.cellFilter,$=Y.cellHighlight,ee=Y.geneSelection,te=Y.cellSetSelection,ne=Y.cellSetColor,re=Y.cellColorEncoding,ie=Y.additionalCellSets,ae=H[1],oe=ae.setSpatialZoom,se=ae.setSpatialTargetX,ue=ae.setSpatialTargetY,Ae=ae.setSpatialTargetZ,ce=ae.setSpatialLayers,le=ae.setCellFilter,fe=ae.setCellSetSelection,he=ae.setCellHighlight,ge=ae.setCellSetColor,de=ae.setCellColorEncoding,pe=ae.setAdditionalCellSets,ve=ae.setMoleculeHighlight,ye=Object(s.useState)(Object(a.a)({},J,[(null===(t=P[J].loaders.cells)||void 0===t?void 0:t.url)?b.a:null,(null===(n=P[J].loaders.molecules)||void 0===n?void 0:n.url)?b.c:null,(null===(p=P[J].loaders.neighborhoods)||void 0===p?void 0:p.url)?b.d:null].filter(Boolean))),me=Object(o.a)(ye,2),Ie=me[0],be=me[1],Ee=Object(l.d)(),Ce=Object(o.a)(Ee,3),Be=Ce[0],we=Ce[1],Qe=Ce[2],ke=Object(l.c)(C),_e=Object(o.a)(ke,3),xe=_e[0],Se=_e[1],Oe=_e[2],De=Object(l.a)(),Re=Object(o.a)(De,3),je=Re[0],Me=Re[1],Ne=Re[2];Object(s.useEffect)((function(){var e,t,n;Qe(),Oe(),be(Object(a.a)({},J,[(null===(e=P[J].loaders.cells)||void 0===e?void 0:e.url)?b.a:null,(null===(t=P[J].loaders.molecules)||void 0===t?void 0:t.url)?b.c:null,(null===(n=P[J].loaders.neighborhoods)||void 0===n?void 0:n.url)?b.d:null].filter(Boolean)))}),[P,J]);var Fe=Object(h.b)(P,J,Se,we,!1,(function(){})),Te=Object(o.a)(Fe,2),Le=Te[0],Pe=Te[1],Ue=Object(h.e)(P,J,Se,we,!1,(function(){})),Ge=Object(o.a)(Ue,3),qe=Ge[0],He=Ge[1],Ye=Ge[2],Je=Object(h.f)(P,J,Se,we,!1,(function(){})),ze=Object(o.a)(Je,1)[0],Ke=Object(h.a)(P,J,Se,we,!1),We=Object(o.a)(Ke,1)[0],Ve=Object(h.c)(P,J,Se,we,!1),Xe=Object(o.a)(Ve,1)[0],Ze=Object(h.g)(P,J,Se,we,!1,(function(e){return be((function(t){return Object.keys(t).includes(J)?Object(a.a)({},J,[].concat(Object(i.a)(t[J]||[]),Object(i.a)(e))):t}))})),$e=Object(o.a)(Ze,2),et=($e[0],$e[1]);Object(s.useEffect)((function(){var e,t=null===(e=Object.keys(P[J].loaders))||void 0===e?void 0:e.every((function(e){return!B.includes(e)||Ie[J]&&Ie[J].filter((function(t){return t.type===e})).length>0}));xe&&_&&(!X&&Ie[J]&&t?ce(Object(I.e)(Ie[J])):X&&Object(I.b)(X,et).then((function(e){var t=Object(o.a)(e,2),n=t[0];t[1]&&ce(n)})))}),[J,P,Ie,et,xe,X,ce,_]);var tt=Object(s.useMemo)((function(){return Object(f.n)(We,ie)}),[We,ie]),nt=Object(s.useCallback)((function(e){Object(f.o)(e,ie,ne,fe,pe,ge,de)}),[ie,ne,de,pe,ge,fe]),rt=Object(s.useMemo)((function(){return Object(g.a)({cellColorEncoding:re,expressionMatrix:Xe,geneSelection:ee,cellSets:tt,cellSetSelection:te,cellSetColor:ne})}),[re,ee,tt,ne,te,Xe]),it=Object(s.useMemo)((function(){return Array.from(rt.keys())}),[rt]),at=Object(I.d)({observationsCount:Pe,observationsLabel:S,observationsPluralLabel:D,subobservationsCount:He,subobservationsLabel:j,subobservationsPluralLabel:N,locationsCount:Ye});return u.a.createElement(A.a,{title:"Spatial",info:at,isSpatial:!0,urls:Be,theme:F,removeGridComponent:Q,isReady:xe},u.a.createElement(d.a,{ref:Ne,uuid:v,width:je,height:Me,viewState:{zoom:z,target:[K,W,V]},setViewState:function(e){var t=e.zoom,n=e.target;oe(t),se(n[0]),ue(n[1]),Ae(n[2])},layers:X,cells:Le,cellFilter:Z,cellSelection:it,cellHighlight:$,cellColors:rt,molecules:qe,neighborhoods:ze,imageLayerLoaders:et,setCellFilter:le,setCellSelection:nt,setCellHighlight:he,setMoleculeHighlight:ve,setComponentHover:function(){U(v)},updateViewInfo:G}),!L&&u.a.createElement(m,{parentUuid:v,cellHighlight:$,width:je,height:Me,getCellInfo:function(e){var t=Le[e];return t?Object(r.a)(Object(a.a)({},"".concat(Object(c.a)(S)," ID"),e),t.factors):null}}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),i=n.n(r);function a(e){var t=e.info,n=e.warn,r=[];return t&&r.push(i.a.createElement("p",{className:"details",key:"info"},t)),n&&r.push(i.a.createElement("p",{className:"alert alert-warning my-0 details",key:"warn"},n)),r}},function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"JsonPatchError",(function(){return re})),n.d(r,"deepClone",(function(){return ie})),n.d(r,"getValueByPointer",(function(){return se})),n.d(r,"applyOperation",(function(){return ue})),n.d(r,"applyPatch",(function(){return Ae})),n.d(r,"applyReducer",(function(){return ce})),n.d(r,"validator",(function(){return le})),n.d(r,"validate",(function(){return fe})),n.d(r,"_areEquals",(function(){return he}));var i={};n.r(i),n.d(i,"unobserve",(function(){return ve})),n.d(i,"observe",(function(){return ye})),n.d(i,"generate",(function(){return me})),n.d(i,"compare",(function(){return be}));var a={};n.r(a),n.d(a,"aggregate",(function(){return Us})),n.d(a,"bin",(function(){return qs})),n.d(a,"collect",(function(){return Js})),n.d(a,"compare",(function(){return zs})),n.d(a,"countpattern",(function(){return Ws})),n.d(a,"cross",(function(){return Xs})),n.d(a,"density",(function(){return $s})),n.d(a,"dotbin",(function(){return iu})),n.d(a,"expression",(function(){return au})),n.d(a,"extent",(function(){return su})),n.d(a,"facet",(function(){return cu})),n.d(a,"field",(function(){return fu})),n.d(a,"filter",(function(){return gu})),n.d(a,"flatten",(function(){return du})),n.d(a,"fold",(function(){return pu})),n.d(a,"formula",(function(){return vu})),n.d(a,"generate",(function(){return yu})),n.d(a,"impute",(function(){return _u})),n.d(a,"joinaggregate",(function(){return xu})),n.d(a,"kde",(function(){return Ou})),n.d(a,"key",(function(){return Du})),n.d(a,"load",(function(){return ju})),n.d(a,"lookup",(function(){return Nu})),n.d(a,"multiextent",(function(){return Fu})),n.d(a,"multivalues",(function(){return Lu})),n.d(a,"params",(function(){return Uu})),n.d(a,"pivot",(function(){return Gu})),n.d(a,"prefacet",(function(){return Hu})),n.d(a,"project",(function(){return Yu})),n.d(a,"proxy",(function(){return Ju})),n.d(a,"quantile",(function(){return Ku})),n.d(a,"relay",(function(){return Vu})),n.d(a,"sample",(function(){return Xu})),n.d(a,"sequence",(function(){return Zu})),n.d(a,"sieve",(function(){return $u})),n.d(a,"subflow",(function(){return uu})),n.d(a,"timeunit",(function(){return eA})),n.d(a,"tupleindex",(function(){return rA})),n.d(a,"values",(function(){return iA})),n.d(a,"window",(function(){return cA}));var o={};n.r(o),n.d(o,"interpolate",(function(){return xd})),n.d(o,"interpolateArray",(function(){return bd})),n.d(o,"interpolateBasis",(function(){return ud})),n.d(o,"interpolateBasisClosed",(function(){return Ad})),n.d(o,"interpolateDate",(function(){return Cd})),n.d(o,"interpolateDiscrete",(function(){return jp})),n.d(o,"interpolateHue",(function(){return Mp})),n.d(o,"interpolateNumber",(function(){return Bd})),n.d(o,"interpolateNumberArray",(function(){return md})),n.d(o,"interpolateObject",(function(){return wd})),n.d(o,"interpolateRound",(function(){return Sd})),n.d(o,"interpolateString",(function(){return _d})),n.d(o,"interpolateTransformCss",(function(){return Pp})),n.d(o,"interpolateTransformSvg",(function(){return Up})),n.d(o,"interpolateZoom",(function(){return Hp})),n.d(o,"interpolateRgb",(function(){return dd})),n.d(o,"interpolateRgbBasis",(function(){return vd})),n.d(o,"interpolateRgbBasisClosed",(function(){return yd})),n.d(o,"interpolateHsl",(function(){return Jp})),n.d(o,"interpolateHslLong",(function(){return zp})),n.d(o,"interpolateLab",(function(){return sv})),n.d(o,"interpolateHcl",(function(){return Av})),n.d(o,"interpolateHclLong",(function(){return cv})),n.d(o,"interpolateCubehelix",(function(){return mv})),n.d(o,"interpolateCubehelixLong",(function(){return Iv})),n.d(o,"piecewise",(function(){return cp})),n.d(o,"quantize",(function(){return bv}));var s={};n.r(s),n.d(s,"bound",(function(){return Py})),n.d(s,"identifier",(function(){return Gy})),n.d(s,"mark",(function(){return qy})),n.d(s,"overlap",(function(){return Hy})),n.d(s,"render",(function(){return Zy})),n.d(s,"viewlayout",(function(){return bm}));var u={};n.r(u),n.d(u,"axisticks",(function(){return Em})),n.d(u,"datajoin",(function(){return Cm})),n.d(u,"encode",(function(){return wm})),n.d(u,"legendentries",(function(){return Qm})),n.d(u,"linkpath",(function(){return Dm})),n.d(u,"pie",(function(){return Fm})),n.d(u,"scale",(function(){return Pm})),n.d(u,"sortitems",(function(){return Hm})),n.d(u,"stack",(function(){return Jm}));var A={};n.r(A),n.d(A,"contour",(function(){return yI})),n.d(A,"geojson",(function(){return mI})),n.d(A,"geopath",(function(){return WB})),n.d(A,"geopoint",(function(){return VB})),n.d(A,"geoshape",(function(){return XB})),n.d(A,"graticule",(function(){return sw})),n.d(A,"heatmap",(function(){return Fw})),n.d(A,"isocontour",(function(){return sI})),n.d(A,"kde2d",(function(){return gI})),n.d(A,"projection",(function(){return Lw}));var c={};n.r(c),n.d(c,"force",(function(){return $w}));var l={};n.r(l),n.d(l,"nest",(function(){return fQ})),n.d(l,"pack",(function(){return PQ})),n.d(l,"partition",(function(){return YQ})),n.d(l,"stratify",(function(){return ZQ})),n.d(l,"tree",(function(){return ck})),n.d(l,"treelinks",(function(){return fk})),n.d(l,"treemap",(function(){return Ik}));var f={};n.r(f),n.d(f,"loess",(function(){return Ck})),n.d(f,"regression",(function(){return wk}));var h={};n.r(h),n.d(h,"voronoi",(function(){return Vk}));var g={};n.r(g),n.d(g,"wordcloud",(function(){return c_}));var d={};n.r(d),n.d(d,"crossfilter",(function(){return b_})),n.d(d,"resolvefilter",(function(){return C_}));var p={};n.r(p),n.d(p,"version",(function(){return B_.a})),n.d(p,"bandwidthNRD",(function(){return zo})),n.d(p,"bin",(function(){return Ko})),n.d(p,"bootstrapCI",(function(){return Xo})),n.d(p,"dotbin",(function(){return Zo})),n.d(p,"quantiles",(function(){return Ho})),n.d(p,"quartiles",(function(){return Yo})),n.d(p,"random",(function(){return Wo})),n.d(p,"setRandom",(function(){return Vo})),n.d(p,"randomLCG",(function(){return $o})),n.d(p,"randomInteger",(function(){return es})),n.d(p,"randomKDE",(function(){return As})),n.d(p,"randomLogNormal",(function(){return gs})),n.d(p,"sampleLogNormal",(function(){return cs})),n.d(p,"densityLogNormal",(function(){return ls})),n.d(p,"cumulativeLogNormal",(function(){return fs})),n.d(p,"quantileLogNormal",(function(){return hs})),n.d(p,"randomMixture",(function(){return ds})),n.d(p,"randomNormal",(function(){return us})),n.d(p,"sampleNormal",(function(){return is})),n.d(p,"densityNormal",(function(){return as})),n.d(p,"cumulativeNormal",(function(){return os})),n.d(p,"quantileNormal",(function(){return ss})),n.d(p,"randomUniform",(function(){return Is})),n.d(p,"sampleUniform",(function(){return ps})),n.d(p,"densityUniform",(function(){return vs})),n.d(p,"cumulativeUniform",(function(){return ys})),n.d(p,"quantileUniform",(function(){return ms})),n.d(p,"regressionLinear",(function(){return ws})),n.d(p,"regressionLog",(function(){return Qs})),n.d(p,"regressionExp",(function(){return _s})),n.d(p,"regressionPow",(function(){return xs})),n.d(p,"regressionQuad",(function(){return Ss})),n.d(p,"regressionPoly",(function(){return Os})),n.d(p,"regressionLoess",(function(){return Rs})),n.d(p,"sampleCurve",(function(){return Fs})),n.d(p,"TIME_UNITS",(function(){return En})),n.d(p,"YEAR",(function(){return ln})),n.d(p,"QUARTER",(function(){return fn})),n.d(p,"MONTH",(function(){return hn})),n.d(p,"WEEK",(function(){return gn})),n.d(p,"DATE",(function(){return dn})),n.d(p,"DAY",(function(){return pn})),n.d(p,"DAYOFYEAR",(function(){return vn})),n.d(p,"HOURS",(function(){return yn})),n.d(p,"MINUTES",(function(){return mn})),n.d(p,"SECONDS",(function(){return In})),n.d(p,"MILLISECONDS",(function(){return bn})),n.d(p,"timeUnitSpecifier",(function(){return Qn})),n.d(p,"timeUnits",(function(){return Bn})),n.d(p,"dayofyear",(function(){return nr})),n.d(p,"week",(function(){return rr})),n.d(p,"utcdayofyear",(function(){return ur})),n.d(p,"utcweek",(function(){return Ar})),n.d(p,"timeFloor",(function(){return yr})),n.d(p,"utcFloor",(function(){return br})),n.d(p,"timeInterval",(function(){return Jr})),n.d(p,"timeOffset",(function(){return Wr})),n.d(p,"timeSequence",(function(){return Zr})),n.d(p,"utcInterval",(function(){return zr})),n.d(p,"utcOffset",(function(){return Vr})),n.d(p,"utcSequence",(function(){return $r})),n.d(p,"timeBin",(function(){return hi})),n.d(p,"accessor",(function(){return R.f})),n.d(p,"accessorName",(function(){return R.h})),n.d(p,"accessorFields",(function(){return R.g})),n.d(p,"id",(function(){return R.w})),n.d(p,"identity",(function(){return R.x})),n.d(p,"zero",(function(){return R.kb})),n.d(p,"one",(function(){return R.O})),n.d(p,"truthy",(function(){return R.gb})),n.d(p,"falsy",(function(){return R.r})),n.d(p,"logger",(function(){return R.K})),n.d(p,"None",(function(){return R.d})),n.d(p,"Error",(function(){return R.b})),n.d(p,"Warn",(function(){return R.e})),n.d(p,"Info",(function(){return R.c})),n.d(p,"Debug",(function(){return R.a})),n.d(p,"mergeConfig",(function(){return R.N})),n.d(p,"writeConfig",(function(){return R.jb})),n.d(p,"panLinear",(function(){return R.Q})),n.d(p,"panLog",(function(){return R.R})),n.d(p,"panPow",(function(){return R.S})),n.d(p,"panSymlog",(function(){return R.T})),n.d(p,"zoomLinear",(function(){return R.lb})),n.d(p,"zoomLog",(function(){return R.mb})),n.d(p,"zoomPow",(function(){return R.nb})),n.d(p,"zoomSymlog",(function(){return R.ob})),n.d(p,"quarter",(function(){return R.V})),n.d(p,"utcquarter",(function(){return R.hb})),n.d(p,"array",(function(){return R.i})),n.d(p,"clampRange",(function(){return R.j})),n.d(p,"compare",(function(){return R.k})),n.d(p,"constant",(function(){return R.l})),n.d(p,"debounce",(function(){return R.m})),n.d(p,"error",(function(){return R.n})),n.d(p,"extend",(function(){return R.o})),n.d(p,"extent",(function(){return R.p})),n.d(p,"extentIndex",(function(){return R.q})),n.d(p,"fastmap",(function(){return R.s})),n.d(p,"field",(function(){return R.t})),n.d(p,"flush",(function(){return R.u})),n.d(p,"hasOwnProperty",(function(){return R.v})),n.d(p,"inherits",(function(){return R.y})),n.d(p,"inrange",(function(){return R.z})),n.d(p,"isArray",(function(){return R.A})),n.d(p,"isBoolean",(function(){return R.B})),n.d(p,"isDate",(function(){return R.C})),n.d(p,"isFunction",(function(){return R.D})),n.d(p,"isNumber",(function(){return R.E})),n.d(p,"isObject",(function(){return R.F})),n.d(p,"isRegExp",(function(){return R.G})),n.d(p,"isString",(function(){return R.H})),n.d(p,"key",(function(){return R.I})),n.d(p,"lerp",(function(){return R.J})),n.d(p,"lruCache",(function(){return R.L})),n.d(p,"merge",(function(){return R.M})),n.d(p,"pad",(function(){return R.P})),n.d(p,"peek",(function(){return R.U})),n.d(p,"repeat",(function(){return R.W})),n.d(p,"span",(function(){return R.X})),n.d(p,"splitAccessPath",(function(){return R.Y})),n.d(p,"stringValue",(function(){return R.Z})),n.d(p,"toBoolean",(function(){return R.ab})),n.d(p,"toDate",(function(){return R.bb})),n.d(p,"toNumber",(function(){return R.cb})),n.d(p,"toString",(function(){return R.eb})),n.d(p,"toSet",(function(){return R.db})),n.d(p,"truncate",(function(){return R.fb})),n.d(p,"visitArray",(function(){return R.ib})),n.d(p,"loader",(function(){return Ya})),n.d(p,"read",(function(){return Ha})),n.d(p,"inferType",(function(){return dt})),n.d(p,"inferTypes",(function(){return pt})),n.d(p,"typeParsers",(function(){return ft})),n.d(p,"format",(function(){return Rt})),n.d(p,"formats",(function(){return jt})),n.d(p,"responseType",(function(){return Mt})),n.d(p,"Bounds",(function(){return _l})),n.d(p,"Gradient",(function(){return CA})),n.d(p,"GroupItem",(function(){return Ol})),n.d(p,"ResourceLoader",(function(){return jl})),n.d(p,"Item",(function(){return Sl})),n.d(p,"Scenegraph",(function(){return wh})),n.d(p,"Handler",(function(){return jh})),n.d(p,"Renderer",(function(){return Fh})),n.d(p,"CanvasHandler",(function(){return Kh})),n.d(p,"CanvasRenderer",(function(){return eg})),n.d(p,"SVGHandler",(function(){return rg})),n.d(p,"SVGRenderer",(function(){return cy})),n.d(p,"SVGStringRenderer",(function(){return By})),n.d(p,"RenderType",(function(){return _y})),n.d(p,"renderModule",(function(){return Sy})),n.d(p,"intersect",(function(){return Oy})),n.d(p,"Marks",(function(){return yh})),n.d(p,"boundClip",(function(){return Ny})),n.d(p,"boundContext",(function(){return ql})),n.d(p,"boundStroke",(function(){return Tl})),n.d(p,"boundItem",(function(){return mh})),n.d(p,"boundMark",(function(){return bh})),n.d(p,"pathCurves",(function(){return vc})),n.d(p,"pathSymbols",(function(){return Mc})),n.d(p,"pathRectangle",(function(){return Vc})),n.d(p,"pathTrail",(function(){return Xc})),n.d(p,"pathParse",(function(){return Ic})),n.d(p,"pathRender",(function(){return Oc})),n.d(p,"point",(function(){return Rh})),n.d(p,"domCreate",(function(){return _h})),n.d(p,"domFind",(function(){return xh})),n.d(p,"domChild",(function(){return Sh})),n.d(p,"domClear",(function(){return Oh})),n.d(p,"openTag",(function(){return ay})),n.d(p,"closeTag",(function(){return oy})),n.d(p,"font",(function(){return fh})),n.d(p,"fontFamily",(function(){return lh})),n.d(p,"fontSize",(function(){return oh})),n.d(p,"lineHeight",(function(){return sh})),n.d(p,"multiLineOffset",(function(){return Ah})),n.d(p,"textMetrics",(function(){return eh})),n.d(p,"sceneEqual",(function(){return Fy})),n.d(p,"pathEqual",(function(){return Ty})),n.d(p,"sceneToJSON",(function(){return Ch})),n.d(p,"sceneFromJSON",(function(){return Bh})),n.d(p,"intersectPath",(function(){return ef})),n.d(p,"intersectPoint",(function(){return tf})),n.d(p,"intersectRule",(function(){return rf})),n.d(p,"intersectBoxLine",(function(){return af})),n.d(p,"sceneZOrder",(function(){return gf})),n.d(p,"sceneVisit",(function(){return df})),n.d(p,"scenePickVisit",(function(){return pf})),n.d(p,"resetSVGClipId",(function(){return Ql})),n.d(p,"resetSVGDefIds",(function(){return Ly})),n.d(p,"Dataflow",(function(){return fo})),n.d(p,"EventStream",(function(){return Ve})),n.d(p,"Parameters",(function(){return Ge})),n.d(p,"Pulse",(function(){return $a})),n.d(p,"MultiPulse",(function(){return io})),n.d(p,"Operator",(function(){return Je})),n.d(p,"Transform",(function(){return po})),n.d(p,"changeset",(function(){return Pe})),n.d(p,"ingest",(function(){return je})),n.d(p,"isTuple",(function(){return Oe})),n.d(p,"definition",(function(){return mo})),n.d(p,"transform",(function(){return Io})),n.d(p,"transforms",(function(){return yo})),n.d(p,"tupleid",(function(){return De})),n.d(p,"scale",(function(){return bp})),n.d(p,"scheme",(function(){return Ov})),n.d(p,"interpolate",(function(){return kv})),n.d(p,"interpolateColors",(function(){return Bv})),n.d(p,"interpolateRange",(function(){return Cv})),n.d(p,"quantizeInterpolator",(function(){return wv})),n.d(p,"projection",(function(){return YB})),n.d(p,"View",(function(){return OR})),n.d(p,"formatLocale",(function(){return cn})),n.d(p,"timeFormatLocale",(function(){return La})),n.d(p,"locale",(function(){return Ua})),n.d(p,"defaultLocale",(function(){return Ga})),n.d(p,"resetDefaultLocale",(function(){return qa})),n.d(p,"expressionFunction",(function(){return sR})),n.d(p,"parse",(function(){return nF})),n.d(p,"runtimeContext",(function(){return mR}));var v={};n.r(v),n.d(v,"invalidSpec",(function(){return LL})),n.d(v,"FIT_NON_SINGLE",(function(){return PL})),n.d(v,"containerSizeNonSingle",(function(){return UL})),n.d(v,"containerSizeNotCompatibleWithAutosize",(function(){return GL})),n.d(v,"droppingFit",(function(){return qL})),n.d(v,"cannotProjectOnChannelWithoutField",(function(){return HL})),n.d(v,"cannotProjectAggregate",(function(){return YL})),n.d(v,"nearestNotSupportForContinuous",(function(){return JL})),n.d(v,"selectionNotSupported",(function(){return zL})),n.d(v,"selectionNotFound",(function(){return KL})),n.d(v,"SCALE_BINDINGS_CONTINUOUS",(function(){return WL})),n.d(v,"LEGEND_BINDINGS_PROJECT_LENGTH",(function(){return VL})),n.d(v,"noSameUnitLookup",(function(){return XL})),n.d(v,"noSuchRepeatedValue",(function(){return ZL})),n.d(v,"columnsNotSupportByRowCol",(function(){return $L})),n.d(v,"CONCAT_CANNOT_SHARE_AXIS",(function(){return eP})),n.d(v,"unrecognizedParse",(function(){return tP})),n.d(v,"differentParse",(function(){return nP})),n.d(v,"invalidTransformIgnored",(function(){return rP})),n.d(v,"NO_FIELDS_NEEDS_AS",(function(){return iP})),n.d(v,"customFormatTypeNotAllowed",(function(){return aP})),n.d(v,"encodingOverridden",(function(){return oP})),n.d(v,"projectionOverridden",(function(){return sP})),n.d(v,"REPLACE_ANGLE_WITH_THETA",(function(){return uP})),n.d(v,"primitiveChannelDef",(function(){return AP})),n.d(v,"invalidFieldType",(function(){return cP})),n.d(v,"invalidFieldTypeForCountAggregate",(function(){return lP})),n.d(v,"invalidAggregate",(function(){return fP})),n.d(v,"missingFieldType",(function(){return hP})),n.d(v,"droppingColor",(function(){return gP})),n.d(v,"emptyFieldDef",(function(){return dP})),n.d(v,"latLongDeprecated",(function(){return pP})),n.d(v,"LINE_WITH_VARYING_SIZE",(function(){return vP})),n.d(v,"incompatibleChannel",(function(){return yP})),n.d(v,"invalidEncodingChannel",(function(){return mP})),n.d(v,"facetChannelShouldBeDiscrete",(function(){return IP})),n.d(v,"facetChannelDropped",(function(){return bP})),n.d(v,"discreteChannelCannotEncode",(function(){return EP})),n.d(v,"lineWithRange",(function(){return CP})),n.d(v,"orientOverridden",(function(){return BP})),n.d(v,"CANNOT_UNION_CUSTOM_DOMAIN_WITH_FIELD_DOMAIN",(function(){return wP})),n.d(v,"RANGE_STEP_DEPRECATED",(function(){return QP})),n.d(v,"cannotUseScalePropertyWithNonColor",(function(){return kP})),n.d(v,"unaggregateDomainHasNoEffectForRawField",(function(){return _P})),n.d(v,"unaggregateDomainWithNonSharedDomainOp",(function(){return xP})),n.d(v,"unaggregatedDomainWithLogScale",(function(){return SP})),n.d(v,"cannotApplySizeToNonOrientedMark",(function(){return OP})),n.d(v,"scaleTypeNotWorkWithChannel",(function(){return DP})),n.d(v,"scaleTypeNotWorkWithFieldDef",(function(){return RP})),n.d(v,"scalePropertyNotWorkWithScaleType",(function(){return jP})),n.d(v,"scaleTypeNotWorkWithMark",(function(){return MP})),n.d(v,"stepDropped",(function(){return NP})),n.d(v,"mergeConflictingProperty",(function(){return FP})),n.d(v,"mergeConflictingDomainProperty",(function(){return TP})),n.d(v,"independentScaleMeansIndependentGuide",(function(){return LP})),n.d(v,"domainSortDropped",(function(){return PP})),n.d(v,"MORE_THAN_ONE_SORT",(function(){return UP})),n.d(v,"FACETED_INDEPENDENT_DIFFERENT_SOURCES",(function(){return GP})),n.d(v,"FACETED_INDEPENDENT_SAME_FIELDS_DIFFERENT_SOURCES",(function(){return qP})),n.d(v,"FACETED_INDEPENDENT_SAME_SOURCE",(function(){return HP})),n.d(v,"INVALID_CHANNEL_FOR_AXIS",(function(){return YP})),n.d(v,"cannotStackRangedMark",(function(){return JP})),n.d(v,"cannotStackNonLinearScale",(function(){return zP})),n.d(v,"stackNonSummativeAggregate",(function(){return KP})),n.d(v,"invalidTimeUnit",(function(){return WP})),n.d(v,"droppedDay",(function(){return VP})),n.d(v,"errorBarCenterAndExtentAreNotNeeded",(function(){return XP})),n.d(v,"errorBarCenterIsUsedWithWrongExtent",(function(){return ZP})),n.d(v,"errorBarContinuousAxisHasCustomizedAggregate",(function(){return $P})),n.d(v,"errorBarCenterIsNotNeeded",(function(){return eU})),n.d(v,"errorBand1DNotSupport",(function(){return tU})),n.d(v,"channelRequiredForBinned",(function(){return nU})),n.d(v,"domainRequiredForThresholdScale",(function(){return rU}));var y={};n.r(y),n.d(y,"compile",(function(){return IX})),n.d(y,"extractTransforms",(function(){return BX})),n.d(y,"normalize",(function(){return YY})),n.d(y,"version",(function(){return QX}));var m={};n.r(m),n.d(m,"dark",(function(){return SX})),n.d(m,"excel",(function(){return OX})),n.d(m,"fivethirtyeight",(function(){return DX})),n.d(m,"ggplot2",(function(){return RX})),n.d(m,"latimes",(function(){return NX})),n.d(m,"quartz",(function(){return FX})),n.d(m,"vox",(function(){return TX})),n.d(m,"urbaninstitute",(function(){return PX})),n.d(m,"googlecharts",(function(){return UX})),n.d(m,"version",(function(){return GX}));var I={};n.r(I),n.d(I,"mark",(function(){return r$})),n.d(I,"markArc",(function(){return i$})),n.d(I,"markArea",(function(){return a$})),n.d(I,"markBar",(function(){return o$})),n.d(I,"markBoxplot",(function(){return s$})),n.d(I,"markCircle",(function(){return u$})),n.d(I,"markErrorband",(function(){return A$})),n.d(I,"markErrorbar",(function(){return c$})),n.d(I,"markGeoshape",(function(){return l$})),n.d(I,"markImage",(function(){return f$})),n.d(I,"markLine",(function(){return h$})),n.d(I,"markPoint",(function(){return g$})),n.d(I,"markRect",(function(){return d$})),n.d(I,"markRule",(function(){return p$})),n.d(I,"markSquare",(function(){return v$})),n.d(I,"markText",(function(){return y$})),n.d(I,"markTick",(function(){return m$})),n.d(I,"markTrail",(function(){return I$})),n.d(I,"layer",(function(){return E$})),n.d(I,"concat",(function(){return B$})),n.d(I,"hconcat",(function(){return Q$})),n.d(I,"vconcat",(function(){return _$})),n.d(I,"register",(function(){return XZ})),n.d(I,"vega",(function(){return FZ})),n.d(I,"vegalite",(function(){return NZ})),n.d(I,"data",(function(){return D$})),n.d(I,"urlData",(function(){return j$})),n.d(I,"inlineData",(function(){return N$})),n.d(I,"sequence",(function(){return T$})),n.d(I,"sphere",(function(){return P$})),n.d(I,"graticule",(function(){return G$})),n.d(I,"csv",(function(){return H$})),n.d(I,"dsv",(function(){return J$})),n.d(I,"json",(function(){return K$})),n.d(I,"topojson",(function(){return V$})),n.d(I,"tsv",(function(){return Z$})),n.d(I,"csvFormat",(function(){return e0})),n.d(I,"dsvFormat",(function(){return n0})),n.d(I,"jsonFormat",(function(){return i0})),n.d(I,"topojsonFormat",(function(){return o0})),n.d(I,"tsvFormat",(function(){return u0})),n.d(I,"lookupData",(function(){return S$})),n.d(I,"angle",(function(){return c0})),n.d(I,"color",(function(){return f0})),n.d(I,"column",(function(){return g0})),n.d(I,"detail",(function(){return p0})),n.d(I,"facet",(function(){return y0})),n.d(I,"fill",(function(){return I0})),n.d(I,"fillOpacity",(function(){return E0})),n.d(I,"href",(function(){return B0})),n.d(I,"key",(function(){return Q0})),n.d(I,"latitude",(function(){return _0})),n.d(I,"latitude2",(function(){return S0})),n.d(I,"longitude",(function(){return D0})),n.d(I,"longitude2",(function(){return j0})),n.d(I,"opacity",(function(){return N0})),n.d(I,"order",(function(){return T0})),n.d(I,"radius",(function(){return P0})),n.d(I,"radius2",(function(){return G0})),n.d(I,"row",(function(){return H0})),n.d(I,"shape",(function(){return J0})),n.d(I,"size",(function(){return K0})),n.d(I,"stroke",(function(){return V0})),n.d(I,"strokeDash",(function(){return Z0})),n.d(I,"strokeOpacity",(function(){return e1})),n.d(I,"strokeWidth",(function(){return n1})),n.d(I,"text",(function(){return i1})),n.d(I,"theta",(function(){return o1})),n.d(I,"theta2",(function(){return u1})),n.d(I,"tooltip",(function(){return c1})),n.d(I,"url",(function(){return f1})),n.d(I,"x",(function(){return g1})),n.d(I,"x2",(function(){return p1})),n.d(I,"xError",(function(){return y1})),n.d(I,"xError2",(function(){return I1})),n.d(I,"y",(function(){return E1})),n.d(I,"y2",(function(){return B1})),n.d(I,"yError",(function(){return Q1})),n.d(I,"yError2",(function(){return _1})),n.d(I,"field",(function(){return S1})),n.d(I,"fieldN",(function(){return O1})),n.d(I,"fieldO",(function(){return D1})),n.d(I,"fieldQ",(function(){return R1})),n.d(I,"fieldT",(function(){return j1})),n.d(I,"encoding",(function(){return N1})),n.d(I,"repeat",(function(){return T1})),n.d(I,"value",(function(){return P1})),n.d(I,"projection",(function(){return G1})),n.d(I,"selectInterval",(function(){return H1})),n.d(I,"selectMulti",(function(){return J1})),n.d(I,"selectSingle",(function(){return K1})),n.d(I,"checkbox",(function(){return V1})),n.d(I,"menu",(function(){return Z1})),n.d(I,"radio",(function(){return e2})),n.d(I,"slider",(function(){return n2})),n.d(I,"not",(function(){return i2})),n.d(I,"and",(function(){return o2})),n.d(I,"or",(function(){return u2})),n.d(I,"aggregate",(function(){return c2})),n.d(I,"bin",(function(){return f2})),n.d(I,"calculate",(function(){return g2})),n.d(I,"density",(function(){return p2})),n.d(I,"filter",(function(){return y2})),n.d(I,"flatten",(function(){return I2})),n.d(I,"fold",(function(){return E2})),n.d(I,"impute",(function(){return B2})),n.d(I,"joinaggregate",(function(){return Q2})),n.d(I,"join",(function(){return _2})),n.d(I,"loess",(function(){return S2})),n.d(I,"lookup",(function(){return D2})),n.d(I,"pivot",(function(){return j2})),n.d(I,"quantile",(function(){return N2})),n.d(I,"regression",(function(){return T2})),n.d(I,"sample",(function(){return P2})),n.d(I,"stack",(function(){return G2})),n.d(I,"timeUnit",(function(){return H2})),n.d(I,"window",(function(){return J2})),n.d(I,"groupby",(function(){return K2})),n.d(I,"count",(function(){return V2})),n.d(I,"valid",(function(){return Z2})),n.d(I,"missing",(function(){return e3})),n.d(I,"distinct",(function(){return n3})),n.d(I,"sum",(function(){return i3})),n.d(I,"mean",(function(){return o3})),n.d(I,"product",(function(){return u3})),n.d(I,"average",(function(){return c3})),n.d(I,"variance",(function(){return f3})),n.d(I,"variancep",(function(){return g3})),n.d(I,"stdev",(function(){return p3})),n.d(I,"stdevp",(function(){return y3})),n.d(I,"stderr",(function(){return I3})),n.d(I,"median",(function(){return E3})),n.d(I,"q1",(function(){return B3})),n.d(I,"q3",(function(){return Q3})),n.d(I,"ci0",(function(){return _3})),n.d(I,"ci1",(function(){return S3})),n.d(I,"min",(function(){return D3})),n.d(I,"max",(function(){return j3})),n.d(I,"argmin",(function(){return N3})),n.d(I,"argmax",(function(){return T3})),n.d(I,"row_number",(function(){return P3})),n.d(I,"rank",(function(){return G3})),n.d(I,"dense_rank",(function(){return H3})),n.d(I,"percent_rank",(function(){return J3})),n.d(I,"cume_dist",(function(){return K3})),n.d(I,"ntile",(function(){return V3})),n.d(I,"lag",(function(){return Z3})),n.d(I,"lead",(function(){return e4})),n.d(I,"first_value",(function(){return n4})),n.d(I,"last_value",(function(){return i4})),n.d(I,"nth_value",(function(){return o4})),n.d(I,"year",(function(){return u4})),n.d(I,"quarter",(function(){return c4})),n.d(I,"month",(function(){return f4})),n.d(I,"day",(function(){return g4})),n.d(I,"date",(function(){return p4})),n.d(I,"hours",(function(){return y4})),n.d(I,"minutes",(function(){return I4})),n.d(I,"seconds",(function(){return E4})),n.d(I,"milliseconds",(function(){return B4})),n.d(I,"yearmonth",(function(){return Q4})),n.d(I,"timeYQ",(function(){return _4})),n.d(I,"timeYQM",(function(){return S4})),n.d(I,"timeYM",(function(){return D4})),n.d(I,"timeYMD",(function(){return j4})),n.d(I,"timeYMDH",(function(){return N4})),n.d(I,"timeYMDHM",(function(){return T4})),n.d(I,"timeYMDHMS",(function(){return P4})),n.d(I,"timeQM",(function(){return G4})),n.d(I,"timeMD",(function(){return H4})),n.d(I,"timeMDH",(function(){return J4})),n.d(I,"timeHM",(function(){return K4})),n.d(I,"timeHMS",(function(){return V4})),n.d(I,"timeMS",(function(){return Z4})),n.d(I,"timeSMS",(function(){return e5})),n.d(I,"utcyear",(function(){return n5})),n.d(I,"utcquarter",(function(){return i5})),n.d(I,"utcmonth",(function(){return o5})),n.d(I,"utcday",(function(){return u5})),n.d(I,"utcdate",(function(){return c5})),n.d(I,"utchours",(function(){return f5})),n.d(I,"utcminutes",(function(){return g5})),n.d(I,"utcseconds",(function(){return p5})),n.d(I,"utcmilliseconds",(function(){return y5})),n.d(I,"utcyearmonth",(function(){return I5})),n.d(I,"utcYQ",(function(){return E5})),n.d(I,"utcYQM",(function(){return B5})),n.d(I,"utcYM",(function(){return Q5})),n.d(I,"utcYMD",(function(){return _5})),n.d(I,"utcYMDH",(function(){return S5})),n.d(I,"utcYMDHM",(function(){return D5})),n.d(I,"utcYMDHMS",(function(){return j5})),n.d(I,"utcQM",(function(){return N5})),n.d(I,"utcMD",(function(){return T5})),n.d(I,"utcMDH",(function(){return P5})),n.d(I,"utcHM",(function(){return G5})),n.d(I,"utcHMS",(function(){return H5})),n.d(I,"utcMS",(function(){return J5})),n.d(I,"utcSMS",(function(){return K5}));var b=n(47),E=n(0),C=n.n(E),B=n(332),w=n.n(B),Q=n(20),k=n(1071),_=n(11),x=n(13),S="vg-tooltip-element",O={offsetX:10,offsetY:10,id:S,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:function(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;")},maxDepth:2};var D=n(19),R=n(5),j=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function M(e,t){return JSON.stringify(e,function(e){var t=[];return function(n,r){if("object"!==typeof r||null===r)return r;var i=t.indexOf(this)+1;return t.length=i,t.length>e?"[Object]":t.indexOf(r)>=0?"[Circular]":(t.push(r),r)}}(t))}var N=function(){function e(t){Object(_.a)(this,e),this.options=Object.assign(Object.assign({},O),t);var n=this.options.id;if(this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){var r=document.createElement("style");r.setAttribute("id",this.options.styleId),r.innerHTML=function(e){if(!/^[A-Za-z]+[-:.\w]*$/.test(e))throw new Error("Invalid HTML ID");return"#vg-tooltip-element {\n  visibility: hidden;\n  padding: 8px;\n  position: fixed;\n  z-index: 1000;\n  font-family: sans-serif;\n  font-size: 11px;\n  border-radius: 3px;\n  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n  /* The default theme is the light theme. */\n  background-color: rgba(255, 255, 255, 0.95);\n  border: 1px solid #d9d9d9;\n  color: black; }\n  #vg-tooltip-element.visible {\n    visibility: visible; }\n  #vg-tooltip-element h2 {\n    margin-top: 0;\n    margin-bottom: 10px;\n    font-size: 13px; }\n  #vg-tooltip-element img {\n    max-width: 200px;\n    max-height: 200px; }\n  #vg-tooltip-element table {\n    border-spacing: 0; }\n    #vg-tooltip-element table tr {\n      border: none; }\n      #vg-tooltip-element table tr td {\n        overflow: hidden;\n        text-overflow: ellipsis;\n        padding-top: 2px;\n        padding-bottom: 2px; }\n        #vg-tooltip-element table tr td.key {\n          color: #808080;\n          max-width: 150px;\n          text-align: right;\n          padding-right: 4px; }\n        #vg-tooltip-element table tr td.value {\n          display: block;\n          max-width: 300px;\n          max-height: 7em;\n          text-align: left; }\n  #vg-tooltip-element.dark-theme {\n    background-color: rgba(32, 32, 32, 0.9);\n    border: 1px solid #f5f5f5;\n    color: white; }\n    #vg-tooltip-element.dark-theme td.key {\n      color: #bfbfbf; }\n".toString().replace(S,e)}(n);var i=document.head;i.childNodes.length>0?i.insertBefore(r,i.childNodes[0]):i.appendChild(r)}this.el=document.getElementById(n),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",n),this.el.classList.add("vg-tooltip"),document.body.appendChild(this.el))}return Object(x.a)(e,[{key:"tooltipHandler",value:function(e,t,n,r){if(null!=r&&""!==r){this.el.innerHTML=function(e,t,n){if(Object(R.A)(e))return"[".concat(e.map((function(e){return t(Object(R.H)(e)?e:M(e,n))})).join(", "),"]");if(Object(R.F)(e)){var r="",i=e,a=i.title,o=i.image,s=j(i,["title","image"]);a&&(r+="<h2>".concat(t(a),"</h2>")),o&&(r+='<img src="'.concat(t(o),'">'));var u=Object.keys(s);if(u.length>0){r+="<table>";var A,c=Object(D.a)(u);try{for(c.s();!(A=c.n()).done;){var l=A.value,f=s[l];void 0!==f&&(Object(R.F)(f)&&(f=M(f,n)),r+='<tr><td class="key">'.concat(t(l),':</td><td class="value">').concat(t(f),"</td></tr>"))}}catch(h){c.e(h)}finally{c.f()}r+="</table>"}return r||"{}"}return t(e)}(r,this.options.sanitize,this.options.maxDepth),this.el.classList.add("visible","".concat(this.options.theme,"-theme"));var i=function(e,t,n,r){var i=e.clientX+n;i+t.width>window.innerWidth&&(i=+e.clientX-n-t.width);var a=e.clientY+r;return a+t.height>window.innerHeight&&(a=+e.clientY-r-t.height),{x:i,y:a}}(t,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY),a=i.x,o=i.y;this.el.setAttribute("style","top: ".concat(o,"px; left: ").concat(a,"px"))}else this.el.classList.remove("visible","".concat(this.options.theme,"-theme"))}}]),e}(),F=(k.version,n(8)),T=n(14),L=n(15),P=n(28),U=n.n(P),G={};function q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:G,n=Object.keys(e),r=Object.keys(t);return e===t||n.length===r.length&&n.every((function(n){return e[n]===t[n]}))}var H=n(9),Y=n.n(H);function J(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))}var z=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),K=Object.prototype.hasOwnProperty;function W(e,t){return K.call(e,t)}function V(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);t=[];for(var r in e)W(e,r)&&t.push(r);return t}function X(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function Z(e){for(var t,n=0,r=e.length;n<r;){if(!((t=e.charCodeAt(n))>=48&&t<=57))return!1;n++}return!0}function $(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function ee(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function te(e,t){var n=[e];for(var r in t){var i="object"===typeof t[r]?JSON.stringify(t[r],null,2):t[r];"undefined"!==typeof i&&n.push(r+": "+i)}return n.join("\n")}var ne=function(e){function t(t,n,r,i,a){var o=this.constructor,s=e.call(this,te(t,{name:n,index:r,operation:i,tree:a}))||this;return s.name=n,s.index=r,s.operation=i,s.tree=a,Object.setPrototypeOf(s,o.prototype),s.message=te(t,{name:n,index:r,operation:i,tree:a}),s}return z(t,e),t}(Error),re=ne,ie=X,ae={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=se(n,this.path);r&&(r=X(r));var i=ue(n,{op:"remove",path:this.from}).removed;return ue(n,{op:"add",path:this.path,value:i}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=se(n,this.from);return ue(n,{op:"add",path:this.path,value:X(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:he(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},oe={add:function(e,t,n){return Z(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){return{newDocument:n,removed:e.splice(t,1)[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:ae.move,copy:ae.copy,test:ae.test,_get:ae._get};function se(e,t){if(""==t)return e;var n={op:"_get",path:t};return ue(e,n),n.value}function ue(e,t,n,r,i,a){if(void 0===n&&(n=!1),void 0===r&&(r=!0),void 0===i&&(i=!0),void 0===a&&(a=0),n&&("function"==typeof n?n(t,0,e,t.path):le(t,0)),""===t.path){var o={newDocument:e};if("add"===t.op)return o.newDocument=t.value,o;if("replace"===t.op)return o.newDocument=t.value,o.removed=e,o;if("move"===t.op||"copy"===t.op)return o.newDocument=se(e,t.from),"move"===t.op&&(o.removed=e),o;if("test"===t.op){if(o.test=he(e,t.value),!1===o.test)throw new re("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o.newDocument=e,o}if("remove"===t.op)return o.removed=e,o.newDocument=null,o;if("_get"===t.op)return t.value=e,o;if(n)throw new re("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,t,e);return o}r||(e=X(e));var s=(t.path||"").split("/"),u=e,A=1,c=s.length,l=void 0,f=void 0,h=void 0;for(h="function"==typeof n?n:le;;){if(f=s[A],i&&"__proto__"==f)throw new TypeError("JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&void 0===l&&(void 0===u[f]?l=s.slice(0,A).join("/"):A==c-1&&(l=t.path),void 0!==l&&h(t,0,e,l)),A++,Array.isArray(u)){if("-"===f)f=u.length;else{if(n&&!Z(f))throw new re("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);Z(f)&&(f=~~f)}if(A>=c){if(n&&"add"===t.op&&f>u.length)throw new re("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);if(!1===(o=oe[t.op].call(t,u,f,e)).test)throw new re("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o}}else if(f&&-1!=f.indexOf("~")&&(f=ee(f)),A>=c){if(!1===(o=ae[t.op].call(t,u,f,e)).test)throw new re("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o}u=u[f]}}function Ae(e,t,n,r,i){if(void 0===r&&(r=!0),void 0===i&&(i=!0),n&&!Array.isArray(t))throw new re("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=X(e));for(var a=new Array(t.length),o=0,s=t.length;o<s;o++)a[o]=ue(e,t[o],n,!0,i,o),e=a[o].newDocument;return a.newDocument=e,a}function ce(e,t,n){var r=ue(e,t);if(!1===r.test)throw new re("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function le(e,t,n,r){if("object"!==typeof e||null===e||Array.isArray(e))throw new re("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(!ae[e.op])throw new re("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n);if("string"!==typeof e.path)throw new re("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(0!==e.path.indexOf("/")&&e.path.length>0)throw new re('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if(("move"===e.op||"copy"===e.op)&&"string"!==typeof e.from)throw new re("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new re("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&function e(t){if(void 0===t)return!0;if(t)if(Array.isArray(t)){for(var n=0,r=t.length;n<r;n++)if(e(t[n]))return!0}else if("object"===typeof t){var i=V(t),a=i.length;for(n=0;n<a;n++)if(e(t[i[n]]))return!0}return!1}(e.value))throw new re("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n)if("add"==e.op){var i=e.path.split("/").length,a=r.split("/").length;if(i!==a+1&&i!==a)throw new re("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==r)throw new re("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if("move"===e.op||"copy"===e.op){var o=fe([{op:"_get",path:e.from,value:void 0}],n);if(o&&"OPERATION_PATH_UNRESOLVABLE"===o.name)throw new re("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}function fe(e,t,n){try{if(!Array.isArray(e))throw new re("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Ae(X(t),X(e),n||!0);else{n=n||le;for(var r=0;r<e.length;r++)n(e[r],r,t,void 0)}}catch(i){if(i instanceof re)return i;throw i}}function he(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var n,r,i,a=Array.isArray(e),o=Array.isArray(t);if(a&&o){if((r=e.length)!=t.length)return!1;for(n=r;0!==n--;)if(!he(e[n],t[n]))return!1;return!0}if(a!=o)return!1;var s=Object.keys(e);if((r=s.length)!==Object.keys(t).length)return!1;for(n=r;0!==n--;)if(!t.hasOwnProperty(s[n]))return!1;for(n=r;0!==n--;)if(!he(e[i=s[n]],t[i]))return!1;return!0}return e!==e&&t!==t}var ge=new WeakMap,de=function(e){this.observers=new Map,this.obj=e},pe=function(e,t){this.callback=e,this.observer=t};function ve(e,t){t.unobserve()}function ye(e,t){var n,r=function(e){return ge.get(e)}(e);if(r){var i=function(e,t){return e.observers.get(t)}(r,t);n=i&&i.observer}else r=new de(e),ge.set(e,r);if(n)return n;if(n={},r.value=X(e),t){n.callback=t,n.next=null;var a=function(){me(n)},o=function(){clearTimeout(n.next),n.next=setTimeout(a)};"undefined"!==typeof window&&(window.addEventListener("mouseup",o),window.addEventListener("keyup",o),window.addEventListener("mousedown",o),window.addEventListener("keydown",o),window.addEventListener("change",o))}return n.patches=[],n.object=e,n.unobserve=function(){me(n),clearTimeout(n.next),function(e,t){e.observers.delete(t.callback)}(r,n),"undefined"!==typeof window&&(window.removeEventListener("mouseup",o),window.removeEventListener("keyup",o),window.removeEventListener("mousedown",o),window.removeEventListener("keydown",o),window.removeEventListener("change",o))},r.observers.set(t,new pe(t,n)),n}function me(e,t){void 0===t&&(t=!1);var n=ge.get(e.object);Ie(n.value,e.object,e.patches,"",t),e.patches.length&&Ae(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function Ie(e,t,n,r,i){if(t!==e){"function"===typeof t.toJSON&&(t=t.toJSON());for(var a=V(t),o=V(e),s=!1,u=o.length-1;u>=0;u--){var A=e[l=o[u]];if(!W(t,l)||void 0===t[l]&&void 0!==A&&!1===Array.isArray(t))Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:"test",path:r+"/"+$(l),value:X(A)}),n.push({op:"remove",path:r+"/"+$(l)}),s=!0):(i&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}),!0);else{var c=t[l];"object"==typeof A&&null!=A&&"object"==typeof c&&null!=c?Ie(A,c,n,r+"/"+$(l),i):A!==c&&(!0,i&&n.push({op:"test",path:r+"/"+$(l),value:X(A)}),n.push({op:"replace",path:r+"/"+$(l),value:X(c)}))}}if(s||a.length!=o.length)for(u=0;u<a.length;u++){var l;W(e,l=a[u])||void 0===t[l]||n.push({op:"add",path:r+"/"+$(l),value:X(t[l])})}}}function be(e,t,n){void 0===n&&(n=!1);var r=[];return Ie(e,t,r,"",n),r}Object.assign({},r,i,{JsonPatchError:ne,deepClone:X,escapePathComponent:$,unescapePathComponent:ee});var Ee=n(808),Ce=n.n(Ee),Be=n(905);function we(e){var t=e||R.x,n=[],r={};return n.add=function(e){var i=t(e);return r[i]||(r[i]=1,n.push(e)),n},n.remove=function(e){var i,a=t(e);return r[a]&&(r[a]=0,(i=n.indexOf(e))>=0&&n.splice(i,1)),n},n}var Qe=n(60),ke=function(e,t){return _e.apply(this,arguments)};function _e(){return(_e=Object(Qe.a)(Y.a.mark((function e(t,n){return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n(t);case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),t.error(e.t0);case 8:case"end":return e.stop()}}),e,null,[[0,5]])})))).apply(this,arguments)}var xe=Symbol("vega_id"),Se=1;function Oe(e){return!(!e||!De(e))}function De(e){return e[xe]}function Re(e,t){return e[xe]=t,e}function je(e){var t=e===Object(e)?e:{data:e};return De(t)?t:Re(t,Se++)}function Me(e){return Ne(e,je({}))}function Ne(e,t){for(var n in e)t[n]=e[n];return t}function Fe(e,t){return Re(t,De(e))}function Te(e,t){return e?t?function(n,r){return e(n,r)||De(t(n))-De(t(r))}:function(t,n){return e(t,n)||De(t)-De(n)}:null}function Le(e){return e&&e.constructor===Pe}function Pe(){var e=[],t=[],n=[],r=[],i=[],a=null,o=!1;return{constructor:Pe,insert:function(t){for(var n=Object(R.i)(t),r=0,i=n.length;r<i;++r)e.push(n[r]);return this},remove:function(e){for(var n=Object(R.D)(e)?r:t,i=Object(R.i)(e),a=0,o=i.length;a<o;++a)n.push(i[a]);return this},modify:function(e,t,r){var a={field:t,value:Object(R.l)(r)};return Object(R.D)(e)?(a.filter=e,i.push(a)):(a.tuple=e,n.push(a)),this},encode:function(e,t){return Object(R.D)(e)?i.push({filter:e,field:t}):n.push({tuple:e,field:t}),this},clean:function(e){return a=e,this},reflow:function(){return o=!0,this},pulse:function(s,u){var A,c,l,f,h,g,d={},p={};for(A=0,c=u.length;A<c;++A)d[De(u[A])]=1;for(A=0,c=t.length;A<c;++A)d[De(h=t[A])]=-1;for(A=0,c=r.length;A<c;++A)f=r[A],u.forEach((function(e){f(e)&&(d[De(e)]=-1)}));for(A=0,c=e.length;A<c;++A)g=De(h=e[A]),d[g]?d[g]=1:s.add.push(je(e[A]));for(A=0,c=u.length;A<c;++A)h=u[A],d[De(h)]<0&&s.rem.push(h);function v(e,t,n){n?e[t]=n(e):s.encode=t,o||(p[De(e)]=e)}for(A=0,c=n.length;A<c;++A)h=(l=n[A]).tuple,f=l.field,(g=d[De(h)])>0&&(v(h,f,l.value),s.modifies(f));for(A=0,c=i.length;A<c;++A)l=i[A],f=l.filter,u.forEach((function(e){f(e)&&d[De(e)]>0&&v(e,l.field,l.value)})),s.modifies(l.field);if(o)s.mod=t.length||r.length?u.filter((function(e){return d[De(e)]>0})):u.slice();else for(g in p)s.mod.push(p[g]);return(a||null==a&&(t.length||r.length))&&s.clean(!0),s}}}var Ue="_:mod:_";function Ge(){Object.defineProperty(this,Ue,{writable:!0,value:{}})}var qe=Ge.prototype;qe.set=function(e,t,n,r){var i=this,a=i[e],o=i[Ue];return null!=t&&t>=0?(a[t]!==n||r)&&(a[t]=n,o[t+":"+e]=-1,o[e]=-1):(a!==n||r)&&(i[e]=n,o[e]=Object(R.A)(n)?1+n.length:-1),i},qe.modified=function(e,t){var n,r=this[Ue];if(!arguments.length){for(n in r)if(r[n])return!0;return!1}if(Object(R.A)(e)){for(n=0;n<e.length;++n)if(r[e[n]])return!0;return!1}return null!=t&&t>=0?t+1<r[e]||!!r[t+":"+e]:!!r[e]},qe.clear=function(){return this[Ue]={},this};var He=0,Ye=new Ge;function Je(e,t,n,r){this.id=++He,this.value=e,this.stamp=-1,this.rank=-1,this.qrank=-1,this.flags=0,t&&(this._update=t),n&&this.parameters(n,r)}var ze=Je.prototype;function Ke(e){return function(t){var n=this.flags;return 0===arguments.length?!!(n&e):(this.flags=t?n|e:n&~e,this)}}ze.targets=function(){return this._targets||(this._targets=we(R.w))},ze.set=function(e){return this.value!==e?(this.value=e,1):0},ze.skip=Ke(1),ze.modified=Ke(2),ze.parameters=function(e,t,n){t=!1!==t;var r,i,a,o,s=this,u=s._argval=s._argval||new Ge,A=s._argops=s._argops||[],c=[];function l(e,n,r){r instanceof Je?(r!==s&&(t&&r.targets().add(s),c.push(r)),A.push({op:r,name:e,index:n})):u.set(e,n,r)}for(r in e)if(i=e[r],"pulse"===r)Object(R.i)(i).forEach((function(e){e instanceof Je?e!==s&&(e.targets().add(s),c.push(e)):Object(R.n)("Pulse parameters must be operator instances.")})),s.source=i;else if(Object(R.A)(i))for(u.set(r,-1,Array(a=i.length)),o=0;o<a;++o)l(r,o,i[o]);else l(r,-1,i);return this.marshall().clear(),n&&(A.initonly=!0),c},ze.marshall=function(e){var t,n,r,i,a,o=this._argval||Ye,s=this._argops;if(s){for(n=0,r=s.length;n<r;++n)a=(i=(t=s[n]).op).modified()&&i.stamp===e,o.set(t.name,t.index,i.value,a);if(s.initonly){for(n=0;n<r;++n)(t=s[n]).op.targets().remove(this);this._argops=null,this._update=null}}return o},ze.detach=function(){var e,t,n,r=this._argops;if(r)for(e=0,t=r.length;e<t;++e)(n=r[e].op)._targets&&n._targets.remove(this)},ze.evaluate=function(e){var t=this._update;if(t){var n=this.marshall(e.stamp),r=t.call(this,n,e);if(n.clear(),r!==this.value)this.value=r;else if(!this.modified())return e.StopPropagation}},ze.run=function(e){return e.stamp<this.stamp?e.StopPropagation:(this.skip()?(this.skip(!1),t=0):t=this.evaluate(e),this.pulse=t||e);var t};var We=0;function Ve(e,t,n){this.id=++We,this.value=null,n&&(this.receive=n),e&&(this._filter=e),t&&(this._apply=t)}function Xe(e,t,n){return new Ve(e,t,n)}var Ze=Ve.prototype;Ze._filter=R.gb,Ze._apply=R.x,Ze.targets=function(){return this._targets||(this._targets=we(R.w))},Ze.consume=function(e){return arguments.length?(this._consume=!!e,this):!!this._consume},Ze.receive=function(e){if(this._filter(e)){for(var t=this.value=this._apply(e),n=this._targets,r=n?n.length:0,i=0;i<r;++i)n[i].receive(t);this._consume&&(e.preventDefault(),e.stopPropagation())}},Ze.filter=function(e){var t=Xe(e);return this.targets().add(t),t},Ze.apply=function(e){var t=Xe(null,e);return this.targets().add(t),t},Ze.merge=function(){var e=Xe();this.targets().add(e);for(var t=0,n=arguments.length;t<n;++t)arguments[t].targets().add(e);return e},Ze.throttle=function(e){var t=-1;return this.filter((function(){var n=Date.now();return n-t>e?(t=n,1):0}))},Ze.debounce=function(e){var t=Xe();return this.targets().add(Xe(null,null,Object(R.m)(e,(function(e){var n=e.dataflow;t.receive(e),n&&n.run&&n.run()})))),t},Ze.between=function(e,t){var n=!1;return e.targets().add(Xe(null,null,(function(){n=!0}))),t.targets().add(Xe(null,null,(function(){n=!1}))),this.filter((function(){return n}))};var $e=/^([A-Za-z]+:)?\/\//,et=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,tt=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g;function nt(e,t){return rt.apply(this,arguments)}function rt(){return(rt=Object(Qe.a)(Y.a.mark((function e(t,n){var r,i;return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sanitize(t,n);case 2:return r=e.sent,i=r.href,e.abrupt("return",r.localFile?this.file(i):this.http(i,n));case 5:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function it(e,t){return at.apply(this,arguments)}function at(){return(at=Object(Qe.a)(Y.a.mark((function e(t,n){var r,i,a,o,s,u,A;return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(R.o)({},this.options,n),r=this.fileAccess,i={href:null},u=et.test(t.replace(tt,"")),null!=t&&"string"===typeof t&&u||Object(R.n)("Sanitize failure, invalid URI: "+Object(R.Z)(t)),A=$e.test(t),(s=n.baseURL)&&!A&&(t.startsWith("/")||"/"===s[s.length-1]||(t="/"+t),t=s+t),o=(a=t.startsWith("file://"))||"file"===n.mode||"http"!==n.mode&&!A&&r,a?t=t.slice("file://".length):t.startsWith("//")&&("file"===n.defaultProtocol?(t=t.slice(2),o=!0):t=(n.defaultProtocol||"http")+":"+t),Object.defineProperty(i,"localFile",{value:!!o}),i.href=t,n.target&&(i.target=n.target+""),n.rel&&(i.rel=n.rel+""),"image"===n.context&&n.crossOrigin&&(i.crossOrigin=n.crossOrigin+""),e.abrupt("return",i);case 14:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function ot(e){return e?function(t){return new Promise((function(n,r){e.readFile(t,(function(e,t){e?r(e):n(t)}))}))}:st}function st(){return ut.apply(this,arguments)}function ut(){return(ut=Object(Qe.a)(Y.a.mark((function e(){return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(R.n)("No file system access.");case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function At(e){return e?function(){var t=Object(Qe.a)(Y.a.mark((function t(n,r){var i,a,o;return Y.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=Object(R.o)({},this.options.http,r),a=r&&r.response,t.next=4,e(n,i);case 4:return o=t.sent,t.abrupt("return",o.ok?Object(R.D)(o[a])?o[a]():o.text():Object(R.n)(o.status+""+o.statusText));case 6:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}():ct}function ct(){return lt.apply(this,arguments)}function lt(){return(lt=Object(Qe.a)(Y.a.mark((function e(){return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Object(R.n)("No HTTP fetch method available.");case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ft={boolean:R.ab,integer:R.cb,number:R.cb,date:R.bb,string:R.eb,unknown:R.x},ht=[function(e){return"true"===e||"false"===e||!0===e||!1===e},function(e){return vt(e)&&Number.isInteger(+e)},vt,function(e){return!Number.isNaN(Date.parse(e))}],gt=["boolean","integer","number","date"];function dt(e,t){if(!e||!e.length)return"unknown";for(var n,r,i,a=e.length,o=ht.length,s=ht.map((function(e,t){return t+1})),u=0,A=0;u<a;++u)for(r=t?e[u][t]:e[u],n=0;n<o;++n)if(s[n]&&(null!=(i=r)&&i===i)&&!ht[n](r)&&(s[n]=0,++A===ht.length))return"string";return gt[s.reduce((function(e,t){return 0===e?t:e}),0)-1]}function pt(e,t){return t.reduce((function(t,n){return t[n]=dt(e,n),t}),{})}function vt(e){return!Number.isNaN(+e)&&!(e instanceof Date)}var yt=n(1308);function mt(e){var t=function(t,n){var r={delimiter:e};return It(t,n?Object(R.o)(n,r):r)};return t.responseType="text",t}function It(e,t){return t.header&&(e=t.header.map(R.Z).join(t.delimiter)+"\n"+e),Object(yt.a)(t.delimiter).parse(e+"")}It.responseType="text";var bt=n(807),Et=function(e){return e},Ct=function(e){if(null==e)return Et;var t,n,r=e.scale[0],i=e.scale[1],a=e.translate[0],o=e.translate[1];return function(e,s){s||(t=n=0);var u=2,A=e.length,c=new Array(A);for(c[0]=(t+=e[0])*r+a,c[1]=(n+=e[1])*i+o;u<A;)c[u]=e[u],++u;return c}},Bt=function(e,t){return"string"===typeof t&&(t=e.objects[t]),"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return wt(e,t)}))}:wt(e,t)};function wt(e,t){var n=t.id,r=t.bbox,i=null==t.properties?{}:t.properties,a=Qt(e,t);return null==n&&null==r?{type:"Feature",properties:i,geometry:a}:null==r?{type:"Feature",id:n,properties:i,geometry:a}:{type:"Feature",id:n,bbox:r,properties:i,geometry:a}}function Qt(e,t){var n=Ct(e.transform),r=e.arcs;function i(e,t){t.length&&t.pop();for(var i=r[e<0?~e:e],a=0,o=i.length;a<o;++a)t.push(n(i[a],a));e<0&&function(e,t){for(var n,r=e.length,i=r-t;i<--r;)n=e[i],e[i++]=e[r],e[r]=n}(t,o)}function a(e){return n(e)}function o(e){for(var t=[],n=0,r=e.length;n<r;++n)i(e[n],t);return t.length<2&&t.push(t[0]),t}function s(e){for(var t=o(e);t.length<4;)t.push(t[0]);return t}function u(e){return e.map(s)}return function e(t){var n,r=t.type;switch(r){case"GeometryCollection":return{type:r,geometries:t.geometries.map(e)};case"Point":n=a(t.coordinates);break;case"MultiPoint":n=t.coordinates.map(a);break;case"LineString":n=o(t.arcs);break;case"MultiLineString":n=t.arcs.map(o);break;case"Polygon":n=u(t.arcs);break;case"MultiPolygon":n=t.arcs.map(u);break;default:return null}return{type:r,coordinates:n}}(t)}var kt=function(e,t){var n={},r={},i={},a=[],o=-1;function s(e,t){for(var r in e){var i=e[r];delete t[i.start],delete i.start,delete i.end,i.forEach((function(e){n[e<0?~e:e]=1})),a.push(i)}}return t.forEach((function(n,r){var i,a=e.arcs[n<0?~n:n];a.length<3&&!a[1][0]&&!a[1][1]&&(i=t[++o],t[o]=n,t[r]=i)})),t.forEach((function(t){var n,a,o=function(t){var n,r=e.arcs[t<0?~t:t],i=r[0];e.transform?(n=[0,0],r.forEach((function(e){n[0]+=e[0],n[1]+=e[1]}))):n=r[r.length-1];return t<0?[n,i]:[i,n]}(t),s=o[0],u=o[1];if(n=i[s])if(delete i[n.end],n.push(t),n.end=u,a=r[u]){delete r[a.start];var A=a===n?n:n.concat(a);r[A.start=n.start]=i[A.end=a.end]=A}else r[n.start]=i[n.end]=n;else if(n=r[u])if(delete r[n.start],n.unshift(t),n.start=s,a=i[s]){delete i[a.end];var c=a===n?n:a.concat(n);r[c.start=a.start]=i[c.end=n.end]=c}else r[n.start]=i[n.end]=n;else r[(n=[t]).start=s]=i[n.end=u]=n})),s(i,r),s(r,i),t.forEach((function(e){n[e<0?~e:e]||a.push([e])})),a},_t=function(e){return Qt(e,xt.apply(this,arguments))};function xt(e,t,n){var r,i,a;if(arguments.length>1)r=St(e,t,n);else for(i=0,r=new Array(a=e.arcs.length);i<a;++i)r[i]=i;return{type:"MultiLineString",arcs:kt(e,r)}}function St(e,t,n){var r,i=[],a=[];function o(e){var t=e<0?~e:e;(a[t]||(a[t]=[])).push({i:e,g:r})}function s(e){e.forEach(o)}function u(e){e.forEach(s)}return function e(t){switch(r=t,t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"LineString":s(t.arcs);break;case"MultiLineString":case"Polygon":u(t.arcs);break;case"MultiPolygon":!function(e){e.forEach(u)}(t.arcs)}}(t),a.forEach(null==n?function(e){i.push(e[0].i)}:function(e){n(e[0].g,e[e.length-1].g)&&i.push(e[0].i)}),i}var Ot={interior:function(e,t){return e!==t},exterior:function(e,t){return e===t}};function Dt(e,t){var n,r,i,a;return e=Object(bt.a)(e,t),t&&t.feature?(n=Bt,i=t.feature):t&&t.mesh?(n=_t,i=t.mesh,a=Ot[t.filter]):Object(R.n)("Missing TopoJSON feature or mesh parameter."),(r=(r=e.objects[i])?n(e,r,a):Object(R.n)("Invalid TopoJSON object: "+i))&&r.features||[r]}Dt.responseType="json";var Rt={dsv:It,csv:mt(","),tsv:mt("\t"),json:bt.a,topojson:Dt};function jt(e,t){return arguments.length>1?(Rt[e]=t,this):Object(R.v)(Rt,e)?Rt[e]:null}function Mt(e){var t=jt(e);return t&&t.responseType||"text"}var Nt=function(e){var t={};return function(n){return t[n]||(t[n]=e(n))}},Ft=Math.sqrt(50),Tt=Math.sqrt(10),Lt=Math.sqrt(2);var Pt=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ut(e){if(!(t=Pt.exec(e)))throw new Error("invalid format: "+e);var t;return new Gt({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Gt(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}Ut.prototype=Gt.prototype,Gt.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var qt,Ht,Yt,Jt,zt,Kt,Wt=function(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]},Vt=function(e){return(e=Wt(Math.abs(e)))?e[1]:NaN},Xt=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Vt(t)/3)))-Vt(Math.abs(e)))},Zt=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Vt(t)-Vt(e))+1},$t=function(e){return Math.max(0,-Vt(Math.abs(e)))},en=function(e,t){var n=Wt(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},tn={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return en(100*e,t)},r:en,s:function(e,t){var n=Wt(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(qt=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Wt(e,Math.max(0,t+a-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}},nn=function(e){return e},rn=Array.prototype.map,an=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"],on=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?nn:(t=rn.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,a=[],o=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),a.push(e.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",a=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?nn:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(rn.call(e.numerals,String)),u=void 0===e.percent?"%":e.percent+"",A=void 0===e.minus?"-":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function l(e){var t=(e=Ut(e)).fill,n=e.align,l=e.sign,f=e.symbol,h=e.zero,g=e.width,d=e.comma,p=e.precision,v=e.trim,y=e.type;"n"===y?(d=!0,y="g"):tn[y]||(void 0===p&&(p=12),v=!0,y="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var m="$"===f?i:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",I="$"===f?a:/[%p]/.test(y)?u:"",b=tn[y],E=/[defgprs%]/.test(y);function C(e){var i,a,u,f=m,C=I;if("c"===y)C=b(e)+C,e="";else{var B=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:b(Math.abs(e),p),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),B&&0===+e&&"+"!==l&&(B=!1),f=(B?"("===l?l:A:"-"===l||"("===l?"":l)+f,C=("s"===y?an[8+qt/3]:"")+C+(B&&"("===l?")":""),E)for(i=-1,a=e.length;++i<a;)if(48>(u=e.charCodeAt(i))||u>57){C=(46===u?o+e.slice(i+1):e.slice(i))+C,e=e.slice(0,i);break}}d&&!h&&(e=r(e,1/0));var w=f.length+e.length+C.length,Q=w<g?new Array(g-w+1).join(t):"";switch(d&&h&&(e=r(Q+e,Q.length?g-C.length:1/0),Q=""),n){case"<":e=f+e+C+Q;break;case"=":e=f+Q+e+C;break;case"^":e=Q.slice(0,w=Q.length>>1)+f+e+C+Q.slice(w);break;default:e=Q+f+e+C}return s(e)}return p=void 0===p?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p)),C.toString=function(){return e+""},C}return{format:l,formatPrefix:function(e,t){var n=l(((e=Ut(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Vt(t)/3))),i=Math.pow(10,-r),a=an[8+r/3];return function(e){return n(i*e)+a}}}};function sn(e){var t=Nt(e.format),n=e.formatPrefix;return{format:t,formatPrefix:n,formatFloat:function(e){var n=Ut(e||",");if(null==n.precision){switch(n.precision=12,n.type){case"%":n.precision-=2;break;case"e":n.precision-=1}return function(e,t){return function(n){var r,i,a=e(n),o=a.indexOf(t);if(o<0)return a;for(i=(r=function(e,t){var n,r=e.lastIndexOf("e");if(r>0)return r;for(r=e.length;--r>t;)if((n=e.charCodeAt(r))>=48&&n<=57)return r+1}(a,o))<a.length?a.slice(r):"";--r>o;)if("0"!==a[r]){++r;break}return a.slice(0,r)+i}}(t(n),t(".1f")(1)[1])}return t(n)},formatSpan:function(e,r,i,a){a=Ut(null==a?",f":a);var o,s=function(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=Ft?i*=10:a>=Tt?i*=5:a>=Lt&&(i*=2),t<e?-i:i}(e,r,i),u=Math.max(Math.abs(e),Math.abs(r));if(null==a.precision)switch(a.type){case"s":return isNaN(o=Xt(s,u))||(a.precision=o),n(a,u);case"":case"e":case"g":case"p":case"r":isNaN(o=Zt(s,u))||(a.precision=o-("e"===a.type));break;case"f":case"%":isNaN(o=$t(s))||(a.precision=o-2*("%"===a.type))}return t(a)}}}function un(){return zt=sn({format:Yt,formatPrefix:Jt})}function An(e){return sn(on(e))}function cn(e){return arguments.length?zt=An(e):zt}Ht=on({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Yt=Ht.format,Jt=Ht.formatPrefix,un();var ln="year",fn="quarter",hn="month",gn="week",dn="date",pn="day",vn="dayofyear",yn="hours",mn="minutes",In="seconds",bn="milliseconds",En=[ln,fn,hn,gn,dn,pn,vn,yn,mn,In,bn],Cn=En.reduce((function(e,t,n){return e[t]=1+n,e}),{});function Bn(e){var t=Object(R.i)(e).slice(),n={};return t.length||Object(R.n)("Missing time unit."),t.forEach((function(e){Object(R.v)(Cn,e)?n[e]=1:Object(R.n)("Invalid time unit: ".concat(e,"."))})),(n[gn]||n[pn]?1:0)+(n[fn]||n[hn]||n[dn]?1:0)+(n[vn]?1:0)>1&&Object(R.n)("Incompatible time units: ".concat(e)),t.sort((function(e,t){return Cn[e]-Cn[t]})),t}var wn=(Kt={},Object(Q.a)(Kt,ln,"%Y "),Object(Q.a)(Kt,fn,"Q%q "),Object(Q.a)(Kt,hn,"%b "),Object(Q.a)(Kt,dn,"%d "),Object(Q.a)(Kt,gn,"W%U "),Object(Q.a)(Kt,pn,"%a "),Object(Q.a)(Kt,vn,"%j "),Object(Q.a)(Kt,yn,"%H:00"),Object(Q.a)(Kt,mn,"00:%M"),Object(Q.a)(Kt,In,":%S"),Object(Q.a)(Kt,bn,".%L"),Object(Q.a)(Kt,"".concat(ln,"-").concat(hn),"%Y-%m "),Object(Q.a)(Kt,"".concat(ln,"-").concat(hn,"-").concat(dn),"%Y-%m-%d "),Object(Q.a)(Kt,"".concat(yn,"-").concat(mn),"%H:%M"),Kt);function Qn(e,t){var n,r,i=Object(R.o)({},wn,t),a=Bn(e),o=a.length,s="",u=0;for(u=0;u<o;)for(n=a.length;n>u;--n)if(null!=i[r=a.slice(u,n).join("-")]){s+=i[r],u=n;break}return s.trim()}var kn=new Date,_n=new Date;function xn(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r)||!(a>0))return s;do{s.push(o=new Date(+n)),t(n,a),e(n)}while(o<n&&n<r);return s},i.filter=function(n){return xn((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return kn.setTime(+t),_n.setTime(+r),e(kn),e(_n),Math.floor(n(kn,_n))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e===0}:function(t){return i.count(0,t)%e===0}):i:null}),i}var Sn=xn((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1})),On=Sn;Sn.range;function Dn(e){return xn((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}var Rn=Dn(0),jn=Dn(1),Mn=Dn(2),Nn=Dn(3),Fn=Dn(4),Tn=Dn(5),Ln=Dn(6),Pn=(Rn.range,jn.range,Mn.range,Nn.range,Fn.range,Tn.range,Ln.range,xn((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}))),Un=Pn;Pn.range;function Gn(e){return xn((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var qn,Hn,Yn,Jn,zn=Gn(0),Kn=Gn(1),Wn=Gn(2),Vn=Gn(3),Xn=Gn(4),Zn=Gn(5),$n=Gn(6),er=(zn.range,Kn.range,Wn.range,Vn.range,Xn.range,Zn.range,$n.range,new Date);function tr(e){return er.setFullYear(e),er.setMonth(0),er.setDate(1),er.setHours(0,0,0,0),er}function nr(e){return ir(new Date(e))}function rr(e){return ar(new Date(e))}function ir(e){return On.count(tr(e.getFullYear())-1,e)}function ar(e){return Rn.count(tr(e.getFullYear())-1,e)}function or(e){return tr(e).getDay()}function sr(e,t,n,r,i,a,o){if(0<=e&&e<100){var s=new Date(-1,t,n,r,i,a,o);return s.setFullYear(e),s}return new Date(e,t,n,r,i,a,o)}function ur(e){return cr(new Date(e))}function Ar(e){return lr(new Date(e))}function cr(e){var t=Date.UTC(e.getUTCFullYear(),0,1);return Un.count(t-1,e)}function lr(e){var t=Date.UTC(e.getUTCFullYear(),0,1);return zn.count(t-1,e)}function fr(e){return er.setTime(Date.UTC(e,0,1)),er.getUTCDay()}function hr(e,t,n,r,i,a,o){if(0<=e&&e<100){var s=new Date(Date.UTC(-1,t,n,r,i,a,o));return s.setUTCFullYear(n.y),s}return new Date(Date.UTC(e,t,n,r,i,a,o))}function gr(e,t,n,r,i){var a=t||1,o=Object(R.U)(e),s=function(e,t,i){return function(e,t,n,r){var i=n<=1?e:r?function(t,i){return r+n*Math.floor((e(t,i)-r)/n)}:function(t,r){return n*Math.floor(e(t,r)/n)};return t?function(e,n){return t(i(e,n),n)}:i}(n[i=i||e],r[i],e===o&&a,t)},u=new Date,A=Object(R.db)(e),c=A[ln]?s(ln):Object(R.l)(2012),l=A[hn]?s(hn):A[fn]?s(fn):R.kb,f=A[gn]&&A[pn]?s(pn,1,gn+pn):A[gn]?s(gn,1):A[pn]?s(pn,1):A[dn]?s(dn,1):A[vn]?s(vn,1):R.O,h=A[yn]?s(yn):R.kb,g=A[mn]?s(mn):R.kb,d=A[In]?s(In):R.kb,p=A[bn]?s(bn):R.kb;return function(e){u.setTime(+e);var t=c(u);return i(t,l(u),f(u,t),h(u),g(u),d(u),p(u))}}function dr(e,t,n){return t+7*e-(n+6)%7}var pr=(qn={},Object(Q.a)(qn,ln,(function(e){return e.getFullYear()})),Object(Q.a)(qn,fn,(function(e){return Math.floor(e.getMonth()/3)})),Object(Q.a)(qn,hn,(function(e){return e.getMonth()})),Object(Q.a)(qn,dn,(function(e){return e.getDate()})),Object(Q.a)(qn,yn,(function(e){return e.getHours()})),Object(Q.a)(qn,mn,(function(e){return e.getMinutes()})),Object(Q.a)(qn,In,(function(e){return e.getSeconds()})),Object(Q.a)(qn,bn,(function(e){return e.getMilliseconds()})),Object(Q.a)(qn,vn,(function(e){return ir(e)})),Object(Q.a)(qn,gn,(function(e){return ar(e)})),Object(Q.a)(qn,gn+pn,(function(e,t){return dr(ar(e),e.getDay(),or(t))})),Object(Q.a)(qn,pn,(function(e,t){return dr(1,e.getDay(),or(t))})),qn),vr=(Hn={},Object(Q.a)(Hn,fn,(function(e){return 3*e})),Object(Q.a)(Hn,gn,(function(e,t){return dr(e,0,or(t))})),Hn);function yr(e,t){return gr(e,t||1,pr,vr,sr)}var mr=(Yn={},Object(Q.a)(Yn,ln,(function(e){return e.getUTCFullYear()})),Object(Q.a)(Yn,fn,(function(e){return Math.floor(e.getUTCMonth()/3)})),Object(Q.a)(Yn,hn,(function(e){return e.getUTCMonth()})),Object(Q.a)(Yn,dn,(function(e){return e.getUTCDate()})),Object(Q.a)(Yn,yn,(function(e){return e.getUTCHours()})),Object(Q.a)(Yn,mn,(function(e){return e.getUTCMinutes()})),Object(Q.a)(Yn,In,(function(e){return e.getUTCSeconds()})),Object(Q.a)(Yn,bn,(function(e){return e.getUTCMilliseconds()})),Object(Q.a)(Yn,vn,(function(e){return cr(e)})),Object(Q.a)(Yn,gn,(function(e){return lr(e)})),Object(Q.a)(Yn,pn,(function(e,t){return dr(1,e.getUTCDay(),fr(t))})),Object(Q.a)(Yn,gn+pn,(function(e,t){return dr(lr(e),e.getUTCDay(),fr(t))})),Yn),Ir=(Jn={},Object(Q.a)(Jn,fn,(function(e){return 3*e})),Object(Q.a)(Jn,gn,(function(e,t){return dr(e,0,fr(t))})),Jn);function br(e,t){return gr(e,t||1,mr,Ir,hr)}var Er=xn((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));Er.every=function(e){return isFinite(e=Math.floor(e))&&e>0?xn((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};var Cr=Er,Br=(Er.range,xn((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}))),wr=Br,Qr=(Br.range,xn((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()}))),kr=Qr,_r=(Qr.range,xn((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()}))),xr=_r,Sr=(_r.range,xn((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()}))),Or=Sr,Dr=(Sr.range,xn((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e})));Dr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?xn((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Dr:null};var Rr=Dr,jr=(Dr.range,xn((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()})));jr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?xn((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var Mr,Nr,Fr=jr,Tr=(jr.range,xn((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}))),Lr=Tr,Pr=(Tr.range,xn((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()}))),Ur=Pr,Gr=(Pr.range,xn((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()}))),qr=Gr,Hr=(Gr.range,Mr={},Object(Q.a)(Mr,ln,Cr),Object(Q.a)(Mr,fn,wr.every(3)),Object(Q.a)(Mr,hn,wr),Object(Q.a)(Mr,gn,Rn),Object(Q.a)(Mr,dn,On),Object(Q.a)(Mr,pn,On),Object(Q.a)(Mr,vn,On),Object(Q.a)(Mr,yn,kr),Object(Q.a)(Mr,mn,xr),Object(Q.a)(Mr,In,Or),Object(Q.a)(Mr,bn,Rr),Mr),Yr=(Nr={},Object(Q.a)(Nr,ln,Fr),Object(Q.a)(Nr,fn,Lr.every(3)),Object(Q.a)(Nr,hn,Lr),Object(Q.a)(Nr,gn,zn),Object(Q.a)(Nr,dn,Un),Object(Q.a)(Nr,pn,Un),Object(Q.a)(Nr,vn,Un),Object(Q.a)(Nr,yn,Ur),Object(Q.a)(Nr,mn,qr),Object(Q.a)(Nr,In,Or),Object(Q.a)(Nr,bn,Rr),Nr);function Jr(e){return Hr[e]}function zr(e){return Yr[e]}function Kr(e,t,n){return e?e.offset(t,n):void 0}function Wr(e,t,n){return Kr(Jr(e),t,n)}function Vr(e,t,n){return Kr(zr(e),t,n)}function Xr(e,t,n,r){return e?e.range(t,n,r):void 0}function Zr(e,t,n,r){return Xr(Jr(e),t,n,r)}function $r(e,t,n,r){return Xr(zr(e),t,n,r)}var ei=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return(r=t(e))<(i=n)?-1:r>i?1:r>=i?0:NaN;var r,i}),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)<0?r=a+1:i=a}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)>0?i=a:r=a+1}return r}}};var ti=Math.sqrt(50),ni=Math.sqrt(10),ri=Math.sqrt(2);function ii(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=ti?i*=10:a>=ni?i*=5:a>=ri&&(i*=2),t<e?-i:i}var ai=[ln,hn,dn,yn,mn,In,bn],oi=ai.slice(0,-1),si=oi.slice(0,-1),ui=si.slice(0,-1),Ai=ui.slice(0,-1),ci=[ln,hn],li=[ln],fi=[[oi,1,1e3],[oi,5,5e3],[oi,15,15e3],[oi,30,3e4],[si,1,6e4],[si,5,3e5],[si,15,9e5],[si,30,18e5],[ui,1,36e5],[ui,3,108e5],[ui,6,216e5],[ui,12,432e5],[Ai,1,864e5],[[ln,gn],1,6048e5],[ci,1,2592e6],[ci,3,7776e6],[li,1,31536e6]],hi=function(e){var t,n,r=e.extent,i=e.maxbins||40,a=Math.abs(Object(R.X)(r))/i,o=ei((function(e){return e[2]})).right(fi,a);return o===fi.length?(t=li,n=ii(r[0]/31536e6,r[1]/31536e6,i)):o?(t=(o=fi[a/fi[o-1][2]<fi[o][2]/a?o-1:o])[0],n=o[1]):(t=ai,n=Math.max(ii(r[0],r[1],i),1)),{units:t,step:n}};function gi(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function di(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function pi(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function vi(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,u=e.shortMonths,A=Si(i),c=Oi(i),l=Si(a),f=Oi(a),h=Si(o),g=Oi(o),d=Si(s),p=Oi(s),v=Si(u),y=Oi(u),m={a:function(e){return o[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return u[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Zi,e:Zi,f:ra,H:$i,I:ea,j:ta,L:na,m:ia,M:aa,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Ra,s:ja,S:oa,u:sa,U:ua,V:Aa,w:ca,W:la,x:null,X:null,y:fa,Y:ha,Z:ga,"%":Da},I={a:function(e){return o[e.getUTCDay()]},A:function(e){return a[e.getUTCDay()]},b:function(e){return u[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:da,e:da,f:Ia,H:pa,I:va,j:ya,L:ma,m:ba,M:Ea,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Ra,s:ja,S:Ca,u:Ba,U:wa,V:Qa,w:ka,W:_a,x:null,X:null,y:xa,Y:Sa,Z:Oa,"%":Da},b={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=g[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=l.exec(t.slice(n));return r?(e.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.m=p[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return B(e,t,n,r)},d:Gi,e:Gi,f:Ki,H:Hi,I:Hi,j:qi,L:zi,m:Ui,M:Yi,p:function(e,t,n){var r=A.exec(t.slice(n));return r?(e.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:Pi,Q:Vi,s:Xi,S:Ji,u:Ri,U:ji,V:Mi,w:Di,W:Ni,x:function(e,t,r){return B(e,n,t,r)},X:function(e,t,n){return B(e,r,t,n)},y:Ti,Y:Fi,Z:Li,"%":Wi};function E(e,t){return function(n){var r,i,a,o=[],s=-1,u=0,A=e.length;for(n instanceof Date||(n=new Date(+n));++s<A;)37===e.charCodeAt(s)&&(o.push(e.slice(u,s)),null!=(i=Bi[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(a=t[r])&&(r=a(n,i)),o.push(r),u=s+1);return o.push(e.slice(u,s)),o.join("")}}function C(e,t){return function(n){var r,i,a=pi(1900,void 0,1);if(B(a,e,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(t&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=di(pi(a.y,0,1))).getUTCDay(),r=i>4||0===i?Kn.ceil(r):Kn(r),r=Un.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=gi(pi(a.y,0,1))).getDay(),r=i>4||0===i?jn.ceil(r):jn(r),r=On.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?di(pi(a.y,0,1)).getUTCDay():gi(pi(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,di(a)):gi(a)}}function B(e,t,n,r){for(var i,a,o=0,s=t.length,u=n.length;o<s;){if(r>=u)return-1;if(37===(i=t.charCodeAt(o++))){if(i=t.charAt(o++),!(a=b[i in Bi?t.charAt(o++):i])||(r=a(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return m.x=E(n,m),m.X=E(r,m),m.c=E(t,m),I.x=E(n,I),I.X=E(r,I),I.c=E(t,I),{format:function(e){var t=E(e+="",m);return t.toString=function(){return e},t},parse:function(e){var t=C(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=E(e+="",I);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+="",!0);return t.toString=function(){return e},t}}}var yi,mi,Ii,bi,Ei,Ci,Bi={"-":"",_:" ",0:"0"},wi=/^\s*\d+/,Qi=/^%/,ki=/[\\^$*+?|[\]().{}]/g;function _i(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function xi(e){return e.replace(ki,"\\$&")}function Si(e){return new RegExp("^(?:"+e.map(xi).join("|")+")","i")}function Oi(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function Di(e,t,n){var r=wi.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Ri(e,t,n){var r=wi.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ji(e,t,n){var r=wi.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Mi(e,t,n){var r=wi.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Ni(e,t,n){var r=wi.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Fi(e,t,n){var r=wi.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Ti(e,t,n){var r=wi.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Li(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Pi(e,t,n){var r=wi.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Ui(e,t,n){var r=wi.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Gi(e,t,n){var r=wi.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function qi(e,t,n){var r=wi.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Hi(e,t,n){var r=wi.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Yi(e,t,n){var r=wi.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Ji(e,t,n){var r=wi.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function zi(e,t,n){var r=wi.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ki(e,t,n){var r=wi.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Wi(e,t,n){var r=Qi.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Vi(e,t,n){var r=wi.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Xi(e,t,n){var r=wi.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Zi(e,t){return _i(e.getDate(),t,2)}function $i(e,t){return _i(e.getHours(),t,2)}function ea(e,t){return _i(e.getHours()%12||12,t,2)}function ta(e,t){return _i(1+On.count(Cr(e),e),t,3)}function na(e,t){return _i(e.getMilliseconds(),t,3)}function ra(e,t){return na(e,t)+"000"}function ia(e,t){return _i(e.getMonth()+1,t,2)}function aa(e,t){return _i(e.getMinutes(),t,2)}function oa(e,t){return _i(e.getSeconds(),t,2)}function sa(e){var t=e.getDay();return 0===t?7:t}function ua(e,t){return _i(Rn.count(Cr(e)-1,e),t,2)}function Aa(e,t){var n=e.getDay();return e=n>=4||0===n?Fn(e):Fn.ceil(e),_i(Fn.count(Cr(e),e)+(4===Cr(e).getDay()),t,2)}function ca(e){return e.getDay()}function la(e,t){return _i(jn.count(Cr(e)-1,e),t,2)}function fa(e,t){return _i(e.getFullYear()%100,t,2)}function ha(e,t){return _i(e.getFullYear()%1e4,t,4)}function ga(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+_i(t/60|0,"0",2)+_i(t%60,"0",2)}function da(e,t){return _i(e.getUTCDate(),t,2)}function pa(e,t){return _i(e.getUTCHours(),t,2)}function va(e,t){return _i(e.getUTCHours()%12||12,t,2)}function ya(e,t){return _i(1+Un.count(Fr(e),e),t,3)}function ma(e,t){return _i(e.getUTCMilliseconds(),t,3)}function Ia(e,t){return ma(e,t)+"000"}function ba(e,t){return _i(e.getUTCMonth()+1,t,2)}function Ea(e,t){return _i(e.getUTCMinutes(),t,2)}function Ca(e,t){return _i(e.getUTCSeconds(),t,2)}function Ba(e){var t=e.getUTCDay();return 0===t?7:t}function wa(e,t){return _i(zn.count(Fr(e)-1,e),t,2)}function Qa(e,t){var n=e.getUTCDay();return e=n>=4||0===n?Xn(e):Xn.ceil(e),_i(Xn.count(Fr(e),e)+(4===Fr(e).getUTCDay()),t,2)}function ka(e){return e.getUTCDay()}function _a(e,t){return _i(Kn.count(Fr(e)-1,e),t,2)}function xa(e,t){return _i(e.getUTCFullYear()%100,t,2)}function Sa(e,t){return _i(e.getUTCFullYear()%1e4,t,4)}function Oa(){return"+0000"}function Da(){return"%"}function Ra(e){return+e}function ja(e){return Math.floor(+e/1e3)}function Ma(e,t,n){n=n||{},Object(R.F)(n)||Object(R.n)("Invalid time multi-format specifier: ".concat(n));var r=t(In),i=t(mn),a=t(yn),o=t(dn),s=t(gn),u=t(hn),A=t(fn),c=t(ln),l=e(n[bn]||".%L"),f=e(n[In]||":%S"),h=e(n[mn]||"%I:%M"),g=e(n[yn]||"%I %p"),d=e(n[dn]||n[pn]||"%a %d"),p=e(n[gn]||"%b %d"),v=e(n[hn]||"%B"),y=e(n[fn]||"%B"),m=e(n[ln]||"%Y");return function(e){return(r(e)<e?l:i(e)<e?f:a(e)<e?h:o(e)<e?g:u(e)<e?s(e)<e?d:p:c(e)<e?A(e)<e?v:y:m)(e)}}function Na(e){var t=Nt(e.format),n=Nt(e.utcFormat);return{timeFormat:function(e){return Object(R.H)(e)?t(e):Ma(t,Jr,e)},utcFormat:function(e){return Object(R.H)(e)?n(e):Ma(n,zr,e)},timeParse:Nt(e.parse),utcParse:Nt(e.utcParse)}}function Fa(){return Ci=Na({format:mi,parse:Ii,utcFormat:bi,utcParse:Ei})}function Ta(e){return Na(vi(e))}function La(e){return arguments.length?Ci=Ta(e):Ci}!function(e){yi=vi(e),mi=yi.format,Ii=yi.parse,bi=yi.utcFormat,Ei=yi.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Fa();var Pa=function(e,t){return Object(R.o)({},e,t)};function Ua(e,t){var n=e?An(e):cn(),r=t?Ta(t):La();return Pa(n,r)}function Ga(e,t){var n=arguments.length;return n&&2!==n&&Object(R.n)("defaultLocale expects either zero or two arguments."),n?Pa(cn(e),La(t)):Pa(cn(),La())}function qa(){return un(),Fa(),Ga()}var Ha=function(e,t,n,r){var i=jt((t=t||{}).type||"json");return i||Object(R.n)("Unknown data format type: "+t.type),e=i(e,t),t.parse&&function(e,t,n,r){if(!e.length)return;var i=La();n=n||i.timeParse,r=r||i.utcParse;var a,o,s,u,A,c,l,f=e.columns||Object.keys(e[0]);"auto"===t&&(t=pt(e,f));for(f=Object.keys(t),a=f.map((function(e){var i,a,o=t[e];if(o&&(o.startsWith("date:")||o.startsWith("utc:")))return("'"===(a=(i=o.split(/:(.+)?/,2))[1])[0]&&"'"===a[a.length-1]||'"'===a[0]&&'"'===a[a.length-1])&&(a=a.slice(1,-1)),("utc"===i[0]?r:n)(a);if(!ft[o])throw Error("Illegal format pattern: "+e+":"+o);return ft[o]})),u=0,c=e.length,l=f.length;u<c;++u)for(o=e[u],A=0;A<l;++A)s=f[A],o[s]=a[A](o[s])}(e,t.parse,n,r),Object(R.v)(e,"columns")&&delete e.columns,e};var Ya=function(e,t){return function(n){return{options:n||{},sanitize:it,load:nt,fileAccess:!!t,file:ot(t),http:At(e)}}}("undefined"!==typeof fetch&&fetch,null);function Ja(){return(Ja=Object(Qe.a)(Y.a.mark((function e(t,n){var r,i,a;return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this,i=0,e.prev=2,e.next=5,r.loader().load(t,{context:"dataflow",response:Mt(n&&n.type)});case 5:a=e.sent;try{a=r.parse(a,n)}catch(o){i=-2,r.warn("Data ingestion failed",t,o)}e.next=13;break;case 9:e.prev=9,e.t0=e.catch(2),i=-1,r.warn("Loading failed",t,e.t0);case 13:return e.abrupt("return",{data:a,status:i});case 14:case"end":return e.stop()}}),e,this,[[2,9]])})))).apply(this,arguments)}function za(){return(za=Object(Qe.a)(Y.a.mark((function e(t,n,r){var i,a,o;return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(a=(i=this)._pending||Ka(i)).requests+=1,e.next=4,i.request(n,r);case 4:return o=e.sent,i.pulse(t,i.changeset().remove(R.gb).insert(o.data||[])),a.done(),e.abrupt("return",o);case 8:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function Ka(e){var t,n=new Promise((function(e){t=e}));return n.requests=0,n.done=function(){0===--n.requests&&(e._pending=null,t(e))},e._pending=n}var Wa={skip:!0};function Va(e,t,n,r,i,a){var o,s,u=Object(R.o)({},a,Wa);Object(R.D)(n)||(n=Object(R.l)(n)),void 0===r?o=function(t){return e.touch(n(t))}:Object(R.D)(r)?(s=new Je(null,r,i,!1),o=function(t){s.evaluate(t);var r=n(t),i=s.value;Le(i)?e.pulse(r,i,a):e.update(r,i,u)}):o=function(t){return e.update(n(t),r,u)},t.apply(o)}function Xa(e,t,n,r,i,a){if(void 0===r)t.targets().add(n);else{var o=a||{},s=new Je(null,function(e,t){return t=Object(R.D)(t)?t:Object(R.l)(t),e?function(n,r){var i=t(n,r);return e.skip()||(e.skip(i!==this.value).value=i),i}:t}(n,r),i,!1);s.modified(o.force),s.rank=t.rank,t.targets().add(s),n&&(s.skip(!0),s.value=n.value,s.targets().add(n),e.connect(n,[s]))}}var Za={};function $a(e,t,n){this.dataflow=e,this.stamp=null==t?-1:t,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=n||null}var eo=$a.prototype;function to(e,t){return e?function(n,r){return e(n,r)&&t(n,r)}:t}function no(e,t){var n=[];return Object(R.ib)(e,t,(function(e){return n.push(e)})),n}function ro(e,t){var n={};return e.visit(t,(function(e){n[De(e)]=1})),function(e){return n[De(e)]?null:e}}function io(e,t,n,r){var i,a,o,s,u,A=this,c=0;for(this.dataflow=e,this.stamp=t,this.fields=null,this.encode=r||null,this.pulses=n,o=0,s=n.length;o<s;++o)if((i=n[o]).stamp===t){if(i.fields)for(u in a=A.fields||(A.fields={}),i.fields)a[u]=1;i.changed(A.ADD)&&(c|=A.ADD),i.changed(A.REM)&&(c|=A.REM),i.changed(A.MOD)&&(c|=A.MOD)}this.changes=c}eo.StopPropagation=Za,eo.ADD=1,eo.REM=2,eo.MOD=4,eo.ADD_REM=3,eo.ADD_MOD=5,eo.ALL=7,eo.REFLOW=8,eo.SOURCE=16,eo.NO_SOURCE=32,eo.NO_FIELDS=64,eo.fork=function(e){return new $a(this.dataflow).init(this,e)},eo.clone=function(){var e=this.fork(7);return e.add=e.add.slice(),e.rem=e.rem.slice(),e.mod=e.mod.slice(),e.source&&(e.source=e.source.slice()),e.materialize(23)},eo.addAll=function(){var e=this;return e.source&&e.source.length!==e.add.length?((e=new $a(this.dataflow).init(this)).add=e.source,e):e},eo.init=function(e,t){var n=this;return n.stamp=e.stamp,n.encode=e.encode,!e.fields||64&t||(n.fields=e.fields),1&t?(n.addF=e.addF,n.add=e.add):(n.addF=null,n.add=[]),2&t?(n.remF=e.remF,n.rem=e.rem):(n.remF=null,n.rem=[]),4&t?(n.modF=e.modF,n.mod=e.mod):(n.modF=null,n.mod=[]),32&t?(n.srcF=null,n.source=null):(n.srcF=e.srcF,n.source=e.source,e.cleans&&(n.cleans=e.cleans)),n},eo.runAfter=function(e){this.dataflow.runAfter(e)},eo.changed=function(e){var t=e||7;return 1&t&&this.add.length||2&t&&this.rem.length||4&t&&this.mod.length},eo.reflow=function(e){if(e)return this.fork(7).reflow();var t=this.add.length,n=this.source&&this.source.length;return n&&n!==t&&(this.mod=this.source,t&&this.filter(4,ro(this,1))),this},eo.clean=function(e){return arguments.length?(this.cleans=!!e,this):this.cleans},eo.modifies=function(e){var t=this.fields||(this.fields={});return Object(R.A)(e)?e.forEach((function(e){return t[e]=!0})):t[e]=!0,this},eo.modified=function(e,t){var n=this.fields;return!(!t&&!this.mod.length||!n)&&(arguments.length?Object(R.A)(e)?e.some((function(e){return n[e]})):n[e]:!!n)},eo.filter=function(e,t){var n=this;return 1&e&&(n.addF=to(n.addF,t)),2&e&&(n.remF=to(n.remF,t)),4&e&&(n.modF=to(n.modF,t)),16&e&&(n.srcF=to(n.srcF,t)),n},eo.materialize=function(e){var t=this;return 1&(e=e||7)&&t.addF&&(t.add=no(t.add,t.addF),t.addF=null),2&e&&t.remF&&(t.rem=no(t.rem,t.remF),t.remF=null),4&e&&t.modF&&(t.mod=no(t.mod,t.modF),t.modF=null),16&e&&t.srcF&&(t.source=t.source.filter(t.srcF),t.srcF=null),t},eo.visit=function(e,t){var n,r,i=this,a=t;return 16&e?(Object(R.ib)(i.source,i.srcF,a),i):(1&e&&Object(R.ib)(i.add,i.addF,a),2&e&&Object(R.ib)(i.rem,i.remF,a),4&e&&Object(R.ib)(i.mod,i.modF,a),8&e&&(n=i.source)&&((r=i.add.length+i.mod.length)===n.length||(r?Object(R.ib)(n,ro(i,5),a):Object(R.ib)(n,i.srcF,a))),i)};var ao=Object(R.y)(io,$a);function oo(){return(oo=Object(Qe.a)(Y.a.mark((function e(t,n,r){var i,a,o,s,u,A,c,l,f;return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=[],!(i=this)._pulse){e.next=3;break}return e.abrupt("return",uo(i));case 3:if(!i._pending){e.next=6;break}return e.next=6,i._pending;case 6:if(!n){e.next=9;break}return e.next=9,ke(i,n);case 9:if(i._touched.length){e.next=12;break}return i.debug("Dataflow invoked, but nothing to do."),e.abrupt("return",i);case 12:o=++i._clock,i._pulse=new $a(i,o,t),i._touched.forEach((function(e){return i._enqueue(e,!0)})),i._touched=we(R.w),s=0,e.prev=17;case 18:if(!(i._heap.size()>0)){e.next=35;break}if((u=i._heap.pop()).rank===u.qrank){e.next=23;break}return i._enqueue(u,!0),e.abrupt("continue",18);case 23:if(!(A=u.run(i._getPulse(u,t))).then){e.next=30;break}return e.next=27,A;case 27:A=e.sent,e.next=31;break;case 30:A.async&&(a.push(A.async),A=Za);case 31:A!==Za&&u._targets&&u._targets.forEach((function(e){return i._enqueue(e)})),++s,e.next=18;break;case 35:e.next=41;break;case 37:e.prev=37,e.t0=e.catch(17),i._heap.clear(),c=e.t0;case 41:if(i._input={},i._pulse=null,i.debug("Pulse ".concat(o,": ").concat(s," operators")),c&&(i._postrun=[],i.error(c)),!i._postrun.length){e.next=55;break}l=i._postrun.sort((function(e,t){return t.priority-e.priority})),i._postrun=[],f=0;case 49:if(!(f<l.length)){e.next=55;break}return e.next=52,ke(i,l[f].callback);case 52:++f,e.next=49;break;case 55:if(!r){e.next=58;break}return e.next=58,ke(i,r);case 58:return a.length&&Promise.all(a).then((function(e){return i.runAsync(null,(function(){e.forEach((function(e){try{e(i)}catch(t){i.error(t)}}))}))})),e.abrupt("return",i);case 60:case"end":return e.stop()}}),e,this,[[17,37]])})))).apply(this,arguments)}function so(){return(so=Object(Qe.a)(Y.a.mark((function e(t,n,r){var i,a=this;return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._running){e.next=5;break}return e.next=3,this._running;case 3:e.next=0;break;case 5:return i=function(){return a._running=null},(this._running=this.evaluate(t,n,r)).then(i,i),e.abrupt("return",this._running);case 8:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function uo(e){return e.error("Dataflow already running. Use runAsync() to chain invocations."),e}ao.fork=function(e){var t=new $a(this.dataflow).init(this,e&this.NO_FIELDS);return void 0!==e&&(e&t.ADD&&this.visit(t.ADD,(function(e){return t.add.push(e)})),e&t.REM&&this.visit(t.REM,(function(e){return t.rem.push(e)})),e&t.MOD&&this.visit(t.MOD,(function(e){return t.mod.push(e)}))),t},ao.changed=function(e){return this.changes&e},ao.modified=function(e){var t=this,n=t.fields;return n&&t.changes&t.MOD?Object(R.A)(e)?e.some((function(e){return n[e]})):n[e]:0},ao.filter=function(){Object(R.n)("MultiPulse does not support filtering.")},ao.materialize=function(){Object(R.n)("MultiPulse does not support materialization.")},ao.visit=function(e,t){var n=this,r=n.pulses,i=r.length,a=0;if(e&n.SOURCE)for(;a<i;++a)r[a].visit(e,t);else for(;a<i;++a)r[a].stamp===n.stamp&&r[a].visit(e,t);return n};var Ao={skip:!1,force:!1};function co(e){var t=[];return{clear:function(){return t=[]},size:function(){return t.length},peek:function(){return t[0]},push:function(n){return t.push(n),lo(t,0,t.length-1,e)},pop:function(){var n,r=t.pop();return t.length?(n=t[0],t[0]=r,function(e,t,n){var r,i=t,a=e.length,o=e[t],s=1+(t<<1);for(;s<a;)(r=s+1)<a&&n(e[s],e[r])>=0&&(s=r),e[t]=e[s],s=1+((t=s)<<1);e[t]=o,lo(e,i,t,n)}(t,0,e)):n=r,n}}}function lo(e,t,n,r){var i,a,o;for(i=e[n];n>t&&r(i,a=e[o=n-1>>1])<0;)e[n]=a,n=o;return e[n]=i}function fo(){this.logger(Object(R.K)()),this.logLevel(R.b),this._clock=0,this._rank=0,this._locale=Ga();try{this._loader=Ya()}catch(e){}this._touched=we(R.w),this._input={},this._pulse=null,this._heap=co((function(e,t){return e.qrank-t.qrank})),this._postrun=[]}var ho=fo.prototype;function go(e){return function(){return this._log[e].apply(this,arguments)}}function po(e,t){Je.call(this,e,null,t)}ho.stamp=function(){return this._clock},ho.loader=function(e){return arguments.length?(this._loader=e,this):this._loader},ho.locale=function(e){return arguments.length?(this._locale=e,this):this._locale},ho.cleanThreshold=1e4,ho.add=function(e,t,n,r){var i,a=1;return e instanceof Je?i=e:e&&e.prototype instanceof Je?i=new e:Object(R.D)(e)?i=new Je(null,e):(a=0,i=new Je(e,t)),this.rank(i),a&&(r=n,n=t),n&&this.connect(i,i.parameters(n,r)),this.touch(i),i},ho.connect=function(e,t){var n,r,i=e.rank;for(n=0,r=t.length;n<r;++n)if(i<t[n].rank)return void this.rerank(e)},ho.rank=function(e){e.rank=++this._rank},ho.rerank=function(e){for(var t,n,r,i=[e];i.length;)if(this.rank(t=i.pop()),n=t._targets)for(r=n.length;--r>=0;)i.push(t=n[r]),t===e&&Object(R.n)("Cycle detected in dataflow graph.")},ho.pulse=function(e,t,n){this.touch(e,n||Ao);var r=new $a(this,this._clock+(this._pulse?0:1)),i=e.pulse&&e.pulse.source||[];return r.target=e,this._input[e.id]=t.pulse(r,i),this},ho.touch=function(e,t){var n=t||Ao;return this._pulse?this._enqueue(e):this._touched.add(e),n.skip&&e.skip(!0),this},ho.update=function(e,t,n){var r=n||Ao;return(e.set(t)||r.force)&&this.touch(e,r),this},ho.changeset=Pe,ho.ingest=function(e,t,n){return t=this.parse(t,n),this.pulse(e,this.changeset().insert(t))},ho.parse=function(e,t){var n=this.locale();return Ha(e,t,n.timeParse,n.utcParse)},ho.preload=function(e,t,n){return za.apply(this,arguments)},ho.request=function(e,t){return Ja.apply(this,arguments)},ho.events=function(e,t,n,r){for(var i,a=this,o=Xe(n,r),s=function(e){e.dataflow=a;try{o.receive(e)}catch(t){a.error(t)}finally{a.run()}},u=0,A=(i="string"===typeof e&&"undefined"!==typeof document?document.querySelectorAll(e):Object(R.i)(e)).length;u<A;++u)i[u].addEventListener(t,s);return o},ho.on=function(e,t,n,r,i){return(e instanceof Je?Xa:Va)(this,e,t,n,r,i),this},ho.evaluate=function(e,t,n){return oo.apply(this,arguments)},ho.run=function(e,t,n){return this._pulse?uo(this):(this.evaluate(e,t,n),this)},ho.runAsync=function(e,t,n){return so.apply(this,arguments)},ho.runAfter=function(e,t,n){if(this._pulse||t)this._postrun.push({priority:n||0,callback:e});else try{e(this)}catch(r){this.error(r)}},ho._enqueue=function(e,t){var n=e.stamp<this._clock;n&&(e.stamp=this._clock),(n||t)&&(e.qrank=e.rank,this._heap.push(e))},ho._getPulse=function(e,t){var n=e.source,r=this._clock;return n&&Object(R.A)(n)?new io(this,r,n.map((function(e){return e.pulse})),t):this._input[e.id]||function(e,t){if(t&&t.stamp===e.stamp)return t;e=e.fork(),t&&t!==Za&&(e.source=t.source);return e}(this._pulse,n&&n.pulse)},ho.logger=function(e){return arguments.length?(this._log=e,this):this._log},ho.error=go("error"),ho.warn=go("warn"),ho.info=go("info"),ho.debug=go("debug"),ho.logLevel=go("level");var vo=Object(R.y)(po,Je);vo.run=function(e){var t,n=this;return e.stamp<this.stamp?e.StopPropagation:(this.skip()?this.skip(!1):t=this.evaluate(e),(t=t||e).then?t=t.then((function(e){return n.pulse=e})):t!==e.StopPropagation&&(this.pulse=t),t)},vo.evaluate=function(e){var t=this.marshall(e.stamp),n=this.transform(t,e);return t.clear(),n},vo.transform=function(){};var yo={};function mo(e){var t=Io(e);return t&&t.Definition||null}function Io(e){return e=e&&e.toLowerCase(),Object(R.v)(yo,e)?yo[e]:null}function bo(e){return e&&e.length?1===e.length?e[0]:(t=e,function(e){for(var n=t.length,r=1,i=String(t[0](e));r<n;++r)i+="|"+t[r](e);return i}):function(){return""};var t}function Eo(e,t,n){return n||e+(t?"_"+t:"")}var Co=function(){},Bo={init:Co,add:Co,rem:Co,idx:0},wo={values:{init:function(e){return e.cell.store=!0},value:function(e){return e.cell.data.values()},idx:-1},count:{value:function(e){return e.cell.num}},__count__:{value:function(e){return e.missing+e.valid}},missing:{value:function(e){return e.missing}},valid:{value:function(e){return e.valid}},sum:{init:function(e){return e.sum=0},value:function(e){return e.sum},add:function(e,t){return e.sum+=+t},rem:function(e,t){return e.sum-=t}},product:{init:function(e){return e.product=1},value:function(e){return e.valid?e.product:void 0},add:function(e,t){return e.product*=t},rem:function(e,t){return e.product/=t}},mean:{init:function(e){return e.mean=0},value:function(e){return e.valid?e.mean:void 0},add:function(e,t){return e.mean_d=t-e.mean,e.mean+=e.mean_d/e.valid},rem:function(e,t){return e.mean_d=t-e.mean,e.mean-=e.valid?e.mean_d/e.valid:e.mean}},average:{value:function(e){return e.valid?e.mean:void 0},req:["mean"],idx:1},variance:{init:function(e){return e.dev=0},value:function(e){return e.valid>1?e.dev/(e.valid-1):void 0},add:function(e,t){return e.dev+=e.mean_d*(t-e.mean)},rem:function(e,t){return e.dev-=e.mean_d*(t-e.mean)},req:["mean"],idx:1},variancep:{value:function(e){return e.valid>1?e.dev/e.valid:void 0},req:["variance"],idx:2},stdev:{value:function(e){return e.valid>1?Math.sqrt(e.dev/(e.valid-1)):void 0},req:["variance"],idx:2},stdevp:{value:function(e){return e.valid>1?Math.sqrt(e.dev/e.valid):void 0},req:["variance"],idx:2},stderr:{value:function(e){return e.valid>1?Math.sqrt(e.dev/(e.valid*(e.valid-1))):void 0},req:["variance"],idx:2},distinct:{value:function(e){return e.cell.data.distinct(e.get)},req:["values"],idx:3},ci0:{value:function(e){return e.cell.data.ci0(e.get)},req:["values"],idx:3},ci1:{value:function(e){return e.cell.data.ci1(e.get)},req:["values"],idx:3},median:{value:function(e){return e.cell.data.q2(e.get)},req:["values"],idx:3},q1:{value:function(e){return e.cell.data.q1(e.get)},req:["values"],idx:3},q3:{value:function(e){return e.cell.data.q3(e.get)},req:["values"],idx:3},min:{init:function(e){return e.min=void 0},value:function(e){return e.min=Number.isNaN(e.min)?e.cell.data.min(e.get):e.min},add:function(e,t){(t<e.min||void 0===e.min)&&(e.min=t)},rem:function(e,t){t<=e.min&&(e.min=NaN)},req:["values"],idx:4},max:{init:function(e){return e.max=void 0},value:function(e){return e.max=Number.isNaN(e.max)?e.cell.data.max(e.get):e.max},add:function(e,t){(t>e.max||void 0===e.max)&&(e.max=t)},rem:function(e,t){t>=e.max&&(e.max=NaN)},req:["values"],idx:4},argmin:{init:function(e){return e.argmin=void 0},value:function(e){return e.argmin||e.cell.data.argmin(e.get)},add:function(e,t,n){t<e.min&&(e.argmin=n)},rem:function(e,t){t<=e.min&&(e.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:function(e){return e.argmax=void 0},value:function(e){return e.argmax||e.cell.data.argmax(e.get)},add:function(e,t,n){t>e.max&&(e.argmax=n)},rem:function(e,t){t>=e.max&&(e.argmax=void 0)},req:["max","values"],idx:3}},Qo=Object.keys(wo);function ko(e,t){return wo[e](t)}function _o(e,t){return e.idx-t.idx}function xo(){var e=this;this.valid=0,this.missing=0,this._ops.forEach((function(t){return t.init(e)}))}function So(e,t){var n=this;null!=e&&""!==e?e===e&&(++this.valid,this._ops.forEach((function(r){return r.add(n,e,t)}))):++this.missing}function Oo(e,t){var n=this;null!=e&&""!==e?e===e&&(--this.valid,this._ops.forEach((function(r){return r.rem(n,e,t)}))):--this.missing}function Do(e){var t=this;return this._out.forEach((function(n){return e[n.out]=n.value(t)})),e}function Ro(e,t){var n=t||R.x,r=function(e){var t={};return e.forEach((function(e){return t[e.name]=e})),e.forEach((function e(n){n.req&&n.req.forEach((function(n){t[n]||e(t[n]=wo[n]())}))})),Object.values(t).sort(_o)}(e),i=e.slice().sort(_o);function a(e){this._ops=r,this._out=i,this.cell=e,this.init()}return a.prototype.init=xo,a.prototype.add=So,a.prototype.rem=Oo,a.prototype.set=Do,a.prototype.get=n,a.fields=e.map((function(e){return e.out})),a}Qo.forEach((function(e){wo[e]=function(e,t){return function(n){return Object(R.o)({name:e,out:n||e},Bo,t)}}(e,wo[e])}));var jo=Y.a.mark(Mo);function Mo(e,t){var n,r,i,a,o,s,u;return Y.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(null!=t){A.next=21;break}n=Object(D.a)(e),A.prev=2,n.s();case 4:if((r=n.n()).done){A.next=11;break}if(!(null!=(i=r.value)&&""!==i&&(i=+i)>=i)){A.next=9;break}return A.next=9,i;case 9:A.next=4;break;case 11:A.next=16;break;case 13:A.prev=13,A.t0=A.catch(2),n.e(A.t0);case 16:return A.prev=16,n.f(),A.finish(16);case 19:A.next=41;break;case 21:a=-1,o=Object(D.a)(e),A.prev=23,o.s();case 25:if((s=o.n()).done){A.next=33;break}if(u=s.value,!(null!=(u=t(u,++a,e))&&""!==u&&(u=+u)>=u)){A.next=31;break}return A.next=31,u;case 31:A.next=25;break;case 33:A.next=38;break;case 35:A.prev=35,A.t1=A.catch(23),o.e(A.t1);case 38:return A.prev=38,o.f(),A.finish(38);case 41:case"end":return A.stop()}}),jo,null,[[2,13,16,19],[23,35,38,41]])}var No=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN};function Fo(e,t){var n;if(void 0===t){var r,i=Object(D.a)(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;null!=a&&(n<a||void 0===n&&a>=a)&&(n=a)}}catch(c){i.e(c)}finally{i.f()}}else{var o,s=-1,u=Object(D.a)(e);try{for(u.s();!(o=u.n()).done;){var A=o.value;null!=(A=t(A,++s,e))&&(n<A||void 0===n&&A>=A)&&(n=A)}}catch(c){u.e(c)}finally{u.f()}}return n}function To(e,t){var n;if(void 0===t){var r,i=Object(D.a)(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;null!=a&&(n>a||void 0===n&&a>=a)&&(n=a)}}catch(c){i.e(c)}finally{i.f()}}else{var o,s=-1,u=Object(D.a)(e);try{for(u.s();!(o=u.n()).done;){var A=o.value;null!=(A=t(A,++s,e))&&(n>A||void 0===n&&A>=A)&&(n=A)}}catch(c){u.e(c)}finally{u.f()}}return n}function Lo(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}var Po=Y.a.mark(Go),Uo=function(e){return null===e?NaN:+e};function Go(e,t){var n,r,i,a,o,s,u;return Y.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(void 0!==t){A.next=21;break}n=Object(D.a)(e),A.prev=2,n.s();case 4:if((r=n.n()).done){A.next=11;break}if(!(null!=(i=r.value)&&(i=+i)>=i)){A.next=9;break}return A.next=9,i;case 9:A.next=4;break;case 11:A.next=16;break;case 13:A.prev=13,A.t0=A.catch(2),n.e(A.t0);case 16:return A.prev=16,n.f(),A.finish(16);case 19:A.next=40;break;case 21:a=-1,o=Object(D.a)(e),A.prev=23,o.s();case 25:if((s=o.n()).done){A.next=32;break}if(u=s.value,!(null!=(u=t(u,++a,e))&&(u=+u)>=u)){A.next=30;break}return A.next=30,u;case 30:A.next=25;break;case 32:A.next=37;break;case 34:A.prev=34,A.t1=A.catch(23),o.e(A.t1);case 37:return A.prev=37,o.f(),A.finish(37);case 40:case"end":return A.stop()}}),Po,null,[[2,13,16,19],[23,34,37,40]])}function qo(e,t,n){if(r=(e=Float64Array.from(Go(e,n))).length){if((t=+t)<=0||r<2)return To(e);if(t>=1)return Fo(e);var r,i=(r-1)*t,a=Math.floor(i),o=Fo(function e(t,n){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length-1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:No;i>r;){if(i-r>600){var o=i-r+1,s=n-r+1,u=Math.log(o),A=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*A*(o-A)/o)*(s-o/2<0?-1:1),l=Math.max(r,Math.floor(n-s*A/o+c)),f=Math.min(i,Math.floor(n+(o-s)*A/o+c));e(t,n,l,f,a)}var h=t[n],g=r,d=i;for(Lo(t,r,n),a(t[i],h)>0&&Lo(t,r,i);g<d;){for(Lo(t,g,d),++g,--d;a(t[g],h)<0;)++g;for(;a(t[d],h)>0;)--d}0===a(t[r],h)?Lo(t,r,d):Lo(t,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}return t}(e,a).subarray(0,a+1));return o+(To(e.subarray(a+1))-o)*(i-a)}}var Ho=function(e,t,n){var r=Float64Array.from(Mo(e,n));return r.sort(No),t.map((function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Uo;if(r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),s=+n(e[a+1],a+1,e);return o+(s-o)*(i-a)}}(r,e)}))},Yo=function(e,t){return Ho(e,[.25,.5,.75],t)};function Jo(e,t){var n=function(e,t){var n,r=0,i=0,a=0;if(void 0===t){var o,s=Object(D.a)(e);try{for(s.s();!(o=s.n()).done;){var u=o.value;null!=u&&(u=+u)>=u&&(a+=(n=u-i)*(u-(i+=n/++r)))}}catch(h){s.e(h)}finally{s.f()}}else{var A,c=-1,l=Object(D.a)(e);try{for(l.s();!(A=l.n()).done;){var f=A.value;null!=(f=t(f,++c,e))&&(f=+f)>=f&&(a+=(n=f-i)*(f-(i+=n/++r)))}}catch(h){l.e(h)}finally{l.f()}}if(r>1)return a/(r-1)}(e,t);return n?Math.sqrt(n):n}var zo=function(e,t){var n=e.length,r=Jo(e,t),i=Yo(e,t),a=(i[2]-i[0])/1.34;return 1.06*(r=Math.min(r,a)||r||Math.abs(i[0])||1)*Math.pow(n,-.2)},Ko=function(e){var t,n,r,i,a,o,s,u,A=e.maxbins||20,c=e.base||10,l=Math.log(c),f=e.divide||[5,2],h=e.extent[0],g=e.extent[1],d=e.span||g-h||Math.abs(h)||1;if(e.step)t=e.step;else if(e.steps){for(a=d/A,o=0,s=e.steps.length;o<s&&e.steps[o]<a;++o);t=e.steps[Math.max(0,o-1)]}else{for(n=Math.ceil(Math.log(A)/l),r=e.minstep||0,t=Math.max(r,Math.pow(c,Math.round(Math.log(d)/l)-n));Math.ceil(d/t)>A;)t*=c;for(o=0,s=f.length;o<s;++o)(a=t/f[o])>=r&&d/a<=A&&(t=a)}return i=(a=Math.log(t))>=0?0:1+~~(-a/l),u=Math.pow(c,-i-1),(e.nice||void 0===e.nice)&&(h=h<(a=Math.floor(h/t+u)*t)?a-t:a,g=Math.ceil(g/t)*t),{start:h,stop:g===h?h+t:g,step:t}},Wo=Math.random;function Vo(e){Wo=e}var Xo=function(e,t,n,r){if(!e.length)return[void 0,void 0];var i,a,o,s,u=Float64Array.from(Mo(e,r)),A=u.length,c=t;for(o=0,s=Array(c);o<c;++o){for(i=0,a=0;a<A;++a)i+=u[~~(Wo()*A)];s[o]=i/A}return s.sort(No),[qo(s,n/2),qo(s,1-n/2)]},Zo=function(e,t,n,r){r=r||function(e){return e};for(var i,a=0,o=1,s=e.length,u=new Float64Array(s),A=r(e[0]),c=A,l=A+t;o<s;++o){if((i=r(e[o]))>=l){for(c=(A+c)/2;a<o;++a)u[a]=c;l=i+t,A=i}c=i}for(c=(A+c)/2;a<o;++a)u[a]=c;return n?function(e,t){var n,r,i=e.length,a=0,o=1;for(;e[a]===e[o];)++o;for(;o<i;){for(n=o+1;e[o]===e[n];)++n;if(e[o]-e[o-1]<t){for(r=o+(a+n-o-o>>1);r<o;)e[r++]=e[o];for(;r>o;)e[r--]=e[a]}a=o,o=n}return e}(u,t+t/4):u};var $o=function(e){return function(){return(e=(1103515245*e+12345)%2147483647)/2147483647}},es=function(e,t){null==t&&(t=e,e=0);var n,r,i,a={};return a.min=function(e){return arguments.length?(i=r-(n=e||0),a):n},a.max=function(e){return arguments.length?(i=(r=e||0)-n,a):r},a.sample=function(){return n+Math.floor(i*Wo())},a.pdf=function(e){return e===Math.floor(e)&&e>=n&&e<r?1/i:0},a.cdf=function(e){var t=Math.floor(e);return t<n?0:t>=r?1:(t-n+1)/i},a.icdf=function(e){return e>=0&&e<=1?n-1+Math.floor(e*i):NaN},a.min(e).max(t)},ts=Math.sqrt(2*Math.PI),ns=Math.SQRT2,rs=NaN;function is(e,t){e=e||0,t=null==t?1:t;var n,r,i=0,a=0;if(rs===rs)i=rs,rs=NaN;else{do{n=(i=2*Wo()-1)*i+(a=2*Wo()-1)*a}while(0===n||n>1);i*=r=Math.sqrt(-2*Math.log(n)/n),rs=a*r}return e+i*t}function as(e,t,n){var r=(e-(t||0))/(n=null==n?1:n);return Math.exp(-.5*r*r)/(n*ts)}function os(e,t,n){var r,i=(e-(t=t||0))/(n=null==n?1:n),a=Math.abs(i);if(a>37)r=0;else{var o=Math.exp(-a*a/2);a<7.07106781186547?(r=o*((((((.0352624965998911*a+.700383064443688)*a+6.37396220353165)*a+33.912866078383)*a+112.079291497871)*a+221.213596169931)*a+220.206867912376),r/=((((((.0883883476483184*a+1.75566716318264)*a+16.064177579207)*a+86.7807322029461)*a+296.564248779674)*a+637.333633378831)*a+793.826512519948)*a+440.413735824752):r=o/(a+1/(a+2/(a+3/(a+4/(a+.65)))))/2.506628274631}return i>0?1-r:r}function ss(e,t,n){return e<0||e>1?NaN:(t||0)+(null==n?1:n)*ns*function(e){var t,n=-Math.log((1-e)*(1+e));n<6.25?t=1.6536545626831027+(t=.24015818242558962+(t=(t=(t=.00018673420803405714+(t=(t=(t=4.2347877827932404e-7+(t=(t=(t=1.0512122733215323e-9+(t=(t=(t=26335093153082323e-28+(t=(t=(t=6637638134358324e-30+(t=20972767875968562e-33+(t=(t=11157877678025181e-33+(t=128584807152564e-32+(t=(t=-364441206401782e-35)*(n-=3.125)-16850591381820166e-35)*n)*n)*n-1333171662854621e-31)*n)*n)*n-4054566272975207e-29)*n-8151934197605472e-29)*n)*n-12975133253453532e-27)*n-5415412054294628e-26)*n)*n-4.112633980346984e-9)*n-2.9070369957882005e-8)*n)*n-13654692000834679e-22)*n-13882523362786469e-21)*n)*n-.000740702534166267)*n-.006033670871430149)*n)*n:n<16?(n=Math.sqrt(n)-3.25,t=3.0838856104922208+(t=1.0052589676941592+(t=.005370914553590064+(t=(t=.002491442096107851+(t=(t=.0009532893797373805+(t=(t=24031110387097894e-21+(t=6828485145957318e-20+(t=(t=12475304481671779e-21+(t=29234449089955446e-22+(t=(t=15027403968909828e-22+(t=1.8239629214389228e-8+(t=(t=9.075656193888539e-8+(t=2.2137376921775787e-9)*n)*n-2.7517406297064545e-7)*n)*n)*n-4013867526981546e-21)*n)*n)*n-47318229009055734e-21)*n)*n)*n-.0003550375203628475)*n)*n-.0016882755560235047)*n)*n-.003751208507569241)*n)*n)*n):Number.isFinite(n)?(n=Math.sqrt(n)-5,t=4.849906401408584+(t=1.0103004648645344+(t=(t=(t=7599527703001776e-20+(t=(t=4526062597223154e-21+(t=(t=2.2900482228026655e-7+(t=(t=2.914795345090108e-8+(t=(t=7.61570120807834e-9+(t=(t=1.5076572693500548e-9+(t=(t=-27109920616438573e-27)*n-2.555641816996525e-10)*n)*n-3.789465440126737e-9)*n)*n-1.496002662714924e-8)*n)*n-6.771199775845234e-8)*n)*n-9.9298272942317e-7)*n)*n-1968177810553167e-20)*n)*n-.00021503011930044477)*n-.00013871931833623122)*n)*n):t=1/0;return t*e}(2*e-1)}var us=function(e,t){var n,r,i={mean:function(e){return arguments.length?(n=e||0,i):n},stdev:function(e){return arguments.length?(r=null==e?1:e,i):r},sample:function(){return is(n,r)},pdf:function(e){return as(e,n,r)},cdf:function(e){return os(e,n,r)},icdf:function(e){return ss(e,n,r)}};return i.mean(e).stdev(t)},As=function(e,t){var n=us(),r={},i=0;return r.data=function(n){return arguments.length?(e=n,i=n?n.length:0,r.bandwidth(t)):e},r.bandwidth=function(n){return arguments.length?(!(t=n)&&e&&(t=zo(e)),r):t},r.sample=function(){return e[~~(Wo()*i)]+t*n.sample()},r.pdf=function(r){for(var a=0,o=0;o<i;++o)a+=n.pdf((r-e[o])/t);return a/t/i},r.cdf=function(r){for(var a=0,o=0;o<i;++o)a+=n.cdf((r-e[o])/t);return a/i},r.icdf=function(){throw Error("KDE icdf not supported.")},r.data(e)};function cs(e,t){return e=e||0,t=null==t?1:t,Math.exp(e+is()*t)}function ls(e,t,n){if(e<=0)return 0;t=t||0,n=null==n?1:n;var r=(Math.log(e)-t)/n;return Math.exp(-.5*r*r)/(n*ts*e)}function fs(e,t,n){return os(Math.log(e),t,n)}function hs(e,t,n){return Math.exp(ss(e,t,n))}var gs=function(e,t){var n,r,i={mean:function(e){return arguments.length?(n=e||0,i):n},stdev:function(e){return arguments.length?(r=null==e?1:e,i):r},sample:function(){return cs(n,r)},pdf:function(e){return ls(e,n,r)},cdf:function(e){return fs(e,n,r)},icdf:function(e){return hs(e,n,r)}};return i.mean(e).stdev(t)},ds=function(e,t){var n,r={},i=0;function a(e){var t,n=[],r=0;for(t=0;t<i;++t)r+=n[t]=null==e[t]?1:+e[t];for(t=0;t<i;++t)n[t]/=r;return n}return r.weights=function(e){return arguments.length?(n=a(t=e||[]),r):t},r.distributions=function(n){return arguments.length?(n?(i=n.length,e=n):(i=0,e=[]),r.weights(t)):e},r.sample=function(){for(var t=Wo(),r=e[i-1],a=n[0],o=0;o<i-1;a+=n[++o])if(t<a){r=e[o];break}return r.sample()},r.pdf=function(t){for(var r=0,a=0;a<i;++a)r+=n[a]*e[a].pdf(t);return r},r.cdf=function(t){for(var r=0,a=0;a<i;++a)r+=n[a]*e[a].cdf(t);return r},r.icdf=function(){throw Error("Mixture icdf not supported.")},r.distributions(e).weights(t)};function ps(e,t){return null==t&&(t=null==e?1:e,e=0),e+(t-e)*Wo()}function vs(e,t,n){return null==n&&(n=null==t?1:t,t=0),e>=t&&e<=n?1/(n-t):0}function ys(e,t,n){return null==n&&(n=null==t?1:t,t=0),e<t?0:e>n?1:(e-t)/(n-t)}function ms(e,t,n){return null==n&&(n=null==t?1:t,t=0),e>=0&&e<=1?t+e*(n-t):NaN}var Is=function(e,t){var n,r,i={min:function(e){return arguments.length?(n=e||0,i):n},max:function(e){return arguments.length?(r=null==e?1:e,i):r},sample:function(){return ps(n,r)},pdf:function(e){return vs(e,n,r)},cdf:function(e){return ys(e,n,r)},icdf:function(e){return ms(e,n,r)}};return null==t&&(t=null==e?1:e,e=0),i.min(e).max(t)},bs=function(e,t,n,r){var i=r-e*e,a=Math.abs(i)<1e-24?0:(n-e*t)/i;return[t-a*e,a]};function Es(e,t,n,r){e=e.filter((function(e){var r=t(e),i=n(e);return null!=r&&(r=+r)>=r&&null!=i&&(i=+i)>=i})),r&&e.sort((function(e,n){return t(e)-t(n)}));var i,a,o,s,u=e.length,A=new Float64Array(u),c=new Float64Array(u),l=0,f=0,h=0,g=Object(D.a)(e);try{for(g.s();!(s=g.n()).done;)o=s.value,A[l]=i=+t(o),c[l]=a=+n(o),f+=(i-f)/++l,h+=(a-h)/l}catch(d){g.e(d)}finally{g.f()}for(l=0;l<u;++l)A[l]-=f,c[l]-=h;return[A,c,f,h]}function Cs(e,t,n,r){var i,a,o,s=-1,u=Object(D.a)(e);try{for(u.s();!(o=u.n()).done;){var A=o.value;i=t(A),a=n(A),null!=i&&(i=+i)>=i&&null!=a&&(a=+a)>=a&&r(i,a,++s)}}catch(c){u.e(c)}finally{u.f()}}var Bs=function(e,t,n,r,i){var a=0,o=0;return Cs(e,t,n,(function(e,t){var n=t-i(e),s=t-r;a+=n*n,o+=s*s})),1-a/o},ws=function(e,t,n){var r=0,i=0,a=0,o=0,s=0;Cs(e,t,n,(function(e,t){++s,r+=(e-r)/s,i+=(t-i)/s,a+=(e*t-a)/s,o+=(e*e-o)/s}));var u=bs(r,i,a,o),A=function(e){return u[0]+u[1]*e};return{coef:u,predict:A,rSquared:Bs(e,t,n,i,A)}},Qs=function(e,t,n){var r=0,i=0,a=0,o=0,s=0;Cs(e,t,n,(function(e,t){++s,e=Math.log(e),r+=(e-r)/s,i+=(t-i)/s,a+=(e*t-a)/s,o+=(e*e-o)/s}));var u=bs(r,i,a,o),A=function(e){return u[0]+u[1]*Math.log(e)};return{coef:u,predict:A,rSquared:Bs(e,t,n,i,A)}},ks=n(24),_s=function(e,t,n){var r,i,a,o=Es(e,t,n),s=Object(ks.a)(o,4),u=s[0],A=(s[1],s[2]),c=s[3],l=0,f=0,h=0,g=0,d=0;Cs(e,t,n,(function(e,t){r=u[d++],i=Math.log(t),l+=(t*i-l)/d,f+=((a=r*t)-f)/d,h+=(a*i-h)/d,g+=(r*a-g)/d}));var p=bs(f/c,l/c,h/c,g/c),v=Object(ks.a)(p,2),y=v[0],m=v[1],I=function(e){return Math.exp(y+m*(e-A))};return{coef:[Math.exp(y-m*A),m],predict:I,rSquared:Bs(e,t,n,c,I)}},xs=function(e,t,n){var r=0,i=0,a=0,o=0,s=0,u=0;Cs(e,t,n,(function(e,t){var n=Math.log(e),A=Math.log(t);++u,r+=(n-r)/u,i+=(A-i)/u,a+=(n*A-a)/u,o+=(n*n-o)/u,s+=(t-s)/u}));var A=bs(r,i,a,o),c=function(e){return A[0]*Math.pow(e,A[1])};return A[0]=Math.exp(A[0]),{coef:A,predict:c,rSquared:Bs(e,t,n,s,c)}},Ss=function(e,t,n){var r,i,a,o,s=Es(e,t,n),u=Object(ks.a)(s,4),A=u[0],c=u[1],l=u[2],f=u[3],h=A.length,g=0,d=0,p=0,v=0,y=0;for(r=0;r<h;)i=A[r],a=c[r++],g+=((o=i*i)-g)/r,d+=(o*i-d)/r,p+=(o*o-p)/r,v+=(i*a-v)/r,y+=(o*a-y)/r;var m=p-g*g,I=g*m-d*d,b=(y*g-v*d)/I,E=(v*m-y*d)/I,C=-b*g,B=function(e){return b*(e-=l)*e+E*e+C+f};return{coef:[C-E*l+b*l*l+f,E-2*b*l,b],predict:B,rSquared:Bs(e,t,n,f,B)}},Os=function(e,t,n,r){if(1===r)return ws(e,t,n);if(2===r)return Ss(e,t,n);var i,a,o,s,u,A=Es(e,t,n),c=Object(ks.a)(A,4),l=c[0],f=c[1],h=c[2],g=c[3],d=l.length,p=[],v=[],y=r+1;for(i=0;i<y;++i){for(o=0,s=0;o<d;++o)s+=Math.pow(l[o],i)*f[o];for(p.push(s),u=new Float64Array(y),a=0;a<y;++a){for(o=0,s=0;o<d;++o)s+=Math.pow(l[o],i+a);u[a]=s}v.push(u)}v.push(p);var m=function(e){var t,n,r,i,a,o=e.length-1,s=[];for(t=0;t<o;++t){for(i=t,n=t+1;n<o;++n)Math.abs(e[t][n])>Math.abs(e[t][i])&&(i=n);for(r=t;r<o+1;++r)a=e[r][t],e[r][t]=e[r][i],e[r][i]=a;for(n=t+1;n<o;++n)for(r=o;r>=t;r--)e[r][n]-=e[r][t]*e[t][n]/e[t][t]}for(n=o-1;n>=0;--n){for(a=0,r=n+1;r<o;++r)a+=e[r][n]*s[r];s[n]=(e[o][n]-a)/e[n][n]}return s}(v),I=function(e){e-=h;var t=g+m[0]+m[1]*e+m[2]*e*e;for(i=3;i<y;++i)t+=m[i]*Math.pow(e,i);return t};return{coef:Ds(y,m,-h,g),predict:I,rSquared:Bs(e,t,n,g,I)}};function Ds(e,t,n,r){var i,a,o,s,u=Array(e);for(i=0;i<e;++i)u[i]=0;for(i=e-1;i>=0;--i)for(o=t[i],s=1,u[i]+=o,a=1;a<=i;++a)s*=(i+1-a)/a,u[i-a]+=o*Math.pow(n,a)*s;return u[0]+=r,u}var Rs=function(e,t,n,r){for(var i=Es(e,t,n,!0),a=Object(ks.a)(i,4),o=a[0],s=a[1],u=a[2],A=a[3],c=o.length,l=Math.max(2,~~(r*c)),f=new Float64Array(c),h=new Float64Array(c),g=new Float64Array(c).fill(1),d=-1;++d<=2;){for(var p=[0,l-1],v=0;v<c;++v){for(var y=o[v],m=p[0],I=p[1],b=y-o[m]>o[I]-y?m:I,E=0,C=0,B=0,w=0,Q=0,k=1/Math.abs(o[b]-y||1),_=m;_<=I;++_){var x=o[_],S=s[_],O=js(Math.abs(y-x)*k)*g[_],D=x*O;E+=O,C+=D,B+=S*O,w+=S*D,Q+=x*D}var R=bs(C/E,B/E,w/E,Q/E),j=Object(ks.a)(R,2),M=j[0],N=j[1];f[v]=M+N*y,h[v]=Math.abs(s[v]-f[v]),Ms(o,v+1,p)}if(2===d)break;var F=qo(h,.5,void 0);if(Math.abs(F)<1e-12)break;for(var T,L,P=0;P<c;++P)T=h[P]/(6*F),g[P]=T>=1?1e-12:(L=1-T*T)*L}return function(e,t,n,r){for(var i,a=e.length,o=[],s=0,u=0,A=[];s<a;++s)i=e[s]+n,A[0]===i?A[1]+=(t[s]-A[1])/++u:(u=0,A[1]+=r,A=[i,t[s]],o.push(A));return A[1]+=r,o}(o,f,u,A)};function js(e){return(e=1-e*e*e)*e*e}function Ms(e,t,n){var r=e[t],i=n[0],a=n[1]+1;if(!(a>=e.length))for(;t>i&&e[a]-r<=r-e[i];)n[0]=++i,n[1]=a,++a}var Ns=.1*Math.PI/180,Fs=function(e,t,n,r){n=n||25,r=Math.max(n,r||200);var i=function(t){return[t,e(t)]},a=t[0],o=t[1],s=o-a,u=s/r,A=[i(a)],c=[];if(n===r){for(var l=1;l<r;++l)A.push(i(a+l/n*s));return A.push(i(o)),A}c.push(i(o));for(var f=n;--f>0;)c.push(i(a+f/n*s));for(var h=A[0],g=c[c.length-1];g;){var d=i((h[0]+g[0])/2);d[0]-h[0]>=u&&Ts(h,d,g)>Ns?c.push(d):(h=g,A.push(g),c.pop()),g=c[c.length-1]}return A};function Ts(e,t,n){var r=Math.atan2(n[1]-e[1],n[0]-e[0]),i=Math.atan2(t[1]-e[1],t[0]-e[0]);return Math.abs(r-i)}function Ls(e){this._key=e?Object(R.t)(e):De,this.reset()}var Ps=Ls.prototype;function Us(e){po.call(this,null,e),this._adds=[],this._mods=[],this._alen=0,this._mlen=0,this._drop=!0,this._cross=!1,this._dims=[],this._dnames=[],this._measures=[],this._countOnly=!1,this._counts=null,this._prev=null,this._inputs=null,this._outputs=null}Ps.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null},Ps.add=function(e){this._add.push(e)},Ps.rem=function(e){this._rem.push(e)},Ps.values=function(){if(this._get=null,0===this._rem.length)return this._add;var e,t,n,r=this._add,i=this._rem,a=this._key,o=r.length,s=i.length,u=Array(o-s),A={};for(e=0;e<s;++e)A[a(i[e])]=1;for(e=0,t=0;e<o;++e)A[a(n=r[e])]?A[a(n)]=0:u[t++]=n;return this._rem=[],this._add=u},Ps.distinct=function(e){for(var t,n=this.values(),r=n.length,i={},a=0;--r>=0;)t=e(n[r])+"",Object(R.v)(i,t)||(i[t]=1,++a);return a},Ps.extent=function(e){if(this._get!==e||!this._ext){var t=this.values(),n=Object(R.q)(t,e);this._ext=[t[n[0]],t[n[1]]],this._get=e}return this._ext},Ps.argmin=function(e){return this.extent(e)[0]||{}},Ps.argmax=function(e){return this.extent(e)[1]||{}},Ps.min=function(e){var t=this.extent(e)[0];return null!=t?e(t):void 0},Ps.max=function(e){var t=this.extent(e)[1];return null!=t?e(t):void 0},Ps.quartile=function(e){return this._get===e&&this._q||(this._q=Yo(this.values(),e),this._get=e),this._q},Ps.q1=function(e){return this.quartile(e)[0]},Ps.q2=function(e){return this.quartile(e)[1]},Ps.q3=function(e){return this.quartile(e)[2]},Ps.ci=function(e){return this._get===e&&this._ci||(this._ci=Xo(this.values(),1e3,.05,e),this._get=e),this._ci},Ps.ci0=function(e){return this.ci(e)[0]},Ps.ci1=function(e){return this.ci(e)[1]},Us.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:Qo},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"drop",type:"boolean",default:!0},{name:"cross",type:"boolean",default:!1},{name:"key",type:"field"}]};var Gs=Object(R.y)(Us,po);Gs.transform=function(e,t){var n=this,r=this,i=t.fork(t.NO_SOURCE|t.NO_FIELDS),a=e.modified();return r.stamp=i.stamp,r.value&&(a||t.modified(r._inputs,!0))?(r._prev=r.value,r.value=a?r.init(e):{},t.visit(t.SOURCE,(function(e){return r.add(e)}))):(r.value=r.value||r.init(e),t.visit(t.REM,(function(e){return r.rem(e)})),t.visit(t.ADD,(function(e){return r.add(e)}))),i.modifies(r._outputs),r._drop=!1!==e.drop,e.cross&&r._dims.length>1&&(r._drop=!1,r.cross()),t.clean()&&r._drop&&i.clean(!0).runAfter((function(){return n.clean()})),r.changes(i)},Gs.cross=function(){var e=this,t=e.value,n=e._dnames,r=n.map((function(){return{}})),i=n.length;function a(e){var t,a,o,s;for(t in e)for(o=e[t].tuple,a=0;a<i;++a)r[a][s=o[n[a]]]=s}a(e._prev),a(t),function a(o,s,u){var A,c,l=n[u],f=r[u++];for(A in f)s[l]=f[A],c=o?o+"|"+A:A,u<i?a(c,s,u):t[c]||e.cell(c,s)}("",{},0)},Gs.init=function(e){var t=this._inputs=[],n=this._outputs=[],r={};function i(e){for(var n,i=Object(R.i)(Object(R.g)(e)),a=0,o=i.length;a<o;++a)r[n=i[a]]||(r[n]=1,t.push(n))}this._dims=Object(R.i)(e.groupby),this._dnames=this._dims.map((function(e){var t=Object(R.h)(e);return i(e),n.push(t),t})),this.cellkey=e.key?e.key:bo(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];var a,o,s,u,A,c,l=e.fields||[null],f=e.ops||["count"],h=e.as||[],g=l.length,d={};for(g!==f.length&&Object(R.n)("Unmatched number of fields and aggregate ops."),c=0;c<g;++c)a=l[c],o=f[c],null==a&&"count"!==o&&Object(R.n)("Null aggregate field specified."),A=Eo(o,u=Object(R.h)(a),h[c]),n.push(A),"count"!==o?((s=d[u])||(i(a),(s=d[u]=[]).field=a,this._measures.push(s)),"count"!==o&&(this._countOnly=!1),s.push(ko(o,A))):this._counts.push(A);return this._measures=this._measures.map((function(e){return Ro(e,e.field)})),{}},Gs.cellkey=bo(),Gs.cell=function(e,t){var n=this.value[e];return n?0===n.num&&this._drop&&n.stamp<this.stamp?(n.stamp=this.stamp,this._adds[this._alen++]=n):n.stamp<this.stamp&&(n.stamp=this.stamp,this._mods[this._mlen++]=n):(n=this.value[e]=this.newcell(e,t),this._adds[this._alen++]=n),n},Gs.newcell=function(e,t){var n={key:e,num:0,agg:null,tuple:this.newtuple(t,this._prev&&this._prev[e]),stamp:this.stamp,store:!1};if(!this._countOnly){var r,i=this._measures,a=i.length;for(n.agg=Array(a),r=0;r<a;++r)n.agg[r]=new i[r](n)}return n.store&&(n.data=new Ls),n},Gs.newtuple=function(e,t){var n,r,i=this._dnames,a=this._dims,o={};for(n=0,r=a.length;n<r;++n)o[i[n]]=a[n](e);return t?Fe(t.tuple,o):je(o)},Gs.clean=function(){var e=this.value;for(var t in e)0===e[t].num&&delete e[t]},Gs.add=function(e){var t,n,r,i=this.cellkey(e),a=this.cell(i,e);if(a.num+=1,!this._countOnly)for(a.store&&a.data.add(e),n=0,r=(t=a.agg).length;n<r;++n)t[n].add(t[n].get(e),e)},Gs.rem=function(e){var t,n,r,i=this.cellkey(e),a=this.cell(i,e);if(a.num-=1,!this._countOnly)for(a.store&&a.data.rem(e),n=0,r=(t=a.agg).length;n<r;++n)t[n].rem(t[n].get(e),e)},Gs.celltuple=function(e){var t,n,r,i=e.tuple,a=this._counts;for(e.store&&e.data.values(),n=0,r=a.length;n<r;++n)i[a[n]]=e.num;if(!this._countOnly)for(n=0,r=(t=e.agg).length;n<r;++n)t[n].set(i);return i},Gs.changes=function(e){var t,n,r,i,a=this._adds,o=this._mods,s=this._prev,u=this._drop,A=e.add,c=e.rem,l=e.mod;if(s)for(n in s)t=s[n],u&&!t.num||c.push(t.tuple);for(r=0,i=this._alen;r<i;++r)A.push(this.celltuple(a[r])),a[r]=null;for(r=0,i=this._mlen;r<i;++r)(0===(t=o[r]).num&&u?c:l).push(this.celltuple(t)),o[r]=null;return this._alen=this._mlen=0,this._prev=null,e};function qs(e){po.call(this,null,e)}qs.Definition={type:"Bin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"anchor",type:"number"},{name:"maxbins",type:"number",default:20},{name:"base",type:"number",default:10},{name:"divide",type:"number",array:!0,default:[5,2]},{name:"extent",type:"number",array:!0,length:2,required:!0},{name:"span",type:"number"},{name:"step",type:"number"},{name:"steps",type:"number",array:!0},{name:"minstep",type:"number",default:0},{name:"nice",type:"boolean",default:!0},{name:"name",type:"string"},{name:"as",type:"string",array:!0,length:2,default:["bin0","bin1"]}]};var Hs=Object(R.y)(qs,po);Hs.transform=function(e,t){var n,r=!1!==e.interval,i=this._bins(e),a=i.start,o=i.step,s=e.as||["bin0","bin1"],u=s[0],A=s[1];return n=e.modified()?(t=t.reflow(!0)).SOURCE:t.modified(Object(R.g)(e.field))?t.ADD_MOD:t.ADD,t.visit(n,r?function(e){var t=i(e);e[u]=t,e[A]=null==t?null:a+o*(1+(t-a)/o)}:function(e){e[u]=i(e)}),t.modifies(r?s:u)},Hs._bins=function(e){if(this.value&&!e.modified())return this.value;var t,n,r=e.field,i=Ko(e),a=i.step,o=i.start,s=o+Math.ceil((i.stop-o)/a)*a;null!=(t=e.anchor)&&(n=t-(o+a*Math.floor((t-o)/a)),o+=n,s+=n);var u=function(e){var t=Object(R.cb)(r(e));return null==t?null:t<o?-1/0:t>s?1/0:(t=Math.max(o,Math.min(t,s-a)),o+a*Math.floor(1e-14+(t-o)/a))};return u.start=o,u.stop=i.stop,u.step=a,this.value=Object(R.f)(u,Object(R.g)(r),e.name||"bin_"+Object(R.h)(r))};var Ys=function(e,t,n){var r=e,i=t||[],a=n||[],o={},s=0;return{add:function(e){a.push(e)},remove:function(e){o[r(e)]=++s},size:function(){return i.length},data:function(e,t){return s&&(i=i.filter((function(e){return!o[r(e)]})),o={},s=0),t&&e&&i.sort(e),a.length&&(i=e?Object(R.M)(e,i,a.sort(e)):i.concat(a),a=[]),i}}};function Js(e){po.call(this,[],e)}function zs(e){Je.call(this,null,Ks,e)}function Ks(e){return this.value&&!e.modified()?this.value:Object(R.k)(e.fields,e.orders)}function Ws(e){po.call(this,null,e)}Js.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]},Object(R.y)(Js,po).transform=function(e,t){var n=t.fork(t.ALL),r=Ys(De,this.value,n.materialize(n.ADD).add),i=e.sort,a=t.changed()||i&&(e.modified("sort")||t.modified(i.fields));return n.visit(n.REM,r.remove),this.modified(a),this.value=n.source=r.data(Te(i),a),t.source&&t.source.root&&(this.value.root=t.source.root),n},Object(R.y)(zs,Je),Ws.Definition={type:"CountPattern",metadata:{generates:!0,changes:!0},params:[{name:"field",type:"field",required:!0},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:!0,length:2,default:["text","count"]}]};var Vs=Object(R.y)(Ws,po);function Xs(e){po.call(this,null,e)}Vs.transform=function(e,t){function n(t){return function(n){for(var r,i=function(e,t,n){switch(t){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase()}return e.match(n)}(s(n),e.case,a)||[],u=0,A=i.length;u<A;++u)o.test(r=i[u])||t(r)}}var r=this._parameterCheck(e,t),i=this._counts,a=this._match,o=this._stop,s=e.field,u=e.as||["text","count"],A=n((function(e){i[e]=1+(i[e]||0)})),c=n((function(e){i[e]-=1}));return r?t.visit(t.SOURCE,A):(t.visit(t.ADD,A),t.visit(t.REM,c)),this._finish(t,u)},Vs._parameterCheck=function(e,t){var n=!1;return!e.modified("stopwords")&&this._stop||(this._stop=new RegExp("^"+(e.stopwords||"")+"$","i"),n=!0),!e.modified("pattern")&&this._match||(this._match=new RegExp(e.pattern||"[\\w']+","g"),n=!0),(e.modified("field")||t.modified(e.field.fields))&&(n=!0),n&&(this._counts={}),n},Vs._finish=function(e,t){var n,r,i,a=this._counts,o=this._tuples||(this._tuples={}),s=t[0],u=t[1],A=e.fork(e.NO_SOURCE|e.NO_FIELDS);for(n in a)r=o[n],i=a[n]||0,!r&&i?(o[n]=r=je({}),r[s]=n,r[u]=i,A.add.push(r)):0===i?(r&&A.rem.push(r),a[n]=null,o[n]=null):r[u]!==i&&(r[u]=i,A.mod.push(r));return A.modifies(t)},Xs.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]},Object(R.y)(Xs,po).transform=function(e,t){var n=t.fork(t.NO_SOURCE),r=this.value,i=e.as||["a","b"],a=i[0],o=i[1];return!r||t.changed(t.ADD_REM)||e.modified("as")||e.modified("filter")?(r&&(n.rem=r),r=t.materialize(t.SOURCE).source,n.add=this.value=function(e,t,n,r){for(var i,a,o=[],s={},u=e.length,A=0;A<u;++A)for(s[t]=a=e[A],i=0;i<u;++i)s[n]=e[i],r(s)&&(o.push(je(s)),(s={})[t]=a);return o}(r,a,o,e.filter||R.gb)):n.mod=r,n.source=this.value,n.modifies(i)};var Zs={kde:As,mixture:ds,normal:us,lognormal:gs,uniform:Is};function $s(e){po.call(this,null,e)}var eu=[{key:{function:"normal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"lognormal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"uniform"},params:[{name:"min",type:"number",default:0},{name:"max",type:"number",default:1}]},{key:{function:"kde"},params:[{name:"field",type:"field",required:!0},{name:"from",type:"data"},{name:"bandwidth",type:"number",default:0}]}],tu={key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:eu},{name:"weights",type:"number",array:!0}]};function nu(e,t){return e?e.map((function(e,n){return t[n]||Object(R.h)(e)})):null}function ru(e,t,n){var r,i,a,o,s,u,A=[],c=function(e){return e(o)};if(null==t)A.push(e.map(n));else for(r={},i=0,a=e.length;i<a;++i)o=e[i],(u=r[s=t.map(c)])||(r[s]=u=[],u.dims=s,A.push(u)),u.push(n(o));return A}$s.Definition={type:"Density",metadata:{generates:!0},params:[{name:"extent",type:"number",array:!0,length:2},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"method",type:"string",default:"pdf",values:["pdf","cdf"]},{name:"distribution",type:"param",params:eu.concat(tu)},{name:"as",type:"string",array:!0,default:["value","density"]}]},Object(R.y)($s,po).transform=function(e,t){var n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){var r=function e(t,n){var r=t.function;Object(R.v)(Zs,r)||Object(R.n)("Unknown distribution function: "+r);var i=Zs[r]();for(var a in t)"field"===a?i.data((t.from||n()).map(t[a])):"distributions"===a?i[a](t[a].map((function(t){return e(t,n)}))):"function"===typeof i[a]&&i[a](t[a]);return i}(e.distribution,function(e){return function(){return e.materialize(e.SOURCE).source}}(t)),i=e.steps||e.minsteps||25,a=e.steps||e.maxsteps||200,o=e.method||"pdf";"pdf"!==o&&"cdf"!==o&&Object(R.n)("Invalid density method: "+o),e.extent||r.data||Object(R.n)("Missing density extent parameter."),o=r[o];var s=e.as||["value","density"],u=e.extent||Object(R.p)(r.data()),A=Fs(o,u,i,a).map((function(e){var t={};return t[s[0]]=e[0],t[s[1]]=e[1],je(t)}));this.value&&(n.rem=this.value),this.value=n.add=n.source=A}return n};function iu(e){po.call(this,null,e)}function au(e){Je.call(this,null,ou,e),this.modified(!0)}function ou(e){var t=e.expr;return this.value&&!e.modified("expr")?this.value:Object(R.f)((function(n){return t(n,e)}),Object(R.g)(t),Object(R.h)(t))}function su(e){po.call(this,[void 0,void 0],e)}function uu(e,t){Je.call(this,e),this.parent=t,this.count=0}iu.Definition={type:"DotBin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"step",type:"number"},{name:"smooth",type:"boolean",default:!1},{name:"as",type:"string",default:"bin"}]},Object(R.y)(iu,po).transform=function(e,t){if(this.value&&!e.modified()&&!t.changed())return t;for(var n,r=t.materialize(t.SOURCE).source,i=ru(t.source,e.groupby,R.x),a=e.smooth||!1,o=e.field,s=e.step||function(e,t){return Object(R.X)(Object(R.p)(e,t))/30}(r,o),u=Te((function(e,t){return o(e)-o(t)})),A=e.as||"bin",c=i.length,l=1/0,f=-1/0,h=0;h<c;++h){var g=i[h].sort(u);n=-1;var d,p=Object(D.a)(Zo(g,s,a,o));try{for(p.s();!(d=p.n()).done;){var v=d.value;v<l&&(l=v),v>f&&(f=v),g[++n][A]=v}}catch(y){p.e(y)}finally{p.f()}}return this.value={start:l,stop:f,step:s},t.reflow(!0).modifies(A)},Object(R.y)(au,Je),su.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]},Object(R.y)(su,po).transform=function(e,t){var n,r=this.value,i=e.field,a=r[0],o=r[1];if(((n=t.changed()||t.modified(i.fields)||e.modified("field"))||null==a)&&(a=1/0,o=-1/0),t.visit(n?t.SOURCE:t.ADD,(function(e){var t=Object(R.cb)(i(e));null!=t&&(t<a&&(a=t),t>o&&(o=t))})),!Number.isFinite(a)||!Number.isFinite(o)){var s=Object(R.h)(i);s&&(s=' for field "'.concat(s,'"')),t.dataflow.warn("Infinite extent".concat(s,": [").concat(a,", ").concat(o,"]")),a=o=void 0}this.value=[a,o]};var Au=Object(R.y)(uu,Je);function cu(e){po.call(this,{},e),this._keys=Object(R.s)();var t=this._targets=[];t.active=0,t.forEach=function(e){for(var n=0,r=t.active;n<r;++n)e(t[n],n,t)}}Au.connect=function(e){return this.detachSubflow=e.detachSubflow,this.targets().add(e),e.source=this},Au.add=function(e){this.count+=1,this.value.add.push(e)},Au.rem=function(e){this.count-=1,this.value.rem.push(e)},Au.mod=function(e){this.value.mod.push(e)},Au.init=function(e){this.value.init(e,e.NO_SOURCE)},Au.evaluate=function(){return this.value};var lu=Object(R.y)(cu,po);function fu(e){Je.call(this,null,hu,e)}function hu(e){return this.value&&!e.modified()?this.value:Object(R.A)(e.name)?Object(R.i)(e.name).map((function(e){return Object(R.t)(e)})):Object(R.t)(e.name,e.as)}function gu(e){po.call(this,Object(R.s)(),e)}function du(e){po.call(this,[],e)}function pu(e){po.call(this,[],e)}function vu(e){po.call(this,null,e)}function yu(e){po.call(this,[],e)}function mu(e,t){var n;if(void 0===t){var r,i=Object(D.a)(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;null!=a&&(n<a||void 0===n&&a>=a)&&(n=a)}}catch(c){i.e(c)}finally{i.f()}}else{var o,s=-1,u=Object(D.a)(e);try{for(u.s();!(o=u.n()).done;){var A=o.value;null!=(A=t(A,++s,e))&&(n<A||void 0===n&&A>=A)&&(n=A)}}catch(c){u.e(c)}finally{u.f()}}return n}function Iu(e,t){var n;if(void 0===t){var r,i=Object(D.a)(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;null!=a&&(n>a||void 0===n&&a>=a)&&(n=a)}}catch(c){i.e(c)}finally{i.f()}}else{var o,s=-1,u=Object(D.a)(e);try{for(u.s();!(o=u.n()).done;){var A=o.value;null!=(A=t(A,++s,e))&&(n>A||void 0===n&&A>=A)&&(n=A)}}catch(c){u.e(c)}finally{u.f()}}return n}lu.activate=function(e){this._targets[this._targets.active++]=e},lu.subflow=function(e,t,n,r){var i,a,o=this.value,s=Object(R.v)(o,e)&&o[e];return s?s.value.stamp<n.stamp&&(s.init(n),this.activate(s)):(a=r||(a=this._group[e])&&a.tuple,i=n.dataflow,s=new uu(n.fork(n.NO_SOURCE),this),i.add(s).connect(t(i,e,a)),o[e]=s,this.activate(s)),s},lu.clean=function(){var e=this.value;for(var t in e)if(0===e[t].count){var n=e[t].detachSubflow;n&&n(),delete e[t]}},lu.initTargets=function(){for(var e=this._targets,t=e.length,n=0;n<t&&null!=e[n];++n)e[n]=null;e.active=0},lu.transform=function(e,t){var n=this,r=t.dataflow,i=e.key,a=e.subflow,o=this._keys,s=e.modified("key"),u=function(e){return n.subflow(e,a,t)};return this._group=e.group||{},this.initTargets(),t.visit(t.REM,(function(e){var t=De(e),n=o.get(t);void 0!==n&&(o.delete(t),u(n).rem(e))})),t.visit(t.ADD,(function(e){var t=i(e);o.set(De(e),t),u(t).add(e)})),s||t.modified(i.fields)?t.visit(t.MOD,(function(e){var t=De(e),n=o.get(t),r=i(e);n===r?u(r).mod(e):(o.set(t,r),u(n).rem(e),u(r).add(e))})):t.changed(t.MOD)&&t.visit(t.MOD,(function(e){u(o.get(De(e))).mod(e)})),s&&t.visit(t.REFLOW,(function(e){var t=De(e),n=o.get(t),r=i(e);n!==r&&(o.set(t,r),u(n).rem(e),u(r).add(e))})),t.clean()?r.runAfter((function(){n.clean(),o.clean()})):o.empty>r.cleanThreshold&&r.runAfter(o.clean),t},Object(R.y)(fu,Je),gu.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]},Object(R.y)(gu,po).transform=function(e,t){var n=t.dataflow,r=this.value,i=t.fork(),a=i.add,o=i.rem,s=i.mod,u=e.expr,A=!0;function c(t){var n=De(t),i=u(t,e),c=r.get(n);i&&c?(r.delete(n),a.push(t)):i||c?A&&i&&!c&&s.push(t):(r.set(n,1),o.push(t))}return t.visit(t.REM,(function(e){var t=De(e);r.has(t)?r.delete(t):o.push(e)})),t.visit(t.ADD,(function(t){u(t,e)?a.push(t):r.set(De(t),1)})),t.visit(t.MOD,c),e.modified()&&(A=!1,t.visit(t.REFLOW,c)),r.empty>n.cleanThreshold&&n.runAfter(r.clean),i},du.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"index",type:"string"},{name:"as",type:"string",array:!0}]},Object(R.y)(du,po).transform=function(e,t){var n=t.fork(t.NO_SOURCE),r=e.fields,i=nu(r,e.as||[]),a=e.index||null,o=i.length;return n.rem=this.value,t.visit(t.SOURCE,(function(e){for(var t,s,u,A=r.map((function(t){return t(e)})),c=A.reduce((function(e,t){return Math.max(e,t.length)}),0),l=0;l<c;++l){for(s=Me(e),t=0;t<o;++t)s[i[t]]=null==(u=A[t][l])?null:u;a&&(s[a]=l),n.add.push(s)}})),this.value=n.source=n.add,a&&n.modifies(a),n.modifies(i)},pu.Definition={type:"Fold",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0,length:2,default:["key","value"]}]},Object(R.y)(pu,po).transform=function(e,t){var n=t.fork(t.NO_SOURCE),r=e.fields,i=r.map(R.h),a=e.as||["key","value"],o=a[0],s=a[1],u=r.length;return n.rem=this.value,t.visit(t.SOURCE,(function(e){for(var t,a=0;a<u;++a)(t=Me(e))[o]=i[a],t[s]=r[a](e),n.add.push(t)})),this.value=n.source=n.add,n.modifies(a)},vu.Definition={type:"Formula",metadata:{modifies:!0},params:[{name:"expr",type:"expr",required:!0},{name:"as",type:"string",required:!0},{name:"initonly",type:"boolean"}]},Object(R.y)(vu,po).transform=function(e,t){var n=e.expr,r=e.as,i=e.modified(),a=e.initonly?t.ADD:i?t.SOURCE:t.modified(n.fields)||t.modified(r)?t.ADD_MOD:t.ADD;return i&&(t=t.materialize().reflow(!0)),e.initonly||t.modifies(r),t.visit(a,(function(t){return t[r]=n(t,e)}))},Object(R.y)(yu,po).transform=function(e,t){var n,r,i,a=this.value,o=t.fork(t.ALL),s=e.size-a.length,u=e.generator;if(s>0){for(n=[];--s>=0;)n.push(i=je(u(e))),a.push(i);o.add=o.add.length?o.materialize(o.ADD).add.concat(n):n}else r=a.slice(0,-s),o.rem=o.rem.length?o.materialize(o.REM).rem.concat(r):r,a=a.slice(-s);return o.source=this.value=a,o};var bu=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN};function Eu(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}var Cu=Y.a.mark(Bu);function Bu(e,t){var n,r,i,a,o,s,u;return Y.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(void 0!==t){A.next=21;break}n=Object(D.a)(e),A.prev=2,n.s();case 4:if((r=n.n()).done){A.next=11;break}if(!(null!=(i=r.value)&&(i=+i)>=i)){A.next=9;break}return A.next=9,i;case 9:A.next=4;break;case 11:A.next=16;break;case 13:A.prev=13,A.t0=A.catch(2),n.e(A.t0);case 16:return A.prev=16,n.f(),A.finish(16);case 19:A.next=40;break;case 21:a=-1,o=Object(D.a)(e),A.prev=23,o.s();case 25:if((s=o.n()).done){A.next=32;break}if(u=s.value,!(null!=(u=t(u,++a,e))&&(u=+u)>=u)){A.next=30;break}return A.next=30,u;case 30:A.next=25;break;case 32:A.next=37;break;case 34:A.prev=34,A.t1=A.catch(23),o.e(A.t1);case 37:return A.prev=37,o.f(),A.finish(37);case 40:case"end":return A.stop()}}),Cu,null,[[2,13,16,19],[23,34,37,40]])}function wu(e,t,n){if(r=(e=Float64Array.from(Bu(e,n))).length){if((t=+t)<=0||r<2)return Iu(e);if(t>=1)return mu(e);var r,i=(r-1)*t,a=Math.floor(i),o=mu(function e(t,n){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length-1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:bu;i>r;){if(i-r>600){var o=i-r+1,s=n-r+1,u=Math.log(o),A=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*A*(o-A)/o)*(s-o/2<0?-1:1),l=Math.max(r,Math.floor(n-s*A/o+c)),f=Math.min(i,Math.floor(n+(o-s)*A/o+c));e(t,n,l,f,a)}var h=t[n],g=r,d=i;for(Eu(t,r,n),a(t[i],h)>0&&Eu(t,r,i);g<d;){for(Eu(t,g,d),++g,--d;a(t[g],h)<0;)++g;for(;a(t[d],h)>0;)--d}0===a(t[r],h)?Eu(t,r,d):Eu(t,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}return t}(e,a).subarray(0,a+1));return o+(Iu(e.subarray(a+1))-o)*(i-a)}}var Qu={value:"value",median:function(e,t){return wu(e,.5,t)},mean:function(e,t){var n=0,r=0;if(void 0===t){var i,a=Object(D.a)(e);try{for(a.s();!(i=a.n()).done;){var o=i.value;null!=o&&(o=+o)>=o&&(++n,r+=o)}}catch(l){a.e(l)}finally{a.f()}}else{var s,u=-1,A=Object(D.a)(e);try{for(A.s();!(s=A.n()).done;){var c=s.value;null!=(c=t(c,++u,e))&&(c=+c)>=c&&(++n,r+=c)}}catch(l){A.e(l)}finally{A.f()}}if(n)return r/n},min:Iu,max:mu},ku=[];function _u(e){po.call(this,[],e)}function xu(e){Us.call(this,e)}_u.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]},Object(R.y)(_u,po).transform=function(e,t){var n,r,i,a,o,s,u,A,c,l,f=t.fork(t.ALL),h=function(e){var t,n=e.method||Qu.value;if(null!=Qu[n])return n===Qu.value?(t=void 0!==e.value?e.value:0,function(){return t}):Qu[n];Object(R.n)("Unrecognized imputation method: "+n)}(e),g=function(e){var t=e.field;return function(e){return e?t(e):NaN}}(e),d=Object(R.h)(e.field),p=Object(R.h)(e.key),v=(e.groupby||[]).map(R.h),y=function(e,t,n,r){var i,a,o,s,u,A,c,l,f=function(e){return e(l)},h=[],g=r?r.slice():[],d={},p={};for(g.forEach((function(e,t){d[e]=t+1})),s=0,c=e.length;s<c;++s)l=e[s],A=n(l),u=d[A]||(d[A]=g.push(A)),a=(i=t?t.map(f):ku)+"",(o=p[a])||(o=p[a]=[],h.push(o),o.values=i),o[u-1]=l;return h.domain=g,h}(t.source,e.groupby,e.key,e.keyvals),m=[],I=this.value,b=y.domain.length;for(o=0,A=y.length;o<A;++o)for(i=(n=y[o]).values,r=NaN,u=0;u<b;++u)if(null==n[u]){for(a=y.domain[u],l={_impute:!0},s=0,c=i.length;s<c;++s)l[v[s]]=i[s];l[p]=a,l[d]=Number.isNaN(r)?r=h(n,g):r,m.push(je(l))}return m.length&&(f.add=f.materialize(f.ADD).add.concat(m)),I.length&&(f.rem=f.materialize(f.REM).rem.concat(I)),this.value=m,f},xu.Definition={type:"JoinAggregate",metadata:{modifies:!0},params:[{name:"groupby",type:"field",array:!0},{name:"fields",type:"field",null:!0,array:!0},{name:"ops",type:"enum",array:!0,values:Qo},{name:"as",type:"string",null:!0,array:!0},{name:"key",type:"field"}]};var Su=Object(R.y)(xu,Us);function Ou(e){po.call(this,null,e)}function Du(e){Je.call(this,null,Ru,e)}function Ru(e){return this.value&&!e.modified()?this.value:Object(R.I)(e.fields,e.flat)}function ju(e){po.call(this,[],e),this._pending=null}function Mu(e,t,n){n.forEach(je);var r=t.fork(t.NO_FIELDS&t.NO_SOURCE);return r.rem=e.value,e.value=r.source=r.add=n,e._pending=null,r.rem.length&&r.clean(!0),r}function Nu(e){po.call(this,{},e)}function Fu(e){Je.call(this,null,Tu,e)}function Tu(e){if(this.value&&!e.modified())return this.value;var t,n,r,i=1/0,a=-1/0,o=e.extents;for(t=0,n=o.length;t<n;++t)(r=o[t])[0]<i&&(i=r[0]),r[1]>a&&(a=r[1]);return[i,a]}function Lu(e){Je.call(this,null,Pu,e)}function Pu(e){return this.value&&!e.modified()?this.value:e.values.reduce((function(e,t){return e.concat(t)}),[])}function Uu(e){po.call(this,null,e)}function Gu(e){Us.call(this,e)}Su.transform=function(e,t){var n,r=this,i=e.modified();return r.value&&(i||t.modified(r._inputs,!0))?(n=r.value=i?r.init(e):{},t.visit(t.SOURCE,(function(e){r.add(e)}))):(n=r.value=r.value||this.init(e),t.visit(t.REM,(function(e){r.rem(e)})),t.visit(t.ADD,(function(e){r.add(e)}))),r.changes(),t.visit(t.SOURCE,(function(e){Object(R.o)(e,n[r.cellkey(e)].tuple)})),t.reflow(i).modifies(this._outputs)},Su.changes=function(){var e,t,n=this._adds,r=this._mods;for(e=0,t=this._alen;e<t;++e)this.celltuple(n[e]),n[e]=null;for(e=0,t=this._mlen;e<t;++e)this.celltuple(r[e]),r[e]=null;this._alen=this._mlen=0},Ou.Definition={type:"KDE",metadata:{generates:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"cumulative",type:"boolean",default:!1},{name:"counts",type:"boolean",default:!1},{name:"bandwidth",type:"number",default:0},{name:"extent",type:"number",array:!0,length:2},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"as",type:"string",array:!0,default:["value","density"]}]},Object(R.y)(Ou,po).transform=function(e,t){var n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){var r=t.materialize(t.SOURCE).source,i=ru(r,e.groupby,e.field),a=(e.groupby||[]).map(R.h),o=e.bandwidth,s=e.cumulative?"cdf":"pdf",u=e.as||["value","density"],A=[],c=e.extent,l=e.steps||e.minsteps||25,f=e.steps||e.maxsteps||200;"pdf"!==s&&"cdf"!==s&&Object(R.n)("Invalid density method: "+s),"shared"===e.resolve&&(c||(c=Object(R.p)(r,e.field)),l=f=e.steps||f),i.forEach((function(t){var n=As(t,o)[s],r=e.counts?t.length:1,i=c||Object(R.p)(t);Fs(n,i,l,f).forEach((function(e){for(var n={},i=0;i<a.length;++i)n[a[i]]=t.dims[i];n[u[0]]=e[0],n[u[1]]=e[1]*r,A.push(je(n))}))})),this.value&&(n.rem=this.value),this.value=n.add=n.source=A}return n},Object(R.y)(Du,Je),Object(R.y)(ju,po).transform=function(e,t){var n=this,r=t.dataflow;return this._pending?Mu(this,t,this._pending):function(e){return e.modified("async")&&!(e.modified("values")||e.modified("url")||e.modified("format"))}(e)?t.StopPropagation:e.values?Mu(this,t,r.parse(e.values,e.format)):e.async?{async:r.request(e.url,e.format).then((function(e){return n._pending=Object(R.i)(e.data),function(e){return e.touch(n)}}))}:r.request(e.url,e.format).then((function(e){return Mu(n,t,Object(R.i)(e.data))}))},Nu.Definition={type:"Lookup",metadata:{modifies:!0},params:[{name:"index",type:"index",params:[{name:"from",type:"data",required:!0},{name:"key",type:"field",required:!0}]},{name:"values",type:"field",array:!0},{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0},{name:"default",default:null}]},Object(R.y)(Nu,po).transform=function(e,t){var n,r,i=t,a=e.as,o=e.fields,s=e.index,u=e.values,A=null==e.default?null:e.default,c=e.modified(),l=c?t.SOURCE:t.ADD,f=o.length;return u?(r=u.length,f>1&&!a&&Object(R.n)('Multi-field lookup requires explicit "as" parameter.'),a&&a.length!==f*r&&Object(R.n)('The "as" parameter has too few output field names.'),a=a||u.map(R.h),n=function(e){for(var t,n,i=0,c=0;i<f;++i)if(null==(n=s.get(o[i](e))))for(t=0;t<r;++t,++c)e[a[c]]=A;else for(t=0;t<r;++t,++c)e[a[c]]=u[t](n)}):(a||Object(R.n)("Missing output field names."),n=function(e){for(var t,n=0;n<f;++n)t=s.get(o[n](e)),e[a[n]]=null==t?A:t}),c?i=t.reflow(!0):l|=o.some((function(e){return t.modified(e.fields)}))?t.MOD:0,t.visit(l,n),i.modifies(a)},Object(R.y)(Fu,Je),Object(R.y)(Lu,Je),Object(R.y)(Uu,po),Uu.prototype.transform=function(e,t){return this.modified(e.modified()),this.value=e,t.fork(t.NO_SOURCE|t.NO_FIELDS)},Gu.Definition={type:"Pivot",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"value",type:"field",required:!0},{name:"op",type:"enum",values:Qo,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]};var qu=Object(R.y)(Gu,Us);function Hu(e){cu.call(this,e)}function Yu(e){po.call(this,null,e)}function Ju(e){po.call(this,null,e)}qu._transform=qu.transform,qu.transform=function(e,t){return this._transform(function(e,t){var n=e.field,r=e.value,i=("count"===e.op?"__count__":e.op)||"sum",a=Object(R.g)(n).concat(Object(R.g)(r)),o=function(e,t,n){var r={},i=[];return n.visit(n.SOURCE,(function(t){var n=e(t);r[n]||(r[n]=1,i.push(n))})),i.sort((function(e,t){return(e<t||null==e)&&null!=t?-1:(e>t||null==t)&&null!=e?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t===t?-1:t!==t&&e===e?1:0)})),t?i.slice(0,t):i}(n,e.limit||0,t);t.changed()&&e.set("__pivot__",null,null,!0);return{key:e.key,groupby:e.groupby,ops:o.map((function(){return i})),fields:o.map((function(e){return function(e,t,n,r){return Object(R.f)((function(r){return t(r)===e?n(r):NaN}),r,e+"")}(e,n,r,a)})),as:o.map((function(e){return e+""})),modified:e.modified.bind(e)}}(e,t),t)},Object(R.y)(Hu,cu).transform=function(e,t){var n=this,r=e.subflow,i=e.field,a=function(e){return n.subflow(De(e),r,t,e)};return(e.modified("field")||i&&t.modified(Object(R.g)(i)))&&Object(R.n)("PreFacet does not support field modification."),this.initTargets(),i?(t.visit(t.MOD,(function(e){var t=a(e);i(e).forEach((function(e){return t.mod(e)}))})),t.visit(t.ADD,(function(e){var t=a(e);i(e).forEach((function(e){return t.add(je(e))}))})),t.visit(t.REM,(function(e){var t=a(e);i(e).forEach((function(e){return t.rem(e)}))}))):(t.visit(t.MOD,(function(e){return a(e).mod(e)})),t.visit(t.ADD,(function(e){return a(e).add(e)})),t.visit(t.REM,(function(e){return a(e).rem(e)}))),t.clean()&&t.runAfter((function(){return n.clean()})),t},Yu.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]},Object(R.y)(Yu,po).transform=function(e,t){var n,r,i=e.fields,a=nu(e.fields,e.as||[]),o=i?function(e,t){return function(e,t,n,r){for(var i=0,a=n.length;i<a;++i)t[r[i]]=n[i](e);return t}(e,t,i,a)}:Ne;return this.value?r=this.value:(t=t.addAll(),r=this.value={}),n=t.fork(t.NO_SOURCE),t.visit(t.REM,(function(e){var t=De(e);n.rem.push(r[t]),r[t]=null})),t.visit(t.ADD,(function(e){var t=o(e,je({}));r[De(e)]=t,n.add.push(t)})),t.visit(t.MOD,(function(e){n.mod.push(o(e,r[De(e)]))})),n},Object(R.y)(Ju,po).transform=function(e,t){return this.value=e.value,e.modified("value")?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation};var zu=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(i);++r<i;)a[r]=e+r*n;return a};function Ku(e){po.call(this,null,e)}Ku.Definition={type:"Quantile",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"probs",type:"number",array:!0},{name:"step",type:"number",default:.01},{name:"as",type:"string",array:!0,default:["prob","value"]}]};var Wu=Object(R.y)(Ku,po);function Vu(e){po.call(this,null,e)}function Xu(e){po.call(this,[],e),this.count=0}function Zu(e){po.call(this,null,e)}function $u(e){po.call(this,null,e),this.modified(!0)}function eA(e){po.call(this,null,e)}Wu.transform=function(e,t){var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=e.as||["prob","value"];if(this.value&&!e.modified()&&!t.changed())return n.source=this.value,n;var i=ru(t.materialize(t.SOURCE).source,e.groupby,e.field),a=(e.groupby||[]).map(R.h),o=[],s=e.step||.01,u=e.probs||zu(s/2,1-1e-14,s),A=u.length;return i.forEach((function(e){for(var t=Ho(e,u),n=0;n<A;++n){for(var i={},s=0;s<a.length;++s)i[a[s]]=e.dims[s];i[r[0]]=u[n],i[r[1]]=t[n],o.push(je(i))}})),this.value&&(n.rem=this.value),this.value=n.add=n.source=o,n},Object(R.y)(Vu,po).transform=function(e,t){var n,r;return this.value?r=this.value:(n=t=t.addAll(),r=this.value={}),e.derive&&(n=t.fork(t.NO_SOURCE),t.visit(t.REM,(function(e){var t=De(e);n.rem.push(r[t]),r[t]=null})),t.visit(t.ADD,(function(e){var t=Me(e);r[De(e)]=t,n.add.push(t)})),t.visit(t.MOD,(function(e){var t,i=r[De(e)];for(t in e)i[t]=e[t],n.modifies(t);n.mod.push(i)}))),n},Xu.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]},Object(R.y)(Xu,po).transform=function(e,t){var n=t.fork(t.NO_SOURCE),r=e.modified("size"),i=e.size,a=this.value,o=this.count,s=0,u=a.reduce((function(e,t){return e[De(t)]=1,e}),{});function A(e){var t,r;a.length<i?a.push(e):(r=~~((o+1)*Wo()))<a.length&&r>=s&&(t=a[r],u[De(t)]&&n.rem.push(t),a[r]=e),++o}if(t.rem.length&&(t.visit(t.REM,(function(e){var t=De(e);u[t]&&(u[t]=-1,n.rem.push(e)),--o})),a=a.filter((function(e){return-1!==u[De(e)]}))),(t.rem.length||r)&&a.length<i&&t.source&&(s=o=a.length,t.visit(t.SOURCE,(function(e){u[De(e)]||A(e)})),s=-1),r&&a.length>i){for(var c=0,l=a.length-i;c<l;++c)u[De(a[c])]=-1,n.rem.push(a[c]);a=a.slice(l)}return t.mod.length&&t.visit(t.MOD,(function(e){u[De(e)]&&n.mod.push(e)})),t.add.length&&t.visit(t.ADD,A),(t.add.length||s<0)&&(n.add=a.filter((function(e){return!u[De(e)]}))),this.count=o,this.value=n.source=a,n},Zu.Definition={type:"Sequence",metadata:{generates:!0,changes:!0},params:[{name:"start",type:"number",required:!0},{name:"stop",type:"number",required:!0},{name:"step",type:"number",default:1},{name:"as",type:"string",default:"data"}]},Object(R.y)(Zu,po).transform=function(e,t){if(!this.value||e.modified()){var n=t.materialize().fork(t.MOD),r=e.as||"data";return n.rem=this.value?t.rem.concat(this.value):t.rem,this.value=zu(e.start,e.stop,e.step||1).map((function(e){var t={};return t[r]=e,je(t)})),n.add=t.add.concat(this.value),n}},Object(R.y)($u,po).transform=function(e,t){return this.value=t.source,t.changed()?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation};var tA=["unit0","unit1"];eA.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:En,array:!0},{name:"step",type:"number",default:1},{name:"maxbins",type:"number",default:40},{name:"extent",type:"date",array:!0},{name:"timezone",type:"enum",default:"local",values:["local","utc"]},{name:"as",type:"string",array:!0,length:2,default:tA}]};var nA=Object(R.y)(eA,po);function rA(e){po.call(this,Object(R.s)(),e)}function iA(e){po.call(this,null,e)}nA.transform=function(e,t){var n=e.field,r=!1!==e.interval,i="utc"===e.timezone,a=this._floor(e,t),o=(i?zr:Jr)(a.unit).offset,s=e.as||tA,u=s[0],A=s[1],c=a.start||1/0,l=a.stop||-1/0,f=a.step,h=t.ADD;return(e.modified()||t.modified(Object(R.g)(n)))&&(h=(t=t.reflow(!0)).SOURCE,c=1/0,l=-1/0),t.visit(h,(function(e){var t,i,s=n(e);null==s?(e[u]=null,r&&(e[A]=null)):(e[u]=t=i=a(s),r&&(e[A]=i=o(t,f)),t<c&&(c=t),i>l&&(l=i))})),a.start=c,a.stop=l,t.modifies(r?s:u)},nA._floor=function(e,t){var n="utc"===e.timezone,r=e.units?{units:e.units,step:e.step||1}:hi({extent:e.extent||Object(R.p)(t.materialize(t.SOURCE).source,e.field),maxbins:e.maxbins}),i=r.units,a=r.step;i=Bn(i);var o=this.value||{},s=(n?br:yr)(i,a);return s.unit=Object(R.U)(i),s.units=i,s.step=a,s.start=o.start,s.stop=o.stop,this.value=s},Object(R.y)(rA,po).transform=function(e,t){var n=t.dataflow,r=e.field,i=this.value,a=!0;function o(e){i.set(r(e),e)}return e.modified("field")||t.modified(r.fields)?(i.clear(),t.visit(t.SOURCE,o)):t.changed()?(t.visit(t.REM,(function(e){i.delete(r(e))})),t.visit(t.ADD,o)):a=!1,this.modified(a),i.empty>n.cleanThreshold&&n.runAfter(i.clean),t.fork()},Object(R.y)(iA,po).transform=function(e,t){(!this.value||e.modified("field")||e.modified("sort")||t.changed()||e.sort&&t.modified(e.sort.fields))&&(this.value=(e.sort?t.source.slice().sort(Te(e.sort)):t.source).map(e.field))};var aA={row_number:function(){return{next:function(e){return e.index+1}}},rank:function(){var e;return{init:function(){return e=1},next:function(t){var n=t.index,r=t.data;return n&&t.compare(r[n-1],r[n])?e=n+1:e}}},dense_rank:function(){var e;return{init:function(){return e=1},next:function(t){var n=t.index,r=t.data;return n&&t.compare(r[n-1],r[n])?++e:e}}},percent_rank:function(){var e=aA.rank(),t=e.next;return{init:e.init,next:function(e){return(t(e)-1)/(e.data.length-1)}}},cume_dist:function(){var e;return{init:function(){return e=0},next:function(t){var n=t.index,r=t.data,i=t.compare;if(e<n){for(;n+1<r.length&&!i(r[n],r[n+1]);)++n;e=n}return(1+e)/r.length}}},ntile:function(e,t){(t=+t)>0||Object(R.n)("ntile num must be greater than zero.");var n=aA.cume_dist(),r=n.next;return{init:n.init,next:function(e){return Math.ceil(t*r(e))}}},lag:function(e,t){return t=+t||1,{next:function(n){var r=n.index-t;return r>=0?e(n.data[r]):null}}},lead:function(e,t){return t=+t||1,{next:function(n){var r=n.index+t,i=n.data;return r<i.length?e(i[r]):null}}},first_value:function(e){return{next:function(t){return e(t.data[t.i0])}}},last_value:function(e){return{next:function(t){return e(t.data[t.i1-1])}}},nth_value:function(e,t){return(t=+t)>0||Object(R.n)("nth_value nth must be greater than zero."),{next:function(n){var r=n.i0+(t-1);return r<n.i1?e(n.data[r]):null}}},prev_value:function(e){var t;return{init:function(){return t=null},next:function(n){var r=e(n.data[n.index]);return null!=r?t=r:t}}},next_value:function(e){var t,n;return{init:function(){return t=null,n=-1},next:function(r){var i=r.data;return r.index<=n?t:(n=function(e,t,n){for(var r=t.length;n<r;++n){if(null!=e(t[n]))return n}return-1}(e,i,r.index))<0?(n=i.length,t=null):t=e(i[n])}}}};var oA=Object.keys(aA);function sA(e){var t=Object(R.i)(e.ops),n=Object(R.i)(e.fields),r=Object(R.i)(e.params),i=Object(R.i)(e.as),a=this.outputs=[],o=this.windows=[],s={},u={},A=!0,c=[],l=[];function f(e){Object(R.i)(Object(R.g)(e)).forEach((function(e){return s[e]=1}))}f(e.sort),t.forEach((function(e,t){var s=n[t],h=Object(R.h)(s),g=Eo(e,h,i[t]);if(f(s),a.push(g),Object(R.v)(aA,e))o.push(function(e,t,n,r){var i=aA[e](t,n);return{init:i.init||R.kb,update:function(e,t){t[r]=i.next(e)}}}(e,n[t],r[t],g));else{if(null==s&&"count"!==e&&Object(R.n)("Null aggregate field specified."),"count"===e)return void c.push(g);A=!1;var d=u[h];d||((d=u[h]=[]).field=s,l.push(d)),d.push(ko(e,g))}})),(c.length||l.length)&&(this.cell=function(e,t,n){e=e.map((function(e){return Ro(e,e.field)}));var r={num:0,agg:null,store:!1,count:t};if(!n)for(var i=e.length,a=r.agg=Array(i),o=0;o<i;++o)a[o]=new e[o](r);if(r.store)var s=r.data=new Ls;return r.add=function(e){if(r.num+=1,!n){s&&s.add(e);for(var t=0;t<i;++t)a[t].add(a[t].get(e),e)}},r.rem=function(e){if(r.num-=1,!n){s&&s.rem(e);for(var t=0;t<i;++t)a[t].rem(a[t].get(e),e)}},r.set=function(e){var i,o;for(s&&s.values(),i=0,o=t.length;i<o;++i)e[t[i]]=r.num;if(!n)for(i=0,o=a.length;i<o;++i)a[i].set(e)},r.init=function(){r.num=0,s&&s.reset();for(var e=0;e<i;++e)a[e].init()},r}(l,c,A)),this.inputs=Object.keys(s)}var uA=sA.prototype;uA.init=function(){this.windows.forEach((function(e){return e.init()})),this.cell&&this.cell.init()},uA.update=function(e,t){var n,r=this.cell,i=this.windows,a=e.data,o=i&&i.length;if(r){for(n=e.p0;n<e.i0;++n)r.rem(a[n]);for(n=e.p1;n<e.i1;++n)r.add(a[n]);r.set(t)}for(n=0;n<o;++n)i[n].update(e,t)};var AA=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return bu(t(e),n)}),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)<0?r=a+1:i=a}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)>0?i=a:r=a+1}return r}}};function cA(e){po.call(this,{},e),this._mlen=0,this._mods=[]}cA.Definition={type:"Window",metadata:{modifies:!0},params:[{name:"sort",type:"compare"},{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:oA.concat(Qo)},{name:"params",type:"number",null:!0,array:!0},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"frame",type:"number",null:!0,array:!0,length:2,default:[null,0]},{name:"ignorePeers",type:"boolean",default:!1}]};var lA=Object(R.y)(cA,po);function fA(e,t,n,r){var i=r.sort,a=i&&!r.ignorePeers,o=r.frame||[null,0],s=e.data(n),u=s.length,A=0,c=a?AA(i):null,l={i0:0,i1:0,p0:0,p1:0,index:0,data:s,compare:i||Object(R.l)(-1)};for(t.init();A<u;++A)hA(l,o,A,u),a&&gA(l,c),t.update(l,s[A])}function hA(e,t,n,r){e.p0=e.i0,e.p1=e.i1,e.i0=null==t[0]?0:Math.max(0,n-Math.abs(t[0])),e.i1=null==t[1]?r:Math.min(r,n+Math.abs(t[1])+1),e.index=n}function gA(e,t){var n=e.i0,r=e.i1-1,i=e.compare,a=e.data,o=a.length-1;n>0&&!i(a[n],a[n-1])&&(e.i0=t.left(a,a[n])),r<o&&!i(a[r],a[r+1])&&(e.i1=t.right(a,a[r]))}lA.transform=function(e,t){var n,r,i=this,a=i.state,o=e.modified(),s=Te(e.sort);this.stamp=t.stamp,a&&!o||(a=i.state=new sA(e));var u=bo(e.groupby);function A(e){return i.group(u(e))}for(o||t.modified(a.inputs)?(i.value={},t.visit(t.SOURCE,(function(e){A(e).add(e)}))):(t.visit(t.REM,(function(e){A(e).remove(e)})),t.visit(t.ADD,(function(e){A(e).add(e)}))),n=0,r=i._mlen;n<r;++n)fA(i._mods[n],a,s,e);return i._mlen=0,i._mods=[],t.reflow(o).modifies(a.outputs)},lA.group=function(e){var t=this.value[e];return t||((t=this.value[e]=Ys(De)).stamp=-1),t.stamp<this.stamp&&(t.stamp=this.stamp,this._mods[this._mlen++]=t),t};var dA="top",pA="left",vA="right",yA="end",mA=0;function IA(e){return e&&e.gradient}function bA(e,t,n){var r=e.id,i=e.gradient,a="radial"===i?"p_":"";return r||(r=e.id="gradient_"+mA++,"radial"===i?(e.x1=EA(e.x1,.5),e.y1=EA(e.y1,.5),e.r1=EA(e.r1,0),e.x2=EA(e.x2,.5),e.y2=EA(e.y2,.5),e.r2=EA(e.r2,.5),a="p_"):(e.x1=EA(e.x1,0),e.y1=EA(e.y1,0),e.x2=EA(e.x2,1),e.y2=EA(e.y2,0))),t[r]=e,"url("+(n||"")+"#"+a+r+")"}function EA(e,t){return null!=e?e:t}var CA=function(e,t){var n,r=[];return n={gradient:"linear",x1:e?e[0]:0,y1:e?e[1]:0,x2:t?t[0]:1,y2:t?t[1]:0,stops:r,stop:function(e,t){return r.push({offset:e,color:t}),n}}};function BA(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function wA(e){this._context=e}wA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:BA(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:BA(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var QA=function(){};function kA(e){this._context=e}kA.prototype={areaStart:QA,areaEnd:QA,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:BA(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _A(e){this._context=e}_A.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:BA(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xA(e,t){this._basis=new wA(e),this._beta=t}xA.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,i=e[0],a=t[0],o=e[n]-i,s=t[n]-a,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*e[u]+(1-this._beta)*(i+r*o),this._beta*t[u]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var SA=function e(t){function n(e){return 1===t?new wA(e):new xA(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function OA(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function DA(e,t){this._context=e,this._k=(1-t)/6}DA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:OA(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:OA(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var RA=function e(t){function n(e){return new DA(e,t)}return n.tension=function(t){return e(+t)},n}(0);function jA(e,t){this._context=e,this._k=(1-t)/6}jA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:OA(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var MA=function e(t){function n(e){return new jA(e,t)}return n.tension=function(t){return e(+t)},n}(0);function NA(e,t){this._context=e,this._k=(1-t)/6}NA.prototype={areaStart:QA,areaEnd:QA,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:OA(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var FA=function e(t){function n(e){return new NA(e,t)}return n.tension=function(t){return e(+t)},n}(0),TA=Math.abs,LA=Math.atan2,PA=Math.cos,UA=Math.max,GA=Math.min,qA=Math.sin,HA=Math.sqrt,YA=Math.PI,JA=YA/2,zA=2*YA;function KA(e){return e>1?0:e<-1?YA:Math.acos(e)}function WA(e){return e>=1?JA:e<=-1?-JA:Math.asin(e)}function VA(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>1e-12){var A=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*A+e._x1*e._l23_2a-t*e._l12_2a)/c,o=(o*A+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function XA(e,t){this._context=e,this._alpha=t}XA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:VA(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ZA=function e(t){function n(e){return t?new XA(e,t):new DA(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function $A(e,t){this._context=e,this._alpha=t}$A.prototype={areaStart:QA,areaEnd:QA,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:VA(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ec=function e(t){function n(e){return t?new $A(e,t):new NA(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function tc(e,t){this._context=e,this._alpha=t}tc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:VA(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var nc=function e(t){function n(e){return t?new tc(e,t):new jA(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function rc(e){this._context=e}rc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var ic=function(e){return new rc(e)};function ac(e){this._context=e}ac.prototype={areaStart:QA,areaEnd:QA,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function oc(e){return e<0?-1:1}function sc(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(oc(a)+oc(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function uc(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Ac(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function cc(e){this._context=e}function lc(e){this._context=new fc(e)}function fc(e){this._context=e}function hc(e){this._context=e}function gc(e){var t,n,r=e.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}cc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ac(this,this._t0,uc(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ac(this,uc(this,n=sc(this,e,t)),n);break;default:Ac(this,this._t0,n=sc(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(lc.prototype=Object.create(cc.prototype)).point=function(e,t){cc.prototype.point.call(this,t,e)},fc.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}},hc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=gc(e),i=gc(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function dc(e,t){this._context=e,this._t=t}dc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var pc={basis:{curve:function(e){return new wA(e)}},"basis-closed":{curve:function(e){return new kA(e)}},"basis-open":{curve:function(e){return new _A(e)}},bundle:{curve:SA,tension:"beta",value:.85},cardinal:{curve:RA,tension:"tension",value:0},"cardinal-open":{curve:MA,tension:"tension",value:0},"cardinal-closed":{curve:FA,tension:"tension",value:0},"catmull-rom":{curve:ZA,tension:"alpha",value:.5},"catmull-rom-closed":{curve:ec,tension:"alpha",value:.5},"catmull-rom-open":{curve:nc,tension:"alpha",value:.5},linear:{curve:ic},"linear-closed":{curve:function(e){return new ac(e)}},monotone:{horizontal:function(e){return new lc(e)},vertical:function(e){return new cc(e)}},natural:{curve:function(e){return new hc(e)}},step:{curve:function(e){return new dc(e,.5)}},"step-after":{curve:function(e){return new dc(e,1)}},"step-before":{curve:function(e){return new dc(e,0)}}};function vc(e,t,n){var r=Object(R.v)(pc,e)&&pc[e],i=null;return r&&(i=r.curve||r[t||"vertical"],r.tension&&null!=n&&(i=i[r.tension](n))),i}var yc={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},mc=[/([MLHVCSQTAZmlhvcsqtaz])/g,/###/,/(\d)([-+])/g,/\s|,|###/],Ic=function(e){var t,n,r,i,a,o,s,u,A,c,l,f=[];for(u=0,c=(t=e.slice().replace(mc[0],"###$1").split(mc[1]).slice(1)).length;u<c;++u){for(r=(n=t[u]).slice(1).trim().replace(mc[2],"$1###$2").split(mc[3]),i=[o=n.charAt(0)],A=0,l=r.length;A<l;++A)(a=+r[A])===a&&i.push(a);if(s=yc[o.toLowerCase()],i.length-1>s)for(A=1,l=i.length;A<l;A+=s)f.push([o].concat(i.slice(A,A+s)));else f.push(i)}return f},bc=Math.PI/180,Ec=Math.PI/2,Cc=2*Math.PI,Bc=Math.sqrt(3)/2,wc={},Qc={},kc=[].join;function _c(e){var t=kc.call(e);if(Qc[t])return Qc[t];var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],A=e[7],c=A*o,l=-u*s,f=u*o,h=A*s,g=Math.cos(i),d=Math.sin(i),p=Math.cos(a),v=Math.sin(a),y=.5*(a-i),m=Math.sin(.5*y),I=8/3*m*m/Math.sin(y),b=n+g-I*d,E=r+d+I*g,C=n+p,B=r+v,w=C+I*v,Q=B-I*p;return Qc[t]=[c*b+l*E,f*b+h*E,c*w+l*Q,f*w+h*Q,c*C+l*B,f*C+h*B]}var xc=["l",0,0,0,0,0,0,0];function Sc(e,t,n){var r=xc[0]=e[0];if("a"===r||"A"===r)xc[1]=t*e[1],xc[2]=n*e[2],xc[3]=e[3],xc[4]=e[4],xc[5]=e[5],xc[6]=t*e[6],xc[7]=n*e[7];else if("h"===r||"H"===r)xc[1]=t*e[1];else if("v"===r||"V"===r)xc[1]=n*e[1];else for(var i=1,a=e.length;i<a;++i)xc[i]=(i%2==1?t:n)*e[i];return xc}var Oc=function(e,t,n,r,i,a){var o,s,u,A,c,l=null,f=0,h=0,g=0,d=0;null==n&&(n=0),null==r&&(r=0),null==i&&(i=1),null==a&&(a=i),e.beginPath&&e.beginPath();for(var p=0,v=t.length;p<v;++p){switch(o=t[p],1===i&&1===a||(o=Sc(o,i,a)),o[0]){case"l":f+=o[1],h+=o[2],e.lineTo(f+n,h+r);break;case"L":f=o[1],h=o[2],e.lineTo(f+n,h+r);break;case"h":f+=o[1],e.lineTo(f+n,h+r);break;case"H":f=o[1],e.lineTo(f+n,h+r);break;case"v":h+=o[1],e.lineTo(f+n,h+r);break;case"V":h=o[1],e.lineTo(f+n,h+r);break;case"m":f+=o[1],h+=o[2],e.moveTo(f+n,h+r);break;case"M":f=o[1],h=o[2],e.moveTo(f+n,h+r);break;case"c":s=f+o[5],u=h+o[6],g=f+o[3],d=h+o[4],e.bezierCurveTo(f+o[1]+n,h+o[2]+r,g+n,d+r,s+n,u+r),f=s,h=u;break;case"C":f=o[5],h=o[6],g=o[3],d=o[4],e.bezierCurveTo(o[1]+n,o[2]+r,g+n,d+r,f+n,h+r);break;case"s":s=f+o[3],u=h+o[4],g=2*f-g,d=2*h-d,e.bezierCurveTo(g+n,d+r,f+o[1]+n,h+o[2]+r,s+n,u+r),g=f+o[1],d=h+o[2],f=s,h=u;break;case"S":s=o[3],u=o[4],g=2*f-g,d=2*h-d,e.bezierCurveTo(g+n,d+r,o[1]+n,o[2]+r,s+n,u+r),f=s,h=u,g=o[1],d=o[2];break;case"q":s=f+o[3],u=h+o[4],g=f+o[1],d=h+o[2],e.quadraticCurveTo(g+n,d+r,s+n,u+r),f=s,h=u;break;case"Q":s=o[3],u=o[4],e.quadraticCurveTo(o[1]+n,o[2]+r,s+n,u+r),f=s,h=u,g=o[1],d=o[2];break;case"t":s=f+o[1],u=h+o[2],null===l[0].match(/[QqTt]/)?(g=f,d=h):"t"===l[0]?(g=2*f-A,d=2*h-c):"q"===l[0]&&(g=2*f-g,d=2*h-d),A=g,c=d,e.quadraticCurveTo(g+n,d+r,s+n,u+r),h=u,g=(f=s)+o[1],d=h+o[2];break;case"T":s=o[1],u=o[2],g=2*f-g,d=2*h-d,e.quadraticCurveTo(g+n,d+r,s+n,u+r),f=s,h=u;break;case"a":Dc(e,f+n,h+r,[o[1],o[2],o[3],o[4],o[5],o[6]+f+n,o[7]+h+r]),f+=o[6],h+=o[7];break;case"A":Dc(e,f+n,h+r,[o[1],o[2],o[3],o[4],o[5],o[6]+n,o[7]+r]),f=o[6],h=o[7];break;case"z":case"Z":e.closePath()}l=o}};function Dc(e,t,n,r){for(var i=function(e,t,n,r,i,a,o,s,u){var A=kc.call(arguments);if(wc[A])return wc[A];var c=o*bc,l=Math.sin(c),f=Math.cos(c),h=f*(s-e)*.5+l*(u-t)*.5,g=f*(u-t)*.5-l*(s-e)*.5,d=h*h/((n=Math.abs(n))*n)+g*g/((r=Math.abs(r))*r);d>1&&(n*=d=Math.sqrt(d),r*=d);var p=f/n,v=l/n,y=-l/r,m=f/r,I=p*s+v*u,b=y*s+m*u,E=p*e+v*t,C=y*e+m*t,B=(E-I)*(E-I)+(C-b)*(C-b),w=1/B-.25;w<0&&(w=0);var Q=Math.sqrt(w);a==i&&(Q=-Q);var k=.5*(I+E)-Q*(C-b),_=.5*(b+C)+Q*(E-I),x=Math.atan2(b-_,I-k),S=Math.atan2(C-_,E-k),O=S-x;O<0&&1===a?O+=Cc:O>0&&0===a&&(O-=Cc);for(var D=Math.ceil(Math.abs(O/(Ec+.001))),R=[],j=0;j<D;++j){var M=x+j*O/D,N=x+(j+1)*O/D;R[j]=[k,_,M,N,n,r,l,f]}return wc[A]=R}(r[5],r[6],r[0],r[1],r[3],r[4],r[2],t,n),a=0;a<i.length;++a){var o=_c(i[a]);e.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5])}}var Rc=.5773502691896257,jc={circle:{draw:function(e,t){var n=Math.sqrt(t)/2;e.moveTo(n,0),e.arc(0,0,n,0,Cc)}},cross:{draw:function(e,t){var n=Math.sqrt(t)/2,r=n/2.5;e.moveTo(-n,-r),e.lineTo(-n,r),e.lineTo(-r,r),e.lineTo(-r,n),e.lineTo(r,n),e.lineTo(r,r),e.lineTo(n,r),e.lineTo(n,-r),e.lineTo(r,-r),e.lineTo(r,-n),e.lineTo(-r,-n),e.lineTo(-r,-r),e.closePath()}},diamond:{draw:function(e,t){var n=Math.sqrt(t)/2;e.moveTo(-n,0),e.lineTo(0,-n),e.lineTo(n,0),e.lineTo(0,n),e.closePath()}},square:{draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}},arrow:{draw:function(e,t){var n=Math.sqrt(t)/2,r=n/7,i=n/2.5,a=n/8;e.moveTo(-r,n),e.lineTo(r,n),e.lineTo(r,-a),e.lineTo(i,-a),e.lineTo(0,-n),e.lineTo(-i,-a),e.lineTo(-r,-a),e.closePath()}},wedge:{draw:function(e,t){var n=Math.sqrt(t)/2,r=Bc*n,i=r-n*Rc,a=n/4;e.moveTo(0,-r-i),e.lineTo(-a,r-i),e.lineTo(a,r-i),e.closePath()}},triangle:{draw:function(e,t){var n=Math.sqrt(t)/2,r=Bc*n,i=r-n*Rc;e.moveTo(0,-r-i),e.lineTo(-n,r-i),e.lineTo(n,r-i),e.closePath()}},"triangle-up":{draw:function(e,t){var n=Math.sqrt(t)/2,r=Bc*n;e.moveTo(0,-r),e.lineTo(-n,r),e.lineTo(n,r),e.closePath()}},"triangle-down":{draw:function(e,t){var n=Math.sqrt(t)/2,r=Bc*n;e.moveTo(0,r),e.lineTo(-n,-r),e.lineTo(n,-r),e.closePath()}},"triangle-right":{draw:function(e,t){var n=Math.sqrt(t)/2,r=Bc*n;e.moveTo(r,0),e.lineTo(-r,-n),e.lineTo(-r,n),e.closePath()}},"triangle-left":{draw:function(e,t){var n=Math.sqrt(t)/2,r=Bc*n;e.moveTo(-r,0),e.lineTo(r,-n),e.lineTo(r,n),e.closePath()}},stroke:{draw:function(e,t){var n=Math.sqrt(t)/2;e.moveTo(-n,0),e.lineTo(n,0)}}};function Mc(e){return Object(R.v)(jc,e)?jc[e]:function(e){if(!Object(R.v)(Nc,e)){var t=Ic(e);Nc[e]={draw:function(e,n){Oc(e,t,0,0,Math.sqrt(n)/2)}}}return Nc[e]}(e)}var Nc={};var Fc=Math.PI,Tc=2*Fc,Lc=Tc-1e-6;function Pc(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Uc(){return new Pc}Pc.prototype=Uc.prototype={constructor:Pc,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,u=r-t,A=a-e,c=o-t,l=A*A+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(l>1e-6)if(Math.abs(c*s-u*A)>1e-6&&i){var f=n-a,h=r-o,g=s*s+u*u,d=f*f+h*h,p=Math.sqrt(g),v=Math.sqrt(l),y=i*Math.tan((Fc-Math.acos((g+l-d)/(2*p*v)))/2),m=y/v,I=y/p;Math.abs(m-1)>1e-6&&(this._+="L"+(e+m*A)+","+(t+m*c)),this._+="A"+i+","+i+",0,0,"+ +(c*f>A*h)+","+(this._x1=e+I*s)+","+(this._y1=t+I*u)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,i,a){e=+e,t=+t,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=e+o,A=t+s,c=1^a,l=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+A:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-A)>1e-6)&&(this._+="L"+u+","+A),n&&(l<0&&(l=l%Tc+Tc),l>Lc?this._+="A"+n+","+n+",0,1,"+c+","+(e-o)+","+(t-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=A):l>1e-6&&(this._+="A"+n+","+n+",0,"+ +(l>=Fc)+","+c+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Gc=Uc,qc=.448084975506;function Hc(e){return e.x}function Yc(e){return e.y}function Jc(e){return e.width}function zc(e){return e.height}function Kc(e){return"function"===typeof e?e:function(){return+e}}function Wc(e,t,n){return Math.max(t,Math.min(e,n))}var Vc=function(){var e=Hc,t=Yc,n=Jc,r=zc,i=Kc(0),a=i,o=i,s=i,u=null;function A(A,c,l){var f,h=null!=c?c:+e.call(this,A),g=null!=l?l:+t.call(this,A),d=+n.call(this,A),p=+r.call(this,A),v=Math.min(d,p)/2,y=Wc(+i.call(this,A),0,v),m=Wc(+a.call(this,A),0,v),I=Wc(+o.call(this,A),0,v),b=Wc(+s.call(this,A),0,v);if(u||(u=f=Gc()),y<=0&&m<=0&&I<=0&&b<=0)u.rect(h,g,d,p);else{var E=h+d,C=g+p;u.moveTo(h+y,g),u.lineTo(E-m,g),u.bezierCurveTo(E-qc*m,g,E,g+qc*m,E,g+m),u.lineTo(E,C-b),u.bezierCurveTo(E,C-qc*b,E-qc*b,C,E-b,C),u.lineTo(h+I,C),u.bezierCurveTo(h+qc*I,C,h,C-qc*I,h,C-I),u.lineTo(h,g+y),u.bezierCurveTo(h,g+qc*y,h+qc*y,g,h+y,g),u.closePath()}if(f)return u=null,f+""||null}return A.x=function(t){return arguments.length?(e=Kc(t),A):e},A.y=function(e){return arguments.length?(t=Kc(e),A):t},A.width=function(e){return arguments.length?(n=Kc(e),A):n},A.height=function(e){return arguments.length?(r=Kc(e),A):r},A.cornerRadius=function(e,t,n,r){return arguments.length?(i=Kc(e),a=null!=t?Kc(t):i,s=null!=n?Kc(n):i,o=null!=r?Kc(r):a,A):i},A.context=function(e){return arguments.length?(u=null==e?null:e,A):u},A},Xc=function(){var e,t,n,r,i,a,o,s,u=null;function A(e,t,n){var r=n/2;if(i){var A=o-t,c=e-a;if(A||c){var l=Math.sqrt(A*A+c*c),f=(A/=l)*s,h=(c/=l)*s,g=Math.atan2(c,A);u.moveTo(a-f,o-h),u.lineTo(e-A*r,t-c*r),u.arc(e,t,r,g-Math.PI,g),u.lineTo(a+f,o+h),u.arc(a,o,s,g,g+Math.PI)}else u.arc(e,t,r,0,Cc);u.closePath()}else i=1;a=e,o=t,s=r}function c(a){var o,s,c,l=a.length,f=!1;for(null==u&&(u=c=Gc()),o=0;o<=l;++o)!(o<l&&r(s=a[o],o,a))===f&&(f=!f)&&(i=0),f&&A(+e(s,o,a),+t(s,o,a),+n(s,o,a));if(c)return u=null,c+""||null}return c.x=function(t){return arguments.length?(e=t,c):e},c.y=function(e){return arguments.length?(t=e,c):t},c.size=function(e){return arguments.length?(n=e,c):n},c.defined=function(e){return arguments.length?(r=e,c):r},c.context=function(e){return arguments.length?(u=null==e?null:e,c):u},c},Zc=function(e){return function(){return e}};function $c(e){return e.innerRadius}function el(e){return e.outerRadius}function tl(e){return e.startAngle}function nl(e){return e.endAngle}function rl(e){return e&&e.padAngle}function il(e,t,n,r,i,a,o,s){var u=n-e,A=r-t,c=o-i,l=s-a,f=l*u-c*A;if(!(f*f<1e-12))return[e+(f=(c*(t-a)-l*(e-i))/f)*u,t+f*A]}function al(e,t,n,r,i,a,o){var s=e-n,u=t-r,A=(o?a:-a)/HA(s*s+u*u),c=A*u,l=-A*s,f=e+c,h=t+l,g=n+c,d=r+l,p=(f+g)/2,v=(h+d)/2,y=g-f,m=d-h,I=y*y+m*m,b=i-a,E=f*d-g*h,C=(m<0?-1:1)*HA(UA(0,b*b*I-E*E)),B=(E*m-y*C)/I,w=(-E*y-m*C)/I,Q=(E*m+y*C)/I,k=(-E*y+m*C)/I,_=B-p,x=w-v,S=Q-p,O=k-v;return _*_+x*x>S*S+O*O&&(B=Q,w=k),{cx:B,cy:w,x01:-c,y01:-l,x11:B*(i/b-1),y11:w*(i/b-1)}}function ol(e){return e[0]}function sl(e){return e[1]}var ul=function(){var e=ol,t=sl,n=Zc(!0),r=null,i=ic,a=null;function o(o){var s,u,A,c=o.length,l=!1;for(null==r&&(a=i(A=Gc())),s=0;s<=c;++s)!(s<c&&n(u=o[s],s,o))===l&&((l=!l)?a.lineStart():a.lineEnd()),l&&a.point(+e(u,s,o),+t(u,s,o));if(A)return a=null,A+""||null}return o.x=function(t){return arguments.length?(e="function"===typeof t?t:Zc(+t),o):e},o.y=function(e){return arguments.length?(t="function"===typeof e?e:Zc(+e),o):t},o.defined=function(e){return arguments.length?(n="function"===typeof e?e:Zc(!!e),o):n},o.curve=function(e){return arguments.length?(i=e,null!=r&&(a=i(r)),o):i},o.context=function(e){return arguments.length?(null==e?r=a=null:a=i(r=e),o):r},o},Al=function(){var e=ol,t=null,n=Zc(0),r=sl,i=Zc(!0),a=null,o=ic,s=null;function u(u){var A,c,l,f,h,g=u.length,d=!1,p=new Array(g),v=new Array(g);for(null==a&&(s=o(h=Gc())),A=0;A<=g;++A){if(!(A<g&&i(f=u[A],A,u))===d)if(d=!d)c=A,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),l=A-1;l>=c;--l)s.point(p[l],v[l]);s.lineEnd(),s.areaEnd()}d&&(p[A]=+e(f,A,u),v[A]=+n(f,A,u),s.point(t?+t(f,A,u):p[A],r?+r(f,A,u):v[A]))}if(h)return s=null,h+""||null}function A(){return ul().defined(i).curve(o).context(a)}return u.x=function(n){return arguments.length?(e="function"===typeof n?n:Zc(+n),t=null,u):e},u.x0=function(t){return arguments.length?(e="function"===typeof t?t:Zc(+t),u):e},u.x1=function(e){return arguments.length?(t=null==e?null:"function"===typeof e?e:Zc(+e),u):t},u.y=function(e){return arguments.length?(n="function"===typeof e?e:Zc(+e),r=null,u):n},u.y0=function(e){return arguments.length?(n="function"===typeof e?e:Zc(+e),u):n},u.y1=function(e){return arguments.length?(r=null==e?null:"function"===typeof e?e:Zc(+e),u):r},u.lineX0=u.lineY0=function(){return A().x(e).y(n)},u.lineY1=function(){return A().x(e).y(r)},u.lineX1=function(){return A().x(t).y(n)},u.defined=function(e){return arguments.length?(i="function"===typeof e?e:Zc(!!e),u):i},u.curve=function(e){return arguments.length?(o=e,null!=a&&(s=o(a)),u):o},u.context=function(e){return arguments.length?(null==e?a=s=null:s=o(a=e),u):a},u},cl={draw:function(e,t){var n=Math.sqrt(t/YA);e.moveTo(n,0),e.arc(0,0,n,0,zA)}},ll=(Math.sqrt(1/3),Math.sin(YA/10)/Math.sin(7*YA/10));Math.sin(zA/10),Math.cos(zA/10),Math.sqrt(3),Math.sqrt(3),Math.sqrt(12);function fl(e,t){return null!=e?e:t}var hl=function(e){return e.x||0},gl=function(e){return e.y||0},dl=function(e){return!(!1===e.defined)},pl=function(){var e=$c,t=el,n=Zc(0),r=null,i=tl,a=nl,o=rl,s=null;function u(){var u,A,c=+e.apply(this,arguments),l=+t.apply(this,arguments),f=i.apply(this,arguments)-JA,h=a.apply(this,arguments)-JA,g=TA(h-f),d=h>f;if(s||(s=u=Gc()),l<c&&(A=l,l=c,c=A),l>1e-12)if(g>zA-1e-12)s.moveTo(l*PA(f),l*qA(f)),s.arc(0,0,l,f,h,!d),c>1e-12&&(s.moveTo(c*PA(h),c*qA(h)),s.arc(0,0,c,h,f,d));else{var p,v,y=f,m=h,I=f,b=h,E=g,C=g,B=o.apply(this,arguments)/2,w=B>1e-12&&(r?+r.apply(this,arguments):HA(c*c+l*l)),Q=GA(TA(l-c)/2,+n.apply(this,arguments)),k=Q,_=Q;if(w>1e-12){var x=WA(w/c*qA(B)),S=WA(w/l*qA(B));(E-=2*x)>1e-12?(I+=x*=d?1:-1,b-=x):(E=0,I=b=(f+h)/2),(C-=2*S)>1e-12?(y+=S*=d?1:-1,m-=S):(C=0,y=m=(f+h)/2)}var O=l*PA(y),D=l*qA(y),R=c*PA(b),j=c*qA(b);if(Q>1e-12){var M,N=l*PA(m),F=l*qA(m),T=c*PA(I),L=c*qA(I);if(g<YA&&(M=il(O,D,T,L,N,F,R,j))){var P=O-M[0],U=D-M[1],G=N-M[0],q=F-M[1],H=1/qA(KA((P*G+U*q)/(HA(P*P+U*U)*HA(G*G+q*q)))/2),Y=HA(M[0]*M[0]+M[1]*M[1]);k=GA(Q,(c-Y)/(H-1)),_=GA(Q,(l-Y)/(H+1))}}C>1e-12?_>1e-12?(p=al(T,L,O,D,l,_,d),v=al(N,F,R,j,l,_,d),s.moveTo(p.cx+p.x01,p.cy+p.y01),_<Q?s.arc(p.cx,p.cy,_,LA(p.y01,p.x01),LA(v.y01,v.x01),!d):(s.arc(p.cx,p.cy,_,LA(p.y01,p.x01),LA(p.y11,p.x11),!d),s.arc(0,0,l,LA(p.cy+p.y11,p.cx+p.x11),LA(v.cy+v.y11,v.cx+v.x11),!d),s.arc(v.cx,v.cy,_,LA(v.y11,v.x11),LA(v.y01,v.x01),!d))):(s.moveTo(O,D),s.arc(0,0,l,y,m,!d)):s.moveTo(O,D),c>1e-12&&E>1e-12?k>1e-12?(p=al(R,j,N,F,c,-k,d),v=al(O,D,T,L,c,-k,d),s.lineTo(p.cx+p.x01,p.cy+p.y01),k<Q?s.arc(p.cx,p.cy,k,LA(p.y01,p.x01),LA(v.y01,v.x01),!d):(s.arc(p.cx,p.cy,k,LA(p.y01,p.x01),LA(p.y11,p.x11),!d),s.arc(0,0,c,LA(p.cy+p.y11,p.cx+p.x11),LA(v.cy+v.y11,v.cx+v.x11),d),s.arc(v.cx,v.cy,k,LA(v.y11,v.x11),LA(v.y01,v.x01),!d))):s.arc(0,0,c,b,I,d):s.lineTo(R,j)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-YA/2;return[PA(r)*n,qA(r)*n]},u.innerRadius=function(t){return arguments.length?(e="function"===typeof t?t:Zc(+t),u):e},u.outerRadius=function(e){return arguments.length?(t="function"===typeof e?e:Zc(+e),u):t},u.cornerRadius=function(e){return arguments.length?(n="function"===typeof e?e:Zc(+e),u):n},u.padRadius=function(e){return arguments.length?(r=null==e?null:"function"===typeof e?e:Zc(+e),u):r},u.startAngle=function(e){return arguments.length?(i="function"===typeof e?e:Zc(+e),u):i},u.endAngle=function(e){return arguments.length?(a="function"===typeof e?e:Zc(+e),u):a},u.padAngle=function(e){return arguments.length?(o="function"===typeof e?e:Zc(+e),u):o},u.context=function(e){return arguments.length?(s=null==e?null:e,u):s},u}().startAngle((function(e){return e.startAngle||0})).endAngle((function(e){return e.endAngle||0})).padAngle((function(e){return e.padAngle||0})).innerRadius((function(e){return e.innerRadius||0})).outerRadius((function(e){return e.outerRadius||0})).cornerRadius((function(e){return e.cornerRadius||0})),vl=Al().x(hl).y1(gl).y0((function(e){return(e.y||0)+(e.height||0)})).defined(dl),yl=Al().y(gl).x1(hl).x0((function(e){return(e.x||0)+(e.width||0)})).defined(dl),ml=ul().x(hl).y(gl).defined(dl),Il=Vc().x(hl).y(gl).width((function(e){return e.width||0})).height((function(e){return e.height||0})).cornerRadius((function(e){return fl(e.cornerRadiusTopLeft,e.cornerRadius)||0}),(function(e){return fl(e.cornerRadiusTopRight,e.cornerRadius)||0}),(function(e){return fl(e.cornerRadiusBottomRight,e.cornerRadius)||0}),(function(e){return fl(e.cornerRadiusBottomLeft,e.cornerRadius)||0})),bl=function(){var e=Zc(cl),t=Zc(64),n=null;function r(){var r;if(n||(n=r=Gc()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(t){return arguments.length?(e="function"===typeof t?t:Zc(t),r):e},r.size=function(e){return arguments.length?(t="function"===typeof e?e:Zc(+e),r):t},r.context=function(e){return arguments.length?(n=null==e?null:e,r):n},r}().type((function(e){return Mc(e.shape||"circle")})).size((function(e){return fl(e.size,64)})),El=Xc().x(hl).y(gl).defined(dl).size((function(e){return e.size||1}));function Cl(e){return e.cornerRadius||e.cornerRadiusTopLeft||e.cornerRadiusTopRight||e.cornerRadiusBottomRight||e.cornerRadiusBottomLeft}function Bl(e,t,n,r){return Il.context(e)(t,n,r)}var wl=1;function Ql(){wl=1}var kl=function(e,t,n){var r=t.clip,i=e._defs,a=t.clip_id||(t.clip_id="clip"+wl++),o=i.clipping[a]||(i.clipping[a]={id:a});return Object(R.D)(r)?o.path=r(null):Cl(n)?o.path=Bl(null,n,0,0):(o.width=n.width||0,o.height=n.height||0),"url(#"+a+")"};function _l(e){this.clear(),e&&this.union(e)}var xl=_l.prototype;function Sl(e){this.mark=e,this.bounds=this.bounds||new _l}function Ol(e){Sl.call(this,e),this.items=this.items||[]}function Dl(e,t){if("undefined"!==typeof document&&document.createElement){var n=document.createElement("canvas");if(n&&n.getContext)return n.width=e,n.height=t,n}return null}function Rl(){return"undefined"!==typeof Image?Image:null}function jl(e){this._pending=0,this._loader=e||Ya()}xl.clone=function(){return new _l(this)},xl.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},xl.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},xl.equals=function(e){return this.x1===e.x1&&this.y1===e.y1&&this.x2===e.x2&&this.y2===e.y2},xl.set=function(e,t,n,r){return n<e?(this.x2=e,this.x1=n):(this.x1=e,this.x2=n),r<t?(this.y2=t,this.y1=r):(this.y1=t,this.y2=r),this},xl.add=function(e,t){return e<this.x1&&(this.x1=e),t<this.y1&&(this.y1=t),e>this.x2&&(this.x2=e),t>this.y2&&(this.y2=t),this},xl.expand=function(e){return this.x1-=e,this.y1-=e,this.x2+=e,this.y2+=e,this},xl.round=function(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},xl.scale=function(e){return this.x1*=e,this.y1*=e,this.x2*=e,this.y2*=e,this},xl.translate=function(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this},xl.rotate=function(e,t,n){var r=this.rotatedPoints(e,t,n);return this.clear().add(r[0],r[1]).add(r[2],r[3]).add(r[4],r[5]).add(r[6],r[7])},xl.rotatedPoints=function(e,t,n){var r=this.x1,i=this.y1,a=this.x2,o=this.y2,s=Math.cos(e),u=Math.sin(e),A=t-t*s+n*u,c=n-t*u-n*s;return[s*r-u*i+A,u*r+s*i+c,s*r-u*o+A,u*r+s*o+c,s*a-u*i+A,u*a+s*i+c,s*a-u*o+A,u*a+s*o+c]},xl.union=function(e){return e.x1<this.x1&&(this.x1=e.x1),e.y1<this.y1&&(this.y1=e.y1),e.x2>this.x2&&(this.x2=e.x2),e.y2>this.y2&&(this.y2=e.y2),this},xl.intersect=function(e){return e.x1>this.x1&&(this.x1=e.x1),e.y1>this.y1&&(this.y1=e.y1),e.x2<this.x2&&(this.x2=e.x2),e.y2<this.y2&&(this.y2=e.y2),this},xl.encloses=function(e){return e&&this.x1<=e.x1&&this.x2>=e.x2&&this.y1<=e.y1&&this.y2>=e.y2},xl.alignsWith=function(e){return e&&(this.x1==e.x1||this.x2==e.x2||this.y1==e.y1||this.y2==e.y2)},xl.intersects=function(e){return e&&!(this.x2<e.x1||this.x1>e.x2||this.y2<e.y1||this.y1>e.y2)},xl.contains=function(e,t){return!(e<this.x1||e>this.x2||t<this.y1||t>this.y2)},xl.width=function(){return this.x2-this.x1},xl.height=function(){return this.y2-this.y1},Object(R.y)(Ol,Sl);var Ml=jl.prototype;function Nl(e){e._pending+=1}function Fl(e){e._pending-=1}Ml.pending=function(){return this._pending},Ml.sanitizeURL=function(e){var t=this;return Nl(t),t._loader.sanitize(e,{context:"href"}).then((function(e){return Fl(t),e})).catch((function(){return Fl(t),null}))},Ml.loadImage=function(e){var t=this,n=Rl();return Nl(t),t._loader.sanitize(e,{context:"image"}).then((function(e){var r=e.href;if(!r||!n)throw{url:r};var i=new n,a=Object(R.v)(e,"crossOrigin")?e.crossOrigin:"anonymous";return null!=a&&(i.crossOrigin=a),i.onload=function(){return Fl(t)},i.onerror=function(){return Fl(t)},i.src=r,i})).catch((function(e){return Fl(t),{complete:!1,width:0,height:0,src:e&&e.url||""}}))},Ml.ready=function(){var e=this;return new Promise((function(t){!function n(r){e.pending()?setTimeout((function(){n(!0)}),10):t(r)}(!1)}))};var Tl=function(e,t,n){if(t.stroke&&0!==t.opacity&&0!==t.strokeOpacity){var r=null!=t.strokeWidth?+t.strokeWidth:1;e.expand(r+(n?function(e,t){return e.strokeJoin&&"miter"!==e.strokeJoin?0:t}(t,r):0))}return e};var Ll,Pl,Ul,Gl=Cc-1e-8;function ql(e){return Ll=e,ql}function Hl(){}function Yl(e,t){Ll.add(e,t)}function Jl(e,t){Yl(Pl=e,Ul=t)}function zl(e){Yl(e,Ll.y1)}function Kl(e){Yl(Ll.x1,e)}function Wl(e,t,n,r){var i=(e-t)/(e+n-2*t);0<i&&i<1&&r(e+(t-e)*i)}function Vl(e,t,n,r,i){var a,o=r-e+3*t-3*n,s=e+n-2*t,u=e-t,A=0,c=0;Math.abs(o)>1e-14?(a=s*s+u*o)>=0&&(A=(-s+(a=Math.sqrt(a)))/o,c=(-s-a)/o):A=.5*u/s,0<A&&A<1&&i(Xl(A,e,t,n,r)),0<c&&c<1&&i(Xl(c,e,t,n,r))}function Xl(e,t,n,r,i){var a=1-e,o=a*a,s=e*e;return o*a*t+3*o*e*n+3*a*s*r+s*e*i}ql.beginPath=Hl,ql.closePath=Hl,ql.moveTo=Jl,ql.lineTo=Jl,ql.rect=function(e,t,n,r){Yl(e+n,t+r),Jl(e,t)},ql.quadraticCurveTo=function(e,t,n,r){Wl(Pl,e,n,zl),Wl(Ul,t,r,Kl),Jl(n,r)},ql.bezierCurveTo=function(e,t,n,r,i,a){Vl(Pl,e,n,i,zl),Vl(Ul,t,r,a,Kl),Jl(i,a)},ql.arc=function(e,t,n,r,i,a){if(Pl=n*Math.cos(i)+e,Ul=n*Math.sin(i)+t,Math.abs(i-r)>Gl)Yl(e-n,t-n),Yl(e+n,t+n);else{var o,s,u=function(r){return Yl(n*Math.cos(r)+e,n*Math.sin(r)+t)};if(u(r),u(i),i!==r)if((r%=Cc)<0&&(r+=Cc),(i%=Cc)<0&&(i+=Cc),i<r&&(a=!a,o=r,r=i,i=o),a)for(i-=Cc,o=r-r%Ec,s=0;s<4&&o>i;++s,o-=Ec)u(o);else for(o=r-r%Ec+Ec,s=0;s<4&&o<i;++s,o+=Ec)u(o)}};var Zl=(Zl=Dl(1,1))?Zl.getContext("2d"):null,$l=new _l;function ef(e){return function(t,n){if(!Zl)return!0;e(Zl,t),$l.clear().union(t.bounds).intersect(n).round();for(var r=$l.x1,i=$l.y1,a=$l.x2,o=$l.y2,s=i;s<=o;++s)for(var u=r;u<=a;++u)if(Zl.isPointInPath(u,s))return!0;return!1}}function tf(e,t){return t.contains(e.x||0,e.y||0)}function nf(e,t){var n=e.x||0,r=e.y||0,i=e.width||0,a=e.height||0;return t.intersects($l.set(n,r,n+i,r+a))}function rf(e,t){var n=e.x||0,r=e.y||0;return af(t,n,r,null!=e.x2?e.x2:n,null!=e.y2?e.y2:r)}function af(e,t,n,r,i){var a,o,s,u,A=e.x1,c=e.y1,l=e.x2,f=e.y2,h=r-t,g=i-n,d=0,p=1;for(u=0;u<4;++u){if(0===u&&(a=-h,o=-(A-t)),1===u&&(a=h,o=l-t),2===u&&(a=-g,o=-(c-n)),3===u&&(a=g,o=f-n),Math.abs(a)<1e-10&&o<0)return!1;if(s=o/a,a<0){if(s>p)return!1;s>d&&(d=s)}else if(a>0){if(s<d)return!1;s<p&&(p=s)}}return!0}var of=function(e,t){e.globalCompositeOperation=t.blend||"source-over"},sf=function(e,t){return null==e?t:e};function uf(e,t){for(var n=t.length,r=0;r<n;++r)e.addColorStop(t[r].offset,t[r].color);return e}var Af=function(e,t,n){return IA(n)?function(e,t,n){var r,i=n.width(),a=n.height();if("radial"===t.gradient)r=e.createRadialGradient(n.x1+sf(t.x1,.5)*i,n.y1+sf(t.y1,.5)*a,Math.max(i,a)*sf(t.r1,0),n.x1+sf(t.x2,.5)*i,n.y1+sf(t.y2,.5)*a,Math.max(i,a)*sf(t.r2,.5));else{var o=sf(t.x1,0),s=sf(t.y1,0),u=sf(t.x2,1),A=sf(t.y2,0);if(o!==u&&s!==A&&i!==a){var c=Dl(Math.ceil(i),Math.ceil(a)),l=c.getContext("2d");return l.scale(i,a),l.fillStyle=uf(l.createLinearGradient(o,s,u,A),t.stops),l.fillRect(0,0,i,a),e.createPattern(c,"no-repeat")}r=e.createLinearGradient(n.x1+o*i,n.y1+s*a,n.x1+u*i,n.y1+A*a)}return uf(r,t.stops)}(e,n,t.bounds):n},cf=function(e,t,n){return(n*=null==t.fillOpacity?1:t.fillOpacity)>0&&(e.globalAlpha=n,e.fillStyle=Af(e,t,t.fill),!0)},lf=[],ff=function(e,t,n){var r=null!=(r=t.strokeWidth)?r:1;return!(r<=0)&&((n*=null==t.strokeOpacity?1:t.strokeOpacity)>0&&(e.globalAlpha=n,e.strokeStyle=Af(e,t,t.stroke),e.lineWidth=r,e.lineCap=t.strokeCap||"butt",e.lineJoin=t.strokeJoin||"miter",e.miterLimit=t.strokeMiterLimit||10,e.setLineDash&&(e.setLineDash(t.strokeDash||lf),e.lineDashOffset=t.strokeDashOffset||0),!0))};function hf(e,t){return e.zindex-t.zindex||e.index-t.index}function gf(e){if(!e.zdirty)return e.zitems;var t,n,r,i=e.items,a=[];for(n=0,r=i.length;n<r;++n)(t=i[n]).index=n,t.zindex&&a.push(t);return e.zdirty=!1,e.zitems=a.sort(hf)}function df(e,t){var n,r,i=e.items;if(i&&i.length){var a=gf(e);if(a&&a.length){for(n=0,r=i.length;n<r;++n)i[n].zindex||t(i[n]);i=a}for(n=0,r=i.length;n<r;++n)t(i[n])}}function pf(e,t){var n,r,i=e.items;if(!i||!i.length)return null;var a=gf(e);for(a&&a.length&&(i=a),r=i.length;--r>=0;)if(n=t(i[r]))return n;if(i===a)for(r=(i=e.items).length;--r>=0;)if(!i[r].zindex&&(n=t(i[r])))return n;return null}function vf(e){return function(t,n,r){df(n,(function(n){r&&!r.intersects(n.bounds)||yf(e,t,n,n)}))}}function yf(e,t,n,r){var i=null==n.opacity?1:n.opacity;0!==i&&(e(t,r)||(of(t,n),n.fill&&cf(t,n,i)&&t.fill(),n.stroke&&ff(t,n,i)&&t.stroke()))}function mf(e){return e=e||R.gb,function(t,n,r,i,a,o){return r*=t.pixelRatio,i*=t.pixelRatio,pf(n,(function(n){var s=n.bounds;if((!s||s.contains(a,o))&&s)return e(t,n,r,i,a,o)?n:void 0}))}}function If(e,t){return function(n,r,i,a){var o,s,u=Array.isArray(r)?r[0]:r,A=null==t?u.fill:t,c=u.stroke&&n.isPointInStroke;return c&&(o=u.strokeWidth,s=u.strokeCap,n.lineWidth=null!=o?o:1,n.lineCap=null!=s?s:"butt"),!e(n,r)&&(A&&n.isPointInPath(i,a)||c&&n.isPointInStroke(i,a))}}function bf(e){return mf(If(e))}function Ef(e,t){return"translate("+e+","+t+")"}function Cf(e){return"rotate("+e+")"}function Bf(e){return Ef(e.x||0,e.y||0)}function wf(e){return Ef(e.x||0,e.y||0)+(e.angle?" "+Cf(e.angle):"")+(e.scaleX||e.scaleY?" "+(t=e.scaleX||1,n=e.scaleY||1,"scale("+t+","+n+")"):"");var t,n}var Qf=function(e,t,n){function r(e,n){var r=n.x||0,i=n.y||0,a=n.angle||0;e.translate(r,i),a&&e.rotate(a*=bc),e.beginPath(),t(e,n),a&&e.rotate(-a),e.translate(-r,-i)}return{type:e,tag:"path",nested:!1,attr:function(e,n){e("transform",wf(n)),e("d",t(null,n))},bound:function(e,n){var r=n.x||0,i=n.y||0;return t(ql(e),n),Tl(e,n).translate(r,i),n.angle&&e.rotate(n.angle*bc,r,i),e},draw:vf(r),pick:bf(r),isect:n||ef(r)}},kf=Qf("arc",(function(e,t){return pl.context(e)(t)}));var _f=function(e,t,n){function r(e,n){e.beginPath(),t(e,n)}var i,a=If(r);return{type:e,tag:"path",nested:!0,attr:function(e,n){var r=n.mark.items;r.length&&e("d",t(null,r))},bound:function(e,n){var r=n.items;return 0===r.length?e:(t(ql(e),r),Tl(e,r[0]))},draw:(i=r,function(e,t,n){!t.items.length||n&&!n.intersects(t.bounds)||yf(i,e,t.items[0],t.items)}),pick:function(e,t,n,r,i,o){var s=t.items,u=t.bounds;return!s||!s.length||u&&!u.contains(i,o)?null:(n*=e.pixelRatio,r*=e.pixelRatio,a(e,s,n,r)?s[0]:null)},isect:tf,tip:n}},xf=_f("area",(function(e,t){var n=t[0],r=n.interpolate||"linear";return("horizontal"===n.orient?yl:vl).curve(vc(r,n.orient,n.tension)).context(e)(t)}),(function(e,t){for(var n,r,i="horizontal"===e[0].orient?t[1]:t[0],a="horizontal"===e[0].orient?"y":"x",o=e.length,s=1/0;--o>=0;)!1!==e[o].defined&&(r=Math.abs(e[o][a]-i))<s&&(s=r,n=e[o]);return n}));function Sf(e,t){e.beginPath(),Cl(t)?Bl(e,t,0,0):e.rect(0,0,t.width||0,t.height||0),e.clip()}function Of(e){var t=sf(e.strokeWidth,1);return null!=e.strokeOffset?e.strokeOffset:e.stroke&&t>.5&&t<1.5?.5-Math.abs(t-1):0}function Df(e,t){var n=Of(t);e("d",Bl(null,t,n,n))}function Rf(e,t,n,r){var i=Of(t);e.beginPath(),Bl(e,t,(n||0)+i,(r||0)+i)}var jf=If(Rf),Mf=If(Rf,!1);var Nf={type:"group",tag:"g",nested:!1,attr:function(e,t){e("transform",Bf(t))},bound:function(e,t){if(!t.clip&&t.items)for(var n=t.items,r=n.length,i=0;i<r;++i)e.union(n[i].bounds);return(t.clip||t.width||t.height)&&!t.noBound&&e.add(0,0).add(t.width||0,t.height||0),Tl(e,t),e.translate(t.x||0,t.y||0)},draw:function(e,t,n){var r=this;df(t,(function(t){var i=t.x||0,a=t.y||0,o=t.strokeForeground,s=null==t.opacity?1:t.opacity;(t.stroke||t.fill)&&s&&(Rf(e,t,i,a),of(e,t),t.fill&&cf(e,t,s)&&e.fill(),t.stroke&&!o&&ff(e,t,s)&&e.stroke()),e.save(),e.translate(i,a),t.clip&&Sf(e,t),n&&n.translate(-i,-a),df(t,(function(t){r.draw(e,t,n)})),n&&n.translate(i,a),e.restore(),o&&t.stroke&&s&&(Rf(e,t,i,a),of(e,t),ff(e,t,s)&&e.stroke())}))},pick:function(e,t,n,r,i,a){var o=this;if(t.bounds&&!t.bounds.contains(i,a)||!t.items)return null;var s=n*e.pixelRatio,u=r*e.pixelRatio;return pf(t,(function(A){var c,l,f,h,g,d,p,v,y;if((!(v=A.bounds)||v.contains(i,a))&&(h=A.x||0,g=A.y||0,d=h+(A.width||0),p=g+(A.height||0),!(y=A.clip)||!(i<h||i>d||a<g||a>p)))return e.save(),e.translate(h,g),h=i-h,g=a-g,y&&Cl(A)&&!jf(e,A,s,u)?(e.restore(),null):(l=A.strokeForeground,(f=!1!==t.interactive)&&l&&A.stroke&&Mf(e,A,s,u)?(e.restore(),A):(!(c=pf(A,(function(e){return function(e,t,n){return(!1!==e.interactive||"group"===e.marktype)&&e.bounds&&e.bounds.contains(t,n)}(e,h,g)?o.pick(e,n,r,h,g):null})))&&f&&(A.fill||!l&&A.stroke)&&jf(e,A,s,u)&&(c=A),e.restore(),c||null))}))},isect:nf,content:function(e,t,n){e("clip-path",t.clip?kl(n,t,t):null)},background:function(e,t){e("class","background"),e("aria-hidden",!0),Df(e,t)},foreground:function(e,t){e("class","foreground"),e("aria-hidden",!0),t.strokeForeground?Df(e,t):e("d","")}},Ff={version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};function Tf(e,t){var n=e.image;return(!n||e.url&&e.url!==n.url)&&(n={complete:!1,width:0,height:0},t.loadImage(e.url).then((function(t){e.image=t,e.image.url=e.url}))),n}function Lf(e,t){return null!=e.width?e.width:t&&t.width?!1!==e.aspect&&e.height?e.height*t.width/t.height:t.width:0}function Pf(e,t){return null!=e.height?e.height:t&&t.height?!1!==e.aspect&&e.width?e.width*t.height/t.width:t.height:0}function Uf(e,t){return"center"===e?t/2:"right"===e?t:0}function Gf(e,t){return"middle"===e?t/2:"bottom"===e?t:0}var qf={type:"image",tag:"image",nested:!1,attr:function(e,t,n){var r=Tf(t,n),i=Lf(t,r),a=Pf(t,r),o=(t.x||0)-Uf(t.align,i),s=(t.y||0)-Gf(t.baseline,a);e("href",!r.src&&r.toDataURL?r.toDataURL():r.src||"",Ff["xmlns:xlink"],"xlink:href"),e("transform",Ef(o,s)),e("width",i),e("height",a),e("preserveAspectRatio",!1===t.aspect?"none":"xMidYMid")},bound:function(e,t){var n=t.image,r=Lf(t,n),i=Pf(t,n),a=(t.x||0)-Uf(t.align,r),o=(t.y||0)-Gf(t.baseline,i);return e.set(a,o,a+r,o+i)},draw:function(e,t,n){var r=this;df(t,(function(t){if(!n||n.intersects(t.bounds)){var i,a,o,s,u=Tf(t,r),A=Lf(t,u),c=Pf(t,u),l=(t.x||0)-Uf(t.align,A),f=(t.y||0)-Gf(t.baseline,c);!1!==t.aspect&&(a=u.width/u.height,o=t.width/t.height,a===a&&o===o&&a!==o&&(o<a?(f+=(c-(s=A/a))/2,c=s):(l+=(A-(s=c*a))/2,A=s))),(u.complete||u.toDataURL)&&(of(e,t),e.globalAlpha=null!=(i=t.opacity)?i:1,e.imageSmoothingEnabled=!1!==t.smooth,e.drawImage(u,l,f,A,c))}}))},pick:mf(),isect:R.gb,get:Tf,xOffset:Uf,yOffset:Gf},Hf=_f("line",(function(e,t){var n=t[0],r=n.interpolate||"linear";return ml.curve(vc(r,n.orient,n.tension)).context(e)(t)}),(function(e,t){for(var n,r,i=Math.pow(e[0].strokeWidth||1,2),a=e.length;--a>=0;)if(!1!==e[a].defined&&(n=e[a].x-t[0])*n+(r=e[a].y-t[1])*r<i)return e[a];return null}));function Yf(e,t){var n=t.path;if(null==n)return!0;var r=t.x||0,i=t.y||0,a=t.scaleX||1,o=t.scaleY||1,s=(t.angle||0)*bc,u=t.pathCache;u&&u.path===n||((t.pathCache=u=Ic(n)).path=n),s&&e.rotate&&e.translate?(e.translate(r,i),e.rotate(s),Oc(e,u,0,0,a,o),e.rotate(-s),e.translate(-r,-i)):Oc(e,u,r,i,a,o)}var Jf={type:"path",tag:"path",nested:!1,attr:function(e,t){var n=t.scaleX||1,r=t.scaleY||1;1===n&&1===r||e("vector-effect","non-scaling-stroke"),e("transform",wf(t)),e("d",t.path)},bound:function(e,t){return Yf(ql(e),t)?e.set(0,0,0,0):Tl(e,t,!0),t.angle&&e.rotate(t.angle*bc,t.x||0,t.y||0),e},draw:vf(Yf),pick:bf(Yf),isect:ef(Yf)};function zf(e,t){e.beginPath(),Bl(e,t)}var Kf={type:"rect",tag:"path",nested:!1,attr:function(e,t){e("d",Bl(null,t))},bound:function(e,t){var n,r;return Tl(e.set(n=t.x||0,r=t.y||0,n+t.width||0,r+t.height||0),t)},draw:vf(zf),pick:bf(zf),isect:nf};function Wf(e,t,n){var r,i,a,o;return!(!t.stroke||!ff(e,t,n))&&(r=t.x||0,i=t.y||0,a=null!=t.x2?t.x2:r,o=null!=t.y2?t.y2:i,e.beginPath(),e.moveTo(r,i),e.lineTo(a,o),!0)}var Vf={type:"rule",tag:"line",nested:!1,attr:function(e,t){e("transform",Bf(t)),e("x2",null!=t.x2?t.x2-(t.x||0):0),e("y2",null!=t.y2?t.y2-(t.y||0):0)},bound:function(e,t){var n,r;return Tl(e.set(n=t.x||0,r=t.y||0,null!=t.x2?t.x2:n,null!=t.y2?t.y2:r),t)},draw:function(e,t,n){df(t,(function(t){if(!n||n.intersects(t.bounds)){var r=null==t.opacity?1:t.opacity;r&&Wf(e,t,r)&&(of(e,t),e.stroke())}}))},pick:mf((function(e,t,n,r){return!!e.isPointInStroke&&(Wf(e,t,1)&&e.isPointInStroke(n,r))})),isect:rf},Xf=Qf("shape",(function(e,t){return(t.mark.shape||t.shape).context(e)(t)})),Zf=Qf("symbol",(function(e,t){return bl.context(e)(t)}),tf),$f=Object(R.L)(),eh={height:oh,measureWidth:ih,estimateWidth:nh,width:nh,canvas:th};function th(e){eh.width=e&&Zl?ih:nh}function nh(e,t){return rh(ch(e,t),oh(e))}function rh(e,t){return~~(.8*e.length*t)}function ih(e,t){return oh(e)<=0||!(t=ch(e,t))?0:ah(t,fh(e))}function ah(e,t){var n="(".concat(t,") ").concat(e),r=$f.get(n);return void 0===r&&(Zl.font=t,r=Zl.measureText(e).width,$f.set(n,r)),r}function oh(e){return null!=e.fontSize?+e.fontSize||0:11}function sh(e){return null!=e.lineHeight?e.lineHeight:oh(e)+2}function uh(e){return t=e.lineBreak&&e.text&&!Object(R.A)(e.text)?e.text.split(e.lineBreak):e.text,Object(R.A)(t)?t.length>1?t:t[0]:t;var t}function Ah(e){var t=uh(e);return(Object(R.A)(t)?t.length-1:0)*sh(e)}function ch(e,t){var n=null==t?"":(t+"").trim();return e.limit>0&&n.length?function(e,t){var n=+e.limit,r=function(e){if(eh.width===ih){var t=fh(e);return function(e){return ah(e,t)}}var n=oh(e);return function(e){return rh(e,n)}}(e);if(r(t)<n)return t;var i,a=e.ellipsis||"\u2026",o="rtl"===e.dir,s=0,u=t.length;if(n-=r(a),o){for(;s<u;)i=s+u>>>1,r(t.slice(i))>n?s=i+1:u=i;return a+t.slice(s)}for(;s<u;)i=1+(s+u>>>1),r(t.slice(0,i))<n?s=i:u=i-1;return t.slice(0,s)+a}(e,n):n}function lh(e,t){var n=e.font;return(t&&n?String(n).replace(/"/g,"'"):n)||"sans-serif"}function fh(e,t){return(e.fontStyle?e.fontStyle+" ":"")+(e.fontVariant?e.fontVariant+" ":"")+(e.fontWeight?e.fontWeight+" ":"")+oh(e)+"px "+lh(e,t)}function hh(e){var t=e.baseline,n=oh(e);return Math.round("top"===t?.79*n:"middle"===t?.3*n:"bottom"===t?-.21*n:"line-top"===t?.29*n+.5*sh(e):"line-bottom"===t?.29*n-.5*sh(e):0)}th(!0);var gh={left:"start",center:"middle",right:"end"},dh=new _l;function ph(e){var t,n=e.x||0,r=e.y||0,i=e.radius||0;return i&&(t=(e.theta||0)-Ec,n+=i*Math.cos(t),r+=i*Math.sin(t)),dh.x1=n,dh.y1=r,dh}function vh(e,t,n){var r,i=eh.height(t),a=t.align,o=ph(t),s=o.x1,u=o.y1,A=t.dx||0,c=(t.dy||0)+hh(t)-Math.round(.8*i),l=uh(t);if(Object(R.A)(l)?(i+=sh(t)*(l.length-1),r=l.reduce((function(e,n){return Math.max(e,eh.width(t,n))}),0)):r=eh.width(t,l),"center"===a?A-=r/2:"right"===a&&(A-=r),e.set(A+=s,c+=u,A+r,c+i),t.angle&&!n)e.rotate(t.angle*bc,s,u);else if(2===n)return e.rotatedPoints(t.angle*bc,s,u);return e}var yh={arc:kf,area:xf,group:Nf,image:qf,line:Hf,path:Jf,rect:Kf,rule:Vf,shape:Xf,symbol:Zf,text:{type:"text",tag:"text",nested:!1,attr:function(e,t){var n,r=t.dx||0,i=(t.dy||0)+hh(t),a=ph(t),o=a.x1,s=a.y1,u=t.angle||0;e("text-anchor",gh[t.align]||"start"),u?(n=Ef(o,s)+" "+Cf(u),(r||i)&&(n+=" "+Ef(r,i))):n=Ef(o+r,s+i),e("transform",n)},bound:vh,draw:function(e,t,n){df(t,(function(t){var r,i,a,o,s,u,A,c=null==t.opacity?1:t.opacity;if(!(n&&!n.intersects(t.bounds)||0===c||t.fontSize<=0||null==t.text||0===t.text.length)){if(e.font=fh(t),e.textAlign=t.align||"left",i=(r=ph(t)).x1,a=r.y1,t.angle&&(e.save(),e.translate(i,a),e.rotate(t.angle*bc),i=a=0),i+=t.dx||0,a+=(t.dy||0)+hh(t),u=uh(t),of(e,t),Object(R.A)(u))for(s=sh(t),o=0;o<u.length;++o)A=ch(t,u[o]),t.fill&&cf(e,t,c)&&e.fillText(A,i,a),t.stroke&&ff(e,t,c)&&e.strokeText(A,i,a),a+=s;else A=ch(t,u),t.fill&&cf(e,t,c)&&e.fillText(A,i,a),t.stroke&&ff(e,t,c)&&e.strokeText(A,i,a);t.angle&&e.restore()}}))},pick:mf((function(e,t,n,r,i,a){if(t.fontSize<=0)return!1;if(!t.angle)return!0;var o=ph(t),s=o.x1,u=o.y1,A=vh(dh,t,1),c=-t.angle*bc,l=Math.cos(c),f=Math.sin(c),h=l*i-f*a+(s-l*s+f*u),g=f*i+l*a+(u-f*s-l*u);return A.contains(h,g)})),isect:function(e,t){var n=vh(dh,e,2);return af(t,n[0],n[1],n[2],n[3])||af(t,n[0],n[1],n[4],n[5])||af(t,n[4],n[5],n[6],n[7])||af(t,n[2],n[3],n[6],n[7])}},trail:_f("trail",(function(e,t){return El.context(e)(t)}),(function(e,t){for(var n,r,i=e.length;--i>=0;)if(!1!==e[i].defined&&(n=e[i].x-t[0])*n+(r=e[i].y-t[1])*r<(n=e[i].size||1)*n)return e[i];return null}))},mh=function(e,t,n){var r=yh[e.mark.marktype],i=t||r.bound;return r.nested&&(e=e.mark),i(e.bounds||(e.bounds=new _l),e,n)},Ih={mark:null},bh=function(e,t,n){var r,i,a,o,s=yh[e.marktype],u=s.bound,A=e.items,c=A&&A.length;if(s.nested)return c?a=A[0]:(Ih.mark=e,a=Ih),o=mh(a,u,n),t=t&&t.union(o)||o;if(t=t||e.bounds&&e.bounds.clear()||new _l,c)for(r=0,i=A.length;r<i;++r)t.union(mh(A[r],u,n));return e.bounds=t},Eh=["marktype","name","role","interactive","clip","items","zindex","x","y","width","height","align","baseline","fill","fillOpacity","opacity","blend","stroke","strokeOpacity","strokeWidth","strokeCap","strokeDash","strokeDashOffset","strokeForeground","strokeOffset","startAngle","endAngle","innerRadius","outerRadius","cornerRadius","padAngle","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight","interpolate","tension","orient","defined","url","aspect","smooth","path","scaleX","scaleY","x2","y2","size","shape","text","angle","theta","radius","dir","dx","dy","ellipsis","limit","lineBreak","lineHeight","font","fontSize","fontWeight","fontStyle","fontVariant","description","aria","ariaRole","ariaRoleDescription"];function Ch(e,t){return JSON.stringify(e,Eh,t)}function Bh(e){return function e(t){var n,r,i,a=t.marktype,o=t.items;if(o)for(r=0,i=o.length;r<i;++r)n=a?"mark":"group",o[r][n]=t,o[r].zindex&&(o[r][n].zdirty=!0),"group"===(a||n)&&e(o[r]);a&&bh(t);return t}("string"===typeof e?JSON.parse(e):e)}function wh(e){arguments.length?this.root=Bh(e):(this.root=kh({marktype:"group",name:"root",role:"frame"}),this.root.items=[new Ol(this.root)])}var Qh=wh.prototype;function kh(e,t){var n={bounds:new _l,clip:!!e.clip,group:t,interactive:!1!==e.interactive,items:[],marktype:e.marktype,name:e.name||void 0,role:e.role||void 0,zindex:e.zindex||0};return null!=e.aria&&(n.aria=e.aria),e.description&&(n.description=e.description),n}function _h(e,t,n){return!e&&"undefined"!==typeof document&&document.createElement&&(e=document),e?n?e.createElementNS(n,t):e.createElement(t):null}function xh(e,t){t=t.toLowerCase();for(var n=e.childNodes,r=0,i=n.length;r<i;++r)if(n[r].tagName.toLowerCase()===t)return n[r]}function Sh(e,t,n,r){var i,a=e.childNodes[t];return a&&a.tagName.toLowerCase()===n.toLowerCase()||(i=a||null,a=_h(e.ownerDocument,n,r),e.insertBefore(a,i)),a}function Oh(e,t){for(var n=e.childNodes,r=n.length;r>t;)e.removeChild(n[--r]);return e}function Dh(e){return"mark-"+e.marktype+(e.role?" role-"+e.role:"")+(e.name?" "+e.name:"")}Qh.toJSON=function(e){return Ch(this.root,e||0)},Qh.mark=function(e,t,n){var r=kh(e,t=t||this.root.items[0]);return t.items[n]=r,r.zindex&&(r.group.zdirty=!0),r};var Rh=function(e,t){var n=t.getBoundingClientRect();return[e.clientX-n.left-(t.clientLeft||0),e.clientY-n.top-(t.clientTop||0)]};function jh(e,t){this._active=null,this._handlers={},this._loader=e||Ya(),this._tooltip=t||Mh}function Mh(e,t,n,r){e.element().setAttribute("title",r||"")}var Nh=jh.prototype;function Fh(e){this._el=null,this._bgcolor=null,this._loader=new jl(e)}Nh.initialize=function(e,t,n){return this._el=e,this._obj=n||null,this.origin(t)},Nh.element=function(){return this._el},Nh.canvas=function(){return this._el&&this._el.firstChild},Nh.origin=function(e){return arguments.length?(this._origin=e||[0,0],this):this._origin.slice()},Nh.scene=function(e){return arguments.length?(this._scene=e,this):this._scene},Nh.on=function(){},Nh.off=function(){},Nh._handlerIndex=function(e,t,n){for(var r=e?e.length:0;--r>=0;)if(e[r].type===t&&(!n||e[r].handler===n))return r;return-1},Nh.handlers=function(e){var t=this._handlers,n=[];if(e)n.push.apply(n,t[this.eventName(e)]);else for(var r in t)n.push.apply(n,t[r]);return n},Nh.eventName=function(e){var t=e.indexOf(".");return t<0?e:e.slice(0,t)},Nh.handleHref=function(e,t,n){this._loader.sanitize(n,{context:"href"}).then((function(t){var n=new MouseEvent(e.type,e),r=_h(null,"a");for(var i in t)r.setAttribute(i,t[i]);r.dispatchEvent(n)})).catch((function(){}))},Nh.handleTooltip=function(e,t,n){if(t&&null!=t.tooltip){t=function(e,t,n,r){var i,a,o=e&&e.mark;if(o&&(i=yh[o.marktype]).tip){for((a=Rh(t,n))[0]-=r[0],a[1]-=r[1];e=e.mark.group;)a[0]-=e.x||0,a[1]-=e.y||0;e=i.tip(o.items,a)}return e}(t,e,this.canvas(),this._origin);var r=n&&t&&t.tooltip||null;this._tooltip.call(this._obj,this,e,t,r)}},Nh.getItemBoundingClientRect=function(e){var t=this.canvas();if(t){for(var n=t.getBoundingClientRect(),r=this._origin,i=e.bounds,a=i.width(),o=i.height(),s=i.x1+r[0]+n.left,u=i.y1+r[1]+n.top;e.mark&&(e=e.mark.group);)s+=e.x||0,u+=e.y||0;return{x:s,y:u,width:a,height:o,left:s,top:u,right:s+a,bottom:u+o}}};var Th=Fh.prototype;Th.initialize=function(e,t,n,r,i){return this._el=e,this.resize(t,n,r,i)},Th.element=function(){return this._el},Th.canvas=function(){return this._el&&this._el.firstChild},Th.background=function(e){return 0===arguments.length?this._bgcolor:(this._bgcolor=e,this)},Th.resize=function(e,t,n,r){return this._width=e,this._height=t,this._origin=n||[0,0],this._scale=r||1,this},Th.dirty=function(){},Th.render=function(e){var t=this;return t._call=function(){t._render(e)},t._call(),t._call=null,t},Th._render=function(){},Th.renderAsync=function(e){var t=this.render(e);return this._ready?this._ready.then((function(){return t})):Promise.resolve(t)},Th._load=function(e,t){var n=this,r=n._loader[e](t);if(!n._ready){var i=n._call;n._ready=n._loader.ready().then((function(e){e&&i(),n._ready=null}))}return r},Th.sanitizeURL=function(e){return this._load("sanitizeURL",e)},Th.loadImage=function(e){return this._load("loadImage",e)};var Lh="dragleave",Ph="mousedown",Uh="mousemove",Gh="mouseout",qh="click",Hh=["keydown","keypress","keyup","dragenter",Lh,"dragover",Ph,"mouseup",Uh,Gh,"mouseover",qh,"dblclick","wheel","mousewheel","touchstart","touchmove","touchend"],Yh=Uh,Jh=Gh,zh=qh;function Kh(e,t){jh.call(this,e,t),this._down=null,this._touch=null,this._first=!0,this._events={}}var Wh=Object(R.y)(Kh,jh);Wh.initialize=function(e,t,n){var r=this;return this._canvas=e&&xh(e,"canvas"),[qh,Ph,Uh,Gh,Lh].forEach((function(e){return Vh(r,e)})),jh.prototype.initialize.call(this,e,t,n)};function Vh(e,t){(function(e){return"touchstart"===e||"touchmove"===e||"touchend"===e?["touchstart","touchmove","touchend"]:[e]})(t).forEach((function(t){return function(e,t){var n=e.canvas();n&&!e._events[t]&&(e._events[t]=1,n.addEventListener(t,e[t]?function(n){return e[t](n)}:function(n){return e.fire(t,n)}))}(e,t)}))}function Xh(e,t,n){return function(r){var i=this._active,a=this.pickEvent(r);a===i||(i&&i.exit||this.fire(n,r),this._active=a,this.fire(t,r)),this.fire(e,r)}}function Zh(e){return function(t){this.fire(e,t),this._active=null}}Wh.canvas=function(){return this._canvas},Wh.context=function(){return this._canvas.getContext("2d")},Wh.events=Hh,Wh.DOMMouseScroll=function(e){this.fire("mousewheel",e)},Wh.mousemove=Xh(Uh,"mouseover",Gh),Wh.dragover=Xh("dragover","dragenter",Lh),Wh.mouseout=Zh(Gh),Wh.dragleave=Zh(Lh),Wh.mousedown=function(e){this._down=this._active,this.fire(Ph,e)},Wh.click=function(e){this._down===this._active&&(this.fire(qh,e),this._down=null)},Wh.touchstart=function(e){this._touch=this.pickEvent(e.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire("touchstart",e,!0)},Wh.touchmove=function(e){this.fire("touchmove",e,!0)},Wh.touchend=function(e){this.fire("touchend",e,!0),this._touch=null},Wh.fire=function(e,t,n){var r=n?this._touch:this._active,i=this._handlers[e];if(t.vegaType=e,e===zh&&r&&r.href?this.handleHref(t,r,r.href):e!==Yh&&e!==Jh||this.handleTooltip(t,r,e!==Jh),i)for(var a=0,o=i.length;a<o;++a)i[a].handler.call(this._obj,t,r)},Wh.on=function(e,t){var n=this.eventName(e),r=this._handlers;return this._handlerIndex(r[n],e,t)<0&&(Vh(this,e),(r[n]||(r[n]=[])).push({type:e,handler:t})),this},Wh.off=function(e,t){var n=this.eventName(e),r=this._handlers[n],i=this._handlerIndex(r,e,t);return i>=0&&r.splice(i,1),this},Wh.pickEvent=function(e){var t=Rh(e,this._canvas),n=this._origin;return this.pick(this._scene,t[0],t[1],t[0]-n[0],t[1]-n[1])},Wh.pick=function(e,t,n,r,i){var a=this.context();return yh[e.marktype].pick.call(this,a,e,t,n,r,i)};var $h="undefined"!==typeof window&&window.devicePixelRatio||1;function eg(e){Fh.call(this,e),this._options={},this._redraw=!1,this._dirty=new _l,this._tempb=new _l}var tg=Object(R.y)(eg,Fh),ng=Fh.prototype;tg.initialize=function(e,t,n,r,i,a){return this._options=a||{},this._canvas=this._options.externalContext?null:Dl(1,1,this._options.type),e&&this._canvas&&(Oh(e,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),ng.initialize.call(this,e,t,n,r,i)},tg.resize=function(e,t,n,r){if(ng.resize.call(this,e,t,n,r),this._canvas)!function(e,t,n,r,i,a){var o="undefined"!==typeof HTMLElement&&e instanceof HTMLElement&&null!=e.parentNode,s=e.getContext("2d"),u=o?$h:i;for(var A in e.width=t*u,e.height=n*u,a)s[A]=a[A];o&&1!==u&&(e.style.width=t+"px",e.style.height=n+"px"),s.pixelRatio=u,s.setTransform(u,0,0,u,u*r[0],u*r[1])}(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{var i=this._options.externalContext;i||Object(R.n)("CanvasRenderer is missing a valid canvas or context"),i.scale(this._scale,this._scale),i.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this},tg.canvas=function(){return this._canvas},tg.context=function(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)},tg.dirty=function(e){for(var t=this._tempb.clear().union(e.bounds),n=e.mark.group;n;)t.translate(n.x||0,n.y||0),n=n.mark.group;this._dirty.union(t)};function rg(e,t){jh.call(this,e,t);var n=this;n._hrefHandler=ag(n,(function(e,t){t&&t.href&&n.handleHref(e,t,t.href)})),n._tooltipHandler=ag(n,(function(e,t){n.handleTooltip(e,t,e.type!==Jh)}))}tg._render=function(e){var t,n,r,i=this.context(),a=this._origin,o=this._width,s=this._height,u=this._dirty,A=(t=a,n=o,r=s,(new _l).set(0,0,n,r).translate(-t[0],-t[1]));i.save();var c=this._redraw||u.empty()?(this._redraw=!1,A.expand(1)):function(e,t,n){return t.expand(1).round(),e.pixelRatio%1&&t.scale(e.pixelRatio).round().scale(1/e.pixelRatio),t.translate(-n[0]%1,-n[1]%1),e.beginPath(),e.rect(t.x1,t.y1,t.width(),t.height()),e.clip(),t}(i,A.intersect(u),a);return this.clear(-a[0],-a[1],o,s),this.draw(i,e,c),i.restore(),u.clear(),this},tg.draw=function(e,t,n){var r=yh[t.marktype];t.clip&&function(e,t){var n=t.clip;e.save(),Object(R.D)(n)?(e.beginPath(),n(e),e.clip()):Sf(e,t.group)}(e,t),r.draw.call(this,e,t,n),t.clip&&e.restore()},tg.clear=function(e,t,n,r){var i=this._options,a=this.context();"pdf"===i.type||i.externalContext||a.clearRect(e,t,n,r),null!=this._bgcolor&&(a.fillStyle=this._bgcolor,a.fillRect(e,t,n,r))};var ig=Object(R.y)(rg,jh);ig.initialize=function(e,t,n){var r=this._svg;return r&&(r.removeEventListener(zh,this._hrefHandler),r.removeEventListener(Yh,this._tooltipHandler),r.removeEventListener(Jh,this._tooltipHandler)),this._svg=r=e&&xh(e,"svg"),r&&(r.addEventListener(zh,this._hrefHandler),r.addEventListener(Yh,this._tooltipHandler),r.addEventListener(Jh,this._tooltipHandler)),jh.prototype.initialize.call(this,e,t,n)},ig.canvas=function(){return this._svg};var ag=function(e,t){return function(n){var r=n.target.__data__;r=Array.isArray(r)?r[0]:r,n.vegaType=n.type,t.call(e._obj,n,r)}};ig.on=function(e,t){var n=this.eventName(e),r=this._handlers;if(this._handlerIndex(r[n],e,t)<0){var i={type:e,handler:t,listener:ag(this,t)};(r[n]||(r[n]=[])).push(i),this._svg&&this._svg.addEventListener(n,i.listener)}return this},ig.off=function(e,t){var n=this.eventName(e),r=this._handlers[n],i=this._handlerIndex(r,e,t);return i>=0&&(this._svg&&this._svg.removeEventListener(n,r[i].listener),r.splice(i,1)),this};var og=function(e,t,n){var r=e-t+2*n;return e?r>0?r:1:0},sg="log",ug="time",Ag="utc",cg="continuous",lg=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN},fg=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return lg(t(e),n)}),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)<0?r=a+1:i=a}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)>0?i=a:r=a+1}return r}}};var hg=fg(lg),gg=hg.right,dg=(hg.left,gg);function pg(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function vg(e,t){switch(arguments.length){case 0:break;case 1:"function"===typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"===typeof t?this.interpolator(t):this.range(t)}return this}var yg=Symbol("implicit");function mg(){var e=new Map,t=[],n=[],r=yg;function i(i){var a=i+"",o=e.get(a);if(!o){if(r!==yg)return r;e.set(a,o=t.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new Map;var r,a=Object(D.a)(n);try{for(a.s();!(r=a.n()).done;){var o=r.value,s=o+"";e.has(s)||e.set(s,t.push(o))}}catch(u){a.e(u)}finally{a.f()}return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return mg(t,n).unknown(r)},pg.apply(i,arguments),i}function Ig(){var e,t,n=mg().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,u=0,A=.5;function c(){var n=r().length,c=a[1]<a[0],l=a[c-0],f=a[1-c],h=og(n,s,u);e=(f-l)/(h||1),o&&(e=Math.floor(e)),l+=(f-l-e*(n-s))*A,t=e*(1-s),o&&(l=Math.round(l),t=Math.round(t));var g=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(i);++r<i;)a[r]=e+r*n;return a}(n).map((function(t){return l+e*t}));return i(c?g.reverse():g)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),c()):r()},n.range=function(e){return arguments.length?(a=[+e[0],+e[1]],c()):a.slice()},n.rangeRound=function(e){return a=[+e[0],+e[1]],o=!0,c()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(o=!!e,c()):o},n.padding=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),s=u,c()):s},n.paddingInner=function(e){return arguments.length?(s=Math.max(0,Math.min(1,e)),c()):s},n.paddingOuter=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),c()):u},n.align=function(e){return arguments.length?(A=Math.max(0,Math.min(1,e)),c()):A},n.invertRange=function(e){if(null!=e[0]&&null!=e[1]){var n,o,s,u=+e[0],A=+e[1],c=a[1]<a[0],l=c?i().reverse():i(),f=l.length-1;if(u===u&&A===A&&(A<u&&(s=u,u=A,A=s),!(A<l[0]||u>a[1-c])))return n=Math.max(0,gg(l,u)-1),o=u===A?n:gg(l,A)-1,u-l[n]>t+1e-10&&++n,c&&(s=n,n=f-o,o=f-s),n>o?void 0:r().slice(n,o+1)}},n.invert=function(e){var t=n.invertRange([e,e]);return t?t[0]:t},n.copy=function(){return Ig().domain(r()).range(a).round(o).paddingInner(s).paddingOuter(u).align(A)},c()}var bg=Math.sqrt(50),Eg=Math.sqrt(10),Cg=Math.sqrt(2),Bg=function(e,t,n){var r,i,a,o,s=-1;if(n=+n,(e=+e)===(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(o=wg(e,t,n))||!isFinite(o))return[];if(o>0)for(e=Math.ceil(e/o),t=Math.floor(t/o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(e+s)*o;else for(e=Math.floor(e*o),t=Math.ceil(t*o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(e-s)/o;return r&&a.reverse(),a};function wg(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=bg?10:a>=Eg?5:a>=Cg?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=bg?10:a>=Eg?5:a>=Cg?2:1)}function Qg(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=bg?i*=10:a>=Eg?i*=5:a>=Cg&&(i*=2),t<e?-i:i}var kg=function(e,t,n,r){var i,a=Qg(e,t,n);switch((r=Ut(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=Xt(a,o))||(r.precision=i),Jt(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=Zt(a,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=$t(a))||(r.precision=i-2*("%"===r.type))}return Yt(r)},_g=Array.prototype.map;function xg(e){return _g.call(e,(function(e){return+e}))}var Sg=Array.prototype.slice;var Og=function(e,t,n){e.prototype=t.prototype=n,n.constructor=e};function Dg(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Rg(){}var jg="\\s*([+-]?\\d+)\\s*",Mg="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ng="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fg=/^#([0-9a-f]{3,8})$/,Tg=new RegExp("^rgb\\("+[jg,jg,jg]+"\\)$"),Lg=new RegExp("^rgb\\("+[Ng,Ng,Ng]+"\\)$"),Pg=new RegExp("^rgba\\("+[jg,jg,jg,Mg]+"\\)$"),Ug=new RegExp("^rgba\\("+[Ng,Ng,Ng,Mg]+"\\)$"),Gg=new RegExp("^hsl\\("+[Mg,Ng,Ng]+"\\)$"),qg=new RegExp("^hsla\\("+[Mg,Ng,Ng,Mg]+"\\)$"),Hg={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,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,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,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,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,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};function Yg(){return this.rgb().formatHex()}function Jg(){return this.rgb().formatRgb()}function zg(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Fg.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Kg(t):3===n?new Zg(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?new Zg(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?new Zg(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Tg.exec(e))?new Zg(t[1],t[2],t[3],1):(t=Lg.exec(e))?new Zg(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Pg.exec(e))?Wg(t[1],t[2],t[3],t[4]):(t=Ug.exec(e))?Wg(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Gg.exec(e))?nd(t[1],t[2]/100,t[3]/100,1):(t=qg.exec(e))?nd(t[1],t[2]/100,t[3]/100,t[4]):Hg.hasOwnProperty(e)?Kg(Hg[e]):"transparent"===e?new Zg(NaN,NaN,NaN,0):null}function Kg(e){return new Zg(e>>16&255,e>>8&255,255&e,1)}function Wg(e,t,n,r){return r<=0&&(e=t=n=NaN),new Zg(e,t,n,r)}function Vg(e){return e instanceof Rg||(e=zg(e)),e?new Zg((e=e.rgb()).r,e.g,e.b,e.opacity):new Zg}function Xg(e,t,n,r){return 1===arguments.length?Vg(e):new Zg(e,t,n,null==r?1:r)}function Zg(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function $g(){return"#"+td(this.r)+td(this.g)+td(this.b)}function ed(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function td(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function nd(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ad(e,t,n,r)}function rd(e){if(e instanceof ad)return new ad(e.h,e.s,e.l,e.opacity);if(e instanceof Rg||(e=zg(e)),!e)return new ad;if(e instanceof ad)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(o=t===a?(n-r)/s+6*(n<r):n===a?(r-t)/s+2:(t-n)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new ad(o,s,u,e.opacity)}function id(e,t,n,r){return 1===arguments.length?rd(e):new ad(e,t,n,null==r?1:r)}function ad(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function od(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function sd(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}Og(Rg,zg,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Yg,formatHex:Yg,formatHsl:function(){return rd(this).formatHsl()},formatRgb:Jg,toString:Jg}),Og(Zg,Xg,Dg(Rg,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Zg(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Zg(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$g,formatHex:$g,formatRgb:ed,toString:ed})),Og(ad,id,Dg(Rg,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new ad(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ad(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Zg(od(e>=240?e-240:e+120,i,r),od(e,i,r),od(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var ud=function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r<t-1?e[r+2]:2*a-i;return sd((n-r/t)*t,o,i,a,s)}},Ad=function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],a=e[r%t],o=e[(r+1)%t],s=e[(r+2)%t];return sd((n-r/t)*t,i,a,o,s)}},cd=function(e){return function(){return e}};function ld(e,t){return function(n){return e+n*t}}function fd(e,t){var n=t-e;return n?ld(e,n>180||n<-180?n-360*Math.round(n/360):n):cd(isNaN(e)?t:e)}function hd(e){return 1===(e=+e)?gd:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):cd(isNaN(t)?n:t)}}function gd(e,t){var n=t-e;return n?ld(e,n):cd(isNaN(e)?t:e)}var dd=function e(t){var n=hd(t);function r(e,t){var r=n((e=Xg(e)).r,(t=Xg(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=gd(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+""}}return r.gamma=e,r}(1);function pd(e){return function(t){var n,r,i=t.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=Xg(t[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=e(a),o=e(o),s=e(s),r.opacity=1,function(e){return r.r=a(e),r.g=o(e),r.b=s(e),r+""}}}var vd=pd(ud),yd=pd(Ad),md=function(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(a){for(n=0;n<r;++n)i[n]=e[n]*(1-a)+t[n]*a;return i}};function Id(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var bd=function(e,t){return(Id(t)?md:Ed)(e,t)};function Ed(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=xd(e[n],t[n]);for(;n<r;++n)o[n]=t[n];return function(e){for(n=0;n<i;++n)o[n]=a[n](e);return o}}var Cd=function(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}},Bd=function(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}},wd=function(e,t){var n,r={},i={};for(n in null!==e&&"object"===typeof e||(e={}),null!==t&&"object"===typeof t||(t={}),t)n in e?r[n]=xd(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}},Qd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,kd=new RegExp(Qd.source,"g");var _d=function(e,t){var n,r,i,a=Qd.lastIndex=kd.lastIndex=0,o=-1,s=[],u=[];for(e+="",t+="";(n=Qd.exec(e))&&(r=kd.exec(t));)(i=r.index)>a&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,u.push({i:o,x:Bd(n,r)})),a=kd.lastIndex;return a<t.length&&(i=t.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?u[0]?function(e){return function(t){return e(t)+""}}(u[0].x):function(e){return function(){return e}}(t):(t=u.length,function(e){for(var n,r=0;r<t;++r)s[(n=u[r]).i]=n.x(e);return s.join("")})},xd=function(e,t){var n,r=typeof t;return null==t||"boolean"===r?cd(t):("number"===r?Bd:"string"===r?(n=zg(t))?(t=n,dd):_d:t instanceof zg?dd:t instanceof Date?Cd:Id(t)?md:Array.isArray(t)?Ed:"function"!==typeof t.valueOf&&"function"!==typeof t.toString||isNaN(t)?wd:Bd)(e,t)},Sd=function(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}},Od=function(e){return+e},Dd=[0,1];function Rd(e){return e}function jd(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function Md(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=jd(i,r),a=n(o,a)):(r=jd(r,i),a=n(a,o)),function(e){return a(r(e))}}function Nd(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=jd(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=dg(e,t,1,r)-1;return a[n](i[n](t))}}function Fd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Td(){var e,t,n,r,i,a,o=Dd,s=Dd,u=xd,A=Rd;function c(){var e=Math.min(o.length,s.length);return A!==Rd&&(A=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(o[0],o[e-1])),r=e>2?Nd:Md,i=a=null,l}function l(t){return isNaN(t=+t)?n:(i||(i=r(o.map(e),s,u)))(e(A(t)))}return l.invert=function(n){return A(t((a||(a=r(s,o.map(e),Bd)))(n)))},l.domain=function(e){return arguments.length?(o=Array.from(e,Od),c()):o.slice()},l.range=function(e){return arguments.length?(s=Array.from(e),c()):s.slice()},l.rangeRound=function(e){return s=Array.from(e),u=Sd,c()},l.clamp=function(e){return arguments.length?(A=!!e||Rd,c()):A!==Rd},l.interpolate=function(e){return arguments.length?(u=e,c()):u},l.unknown=function(e){return arguments.length?(n=e,l):n},function(n,r){return e=n,t=r,c()}}function Ld(){return Td()(Rd,Rd)}function Pd(e){var t=e.domain;return e.ticks=function(e){var n=t();return Bg(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return kg(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),a=0,o=i.length-1,s=i[a],u=i[o];return u<s&&(r=s,s=u,u=r,r=a,a=o,o=r),(r=wg(s,u,n))>0?r=wg(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=wg(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(u/r)*r,t(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(u*r)/r,t(i)),e},e}var Ud=function(e,t){var n,r=0,i=(e=e.slice()).length-1,a=e[r],o=e[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),e[r]=t.floor(a),e[i]=t.ceil(o),e};function Gd(e){return Math.log(e)}function qd(e){return Math.exp(e)}function Hd(e){return-Math.log(-e)}function Yd(e){return-Math.exp(-e)}function Jd(e){return isFinite(e)?+("1e"+e):e<0?0:e}function zd(e){return function(t){return-e(-t)}}function Kd(e){var t,n,r=e(Gd,qd),i=r.domain,a=10;function o(){return t=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}(a),n=function(e){return 10===e?Jd:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}(a),i()[0]<0?(t=zd(t),n=zd(n),e(Hd,Yd)):e(Gd,qd),r}return r.base=function(e){return arguments.length?(a=+e,o()):a},r.domain=function(e){return arguments.length?(i(e),o()):i()},r.ticks=function(e){var r,o=i(),s=o[0],u=o[o.length-1];(r=u<s)&&(f=s,s=u,u=f);var A,c,l,f=t(s),h=t(u),g=null==e?10:+e,d=[];if(!(a%1)&&h-f<g){if(f=Math.floor(f),h=Math.ceil(h),s>0){for(;f<=h;++f)for(c=1,A=n(f);c<a;++c)if(!((l=A*c)<s)){if(l>u)break;d.push(l)}}else for(;f<=h;++f)for(c=a-1,A=n(f);c>=1;--c)if(!((l=A*c)<s)){if(l>u)break;d.push(l)}2*d.length<g&&(d=Bg(s,u,g))}else d=Bg(f,h,Math.min(h-f,g)).map(n);return r?d.reverse():d},r.tickFormat=function(e,i){if(null==i&&(i=10===a?".0e":","),"function"!==typeof i&&(i=Yt(i)),e===1/0)return i;null==e&&(e=10);var o=Math.max(1,a*e/r.ticks().length);return function(e){var r=e/n(Math.round(t(e)));return r*a<a-.5&&(r*=a),r<=o?i(e):""}},r.nice=function(){return i(Ud(i(),{floor:function(e){return n(Math.floor(t(e)))},ceil:function(e){return n(Math.ceil(t(e)))}}))},r}function Wd(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Vd(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Xd(e){return e<0?-e*e:e*e}function Zd(e){var t=e(Rd,Rd),n=1;function r(){return 1===n?e(Rd,Rd):.5===n?e(Vd,Xd):e(Wd(n),Wd(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},Pd(t)}function $d(){var e=Zd(Td());return e.copy=function(){return Fd(e,$d()).exponent(e.exponent())},pg.apply(e,arguments),e}function ep(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function tp(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function np(e){var t=1,n=e(ep(t),tp(t));return n.constant=function(n){return arguments.length?e(ep(t=+n),tp(t)):t},Pd(n)}function rp(e){return new Date(e)}function ip(e){return e instanceof Date?+e:+new Date(+e)}function ap(e,t,n,r,i,a,o,s,u){var A=Ld(),c=A.invert,l=A.domain,f=u(".%L"),h=u(":%S"),g=u("%I:%M"),d=u("%I %p"),p=u("%a %d"),v=u("%b %d"),y=u("%B"),m=u("%Y"),I=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[t,1,2592e6],[t,3,7776e6],[e,1,31536e6]];function b(s){return(o(s)<s?f:a(s)<s?h:i(s)<s?g:r(s)<s?d:t(s)<s?n(s)<s?p:v:e(s)<s?y:m)(s)}function E(t,n,r){if(null==t&&(t=10),"number"===typeof t){var i,a=Math.abs(r-n)/t,o=fg((function(e){return e[2]})).right(I,a);return o===I.length?(i=Qg(n/31536e6,r/31536e6,t),t=e):o?(i=(o=I[a/I[o-1][2]<I[o][2]/a?o-1:o])[1],t=o[0]):(i=Math.max(Qg(n,r,t),1),t=s),t.every(i)}return t}return A.invert=function(e){return new Date(c(e))},A.domain=function(e){return arguments.length?l(Array.from(e,ip)):l().map(rp)},A.ticks=function(e){var t,n=l(),r=n[0],i=n[n.length-1],a=i<r;return a&&(t=r,r=i,i=t),t=(t=E(e,r,i))?t.range(r,i+1):[],a?t.reverse():t},A.tickFormat=function(e,t){return null==t?b:u(t)},A.nice=function(e){var t=l();return(e=E(e,t[0],t[t.length-1]))?l(Ud(t,e)):A},A.copy=function(){return Fd(A,ap(e,t,n,r,i,a,o,s,u))},A}function op(){var e,t,n,r,i,a=0,o=1,s=Rd,u=!1;function A(t){return isNaN(t=+t)?i:s(0===n?.5:(t=(r(t)-e)*n,u?Math.max(0,Math.min(1,t)):t))}function c(e){return function(t){var n,r,i,a;return arguments.length?(n=t,i=(r=Object(ks.a)(n,2))[0],a=r[1],s=e(i,a),A):[s(0),s(1)]}}return A.domain=function(i){var s,u;return arguments.length?(s=i,u=Object(ks.a)(s,2),a=u[0],o=u[1],e=r(a=+a),t=r(o=+o),n=e===t?0:1/(t-e),A):[a,o]},A.clamp=function(e){return arguments.length?(u=!!e,A):u},A.interpolator=function(e){return arguments.length?(s=e,A):s},A.range=c(xd),A.rangeRound=c(Sd),A.unknown=function(e){return arguments.length?(i=e,A):i},function(i){return r=i,e=i(a),t=i(o),n=e===t?0:1/(t-e),A}}function sp(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function up(){var e=Pd(op()(Rd));return e.copy=function(){return sp(e,up())},vg.apply(e,arguments)}function Ap(){var e=Zd(op());return e.copy=function(){return sp(e,Ap()).exponent(e.exponent())},vg.apply(e,arguments)}function cp(e,t){for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}function lp(){var e,t,n,r,i,a,o,s=0,u=.5,A=1,c=1,l=Rd,f=!1;function h(e){return isNaN(e=+e)?o:(e=.5+((e=+a(e))-t)*(c*e<c*t?r:i),l(f?Math.max(0,Math.min(1,e)):e))}function g(e){return function(t){var n,r,i,a,o;return arguments.length?(n=t,i=(r=Object(ks.a)(n,3))[0],a=r[1],o=r[2],l=cp(e,[i,a,o]),h):[l(0),l(.5),l(1)]}}return h.domain=function(o){var l,f;return arguments.length?(l=o,f=Object(ks.a)(l,3),s=f[0],u=f[1],A=f[2],e=a(s=+s),t=a(u=+u),n=a(A=+A),r=e===t?0:.5/(t-e),i=t===n?0:.5/(n-t),c=t<e?-1:1,h):[s,u,A]},h.clamp=function(e){return arguments.length?(f=!!e,h):f},h.interpolator=function(e){return arguments.length?(l=e,h):l},h.range=g(xd),h.rangeRound=g(Sd),h.unknown=function(e){return arguments.length?(o=e,h):o},function(o){return a=o,e=o(s),t=o(u),n=o(A),r=e===t?0:.5/(t-e),i=t===n?0:.5/(n-t),c=t<e?-1:1,h}}function fp(){var e=Zd(lp());return e.copy=function(){return sp(e,fp()).exponent(e.exponent())},vg.apply(e,arguments)}function hp(e,t){var n;if(void 0===t){var r,i=Object(D.a)(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;null!=a&&(n<a||void 0===n&&a>=a)&&(n=a)}}catch(c){i.e(c)}finally{i.f()}}else{var o,s=-1,u=Object(D.a)(e);try{for(u.s();!(o=u.n()).done;){var A=o.value;null!=(A=t(A,++s,e))&&(n<A||void 0===n&&A>=A)&&(n=A)}}catch(c){u.e(c)}finally{u.f()}}return n}function gp(e,t){var n;if(void 0===t){var r,i=Object(D.a)(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;null!=a&&(n>a||void 0===n&&a>=a)&&(n=a)}}catch(c){i.e(c)}finally{i.f()}}else{var o,s=-1,u=Object(D.a)(e);try{for(u.s();!(o=u.n()).done;){var A=o.value;null!=(A=t(A,++s,e))&&(n>A||void 0===n&&A>=A)&&(n=A)}}catch(c){u.e(c)}finally{u.f()}}return n}function dp(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}var pp=Y.a.mark(vp);function vp(e,t){var n,r,i,a,o,s,u;return Y.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(void 0!==t){A.next=21;break}n=Object(D.a)(e),A.prev=2,n.s();case 4:if((r=n.n()).done){A.next=11;break}if(!(null!=(i=r.value)&&(i=+i)>=i)){A.next=9;break}return A.next=9,i;case 9:A.next=4;break;case 11:A.next=16;break;case 13:A.prev=13,A.t0=A.catch(2),n.e(A.t0);case 16:return A.prev=16,n.f(),A.finish(16);case 19:A.next=40;break;case 21:a=-1,o=Object(D.a)(e),A.prev=23,o.s();case 25:if((s=o.n()).done){A.next=32;break}if(u=s.value,!(null!=(u=t(u,++a,e))&&(u=+u)>=u)){A.next=30;break}return A.next=30,u;case 30:A.next=25;break;case 32:A.next=37;break;case 34:A.prev=34,A.t1=A.catch(23),o.e(A.t1);case 37:return A.prev=37,o.f(),A.finish(37);case 40:case"end":return A.stop()}}),pp,null,[[2,13,16,19],[23,34,37,40]])}function yp(e,t,n){if(r=(e=Float64Array.from(vp(e,n))).length){if((t=+t)<=0||r<2)return gp(e);if(t>=1)return hp(e);var r,i=(r-1)*t,a=Math.floor(i),o=hp(function e(t,n){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length-1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:lg;i>r;){if(i-r>600){var o=i-r+1,s=n-r+1,u=Math.log(o),A=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*A*(o-A)/o)*(s-o/2<0?-1:1),l=Math.max(r,Math.floor(n-s*A/o+c)),f=Math.min(i,Math.floor(n+(o-s)*A/o+c));e(t,n,l,f,a)}var h=t[n],g=r,d=i;for(dp(t,r,n),a(t[i],h)>0&&dp(t,r,i);g<d;){for(dp(t,g,d),++g,--d;a(t[g],h)<0;)++g;for(;a(t[d],h)>0;)--d}0===a(t[r],h)?dp(t,r,d):dp(t,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}return t}(e,a).subarray(0,a+1));return o+(gp(e.subarray(a+1))-o)*(i-a)}}var mp={};function Ip(e,t,n){var r=function(){var n=t();return n.invertRange||(n.invertRange=n.invert?function(e){return function(t){var n,r=t[0],i=t[1];return i<r&&(n=r,r=i,i=n),[e.invert(r),e.invert(i)]}}(n):n.invertExtent?function(e){return function(t){var n,r,i,a,o=e.range(),s=t[0],u=t[1],A=-1;for(u<s&&(r=s,s=u,u=r),i=0,a=o.length;i<a;++i)o[i]>=s&&o[i]<=u&&(A<0&&(A=i),n=i);if(!(A<0))return s=e.invertExtent(o[A]),u=e.invertExtent(o[n]),[void 0===s[0]?s[1]:s[0],void 0===u[1]?u[0]:u[1]]}}(n):void 0),n.type=e,n};return r.metadata=Object(R.db)(Object(R.i)(n)),r}function bp(e,t,n){return arguments.length>1?(mp[e]=Ip(e,t,n),this):Ep(e)?mp[e]:void 0}function Ep(e){return Object(R.v)(mp,e)}function Cp(e,t){var n=mp[e];return n&&n.metadata[t]}function Bp(e){return Cp(e,cg)}function wp(e){return Cp(e,"discrete")}function Qp(e){return Cp(e,"discretizing")}function kp(e){return Cp(e,sg)}function _p(e){return Cp(e,"interpolating")}function xp(e){return Cp(e,"quantile")}bp("identity",(function e(t){var n;function r(e){return isNaN(e=+e)?n:e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=Array.from(e,Od),r):t.slice()},r.unknown=function(e){return arguments.length?(n=e,r):n},r.copy=function(){return e(t).unknown(n)},t=arguments.length?Array.from(t,Od):[0,1],Pd(r)})),bp("linear",(function e(){var t=Ld();return t.copy=function(){return Fd(t,e())},pg.apply(t,arguments),Pd(t)}),cg),bp(sg,(function e(){var t=Kd(Td()).domain([1,10]);return t.copy=function(){return Fd(t,e()).base(t.base())},pg.apply(t,arguments),t}),[cg,sg]),bp("pow",$d,cg),bp("sqrt",(function(){return $d.apply(null,arguments).exponent(.5)}),cg),bp("symlog",(function e(){var t=np(Td());return t.copy=function(){return Fd(t,e()).constant(t.constant())},pg.apply(t,arguments)}),cg),bp(ug,(function(){return pg.apply(ap(Cr,wr,Rn,On,kr,xr,Or,Rr,mi).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}),[cg,"temporal"]),bp(Ag,(function(){return pg.apply(ap(Fr,Lr,zn,Un,Ur,qr,Or,Rr,bi).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}),[cg,"temporal"]),bp("sequential",up,[cg,"interpolating"]),bp("".concat("sequential","-").concat("linear"),up,[cg,"interpolating"]),bp("".concat("sequential","-").concat(sg),(function e(){var t=Kd(op()).domain([1,10]);return t.copy=function(){return sp(t,e()).base(t.base())},vg.apply(t,arguments)}),[cg,"interpolating",sg]),bp("".concat("sequential","-").concat("pow"),Ap,[cg,"interpolating"]),bp("".concat("sequential","-").concat("sqrt"),(function(){return Ap.apply(null,arguments).exponent(.5)}),[cg,"interpolating"]),bp("".concat("sequential","-").concat("symlog"),(function e(){var t=np(op());return t.copy=function(){return sp(t,e()).constant(t.constant())},vg.apply(t,arguments)}),[cg,"interpolating"]),bp("".concat("diverging","-").concat("linear"),(function e(){var t=Pd(lp()(Rd));return t.copy=function(){return sp(t,e())},vg.apply(t,arguments)}),[cg,"interpolating"]),bp("".concat("diverging","-").concat(sg),(function e(){var t=Kd(lp()).domain([.1,1,10]);return t.copy=function(){return sp(t,e()).base(t.base())},vg.apply(t,arguments)}),[cg,"interpolating",sg]),bp("".concat("diverging","-").concat("pow"),fp,[cg,"interpolating"]),bp("".concat("diverging","-").concat("sqrt"),(function(){return fp.apply(null,arguments).exponent(.5)}),[cg,"interpolating"]),bp("".concat("diverging","-").concat("symlog"),(function e(){var t=np(lp());return t.copy=function(){return sp(t,e()).constant(t.constant())},vg.apply(t,arguments)}),[cg,"interpolating"]),bp("quantile",(function e(){var t,n=[],r=[],i=[];function a(){var e=0,t=Math.max(1,r.length);for(i=new Array(t-1);++e<t;)i[e-1]=yp(n,e/t);return o}function o(e){return isNaN(e=+e)?t:r[dg(i,e)]}return o.invertExtent=function(e){var t=r.indexOf(e);return t<0?[NaN,NaN]:[t>0?i[t-1]:n[0],t<i.length?i[t]:n[n.length-1]]},o.domain=function(e){if(!arguments.length)return n.slice();n=[];var t,r=Object(D.a)(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;null==i||isNaN(i=+i)||n.push(i)}}catch(o){r.e(o)}finally{r.f()}return n.sort(lg),a()},o.range=function(e){return arguments.length?(r=Array.from(e),a()):r.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return i.slice()},o.copy=function(){return e().domain(n).range(r).unknown(t)},pg.apply(o,arguments)}),["discretizing","quantile"]),bp("quantize",(function e(){var t,n=0,r=1,i=1,a=[.5],o=[0,1];function s(e){return e<=e?o[dg(a,e,0,i)]:t}function u(){var e=-1;for(a=new Array(i);++e<i;)a[e]=((e+1)*r-(e-i)*n)/(i+1);return s}return s.domain=function(e){var t,i;return arguments.length?(t=e,i=Object(ks.a)(t,2),n=i[0],r=i[1],n=+n,r=+r,u()):[n,r]},s.range=function(e){return arguments.length?(i=(o=Array.from(e)).length-1,u()):o.slice()},s.invertExtent=function(e){var t=o.indexOf(e);return t<0?[NaN,NaN]:t<1?[n,a[0]]:t>=i?[a[i-1],r]:[a[t-1],a[t]]},s.unknown=function(e){return arguments.length?(t=e,s):s},s.thresholds=function(){return a.slice()},s.copy=function(){return e().domain([n,r]).range(o).unknown(t)},pg.apply(Pd(s),arguments)}),"discretizing"),bp("threshold",(function e(){var t,n=[.5],r=[0,1],i=1;function a(e){return e<=e?r[dg(n,e,0,i)]:t}return a.domain=function(e){return arguments.length?(n=Array.from(e),i=Math.min(n.length,r.length-1),a):n.slice()},a.range=function(e){return arguments.length?(r=Array.from(e),i=Math.min(n.length,r.length-1),a):r.slice()},a.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},a.unknown=function(e){return arguments.length?(t=e,a):t},a.copy=function(){return e().domain(n).range(r).unknown(t)},pg.apply(a,arguments)}),"discretizing"),bp("bin-ordinal",(function e(){var t=[],n=[];function r(e){return null==e||e!==e?void 0:n[(dg(t,e)-1)%n.length]}return r.domain=function(e){return arguments.length?(t=xg(e),r):t.slice()},r.range=function(e){return arguments.length?(n=Sg.call(e),r):n.slice()},r.tickFormat=function(e,n){return kg(t[0],Object(R.U)(t),null==e?10:e,n)},r.copy=function(){return e().domain(r.domain()).range(r.range())},r}),["discrete","discretizing"]),bp("ordinal",mg,"discrete"),bp("band",Ig,"discrete"),bp("point",(function(){return function e(t){var n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,t.copy=function(){return e(n())},t}(Ig().paddingInner(1))}),"discrete");var Sp,Op,Dp,Rp,jp=function(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}},Mp=function(e,t){var n=fd(+e,+t);return function(e){var t=n(e);return t-360*Math.floor(t/360)}},Np=180/Math.PI,Fp={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Tp=function(e,t,n,r,i,a){var o,s,u;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),e*r<t*n&&(e=-e,t=-t,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Np,skewX:Math.atan(u)*Np,scaleX:o,scaleY:s}};function Lp(e,t,n,r){function i(e){return e.length?e.pop()+" ":""}return function(a,o){var s=[],u=[];return a=e(a),o=e(o),function(e,r,i,a,o,s){if(e!==i||r!==a){var u=o.push("translate(",null,t,null,n);s.push({i:u-4,x:Bd(e,i)},{i:u-2,x:Bd(r,a)})}else(i||a)&&o.push("translate("+i+t+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,u),function(e,t,n,a){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Bd(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(a.rotate,o.rotate,s,u),function(e,t,n,a){e!==t?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Bd(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(a.skewX,o.skewX,s,u),function(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Bd(e,n)},{i:s-2,x:Bd(t,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,u),a=o=null,function(e){for(var t,n=-1,r=u.length;++n<r;)s[(t=u[n]).i]=t.x(e);return s.join("")}}}var Pp=Lp((function(e){return"none"===e?Fp:(Sp||(Sp=document.createElement("DIV"),Op=document.documentElement,Dp=document.defaultView),Sp.style.transform=e,e=Dp.getComputedStyle(Op.appendChild(Sp),null).getPropertyValue("transform"),Op.removeChild(Sp),e=e.slice(7,-1).split(","),Tp(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}),"px, ","px)","deg)"),Up=Lp((function(e){return null==e?Fp:(Rp||(Rp=document.createElementNS("http://www.w3.org/2000/svg","g")),Rp.setAttribute("transform",e),(e=Rp.transform.baseVal.consolidate())?(e=e.matrix,Tp(e.a,e.b,e.c,e.d,e.e,e.f)):Fp)}),", ",")",")"),Gp=Math.SQRT2;function qp(e){return((e=Math.exp(e))+1/e)/2}var Hp=function(e,t){var n,r,i=e[0],a=e[1],o=e[2],s=t[0],u=t[1],A=t[2],c=s-i,l=u-a,f=c*c+l*l;if(f<1e-12)r=Math.log(A/o)/Gp,n=function(e){return[i+e*c,a+e*l,o*Math.exp(Gp*e*r)]};else{var h=Math.sqrt(f),g=(A*A-o*o+4*f)/(2*o*2*h),d=(A*A-o*o-4*f)/(2*A*2*h),p=Math.log(Math.sqrt(g*g+1)-g),v=Math.log(Math.sqrt(d*d+1)-d);r=(v-p)/Gp,n=function(e){var t,n=e*r,s=qp(p),u=o/(2*h)*(s*(t=Gp*n+p,((t=Math.exp(2*t))-1)/(t+1))-function(e){return((e=Math.exp(e))-1/e)/2}(p));return[i+u*c,a+u*l,o*s/qp(Gp*n+p)]}}return n.duration=1e3*r,n};function Yp(e){return function(t,n){var r=e((t=id(t)).h,(n=id(n)).h),i=gd(t.s,n.s),a=gd(t.l,n.l),o=gd(t.opacity,n.opacity);return function(e){return t.h=r(e),t.s=i(e),t.l=a(e),t.opacity=o(e),t+""}}}var Jp=Yp(fd),zp=Yp(gd),Kp=Math.PI/180,Wp=180/Math.PI;function Vp(e){if(e instanceof Zp)return new Zp(e.l,e.a,e.b,e.opacity);if(e instanceof av)return ov(e);e instanceof Zg||(e=Vg(e));var t,n,r=nv(e.r),i=nv(e.g),a=nv(e.b),o=$p((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?t=n=o:(t=$p((.4360747*r+.3850649*i+.1430804*a)/.96422),n=$p((.0139322*r+.0971045*i+.7141733*a)/.82521)),new Zp(116*o-16,500*(t-o),200*(o-n),e.opacity)}function Xp(e,t,n,r){return 1===arguments.length?Vp(e):new Zp(e,t,n,null==r?1:r)}function Zp(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function $p(e){return e>6/29*(6/29)*(6/29)?Math.pow(e,1/3):e/(6/29*3*(6/29))+4/29}function ev(e){return e>6/29?e*e*e:6/29*3*(6/29)*(e-4/29)}function tv(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function nv(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function rv(e){if(e instanceof av)return new av(e.h,e.c,e.l,e.opacity);if(e instanceof Zp||(e=Vp(e)),0===e.a&&0===e.b)return new av(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Wp;return new av(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function iv(e,t,n,r){return 1===arguments.length?rv(e):new av(e,t,n,null==r?1:r)}function av(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function ov(e){if(isNaN(e.h))return new Zp(e.l,0,0,e.opacity);var t=e.h*Kp;return new Zp(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function sv(e,t){var n=gd((e=Xp(e)).l,(t=Xp(t)).l),r=gd(e.a,t.a),i=gd(e.b,t.b),a=gd(e.opacity,t.opacity);return function(t){return e.l=n(t),e.a=r(t),e.b=i(t),e.opacity=a(t),e+""}}function uv(e){return function(t,n){var r=e((t=iv(t)).h,(n=iv(n)).h),i=gd(t.c,n.c),a=gd(t.l,n.l),o=gd(t.opacity,n.opacity);return function(e){return t.h=r(e),t.c=i(e),t.l=a(e),t.opacity=o(e),t+""}}}Og(Zp,Xp,Dg(Rg,{brighter:function(e){return new Zp(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Zp(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Zg(tv(3.1338561*(t=.96422*ev(t))-1.6168667*(e=1*ev(e))-.4906146*(n=.82521*ev(n))),tv(-.9787684*t+1.9161415*e+.033454*n),tv(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Og(av,iv,Dg(Rg,{brighter:function(e){return new av(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new av(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return ov(this).rgb()}}));var Av=uv(fd),cv=uv(gd),lv=1.97294,fv=-.90649*lv,hv=1.78277*lv,gv=-.6557636667999999;function dv(e){if(e instanceof vv)return new vv(e.h,e.s,e.l,e.opacity);e instanceof Zg||(e=Vg(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(gv*r+fv*t-hv*n)/(gv+fv-hv),a=r-i,o=(lv*(n-i)- -.29227*a)/-.90649,s=Math.sqrt(o*o+a*a)/(lv*i*(1-i)),u=s?Math.atan2(o,a)*Wp-120:NaN;return new vv(u<0?u+360:u,s,i,e.opacity)}function pv(e,t,n,r){return 1===arguments.length?dv(e):new vv(e,t,n,null==r?1:r)}function vv(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function yv(e){return function t(n){function r(t,r){var i=e((t=pv(t)).h,(r=pv(r)).h),a=gd(t.s,r.s),o=gd(t.l,r.l),s=gd(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=a(e),t.l=o(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,r.gamma=t,r}(1)}Og(vv,pv,Dg(Rg,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new vv(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new vv(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Kp,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new Zg(255*(t+n*(-.14861*r+1.78277*i)),255*(t+n*(-.29227*r+-.90649*i)),255*(t+n*(lv*r)),this.opacity)}}));var mv=yv(fd),Iv=yv(gd),bv=function(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n},Ev=["clamp","base","constant","exponent"];function Cv(e,t){var n=t[0],r=Object(R.U)(t)-n;return function(t){return e(n+t*r)}}function Bv(e,t,n){return cp(kv(t||"rgb",n),e)}function wv(e,t){for(var n=new Array(t),r=t+1,i=0;i<t;)n[i]=e(++i/r);return n}function Qv(e,t,n){var r,i,a,o=n-t;return o&&Number.isFinite(o)?(r=(i=e.type).indexOf("-"),i=r<0?i:i.slice(r+1),a=bp(i)().domain([t,n]).range([0,1]),Ev.forEach((function(t){return e[t]?a[t](e[t]()):0})),a):Object(R.l)(.5)}function kv(e,t){var n=o[function(e){return"interpolate"+e.toLowerCase().split("-").map((function(e){return e[0].toUpperCase()+e.slice(1)})).join("")}(e)];return null!=t&&n&&n.gamma?n.gamma(t):n}function _v(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(6*r,6*++r);return n}function xv(e,t){for(var n in e)Ov(n,t(e[n]))}var Sv={};function Ov(e,t){return e=e&&e.toLowerCase(),arguments.length>1?(Sv[e]=t,this):Sv[e]}xv({category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"},_v),xv({blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},(function(e){return Bv(_v(e))}));var Dv,Rv,jv=function(e){return Object(R.A)(e)?e.map((function(e){return String(e)})):String(e)},Mv=function(e,t){return e[1]-t[1]},Nv=function(e,t){return t[1]-e[1]};function Fv(e,t,n){var r;return Object(R.E)(t)&&(e.bins&&(t=Math.max(t,e.bins.length)),null!=n&&(t=Math.min(t,Math.floor(Object(R.X)(e.domain())/n||1)))),Object(R.F)(t)&&(r=t.step,t=t.interval),Object(R.H)(t)&&(t=e.type===ug?Jr(t):e.type==Ag?zr(t):Object(R.n)("Only time and utc scales accept interval strings."),r&&(t=t.every(r))),t}function Tv(e,t,n){var r=e.range(),i=r[0],a=Object(R.U)(r),o=Mv;if(i>a&&(r=a,a=i,i=r,o=Nv),i=Math.floor(i),a=Math.ceil(a),t=t.map((function(t){return[t,e(t)]})).filter((function(e){return i<=e[1]&&e[1]<=a})).sort(o).map((function(e){return e[0]})),n>0&&t.length>1){for(var s=[t[0],Object(R.U)(t)];t.length>n&&t.length>=3;)t=t.filter((function(e,t){return!(t%2)}));t.length<3&&(t=s)}return t}function Lv(e,t){return e.bins?Tv(e,e.bins):e.ticks?e.ticks(t):e.domain()}function Pv(e,t,n,r,i,a){var o=t.type,s=jv;if(o===ug||i===ug)s=e.timeFormat(r);else if(o===Ag||i===Ag)s=e.utcFormat(r);else if(kp(o)){var u=e.formatFloat(r);if(a||t.bins)s=u;else{var A=Uv(t,n,!1);s=function(e){return A(e)?u(e):""}}}else if(t.tickFormat){var c=t.domain();s=e.formatSpan(c[0],c[c.length-1],n,r)}else r&&(s=e.format(r));return s}function Uv(e,t,n){var r=Lv(e,t),i=e.base(),a=Math.log(i),o=Math.max(1,i*t/r.length),s=function(e){var t=e/Math.pow(i,Math.round(Math.log(e)/a));return t*i<i-.5&&(t*=i),t<=o};return n?r.filter(s):s}var Gv=(Dv={},Object(Q.a)(Dv,"quantile","quantiles"),Object(Q.a)(Dv,"quantize","thresholds"),Object(Q.a)(Dv,"threshold","domain"),Dv),qv=(Rv={},Object(Q.a)(Rv,"quantile","quantiles"),Object(Q.a)(Rv,"quantize","domain"),Rv);function Hv(e,t){return e.bins?function(e){var t=e.slice(0,-1);return t.max=Object(R.U)(e),t}(e.bins):e.type===sg?Uv(e,t,!0):Gv[e.type]?function(e){var t=[-1/0].concat(e);return t.max=1/0,t}(e[Gv[e.type]]()):Lv(e,t)}function Yv(e,t,n,r,i,a,o){var s=qv[t.type]&&a!==ug&&a!==Ag?function(e,t,n){var r,i=t[qv[t.type]](),a=i.length,o=a>1?i[1]-i[0]:i[0];for(r=1;r<a;++r)o=Math.min(o,i[r]-i[r-1]);return e.formatSpan(0,o,30,n)}(e,t,i):Pv(e,t,n,i,a,o);return"symbol"===r&&function(e){return Gv[e.type]||e.bins}(t)?function(e){return function(t,n,r){var i=Jv(r[n+1],Jv(r.max,1/0)),a=zv(t,e),o=zv(i,e);return a&&o?a+" \u2013 "+o:o?"< "+o:"\u2265 "+a}}(s):"discrete"===r?function(e){return function(t,n){return n?e(t):null}}(s):function(e){return function(t){return e(t)}}(s)}function Jv(e,t){return null!=e?e:t}function zv(e,t){return Number.isFinite(e)?t(e):null}function Kv(e,t,n,r){var i=r||t.type;return Object(R.H)(n)&&Cp(i,"temporal")&&(n=n.replace(/%a/g,"%A").replace(/%b/g,"%B")),n||i!==ug?n||i!==Ag?Yv(e,t,5,null,n,r,!0):e.utcFormat("%A, %d %B %Y, %X UTC"):e.timeFormat("%A, %d %B %Y, %X")}function Wv(e,t,n){n=n||{};var r=Math.max(3,n.maxlen||7),i=Kv(e,t,n.format,n.formatType);if(Qp(t.type)){var a=Hv(t).slice(1).map(i),o=a.length;return"".concat(o," boundar").concat(1===o?"y":"ies",": ").concat(a.join(", "))}if(wp(t.type)){var s=t.domain(),u=s.length,A=u>r?s.slice(0,r-2).map(i).join(", ")+", ending with "+s.slice(-1).map(i):s.map(i).join(", ");return"".concat(u," value").concat(1===u?"":"s",": ").concat(A)}var c=t.domain();return"values from ".concat(i(c[0])," to ").concat(i(Object(R.U)(c)))}var Vv=function(e,t,n){var r;return r={},Object(Q.a)(r,"role",e),Object(Q.a)(r,"aria-roledescription",t),Object(Q.a)(r,"aria-label",n||void 0),r},Xv=Object(R.db)(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),Zv={axis:{desc:"axis",caption:function(e){var t=e.datum,n=e.orient,r=t.title?ry(e):null,i=e.context,a=i.scales[t.scale].value,o=i.dataflow.locale(),s=a.type;return"".concat("left"===n||"right"===n?"Y":"X","-axis")+(r?" titled '".concat(r,"'"):"")+" for a ".concat(wp(s)?"discrete":s," scale")+" with ".concat(Wv(o,a,e))}},legend:{desc:"legend",caption:function(e){var t=e.datum,n=t.title?ry(e):null,r="".concat(t.type||""," legend").trim(),i=t.scales,a=Object.keys(i),o=e.context,s=o.scales[i[a[0]]].value,u=o.dataflow.locale();return A=r,(A.length?A[0].toUpperCase()+A.slice(1):A)+(n?" titled '".concat(n,"'"):"")+" for ".concat(function(e){return(e=e.map((function(e){return e+("fill"===e||"stroke"===e?" color":"")}))).length<2?e[0]:e.slice(0,-1).join(", ")+" and "+Object(R.U)(e)}(a))+" with ".concat(Wv(u,s,e));var A}},"title-text":{desc:"title",caption:function(e){return"Title text '".concat(ny(e),"'")}},"title-subtitle":{desc:"subtitle",caption:function(e){return"Subtitle text '".concat(ny(e),"'")}}},$v={ariaRole:"role",ariaRoleDescription:"aria-roledescription",description:"aria-label"};function ey(e,t){var n=!1===t.aria;if(e("aria-hidden",n||void 0),n||null==t.description)for(var r in $v)e($v[r],void 0);else{var i=t.mark.marktype;e("aria-label",t.description),e("role",t.ariaRole||("group"===i?"graphics-object":"graphics-symbol")),e("aria-roledescription",t.ariaRoleDescription||"".concat(i," mark"))}}function ty(e){return!1===e.aria?Object(Q.a)({},"aria-hidden",!0):Xv[e.role]?null:Zv[e.role]?function(e,t){try{var n=e.items[0],r=t.caption||function(){return""};return Vv(t.role||"graphics-symbol",t.desc,n.description||r(n))}catch(i){return null}}(e,Zv[e.role]):function(e){var t=e.marktype,n="group"===t||"text"===t||e.items.some((function(e){return null!=e.description&&!1!==e.aria}));return Vv(n?"graphics-object":"graphics-symbol","".concat(t," mark container"),e.description)}(e)}function ny(e){return Object(R.i)(e.text).join(" ")}function ry(e){try{return Object(R.i)(Object(R.U)(e.items).items[0].text).join(" ")}catch(t){return null}}var iy=function(e){return(e+"").replace(/&/g,"&amp;").replace(/"/g,"&quot;")};function ay(e,t,n){var r,i,a="<"+e;if(t)for(r in t)null!=(i=t[r])&&(a+=" "+r+'="'+iy(i)+'"');return n&&(a+=" "+n),a+">"}function oy(e){return"</"+e+">"}var sy={fill:"fill",fillOpacity:"fill-opacity",stroke:"stroke",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",strokeCap:"stroke-linecap",strokeJoin:"stroke-linejoin",strokeDash:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeMiterLimit:"stroke-miterlimit",opacity:"opacity",blend:"mix-blend-mode"},uy={fill:"none","stroke-miterlimit":10},Ay=Ff.xmlns;function cy(e){Fh.call(this,e),this._dirtyID=0,this._dirty=[],this._svg=null,this._root=null,this._defs=null}var ly=Object(R.y)(cy,Fh),fy=Fh.prototype;function hy(e,t,n){var r,i,a;if("radial"===t.gradient){var o=Sh(e,n++,"pattern",Ay);o.setAttribute("id","p_"+t.id),o.setAttribute("viewBox","0,0,1,1"),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("preserveAspectRatio","xMidYMid slice"),(o=Sh(o,0,"rect",Ay)).setAttribute("width","1"),o.setAttribute("height","1"),o.setAttribute("fill","url("+Cy()+"#"+t.id+")"),(e=Sh(e,n++,"radialGradient",Ay)).setAttribute("id",t.id),e.setAttribute("fx",t.x1),e.setAttribute("fy",t.y1),e.setAttribute("fr",t.r1),e.setAttribute("cx",t.x2),e.setAttribute("cy",t.y2),e.setAttribute("r",t.r2)}else(e=Sh(e,n++,"linearGradient",Ay)).setAttribute("id",t.id),e.setAttribute("x1",t.x1),e.setAttribute("x2",t.x2),e.setAttribute("y1",t.y1),e.setAttribute("y2",t.y2);for(r=0,i=t.stops.length;r<i;++r)(a=Sh(e,r,"stop",Ay)).setAttribute("offset",t.stops[r].offset),a.setAttribute("stop-color",t.stops[r].color);return Oh(e,r),n}function gy(e,t,n){var r;return(e=Sh(e,n,"clipPath",Ay)).setAttribute("id",t.id),t.path?(r=Sh(e,0,"path",Ay)).setAttribute("d",t.path):((r=Sh(e,0,"rect",Ay)).setAttribute("x",0),r.setAttribute("y",0),r.setAttribute("width",t.width),r.setAttribute("height",t.height)),Oh(e,1),n+1}function dy(e,t){for(;e&&e.dirty!==t;e=e.mark.group){if(e.dirty=t,!e.mark||e.mark.dirty===t)return;e.mark.dirty=t}}function py(e,t,n,r,i){var a,o=e._svg;if(!o&&(o=_h(a=t.ownerDocument,r,Ay),e._svg=o,e.mark&&(o.__data__=e,o.__values__={fill:"default"},"g"===r))){var s=_h(a,"path",Ay);o.appendChild(s),s.__data__=e;var u=_h(a,"g",Ay);o.appendChild(u),u.__data__=e;var A=_h(a,"path",Ay);o.appendChild(A),A.__data__=e,A.__values__={fill:"default"}}return(o.ownerSVGElement!==i||function(e,t){return e.parentNode&&e.parentNode.childNodes.length>1&&e.previousSibling!=t}(o,n))&&t.insertBefore(o,n?n.nextSibling:t.firstChild),o}ly.initialize=function(e,t,n,r){if(this._defs={gradient:{},clipping:{}},e){for(var i in this._svg=Sh(e,0,"svg",Ay),this._svg.setAttribute("class","marks"),Oh(e,1),this._root=Sh(this._svg,0,"g",Ay),uy)this._root.setAttribute(i,uy[i]);Oh(this._svg,1)}return this.background(this._bgcolor),fy.initialize.call(this,e,t,n,r)},ly.background=function(e){return arguments.length&&this._svg&&this._svg.style.setProperty("background-color",e),fy.background.apply(this,arguments)},ly.resize=function(e,t,n,r){return fy.resize.call(this,e,t,n,r),this._svg&&(this._svg.setAttribute("width",this._width*this._scale),this._svg.setAttribute("height",this._height*this._scale),this._svg.setAttribute("viewBox","0 0 "+this._width+" "+this._height),this._root.setAttribute("transform","translate("+this._origin+")")),this._dirty=[],this},ly.canvas=function(){return this._svg},ly.svg=function(){if(!this._svg)return null;var e={class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:"0 0 "+this._width+" "+this._height};for(var t in Ff)e[t]=Ff[t];var n=this._bgcolor?ay("rect",{width:this._width,height:this._height,fill:this._bgcolor})+oy("rect"):"";return ay("svg",e)+(this._defs.el?this._defs.el.outerHTML:"")+n+this._root.outerHTML+oy("svg")},ly._render=function(e){return this._dirtyCheck()&&(this._dirtyAll&&this._resetDefs(),this.draw(this._root,e),Oh(this._root,1)),this.updateDefs(),this._dirty=[],++this._dirtyID,this},ly.updateDefs=function(){var e=this._svg,t=this._defs,n=t.el,r=0;for(var i in t.gradient)n||(t.el=n=Sh(e,0,"defs",Ay)),r=hy(n,t.gradient[i],r);for(var a in t.clipping)n||(t.el=n=Sh(e,0,"defs",Ay)),r=gy(n,t.clipping[a],r);n&&(0===r?(e.removeChild(n),t.el=null):Oh(n,r))},ly._resetDefs=function(){var e=this._defs;e.gradient={},e.clipping={}},ly.dirty=function(e){e.dirty!==this._dirtyID&&(e.dirty=this._dirtyID,this._dirty.push(e))},ly.isDirty=function(e){return this._dirtyAll||!e._svg||e.dirty===this._dirtyID},ly._dirtyCheck=function(){this._dirtyAll=!0;var e=this._dirty;if(!e.length||!this._dirtyID)return!0;var t,n,r,i,a,o,s,u=++this._dirtyID;for(a=0,o=e.length;a<o;++a)(n=(t=e[a]).mark).marktype!==r&&(r=n.marktype,i=yh[r]),n.zdirty&&n.dirty!==u&&(this._dirtyAll=!1,dy(t,u),n.items.forEach((function(e){e.dirty=u}))),n.zdirty||(t.exit?(i.nested&&n.items.length?(s=n.items[0])._svg&&this._update(i,s._svg,s):t._svg&&(s=t._svg.parentNode)&&s.removeChild(t._svg),t._svg=null):(t=i.nested?n.items[0]:t)._update!==u&&(t._svg&&t._svg.ownerSVGElement?this._update(i,t._svg,t):(this._dirtyAll=!1,dy(t,u)),t._update=u));return!this._dirtyAll},ly.draw=function(e,t,n){var r=this;if(!this.isDirty(t))return t._svg;var i,a=this._svg,o=yh[t.marktype],s=!1===t.interactive?"none":null,u="g"===o.tag,A=null,c=0;(i=py(t,e,n,"g",a)).setAttribute("class",Dh(t));var l=ty(t);for(var f in l)Ey(i,f,l[f]);u||Ey(i,"pointer-events",s),Ey(i,"clip-path",t.clip?kl(this,t,t.group):null);var h=function(e){var t=r.isDirty(e),n=py(e,i,A,o.tag,a);t&&(r._update(o,n,e),u&&function(e,t,n){t=t.lastChild.previousSibling;var r,i=0;df(n,(function(n){r=e.draw(t,n,r),++i})),Oh(t,1+i)}(r,n,e)),A=n,++c};return o.nested?t.items.length&&h(t.items[0]):df(t,h),Oh(i,c),i};var vy=null,yy=null,my={group:function(e,t,n){var r=vy=t.childNodes[2];yy=r.__values__,e.foreground(by,n,this),yy=t.__values__,vy=t.childNodes[1],e.content(by,n,this);var i=vy=t.childNodes[0];e.background(by,n,this);var a=!1===n.mark.interactive?"none":null;if(a!==yy.events&&(Ey(r,"pointer-events",a),Ey(i,"pointer-events",a),yy.events=a),n.strokeForeground&&n.stroke){var o=n.fill;Ey(r,"display",null),this.style(i,n),Ey(i,"stroke",null),o&&(n.fill=null),yy=r.__values__,this.style(r,n),o&&(n.fill=o),vy=null}else Ey(r,"display","none")},image:function(e,t,n){!1===n.smooth?(Iy(t,"image-rendering","optimizeSpeed"),Iy(t,"image-rendering","pixelated")):Iy(t,"image-rendering",null)},text:function(e,t,n){var r,i,a,o,s=uh(n);Object(R.A)(s)?(r=(i=s.map((function(e){return ch(n,e)}))).join("\n"))!==yy.text&&(Oh(t,0),a=t.ownerDocument,o=sh(n),i.forEach((function(e,r){var i=_h(a,"tspan",Ay);i.__data__=n,i.textContent=e,r&&(i.setAttribute("x",0),i.setAttribute("dy",o)),t.appendChild(i)})),yy.text=r):(i=ch(n,s))!==yy.text&&(t.textContent=i,yy.text=i),Ey(t,"font-family",lh(n)),Ey(t,"font-size",oh(n)+"px"),Ey(t,"font-style",n.fontStyle),Ey(t,"font-variant",n.fontVariant),Ey(t,"font-weight",n.fontWeight)}};function Iy(e,t,n){n!==yy[t]&&(null==n?e.style.removeProperty(t):e.style.setProperty(t,n+""),yy[t]=n)}function by(e,t,n){t!==yy[e]&&(n?function(e,t,n,r){null!=n?e.setAttributeNS(r,t,n):e.removeAttributeNS(r,t)}(vy,e,t,n):Ey(vy,e,t),yy[e]=t)}function Ey(e,t,n){null!=n?e.setAttribute(t,n):e.removeAttribute(t)}function Cy(){var e;return"undefined"===typeof window?"":(e=window.location).hash?e.href.slice(0,-e.hash.length):e.href}function By(e){Fh.call(this,e),this._text={head:"",bg:"",root:"",foot:"",defs:"",body:""},this._defs={gradient:{},clipping:{}}}ly._update=function(e,t,n){vy=t,yy=t.__values__,ey(by,n),e.attr(by,n,this);var r=my[e.type];r&&r.call(this,e,t,n),vy&&this.style(vy,n)},ly.style=function(e,t){if(null!=t)for(var n in sy){var r="font"===n?lh(t):t[n];if(r!==yy[n]){var i=sy[n];null==r?e.removeAttribute(i):(IA(r)&&(r=bA(r,this._defs.gradient,Cy())),e.setAttribute(i,r+"")),yy[n]=r}}};var wy=Object(R.y)(By,Fh),Qy=Fh.prototype;function ky(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}wy.resize=function(e,t,n,r){Qy.resize.call(this,e,t,n,r);var i=this._origin,a=this._text,o={class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:"0 0 "+this._width+" "+this._height};for(var s in Ff)o[s]=Ff[s];a.head=ay("svg",o);var u=this._bgcolor;return"transparent"!==u&&"none"!==u||(u=null),a.bg=u?ay("rect",{width:this._width,height:this._height,fill:u})+oy("rect"):"",a.root=ay("g",Object(R.o)({},uy,{transform:"translate("+i+")"})),a.foot=oy("g")+oy("svg"),this},wy.background=function(){var e=Qy.background.apply(this,arguments);return arguments.length&&this._text.head&&this.resize(this._width,this._height,this._origin,this._scale),e},wy.svg=function(){var e=this._text;return e.head+e.defs+e.bg+e.root+e.body+e.foot},wy._render=function(e){return this._text.body=this.mark(e),this._text.defs=this.buildDefs(),this},wy.buildDefs=function(){var e,t="";for(var n in this._defs.gradient){var r=this._defs.gradient[n],i=r.stops;"radial"===r.gradient?(t+=ay(e="pattern",{id:"p_"+n,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),t+=ay("rect",{width:"1",height:"1",fill:"url(#"+n+")"})+oy("rect"),t+=oy(e),t+=ay(e="radialGradient",{id:n,fx:r.x1,fy:r.y1,fr:r.r1,cx:r.x2,cy:r.y2,r:r.r2})):t+=ay(e="linearGradient",{id:n,x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2});for(var a=0;a<i.length;++a)t+=ay("stop",{offset:i[a].offset,"stop-color":i[a].color})+oy("stop");t+=oy(e)}for(var o in this._defs.clipping){var s=this._defs.clipping[o];t+=ay("clipPath",{id:o}),s.path?t+=ay("path",{d:s.path})+oy("path"):t+=ay("rect",{x:0,y:0,width:s.width,height:s.height})+oy("rect"),t+=oy("clipPath")}return t?ay("defs")+t+oy("defs"):""},wy.attr=function(e,t,n,r){var i=this,a={},o=function(e,t,n,r){a[r||e]=t};return Array.isArray(n)?n.forEach((function(e){return e(o,t,i)})):n(o,t,this),r&&function(e,t,n,r,i){if(null==t)return e;"bgrect"===r&&!1===n.interactive&&(e["pointer-events"]="none");if("bgfore"===r&&(!1===n.interactive&&(e["pointer-events"]="none"),e.display="none",null!==t.fill))return e;"image"===r&&!1===t.smooth&&(e.style="image-rendering: optimizeSpeed; image-rendering: pixelated;");"text"===r&&(e["font-family"]=lh(t),e["font-size"]=oh(t)+"px",t.fontStyle&&(e["font-style"]=t.fontStyle),t.fontVariant&&(e["font-variant"]=t.fontVariant),t.fontWeight&&(e["font-weight"]=t.fontWeight));for(var a in sy){var o=t[a],s=sy[a];("transparent"!==o||"fill"!==s&&"stroke"!==s)&&null!=o&&(IA(o)&&(o=bA(o,i.gradient,"")),e[s]=o)}}(a,t,e,r,this._defs),a},wy.href=function(e){var t,n=this,r=e.href;if(r){if(t=n._hrefs&&n._hrefs[r])return t;n.sanitizeURL(r).then((function(e){e["xlink:href"]=e.href,e.href=null,(n._hrefs||(n._hrefs={}))[r]=e}))}return null},wy.mark=function(e){var t=this,n=yh[e.marktype],r=n.tag,i=[ey,n.attr],a="";a+=ay("g",Object(R.o)({class:Dh(e),"clip-path":e.clip?kl(this,e,e.group):null},ty(e),{"pointer-events":"g"!==r&&!1===e.interactive?"none":null}));var o=function(o){var s=t.href(o);if(s&&(a+=ay("a",s)),a+=ay(r,t.attr(e,o,i,"g"!==r?r:null)),"text"===r){var u=uh(o);if(Object(R.A)(u))for(var A={x:0,dy:sh(o)},c=0;c<u.length;++c)a+=ay("tspan",c?A:null)+ky(ch(o,u[c]))+oy("tspan");else a+=ky(ch(o,u))}else if("g"===r){var l=o.strokeForeground,f=o.fill,h=o.stroke;l&&h&&(o.stroke=null),a+=ay("path",t.attr(e,o,n.background,"bgrect"))+oy("path"),a+=ay("g",t.attr(e,o,n.content))+t.markGroup(o)+oy("g"),l&&h?(f&&(o.fill=null),o.stroke=h,a+=ay("path",t.attr(e,o,n.foreground,"bgrect"))+oy("path"),f&&(o.fill=f)):a+=ay("path",t.attr(e,o,n.foreground,"bgfore"))+oy("path")}a+=oy(r),s&&(a+=oy("a"))};return n.nested?e.items&&e.items.length&&o(e.items[0]):df(e,o),a+oy("g")},wy.markGroup=function(e){var t=this,n="";return df(e,(function(e){n+=t.mark(e)})),n};var _y={Canvas:"canvas",PNG:"png",SVG:"svg",None:"none"},xy={};function Sy(e,t){return e=String(e||"").toLowerCase(),arguments.length>1?(xy[e]=t,this):xy[e]}function Oy(e,t,n){var r=[],i=(new _l).union(t),a=e.marktype;return a?Dy(e,i,n,r):"group"===a?Ry(e,i,n,r):Object(R.n)("Intersect scene must be mark node or group item.")}function Dy(e,t,n,r){if(function(e,t,n){return e.bounds&&t.intersects(e.bounds)&&("group"===e.marktype||!1!==e.interactive&&(!n||n(e)))}(e,t,n)){var i=e.items,a=e.marktype,o=i.length,s=0;if("group"===a)for(;s<o;++s)Ry(i[s],t,n,r);else for(var u=yh[a].isect;s<o;++s){var A=i[s];jy(A,t,u)&&r.push(A)}}return r}function Ry(e,t,n,r){n&&n(e.mark)&&jy(e,t,yh.group.isect)&&r.push(e);var i=e.items,a=i&&i.length;if(a){var o=e.x||0,s=e.y||0;t.translate(-o,-s);for(var u=0;u<a;++u)Dy(i[u],t,n,r);t.translate(o,s)}return r}function jy(e,t,n){var r=e.bounds;return t.encloses(r)||t.intersects(r)&&n(e,t)}xy.canvas=xy.png={renderer:eg,headless:eg,handler:Kh},xy.svg={renderer:cy,headless:By,handler:rg},xy.none={};var My=new _l,Ny=function(e){var t=e.clip;if(Object(R.D)(t))t(ql(My.clear()));else{if(!t)return;My.set(0,0,e.group.width,e.group.height)}e.bounds.intersect(My)};function Fy(e,t,n){return e===t||("path"===n?Ty(e,t):e instanceof Date&&t instanceof Date?+e===+t:Object(R.E)(e)&&Object(R.E)(t)?Math.abs(e-t)<=1e-9:e&&t&&(Object(R.F)(e)||Object(R.F)(t))?null!=e&&null!=t&&function(e,t){var n,r,i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(i.sort(),a.sort(),r=i.length-1;r>=0;r--)if(i[r]!=a[r])return!1;for(r=i.length-1;r>=0;r--)if(n=i[r],!Fy(e[n],t[n],n))return!1;return typeof e===typeof t}(e,t):e==t)}function Ty(e,t){return Fy(Ic(e),Ic(t))}function Ly(){Ql(),mA=0}function Py(e){po.call(this,null,e)}function Uy(e,t,n){return t(e.bounds.clear(),e,n)}Object(R.y)(Py,po).transform=function(e,t){var n,r=t.dataflow,i=e.mark,a=i.marktype,o=yh[a],s=o.bound,u=i.bounds;if(o.nested)i.items.length&&r.dirty(i.items[0]),u=Uy(i,s),i.items.forEach((function(e){e.bounds.clear().union(u)}));else if("group"===a||e.modified())switch(t.visit(t.MOD,(function(e){return r.dirty(e)})),u.clear(),i.items.forEach((function(e){return u.union(Uy(e,s))})),i.role){case"axis":case"legend":case"title":t.reflow()}else n=t.changed(t.REM),t.visit(t.ADD,(function(e){u.union(Uy(e,s))})),t.visit(t.MOD,(function(e){n=n||u.alignsWith(e.bounds),r.dirty(e),u.union(Uy(e,s))})),n&&(u.clear(),i.items.forEach((function(e){return u.union(e.bounds)})));return Ny(i),t.modifies("bounds")};function Gy(e){po.call(this,0,e)}function qy(e){po.call(this,null,e)}function Hy(e){po.call(this,null,e)}Gy.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]},Object(R.y)(Gy,po).transform=function(e,t){var n=function(e){var t=e._signals[":vega_identifier:"];t||(e._signals[":vega_identifier:"]=t=e.add(0));return t}(t.dataflow),r=n.value,i=e.as;return t.visit(t.ADD,(function(e){e[i]||(e[i]=++r)})),n.set(this.value=r),t},Object(R.y)(qy,po).transform=function(e,t){var n=this.value;n||((n=t.dataflow.scenegraph().mark(e.markdef,function(e){var t=e.groups,n=e.parent;return t&&1===t.size?t.get(Object.keys(t.object)[0]):t&&n?t.lookup(n):null}(e),e.index)).group.context=e.context,e.context.group||(e.context.group=n.group),n.source=this.source,n.clip=e.clip,n.interactive=e.interactive,this.value=n);var r="group"===n.marktype?Ol:Sl;return t.visit(t.ADD,(function(e){return r.call(e,n)})),(e.modified("clip")||e.modified("interactive"))&&(n.clip=e.clip,n.interactive=!!e.interactive,n.zdirty=!0,t.reflow()),n.items=t.source,t};var Yy=Object(R.y)(Hy,po),Jy={parity:function(e){return e.filter((function(e,t){return t%2?e.opacity=0:1}))},greedy:function(e,t){var n;return e.filter((function(e,r){return r&&zy(n.bounds,e.bounds,t)?e.opacity=0:(n=e,1)}))}};function zy(e,t,n){return n>Math.max(t.x1-e.x2,e.x1-t.x2,t.y1-e.y2,e.y1-t.y2)}function Ky(e,t){for(var n,r=1,i=e.length,a=e[0].bounds;r<i;a=n,++r)if(zy(a,n=e[r].bounds,t))return!0}function Wy(e){var t=e.bounds;return t.width()>1&&t.height()>1}function Vy(e){return e.forEach((function(e){return e.opacity=1})),e}function Xy(e,t){return e.reflow(t.modified()).modifies("opacity")}function Zy(e){po.call(this,null,e)}Yy.transform=function(e,t){var n,r,i,a=Jy[e.method]||Jy.parity,o=t.materialize(t.SOURCE).source,s=e.separation||0;if(o&&o.length){if(!e.method)return e.modified("method")&&(Vy(o),t=Xy(t,e)),t;if((o=o.filter(Wy)).length){if(e.sort&&(o=o.slice().sort(e.sort)),n=Vy(o),t=Xy(t,e),n.length>=3&&Ky(n,s)){do{n=a(n,s)}while(n.length>=3&&Ky(n,s));n.length<3&&!Object(R.U)(o).opacity&&(n.length>1&&(Object(R.U)(n).opacity=0),Object(R.U)(o).opacity=1)}return e.boundScale&&e.boundTolerance>=0&&(r=function(e,t,n){var r=e.range(),i=new _l;return t===dA||"bottom"===t?i.set(r[0],-1/0,r[1],1/0):i.set(-1/0,r[0],1/0,r[1]),i.expand(n||1),function(e){return i.encloses(e.bounds)}}(e.boundScale,e.boundOrient,+e.boundTolerance),o.forEach((function(e){r(e)||(e.opacity=0)}))),i=n[0].mark.bounds.clear(),o.forEach((function(e){e.opacity&&i.union(e.bounds)})),t}}},Object(R.y)(Zy,po).transform=function(e,t){var n=t.dataflow;if(t.visit(t.ALL,(function(e){return n.dirty(e)})),t.fields&&t.fields.zindex){var r=t.source&&t.source[0];r&&(r.mark.zdirty=!0)}};var $y=new _l;function em(e,t,n){return e[t]===n?0:(e[t]=n,1)}function tm(e){var t=e.items[0].orient;return t===pA||t===vA}function nm(e,t,n,r){var i,a,o=t.items[0],s=o.datum,u=null!=o.translate?o.translate:.5,A=o.orient,c=function(e){var t=+e.grid;return[e.ticks?t++:-1,e.labels?t++:-1,t+ +e.domain]}(s),l=o.range,f=o.offset,h=o.position,g=o.minExtent,d=o.maxExtent,p=s.title&&o.items[c[2]].items[0],v=o.titlePadding,y=o.bounds,m=p&&Ah(p),I=0,b=0;switch($y.clear().union(y),y.clear(),(i=c[0])>-1&&y.union(o.items[i].bounds),(i=c[1])>-1&&y.union(o.items[i].bounds),A){case dA:I=h||0,b=-f,a=Math.max(g,Math.min(d,-y.y1)),y.add(0,-a).add(l,0),p&&rm(e,p,a,v,m,0,-1,y);break;case pA:I=-f,b=h||0,a=Math.max(g,Math.min(d,-y.x1)),y.add(-a,0).add(0,l),p&&rm(e,p,a,v,m,1,-1,y);break;case vA:I=n+f,b=h||0,a=Math.max(g,Math.min(d,y.x2)),y.add(0,0).add(a,l),p&&rm(e,p,a,v,m,1,1,y);break;case"bottom":I=h||0,b=r+f,a=Math.max(g,Math.min(d,y.y2)),y.add(0,0).add(l,a),p&&rm(e,p,a,v,0,0,1,y);break;default:I=o.x,b=o.y}return Tl(y.translate(I,b),o),em(o,"x",I+u)|em(o,"y",b+u)&&(o.bounds=$y,e.dirty(o),o.bounds=y,e.dirty(o)),o.mark.bounds.clear().union(y)}function rm(e,t,n,r,i,a,o,s){var u=t.bounds;if(t.auto){var A=o*(n+i+r),c=0,l=0;e.dirty(t),a?c=(t.x||0)-(t.x=A):l=(t.y||0)-(t.y=A),t.mark.bounds.clear().union(u.translate(-c,-l)),e.dirty(t)}s.union(u)}var im=n(22),am=function(e,t){return Math.floor(Math.min(e,t))},om=function(e,t){return Math.ceil(Math.max(e,t))};function sm(e){return(new _l).set(0,0,e.width||0,e.height||0)}function um(e){var t=e.bounds.clone();return t.empty()?t.set(0,0,0,0):t.translate(-(e.x||0),-(e.y||0))}function Am(e,t,n){var r=Object(R.F)(e)?e[t]:e;return null!=r?r:void 0!==n?n:0}function cm(e){return e<0?Math.ceil(-e):0}function lm(e,t,n){var r,i,a,o,s,u,A,c,l,f,h,g=!n.nodirty,d="flush"===n.bounds?sm:um,p=$y.set(0,0,0,0),v=Am(n.align,"column"),y=Am(n.align,"row"),m=Am(n.padding,"column"),I=Am(n.padding,"row"),b=n.columns||t.length,E=b<=0?1:Math.ceil(t.length/b),C=t.length,B=Array(C),w=Array(b),Q=0,k=Array(C),_=Array(E),x=0,S=Array(C),O=Array(C),D=Array(C);for(i=0;i<b;++i)w[i]=0;for(i=0;i<E;++i)_[i]=0;for(i=0;i<C;++i)u=t[i],s=D[i]=d(u),u.x=u.x||0,S[i]=0,u.y=u.y||0,O[i]=0,a=i%b,o=~~(i/b),Q=Math.max(Q,A=Math.ceil(s.x2)),x=Math.max(x,c=Math.ceil(s.y2)),w[a]=Math.max(w[a],A),_[o]=Math.max(_[o],c),B[i]=m+cm(s.x1),k[i]=I+cm(s.y1),g&&e.dirty(t[i]);for(i=0;i<C;++i)i%b===0&&(B[i]=0),i<b&&(k[i]=0);if("each"===v)for(a=1;a<b;++a){for(h=0,i=a;i<C;i+=b)h<B[i]&&(h=B[i]);for(i=a;i<C;i+=b)B[i]=h+w[a-1]}else if("all"===v){for(h=0,i=0;i<C;++i)i%b&&h<B[i]&&(h=B[i]);for(i=0;i<C;++i)i%b&&(B[i]=h+Q)}else for(v=!1,a=1;a<b;++a)for(i=a;i<C;i+=b)B[i]+=w[a-1];if("each"===y)for(o=1;o<E;++o){for(h=0,r=(i=o*b)+b;i<r;++i)h<k[i]&&(h=k[i]);for(i=o*b;i<r;++i)k[i]=h+_[o-1]}else if("all"===y){for(h=0,i=b;i<C;++i)h<k[i]&&(h=k[i]);for(i=b;i<C;++i)k[i]=h+x}else for(y=!1,o=1;o<E;++o)for(r=(i=o*b)+b;i<r;++i)k[i]+=_[o-1];for(l=0,i=0;i<C;++i)l=B[i]+(i%b?l:0),S[i]+=l-t[i].x;for(a=0;a<b;++a)for(f=0,i=a;i<C;i+=b)f+=k[i],O[i]+=f-t[i].y;if(v&&Am(n.center,"column")&&E>1)for(i=0;i<C;++i)(l=(s="all"===v?Q:w[i%b])-D[i].x2-t[i].x-S[i])>0&&(S[i]+=l/2);if(y&&Am(n.center,"row")&&1!==b)for(i=0;i<C;++i)(f=(s="all"===y?x:_[~~(i/b)])-D[i].y2-t[i].y-O[i])>0&&(O[i]+=f/2);for(i=0;i<C;++i)p.union(D[i].translate(S[i],O[i]));switch(l=Am(n.anchor,"x"),f=Am(n.anchor,"y"),Am(n.anchor,"column")){case yA:l-=p.width();break;case"middle":l-=p.width()/2}switch(Am(n.anchor,"row")){case yA:f-=p.height();break;case"middle":f-=p.height()/2}for(l=Math.round(l),f=Math.round(f),p.clear(),i=0;i<C;++i)t[i].mark.bounds.clear();for(i=0;i<C;++i)(u=t[i]).x+=S[i]+=l,u.y+=O[i]+=f,p.union(u.mark.bounds.union(u.bounds.translate(S[i],O[i]))),g&&e.dirty(u);return p}function fm(e,t,n){var r,i,a,o,s,u,A,c=function(e){for(var t,n,r,i,a,o,s,u=e.items,A=u.length,c=0,l={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};c<A;++c)if(s=(o=u[c]).items,"group"===o.marktype)switch(o.role){case"axis":case"legend":case"title":break;case"row-header":(t=l.rowheaders).push.apply(t,Object(im.a)(s));break;case"row-footer":(n=l.rowfooters).push.apply(n,Object(im.a)(s));break;case"column-header":(r=l.colheaders).push.apply(r,Object(im.a)(s));break;case"column-footer":(i=l.colfooters).push.apply(i,Object(im.a)(s));break;case"row-title":l.rowtitle=s[0];break;case"column-title":l.coltitle=s[0];break;default:(a=l.marks).push.apply(a,Object(im.a)(s))}return l}(t),l=c.marks,f="flush"===n.bounds?hm:gm,h=n.offset,g=n.columns||l.length,d=g<=0?1:Math.ceil(l.length/g),p=d*g,v=lm(e,l,n);v.empty()&&v.set(0,0,0,0),c.rowheaders&&(u=Am(n.headerBand,"row",null),r=dm(e,c.rowheaders,l,g,d,-Am(h,"rowHeader"),am,0,f,"x1",0,g,1,u)),c.colheaders&&(u=Am(n.headerBand,"column",null),i=dm(e,c.colheaders,l,g,g,-Am(h,"columnHeader"),am,1,f,"y1",0,1,g,u)),c.rowfooters&&(u=Am(n.footerBand,"row",null),a=dm(e,c.rowfooters,l,g,d,Am(h,"rowFooter"),om,0,f,"x2",g-1,g,1,u)),c.colfooters&&(u=Am(n.footerBand,"column",null),o=dm(e,c.colfooters,l,g,g,Am(h,"columnFooter"),om,1,f,"y2",p-g,1,g,u)),c.rowtitle&&(s=Am(n.titleAnchor,"row"),A=Am(h,"rowTitle"),A=s===yA?a+A:r-A,u=Am(n.titleBand,"row",.5),pm(e,c.rowtitle,A,0,v,u)),c.coltitle&&(s=Am(n.titleAnchor,"column"),A=Am(h,"columnTitle"),A=s===yA?o+A:i-A,u=Am(n.titleBand,"column",.5),pm(e,c.coltitle,A,1,v,u))}function hm(e,t){return"x1"===t?e.x||0:"y1"===t?e.y||0:"x2"===t?(e.x||0)+(e.width||0):"y2"===t?(e.y||0)+(e.height||0):void 0}function gm(e,t){return e.bounds[t]}function dm(e,t,n,r,i,a,o,s,u,A,c,l,f,h){var g,d,p,v,y,m,I,b,E,C=n.length,B=0,w=0;if(!C)return B;for(g=c;g<C;g+=l)n[g]&&(B=o(B,u(n[g],A)));if(!t.length)return B;for(t.length>i&&(e.warn("Grid headers exceed limit: "+i),t=t.slice(0,i)),B+=a,d=0,v=t.length;d<v;++d)e.dirty(t[d]),t[d].mark.bounds.clear();for(g=c,d=0,v=t.length;d<v;++d,g+=l){for(y=(m=t[d]).mark.bounds,p=g;p>=0&&null==(I=n[p]);p-=f);s?(b=null==h?I.x:Math.round(I.bounds.x1+h*I.bounds.width()),E=B):(b=B,E=null==h?I.y:Math.round(I.bounds.y1+h*I.bounds.height())),y.union(m.bounds.translate(b-(m.x||0),E-(m.y||0))),m.x=b,m.y=E,e.dirty(m),w=o(w,y[A])}return w}function pm(e,t,n,r,i,a){if(t){e.dirty(t);var o=n,s=n;r?o=Math.round(i.x1+a*i.width()):s=Math.round(i.y1+a*i.height()),t.bounds.translate(o-(t.x||0),s-(t.y||0)),t.mark.bounds.clear().union(t.bounds),t.x=o,t.y=s,e.dirty(t)}}function vm(e,t,n,r,i,a,o){var s=function(e,t){var n=e[t]||{};return function(t,r){return null!=n[t]?n[t]:null!=e[t]?e[t]:r}}(n,t),u=function(e,t){var n=-1/0;return e.forEach((function(e){null!=e.offset&&(n=Math.max(n,e.offset))})),n>-1/0?n:t}(e,s("offset",0)),A=s("anchor","start"),c=A===yA?1:"middle"===A?.5:0,l={align:"each",bounds:s("bounds","flush"),columns:"vertical"===s("direction")?1:e.length,padding:s("margin",8),center:s("center"),nodirty:!0};switch(t){case pA:l.anchor={x:Math.floor(r.x1)-u,column:yA,y:c*(o||r.height()+2*r.y1),row:A};break;case vA:l.anchor={x:Math.ceil(r.x2)+u,y:c*(o||r.height()+2*r.y1),row:A};break;case dA:l.anchor={y:Math.floor(i.y1)-u,row:yA,x:c*(a||i.width()+2*i.x1),column:A};break;case"bottom":l.anchor={y:Math.ceil(i.y2)+u,x:c*(a||i.width()+2*i.x1),column:A};break;case"top-left":l.anchor={x:u,y:u};break;case"top-right":l.anchor={x:a-u,y:u,column:yA};break;case"bottom-left":l.anchor={x:u,y:o-u,row:yA};break;case"bottom-right":l.anchor={x:a-u,y:o-u,column:yA,row:yA}}return l}function ym(e,t){var n,r,i=t.items[0],a=i.datum,o=i.orient,s=i.bounds,u=i.x,A=i.y;return i._bounds?i._bounds.clear().union(s):i._bounds=s.clone(),s.clear(),function(e,t,n){var r=t.padding,i=r-n.x,a=r-n.y;if(t.datum.title){var o=t.items[1].items[0],s=o.anchor,u=t.titlePadding||0,A=r-o.x,c=r-o.y;switch(o.orient){case pA:i+=Math.ceil(o.bounds.width())+u;break;case vA:case"bottom":break;default:a+=o.bounds.height()+u}switch((i||a)&&Im(e,n,i,a),o.orient){case pA:c+=mm(t,n,o,s,1,1);break;case vA:A+=mm(t,n,o,yA,0,0)+u,c+=mm(t,n,o,s,1,1);break;case"bottom":A+=mm(t,n,o,s,0,0),c+=mm(t,n,o,yA,-1,0,1)+u;break;default:A+=mm(t,n,o,s,0,0)}(A||c)&&Im(e,o,A,c),(A=Math.round(o.bounds.x1-r))<0&&(Im(e,n,-A,0),Im(e,o,-A,0))}else(i||a)&&Im(e,n,i,a)}(e,i,i.items[0].items[0]),s=function(e,t){return e.items.forEach((function(e){return t.union(e.bounds)})),t.x1=e.padding,t.y1=e.padding,t}(i,s),n=2*i.padding,r=2*i.padding,s.empty()||(n=Math.ceil(s.width()+n),r=Math.ceil(s.height()+r)),"symbol"===a.type&&function(e){var t=e.reduce((function(e,t){return e[t.column]=Math.max(t.bounds.x2-t.x,e[t.column]||0),e}),{});e.forEach((function(e){e.width=t[e.column],e.height=e.bounds.y2-e.y}))}(i.items[0].items[0].items[0].items),"none"!==o&&(i.x=u=0,i.y=A=0),i.width=n,i.height=r,Tl(s.set(u,A,u+n,A+r),i),i.mark.bounds.clear().union(s),i}function mm(e,t,n,r,i,a,o){var s="symbol"!==e.datum.type,u=n.datum.vgrad,A=(!s||!a&&u||o?t:t.items[0]).bounds[i?"y2":"x2"]-e.padding,c=u&&a?A:0,l=u&&a?0:A,f=i<=0?0:Ah(n);return Math.round("start"===r?c:r===yA?l-f:.5*(A-f))}function Im(e,t,n,r){t.x+=n,t.y+=r,t.bounds.translate(n,r),t.mark.bounds.translate(n,r),e.dirty(t)}function bm(e){po.call(this,null,e)}function Em(e){po.call(this,null,e)}function Cm(e){po.call(this,null,e)}function Bm(){return je({})}function wm(e){po.call(this,null,e)}function Qm(e){po.call(this,[],e)}Object(R.y)(bm,po).transform=function(e,t){var n,r=t.dataflow;return e.mark.items.forEach((function(t){e.layout&&fm(r,t,e.layout),function(e,t,n){var r,i,a,o,s,u=t.items,A=Math.max(0,t.width||0),c=Math.max(0,t.height||0),l=(new _l).set(0,0,A,c),f=l.clone(),h=l.clone(),g=[];for(o=0,s=u.length;o<s;++o)switch((i=u[o]).role){case"axis":(tm(i)?f:h).union(nm(e,i,A,c));break;case"title":r=i;break;case"legend":g.push(ym(e,i));break;case"frame":case"scope":case"row-header":case"row-footer":case"row-title":case"column-header":case"column-footer":case"column-title":f.union(i.bounds),h.union(i.bounds);break;default:l.union(i.bounds)}if(g.length){var d={};for(var p in g.forEach((function(e){"none"!==(a=e.orient||vA)&&(d[a]||(d[a]=[])).push(e)})),d){var v=d[p];lm(e,v,vm(v,p,n.legends,f,h,A,c))}g.forEach((function(t){var r=t.bounds;if(r.equals(t._bounds)||(t.bounds=t._bounds,e.dirty(t),t.bounds=r,e.dirty(t)),n.autosize&&"fit"===n.autosize.type)switch(t.orient){case pA:case vA:l.add(r.x1,0).add(r.x2,0);break;case dA:case"bottom":l.add(0,r.y1).add(0,r.y2)}else l.union(r)}))}l.union(f).union(h),r&&l.union(function(e,t,n,r,i){var a,o=t.items[0],s=o.frame,u=o.orient,A=o.anchor,c=o.offset,l=o.padding,f=o.items[0].items[0],h=o.items[1]&&o.items[1].items[0],g=u===pA||u===vA?r:n,d=0,p=0,v=0,y=0,m=0;if("group"!==s?u===pA?(d=i.y2,g=i.y1):u===vA?(d=i.y1,g=i.y2):(d=i.x1,g=i.x2):u===pA&&(d=r,g=0),a="start"===A?d:A===yA?g:(d+g)/2,h&&h.text){switch(u){case dA:case"bottom":m=f.bounds.height()+l;break;case pA:y=f.bounds.width()+l;break;case vA:y=-f.bounds.width()-l}$y.clear().union(h.bounds),$y.translate(y-(h.x||0),m-(h.y||0)),em(h,"x",y)|em(h,"y",m)&&(e.dirty(h),h.bounds.clear().union($y),h.mark.bounds.clear().union($y),e.dirty(h)),$y.clear().union(h.bounds)}else $y.clear();switch($y.union(f.bounds),u){case dA:p=a,v=i.y1-$y.height()-c;break;case pA:p=i.x1-$y.width()-c,v=a;break;case vA:p=i.x2+$y.width()+c,v=a;break;case"bottom":p=a,v=i.y2+c;break;default:p=o.x,v=o.y}return em(o,"x",p)|em(o,"y",v)&&($y.translate(p,v),e.dirty(o),o.bounds.clear().union($y),t.bounds.clear().union($y),e.dirty(o)),o.bounds}(e,r,A,c,l));t.clip&&l.set(0,0,t.width||0,t.height||0);!function(e,t,n,r){var i=r.autosize||{},a=i.type;if(e._autosize<1||!a)return;var o=e._width,s=e._height,u=Math.max(0,t.width||0),A=Math.max(0,Math.ceil(-n.x1)),c=Math.max(0,Math.ceil(n.x2-u)),l=Math.max(0,t.height||0),f=Math.max(0,Math.ceil(-n.y1)),h=Math.max(0,Math.ceil(n.y2-l));if("padding"===i.contains){var g=e.padding();o-=g.left+g.right,s-=g.top+g.bottom}"none"===a?(A=0,f=0,u=o,l=s):"fit"===a?(u=Math.max(0,o-A-c),l=Math.max(0,s-f-h)):"fit-x"===a?(u=Math.max(0,o-A-c),s=l+f+h):"fit-y"===a?(o=u+A+c,l=Math.max(0,s-f-h)):"pad"===a&&(o=u+A+c,s=l+f+h);e._resizeView(o,s,u,l,[A,f],i.resize)}(e,t,l,n)}(r,t,e)})),(n=e.mark.group)&&"legend-entry"!==n.mark.role?t.reflow():t},Object(R.y)(Em,po).transform=function(e,t){if(this.value&&!e.modified())return t.StopPropagation;var n=t.dataflow.locale(),r=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=this.value,a=e.scale,o=Fv(a,null==e.count?e.values?e.values.length:10:e.count,e.minstep),s=e.format||Pv(n,a,o,e.formatSpecifier,e.formatType,!!e.values),u=e.values?Tv(a,e.values,o):Lv(a,o);return i&&(r.rem=i),i=u.map((function(e,t){return je({index:t/(u.length-1||1),value:e,label:s(e)})})),e.extra&&i.length&&i.push(je({index:-1,extra:{value:i[0].value},label:""})),r.source=i,r.add=i,this.value=i,r},Object(R.y)(Cm,po).transform=function(e,t){var n=t.dataflow,r=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=e.item||Bm,a=e.key||De,o=this.value;return Object(R.A)(r.encode)&&(r.encode=null),o&&(e.modified("key")||t.modified(a))&&Object(R.n)("DataJoin does not support modified key function or fields."),o||(t=t.addAll(),this.value=o=function(e){var t=Object(R.s)().test((function(e){return e.exit}));return t.lookup=function(n){return t.get(e(n))},t}(a)),t.visit(t.ADD,(function(e){var t=a(e),n=o.get(t);n?n.exit?(o.empty--,r.add.push(n)):r.mod.push(n):(n=i(e),o.set(t,n),r.add.push(n)),n.datum=e,n.exit=!1})),t.visit(t.MOD,(function(e){var t=a(e),n=o.get(t);n&&(n.datum=e,r.mod.push(n))})),t.visit(t.REM,(function(e){var t=a(e),n=o.get(t);e!==n.datum||n.exit||(r.rem.push(n),n.exit=!0,++o.empty)})),t.changed(t.ADD_MOD)&&r.modifies("datum"),(t.clean()||e.clean&&o.empty>n.cleanThreshold)&&n.runAfter(o.clean),r},Object(R.y)(wm,po).transform=function(e,t){var n=t.fork(t.ADD_REM),r=e.mod||!1,i=e.encoders,a=t.encode;if(Object(R.A)(a)){if(!n.changed()&&!a.every((function(e){return i[e]})))return t.StopPropagation;a=a[0],n.encode=null}var o="enter"===a,s=i.update||R.r,u=i.enter||R.r,A=i.exit||R.r,c=(a&&!o?i[a]:s)||R.r;if(t.changed(t.ADD)&&(t.visit(t.ADD,(function(t){u(t,e),s(t,e)})),n.modifies(u.output),n.modifies(s.output),c!==R.r&&c!==s&&(t.visit(t.ADD,(function(t){c(t,e)})),n.modifies(c.output))),t.changed(t.REM)&&A!==R.r&&(t.visit(t.REM,(function(t){A(t,e)})),n.modifies(A.output)),o||c!==R.r){var l=t.MOD|(e.modified()?t.REFLOW:0);o?(t.visit(l,(function(t){var i=u(t,e)||r;(c(t,e)||i)&&n.mod.push(t)})),n.mod.length&&n.modifies(u.output)):t.visit(l,(function(t){(c(t,e)||r)&&n.mod.push(t)})),n.mod.length&&n.modifies(c.output)}return n.changed()?n:t.StopPropagation},Object(R.y)(Qm,po).transform=function(e,t){if(null!=this.value&&!e.modified())return t.StopPropagation;var n,r,i,a,o,s=t.dataflow.locale(),u=t.fork(t.NO_SOURCE|t.NO_FIELDS),A=this.value,c=e.type||"symbol",l=e.scale,f=+e.limit,h=Fv(l,null==e.count?5:e.count,e.minstep),g=!!e.values||"symbol"===c,d=e.format||Yv(s,l,h,c,e.formatSpecifier,e.formatType,g),p=e.values||Hv(l,h);return A&&(u.rem=A),"symbol"===c?(f&&p.length>f?(t.dataflow.warn("Symbol legend count exceeds limit, filtering items."),A=p.slice(0,f-1),o=!0):A=p,Object(R.D)(i=e.size)?(e.values||0!==l(A[0])||(A=A.slice(1)),a=A.reduce((function(t,n){return Math.max(t,i(n,e))}),0)):i=Object(R.l)(a=i||8),A=A.map((function(t,n){return je({index:n,label:d(t,n,A),value:t,offset:a,size:i(t,e)})})),o&&(o=p[A.length],A.push(je({index:A.length,label:"\u2026".concat(p.length-A.length," entries"),value:o,offset:a,size:i(o,e)})))):"gradient"===c?(n=l.domain(),r=Qv(l,n[0],Object(R.U)(n)),p.length<3&&!e.values&&n[0]!==Object(R.U)(n)&&(p=[n[0],Object(R.U)(n)]),A=p.map((function(e,t){return je({index:t,label:d(e,t,p),value:e,perc:r(e)})}))):(i=p.length-1,r=function(e){var t=e.domain(),n=t.length-1,r=+t[0],i=+Object(R.U)(t),a=i-r;if("threshold"===e.type){var o=n?a/n:.1;a=(i+=o)-(r-=o)}return function(e){return(e-r)/a}}(l),A=p.map((function(e,t){return je({index:t,label:d(e,t,p),value:e,perc:t?r(e):0,perc2:t===i?1:r(p[t+1])})}))),u.source=A,u.add=A,this.value=A,u};var km=Object(R.s)({line:Rm,"line-radial":function(e,t,n,r){return Rm(t*Math.cos(e),t*Math.sin(e),r*Math.cos(n),r*Math.sin(n))},arc:jm,"arc-radial":function(e,t,n,r){return jm(t*Math.cos(e),t*Math.sin(e),r*Math.cos(n),r*Math.sin(n))},curve:Mm,"curve-radial":function(e,t,n,r){return Mm(t*Math.cos(e),t*Math.sin(e),r*Math.cos(n),r*Math.sin(n))},"orthogonal-horizontal":function(e,t,n,r){return"M"+e+","+t+"V"+r+"H"+n},"orthogonal-vertical":function(e,t,n,r){return"M"+e+","+t+"H"+n+"V"+r},"orthogonal-radial":function(e,t,n,r){var i=Math.cos(e),a=Math.sin(e),o=Math.cos(n),s=Math.sin(n),u=Math.abs(n-e)>Math.PI?n<=e:n>e;return"M"+t*i+","+t*a+"A"+t+","+t+" 0 0,"+(u?1:0)+" "+t*o+","+t*s+"L"+r*o+","+r*s},"diagonal-horizontal":function(e,t,n,r){var i=(e+n)/2;return"M"+e+","+t+"C"+i+","+t+" "+i+","+r+" "+n+","+r},"diagonal-vertical":function(e,t,n,r){var i=(t+r)/2;return"M"+e+","+t+"C"+e+","+i+" "+n+","+i+" "+n+","+r},"diagonal-radial":function(e,t,n,r){var i=Math.cos(e),a=Math.sin(e),o=Math.cos(n),s=Math.sin(n),u=(t+r)/2;return"M"+t*i+","+t*a+"C"+u*i+","+u*a+" "+u*o+","+u*s+" "+r*o+","+r*s}});function _m(e){return e.source.x}function xm(e){return e.source.y}function Sm(e){return e.target.x}function Om(e){return e.target.y}function Dm(e){po.call(this,{},e)}function Rm(e,t,n,r){return"M"+e+","+t+"L"+n+","+r}function jm(e,t,n,r){var i=n-e,a=r-t,o=Math.sqrt(i*i+a*a)/2;return"M"+e+","+t+"A"+o+","+o+" "+180*Math.atan2(a,i)/Math.PI+" 0 1 "+n+","+r}function Mm(e,t,n,r){var i=n-e,a=r-t,o=.2*(i+a),s=.2*(a-i);return"M"+e+","+t+"C"+(e+o)+","+(t+s)+" "+(n+s)+","+(r-o)+" "+n+","+r}Dm.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]},Object(R.y)(Dm,po).transform=function(e,t){var n=e.sourceX||_m,r=e.sourceY||xm,i=e.targetX||Sm,a=e.targetY||Om,o=e.as||"path",s=e.orient||"vertical",u=e.shape||"line",A=km.get(u+"-"+s)||km.get(u);return A||Object(R.n)("LinkPath unsupported type: "+e.shape+(e.orient?"-"+e.orient:"")),t.visit(t.SOURCE,(function(e){e[o]=A(n(e),r(e),i(e),a(e))})),t.reflow(e.modified()).modifies(o)};var Nm=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(i);++r<i;)a[r]=e+r*n;return a};function Fm(e){po.call(this,null,e)}Fm.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]},Object(R.y)(Fm,po).transform=function(e,t){var n,r,i,a=e.as||["startAngle","endAngle"],o=a[0],s=a[1],u=e.field||R.O,A=e.startAngle||0,c=null!=e.endAngle?e.endAngle:2*Math.PI,l=t.source,f=l.map(u),h=f.length,g=A,d=(c-A)/function(e,t){var n=0;if(void 0===t){var r,i=Object(D.a)(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;(a=+a)&&(n+=a)}}catch(c){i.e(c)}finally{i.f()}}else{var o,s=-1,u=Object(D.a)(e);try{for(u.s();!(o=u.n()).done;){var A=o.value;(A=+t(A,++s,e))&&(n+=A)}}catch(c){u.e(c)}finally{u.f()}}return n}(f),p=Nm(h);for(e.sort&&p.sort((function(e,t){return f[e]-f[t]})),n=0;n<h;++n)i=f[p[n]],(r=l[p[n]])[o]=g,r[s]=g+=i*d;return this.value=f,t.reflow(e.modified()).modifies(a)};function Tm(e){return Bp(e)&&"sequential"!==e}var Lm=Object(R.db)(["set","modified","clear","type","scheme","schemeExtent","schemeCount","domain","domainMin","domainMid","domainMax","domainRaw","domainImplicit","nice","zero","bins","range","rangeStep","round","reverse","interpolate","interpolateGamma"]);function Pm(e){po.call(this,null,e),this.modified(!0)}function Um(e,t,n){kp(e)&&(Math.abs(t.reduce((function(e,t){return e+(t<0?-1:t>0?1:0)}),0))!==t.length&&n.warn("Log scale domain includes zero: "+Object(R.Z)(t)));return t}function Gm(e,t,n){return Object(R.D)(e)&&(t||n)?Cv(e,qm(t||[0,1],n)):e}function qm(e,t){return t?e.slice().reverse():e}function Hm(e){po.call(this,null,e)}Object(R.y)(Pm,po).transform=function(e,t){var n=t.dataflow,r=this.value,i=function(e){var t,n=e.type,r="";if("sequential"===n)return"sequential-linear";(function(e){var t=e.type;return Bp(t)&&t!==ug&&t!==Ag&&(e.scheme||e.range&&e.range.length&&e.range.every(R.H))})(e)&&(t=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(null!=e.domainMid):0,r=2===t?"sequential-":3===t?"diverging-":"");return(r+n||"linear").toLowerCase()}(e);for(i in r&&i===r.type||(this.value=r=bp(i)()),e)if(!Lm[i]){if("padding"===i&&Tm(r.type))continue;Object(R.D)(r[i])?r[i](e[i]):n.warn("Unsupported scale property: "+i)}return function(e,t,n){var r=e.type,i=t.round||!1,a=t.range;if(null!=t.rangeStep)a=function(e,t,n){"band"!==e&&"point"!==e&&Object(R.n)("Only band and point scales support rangeStep.");var r=(null!=t.paddingOuter?t.paddingOuter:t.padding)||0,i="point"===e?1:(null!=t.paddingInner?t.paddingInner:t.padding)||0;return[0,t.rangeStep*og(n,i,r)]}(r,t,n);else if(t.scheme&&(a=function(e,t,n){var r,i,a=t.schemeExtent;Object(R.A)(t.scheme)?i=Bv(t.scheme,t.interpolate,t.interpolateGamma):(r=t.scheme.toLowerCase(),(i=Ov(r))||Object(R.n)("Unrecognized scheme name: ".concat(t.scheme)));return n="threshold"===e?n+1:"bin-ordinal"===e?n-1:"quantile"===e||"quantize"===e?+t.schemeCount||5:n,_p(e)?Gm(i,a,t.reverse):Object(R.D)(i)?wv(Gm(i,a),n):"ordinal"===e?i:i.slice(0,n)}(r,t,n),Object(R.D)(a))){if(e.interpolator)return e.interpolator(a);Object(R.n)("Scale type ".concat(r," does not support interpolating color schemes."))}if(a&&_p(r))return e.interpolator(Bv(qm(a,t.reverse),t.interpolate,t.interpolateGamma));a&&t.interpolate&&e.interpolate?e.interpolate(kv(t.interpolate,t.interpolateGamma)):Object(R.D)(e.round)?e.round(i):Object(R.D)(e.rangeRound)&&e.interpolate(i?Sd:xd);a&&e.range(qm(a,t.reverse))}(r,e,function(e,t,n){var r=t.bins;if(r&&!Object(R.A)(r)){var i=e.domain(),a=i[0],o=Object(R.U)(i),s=null==r.start?a:r.start,u=null==r.stop?o:r.stop,A=r.step;A||Object(R.n)("Scale bins parameter missing step property."),s<a&&(s=A*Math.ceil(a/A)),u>o&&(u=A*Math.floor(o/A)),r=Nm(s,u+A/2,A)}r?e.bins=r:e.bins&&delete e.bins;"bin-ordinal"===e.type&&(r?t.domain||t.domainRaw||(e.domain(r),n=r.length):e.bins=e.domain());return n}(r,e,function(e,t,n){var r=function(e,t,n){return t?(e.domain(Um(e.type,t,n)),t.length):-1}(e,t.domainRaw,n);if(r>-1)return r;var i,a,o=t.domain,s=e.type,u=t.zero||void 0===t.zero&&function(e){var t=e.type;return!e.bins&&("linear"===t||"pow"===t||"sqrt"===t)}(e);if(!o)return 0;Tm(s)&&t.padding&&o[0]!==Object(R.U)(o)&&(o=function(e,t,n,r,i,a){var o=Math.abs(Object(R.U)(n)-n[0]),s=o/(o-2*r),u=e===sg?Object(R.mb)(t,null,s):"sqrt"===e?Object(R.nb)(t,null,s,.5):"pow"===e?Object(R.nb)(t,null,s,i||1):"symlog"===e?Object(R.ob)(t,null,s,a||1):Object(R.lb)(t,null,s);return(t=t.slice())[0]=u[0],t[t.length-1]=u[1],t}(s,o,t.range,t.padding,t.exponent,t.constant));if((u||null!=t.domainMin||null!=t.domainMax||null!=t.domainMid)&&(i=(o=o.slice()).length-1||1,u&&(o[0]>0&&(o[0]=0),o[i]<0&&(o[i]=0)),null!=t.domainMin&&(o[0]=t.domainMin),null!=t.domainMax&&(o[i]=t.domainMax),null!=t.domainMid)){var A=(a=t.domainMid)>o[i]?i+1:a<o[0]?0:i;A!==i&&n.warn("Scale domainMid exceeds domain min or max.",a),o.splice(A,0,a)}e.domain(Um(s,o,n)),"ordinal"===s&&e.unknown(t.domainImplicit?yg:void 0);t.nice&&e.nice&&e.nice(!0!==t.nice&&Fv(e,t.nice)||null);return o.length}(r,e,n))),t.fork(t.NO_SOURCE|t.NO_FIELDS)},Object(R.y)(Hm,po).transform=function(e,t){var n=e.modified("sort")||t.changed(t.ADD)||t.modified(e.sort.fields)||t.modified("datum");return n&&t.source.sort(Te(e.sort)),this.modified(n),t};var Ym=["y0","y1"];function Jm(e){po.call(this,null,e)}function zm(e,t,n,r,i){for(var a,o=(t-e.sum)/2,s=e.length,u=0;u<s;++u)(a=e[u])[r]=o,a[i]=o+=Math.abs(n(a))}function Km(e,t,n,r,i){for(var a,o=1/e.sum,s=0,u=e.length,A=0,c=0;A<u;++A)(a=e[A])[r]=s,a[i]=s=o*(c+=Math.abs(n(a)))}function Wm(e,t,n,r,i){for(var a,o,s=0,u=0,A=e.length,c=0;c<A;++c)(a=+n(o=e[c]))<0?(o[r]=u,o[i]=u+=a):(o[r]=s,o[i]=s+=a)}function Vm(e,t){var n;if(void 0===t){var r,i=Object(D.a)(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;null!=a&&(n<a||void 0===n&&a>=a)&&(n=a)}}catch(c){i.e(c)}finally{i.f()}}else{var o,s=-1,u=Object(D.a)(e);try{for(u.s();!(o=u.n()).done;){var A=o.value;null!=(A=t(A,++s,e))&&(n<A||void 0===n&&A>=A)&&(n=A)}}catch(c){u.e(c)}finally{u.f()}}return n}function Xm(){}Jm.Definition={type:"Stack",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"groupby",type:"field",array:!0},{name:"sort",type:"compare"},{name:"offset",type:"enum",default:"zero",values:["zero","center","normalize"]},{name:"as",type:"string",array:!0,length:2,default:Ym}]},Object(R.y)(Jm,po).transform=function(e,t){var n,r,i,a,o=e.as||Ym,s=o[0],u=o[1],A=Te(e.sort),c=e.field||R.O,l="center"===e.offset?zm:"normalize"===e.offset?Km:Wm;for(n=function(e,t,n,r){var i,a,o,s,u,A,c,l,f,h=[],g=function(e){return e(u)};if(null==t)h.push(e.slice());else for(i={},a=0,o=e.length;a<o;++a)u=e[a],A=t.map(g),(c=i[A])||(i[A]=c=[],h.push(c)),c.push(u);for(A=0,f=0,s=h.length;A<s;++A){for(c=h[A],a=0,l=0,o=c.length;a<o;++a)l+=Math.abs(r(c[a]));c.sum=l,l>f&&(f=l),n&&c.sort(n)}return h.max=f,h}(t.source,e.groupby,A,c),r=0,i=n.length,a=n.max;r<i;++r)l(n[r],a,c,s,u);return t.reflow(e.modified()).modifies(o)};var Zm=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],$m=function(){var e=1,t=1,n=o;function r(e,t){return t.map((function(t){return i(e,t)}))}function i(r,i){var o=[],s=[];return function(n,r,i){var o,s,u,A,c,l,f=new Array,h=new Array;o=s=-1,A=n[0]>=r,Zm[A<<1].forEach(g);for(;++o<e-1;)u=A,A=n[o+1]>=r,Zm[u|A<<1].forEach(g);Zm[A<<0].forEach(g);for(;++s<t-1;){for(o=-1,A=n[s*e+e]>=r,c=n[s*e]>=r,Zm[A<<1|c<<2].forEach(g);++o<e-1;)u=A,A=n[s*e+e+o+1]>=r,l=c,c=n[s*e+o+1]>=r,Zm[u|A<<1|c<<2|l<<3].forEach(g);Zm[A|c<<3].forEach(g)}o=-1,c=n[s*e]>=r,Zm[c<<2].forEach(g);for(;++o<e-1;)l=c,c=n[s*e+o+1]>=r,Zm[c<<2|l<<3].forEach(g);function g(e){var t,n,r=[e[0][0]+o,e[0][1]+s],u=[e[1][0]+o,e[1][1]+s],A=a(r),c=a(u);(t=h[A])?(n=f[c])?(delete h[t.end],delete f[n.start],t===n?(t.ring.push(u),i(t.ring)):f[t.start]=h[n.end]={start:t.start,end:n.end,ring:t.ring.concat(n.ring)}):(delete h[t.end],t.ring.push(u),h[t.end=c]=t):(t=f[c])?(n=h[A])?(delete f[t.start],delete h[n.end],t===n?(t.ring.push(u),i(t.ring)):f[n.start]=h[t.end]={start:n.start,end:t.end,ring:n.ring.concat(t.ring)}):(delete f[t.start],t.ring.unshift(r),f[t.start=A]=t):f[A]=h[c]={start:A,end:c,ring:[r,u]}}Zm[c<<3].forEach(g)}(r,i,(function(e){n(e,r,i),function(e){var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];for(;++t<n;)r+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1];return r}(e)>0?o.push([e]):s.push(e)})),s.forEach((function(e){for(var t,n=0,r=o.length;n<r;++n)if(-1!==eI((t=o[n])[0],e))return void t.push(e)})),{type:"MultiPolygon",value:i,coordinates:o}}function a(t){return 2*t[0]+t[1]*(e+1)*4}function o(n,r,i){n.forEach((function(n){var a,o=n[0],s=n[1],u=0|o,A=0|s,c=r[A*e+u];o>0&&o<e&&u===o&&(a=r[A*e+u-1],n[0]=o+(i-a)/(c-a)-.5),s>0&&s<t&&A===s&&(a=r[(A-1)*e+u],n[1]=s+(i-a)/(c-a)-.5)}))}return r.contour=i,r.size=function(n){if(!arguments.length)return[e,t];var i=Math.floor(n[0]),a=Math.floor(n[1]);return i>=0&&a>=0||Object(R.n)("invalid size"),e=i,t=a,r},r.smooth=function(e){return arguments.length?(n=e?o:Xm,r):n===o},r};function eI(e,t){for(var n,r=-1,i=t.length;++r<i;)if(n=tI(e,t[r]))return n;return 0}function tI(e,t){for(var n=t[0],r=t[1],i=-1,a=0,o=e.length,s=o-1;a<o;s=a++){var u=e[a],A=u[0],c=u[1],l=e[s],f=l[0],h=l[1];if(nI(u,l,t))return 0;c>r!==h>r&&n<(f-A)*(r-c)/(h-c)+A&&(i=-i)}return i}function nI(e,t,n){var r,i,a,o;return function(e,t,n){return(t[0]-e[0])*(n[1]-e[1])===(n[0]-e[0])*(t[1]-e[1])}(e,t,n)&&(i=e[r=+(e[0]===t[0])],a=n[r],o=t[r],i<=a&&a<=o||o<=a&&a<=i)}var rI=Math.sqrt(50),iI=Math.sqrt(10),aI=Math.sqrt(2);var oI=function(e,t,n){return function(r){var i=Object(R.p)(r),a=n?Math.min(i[0],0):i[0],o=i[1],s=o-a,u=t?function(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=rI?i*=10:a>=iI?i*=5:a>=aI&&(i*=2),t<e?-i:i}(a,o,e):s/(e+1);return function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(i);++r<i;)a[r]=e+r*n;return a}(u,o,u)}};function sI(e){po.call(this,null,e)}function uI(e,t,n,r,i){var a=e.x1||0,o=e.y1||0,s=t*n<0;function u(e){e.forEach(A)}function A(e){s&&e.reverse(),e.forEach(c)}function c(e){e[0]=(e[0]-a)*t+r,e[1]=(e[1]-o)*n+i}return function(e){return e.coordinates.forEach(u),e}}function AI(e,t,n){var r=e>=0?e:zo(t,n);return Math.round((Math.sqrt(4*r*r+1)-1)/2)}function cI(e){return Object(R.D)(e)?e:Object(R.l)(+e)}sI.Definition={type:"Isocontour",metadata:{generates:!0},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:!0},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:!0},{name:"smooth",type:"boolean",default:!0},{name:"scale",type:"number",expr:!0},{name:"translate",type:"number",array:!0,expr:!0},{name:"as",type:"string",null:!0,default:"contour"}]},Object(R.y)(sI,po).transform=function(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n=t.fork(t.NO_SOURCE|t.NO_FIELDS),r=t.materialize(t.SOURCE).source,i=e.field||R.x,a=$m().smooth(!1!==e.smooth),o=e.thresholds||function(e,t,n){var r=oI(n.levels||10,n.nice,!1!==n.zero);return"shared"!==n.resolve?r:r(e.map((function(e){return Vm(t(e).values)})))}(r,i,e),s=null===e.as?null:e.as||"contour",u=[];return r.forEach((function(t){var n=i(t),r=a.size([n.width,n.height])(n.values,Object(R.A)(o)?o:o(n.values));!function(e,t,n,r){var i=r.scale||t.scale,a=r.translate||t.translate;Object(R.D)(i)&&(i=i(n,r));Object(R.D)(a)&&(a=a(n,r));if((1===i||null==i)&&!a)return;var o=(Object(R.E)(i)?i:i[0])||1,s=(Object(R.E)(i)?i:i[1])||1,u=a&&a[0]||0,A=a&&a[1]||0;e.forEach(uI(t,o,s,u,A))}(r,n,t,e),r.forEach((function(e){u.push(Ne(t,je(null!=s?Object(Q.a)({},s,e):e)))}))})),this.value&&(n.rem=this.value),this.value=n.source=n.add=u,n};var lI=function(){var e=function(e){return e[0]},t=function(e){return e[1]},n=R.O,r=[-1,-1],i=960,a=500,o=2;function s(s,u){var A=AI(r[0],s,e)>>o,c=AI(r[1],s,t)>>o,l=A?A+2:0,f=c?c+2:0,h=2*l+(i>>o),g=2*f+(a>>o),d=new Float32Array(h*g),p=new Float32Array(h*g),v=d;s.forEach((function(r){var i=l+(+e(r)>>o),a=f+(+t(r)>>o);i>=0&&i<h&&a>=0&&a<g&&(d[i+a*h]+=+n(r))})),A>0&&c>0?(fI(h,g,d,p,A),hI(h,g,p,d,c),fI(h,g,d,p,A),hI(h,g,p,d,c),fI(h,g,d,p,A),hI(h,g,p,d,c)):A>0?(fI(h,g,d,p,A),fI(h,g,p,d,A),fI(h,g,d,p,A),v=p):c>0&&(hI(h,g,d,p,c),hI(h,g,p,d,c),hI(h,g,d,p,c),v=p);for(var y=u?Math.pow(2,-2*o):1/function(e,t){var n=0;if(void 0===t){var r,i=Object(D.a)(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;(a=+a)&&(n+=a)}}catch(c){i.e(c)}finally{i.f()}}else{var o,s=-1,u=Object(D.a)(e);try{for(u.s();!(o=u.n()).done;){var A=o.value;(A=+t(A,++s,e))&&(n+=A)}}catch(c){u.e(c)}finally{u.f()}}return n}(v),m=0,I=h*g;m<I;++m)v[m]*=y;return{values:v,scale:1<<o,width:h,height:g,x1:l,y1:f,x2:l+(i>>o),y2:f+(a>>o)}}return s.x=function(t){return arguments.length?(e=cI(t),s):e},s.y=function(e){return arguments.length?(t=cI(e),s):t},s.weight=function(e){return arguments.length?(n=cI(e),s):n},s.size=function(e){if(!arguments.length)return[i,a];var t=+e[0],n=+e[1];return t>=0&&n>=0||Object(R.n)("invalid size"),i=t,a=n,s},s.cellSize=function(e){return arguments.length?((e=+e)>=1||Object(R.n)("invalid cell size"),o=Math.floor(Math.log(e)/Math.LN2),s):1<<o},s.bandwidth=function(e){return arguments.length?(1===(e=Object(R.i)(e)).length&&(e=[+e[0],+e[0]]),2!==e.length&&Object(R.n)("invalid bandwidth"),r=e,s):r},s};function fI(e,t,n,r,i){for(var a=1+(i<<1),o=0;o<t;++o)for(var s=0,u=0;s<e+i;++s)s<e&&(u+=n[s+o*e]),s>=i&&(s>=a&&(u-=n[s-a+o*e]),r[s-i+o*e]=u/Math.min(s+1,e-1+a-s,a))}function hI(e,t,n,r,i){for(var a=1+(i<<1),o=0;o<e;++o)for(var s=0,u=0;s<t+i;++s)s<t&&(u+=n[o+s*e]),s>=i&&(s>=a&&(u-=n[o+(s-a)*e]),r[o+(s-i)*e]=u/Math.min(s+1,t-1+a-s,a))}function gI(e){po.call(this,null,e)}gI.Definition={type:"KDE2D",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"weight",type:"field"},{name:"groupby",type:"field",array:!0},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:!0,length:2},{name:"counts",type:"boolean",default:!1},{name:"as",type:"string",default:"grid"}]};var dI=Object(R.y)(gI,po),pI=["x","y","weight","size","cellSize","bandwidth"];function vI(e,t){return pI.forEach((function(n){return null!=t[n]?e[n](t[n]):0})),e}function yI(e){po.call(this,null,e)}dI.transform=function(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n,r=t.fork(t.NO_SOURCE|t.NO_FIELDS),i=function(e,t){var n,r,i,a,o,s,u=[],A=function(e){return e(a)};if(null==t)u.push(e);else for(n={},r=0,i=e.length;r<i;++r)a=e[r],o=t.map(A),(s=n[o])||(n[o]=s=[],s.dims=o,u.push(s)),s.push(a);return u}(t.materialize(t.SOURCE).source,e.groupby),a=(e.groupby||[]).map(R.h),o=vI(lI(),e),s=e.as||"grid";return n=i.map((function(t){return je(function(e,t){for(var n=0;n<a.length;++n)e[a[n]]=t[n];return e}(Object(Q.a)({},s,o(t,e.counts)),t.dims))})),this.value&&(r.rem=this.value),this.value=r.source=r.add=n,r},yI.Definition={type:"Contour",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"values",type:"number",array:!0},{name:"x",type:"field"},{name:"y",type:"field"},{name:"weight",type:"field"},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number"},{name:"count",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"thresholds",type:"number",array:!0},{name:"smooth",type:"boolean",default:!0}]},Object(R.y)(yI,po).transform=function(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var n,r,i=t.fork(t.NO_SOURCE|t.NO_FIELDS),a=$m().smooth(!1!==e.smooth),o=e.values,s=e.thresholds||oI(e.count||10,e.nice,!!o),u=e.size;return o||(o=t.materialize(t.SOURCE).source,r=uI(n=vI(lI(),e)(o,!0),n.scale||1,n.scale||1,0,0),u=[n.width,n.height],o=n.values),s=Object(R.A)(s)?s:s(o),o=a.size(u)(o,s),r&&o.forEach(r),this.value&&(i.rem=this.value),this.value=i.source=i.add=(o||[]).map(je),i};function mI(e){po.call(this,null,e)}mI.Definition={type:"GeoJSON",metadata:{},params:[{name:"fields",type:"field",array:!0,length:2},{name:"geojson",type:"field"}]},Object(R.y)(mI,po).transform=function(e,t){var n,r=this._features,i=this._points,a=e.fields,o=a&&a[0],s=a&&a[1],u=e.geojson||!a&&R.x,A=t.ADD;n=e.modified()||t.changed(t.REM)||t.modified(Object(R.g)(u))||o&&t.modified(Object(R.g)(o))||s&&t.modified(Object(R.g)(s)),this.value&&!n||(A=t.SOURCE,this._features=r=[],this._points=i=[]),u&&t.visit(A,(function(e){r.push(u(e))})),o&&s&&(t.visit(A,(function(e){var t=o(e),n=s(e);null!=t&&null!=n&&(t=+t)===t&&(n=+n)===n&&i.push([t,n])})),r=r.concat({type:"Feature",geometry:{type:"MultiPoint",coordinates:i}})),this.value={type:"FeatureCollection",features:r}};var II=function(e){return e};function bI(e,t){e&&CI.hasOwnProperty(e.type)&&CI[e.type](e,t)}var EI={Feature:function(e,t){bI(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)bI(n[r].geometry,t)}},CI={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){BI(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)BI(n[r],t,0)},Polygon:function(e,t){wI(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)wI(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)bI(n[r],t)}};function BI(e,t,n){var r,i=-1,a=e.length-n;for(t.lineStart();++i<a;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function wI(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)BI(e[n],t,1);t.polygonEnd()}var QI=function(e,t){e&&EI.hasOwnProperty(e.type)?EI[e.type](e,t):bI(e,t)},kI=function(){return new _I};function _I(){this.reset()}_I.prototype={constructor:_I,reset:function(){this.s=this.t=0},add:function(e){SI(xI,e,this.t),SI(this,xI.s,this.s),this.s?this.t+=xI.t:this.s=xI.t},valueOf:function(){return this.s}};var xI=new _I;function SI(e,t,n){var r=e.s=t+n,i=r-t,a=r-i;e.t=t-a+(n-i)}var OI=Math.PI,DI=OI/2,RI=OI/4,jI=2*OI,MI=180/OI,NI=OI/180,FI=Math.abs,TI=Math.atan,LI=Math.atan2,PI=Math.cos,UI=(Math.ceil,Math.exp),GI=(Math.floor,Math.log),qI=Math.pow,HI=Math.sin,YI=Math.sign||function(e){return e>0?1:e<0?-1:0},JI=Math.sqrt,zI=Math.tan;function KI(e){return e>1?0:e<-1?OI:Math.acos(e)}function WI(e){return e>1?DI:e<-1?-DI:Math.asin(e)}function VI(){}var XI,ZI,$I,eb,tb=kI(),nb=kI(),rb={point:VI,lineStart:VI,lineEnd:VI,polygonStart:function(){rb.lineStart=ib,rb.lineEnd=sb},polygonEnd:function(){rb.lineStart=rb.lineEnd=rb.point=VI,tb.add(FI(nb)),nb.reset()},result:function(){var e=tb/2;return tb.reset(),e}};function ib(){rb.point=ab}function ab(e,t){rb.point=ob,XI=$I=e,ZI=eb=t}function ob(e,t){nb.add(eb*e-$I*t),$I=e,eb=t}function sb(){ob(XI,ZI)}var ub=rb,Ab=1/0,cb=Ab,lb=-Ab,fb=lb;var hb,gb,db,pb,vb={point:function(e,t){e<Ab&&(Ab=e);e>lb&&(lb=e);t<cb&&(cb=t);t>fb&&(fb=t)},lineStart:VI,lineEnd:VI,polygonStart:VI,polygonEnd:VI,result:function(){var e=[[Ab,cb],[lb,fb]];return lb=fb=-(cb=Ab=1/0),e}},yb=0,mb=0,Ib=0,bb=0,Eb=0,Cb=0,Bb=0,wb=0,Qb=0,kb={point:_b,lineStart:xb,lineEnd:Db,polygonStart:function(){kb.lineStart=Rb,kb.lineEnd=jb},polygonEnd:function(){kb.point=_b,kb.lineStart=xb,kb.lineEnd=Db},result:function(){var e=Qb?[Bb/Qb,wb/Qb]:Cb?[bb/Cb,Eb/Cb]:Ib?[yb/Ib,mb/Ib]:[NaN,NaN];return yb=mb=Ib=bb=Eb=Cb=Bb=wb=Qb=0,e}};function _b(e,t){yb+=e,mb+=t,++Ib}function xb(){kb.point=Sb}function Sb(e,t){kb.point=Ob,_b(db=e,pb=t)}function Ob(e,t){var n=e-db,r=t-pb,i=JI(n*n+r*r);bb+=i*(db+e)/2,Eb+=i*(pb+t)/2,Cb+=i,_b(db=e,pb=t)}function Db(){kb.point=_b}function Rb(){kb.point=Mb}function jb(){Nb(hb,gb)}function Mb(e,t){kb.point=Nb,_b(hb=db=e,gb=pb=t)}function Nb(e,t){var n=e-db,r=t-pb,i=JI(n*n+r*r);bb+=i*(db+e)/2,Eb+=i*(pb+t)/2,Cb+=i,Bb+=(i=pb*e-db*t)*(db+e),wb+=i*(pb+t),Qb+=3*i,_b(db=e,pb=t)}var Fb=kb;function Tb(e){this._context=e}Tb.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,jI)}},result:VI};var Lb,Pb,Ub,Gb,qb,Hb=kI(),Yb={point:VI,lineStart:function(){Yb.point=Jb},lineEnd:function(){Lb&&zb(Pb,Ub),Yb.point=VI},polygonStart:function(){Lb=!0},polygonEnd:function(){Lb=null},result:function(){var e=+Hb;return Hb.reset(),e}};function Jb(e,t){Yb.point=zb,Pb=Gb=e,Ub=qb=t}function zb(e,t){Gb-=e,qb-=t,Hb.add(JI(Gb*Gb+qb*qb)),Gb=e,qb=t}var Kb=Yb;function Wb(){this._string=[]}function Vb(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}Wb.prototype={_radius:4.5,_circle:Vb(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=Vb(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}};var Xb=function(e,t){var n,r,i=4.5;function a(e){return e&&("function"===typeof i&&r.pointRadius(+i.apply(this,arguments)),QI(e,n(r))),r.result()}return a.area=function(e){return QI(e,n(ub)),ub.result()},a.measure=function(e){return QI(e,n(Kb)),Kb.result()},a.bounds=function(e){return QI(e,n(vb)),vb.result()},a.centroid=function(e){return QI(e,n(Fb)),Fb.result()},a.projection=function(t){return arguments.length?(n=null==t?(e=null,II):(e=t).stream,a):e},a.context=function(e){return arguments.length?(r=null==e?(t=null,new Wb):new Tb(t=e),"function"!==typeof i&&r.pointRadius(i),a):t},a.pointRadius=function(e){return arguments.length?(i="function"===typeof e?e:(r.pointRadius(+e),+e),a):i},a.projection(e).context(t)},Zb=function(){var e,t=[];return{point:function(t,n,r){e.push([t,n,r])},lineStart:function(){t.push(e=[])},lineEnd:VI,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}},$b=function(e,t){return FI(e[0]-t[0])<1e-6&&FI(e[1]-t[1])<1e-6};function eE(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var tE=function(e,t,n,r,i){var a,o,s=[],u=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n,r=e[0],o=e[t];if($b(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),a=0;a<t;++a)i.point((r=e[a])[0],r[1]);return void i.lineEnd()}o[0]+=2e-6}s.push(n=new eE(r,e,null,!0)),u.push(n.o=new eE(r,null,n,!1)),s.push(n=new eE(o,e,null,!1)),u.push(n.o=new eE(o,null,n,!0))}})),s.length){for(u.sort(t),nE(s),nE(u),a=0,o=u.length;a<o;++a)u[a].e=n=!n;for(var A,c,l=s[0];;){for(var f=l,h=!0;f.v;)if((f=f.n)===l)return;A=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(h)for(a=0,o=A.length;a<o;++a)i.point((c=A[a])[0],c[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(h)for(A=f.p.z,a=A.length-1;a>=0;--a)i.point((c=A[a])[0],c[1]);else r(f.x,f.p.x,-1,i);f=f.p}A=(f=f.o).z,h=!h}while(!f.v);i.lineEnd()}}};function nE(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r<t;)i.n=n=e[r],n.p=i,i=n;i.n=n=e[0],n.p=i}}function rE(e){return[LI(e[1],e[0]),WI(e[2])]}function iE(e){var t=e[0],n=e[1],r=PI(n);return[r*PI(t),r*HI(t),HI(n)]}function aE(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function oE(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function sE(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function uE(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function AE(e){var t=JI(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var cE=kI();function lE(e){return FI(e[0])<=OI?e[0]:YI(e[0])*((FI(e[0])+OI)%jI-OI)}var fE=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN};var hE=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return fE(t(e),n)}),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)<0?r=a+1:i=a}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)>0?i=a:r=a+1}return r}}}(fE);hE.right,hE.left;var gE=Array.prototype;gE.slice,gE.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);var dE=function(e){for(var t,n,r,i=e.length,a=-1,o=0;++a<i;)o+=e[a].length;for(n=new Array(o);--i>=0;)for(t=(r=e[i]).length;--t>=0;)n[--o]=r[t];return n};var pE=function(e,t,n,r){return function(i){var a,o,s,u=t(i),A=Zb(),c=t(A),l=!1,f={point:h,lineStart:d,lineEnd:p,polygonStart:function(){f.point=v,f.lineStart=y,f.lineEnd=m,o=[],a=[]},polygonEnd:function(){f.point=h,f.lineStart=d,f.lineEnd=p,o=dE(o);var e=function(e,t){var n=lE(t),r=t[1],i=HI(r),a=[HI(n),-PI(n),0],o=0,s=0;cE.reset(),1===i?r=DI+1e-6:-1===i&&(r=-DI-1e-6);for(var u=0,A=e.length;u<A;++u)if(l=(c=e[u]).length)for(var c,l,f=c[l-1],h=lE(f),g=f[1]/2+RI,d=HI(g),p=PI(g),v=0;v<l;++v,h=m,d=b,p=E,f=y){var y=c[v],m=lE(y),I=y[1]/2+RI,b=HI(I),E=PI(I),C=m-h,B=C>=0?1:-1,w=B*C,Q=w>OI,k=d*b;if(cE.add(LI(k*B*HI(w),p*E+k*PI(w))),o+=Q?C+B*jI:C,Q^h>=n^m>=n){var _=oE(iE(f),iE(y));AE(_);var x=oE(a,_);AE(x);var S=(Q^C>=0?-1:1)*WI(x[2]);(r>S||r===S&&(_[0]||_[1]))&&(s+=Q^C>=0?1:-1)}}return(o<-1e-6||o<1e-6&&cE<-1e-6)^1&s}(a,r);o.length?(l||(i.polygonStart(),l=!0),tE(o,yE,e,n,i)):e&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(t,n){e(t,n)&&i.point(t,n)}function g(e,t){u.point(e,t)}function d(){f.point=g,u.lineStart()}function p(){f.point=h,u.lineEnd()}function v(e,t){s.push([e,t]),c.point(e,t)}function y(){c.lineStart(),s=[]}function m(){v(s[0][0],s[0][1]),c.lineEnd();var e,t,n,r,u=c.clean(),f=A.result(),h=f.length;if(s.pop(),a.push(s),s=null,h)if(1&u){if((t=(n=f[0]).length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),e=0;e<t;++e)i.point((r=n[e])[0],r[1]);i.lineEnd()}}else h>1&&2&u&&f.push(f.pop().concat(f.shift())),o.push(f.filter(vE))}return f}};function vE(e){return e.length>1}function yE(e,t){return((e=e.x)[0]<0?e[1]-DI-1e-6:DI-e[1])-((t=t.x)[0]<0?t[1]-DI-1e-6:DI-t[1])}var mE=pE((function(){return!0}),(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(a,o){var s=a>0?OI:-OI,u=FI(a-n);FI(u-OI)<1e-6?(e.point(n,r=(r+o)/2>0?DI:-DI),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(a,r),t=0):i!==s&&u>=OI&&(FI(n-i)<1e-6&&(n-=1e-6*i),FI(a-s)<1e-6&&(a-=1e-6*s),r=function(e,t,n,r){var i,a,o=HI(e-n);return FI(o)>1e-6?TI((HI(t)*(a=PI(r))*HI(n)-HI(r)*(i=PI(t))*HI(e))/(i*a*o)):(t+r)/2}(n,r,a,o),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=a,r=o),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*DI,r.point(-OI,i),r.point(0,i),r.point(OI,i),r.point(OI,0),r.point(OI,-i),r.point(0,-i),r.point(-OI,-i),r.point(-OI,0),r.point(-OI,i);else if(FI(e[0]-t[0])>1e-6){var a=e[0]<t[0]?OI:-OI;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(t[0],t[1])}),[-OI,-DI]);var IE=function(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n};function bE(e,t){return[FI(e)>OI?e+Math.round(-e/jI)*jI:e,t]}function EE(e,t,n){return(e%=jI)?t||n?IE(BE(e),wE(t,n)):BE(e):t||n?wE(t,n):bE}function CE(e){return function(t,n){return[(t+=e)>OI?t-jI:t<-OI?t+jI:t,n]}}function BE(e){var t=CE(e);return t.invert=CE(-e),t}function wE(e,t){var n=PI(e),r=HI(e),i=PI(t),a=HI(t);function o(e,t){var o=PI(t),s=PI(e)*o,u=HI(e)*o,A=HI(t),c=A*n+s*r;return[LI(u*i-c*a,s*n-A*r),WI(c*i+u*a)]}return o.invert=function(e,t){var o=PI(t),s=PI(e)*o,u=HI(e)*o,A=HI(t),c=A*i-u*a;return[LI(u*i+A*a,s*n+c*r),WI(c*n-s*r)]},o}bE.invert=bE;function QE(e,t,n,r,i,a){if(n){var o=PI(t),s=HI(t),u=r*n;null==i?(i=t+r*jI,a=t-u/2):(i=kE(o,i),a=kE(o,a),(r>0?i<a:i>a)&&(i+=r*jI));for(var A,c=i;r>0?c>a:c<a;c-=u)A=rE([o,-s*PI(c),-s*HI(c)]),e.point(A[0],A[1])}}function kE(e,t){(t=iE(t))[0]-=e,AE(t);var n=KI(-t[1]);return((-t[2]<0?-n:n)+jI-1e-6)%jI}var _E=function(e){var t=PI(e),n=6*NI,r=t>0,i=FI(t)>1e-6;function a(e,n){return PI(e)*PI(n)>t}function o(e,n,r){var i=[1,0,0],a=oE(iE(e),iE(n)),o=aE(a,a),s=a[0],u=o-s*s;if(!u)return!r&&e;var A=t*o/u,c=-t*s/u,l=oE(i,a),f=uE(i,A);sE(f,uE(a,c));var h=l,g=aE(f,h),d=aE(h,h),p=g*g-d*(aE(f,f)-1);if(!(p<0)){var v=JI(p),y=uE(h,(-g-v)/d);if(sE(y,f),y=rE(y),!r)return y;var m,I=e[0],b=n[0],E=e[1],C=n[1];b<I&&(m=I,I=b,b=m);var B=b-I,w=FI(B-OI)<1e-6;if(!w&&C<E&&(m=E,E=C,C=m),w||B<1e-6?w?E+C>0^y[1]<(FI(y[0]-I)<1e-6?E:C):E<=y[1]&&y[1]<=C:B>OI^(I<=y[0]&&y[0]<=b)){var Q=uE(h,(-g+v)/d);return sE(Q,f),[y,rE(Q)]}}}function s(t,n){var i=r?e:OI-e,a=0;return t<-i?a|=1:t>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return pE(a,(function(e){var t,n,u,A,c;return{lineStart:function(){A=u=!1,c=1},point:function(l,f){var h,g=[l,f],d=a(l,f),p=r?d?0:s(l,f):d?s(l+(l<0?OI:-OI),f):0;if(!t&&(A=u=d)&&e.lineStart(),d!==u&&(!(h=o(t,g))||$b(t,h)||$b(g,h))&&(g[2]=1),d!==u)c=0,d?(e.lineStart(),h=o(g,t),e.point(h[0],h[1])):(h=o(t,g),e.point(h[0],h[1],2),e.lineEnd()),t=h;else if(i&&t&&r^d){var v;p&n||!(v=o(g,t,!0))||(c=0,r?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1],3)))}!d||t&&$b(t,g)||e.point(g[0],g[1]),t=g,u=d,n=p},lineEnd:function(){u&&e.lineEnd(),t=null},clean:function(){return c|(A&&u)<<1}}}),(function(t,r,i,a){QE(a,e,n,i,t,r)}),r?[0,-e]:[-OI,e-OI])};function xE(e,t,n,r){function i(i,a){return e<=i&&i<=n&&t<=a&&a<=r}function a(i,a,s,A){var c=0,l=0;if(null==i||(c=o(i,s))!==(l=o(a,s))||u(i,a)<0^s>0)do{A.point(0===c||3===c?e:n,c>1?r:t)}while((c=(c+s+4)%4)!==l);else A.point(a[0],a[1])}function o(r,i){return FI(r[0]-e)<1e-6?i>0?0:3:FI(r[0]-n)<1e-6?i>0?2:1:FI(r[1]-t)<1e-6?i>0?1:0:i>0?3:2}function s(e,t){return u(e.x,t.x)}function u(e,t){var n=o(e,1),r=o(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(o){var u,A,c,l,f,h,g,d,p,v,y,m=o,I=Zb(),b={point:E,lineStart:function(){b.point=C,A&&A.push(c=[]);v=!0,p=!1,g=d=NaN},lineEnd:function(){u&&(C(l,f),h&&p&&I.rejoin(),u.push(I.result()));b.point=E,p&&m.lineEnd()},polygonStart:function(){m=I,u=[],A=[],y=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,i=A.length;n<i;++n)for(var a,o,s=A[n],u=1,c=s.length,l=s[0],f=l[0],h=l[1];u<c;++u)a=f,o=h,l=s[u],f=l[0],h=l[1],o<=r?h>r&&(f-a)*(r-o)>(h-o)*(e-a)&&++t:h<=r&&(f-a)*(r-o)<(h-o)*(e-a)&&--t;return t}(),n=y&&t,i=(u=dE(u)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&tE(u,s,t,a,o),o.polygonEnd());m=o,u=A=c=null}};function E(e,t){i(e,t)&&m.point(e,t)}function C(a,o){var s=i(a,o);if(A&&c.push([a,o]),v)l=a,f=o,h=s,v=!1,s&&(m.lineStart(),m.point(a,o));else if(s&&p)m.point(a,o);else{var u=[g=Math.max(-1e9,Math.min(1e9,g)),d=Math.max(-1e9,Math.min(1e9,d))],I=[a=Math.max(-1e9,Math.min(1e9,a)),o=Math.max(-1e9,Math.min(1e9,o))];!function(e,t,n,r,i,a){var o,s=e[0],u=e[1],A=0,c=1,l=t[0]-s,f=t[1]-u;if(o=n-s,l||!(o>0)){if(o/=l,l<0){if(o<A)return;o<c&&(c=o)}else if(l>0){if(o>c)return;o>A&&(A=o)}if(o=i-s,l||!(o<0)){if(o/=l,l<0){if(o>c)return;o>A&&(A=o)}else if(l>0){if(o<A)return;o<c&&(c=o)}if(o=r-u,f||!(o>0)){if(o/=f,f<0){if(o<A)return;o<c&&(c=o)}else if(f>0){if(o>c)return;o>A&&(A=o)}if(o=a-u,f||!(o<0)){if(o/=f,f<0){if(o>c)return;o>A&&(A=o)}else if(f>0){if(o<A)return;o<c&&(c=o)}return A>0&&(e[0]=s+A*l,e[1]=u+A*f),c<1&&(t[0]=s+c*l,t[1]=u+c*f),!0}}}}}(u,I,e,t,n,r)?s&&(m.lineStart(),m.point(a,o),y=!1):(p||(m.lineStart(),m.point(u[0],u[1])),m.point(I[0],I[1]),s||m.lineEnd(),y=!1)}g=a,d=o,p=s}return b}}function SE(e){return function(t){var n=new OE;for(var r in e)n[r]=e[r];return n.stream=t,n}}function OE(){}function DE(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=r&&e.clipExtent(null),QI(n,e.stream(vb)),t(vb.result()),null!=r&&e.clipExtent(r),e}function RE(e,t,n){return DE(e,(function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+t[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([o,s])}),n)}function jE(e,t,n){return RE(e,[[0,0],t],n)}function ME(e,t,n){return DE(e,(function(n){var r=+t,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];e.scale(150*i).translate([a,o])}),n)}function NE(e,t,n){return DE(e,(function(n){var r=+t,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([a,o])}),n)}OE.prototype={constructor:OE,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var FE=PI(30*NI),TE=function(e,t){return+t?function(e,t){function n(r,i,a,o,s,u,A,c,l,f,h,g,d,p){var v=A-r,y=c-i,m=v*v+y*y;if(m>4*t&&d--){var I=o+f,b=s+h,E=u+g,C=JI(I*I+b*b+E*E),B=WI(E/=C),w=FI(FI(E)-1)<1e-6||FI(a-l)<1e-6?(a+l)/2:LI(b,I),Q=e(w,B),k=Q[0],_=Q[1],x=k-r,S=_-i,O=y*x-v*S;(O*O/m>t||FI((v*x+y*S)/m-.5)>.3||o*f+s*h+u*g<FE)&&(n(r,i,a,o,s,u,k,_,w,I/=C,b/=C,E,d,p),p.point(k,_),n(k,_,w,I,b,E,A,c,l,f,h,g,d,p))}}return function(t){var r,i,a,o,s,u,A,c,l,f,h,g,d={point:p,lineStart:v,lineEnd:m,polygonStart:function(){t.polygonStart(),d.lineStart=I},polygonEnd:function(){t.polygonEnd(),d.lineStart=v}};function p(n,r){n=e(n,r),t.point(n[0],n[1])}function v(){c=NaN,d.point=y,t.lineStart()}function y(r,i){var a=iE([r,i]),o=e(r,i);n(c,l,A,f,h,g,c=o[0],l=o[1],A=r,f=a[0],h=a[1],g=a[2],16,t),t.point(c,l)}function m(){d.point=p,t.lineEnd()}function I(){v(),d.point=b,d.lineEnd=E}function b(e,t){y(r=e,t),i=c,a=l,o=f,s=h,u=g,d.point=y}function E(){n(c,l,A,f,h,g,i,a,r,o,s,u,16,t),d.lineEnd=m,m()}return d}}(e,t):function(e){return SE({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}(e)};var LE=SE({point:function(e,t){this.stream.point(e*NI,t*NI)}});function PE(e,t,n,r,i){function a(a,o){return[t+e*(a*=r),n-e*(o*=i)]}return a.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},a}function UE(e,t,n,r,i,a){var o=PI(a),s=HI(a),u=o*e,A=s*e,c=o/e,l=s/e,f=(s*n-o*t)/e,h=(s*t+o*n)/e;function g(e,a){return[u*(e*=r)-A*(a*=i)+t,n-A*e-u*a]}return g.invert=function(e,t){return[r*(c*e-l*t+f),i*(h-l*e-c*t)]},g}function GE(e){return qE((function(){return e}))()}function qE(e){var t,n,r,i,a,o,s,u,A,c,l=150,f=480,h=250,g=0,d=0,p=0,v=0,y=0,m=0,I=1,b=1,E=null,C=mE,B=null,w=II,Q=.5;function k(e){return u(e[0]*NI,e[1]*NI)}function _(e){return(e=u.invert(e[0],e[1]))&&[e[0]*MI,e[1]*MI]}function x(){var e=UE(l,0,0,I,b,m).apply(null,t(g,d)),r=(m?UE:PE)(l,f-e[0],h-e[1],I,b,m);return n=EE(p,v,y),s=IE(t,r),u=IE(n,s),o=TE(s,Q),S()}function S(){return A=c=null,k}return k.stream=function(e){return A&&c===e?A:A=LE(function(e){return SE({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}(n)(C(o(w(c=e)))))},k.preclip=function(e){return arguments.length?(C=e,E=void 0,S()):C},k.postclip=function(e){return arguments.length?(w=e,B=r=i=a=null,S()):w},k.clipAngle=function(e){return arguments.length?(C=+e?_E(E=e*NI):(E=null,mE),S()):E*MI},k.clipExtent=function(e){return arguments.length?(w=null==e?(B=r=i=a=null,II):xE(B=+e[0][0],r=+e[0][1],i=+e[1][0],a=+e[1][1]),S()):null==B?null:[[B,r],[i,a]]},k.scale=function(e){return arguments.length?(l=+e,x()):l},k.translate=function(e){return arguments.length?(f=+e[0],h=+e[1],x()):[f,h]},k.center=function(e){return arguments.length?(g=e[0]%360*NI,d=e[1]%360*NI,x()):[g*MI,d*MI]},k.rotate=function(e){return arguments.length?(p=e[0]%360*NI,v=e[1]%360*NI,y=e.length>2?e[2]%360*NI:0,x()):[p*MI,v*MI,y*MI]},k.angle=function(e){return arguments.length?(m=e%360*NI,x()):m*MI},k.reflectX=function(e){return arguments.length?(I=e?-1:1,x()):I<0},k.reflectY=function(e){return arguments.length?(b=e?-1:1,x()):b<0},k.precision=function(e){return arguments.length?(o=TE(s,Q=e*e),S()):JI(Q)},k.fitExtent=function(e,t){return RE(k,e,t)},k.fitSize=function(e,t){return jE(k,e,t)},k.fitWidth=function(e,t){return ME(k,e,t)},k.fitHeight=function(e,t){return NE(k,e,t)},function(){return t=e.apply(this,arguments),k.invert=t.invert&&_,x()}}function HE(e){var t=0,n=OI/3,r=qE(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*NI,n=e[1]*NI):[t*MI,n*MI]},i}function YE(e,t){var n=HI(e),r=(n+HI(t))/2;if(FI(r)<1e-6)return function(e){var t=PI(e);function n(e,n){return[e*t,HI(n)/t]}return n.invert=function(e,n){return[e/t,WI(n*t)]},n}(e);var i=1+n*(2*r-n),a=JI(i)/r;function o(e,t){var n=JI(i-2*r*HI(t))/r;return[n*HI(e*=r),a-n*PI(e)]}return o.invert=function(e,t){var n=a-t,o=LI(e,FI(n))*YI(n);return n*r<0&&(o-=OI*YI(e)*YI(n)),[o/r,WI((i-(e*e+n*n)*r*r)/(2*r))]},o}var JE=function(){return HE(YE).scale(155.424).center([0,33.6442])},zE=function(){return JE().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};function KE(e){return function(t,n){var r=PI(t),i=PI(n),a=e(r*i);return[a*i*HI(t),a*HI(n)]}}function WE(e){return function(t,n){var r=JI(t*t+n*n),i=e(r),a=HI(i),o=PI(i);return[LI(t*a,r*o),WI(r&&n*a/r)]}}var VE=KE((function(e){return JI(2/(1+e))}));VE.invert=WE((function(e){return 2*WI(e/2)}));var XE=KE((function(e){return(e=KI(e))&&e/HI(e)}));XE.invert=WE((function(e){return e}));function ZE(e,t){return[e,GI(zI((DI+t)/2))]}ZE.invert=function(e,t){return[e,2*TI(UI(t))-DI]};function $E(e){var t,n,r,i=GE(e),a=i.center,o=i.scale,s=i.translate,u=i.clipExtent,A=null;function c(){var a=OI*o(),s=i(function(e){function t(t){return(t=e(t[0]*NI,t[1]*NI))[0]*=MI,t[1]*=MI,t}return e=EE(e[0]*NI,e[1]*NI,e.length>2?e[2]*NI:0),t.invert=function(t){return(t=e.invert(t[0]*NI,t[1]*NI))[0]*=MI,t[1]*=MI,t},t}(i.rotate()).invert([0,0]));return u(null==A?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:e===ZE?[[Math.max(s[0]-a,A),t],[Math.min(s[0]+a,n),r]]:[[A,Math.max(s[1]-a,t)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(e){return arguments.length?(o(e),c()):o()},i.translate=function(e){return arguments.length?(s(e),c()):s()},i.center=function(e){return arguments.length?(a(e),c()):a()},i.clipExtent=function(e){return arguments.length?(null==e?A=t=n=r=null:(A=+e[0][0],t=+e[0][1],n=+e[1][0],r=+e[1][1]),c()):null==A?null:[[A,t],[n,r]]},c()}function eC(e){return zI((DI+e)/2)}function tC(e,t){var n=PI(e),r=e===t?HI(e):GI(n/PI(t))/GI(eC(t)/eC(e)),i=n*qI(eC(e),r)/r;if(!r)return ZE;function a(e,t){i>0?t<1e-6-DI&&(t=1e-6-DI):t>DI-1e-6&&(t=DI-1e-6);var n=i/qI(eC(t),r);return[n*HI(r*e),i-n*PI(r*e)]}return a.invert=function(e,t){var n=i-t,a=YI(r)*JI(e*e+n*n),o=LI(e,FI(n))*YI(n);return n*r<0&&(o-=OI*YI(e)*YI(n)),[o/r,2*TI(qI(i/a,1/r))-DI]},a}function nC(e,t){return[e,t]}nC.invert=nC;function rC(e,t){var n=PI(e),r=e===t?HI(e):(n-PI(t))/(t-e),i=n/r+e;if(FI(r)<1e-6)return nC;function a(e,t){var n=i-t,a=r*e;return[n*HI(a),i-n*PI(a)]}return a.invert=function(e,t){var n=i-t,a=LI(e,FI(n))*YI(n);return n*r<0&&(a-=OI*YI(e)*YI(n)),[a/r,i-YI(r)*JI(e*e+n*n)]},a}var iC=1.340264,aC=-.081106,oC=893e-6,sC=.003796,uC=JI(3)/2;function AC(e,t){var n=WI(uC*HI(t)),r=n*n,i=r*r*r;return[e*PI(n)/(uC*(iC+3*aC*r+i*(7*oC+9*sC*r))),n*(iC+aC*r+i*(oC+sC*r))]}AC.invert=function(e,t){for(var n,r=t,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(iC+aC*i+a*(oC+sC*i))-t)/(iC+3*aC*i+a*(7*oC+9*sC*i)))*r)*i*i,!(FI(n)<1e-12));++o);return[uC*e*(iC+3*aC*i+a*(7*oC+9*sC*i))/PI(r),WI(HI(r)/uC)]};function cC(e,t){var n=PI(t),r=PI(e)*n;return[n*HI(e)/r,HI(t)/r]}cC.invert=WE(TI);function lC(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),t*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}lC.invert=function(e,t){var n,r=t,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-t)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(FI(n)>1e-6&&--i>0);return[e/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]};function fC(e,t){return[PI(t)*HI(e),HI(t)]}fC.invert=WE(WI);function hC(e,t){var n=PI(t),r=1+PI(e)*n;return[n*HI(e)/r,HI(t)/r]}hC.invert=WE((function(e){return 2*TI(e)}));function gC(e,t){return[GI(zI((DI+t)/2)),-e]}gC.invert=function(e,t){return[-t,2*TI(UI(e))-DI]};function dC(){}var pC=function(){var e,t=[];return{point:function(t,n,r){e.push([t,n,r])},lineStart:function(){t.push(e=[])},lineEnd:dC,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}},vC=Math.PI,yC=vC/2,mC=vC/4,IC=2*vC,bC=180/vC,EC=vC/180,CC=Math.abs,BC=Math.atan,wC=Math.atan2,QC=Math.cos,kC=(Math.ceil,Math.exp,Math.floor,Math.log,Math.pow,Math.sin),_C=Math.sign||function(e){return e>0?1:e<0?-1:0},xC=Math.sqrt;Math.tan;function SC(e){return e>1?yC:e<-1?-yC:Math.asin(e)}var OC=function(e,t){return CC(e[0]-t[0])<1e-6&&CC(e[1]-t[1])<1e-6};function DC(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var RC=function(e,t,n,r,i){var a,o,s=[],u=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n,r=e[0],o=e[t];if(OC(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),a=0;a<t;++a)i.point((r=e[a])[0],r[1]);return void i.lineEnd()}o[0]+=2e-6}s.push(n=new DC(r,e,null,!0)),u.push(n.o=new DC(r,null,n,!1)),s.push(n=new DC(o,e,null,!1)),u.push(n.o=new DC(o,null,n,!0))}})),s.length){for(u.sort(t),jC(s),jC(u),a=0,o=u.length;a<o;++a)u[a].e=n=!n;for(var A,c,l=s[0];;){for(var f=l,h=!0;f.v;)if((f=f.n)===l)return;A=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(h)for(a=0,o=A.length;a<o;++a)i.point((c=A[a])[0],c[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(h)for(A=f.p.z,a=A.length-1;a>=0;--a)i.point((c=A[a])[0],c[1]);else r(f.x,f.p.x,-1,i);f=f.p}A=(f=f.o).z,h=!h}while(!f.v);i.lineEnd()}}};function jC(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r<t;)i.n=n=e[r],n.p=i,i=n;i.n=n=e[0],n.p=i}}function MC(){this.reset()}MC.prototype={constructor:MC,reset:function(){this.s=this.t=0},add:function(e){FC(NC,e,this.t),FC(this,NC.s,this.s),this.s?this.t+=NC.t:this.s=NC.t},valueOf:function(){return this.s}};var NC=new MC;function FC(e,t,n){var r=e.s=t+n,i=r-t,a=r-i;e.t=t-a+(n-i)}function TC(e){return[wC(e[1],e[0]),SC(e[2])]}function LC(e){var t=e[0],n=e[1],r=QC(n);return[r*QC(t),r*kC(t),kC(n)]}function PC(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function UC(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function GC(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function qC(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function HC(e){var t=xC(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var YC=new MC;function JC(e){return CC(e[0])<=vC?e[0]:_C(e[0])*((CC(e[0])+vC)%IC-vC)}var zC=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN};var KC=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return zC(t(e),n)}),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)<0?r=a+1:i=a}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)>0?i=a:r=a+1}return r}}}(zC);KC.right,KC.left;var WC=Array.prototype;WC.slice,WC.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);var VC=function(e){for(var t,n,r,i=e.length,a=-1,o=0;++a<i;)o+=e[a].length;for(n=new Array(o);--i>=0;)for(t=(r=e[i]).length;--t>=0;)n[--o]=r[t];return n};var XC=function(e,t,n,r){return function(i){var a,o,s,u=t(i),A=pC(),c=t(A),l=!1,f={point:h,lineStart:d,lineEnd:p,polygonStart:function(){f.point=v,f.lineStart=y,f.lineEnd=m,o=[],a=[]},polygonEnd:function(){f.point=h,f.lineStart=d,f.lineEnd=p,o=VC(o);var e=function(e,t){var n=JC(t),r=t[1],i=kC(r),a=[kC(n),-QC(n),0],o=0,s=0;YC.reset(),1===i?r=yC+1e-6:-1===i&&(r=-yC-1e-6);for(var u=0,A=e.length;u<A;++u)if(l=(c=e[u]).length)for(var c,l,f=c[l-1],h=JC(f),g=f[1]/2+mC,d=kC(g),p=QC(g),v=0;v<l;++v,h=m,d=b,p=E,f=y){var y=c[v],m=JC(y),I=y[1]/2+mC,b=kC(I),E=QC(I),C=m-h,B=C>=0?1:-1,w=B*C,Q=w>vC,k=d*b;if(YC.add(wC(k*B*kC(w),p*E+k*QC(w))),o+=Q?C+B*IC:C,Q^h>=n^m>=n){var _=UC(LC(f),LC(y));HC(_);var x=UC(a,_);HC(x);var S=(Q^C>=0?-1:1)*SC(x[2]);(r>S||r===S&&(_[0]||_[1]))&&(s+=Q^C>=0?1:-1)}}return(o<-1e-6||o<1e-6&&YC<-1e-6)^1&s}(a,r);o.length?(l||(i.polygonStart(),l=!0),RC(o,$C,e,n,i)):e&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(t,n){e(t,n)&&i.point(t,n)}function g(e,t){u.point(e,t)}function d(){f.point=g,u.lineStart()}function p(){f.point=h,u.lineEnd()}function v(e,t){s.push([e,t]),c.point(e,t)}function y(){c.lineStart(),s=[]}function m(){v(s[0][0],s[0][1]),c.lineEnd();var e,t,n,r,u=c.clean(),f=A.result(),h=f.length;if(s.pop(),a.push(s),s=null,h)if(1&u){if((t=(n=f[0]).length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),e=0;e<t;++e)i.point((r=n[e])[0],r[1]);i.lineEnd()}}else h>1&&2&u&&f.push(f.pop().concat(f.shift())),o.push(f.filter(ZC))}return f}};function ZC(e){return e.length>1}function $C(e,t){return((e=e.x)[0]<0?e[1]-yC-1e-6:yC-e[1])-((t=t.x)[0]<0?t[1]-yC-1e-6:yC-t[1])}var eB=XC((function(){return!0}),(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(a,o){var s=a>0?vC:-vC,u=CC(a-n);CC(u-vC)<1e-6?(e.point(n,r=(r+o)/2>0?yC:-yC),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(a,r),t=0):i!==s&&u>=vC&&(CC(n-i)<1e-6&&(n-=1e-6*i),CC(a-s)<1e-6&&(a-=1e-6*s),r=function(e,t,n,r){var i,a,o=kC(e-n);return CC(o)>1e-6?BC((kC(t)*(a=QC(r))*kC(n)-kC(r)*(i=QC(t))*kC(e))/(i*a*o)):(t+r)/2}(n,r,a,o),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=a,r=o),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*yC,r.point(-vC,i),r.point(0,i),r.point(vC,i),r.point(vC,0),r.point(vC,-i),r.point(0,-i),r.point(-vC,-i),r.point(-vC,0),r.point(-vC,i);else if(CC(e[0]-t[0])>1e-6){var a=e[0]<t[0]?vC:-vC;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(t[0],t[1])}),[-vC,-yC]);var tB=function(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n};function nB(e,t){return[CC(e)>vC?e+Math.round(-e/IC)*IC:e,t]}function rB(e,t,n){return(e%=IC)?t||n?tB(aB(e),oB(t,n)):aB(e):t||n?oB(t,n):nB}function iB(e){return function(t,n){return[(t+=e)>vC?t-IC:t<-vC?t+IC:t,n]}}function aB(e){var t=iB(e);return t.invert=iB(-e),t}function oB(e,t){var n=QC(e),r=kC(e),i=QC(t),a=kC(t);function o(e,t){var o=QC(t),s=QC(e)*o,u=kC(e)*o,A=kC(t),c=A*n+s*r;return[wC(u*i-c*a,s*n-A*r),SC(c*i+u*a)]}return o.invert=function(e,t){var o=QC(t),s=QC(e)*o,u=kC(e)*o,A=kC(t),c=A*i-u*a;return[wC(u*i+A*a,s*n+c*r),SC(c*n-s*r)]},o}nB.invert=nB;function sB(e,t,n,r,i,a){if(n){var o=QC(t),s=kC(t),u=r*n;null==i?(i=t+r*IC,a=t-u/2):(i=uB(o,i),a=uB(o,a),(r>0?i<a:i>a)&&(i+=r*IC));for(var A,c=i;r>0?c>a:c<a;c-=u)A=TC([o,-s*QC(c),-s*kC(c)]),e.point(A[0],A[1])}}function uB(e,t){(t=LC(t))[0]-=e,HC(t);var n,r=(n=-t[1])>1?0:n<-1?vC:Math.acos(n);return((-t[2]<0?-r:r)+IC-1e-6)%IC}var AB=function(e){var t=QC(e),n=6*EC,r=t>0,i=CC(t)>1e-6;function a(e,n){return QC(e)*QC(n)>t}function o(e,n,r){var i=[1,0,0],a=UC(LC(e),LC(n)),o=PC(a,a),s=a[0],u=o-s*s;if(!u)return!r&&e;var A=t*o/u,c=-t*s/u,l=UC(i,a),f=qC(i,A);GC(f,qC(a,c));var h=l,g=PC(f,h),d=PC(h,h),p=g*g-d*(PC(f,f)-1);if(!(p<0)){var v=xC(p),y=qC(h,(-g-v)/d);if(GC(y,f),y=TC(y),!r)return y;var m,I=e[0],b=n[0],E=e[1],C=n[1];b<I&&(m=I,I=b,b=m);var B=b-I,w=CC(B-vC)<1e-6;if(!w&&C<E&&(m=E,E=C,C=m),w||B<1e-6?w?E+C>0^y[1]<(CC(y[0]-I)<1e-6?E:C):E<=y[1]&&y[1]<=C:B>vC^(I<=y[0]&&y[0]<=b)){var Q=qC(h,(-g+v)/d);return GC(Q,f),[y,TC(Q)]}}}function s(t,n){var i=r?e:vC-e,a=0;return t<-i?a|=1:t>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return XC(a,(function(e){var t,n,u,A,c;return{lineStart:function(){A=u=!1,c=1},point:function(l,f){var h,g=[l,f],d=a(l,f),p=r?d?0:s(l,f):d?s(l+(l<0?vC:-vC),f):0;if(!t&&(A=u=d)&&e.lineStart(),d!==u&&(!(h=o(t,g))||OC(t,h)||OC(g,h))&&(g[2]=1),d!==u)c=0,d?(e.lineStart(),h=o(g,t),e.point(h[0],h[1])):(h=o(t,g),e.point(h[0],h[1],2),e.lineEnd()),t=h;else if(i&&t&&r^d){var v;p&n||!(v=o(g,t,!0))||(c=0,r?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1],3)))}!d||t&&OC(t,g)||e.point(g[0],g[1]),t=g,u=d,n=p},lineEnd:function(){u&&e.lineEnd(),t=null},clean:function(){return c|(A&&u)<<1}}}),(function(t,r,i,a){sB(a,e,n,i,t,r)}),r?[0,-e]:[-vC,e-vC])};function cB(e,t,n,r){function i(i,a){return e<=i&&i<=n&&t<=a&&a<=r}function a(i,a,s,A){var c=0,l=0;if(null==i||(c=o(i,s))!==(l=o(a,s))||u(i,a)<0^s>0)do{A.point(0===c||3===c?e:n,c>1?r:t)}while((c=(c+s+4)%4)!==l);else A.point(a[0],a[1])}function o(r,i){return CC(r[0]-e)<1e-6?i>0?0:3:CC(r[0]-n)<1e-6?i>0?2:1:CC(r[1]-t)<1e-6?i>0?1:0:i>0?3:2}function s(e,t){return u(e.x,t.x)}function u(e,t){var n=o(e,1),r=o(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(o){var u,A,c,l,f,h,g,d,p,v,y,m=o,I=pC(),b={point:E,lineStart:function(){b.point=C,A&&A.push(c=[]);v=!0,p=!1,g=d=NaN},lineEnd:function(){u&&(C(l,f),h&&p&&I.rejoin(),u.push(I.result()));b.point=E,p&&m.lineEnd()},polygonStart:function(){m=I,u=[],A=[],y=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,i=A.length;n<i;++n)for(var a,o,s=A[n],u=1,c=s.length,l=s[0],f=l[0],h=l[1];u<c;++u)a=f,o=h,l=s[u],f=l[0],h=l[1],o<=r?h>r&&(f-a)*(r-o)>(h-o)*(e-a)&&++t:h<=r&&(f-a)*(r-o)<(h-o)*(e-a)&&--t;return t}(),n=y&&t,i=(u=VC(u)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&RC(u,s,t,a,o),o.polygonEnd());m=o,u=A=c=null}};function E(e,t){i(e,t)&&m.point(e,t)}function C(a,o){var s=i(a,o);if(A&&c.push([a,o]),v)l=a,f=o,h=s,v=!1,s&&(m.lineStart(),m.point(a,o));else if(s&&p)m.point(a,o);else{var u=[g=Math.max(-1e9,Math.min(1e9,g)),d=Math.max(-1e9,Math.min(1e9,d))],I=[a=Math.max(-1e9,Math.min(1e9,a)),o=Math.max(-1e9,Math.min(1e9,o))];!function(e,t,n,r,i,a){var o,s=e[0],u=e[1],A=0,c=1,l=t[0]-s,f=t[1]-u;if(o=n-s,l||!(o>0)){if(o/=l,l<0){if(o<A)return;o<c&&(c=o)}else if(l>0){if(o>c)return;o>A&&(A=o)}if(o=i-s,l||!(o<0)){if(o/=l,l<0){if(o>c)return;o>A&&(A=o)}else if(l>0){if(o<A)return;o<c&&(c=o)}if(o=r-u,f||!(o>0)){if(o/=f,f<0){if(o<A)return;o<c&&(c=o)}else if(f>0){if(o>c)return;o>A&&(A=o)}if(o=a-u,f||!(o<0)){if(o/=f,f<0){if(o>c)return;o>A&&(A=o)}else if(f>0){if(o<A)return;o<c&&(c=o)}return A>0&&(e[0]=s+A*l,e[1]=u+A*f),c<1&&(t[0]=s+c*l,t[1]=u+c*f),!0}}}}}(u,I,e,t,n,r)?s&&(m.lineStart(),m.point(a,o),y=!1):(p||(m.lineStart(),m.point(u[0],u[1])),m.point(I[0],I[1]),s||m.lineEnd(),y=!1)}g=a,d=o,p=s}return b}}var lB=function(e){return e};function fB(e){return function(t){var n=new hB;for(var r in e)n[r]=e[r];return n.stream=t,n}}function hB(){}function gB(e,t){e&&pB.hasOwnProperty(e.type)&&pB[e.type](e,t)}hB.prototype={constructor:hB,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var dB={Feature:function(e,t){gB(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)gB(n[r].geometry,t)}},pB={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){vB(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)vB(n[r],t,0)},Polygon:function(e,t){yB(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)yB(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)gB(n[r],t)}};function vB(e,t,n){var r,i=-1,a=e.length-n;for(t.lineStart();++i<a;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function yB(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)vB(e[n],t,1);t.polygonEnd()}var mB=1/0,IB=mB,bB=-mB,EB=bB;var CB={point:function(e,t){e<mB&&(mB=e);e>bB&&(bB=e);t<IB&&(IB=t);t>EB&&(EB=t)},lineStart:dC,lineEnd:dC,polygonStart:dC,polygonEnd:dC,result:function(){var e=[[mB,IB],[bB,EB]];return bB=EB=-(IB=mB=1/0),e}};function BB(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=r&&e.clipExtent(null),function(e,t){e&&dB.hasOwnProperty(e.type)?dB[e.type](e,t):gB(e,t)}(n,e.stream(CB)),t(CB.result()),null!=r&&e.clipExtent(r),e}function wB(e,t,n){return BB(e,(function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+t[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([o,s])}),n)}var QB=QC(30*EC),kB=function(e,t){return+t?function(e,t){function n(r,i,a,o,s,u,A,c,l,f,h,g,d,p){var v=A-r,y=c-i,m=v*v+y*y;if(m>4*t&&d--){var I=o+f,b=s+h,E=u+g,C=xC(I*I+b*b+E*E),B=SC(E/=C),w=CC(CC(E)-1)<1e-6||CC(a-l)<1e-6?(a+l)/2:wC(b,I),Q=e(w,B),k=Q[0],_=Q[1],x=k-r,S=_-i,O=y*x-v*S;(O*O/m>t||CC((v*x+y*S)/m-.5)>.3||o*f+s*h+u*g<QB)&&(n(r,i,a,o,s,u,k,_,w,I/=C,b/=C,E,d,p),p.point(k,_),n(k,_,w,I,b,E,A,c,l,f,h,g,d,p))}}return function(t){var r,i,a,o,s,u,A,c,l,f,h,g,d={point:p,lineStart:v,lineEnd:m,polygonStart:function(){t.polygonStart(),d.lineStart=I},polygonEnd:function(){t.polygonEnd(),d.lineStart=v}};function p(n,r){n=e(n,r),t.point(n[0],n[1])}function v(){c=NaN,d.point=y,t.lineStart()}function y(r,i){var a=LC([r,i]),o=e(r,i);n(c,l,A,f,h,g,c=o[0],l=o[1],A=r,f=a[0],h=a[1],g=a[2],16,t),t.point(c,l)}function m(){d.point=p,t.lineEnd()}function I(){v(),d.point=b,d.lineEnd=E}function b(e,t){y(r=e,t),i=c,a=l,o=f,s=h,u=g,d.point=y}function E(){n(c,l,A,f,h,g,i,a,r,o,s,u,16,t),d.lineEnd=m,m()}return d}}(e,t):function(e){return fB({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}(e)};var _B=fB({point:function(e,t){this.stream.point(e*EC,t*EC)}});function xB(e,t,n,r,i){function a(a,o){return[t+e*(a*=r),n-e*(o*=i)]}return a.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},a}function SB(e,t,n,r,i,a){var o=QC(a),s=kC(a),u=o*e,A=s*e,c=o/e,l=s/e,f=(s*n-o*t)/e,h=(s*t+o*n)/e;function g(e,a){return[u*(e*=r)-A*(a*=i)+t,n-A*e-u*a]}return g.invert=function(e,t){return[r*(c*e-l*t+f),i*(h-l*e-c*t)]},g}function OB(e){return function(e){var t,n,r,i,a,o,s,u,A,c,l=150,f=480,h=250,g=0,d=0,p=0,v=0,y=0,m=0,I=1,b=1,E=null,C=eB,B=null,w=lB,Q=.5;function k(e){return u(e[0]*EC,e[1]*EC)}function _(e){return(e=u.invert(e[0],e[1]))&&[e[0]*bC,e[1]*bC]}function x(){var e=SB(l,0,0,I,b,m).apply(null,t(g,d)),r=(m?SB:xB)(l,f-e[0],h-e[1],I,b,m);return n=rB(p,v,y),s=tB(t,r),u=tB(n,s),o=kB(s,Q),S()}function S(){return A=c=null,k}return k.stream=function(e){return A&&c===e?A:A=_B(function(e){return fB({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}(n)(C(o(w(c=e)))))},k.preclip=function(e){return arguments.length?(C=e,E=void 0,S()):C},k.postclip=function(e){return arguments.length?(w=e,B=r=i=a=null,S()):w},k.clipAngle=function(e){return arguments.length?(C=+e?AB(E=e*EC):(E=null,eB),S()):E*bC},k.clipExtent=function(e){return arguments.length?(w=null==e?(B=r=i=a=null,lB):cB(B=+e[0][0],r=+e[0][1],i=+e[1][0],a=+e[1][1]),S()):null==B?null:[[B,r],[i,a]]},k.scale=function(e){return arguments.length?(l=+e,x()):l},k.translate=function(e){return arguments.length?(f=+e[0],h=+e[1],x()):[f,h]},k.center=function(e){return arguments.length?(g=e[0]%360*EC,d=e[1]%360*EC,x()):[g*bC,d*bC]},k.rotate=function(e){return arguments.length?(p=e[0]%360*EC,v=e[1]%360*EC,y=e.length>2?e[2]%360*EC:0,x()):[p*bC,v*bC,y*bC]},k.angle=function(e){return arguments.length?(m=e%360*EC,x()):m*bC},k.reflectX=function(e){return arguments.length?(I=e?-1:1,x()):I<0},k.reflectY=function(e){return arguments.length?(b=e?-1:1,x()):b<0},k.precision=function(e){return arguments.length?(o=kB(s,Q=e*e),S()):xC(Q)},k.fitExtent=function(e,t){return wB(k,e,t)},k.fitSize=function(e,t){return function(e,t,n){return wB(e,[[0,0],t],n)}(k,e,t)},k.fitWidth=function(e,t){return function(e,t,n){return BB(e,(function(n){var r=+t,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];e.scale(150*i).translate([a,o])}),n)}(k,e,t)},k.fitHeight=function(e,t){return function(e,t,n){return BB(e,(function(n){var r=+t,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([a,o])}),n)}(k,e,t)},function(){return t=e.apply(this,arguments),k.invert=t.invert&&_,x()}}((function(){return e}))()}var DB=Math.abs,RB=(Math.atan,Math.atan2,Math.ceil,Math.cos),jB=(Math.exp,Math.floor,Math.log,Math.max,Math.min,Math.pow,Math.round,Math.sign,Math.sin),MB=(Math.tan,Math.PI),NB=MB/2,FB=(Math.SQRT1_2,LB(2));LB(MB);function TB(e){return e>1?NB:e<-1?-NB:Math.asin(e)}function LB(e){return e>0?Math.sqrt(e):0}function PB(e,t){var n,r=e*jB(t),i=30;do{t-=n=(t+jB(t)-r)/(1+RB(t))}while(DB(n)>1e-6&&--i>0);return t/2}var UB=function(e,t,n){function r(r,i){return[e*r*RB(i=PB(n,i)),t*jB(i)]}return r.invert=function(r,i){return i=TB(i/t),[r/(e*RB(i)),TB((2*i+jB(2*i))/n)]},r}(FB/NB,FB,MB),GB=Xb(),qB=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function HB(e,t){return function n(){var r=t();return r.type=e,r.path=Xb().projection(r),r.copy=r.copy||function(){var e=n();return qB.forEach((function(t){r[t]&&e[t](r[t]())})),e.path.pointRadius(r.path.pointRadius()),e},r}}function YB(e,t){if(!e||"string"!==typeof e)throw new Error("Projection type must be a name string.");return e=e.toLowerCase(),arguments.length>1?(zB[e]=HB(e,t),this):zB[e]||null}function JB(e){return e&&e.path||GB}var zB={albers:zE,albersusa:function(){var e,t,n,r,i,a,o=zE(),s=JE().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=JE().rotate([157,0]).center([-3,19.9]).parallels([8,18]),A={point:function(e,t){a=[e,t]}};function c(e){var t=e[0],o=e[1];return a=null,n.point(t,o),a||(r.point(t,o),a)||(i.point(t,o),a)}function l(){return e=t=null,c}return c.invert=function(e){var t=o.scale(),n=o.translate(),r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?u:o).invert(e)},c.stream=function(n){return e&&t===n?e:e=function(e){var t=e.length;return{point:function(n,r){for(var i=-1;++i<t;)e[i].point(n,r)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}([o.stream(t=n),s.stream(n),u.stream(n)])},c.precision=function(e){return arguments.length?(o.precision(e),s.precision(e),u.precision(e),l()):o.precision()},c.scale=function(e){return arguments.length?(o.scale(e),s.scale(.35*e),u.scale(e),c.translate(o.translate())):o.scale()},c.translate=function(e){if(!arguments.length)return o.translate();var t=o.scale(),a=+e[0],c=+e[1];return n=o.translate(e).clipExtent([[a-.455*t,c-.238*t],[a+.455*t,c+.238*t]]).stream(A),r=s.translate([a-.307*t,c+.201*t]).clipExtent([[a-.425*t+1e-6,c+.12*t+1e-6],[a-.214*t-1e-6,c+.234*t-1e-6]]).stream(A),i=u.translate([a-.205*t,c+.212*t]).clipExtent([[a-.214*t+1e-6,c+.166*t+1e-6],[a-.115*t-1e-6,c+.234*t-1e-6]]).stream(A),l()},c.fitExtent=function(e,t){return RE(c,e,t)},c.fitSize=function(e,t){return jE(c,e,t)},c.fitWidth=function(e,t){return ME(c,e,t)},c.fitHeight=function(e,t){return NE(c,e,t)},c.scale(1070)},azimuthalequalarea:function(){return GE(VE).scale(124.75).clipAngle(179.999)},azimuthalequidistant:function(){return GE(XE).scale(79.4188).clipAngle(179.999)},conicconformal:function(){return HE(tC).scale(109.5).parallels([30,30])},conicequalarea:JE,conicequidistant:function(){return HE(rC).scale(131.154).center([0,13.9389])},equalEarth:function(){return GE(AC).scale(177.158)},equirectangular:function(){return GE(nC).scale(152.63)},gnomonic:function(){return GE(cC).scale(144.049).clipAngle(60)},identity:function(){var e,t,n,r,i,a,o,s=1,u=0,A=0,c=1,l=1,f=0,h=null,g=1,d=1,p=SE({point:function(e,t){var n=m([e,t]);this.stream.point(n[0],n[1])}}),v=II;function y(){return g=s*c,d=s*l,a=o=null,m}function m(n){var r=n[0]*g,i=n[1]*d;if(f){var a=i*e-r*t;r=r*e+i*t,i=a}return[r+u,i+A]}return m.invert=function(n){var r=n[0]-u,i=n[1]-A;if(f){var a=i*e+r*t;r=r*e-i*t,i=a}return[r/g,i/d]},m.stream=function(e){return a&&o===e?a:a=p(v(o=e))},m.postclip=function(e){return arguments.length?(v=e,h=n=r=i=null,y()):v},m.clipExtent=function(e){return arguments.length?(v=null==e?(h=n=r=i=null,II):xE(h=+e[0][0],n=+e[0][1],r=+e[1][0],i=+e[1][1]),y()):null==h?null:[[h,n],[r,i]]},m.scale=function(e){return arguments.length?(s=+e,y()):s},m.translate=function(e){return arguments.length?(u=+e[0],A=+e[1],y()):[u,A]},m.angle=function(n){return arguments.length?(t=HI(f=n%360*NI),e=PI(f),y()):f*MI},m.reflectX=function(e){return arguments.length?(c=e?-1:1,y()):c<0},m.reflectY=function(e){return arguments.length?(l=e?-1:1,y()):l<0},m.fitExtent=function(e,t){return RE(m,e,t)},m.fitSize=function(e,t){return jE(m,e,t)},m.fitWidth=function(e,t){return ME(m,e,t)},m.fitHeight=function(e,t){return NE(m,e,t)},m},mercator:function(){return $E(ZE).scale(961/jI)},mollweide:function(){return OB(UB).scale(169.529)},naturalEarth1:function(){return GE(lC).scale(175.295)},orthographic:function(){return GE(fC).scale(249.5).clipAngle(90.000001)},stereographic:function(){return GE(hC).scale(250).clipAngle(142)},transversemercator:function(){var e=$E(gC),t=e.center,n=e.rotate;return e.center=function(e){return arguments.length?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return arguments.length?n([e[0],e[1],e.length>2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90]).scale(159.155)}};for(var KB in zB)YB(KB,zB[KB]);function WB(e){po.call(this,null,e)}function VB(e){po.call(this,null,e)}function XB(e){po.call(this,null,e)}WB.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]},Object(R.y)(WB,po).transform=function(e,t){var n=t.fork(t.ALL),r=this.value,i=e.field||R.x,a=e.as||"path",o=n.SOURCE;!r||e.modified()?(this.value=r=JB(e.projection),n.materialize().reflow()):o=i===R.x||t.modified(i.fields)?n.ADD_MOD:n.ADD;var s=function(e,t){var n=e.pointRadius();e.context(null),null!=t&&e.pointRadius(t);return n}(r,e.pointRadius);return n.visit(o,(function(e){e[a]=r(i(e))})),r.pointRadius(s),n.modifies(a)},VB.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]},Object(R.y)(VB,po).transform=function(e,t){var n,r=e.projection,i=e.fields[0],a=e.fields[1],o=e.as||["x","y"],s=o[0],u=o[1];function A(e){var t=r([i(e),a(e)]);t?(e[s]=t[0],e[u]=t[1]):(e[s]=void 0,e[u]=void 0)}return e.modified()?t=t.materialize().reflow(!0).visit(t.SOURCE,A):(n=t.modified(i.fields)||t.modified(a.fields),t.visit(n?t.ADD_MOD:t.ADD,A)),t.modifies(o)},XB.Definition={type:"GeoShape",metadata:{modifies:!0,nomod:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]},Object(R.y)(XB,po).transform=function(e,t){var n=t.fork(t.ALL),r=this.value,i=e.as||"shape",a=n.ADD;return r&&!e.modified()||(this.value=r=function(e,t,n){var r=null==n?function(n){return e(t(n))}:function(r){var i=e.pointRadius(),a=e.pointRadius(n)(t(r));return e.pointRadius(i),a};return r.context=function(t){return e.context(t),r},r}(JB(e.projection),e.field||Object(R.t)("datum"),e.pointRadius),n.materialize().reflow(),a=n.SOURCE),n.visit(a,(function(e){e[i]=r})),n.modifies(i)};var ZB=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN};var $B=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return ZB(t(e),n)}),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)<0?r=a+1:i=a}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)>0?i=a:r=a+1}return r}}}(ZB);$B.right,$B.left;var ew=Array.prototype,tw=(ew.slice,ew.map,function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(i);++r<i;)a[r]=e+r*n;return a});Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);Math.PI;var nw=Math.abs,rw=(Math.atan,Math.atan2,Math.cos,Math.ceil);Math.exp,Math.floor,Math.log,Math.pow,Math.sin,Math.sign,Math.sqrt,Math.tan;function iw(e,t,n){var r=tw(e,t-1e-6,n).concat(t);return function(e){return r.map((function(t){return[e,t]}))}}function aw(e,t,n){var r=tw(e,t-1e-6,n).concat(t);return function(e){return r.map((function(t){return[t,e]}))}}function ow(){var e,t,n,r,i,a,o,s,u,A,c,l,f=10,h=f,g=90,d=360,p=2.5;function v(){return{type:"MultiLineString",coordinates:y()}}function y(){return tw(rw(r/g)*g,n,g).map(c).concat(tw(rw(s/d)*d,o,d).map(l)).concat(tw(rw(t/f)*f,e,f).filter((function(e){return nw(e%g)>1e-6})).map(u)).concat(tw(rw(a/h)*h,i,h).filter((function(e){return nw(e%d)>1e-6})).map(A))}return v.lines=function(){return y().map((function(e){return{type:"LineString",coordinates:e}}))},v.outline=function(){return{type:"Polygon",coordinates:[c(r).concat(l(o).slice(1),c(n).reverse().slice(1),l(s).reverse().slice(1))]}},v.extent=function(e){return arguments.length?v.extentMajor(e).extentMinor(e):v.extentMinor()},v.extentMajor=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],s=+e[0][1],o=+e[1][1],r>n&&(e=r,r=n,n=e),s>o&&(e=s,s=o,o=e),v.precision(p)):[[r,s],[n,o]]},v.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],a=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),a>i&&(n=a,a=i,i=n),v.precision(p)):[[t,a],[e,i]]},v.step=function(e){return arguments.length?v.stepMajor(e).stepMinor(e):v.stepMinor()},v.stepMajor=function(e){return arguments.length?(g=+e[0],d=+e[1],v):[g,d]},v.stepMinor=function(e){return arguments.length?(f=+e[0],h=+e[1],v):[f,h]},v.precision=function(f){return arguments.length?(p=+f,u=iw(a,i,90),A=aw(t,e,p),c=iw(s,o,90),l=aw(r,n,p),v):p},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function sw(e){po.call(this,[],e),this.generator=ow()}sw.Definition={type:"Graticule",metadata:{changes:!0,generates:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]},Object(R.y)(sw,po).transform=function(e,t){var n,r=this.value,i=this.generator;if(!r.length||e.modified())for(var a in e)Object(R.D)(i[a])&&i[a](e[a]);return n=i(),r.length?t.mod.push(Fe(r[0],n)):t.add.push(je(n)),r[0]=n,t};var uw=function(e,t,n){e.prototype=t.prototype=n,n.constructor=e};function Aw(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function cw(){}var lw="\\s*([+-]?\\d+)\\s*",fw="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",hw="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",gw=/^#([0-9a-f]{3,8})$/,dw=new RegExp("^rgb\\("+[lw,lw,lw]+"\\)$"),pw=new RegExp("^rgb\\("+[hw,hw,hw]+"\\)$"),vw=new RegExp("^rgba\\("+[lw,lw,lw,fw]+"\\)$"),yw=new RegExp("^rgba\\("+[hw,hw,hw,fw]+"\\)$"),mw=new RegExp("^hsl\\("+[fw,hw,hw]+"\\)$"),Iw=new RegExp("^hsla\\("+[fw,hw,hw,fw]+"\\)$"),bw={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,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,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,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,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,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};function Ew(){return this.rgb().formatHex()}function Cw(){return this.rgb().formatRgb()}function Bw(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=gw.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?ww(t):3===n?new xw(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Qw(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Qw(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=dw.exec(e))?new xw(t[1],t[2],t[3],1):(t=pw.exec(e))?new xw(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=vw.exec(e))?Qw(t[1],t[2],t[3],t[4]):(t=yw.exec(e))?Qw(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=mw.exec(e))?Rw(t[1],t[2]/100,t[3]/100,1):(t=Iw.exec(e))?Rw(t[1],t[2]/100,t[3]/100,t[4]):bw.hasOwnProperty(e)?ww(bw[e]):"transparent"===e?new xw(NaN,NaN,NaN,0):null}function ww(e){return new xw(e>>16&255,e>>8&255,255&e,1)}function Qw(e,t,n,r){return r<=0&&(e=t=n=NaN),new xw(e,t,n,r)}function kw(e){return e instanceof cw||(e=Bw(e)),e?new xw((e=e.rgb()).r,e.g,e.b,e.opacity):new xw}function _w(e,t,n,r){return 1===arguments.length?kw(e):new xw(e,t,n,null==r?1:r)}function xw(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Sw(){return"#"+Dw(this.r)+Dw(this.g)+Dw(this.b)}function Ow(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Dw(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Rw(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Mw(e,t,n,r)}function jw(e){if(e instanceof Mw)return new Mw(e.h,e.s,e.l,e.opacity);if(e instanceof cw||(e=Bw(e)),!e)return new Mw;if(e instanceof Mw)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(o=t===a?(n-r)/s+6*(n<r):n===a?(r-t)/s+2:(t-n)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new Mw(o,s,u,e.opacity)}function Mw(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Nw(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function Fw(e){po.call(this,null,e)}function Tw(e){if(!Object(R.D)(e))return!1;var t=Object(R.db)(Object(R.g)(e));return t.$x||t.$y||t.$value||t.$max}function Lw(e){po.call(this,null,e),this.modified(!0)}function Pw(e,t,n){Object(R.D)(e[t])&&e[t](n)}uw(cw,Bw,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Ew,formatHex:Ew,formatHsl:function(){return jw(this).formatHsl()},formatRgb:Cw,toString:Cw}),uw(xw,_w,Aw(cw,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new xw(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new xw(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Sw,formatHex:Sw,formatRgb:Ow,toString:Ow})),uw(Mw,(function(e,t,n,r){return 1===arguments.length?jw(e):new Mw(e,t,n,null==r?1:r)}),Aw(cw,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Mw(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Mw(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new xw(Nw(e>=240?e-240:e+120,i,r),Nw(e,i,r),Nw(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}})),Fw.Definition={type:"heatmap",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:!0},{name:"opacity",type:"number",expr:!0},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]},Object(R.y)(Fw,po).transform=function(e,t){if(!t.changed()&&!e.modified())return t.StopPropagation;var n=t.materialize(t.SOURCE).source,r="shared"===e.resolve,i=e.field||R.x,a=function(e,t){var n;Object(R.D)(e)?(n=function(n){return e(n,t)}).dep=Tw(e):e?n=Object(R.l)(e):(n=function(e){return e.$value/e.$max||0}).dep=!0;return n}(e.opacity,e),o=function(e,t){var n;Object(R.D)(e)?(n=function(n){return _w(e(n,t))}).dep=Tw(e):n=Object(R.l)(_w(e||"#888"));return n}(e.color,e),s=e.as||"image",u={$x:0,$y:0,$value:0,$max:r?Vm(n.map((function(e){return Vm(i(e).values)}))):0};return n.forEach((function(e){var t=i(e),n=Object(R.o)({},e,u);r||(n.$max=Vm(t.values||[])),e[s]=function(e,t,n,r){for(var i=e.width,a=e.height,o=e.x1||0,s=e.y1||0,u=e.x2||i,A=e.y2||a,c=e.values,l=c?function(e){return c[e]}:R.kb,f=Dl(u-o,A-s),h=f.getContext("2d"),g=h.getImageData(0,0,u-o,A-s),d=g.data,p=s,v=0;p<A;++p){t.$y=p-s;for(var y=o,m=p*i;y<u;++y,v+=4){t.$x=y-o,t.$value=l(y+m);var I=n(t);d[v+0]=I.r,d[v+1]=I.g,d[v+2]=I.b,d[v+3]=~~(255*r(t))}}return h.putImageData(g,0,0),f}(t,n,o.dep?o:Object(R.l)(o(n)),a.dep?a:Object(R.l)(a(n)))})),t.reflow(!0).modifies(s)},Object(R.y)(Lw,po).transform=function(e,t){var n=this.value;return!n||e.modified("type")?(this.value=n=function(e){var t=YB((e||"mercator").toLowerCase());t||Object(R.n)("Unrecognized projection type: "+e);return t()}(e.type),qB.forEach((function(t){null!=e[t]&&Pw(n,t,e[t])}))):qB.forEach((function(t){e.modified(t)&&Pw(n,t,e[t])})),null!=e.pointRadius&&n.path.pointRadius(e.pointRadius),e.fit&&function(e,t){var n=function(e){return 1===(e=Object(R.i)(e)).length?e[0]:{type:"FeatureCollection",features:e.reduce((function(e,t){return e.concat(function(e){return"FeatureCollection"===e.type?e.features:Object(R.i)(e).filter((function(e){return null!=e})).map((function(e){return"Feature"===e.type?e:{type:"Feature",geometry:e}}))}(t))}),[])}}(t.fit);t.extent?e.fitExtent(t.extent,n):t.size&&e.fitSize(t.size,n)}(n,e),t.fork(t.NO_SOURCE|t.NO_FIELDS)};var Uw=n(933),Gw=function(e){return function(){return e}},qw=function(e){return 1e-6*(e()-.5)};function Hw(e){return e.x+e.vx}function Yw(e){return e.y+e.vy}var Jw=n(839);function zw(e){return e.index}function Kw(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}var Ww={center:function(e,t){var n,r=1;function i(){var i,a,o=n.length,s=0,u=0;for(i=0;i<o;++i)s+=(a=n[i]).x,u+=a.y;for(s=(s/o-e)*r,u=(u/o-t)*r,i=0;i<o;++i)(a=n[i]).x-=s,a.y-=u}return null==e&&(e=0),null==t&&(t=0),i.initialize=function(e){n=e},i.x=function(t){return arguments.length?(e=+t,i):e},i.y=function(e){return arguments.length?(t=+e,i):t},i.strength=function(e){return arguments.length?(r=+e,i):r},i},collide:function(e){var t,n,r,i=1,a=1;function o(){for(var e,o,u,A,c,l,f,h=t.length,g=0;g<a;++g)for(o=Object(Uw.a)(t,Hw,Yw).visitAfter(s),e=0;e<h;++e)u=t[e],l=n[u.index],f=l*l,A=u.x+u.vx,c=u.y+u.vy,o.visit(d);function d(e,t,n,a,o){var s=e.data,h=e.r,g=l+h;if(!s)return t>A+g||a<A-g||n>c+g||o<c-g;if(s.index>u.index){var d=A-s.x-s.vx,p=c-s.y-s.vy,v=d*d+p*p;v<g*g&&(0===d&&(v+=(d=qw(r))*d),0===p&&(v+=(p=qw(r))*p),v=(g-(v=Math.sqrt(v)))/v*i,u.vx+=(d*=v)*(g=(h*=h)/(f+h)),u.vy+=(p*=v)*g,s.vx-=d*(g=1-g),s.vy-=p*g)}}}function s(e){if(e.data)return e.r=n[e.data.index];for(var t=e.r=0;t<4;++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}function u(){if(t){var r,i,a=t.length;for(n=new Array(a),r=0;r<a;++r)i=t[r],n[i.index]=+e(i,r,t)}}return"function"!==typeof e&&(e=Gw(null==e?1:+e)),o.initialize=function(e,n){t=e,r=n,u()},o.iterations=function(e){return arguments.length?(a=+e,o):a},o.strength=function(e){return arguments.length?(i=+e,o):i},o.radius=function(t){return arguments.length?(e="function"===typeof t?t:Gw(+t),u(),o):e},o},nbody:function(){var e,t,n,r,i,a=Gw(-30),o=1,s=1/0,u=.81;function A(n){var i,a=e.length,o=Object(Uw.a)(e,Jw.b,Jw.c).visitAfter(l);for(r=n,i=0;i<a;++i)t=e[i],o.visit(f)}function c(){if(e){var t,n,r=e.length;for(i=new Array(r),t=0;t<r;++t)n=e[t],i[n.index]=+a(n,t,e)}}function l(e){var t,n,r,a,o,s=0,u=0;if(e.length){for(r=a=o=0;o<4;++o)(t=e[o])&&(n=Math.abs(t.value))&&(s+=t.value,u+=n,r+=n*t.x,a+=n*t.y);e.x=r/u,e.y=a/u}else{(t=e).x=t.data.x,t.y=t.data.y;do{s+=i[t.data.index]}while(t=t.next)}e.value=s}function f(e,a,A,c){if(!e.value)return!0;var l=e.x-t.x,f=e.y-t.y,h=c-a,g=l*l+f*f;if(h*h/u<g)return g<s&&(0===l&&(g+=(l=qw(n))*l),0===f&&(g+=(f=qw(n))*f),g<o&&(g=Math.sqrt(o*g)),t.vx+=l*e.value*r/g,t.vy+=f*e.value*r/g),!0;if(!(e.length||g>=s)){(e.data!==t||e.next)&&(0===l&&(g+=(l=qw(n))*l),0===f&&(g+=(f=qw(n))*f),g<o&&(g=Math.sqrt(o*g)));do{e.data!==t&&(h=i[e.data.index]*r/g,t.vx+=l*h,t.vy+=f*h)}while(e=e.next)}}return A.initialize=function(t,r){e=t,n=r,c()},A.strength=function(e){return arguments.length?(a="function"===typeof e?e:Gw(+e),c(),A):a},A.distanceMin=function(e){return arguments.length?(o=e*e,A):Math.sqrt(o)},A.distanceMax=function(e){return arguments.length?(s=e*e,A):Math.sqrt(s)},A.theta=function(e){return arguments.length?(u=e*e,A):Math.sqrt(u)},A},link:function(e){var t,n,r,i,a,o,s=zw,u=function(e){return 1/Math.min(i[e.source.index],i[e.target.index])},A=Gw(30),c=1;function l(r){for(var i=0,s=e.length;i<c;++i)for(var u,A,l,f,h,g,d,p=0;p<s;++p)A=(u=e[p]).source,f=(l=u.target).x+l.vx-A.x-A.vx||qw(o),h=l.y+l.vy-A.y-A.vy||qw(o),f*=g=((g=Math.sqrt(f*f+h*h))-n[p])/g*r*t[p],h*=g,l.vx-=f*(d=a[p]),l.vy-=h*d,A.vx+=f*(d=1-d),A.vy+=h*d}function f(){if(r){var o,u,A=r.length,c=e.length,l=new Map(r.map((function(e,t){return[s(e,t,r),e]})));for(o=0,i=new Array(A);o<c;++o)(u=e[o]).index=o,"object"!==typeof u.source&&(u.source=Kw(l,u.source)),"object"!==typeof u.target&&(u.target=Kw(l,u.target)),i[u.source.index]=(i[u.source.index]||0)+1,i[u.target.index]=(i[u.target.index]||0)+1;for(o=0,a=new Array(c);o<c;++o)u=e[o],a[o]=i[u.source.index]/(i[u.source.index]+i[u.target.index]);t=new Array(c),h(),n=new Array(c),g()}}function h(){if(r)for(var n=0,i=e.length;n<i;++n)t[n]=+u(e[n],n,e)}function g(){if(r)for(var t=0,i=e.length;t<i;++t)n[t]=+A(e[t],t,e)}return null==e&&(e=[]),l.initialize=function(e,t){r=e,o=t,f()},l.links=function(t){return arguments.length?(e=t,f(),l):e},l.id=function(e){return arguments.length?(s=e,l):s},l.iterations=function(e){return arguments.length?(c=+e,l):c},l.strength=function(e){return arguments.length?(u="function"===typeof e?e:Gw(+e),h(),l):u},l.distance=function(e){return arguments.length?(A="function"===typeof e?e:Gw(+e),g(),l):A},l},x:function(e){var t,n,r,i=Gw(.1);function a(e){for(var i,a=0,o=t.length;a<o;++a)(i=t[a]).vx+=(r[a]-i.x)*n[a]*e}function o(){if(t){var a,o=t.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+e(t[a],a,t))?0:+i(t[a],a,t)}}return"function"!==typeof e&&(e=Gw(null==e?0:+e)),a.initialize=function(e){t=e,o()},a.strength=function(e){return arguments.length?(i="function"===typeof e?e:Gw(+e),o(),a):i},a.x=function(t){return arguments.length?(e="function"===typeof t?t:Gw(+t),o(),a):e},a},y:function(e){var t,n,r,i=Gw(.1);function a(e){for(var i,a=0,o=t.length;a<o;++a)(i=t[a]).vy+=(r[a]-i.y)*n[a]*e}function o(){if(t){var a,o=t.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+e(t[a],a,t))?0:+i(t[a],a,t)}}return"function"!==typeof e&&(e=Gw(null==e?0:+e)),a.initialize=function(e){t=e,o()},a.strength=function(e){return arguments.length?(i="function"===typeof e?e:Gw(+e),o(),a):i},a.y=function(t){return arguments.length?(e="function"===typeof t?t:Gw(+t),o(),a):e},a}},Vw=["alpha","alphaMin","alphaTarget","velocityDecay","forces"],Xw=["static","iterations"],Zw=["x","y","vx","vy"];function $w(e){po.call(this,null,e)}$w.Definition={type:"Force",metadata:{modifies:!0},params:[{name:"static",type:"boolean",default:!1},{name:"restart",type:"boolean",default:!1},{name:"iterations",type:"number",default:300},{name:"alpha",type:"number",default:1},{name:"alphaMin",type:"number",default:.001},{name:"alphaTarget",type:"number",default:0},{name:"velocityDecay",type:"number",default:.4},{name:"forces",type:"param",array:!0,params:[{key:{force:"center"},params:[{name:"x",type:"number",default:0},{name:"y",type:"number",default:0}]},{key:{force:"collide"},params:[{name:"radius",type:"number",expr:!0},{name:"strength",type:"number",default:.7},{name:"iterations",type:"number",default:1}]},{key:{force:"nbody"},params:[{name:"strength",type:"number",default:-30},{name:"theta",type:"number",default:.9},{name:"distanceMin",type:"number",default:1},{name:"distanceMax",type:"number"}]},{key:{force:"link"},params:[{name:"links",type:"data"},{name:"id",type:"field"},{name:"distance",type:"number",default:30,expr:!0},{name:"strength",type:"number",expr:!0},{name:"iterations",type:"number",default:1}]},{key:{force:"x"},params:[{name:"strength",type:"number",default:.1},{name:"x",type:"field"}]},{key:{force:"y"},params:[{name:"strength",type:"number",default:.1},{name:"y",type:"field"}]}]},{name:"as",type:"string",array:!0,modify:!1,default:Zw}]};var eQ=Object(R.y)($w,po);function tQ(e,t,n,r){var i,a,o,s,u=Object(R.i)(t.forces);for(i=0,a=Vw.length;i<a;++i)"forces"!==(o=Vw[i])&&t.modified(o)&&e[o](t[o]);for(i=0,a=u.length;i<a;++i)s="forces"+i,(o=n||t.modified("forces",i)?rQ(u[i]):r&&nQ(u[i],r)?e.force(s):null)&&e.force(s,o);for(a=e.numForces||0;i<a;++i)e.force("forces"+i,null);return e.numForces=u.length,e}function nQ(e,t){var n,r;for(n in e)if(Object(R.D)(r=e[n])&&t.modified(Object(R.g)(r)))return 1;return 0}function rQ(e){var t,n;for(n in Object(R.v)(Ww,e.force)||Object(R.n)("Unrecognized force: "+e.force),t=Ww[e.force](),e)Object(R.D)(t[n])&&iQ(t[n],e[n],e);return t}function iQ(e,t,n){e(Object(R.D)(t)?function(e){return t(e,n)}:t)}eQ.transform=function(e,t){var n,r,i=this.value,a=t.changed(t.ADD_REM),o=e.modified(Vw),s=e.iterations||300;if(i?(a&&(t.modifies("index"),i.nodes(t.source)),(o||t.changed(t.MOD))&&tQ(i,e,0,t)):(this.value=i=function(e,t){var n=Object(Jw.a)(e),r=!1,i=n.stop,a=n.restart;return n.stopped=function(){return r},n.restart=function(){return r=!1,a()},n.stop=function(){return r=!0,i()},tQ(n,t,!0).on("end",(function(){r=!0}))}(t.source,e),i.on("tick",(n=t.dataflow,r=this,function(){n.touch(r).run()})),e.static||(a=!0,i.tick()),t.modifies("index")),o||a||e.modified(Xw)||t.changed()&&e.restart)if(i.alpha(Math.max(i.alpha(),e.alpha||1)).alphaDecay(1-Math.pow(i.alphaMin(),1/s)),e.static)for(i.stop();--s>=0;)i.tick();else if(i.stopped()&&i.restart(),!a)return t.StopPropagation;return this.finish(e,t)},eQ.finish=function(e,t){for(var n,r=t.dataflow,i=this._argops,a=0,o=i.length;a<o;++a)if("forces"===(n=i[a]).name&&"link"===n.op._argval.force)for(var s,u=n.op._argops,A=0,c=u.length;A<c;++A)if("links"===u[A].name&&(s=u[A].op.source)){r.pulse(s,r.changeset().reflow());break}return t.reflow(e.modified()).modifies(Zw)};var aQ=function(e,t,n){var r={};return e.each((function(e){var i=e.data;n(i)&&(r[t(i)]=e)})),e.lookup=r,e};function oQ(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function sQ(e,t){var n,r,i,a,o,s=new lQ(e),u=+e.value&&(s.value=e.value),A=[s];for(null==t&&(t=uQ);n=A.pop();)if(u&&(n.value=+n.data.value),(i=t(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)A.push(r=n.children[a]=new lQ(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(cQ)}function uQ(e){return e.children}function AQ(e){e.data=e.data.data}function cQ(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function lQ(e){this.data=e,this.depth=this.height=0,this.parent=null}function fQ(e){po.call(this,null,e)}function hQ(e){return e.values}function gQ(){var e,t=[];return e={entries:function(e){return function e(n,r){if(++r>t.length)return n;var i,a=[];for(i in n)a.push({key:i,values:e(n[i],r)});return a}(function e(n,r){if(r>=t.length)return n;for(var i,a,o,s=-1,u=n.length,A=t[r++],c={},l={};++s<u;)(o=c[i=A(a=n[s])+""])?o.push(a):c[i]=[a];for(i in c)l[i]=e(c[i],r);return l}(e,0),0)},key:function(n){return t.push(n),e}}}function dQ(e){po.call(this,null,e)}function pQ(e,t){return e.parent===t.parent?1:2}lQ.prototype=sQ.prototype={constructor:lQ,count:function(){return this.eachAfter(oQ)},each:function(e){var t,n,r,i,a=this,o=[a];do{for(t=o.reverse(),o=[];a=t.pop();)if(e(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(e){for(var t,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),t=i.children)for(n=0,r=t.length;n<r;++n)a.push(t[n]);for(;i=o.pop();)e(i);return this},eachBefore:function(e){for(var t,n,r=this,i=[r];r=i.pop();)if(e(r),t=r.children)for(n=t.length-1;n>=0;--n)i.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;e=n.pop(),t=r.pop();for(;e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return sQ(this).eachBefore(AQ)}},fQ.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]},Object(R.y)(fQ,po).transform=function(e,t){t.source||Object(R.n)("Nest transform requires an upstream data source.");var n=e.generate,r=e.modified(),i=t.clone(),a=this.value;return(!a||r||t.changed())&&(a&&a.each((function(e){e.children&&Oe(e.data)&&i.rem.push(e.data)})),this.value=a=sQ({values:Object(R.i)(e.keys).reduce((function(e,t){return e.key(t),e}),gQ()).entries(i.source)},hQ),n&&a.each((function(e){e.children&&(e=je(e.data),i.add.push(e),i.source.push(e))})),aQ(a,De,De)),i.source.root=a,i},Object(R.y)(dQ,po).transform=function(e,t){t.source&&t.source.root||Object(R.n)(this.constructor.name+" transform requires a backing tree data source.");var n=this.layout(e.method),r=this.fields,i=t.source.root,a=e.as||r;e.field?i.sum(e.field):i.count(),e.sort&&i.sort(Te(e.sort,(function(e){return e.data}))),function(e,t,n){for(var r,i=0,a=t.length;i<a;++i)(r=t[i])in n&&e[r](n[r])}(n,this.params,e),n.separation&&n.separation(!1!==e.separation?pQ:R.O);try{this.value=n(i)}catch(o){Object(R.n)(o)}return i.each((function(e){!function(e,t,n){for(var r=e.data,i=0,a=t.length-1;i<a;++i)r[n[i]]=e[t[i]];r[n[a]]=e.children?e.children.length:0}(e,r,a)})),t.reflow(e.modified()).modifies(a).modifies("leaf")};var vQ=Array.prototype.slice;var yQ=function(e){for(var t,n,r=0,i=(e=function(e){for(var t,n,r=e.length;r;)n=Math.random()*r--|0,t=e[r],e[r]=e[n],e[n]=t;return e}(vQ.call(e))).length,a=[];r<i;)t=e[r],n&&bQ(n,t)?++r:(n=CQ(a=mQ(a,t)),r=0);return n};function mQ(e,t){var n,r;if(EQ(t,e))return[t];for(n=0;n<e.length;++n)if(IQ(t,e[n])&&EQ(BQ(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(IQ(BQ(e[n],e[r]),t)&&IQ(BQ(e[n],t),e[r])&&IQ(BQ(e[r],t),e[n])&&EQ(wQ(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function IQ(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function bQ(e,t){var n=e.r-t.r+1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function EQ(e,t){for(var n=0;n<t.length;++n)if(!bQ(e,t[n]))return!1;return!0}function CQ(e){switch(e.length){case 1:return{x:(t=e[0]).x,y:t.y,r:t.r};case 2:return BQ(e[0],e[1]);case 3:return wQ(e[0],e[1],e[2])}var t}function BQ(e,t){var n=e.x,r=e.y,i=e.r,a=t.x,o=t.y,s=t.r,u=a-n,A=o-r,c=s-i,l=Math.sqrt(u*u+A*A);return{x:(n+a+u/l*c)/2,y:(r+o+A/l*c)/2,r:(l+i+s)/2}}function wQ(e,t,n){var r=e.x,i=e.y,a=e.r,o=t.x,s=t.y,u=t.r,A=n.x,c=n.y,l=n.r,f=r-o,h=r-A,g=i-s,d=i-c,p=u-a,v=l-a,y=r*r+i*i-a*a,m=y-o*o-s*s+u*u,I=y-A*A-c*c+l*l,b=h*g-f*d,E=(g*I-d*m)/(2*b)-r,C=(d*p-g*v)/b,B=(h*m-f*I)/(2*b)-i,w=(f*v-h*p)/b,Q=C*C+w*w-1,k=2*(a+E*C+B*w),_=E*E+B*B-a*a,x=-(Q?(k+Math.sqrt(k*k-4*Q*_))/(2*Q):_/k);return{x:r+E+C*x,y:i+B+w*x,r:x}}function QQ(e,t,n){var r,i,a,o,s=e.x-t.x,u=e.y-t.y,A=s*s+u*u;A?(i=t.r+n.r,i*=i,o=e.r+n.r,i>(o*=o)?(r=(A+o-i)/(2*A),a=Math.sqrt(Math.max(0,o/A-r*r)),n.x=e.x-r*s-a*u,n.y=e.y-r*u+a*s):(r=(A+i-o)/(2*A),a=Math.sqrt(Math.max(0,i/A-r*r)),n.x=t.x+r*s-a*u,n.y=t.y+r*u+a*s)):(n.x=t.x+n.r,n.y=t.y)}function kQ(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function _Q(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,a=(t.y*n.r+n.y*t.r)/r;return i*i+a*a}function xQ(e){this._=e,this.next=null,this.previous=null}function SQ(e){if(!(i=e.length))return 0;var t,n,r,i,a,o,s,u,A,c,l;if((t=e[0]).x=0,t.y=0,!(i>1))return t.r;if(n=e[1],t.x=-n.r,n.x=t.r,n.y=0,!(i>2))return t.r+n.r;QQ(n,t,r=e[2]),t=new xQ(t),n=new xQ(n),r=new xQ(r),t.next=r.previous=n,n.next=t.previous=r,r.next=n.previous=t;e:for(s=3;s<i;++s){QQ(t._,n._,r=e[s]),r=new xQ(r),u=n.next,A=t.previous,c=n._.r,l=t._.r;do{if(c<=l){if(kQ(u._,r._)){n=u,t.next=n,n.previous=t,--s;continue e}c+=u._.r,u=u.next}else{if(kQ(A._,r._)){(t=A).next=n,n.previous=t,--s;continue e}l+=A._.r,A=A.previous}}while(u!==A.next);for(r.previous=t,r.next=n,t.next=n.previous=n=r,a=_Q(t);(r=r.next)!==n;)(o=_Q(r))<a&&(t=r,a=o);n=t.next}for(t=[n._],r=n;(r=r.next)!==n;)t.push(r._);for(r=yQ(t),s=0;s<i;++s)(t=e[s]).x-=r.x,t.y-=r.y;return r.r}function OQ(e){return null==e?null:DQ(e)}function DQ(e){if("function"!==typeof e)throw new Error;return e}function RQ(){return 0}var jQ=function(e){return function(){return e}};function MQ(e){return Math.sqrt(e.value)}function NQ(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function FQ(e,t){return function(n){if(r=n.children){var r,i,a,o=r.length,s=e(n)*t||0;if(s)for(i=0;i<o;++i)r[i].r+=s;if(a=SQ(r),s)for(i=0;i<o;++i)r[i].r-=s;n.r=a+s}}}function TQ(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}var LQ=["x","y","r","depth","children"];function PQ(e){dQ.call(this,e)}PQ.Definition={type:"Pack",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"padding",type:"number",default:0},{name:"radius",type:"field",default:null},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:LQ.length,default:LQ}]};var UQ=Object(R.y)(PQ,dQ);UQ.layout=function(){var e=null,t=1,n=1,r=RQ;function i(i){return i.x=t/2,i.y=n/2,e?i.eachBefore(NQ(e)).eachAfter(FQ(r,.5)).eachBefore(TQ(1)):i.eachBefore(NQ(MQ)).eachAfter(FQ(RQ,1)).eachAfter(FQ(r,i.r/Math.min(t,n))).eachBefore(TQ(Math.min(t,n)/(2*i.r))),i}return i.radius=function(t){return arguments.length?(e=OQ(t),i):e},i.size=function(e){return arguments.length?(t=+e[0],n=+e[1],i):[t,n]},i.padding=function(e){return arguments.length?(r="function"===typeof e?e:jQ(+e),i):r},i},UQ.params=["radius","size","padding"],UQ.fields=LQ;var GQ=function(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)},qQ=function(e,t,n,r,i){for(var a,o=e.children,s=-1,u=o.length,A=e.value&&(r-t)/e.value;++s<u;)(a=o[s]).y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*A},HQ=["x0","y0","x1","y1","depth","children"];function YQ(e){dQ.call(this,e)}YQ.Definition={type:"Partition",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"padding",type:"number",default:0},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:HQ.length,default:HQ}]};var JQ=Object(R.y)(YQ,dQ);JQ.layout=function(){var e=1,t=1,n=0,r=!1;function i(i){var a=i.height+1;return i.x0=i.y0=n,i.x1=e,i.y1=t/a,i.eachBefore(function(e,t){return function(r){r.children&&qQ(r,r.x0,e*(r.depth+1)/t,r.x1,e*(r.depth+2)/t);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s}}(t,a)),r&&i.eachBefore(GQ),i}return i.round=function(e){return arguments.length?(r=!!e,i):r},i.size=function(n){return arguments.length?(e=+n[0],t=+n[1],i):[e,t]},i.padding=function(e){return arguments.length?(n=+e,i):n},i},JQ.params=["size","round","padding"],JQ.fields=HQ;var zQ={depth:-1},KQ={};function WQ(e){return e.id}function VQ(e){return e.parentId}var XQ=function(){var e=WQ,t=VQ;function n(n){var r,i,a,o,s,u,A,c=n.length,l=new Array(c),f={};for(i=0;i<c;++i)r=n[i],s=l[i]=new lQ(r),null!=(u=e(r,i,n))&&(u+="")&&(f[A="$"+(s.id=u)]=A in f?KQ:s);for(i=0;i<c;++i)if(s=l[i],null!=(u=t(n[i],i,n))&&(u+="")){if(!(o=f["$"+u]))throw new Error("missing: "+u);if(o===KQ)throw new Error("ambiguous: "+u);o.children?o.children.push(s):o.children=[s],s.parent=o}else{if(a)throw new Error("multiple roots");a=s}if(!a)throw new Error("no root");if(a.parent=zQ,a.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(cQ),a.parent=null,c>0)throw new Error("cycle");return a}return n.id=function(t){return arguments.length?(e=DQ(t),n):e},n.parentId=function(e){return arguments.length?(t=DQ(e),n):t},n};function ZQ(e){po.call(this,null,e)}function $Q(e,t){return e.parent===t.parent?1:2}function ek(e){var t=e.children;return t?t[0]:e.t}function tk(e){var t=e.children;return t?t[t.length-1]:e.t}function nk(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function rk(e,t,n){return e.a.parent===t.parent?e.a:n}function ik(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}ZQ.Definition={type:"Stratify",metadata:{treesource:!0},params:[{name:"key",type:"field",required:!0},{name:"parentKey",type:"field",required:!0}]},Object(R.y)(ZQ,po).transform=function(e,t){t.source||Object(R.n)("Stratify transform requires an upstream data source.");var n=this.value,r=e.modified(),i=t.fork(t.ALL).materialize(t.SOURCE),a=!this.value||r||t.changed(t.ADD_REM)||t.modified(e.key.fields)||t.modified(e.parentKey.fields);return i.source=i.source.slice(),a&&(n=i.source.length?aQ(XQ().id(e.key).parentId(e.parentKey)(i.source),e.key,R.gb):aQ(XQ()([{}]),e.key,e.key)),i.source.root=this.value=n,i},ik.prototype=Object.create(lQ.prototype);function ak(e,t){return e.parent===t.parent?1:2}function ok(e,t){return e+t.x}function sk(e,t){return Math.max(e,t.y)}var uk={tidy:function(){var e=$Q,t=1,n=1,r=null;function i(i){var u=function(e){for(var t,n,r,i,a,o=new ik(e,0),s=[o];t=s.pop();)if(r=t._.children)for(t.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=t.children[i]=new ik(r[i],i)),n.parent=t;return(o.parent=new ik(null,0)).children=[o],o}(i);if(u.eachAfter(a),u.parent.m=-u.z,u.eachBefore(o),r)i.eachBefore(s);else{var A=i,c=i,l=i;i.eachBefore((function(e){e.x<A.x&&(A=e),e.x>c.x&&(c=e),e.depth>l.depth&&(l=e)}));var f=A===c?1:e(A,c)/2,h=f-A.x,g=t/(c.x+f+h),d=n/(l.depth||1);i.eachBefore((function(e){e.x=(e.x+h)*g,e.y=e.depth*d}))}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,i=e.children,a=i.length;--a>=0;)(t=i[a]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,a=t,o=t,s=n,u=a.parent.children[0],A=a.m,c=o.m,l=s.m,f=u.m;s=tk(s),a=ek(a),s&&a;)u=ek(u),(o=tk(o)).a=t,(i=s.z+l-a.z-A+e(s._,a._))>0&&(nk(rk(s,t,r),t,i),A+=i,c+=i),l+=s.m,A+=a.m,f+=u.m,c+=o.m;s&&!tk(o)&&(o.t=s,o.m+=l-c),a&&!ek(u)&&(u.t=a,u.m+=A-f,r=t)}return r}(t,i,t.parent.A||r[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i},cluster:function(){var e=ak,t=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(t){var n=t.children;n?(t.x=function(e){return e.reduce(ok,0)/e.length}(n),t.y=function(e){return 1+e.reduce(sk,0)}(n)):(t.x=a?o+=e(t,a):0,t.y=0,a=t)}));var s=function(e){for(var t;t=e.children;)e=t[0];return e}(i),u=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(i),A=s.x-e(s,u)/2,c=u.x+e(u,s)/2;return i.eachAfter(r?function(e){e.x=(e.x-i.x)*t,e.y=(i.y-e.y)*n}:function(e){e.x=(e.x-A)/(c-A)*t,e.y=(1-(i.y?e.y/i.y:1))*n})}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}},Ak=["x","y","depth","children"];function ck(e){dQ.call(this,e)}ck.Definition={type:"Tree",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"tidy",values:["tidy","cluster"]},{name:"size",type:"number",array:!0,length:2},{name:"nodeSize",type:"number",array:!0,length:2},{name:"separation",type:"boolean",default:!0},{name:"as",type:"string",array:!0,length:Ak.length,default:Ak}]};var lk=Object(R.y)(ck,dQ);function fk(e){po.call(this,[],e)}lk.layout=function(e){var t=e||"tidy";if(Object(R.v)(uk,t))return uk[t]();Object(R.n)("Unrecognized Tree layout method: "+t)},lk.params=["size","nodeSize"],lk.fields=Ak,fk.Definition={type:"TreeLinks",metadata:{tree:!0,generates:!0,changes:!0},params:[]},Object(R.y)(fk,po).transform=function(e,t){var n=this.value,r=t.source&&t.source.root,i=t.fork(t.NO_SOURCE),a={};return r||Object(R.n)("TreeLinks transform requires a tree data source."),t.changed(t.ADD_REM)?(i.rem=n,t.visit(t.SOURCE,(function(e){a[De(e)]=1})),r.each((function(e){var t=e.data,n=e.parent&&e.parent.data;n&&a[De(t)]&&a[De(n)]&&i.add.push(je({source:n,target:t}))})),this.value=i.add):t.changed(t.MOD)&&(t.visit(t.MOD,(function(e){a[De(e)]=1})),n.forEach((function(e){(a[De(e.source)]||a[De(e.target)])&&i.mod.push(e)}))),i};var hk=function(e,t,n,r,i){for(var a,o=e.children,s=-1,u=o.length,A=e.value&&(i-n)/e.value;++s<u;)(a=o[s]).x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*A},gk=(1+Math.sqrt(5))/2;function dk(e,t,n,r,i,a){for(var o,s,u,A,c,l,f,h,g,d,p,v=[],y=t.children,m=0,I=0,b=y.length,E=t.value;m<b;){u=i-n,A=a-r;do{c=y[I++].value}while(!c&&I<b);for(l=f=c,p=c*c*(d=Math.max(A/u,u/A)/(E*e)),g=Math.max(f/p,p/l);I<b;++I){if(c+=s=y[I].value,s<l&&(l=s),s>f&&(f=s),p=c*c*d,(h=Math.max(f/p,p/l))>g){c-=s;break}g=h}v.push(o={value:c,dice:u<A,children:y.slice(m,I)}),o.dice?qQ(o,n,r,i,E?r+=A*c/E:a):hk(o,n,r,E?n+=u*c/E:i,a),E-=c,m=I}return v}var pk=function e(t){function n(e,n,r,i,a){dk(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n}(gk),vk=function e(t){function n(e,n,r,i,a){if((o=e._squarify)&&o.ratio===t)for(var o,s,u,A,c,l=-1,f=o.length,h=e.value;++l<f;){for(u=(s=o[l]).children,A=s.value=0,c=u.length;A<c;++A)s.value+=u[A].value;s.dice?qQ(s,n,r,i,r+=(a-r)*s.value/h):hk(s,n,r,n+=(i-n)*s.value/h,a),h-=s.value}else e._squarify=o=dk(t,e,n,r,i,a),o.ratio=t}return n.ratio=function(t){return e((t=+t)>1?t:1)},n}(gk),yk={binary:function(e,t,n,r,i){var a,o,s=e.children,u=s.length,A=new Array(u+1);for(A[0]=o=a=0;a<u;++a)A[a+1]=o+=s[a].value;!function e(t,n,r,i,a,o,u){if(t>=n-1){var c=s[t];return c.x0=i,c.y0=a,c.x1=o,void(c.y1=u)}var l=A[t],f=r/2+l,h=t+1,g=n-1;for(;h<g;){var d=h+g>>>1;A[d]<f?h=d+1:g=d}f-A[h-1]<A[h]-f&&t+1<h&&--h;var p=A[h]-l,v=r-p;if(o-i>u-a){var y=(i*v+o*p)/r;e(t,h,p,i,a,y,u),e(h,n,v,y,a,o,u)}else{var m=(a*v+u*p)/r;e(t,h,p,i,a,o,m),e(h,n,v,i,m,o,u)}}(0,u,e.value,t,n,r,i)},dice:qQ,slice:hk,slicedice:function(e,t,n,r,i){(1&e.depth?hk:qQ)(e,t,n,r,i)},squarify:pk,resquarify:vk},mk=["x0","y0","x1","y1","depth","children"];function Ik(e){dQ.call(this,e)}Ik.Definition={type:"Treemap",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:mk.length,default:mk}]};var bk=Object(R.y)(Ik,dQ);bk.layout=function(){var e=function(){var e=pk,t=!1,n=1,r=1,i=[0],a=RQ,o=RQ,s=RQ,u=RQ,A=RQ;function c(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(l),i=[0],t&&e.eachBefore(GQ),e}function l(t){var n=i[t.depth],r=t.x0+n,c=t.y0+n,l=t.x1-n,f=t.y1-n;l<r&&(r=l=(r+l)/2),f<c&&(c=f=(c+f)/2),t.x0=r,t.y0=c,t.x1=l,t.y1=f,t.children&&(n=i[t.depth+1]=a(t)/2,r+=A(t)-n,c+=o(t)-n,(l-=s(t)-n)<r&&(r=l=(r+l)/2),(f-=u(t)-n)<c&&(c=f=(c+f)/2),e(t,r,c,l,f))}return c.round=function(e){return arguments.length?(t=!!e,c):t},c.size=function(e){return arguments.length?(n=+e[0],r=+e[1],c):[n,r]},c.tile=function(t){return arguments.length?(e=DQ(t),c):e},c.padding=function(e){return arguments.length?c.paddingInner(e).paddingOuter(e):c.paddingInner()},c.paddingInner=function(e){return arguments.length?(a="function"===typeof e?e:jQ(+e),c):a},c.paddingOuter=function(e){return arguments.length?c.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):c.paddingTop()},c.paddingTop=function(e){return arguments.length?(o="function"===typeof e?e:jQ(+e),c):o},c.paddingRight=function(e){return arguments.length?(s="function"===typeof e?e:jQ(+e),c):s},c.paddingBottom=function(e){return arguments.length?(u="function"===typeof e?e:jQ(+e),c):u},c.paddingLeft=function(e){return arguments.length?(A="function"===typeof e?e:jQ(+e),c):A},c}();return e.ratio=function(t){var n=e.tile();n.ratio&&e.tile(n.ratio(t))},e.method=function(t){Object(R.v)(yk,t)?e.tile(yk[t]):Object(R.n)("Unrecognized Treemap layout method: "+t)},e},bk.params=["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],bk.fields=mk;var Ek=function(e,t){var n,r,i,a,o,s,u=[],A=function(e){return e(a)};if(null==t)u.push(e);else for(n={},r=0,i=e.length;r<i;++r)a=e[r],(s=n[o=t.map(A)])||(n[o]=s=[],s.dims=o,u.push(s)),s.push(a);return u};function Ck(e){po.call(this,null,e)}Ck.Definition={type:"Loess",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"bandwidth",type:"number",default:.3},{name:"as",type:"string",array:!0}]},Object(R.y)(Ck,po).transform=function(e,t){var n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){var r=t.materialize(t.SOURCE).source,i=Ek(r,e.groupby),a=(e.groupby||[]).map(R.h),o=a.length,s=e.as||[Object(R.h)(e.x),Object(R.h)(e.y)],u=[];i.forEach((function(t){Rs(t,e.x,e.y,e.bandwidth||.3).forEach((function(e){for(var n={},r=0;r<o;++r)n[a[r]]=t.dims[r];n[s[0]]=e[0],n[s[1]]=e[1],u.push(je(n))}))})),this.value&&(n.rem=this.value),this.value=n.add=n.source=u}return n};var Bk={linear:ws,log:Qs,exp:_s,pow:xs,quad:Ss,poly:Os};function wk(e){po.call(this,null,e)}wk.Definition={type:"Regression",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"string",default:"linear",values:Object.keys(Bk)},{name:"order",type:"number",default:3},{name:"extent",type:"number",array:!0,length:2},{name:"params",type:"boolean",default:!1},{name:"as",type:"string",array:!0}]},Object(R.y)(wk,po).transform=function(e,t){var n=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){var r=t.materialize(t.SOURCE).source,i=Ek(r,e.groupby),a=(e.groupby||[]).map(R.h),o=e.method||"linear",s=e.order||3,u=function(e,t){return"poly"===e?t:"quad"===e?2:1}(o,s),A=e.as||[Object(R.h)(e.x),Object(R.h)(e.y)],c=Bk[o],l=[],f=e.extent;Object(R.v)(Bk,o)||Object(R.n)("Invalid regression method: "+o),null!=f&&"log"===o&&f[0]<=0&&(t.dataflow.warn("Ignoring extent with values <= 0 for log regression."),f=null),i.forEach((function(n){if(n.length<=u)t.dataflow.warn("Skipping regression with more parameters than data points.");else{var r=c(n,e.x,e.y,s);if(e.params)l.push(je({keys:n.dims,coef:r.coef,rSquared:r.rSquared}));else{var i=f||Object(R.p)(n,e.x),h=function(e){for(var t={},r=0;r<a.length;++r)t[a[r]]=n.dims[r];t[A[0]]=e[0],t[A[1]]=e[1],l.push(je(t))};"linear"===o?i.forEach((function(e){return h([e,r.predict(e)])})):Fs(r.predict,i,25,200).forEach(h)}}})),this.value&&(n.rem=this.value),this.value=n.add=n.source=l}return n};var Qk=Math.pow(2,-52),kk=new Uint32Array(512),_k=function(){function e(t){Object(_.a)(this,e);var n=t.length>>1;if(n>0&&"number"!==typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;var r=Math.max(2*n-5,0);this._triangles=new Uint32Array(3*r),this._halfedges=new Int32Array(3*r),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}return Object(x.a)(e,null,[{key:"from",value:function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nk,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Fk,i=t.length,a=new Float64Array(2*i),o=0;o<i;o++){var s=t[o];a[2*o]=n(s),a[2*o+1]=r(s)}return new e(a)}}]),Object(x.a)(e,[{key:"update",value:function(){for(var e=this.coords,t=this._hullPrev,n=this._hullNext,r=this._hullTri,i=this._hullHash,a=e.length>>1,o=1/0,s=1/0,u=-1/0,A=-1/0,c=0;c<a;c++){var l=e[2*c],f=e[2*c+1];l<o&&(o=l),f<s&&(s=f),l>u&&(u=l),f>A&&(A=f),this._ids[c]=c}for(var h,g,d,p=(o+u)/2,v=(s+A)/2,y=1/0,m=0;m<a;m++){var I=xk(p,v,e[2*m],e[2*m+1]);I<y&&(h=m,y=I)}var b=e[2*h],E=e[2*h+1];y=1/0;for(var C=0;C<a;C++)if(C!==h){var B=xk(b,E,e[2*C],e[2*C+1]);B<y&&B>0&&(g=C,y=B)}for(var w=e[2*g],Q=e[2*g+1],k=1/0,_=0;_<a;_++)if(_!==h&&_!==g){var x=Rk(b,E,w,Q,e[2*_],e[2*_+1]);x<k&&(d=_,k=x)}var S=e[2*d],O=e[2*d+1];if(k===1/0){for(var D=0;D<a;D++)this._dists[D]=e[2*D]-e[0]||e[2*D+1]-e[1];jk(this._ids,this._dists,0,a-1);for(var R=new Uint32Array(a),j=0,M=0,N=-1/0;M<a;M++){var F=this._ids[M];this._dists[F]>N&&(R[j++]=F,N=this._dists[F])}return this.hull=R.subarray(0,j),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(Ok(b,E,w,Q,S,O)){var T=g,L=w,P=Q;g=d,w=S,Q=O,d=T,S=L,O=P}var U=function(e,t,n,r,i,a){var o=n-e,s=r-t,u=i-e,A=a-t,c=o*o+s*s,l=u*u+A*A,f=.5/(o*A-s*u);return{x:e+(A*c-s*l)*f,y:t+(o*l-u*c)*f}}(b,E,w,Q,S,O);this._cx=U.x,this._cy=U.y;for(var G=0;G<a;G++)this._dists[G]=xk(e[2*G],e[2*G+1],U.x,U.y);jk(this._ids,this._dists,0,a-1),this._hullStart=h;var q=3;n[h]=t[d]=g,n[g]=t[h]=d,n[d]=t[g]=h,r[h]=0,r[g]=1,r[d]=2,i.fill(-1),i[this._hashKey(b,E)]=h,i[this._hashKey(w,Q)]=g,i[this._hashKey(S,O)]=d,this.trianglesLen=0,this._addTriangle(h,g,d,-1,-1,-1);for(var H,Y,J=0;J<this._ids.length;J++){var z=this._ids[J],K=e[2*z],W=e[2*z+1];if(!(J>0&&Math.abs(K-H)<=Qk&&Math.abs(W-Y)<=Qk)&&(H=K,Y=W,z!==h&&z!==g&&z!==d)){for(var V=0,X=0,Z=this._hashKey(K,W);X<this._hashSize&&(-1===(V=i[(Z+X)%this._hashSize])||V===n[V]);X++);for(var $=V=t[V],ee=void 0;ee=n[$],!Ok(K,W,e[2*$],e[2*$+1],e[2*ee],e[2*ee+1]);)if(($=ee)===V){$=-1;break}if(-1!==$){var te=this._addTriangle($,z,n[$],-1,-1,r[$]);r[z]=this._legalize(te+2),r[$]=te,q++;for(var ne=n[$];ee=n[ne],Ok(K,W,e[2*ne],e[2*ne+1],e[2*ee],e[2*ee+1]);)te=this._addTriangle(ne,z,ee,r[z],-1,r[ne]),r[z]=this._legalize(te+2),n[ne]=ne,q--,ne=ee;if($===V)for(;Ok(K,W,e[2*(ee=t[$])],e[2*ee+1],e[2*$],e[2*$+1]);)te=this._addTriangle(ee,z,$,-1,r[$],r[ee]),this._legalize(te+2),r[ee]=te,n[$]=$,q--,$=ee;this._hullStart=t[z]=$,n[$]=t[ne]=z,n[z]=ne,i[this._hashKey(K,W)]=z,i[this._hashKey(e[2*$],e[2*$+1])]=$}}}this.hull=new Uint32Array(q);for(var re=0,ie=this._hullStart;re<q;re++)this.hull[re]=ie,ie=n[ie];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}},{key:"_hashKey",value:function(e,t){return Math.floor(function(e,t){var n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}},{key:"_legalize",value:function(e){for(var t=this._triangles,n=this._halfedges,r=this.coords,i=0,a=0;;){var o=n[e],s=e-e%3;if(a=s+(e+2)%3,-1!==o){var u=o-o%3,A=s+(e+1)%3,c=u+(o+2)%3,l=t[a],f=t[e],h=t[A],g=t[c];if(Dk(r[2*l],r[2*l+1],r[2*f],r[2*f+1],r[2*h],r[2*h+1],r[2*g],r[2*g+1])){t[e]=g,t[o]=l;var d=n[c];if(-1===d){var p=this._hullStart;do{if(this._hullTri[p]===c){this._hullTri[p]=e;break}p=this._hullPrev[p]}while(p!==this._hullStart)}this._link(e,d),this._link(o,n[a]),this._link(a,c);var v=u+(o+1)%3;i<kk.length&&(kk[i++]=v)}else{if(0===i)break;e=kk[--i]}}else{if(0===i)break;e=kk[--i]}}return a}},{key:"_link",value:function(e,t){this._halfedges[e]=t,-1!==t&&(this._halfedges[t]=e)}},{key:"_addTriangle",value:function(e,t,n,r,i,a){var o=this.trianglesLen;return this._triangles[o]=e,this._triangles[o+1]=t,this._triangles[o+2]=n,this._link(o,r),this._link(o+1,i),this._link(o+2,a),this.trianglesLen+=3,o}}]),e}();function xk(e,t,n,r){var i=e-n,a=t-r;return i*i+a*a}function Sk(e,t,n,r,i,a){var o=(r-t)*(i-e),s=(n-e)*(a-t);return Math.abs(o-s)>=33306690738754716e-32*Math.abs(o+s)?o-s:0}function Ok(e,t,n,r,i,a){return(Sk(i,a,e,t,n,r)||Sk(e,t,n,r,i,a)||Sk(n,r,i,a,e,t))<0}function Dk(e,t,n,r,i,a,o,s){var u=e-o,A=t-s,c=n-o,l=r-s,f=i-o,h=a-s,g=c*c+l*l,d=f*f+h*h;return u*(l*d-g*h)-A*(c*d-g*f)+(u*u+A*A)*(c*h-l*f)<0}function Rk(e,t,n,r,i,a){var o=n-e,s=r-t,u=i-e,A=a-t,c=o*o+s*s,l=u*u+A*A,f=.5/(o*A-s*u),h=(A*c-s*l)*f,g=(o*l-u*c)*f;return h*h+g*g}function jk(e,t,n,r){if(r-n<=20)for(var i=n+1;i<=r;i++){for(var a=e[i],o=t[a],s=i-1;s>=n&&t[e[s]]>o;)e[s+1]=e[s--];e[s+1]=a}else{var u=n+1,A=r;Mk(e,n+r>>1,u),t[e[n]]>t[e[r]]&&Mk(e,n,r),t[e[u]]>t[e[r]]&&Mk(e,u,r),t[e[n]]>t[e[u]]&&Mk(e,n,u);for(var c=e[u],l=t[c];;){do{u++}while(t[e[u]]<l);do{A--}while(t[e[A]]>l);if(A<u)break;Mk(e,u,A)}e[n+1]=e[A],e[A]=c,r-u+1>=A-n?(jk(e,t,u,r),jk(e,t,n,A-1)):(jk(e,t,n,A-1),jk(e,t,u,r))}}function Mk(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Nk(e){return e[0]}function Fk(e){return e[1]}var Tk=function(){function e(){Object(_.a)(this,e),this._x0=this._y0=this._x1=this._y1=null,this._=""}return Object(x.a)(e,[{key:"moveTo",value:function(e,t){this._+="M".concat(this._x0=this._x1=+e,",").concat(this._y0=this._y1=+t)}},{key:"closePath",value:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}},{key:"lineTo",value:function(e,t){this._+="L".concat(this._x1=+e,",").concat(this._y1=+t)}},{key:"arc",value:function(e,t,n){var r=(e=+e)+(n=+n),i=t=+t;if(n<0)throw new Error("negative radius");null===this._x1?this._+="M".concat(r,",").concat(i):(Math.abs(this._x1-r)>1e-6||Math.abs(this._y1-i)>1e-6)&&(this._+="L"+r+","+i),n&&(this._+="A".concat(n,",").concat(n,",0,1,1,").concat(e-n,",").concat(t,"A").concat(n,",").concat(n,",0,1,1,").concat(this._x1=r,",").concat(this._y1=i))}},{key:"rect",value:function(e,t,n,r){this._+="M".concat(this._x0=this._x1=+e,",").concat(this._y0=this._y1=+t,"h").concat(+n,"v").concat(+r,"h").concat(-n,"Z")}},{key:"value",value:function(){return this._||null}}]),e}(),Lk=function(){function e(){Object(_.a)(this,e),this._=[]}return Object(x.a)(e,[{key:"moveTo",value:function(e,t){this._.push([e,t])}},{key:"closePath",value:function(){this._.push(this._[0].slice())}},{key:"lineTo",value:function(e,t){this._.push([e,t])}},{key:"value",value:function(){return this._.length?this._:null}}]),e}(),Pk=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,960,500],r=Object(ks.a)(n,4),i=r[0],a=r[1],o=r[2],s=r[3];if(Object(_.a)(this,e),!((o=+o)>=(i=+i))||!((s=+s)>=(a=+a)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=o,this.xmin=i,this.ymax=s,this.ymin=a,this._init()}return Object(x.a)(e,[{key:"update",value:function(){return this.delaunay.update(),this._init(),this}},{key:"_init",value:function(){for(var e,t,n=this.delaunay,r=n.points,i=n.hull,a=n.triangles,o=this.vectors,s=this.circumcenters=this._circumcenters.subarray(0,a.length/3*2),u=0,A=0,c=a.length;u<c;u+=3,A+=2){var l=2*a[u],f=2*a[u+1],h=2*a[u+2],g=r[l],d=r[l+1],p=r[f],v=r[f+1],y=r[h],m=r[h+1],I=p-g,b=v-d,E=y-g,C=m-d,B=I*I+b*b,w=E*E+C*C,Q=2*(I*C-b*E);if(Q)if(Math.abs(Q)<1e-8)e=(g+y)/2,t=(d+m)/2;else{var k=1/Q;e=g+(C*B-b*w)*k,t=d+(I*w-E*B)*k}else e=(g+y)/2-1e8*C,t=(d+m)/2+1e8*E;s[A]=e,s[A+1]=t}var _,x,S,O=i[i.length-1],D=4*O,R=r[2*O],j=r[2*O+1];o.fill(0);for(var M=0;M<i.length;++M)_=D,x=R,S=j,D=4*(O=i[M]),R=r[2*O],j=r[2*O+1],o[_+2]=o[D]=S-j,o[_+3]=o[D+1]=R-x}},{key:"render",value:function(e){var t=null==e?e=new Tk:void 0,n=this.delaunay,r=n.halfedges,i=n.inedges,a=n.hull,o=this.circumcenters,s=this.vectors;if(a.length<=1)return null;for(var u=0,A=r.length;u<A;++u){var c=r[u];if(!(c<u)){var l=2*Math.floor(u/3),f=2*Math.floor(c/3),h=o[l],g=o[l+1],d=o[f],p=o[f+1];this._renderSegment(h,g,d,p,e)}}for(var v,y=a[a.length-1],m=0;m<a.length;++m){v=y,y=a[m];var I=2*Math.floor(i[y]/3),b=o[I],E=o[I+1],C=4*v,B=this._project(b,E,s[C+2],s[C+3]);B&&this._renderSegment(b,E,B[0],B[1],e)}return t&&t.value()}},{key:"renderBounds",value:function(e){var t=null==e?e=new Tk:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),t&&t.value()}},{key:"renderCell",value:function(e,t){var n=null==t?t=new Tk:void 0,r=this._clip(e);if(null!==r&&r.length){t.moveTo(r[0],r[1]);for(var i=r.length;r[0]===r[i-2]&&r[1]===r[i-1]&&i>1;)i-=2;for(var a=2;a<i;a+=2)r[a]===r[a-2]&&r[a+1]===r[a-1]||t.lineTo(r[a],r[a+1]);return t.closePath(),n&&n.value()}}},{key:"cellPolygons",value:Y.a.mark((function e(){var t,n,r,i;return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.delaunay.points,n=0,r=t.length/2;case 2:if(!(n<r)){e.next=11;break}if(!(i=this.cellPolygon(n))){e.next=8;break}return i.index=n,e.next=8,i;case 8:++n,e.next=2;break;case 11:case"end":return e.stop()}}),e,this)}))},{key:"cellPolygon",value:function(e){var t=new Lk;return this.renderCell(e,t),t.value()}},{key:"_renderSegment",value:function(e,t,n,r,i){var a,o=this._regioncode(e,t),s=this._regioncode(n,r);0===o&&0===s?(i.moveTo(e,t),i.lineTo(n,r)):(a=this._clipSegment(e,t,n,r,o,s))&&(i.moveTo(a[0],a[1]),i.lineTo(a[2],a[3]))}},{key:"contains",value:function(e,t,n){return(t=+t)===t&&(n=+n)===n&&this.delaunay._step(e,t,n)===e}},{key:"neighbors",value:Y.a.mark((function e(t){var n,r,i,a,o,s,u,A,c;return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=this._clip(t))){e.next=33;break}r=Object(D.a)(this.delaunay.neighbors(t)),e.prev=3,r.s();case 5:if((i=r.n()).done){e.next=25;break}if(a=i.value,!(o=this._clip(a))){e.next=23;break}s=0,u=n.length;case 10:if(!(s<u)){e.next=23;break}A=0,c=o.length;case 12:if(!(A<c)){e.next=20;break}if(n[s]!=o[A]||n[s+1]!=o[A+1]||n[(s+2)%u]!=o[(A+c-2)%c]||n[(s+3)%u]!=o[(A+c-1)%c]){e.next=17;break}return e.next=16,a;case 16:return e.abrupt("break",23);case 17:A+=2,e.next=12;break;case 20:s+=2,e.next=10;break;case 23:e.next=5;break;case 25:e.next=30;break;case 27:e.prev=27,e.t0=e.catch(3),r.e(e.t0);case 30:return e.prev=30,r.f(),e.finish(30);case 33:case"end":return e.stop()}}),e,this,[[3,27,30,33]])}))},{key:"_cell",value:function(e){var t=this.circumcenters,n=this.delaunay,r=n.inedges,i=n.halfedges,a=n.triangles,o=r[e];if(-1===o)return null;var s=[],u=o;do{var A=Math.floor(u/3);if(s.push(t[2*A],t[2*A+1]),a[u=u%3===2?u-2:u+1]!==e)break;u=i[u]}while(u!==o&&-1!==u);return s}},{key:"_clip",value:function(e){if(0===e&&1===this.delaunay.hull.length)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];var t=this._cell(e);if(null===t)return null;var n=this.vectors,r=4*e;return n[r]||n[r+1]?this._clipInfinite(e,t,n[r],n[r+1],n[r+2],n[r+3]):this._clipFinite(e,t)}},{key:"_clipFinite",value:function(e,t){for(var n,r,i,a,o,s=t.length,u=null,A=t[s-2],c=t[s-1],l=this._regioncode(A,c),f=0;f<s;f+=2)if(n=A,r=c,A=t[f],c=t[f+1],i=l,l=this._regioncode(A,c),0===i&&0===l)a=o,o=0,u?u.push(A,c):u=[A,c];else{var h=void 0,g=void 0,d=void 0,p=void 0,v=void 0;if(0===i){if(null===(h=this._clipSegment(n,r,A,c,i,l)))continue;var y=h,m=Object(ks.a)(y,4);g=m[0],d=m[1],p=m[2],v=m[3]}else{if(null===(h=this._clipSegment(A,c,n,r,l,i)))continue;var I=h,b=Object(ks.a)(I,4);p=b[0],v=b[1],g=b[2],d=b[3],a=o,o=this._edgecode(g,d),a&&o&&this._edge(e,a,o,u,u.length),u?u.push(g,d):u=[g,d]}a=o,o=this._edgecode(p,v),a&&o&&this._edge(e,a,o,u,u.length),u?u.push(p,v):u=[p,v]}if(u)a=o,o=this._edgecode(u[0],u[1]),a&&o&&this._edge(e,a,o,u,u.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return u}},{key:"_clipSegment",value:function(e,t,n,r,i,a){for(;;){if(0===i&&0===a)return[e,t,n,r];if(i&a)return null;var o=void 0,s=void 0,u=i||a;8&u?(o=e+(n-e)*(this.ymax-t)/(r-t),s=this.ymax):4&u?(o=e+(n-e)*(this.ymin-t)/(r-t),s=this.ymin):2&u?(s=t+(r-t)*(this.xmax-e)/(n-e),o=this.xmax):(s=t+(r-t)*(this.xmin-e)/(n-e),o=this.xmin),i?(e=o,t=s,i=this._regioncode(e,t)):(n=o,r=s,a=this._regioncode(n,r))}}},{key:"_clipInfinite",value:function(e,t,n,r,i,a){var o,s=Array.from(t);if((o=this._project(s[0],s[1],n,r))&&s.unshift(o[0],o[1]),(o=this._project(s[s.length-2],s[s.length-1],i,a))&&s.push(o[0],o[1]),s=this._clipFinite(e,s))for(var u,A=0,c=s.length,l=this._edgecode(s[c-2],s[c-1]);A<c;A+=2)u=l,l=this._edgecode(s[A],s[A+1]),u&&l&&(A=this._edge(e,u,l,s,A),c=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}},{key:"_edge",value:function(e,t,n,r,i){for(;t!==n;){var a=void 0,o=void 0;switch(t){case 5:t=4;continue;case 4:t=6,a=this.xmax,o=this.ymin;break;case 6:t=2;continue;case 2:t=10,a=this.xmax,o=this.ymax;break;case 10:t=8;continue;case 8:t=9,a=this.xmin,o=this.ymax;break;case 9:t=1;continue;case 1:t=5,a=this.xmin,o=this.ymin}r[i]===a&&r[i+1]===o||!this.contains(e,a,o)||(r.splice(i,0,a,o),i+=2)}if(r.length>4)for(var s=0;s<r.length;s+=2){var u=(s+2)%r.length,A=(s+4)%r.length;(r[s]===r[u]&&r[u]===r[A]||r[s+1]===r[u+1]&&r[u+1]===r[A+1])&&(r.splice(u,2),s-=2)}return i}},{key:"_project",value:function(e,t,n,r){var i,a,o,s=1/0;if(r<0){if(t<=this.ymin)return null;(i=(this.ymin-t)/r)<s&&(o=this.ymin,a=e+(s=i)*n)}else if(r>0){if(t>=this.ymax)return null;(i=(this.ymax-t)/r)<s&&(o=this.ymax,a=e+(s=i)*n)}if(n>0){if(e>=this.xmax)return null;(i=(this.xmax-e)/n)<s&&(a=this.xmax,o=t+(s=i)*r)}else if(n<0){if(e<=this.xmin)return null;(i=(this.xmin-e)/n)<s&&(a=this.xmin,o=t+(s=i)*r)}return[a,o]}},{key:"_edgecode",value:function(e,t){return(e===this.xmin?1:e===this.xmax?2:0)|(t===this.ymin?4:t===this.ymax?8:0)}},{key:"_regioncode",value:function(e,t){return(e<this.xmin?1:e>this.xmax?2:0)|(t<this.ymin?4:t>this.ymax?8:0)}}]),e}(),Uk=Y.a.mark(Wk),Gk=2*Math.PI,qk=Math.pow;function Hk(e){return e[0]}function Yk(e){return e[1]}function Jk(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}var zk=function(){function e(t){Object(_.a)(this,e),this._delaunator=new _k(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}return Object(x.a)(e,null,[{key:"from",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Hk,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Yk,i=arguments.length>3?arguments[3]:void 0;return new e("length"in t?Kk(t,n,r,i):Float64Array.from(Wk(t,n,r,i)))}}]),Object(x.a)(e,[{key:"update",value:function(){return this._delaunator.update(),this._init(),this}},{key:"_init",value:function(){var e=this._delaunator,t=this.points;if(e.hull&&e.hull.length>2&&function(e){for(var t=e.triangles,n=e.coords,r=0;r<t.length;r+=3){var i=2*t[r],a=2*t[r+1],o=2*t[r+2];if((n[o]-n[i])*(n[a+1]-n[i+1])-(n[a]-n[i])*(n[o+1]-n[i+1])>1e-10)return!1}return!0}(e)){this.collinear=Int32Array.from({length:t.length/2},(function(e,t){return t})).sort((function(e,n){return t[2*e]-t[2*n]||t[2*e+1]-t[2*n+1]}));for(var n=this.collinear[0],r=this.collinear[this.collinear.length-1],i=[t[2*n],t[2*n+1],t[2*r],t[2*r+1]],a=1e-8*Math.hypot(i[3]-i[1],i[2]-i[0]),o=0,s=t.length/2;o<s;++o){var u=Jk(t[2*o],t[2*o+1],a);t[2*o]=u[0],t[2*o+1]=u[1]}this._delaunator=new _k(t)}else delete this.collinear;for(var A=this.halfedges=this._delaunator.halfedges,c=this.hull=this._delaunator.hull,l=this.triangles=this._delaunator.triangles,f=this.inedges.fill(-1),h=this._hullIndex.fill(-1),g=0,d=A.length;g<d;++g){var p=l[g%3===2?g-2:g+1];-1!==A[g]&&-1!==f[p]||(f[p]=g)}for(var v=0,y=c.length;v<y;++v)h[c[v]]=v;c.length<=2&&c.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=c[0],this.triangles[1]=c[1],this.triangles[2]=c[1],f[c[0]]=1,2===c.length&&(f[c[1]]=0))}},{key:"voronoi",value:function(e){return new Pk(this,e)}},{key:"neighbors",value:Y.a.mark((function e(t){var n,r,i,a,o,s,u,A,c,l,f;return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.inedges,r=this.hull,i=this._hullIndex,a=this.halfedges,o=this.triangles,!(s=this.collinear)){e.next=10;break}if(!((u=s.indexOf(t))>0)){e.next=6;break}return e.next=6,s[u-1];case 6:if(!(u<s.length-1)){e.next=9;break}return e.next=9,s[u+1];case 9:return e.abrupt("return");case 10:if(-1!==(A=n[t])){e.next=13;break}return e.abrupt("return");case 13:c=A,l=-1;case 14:return e.next=16,l=o[c];case 16:if(o[c=c%3===2?c-2:c+1]===t){e.next=19;break}return e.abrupt("return");case 19:if(-1!==(c=a[c])){e.next=26;break}if((f=r[(i[t]+1)%r.length])===l){e.next=25;break}return e.next=25,f;case 25:return e.abrupt("return");case 26:if(c!==A){e.next=14;break}case 27:case"end":return e.stop()}}),e,this)}))},{key:"find",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((e=+e)!==e||(t=+t)!==t)return-1;for(var r,i=n;(r=this._step(n,e,t))>=0&&r!==n&&r!==i;)n=r;return r}},{key:"_step",value:function(e,t,n){var r=this.inedges,i=this.hull,a=this._hullIndex,o=this.halfedges,s=this.triangles,u=this.points;if(-1===r[e]||!u.length)return(e+1)%(u.length>>1);var A=e,c=qk(t-u[2*e],2)+qk(n-u[2*e+1],2),l=r[e],f=l;do{var h=s[f],g=qk(t-u[2*h],2)+qk(n-u[2*h+1],2);if(g<c&&(c=g,A=h),s[f=f%3===2?f-2:f+1]!==e)break;if(-1===(f=o[f])){if((f=i[(a[e]+1)%i.length])!==h&&qk(t-u[2*f],2)+qk(n-u[2*f+1],2)<c)return f;break}}while(f!==l);return A}},{key:"render",value:function(e){for(var t=null==e?e=new Tk:void 0,n=this.points,r=this.halfedges,i=this.triangles,a=0,o=r.length;a<o;++a){var s=r[a];if(!(s<a)){var u=2*i[a],A=2*i[s];e.moveTo(n[u],n[u+1]),e.lineTo(n[A],n[A+1])}}return this.renderHull(e),t&&t.value()}},{key:"renderPoints",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=null==e?e=new Tk:void 0,r=this.points,i=0,a=r.length;i<a;i+=2){var o=r[i],s=r[i+1];e.moveTo(o+t,s),e.arc(o,s,t,0,Gk)}return n&&n.value()}},{key:"renderHull",value:function(e){var t=null==e?e=new Tk:void 0,n=this.hull,r=this.points,i=2*n[0],a=n.length;e.moveTo(r[i],r[i+1]);for(var o=1;o<a;++o){var s=2*n[o];e.lineTo(r[s],r[s+1])}return e.closePath(),t&&t.value()}},{key:"hullPolygon",value:function(){var e=new Lk;return this.renderHull(e),e.value()}},{key:"renderTriangle",value:function(e,t){var n=null==t?t=new Tk:void 0,r=this.points,i=this.triangles,a=2*i[e*=3],o=2*i[e+1],s=2*i[e+2];return t.moveTo(r[a],r[a+1]),t.lineTo(r[o],r[o+1]),t.lineTo(r[s],r[s+1]),t.closePath(),n&&n.value()}},{key:"trianglePolygons",value:Y.a.mark((function e(){var t,n,r;return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.triangles,n=0,r=t.length/3;case 2:if(!(n<r)){e.next=8;break}return e.next=5,this.trianglePolygon(n);case 5:++n,e.next=2;break;case 8:case"end":return e.stop()}}),e,this)}))},{key:"trianglePolygon",value:function(e){var t=new Lk;return this.renderTriangle(e,t),t.value()}}]),e}();function Kk(e,t,n,r){for(var i=e.length,a=new Float64Array(2*i),o=0;o<i;++o){var s=e[o];a[2*o]=t.call(r,s,o,e),a[2*o+1]=n.call(r,s,o,e)}return a}function Wk(e,t,n,r){var i,a,o,s;return Y.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:i=0,a=Object(D.a)(e),u.prev=2,a.s();case 4:if((o=a.n()).done){u.next=13;break}return s=o.value,u.next=8,t.call(r,s,i,e);case 8:return u.next=10,n.call(r,s,i,e);case 10:++i;case 11:u.next=4;break;case 13:u.next=18;break;case 15:u.prev=15,u.t0=u.catch(2),a.e(u.t0);case 18:return u.prev=18,a.f(),u.finish(18);case 21:case"end":return u.stop()}}),Uk,null,[[2,15,18,21]])}function Vk(e){po.call(this,null,e)}Vk.Definition={type:"Voronoi",metadata:{modifies:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"size",type:"number",array:!0,length:2},{name:"extent",type:"array",array:!0,length:2,default:[[-1e5,-1e5],[1e5,1e5]],content:{type:"number",array:!0,length:2}},{name:"as",type:"string",default:"path"}]};var Xk=Object(R.y)(Vk,po),Zk=[-1e5,-1e5,1e5,1e5];function $k(e){for(var t=e[0][0],n=e[0][1],r=e.length-1;e[r][0]===t&&e[r][1]===n;--r);return"M"+e.slice(0,r+1).join("L")+"Z"}Xk.transform=function(e,t){var n=e.as||"path",r=t.source;if(!r||!r.length)return t;var i=e.size;i=i?[0,0,i[0],i[1]]:(i=e.extent)?[i[0][0],i[0][1],i[1][0],i[1][1]]:Zk;for(var a=this.value=zk.from(r,e.x,e.y).voronoi(i),o=0,s=r.length;o<s;++o){var u=a.cellPolygon(o);r[o][n]=u?$k(u):null}return t.reflow(e.modified()).modifies(n)};var e_=Math.PI/180,t_=function(){var e,t,n,r,i,a,o,s=[256,256],u=a_,A=[],c=Math.random,l={};function f(e,t,n){for(var r,i,a,o,A,l=t.x,f=t.y,h=Math.sqrt(s[0]*s[0]+s[1]*s[1]),g=u(s),d=c()<.5?1:-1,p=-d;(r=g(p+=d))&&(i=~~r[0],a=~~r[1],!(Math.min(Math.abs(i),Math.abs(a))>=h));)if(t.x=l+i,t.y=f+a,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>s[0]||t.y+t.y1>s[1])&&(!n||!r_(t,e,s[0]))&&(!n||(A=n,(o=t).x+o.x1>A[0].x&&o.x+o.x0<A[1].x&&o.y+o.y1>A[0].y&&o.y+o.y0<A[1].y))){for(var v,y=t.sprite,m=t.width>>5,I=s[0]>>5,b=t.x-(m<<4),E=127&b,C=32-E,B=t.y1-t.y0,w=(t.y+t.y0)*I+(b>>5),Q=0;Q<B;Q++){v=0;for(var k=0;k<=m;k++)e[w+k]|=v<<C|(k<m?(v=y[Q*m+k])>>>E:0);w+=I}return t.sprite=null,!0}return!1}return l.layout=function(){for(var u=function(e){e.width=e.height=1;var t=Math.sqrt(e.getContext("2d").getImageData(0,0,1,1).data.length>>2);e.width=2048/t,e.height=2048/t;var n=e.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:t}}(Dl()),l=function(e){var t=[],n=-1;for(;++n<e;)t[n]=0;return t}((s[0]>>5)*s[1]),h=null,g=A.length,d=-1,p=[],v=A.map((function(s){return{text:e(s),font:t(s),style:r(s),weight:i(s),rotate:a(s),size:~~(n(s)+1e-14),padding:o(s),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:s}})).sort((function(e,t){return t.size-e.size}));++d<g;){var y=v[d];y.x=s[0]*(c()+.5)>>1,y.y=s[1]*(c()+.5)>>1,n_(u,y,v,d),y.hasText&&f(l,y,h)&&(p.push(y),h?i_(h,y):h=[{x:y.x+y.x0,y:y.y+y.y0},{x:y.x+y.x1,y:y.y+y.y1}],y.x-=s[0]>>1,y.y-=s[1]>>1)}return p},l.words=function(e){return arguments.length?(A=e,l):A},l.size=function(e){return arguments.length?(s=[+e[0],+e[1]],l):s},l.font=function(e){return arguments.length?(t=o_(e),l):t},l.fontStyle=function(e){return arguments.length?(r=o_(e),l):r},l.fontWeight=function(e){return arguments.length?(i=o_(e),l):i},l.rotate=function(e){return arguments.length?(a=o_(e),l):a},l.text=function(t){return arguments.length?(e=o_(t),l):e},l.spiral=function(e){return arguments.length?(u=s_[e]||e,l):u},l.fontSize=function(e){return arguments.length?(n=o_(e),l):n},l.padding=function(e){return arguments.length?(o=o_(e),l):o},l.random=function(e){return arguments.length?(c=e,l):c},l};function n_(e,t,n,r){if(!t.sprite){var i=e.context,a=e.ratio;i.clearRect(0,0,2048/a,2048/a);var o,s,u,A,c,l=0,f=0,h=0,g=n.length;for(--r;++r<g;){if(t=n[r],i.save(),i.font=t.style+" "+t.weight+" "+~~((t.size+1)/a)+"px "+t.font,o=i.measureText(t.text+"m").width*a,u=t.size<<1,t.rotate){var d=Math.sin(t.rotate*e_),p=Math.cos(t.rotate*e_),v=o*p,y=o*d,m=u*p,I=u*d;o=Math.max(Math.abs(v+I),Math.abs(v-I))+31>>5<<5,u=~~Math.max(Math.abs(y+m),Math.abs(y-m))}else o=o+31>>5<<5;if(u>h&&(h=u),l+o>=2048&&(l=0,f+=h,h=0),f+u>=2048)break;i.translate((l+(o>>1))/a,(f+(u>>1))/a),t.rotate&&i.rotate(t.rotate*e_),i.fillText(t.text,0,0),t.padding&&(i.lineWidth=2*t.padding,i.strokeText(t.text,0,0)),i.restore(),t.width=o,t.height=u,t.xoff=l,t.yoff=f,t.x1=o>>1,t.y1=u>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,l+=o}for(var b=i.getImageData(0,0,2048/a,2048/a).data,E=[];--r>=0;)if((t=n[r]).hasText){for(s=(o=t.width)>>5,u=t.y1-t.y0,A=0;A<u*s;A++)E[A]=0;if(null==(l=t.xoff))return;f=t.yoff;var C=0,B=-1;for(c=0;c<u;c++){for(A=0;A<o;A++){var w=s*c+(A>>5),Q=b[2048*(f+c)+(l+A)<<2]?1<<31-A%32:0;E[w]|=Q,C|=Q}C?B=c:(t.y0++,u--,c--,f++)}t.y1=t.y0+B,t.sprite=E.slice(0,(t.y1-t.y0)*s)}}}function r_(e,t,n){n>>=5;for(var r,i=e.sprite,a=e.width>>5,o=e.x-(a<<4),s=127&o,u=32-s,A=e.y1-e.y0,c=(e.y+e.y0)*n+(o>>5),l=0;l<A;l++){r=0;for(var f=0;f<=a;f++)if((r<<u|(f<a?(r=i[l*a+f])>>>s:0))&t[c+f])return!0;c+=n}return!1}function i_(e,t){var n=e[0],r=e[1];t.x+t.x0<n.x&&(n.x=t.x+t.x0),t.y+t.y0<n.y&&(n.y=t.y+t.y0),t.x+t.x1>r.x&&(r.x=t.x+t.x1),t.y+t.y1>r.y&&(r.y=t.y+t.y1)}function a_(e){var t=e[0]/e[1];return function(e){return[t*(e*=.1)*Math.cos(e),e*Math.sin(e)]}}function o_(e){return"function"===typeof e?e:function(){return e}}var s_={archimedean:a_,rectangular:function(e){var t=4*e[0]/e[1],n=0,r=0;return function(e){var i=e<0?-1:1;switch(Math.sqrt(1+4*i*e)-i&3){case 0:n+=t;break;case 1:r+=4;break;case 2:n-=t;break;default:r-=4}return[n,r]}}},u_=["x","y","font","fontSize","fontStyle","fontWeight","angle"],A_=["text","font","rotate","fontSize","fontStyle","fontWeight"];function c_(e){po.call(this,t_(),e)}function l_(e){return new Uint8Array(e)}function f_(e){return new Uint16Array(e)}function h_(e){return new Uint32Array(e)}function g_(e,t,n){var r=(t<257?l_:t<65537?f_:h_)(e);return n&&r.set(n),r}c_.Definition={type:"Wordcloud",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2},{name:"font",type:"string",expr:!0,default:"sans-serif"},{name:"fontStyle",type:"string",expr:!0,default:"normal"},{name:"fontWeight",type:"string",expr:!0,default:"normal"},{name:"fontSize",type:"number",expr:!0,default:14},{name:"fontSizeRange",type:"number",array:"nullable",default:[10,50]},{name:"rotate",type:"number",expr:!0,default:0},{name:"text",type:"field"},{name:"spiral",type:"string",values:["archimedean","rectangular"]},{name:"padding",type:"number",expr:!0},{name:"as",type:"string",array:!0,length:7,default:u_}]},Object(R.y)(c_,po).transform=function(e,t){!e.size||e.size[0]&&e.size[1]||Object(R.n)("Wordcloud size dimensions must be non-zero.");var n=e.modified();if(n||t.changed(t.ADD_REM)||A_.some((function(n){var r=e[n];return Object(R.D)(r)&&t.modified(r.fields)}))){var r,i=t.materialize(t.SOURCE).source,a=this.value,o=e.as||u_,s=e.fontSize||14;if(Object(R.D)(s)?r=e.fontSizeRange:s=Object(R.l)(s),r){var u=s,A=bp("sqrt")().domain(Object(R.p)(i,u)).range(r);s=function(e){return A(u(e))}}i.forEach((function(e){e[o[0]]=NaN,e[o[1]]=NaN,e[o[3]]=0}));for(var c,l,f=a.words(i).text(e.text).size(e.size||[500,500]).padding(e.padding||1).spiral(e.spiral||"archimedean").rotate(e.rotate||0).font(e.font||"sans-serif").fontStyle(e.fontStyle||"normal").fontWeight(e.fontWeight||"normal").fontSize(s).random(Wo).layout(),h=a.size(),g=h[0]>>1,d=h[1]>>1,p=0,v=f.length;p<v;++p)(l=(c=f[p]).datum)[o[0]]=c.x+g,l[o[1]]=c.y+d,l[o[2]]=c.font,l[o[3]]=c.size,l[o[4]]=c.style,l[o[5]]=c.weight,l[o[6]]=c.rotate;return t.reflow(n).modifies(o)}};var d_=function(e,t,n){var r=1<<t;return{one:r,zero:~r,range:n.slice(),bisect:e.bisect,index:e.index,size:e.size,onAdd:function(e,t){var n,i=this.bisect(this.range,e.value),a=e.index,o=i[0],s=i[1],u=a.length;for(n=0;n<o;++n)t[a[n]]|=r;for(n=s;n<u;++n)t[a[n]]|=r;return this}}},p_=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN};var v_=function(e){var t;return 1===e.length&&(t=e,e=function(e,n){return p_(t(e),n)}),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)<0?r=a+1:i=a}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var a=r+i>>>1;e(t[a],n)>0?i=a:r=a+1}return r}}}(p_),y_=v_.right,m_=v_.left;function I_(){var e=h_(0),t=[],n=0;return{insert:function(r,i,a){if(!i.length)return[];var o,s,u,A=n,c=i.length,l=Array(c),f=h_(c);for(u=0;u<c;++u)l[u]=r(i[u]),f[u]=u;if(l=function(e,t){return e.sort.call(t,(function(t,n){var r=e[t],i=e[n];return r<i?-1:r>i?1:0})),function(e,t){return Array.from(t,(function(t){return e[t]}))}(e,t)}(l,f),A)o=t,s=e,t=Array(A+c),e=h_(A+c),function(e,t,n,r,i,a,o,s,u){var A,c=0,l=0;for(A=0;c<r&&l<o;++A)t[c]<i[l]?(s[A]=t[c],u[A]=n[c++]):(s[A]=i[l],u[A]=a[l++]+e);for(;c<r;++c,++A)s[A]=t[c],u[A]=n[c];for(;l<o;++l,++A)s[A]=i[l],u[A]=a[l]+e}(a,o,s,A,l,f,c,t,e);else{if(a>0)for(u=0;u<c;++u)f[u]+=a;t=l,e=f}return n=A+c,{index:f,value:l}},remove:function(r,i){var a,o,s,u=n;for(o=0;!i[e[o]]&&o<u;++o);for(s=o;o<u;++o)i[a=e[o]]||(e[s]=a,t[s]=t[o],++s);n=u-r},bisect:function(e,r){var i;return r?i=r.length:(r=t,i=n),[m_(r,e[0],0,i),y_(r,e[1],0,i)]},reindex:function(t){for(var r=0,i=n;r<i;++r)e[r]=t[e[r]]},index:function(){return e},size:function(){return n}}}function b_(e){po.call(this,function(){var e=8,t=[],n=h_(0),r=g_(0,e),i=g_(0,e);return{data:function(){return t},seen:function(){return e=n,r=t.length,n=e.length>=r?e:((i=i||new e.constructor(r)).set(e),i);var e,r,i},add:function(e){for(var n,r=0,i=t.length,a=e.length;r<a;++r)(n=e[r])._index=i++,t.push(n)},remove:function(e,n){var a,o,s,u=t.length,A=Array(u-e),c=t;for(o=0;!n[o]&&o<u;++o)A[o]=t[o],c[o]=o;for(s=o;o<u;++o)a=t[o],n[o]?c[o]=-1:(c[o]=s,r[s]=r[o],i[s]=i[o],A[s]=a,a._index=s++),r[o]=0;return t=A,c},size:function(){return t.length},curr:function(){return r},prev:function(){return i},reset:function(e){i[e]=r[e]},all:function(){return e<257?255:e<65537?65535:4294967295},set:function(e,t){r[e]|=t},clear:function(e,t){r[e]&=~t},resize:function(t,n){(t>r.length||n>e)&&(e=Math.max(n,e),r=g_(t,e,r),i=g_(t,e))}}}(),e),this._indices=null,this._dims=null}b_.Definition={type:"CrossFilter",metadata:{},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"query",type:"array",array:!0,required:!0,content:{type:"number",array:!0,length:2}}]};var E_=Object(R.y)(b_,po);function C_(e){po.call(this,null,e)}E_.transform=function(e,t){return this._dims?e.modified("fields")||e.fields.some((function(e){return t.modified(e.fields)}))?this.reinit(e,t):this.eval(e,t):this.init(e,t)},E_.init=function(e,t){for(var n,r,i=e.fields,a=e.query,o=this._indices={},s=this._dims=[],u=a.length,A=0;A<u;++A)r=o[n=i[A].fname]||(o[n]=I_()),s.push(d_(r,A,a[A]));return this.eval(e,t)},E_.reinit=function(e,t){var n,r,i,a,o,s,u,A,c,l=t.materialize().fork(),f=e.fields,h=e.query,g=this._indices,d=this._dims,p=this.value,v=p.curr(),y=p.prev(),m=p.all(),I=l.rem=l.add,b=l.mod,E=h.length,C={};if(y.set(v),t.rem.length&&(o=this.remove(e,t,l)),t.add.length&&p.add(t.add),t.mod.length)for(s={},u=0,A=(a=t.mod).length;u<A;++u)s[a[u]._index]=1;for(u=0;u<E;++u)c=f[u],(!d[u]||e.modified("fields",u)||t.modified(c.fields))&&((n=C[i=c.fname])||(g[i]=r=I_(),C[i]=n=r.insert(c,t.source,0)),d[u]=d_(r,u,h[u]).onAdd(n,v));for(u=0,A=p.data().length;u<A;++u)o[u]||(y[u]!==v[u]?I.push(u):s[u]&&v[u]!==m&&b.push(u));return p.mask=(1<<E)-1,l},E_.eval=function(e,t){var n=t.materialize().fork(),r=this._dims.length,i=0;return t.rem.length&&(this.remove(e,t,n),i|=(1<<r)-1),e.modified("query")&&!e.modified("fields")&&(i|=this.update(e,t,n)),t.add.length&&(this.insert(e,t,n),i|=(1<<r)-1),t.mod.length&&(this.modify(t,n),i|=(1<<r)-1),this.value.mask=i,n},E_.insert=function(e,t,n){var r,i,a,o=t.add,s=this.value,u=this._dims,A=this._indices,c=e.fields,l={},f=n.add,h=s.size(),g=h+o.length,d=u.length;s.resize(g,d),s.add(o);var p=s.curr(),v=s.prev(),y=s.all();for(r=0;r<d;++r)a=l[i=c[r].fname]||(l[i]=A[i].insert(c[r],o,h)),u[r].onAdd(a,p);for(;h<g;++h)v[h]=y,p[h]!==y&&f.push(h)},E_.modify=function(e,t){var n,r,i,a=t.mod,o=this.value,s=o.curr(),u=o.all(),A=e.mod;for(n=0,r=A.length;n<r;++n)s[i=A[n]._index]!==u&&a.push(i)},E_.remove=function(e,t,n){var r,i,a,o,s=this._indices,u=this.value,A=u.curr(),c=u.prev(),l=u.all(),f={},h=n.rem,g=t.rem;for(r=0,i=g.length;r<i;++r)f[a=g[r]._index]=1,c[a]=o=A[a],A[a]=l,o!==l&&h.push(a);for(a in s)s[a].remove(i,f);return this.reindex(t,i,f),f},E_.reindex=function(e,t,n){var r=this._indices,i=this.value;e.runAfter((function(){var e=i.remove(t,n);for(var a in r)r[a].reindex(e)}))},E_.update=function(e,t,n){var r,i,a=this._dims,o=e.query,s=t.stamp,u=a.length,A=0;for(n.filters=0,i=0;i<u;++i)e.modified("query",i)&&(r=i,++A);if(1===A)A=a[r].one,this.incrementOne(a[r],o[r],n.add,n.rem);else for(i=0,A=0;i<u;++i)e.modified("query",i)&&(A|=a[i].one,this.incrementAll(a[i],o[i],s,n.add),n.rem=n.add);return A},E_.incrementAll=function(e,t,n,r){var i,a,o,s=this.value,u=s.seen(),A=s.curr(),c=s.prev(),l=e.index(),f=e.bisect(e.range),h=e.bisect(t),g=h[0],d=h[1],p=f[0],v=f[1],y=e.one;if(g<p)for(i=g,a=Math.min(p,d);i<a;++i)u[o=l[i]]!==n&&(c[o]=A[o],u[o]=n,r.push(o)),A[o]^=y;else if(g>p)for(i=p,a=Math.min(g,v);i<a;++i)u[o=l[i]]!==n&&(c[o]=A[o],u[o]=n,r.push(o)),A[o]^=y;if(d>v)for(i=Math.max(g,v),a=d;i<a;++i)u[o=l[i]]!==n&&(c[o]=A[o],u[o]=n,r.push(o)),A[o]^=y;else if(d<v)for(i=Math.max(p,d),a=v;i<a;++i)u[o=l[i]]!==n&&(c[o]=A[o],u[o]=n,r.push(o)),A[o]^=y;e.range=t.slice()},E_.incrementOne=function(e,t,n,r){var i,a,o,s=this.value.curr(),u=e.index(),A=e.bisect(e.range),c=e.bisect(t),l=c[0],f=c[1],h=A[0],g=A[1],d=e.one;if(l<h)for(i=l,a=Math.min(h,f);i<a;++i)s[o=u[i]]^=d,n.push(o);else if(l>h)for(i=h,a=Math.min(l,g);i<a;++i)s[o=u[i]]^=d,r.push(o);if(f>g)for(i=Math.max(l,g),a=f;i<a;++i)s[o=u[i]]^=d,n.push(o);else if(f<g)for(i=Math.max(h,f),a=g;i<a;++i)s[o=u[i]]^=d,r.push(o);e.range=t.slice()},C_.Definition={type:"ResolveFilter",metadata:{},params:[{name:"ignore",type:"number",required:!0,description:"A bit mask indicating which filters to ignore."},{name:"filter",type:"object",required:!0,description:"Per-tuple filter bitmaps from a CrossFilter transform."}]},Object(R.y)(C_,po).transform=function(e,t){var n=~(e.ignore||0),r=e.filter,i=r.mask;if(0===(i&n))return t.StopPropagation;var a=t.fork(t.ALL),o=r.data(),s=r.curr(),u=r.prev(),A=function(e){return s[e]&n?null:o[e]};return a.filter(a.MOD,A),i&i-1?(a.filter(a.ADD,(function(e){var t=s[e]&n;return!t&&t^u[e]&n?o[e]:null})),a.filter(a.REM,(function(e){var t=s[e]&n;return t&&!(t^t^u[e]&n)?o[e]:null}))):(a.filter(a.ADD,A),a.filter(a.REM,(function(e){return(s[e]&n)===i?o[e]:null}))),a.filter(a.SOURCE,(function(e){return A(e._index)}))};var B_=n(1051);function w_(e,t){e&&(null==t?e.removeAttribute("aria-label"):e.setAttribute("aria-label",t))}function Q_(e,t){var n=e.globalCursor()?"undefined"!==typeof document&&document.body:e.container();if(n)return null==t?n.style.removeProperty("cursor"):n.style.cursor=t}function k_(e,t){var n=e._runtime.data;return Object(R.v)(n,t)||Object(R.n)("Unrecognized data set: "+t),n[t]}function __(e,t){Le(t)||Object(R.n)("Second argument to changes must be a changeset.");var n=k_(this,e);return n.modified=!0,this.pulse(n.input,t)}function x_(e){var t=e.padding();return Math.max(0,e._viewWidth+t.left+t.right)}function S_(e){var t=e.padding();return Math.max(0,e._viewHeight+t.top+t.bottom)}function O_(e){var t=e.padding(),n=e._origin;return[t.left+n[0],t.top+n[1]]}function D_(e){var t=O_(e),n=x_(e),r=S_(e);e._renderer.background(e.background()),e._renderer.resize(n,r,t),e._handler.origin(t),e._resizeListeners.forEach((function(t){try{t(n,r)}catch(i){e.error(i)}}))}var R_=function(e,t,n){var r,i,a,o=e._renderer,s=o&&o.canvas();return s&&(a=O_(e),i=t.changedTouches?t.changedTouches[0]:t,(r=Rh(i,s))[0]-=a[0],r[1]-=a[1]),t.dataflow=e,t.item=n,t.vega=function(e,t,n){var r=t?"group"===t.mark.marktype?t:t.mark.group:null;function i(e){var n,i=r;if(e)for(n=t;n;n=n.mark.group)if(n.mark.name===e){i=n;break}return i&&i.mark&&i.mark.interactive?i:{}}function a(e){if(!e)return n;Object(R.H)(e)&&(e=i(e));for(var t=n.slice();e;)t[0]-=e.x||0,t[1]-=e.y||0,e=e.mark&&e.mark.group;return t}return{view:Object(R.l)(e),item:Object(R.l)(t||{}),group:i,xy:a,x:function(e){return a(e)[0]},y:function(e){return a(e)[1]}}}(e,n,r),t};var j_={trap:!1};function M_(e,t,n){var r=e._eventConfig&&e._eventConfig[t];return!(!1===r||Object(R.F)(r)&&!r[n])||(e.warn("Blocked ".concat(t," ").concat(n," event listener.")),!1)}function N_(e){return e.item}function F_(e){return e.item.mark.source}function T_(e){return function(t,n){return n.vega.view().changeset().encode(n.item,e)}}var L_=function(e,t,n){var r=document.createElement(e);for(var i in t)r.setAttribute(i,t[i]);return null!=n&&(r.textContent=n),r},P_=Math.sqrt(50),U_=Math.sqrt(10),G_=Math.sqrt(2);var q_=function(e,t,n){if(t){var r=n.param,i=n.state;return i||(i=n.state={elements:null,active:!1,set:null,update:function(t){t!==e.signal(r.signal)&&e.runAsync(null,(function(){i.source=!0,e.signal(r.signal,t)}))}},r.debounce&&(i.update=Object(R.m)(r.debounce,i.update))),function(e,t,n,r){var i=L_("div",{class:"vega-bind"}),a="radio"===n.input?i:i.appendChild(L_("label"));a.appendChild(L_("span",{class:"vega-bind-name"},n.name||n.signal)),t.appendChild(i);var o=H_;switch(n.input){case"checkbox":o=Y_;break;case"select":o=J_;break;case"radio":o=z_;break;case"range":o=K_}o(e,a,n,r)}(i,t,r,e.signal(r.signal)),i.active||(e.on(e._signals[r.signal],null,(function(){i.source?i.source=!1:i.set(e.signal(r.signal))})),i.active=!0),i}};function H_(e,t,n,r){var i=L_("input");for(var a in n)"signal"!==a&&"element"!==a&&i.setAttribute("input"===a?"type":a,n[a]);i.setAttribute("name",n.signal),i.value=r,t.appendChild(i),i.addEventListener("input",(function(){return e.update(i.value)})),e.elements=[i],e.set=function(e){return i.value=e}}function Y_(e,t,n,r){var i={type:"checkbox",name:n.signal};r&&(i.checked=!0);var a=L_("input",i);t.appendChild(a),a.addEventListener("change",(function(){return e.update(a.checked)})),e.elements=[a],e.set=function(e){return a.checked=!!e||null}}function J_(e,t,n,r){var i=L_("select",{name:n.signal}),a=n.labels||[];n.options.forEach((function(e,t){var n={value:e};W_(e,r)&&(n.selected=!0),i.appendChild(L_("option",n,(a[t]||e)+""))})),t.appendChild(i),i.addEventListener("change",(function(){e.update(n.options[i.selectedIndex])})),e.elements=[i],e.set=function(e){for(var t=0,r=n.options.length;t<r;++t)if(W_(n.options[t],e))return void(i.selectedIndex=t)}}function z_(e,t,n,r){var i=L_("span",{class:"vega-bind-radio"}),a=n.labels||[];t.appendChild(i),e.elements=n.options.map((function(t,o){var s={type:"radio",name:n.signal,value:t};W_(t,r)&&(s.checked=!0);var u=L_("input",s);u.addEventListener("change",(function(){return e.update(t)}));var A=L_("label",{},(a[o]||t)+"");return A.prepend(u),i.appendChild(A),u})),e.set=function(t){for(var n=e.elements,r=n.length,i=0;i<r;++i)W_(n[i].value,t)&&(n[i].checked=!0)}}function K_(e,t,n,r){r=void 0!==r?r:(+n.max+ +n.min)/2;var i=null!=n.max?n.max:Math.max(100,+r)||100,a=n.min||Math.min(0,i,+r)||0,o=n.step||function(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=P_?i*=10:a>=U_?i*=5:a>=G_&&(i*=2),t<e?-i:i}(a,i,100),s=L_("input",{type:"range",name:n.signal,min:a,max:i,step:o});s.value=r;var u=L_("span",{},+r);t.appendChild(s),t.appendChild(u);var A=function(){u.textContent=s.value,e.update(+s.value)};s.addEventListener("input",A),s.addEventListener("change",A),e.elements=[s],e.set=function(e){s.value=e,u.textContent=e}}function W_(e,t){return e===t||e+""===t+""}var V_=function(e,t,n,r,i,a){return(t=t||new r(e.loader())).initialize(n,x_(e),S_(e),O_(e),i,a).background(e.background())},X_=function(e,t){return t?function(){try{t.apply(this,arguments)}catch(n){e.error(n)}}:null};function Z_(e,t){if("string"===typeof t){if("undefined"===typeof document)return e.error("DOM document instance not found."),null;if(!(t=document.querySelector(t)))return e.error("Signal bind element not found: "+t),null}if(t)try{t.innerHTML=""}catch(n){t=null,e.error(n)}return t}var $_=function(e){return+e||0},ex=function(e){return Object(R.F)(e)?{top:$_(e.top),bottom:$_(e.bottom),left:$_(e.left),right:$_(e.right)}:function(e){return{top:e,bottom:e,left:e,right:e}}($_(e))},tx=function(e,t,n,r){return nx.apply(this,arguments)};function nx(){return(nx=Object(Qe.a)(Y.a.mark((function e(t,n,r,i){var a,o;return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Sy(n),(o=a&&a.headless)||Object(R.n)("Unrecognized renderer type: "+n),e.next=4,t.runAsync();case 4:return e.abrupt("return",V_(t,null,null,o,r,i).renderAsync(t._scenegraph.root));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function rx(){return(rx=Object(Qe.a)(Y.a.mark((function e(t,n){var r;return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t!==_y.Canvas&&t!==_y.SVG&&t!==_y.PNG&&Object(R.n)("Unrecognized image type: "+t),e.next=3,tx(this,t,n);case 3:return r=e.sent,e.abrupt("return",t===_y.SVG?ix(r.svg(),"image/svg+xml"):r.canvas().toDataURL("image/png"));case 5:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function ix(e,t){var n=new Blob([e],{type:t});return window.URL.createObjectURL(n)}function ax(){return(ax=Object(Qe.a)(Y.a.mark((function e(t,n){var r;return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,tx(this,_y.Canvas,t,n);case 2:return r=e.sent,e.abrupt("return",r.canvas());case 4:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function ox(){return(ox=Object(Qe.a)(Y.a.mark((function e(t){var n;return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,tx(this,_y.SVG,t);case 2:return n=e.sent,e.abrupt("return",n.svg());case 4:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function sx(e){var t=this.context.data[e];return t?t.values.value:[]}var ux=function(e){return function(t,n){return this.context.dataflow.locale()[e](n)(t)}},Ax=ux("format"),cx=ux("timeFormat"),lx=ux("utcFormat"),fx=ux("timeParse"),hx=ux("utcParse"),gx=new Date(2e3,0,1);function dx(e,t,n){return Number.isInteger(e)&&Number.isInteger(t)?(gx.setYear(2e3),gx.setMonth(e),gx.setDate(t),cx.call(this,gx,n)):""}var px,vx,yx,mx,Ix;function bx(e){this.type=e}bx.prototype.visit=function(e){var t,n,r;if(e(this))return 1;for(n=0,r=(t=function(e){switch(e.type){case"ArrayExpression":return e.elements;case"BinaryExpression":case"LogicalExpression":return[e.left,e.right];case"CallExpression":var t=e.arguments.slice();return t.unshift(e.callee),t;case"ConditionalExpression":return[e.test,e.consequent,e.alternate];case"MemberExpression":return[e.object,e.property];case"ObjectExpression":return e.properties;case"Property":return[e.key,e.value];case"UnaryExpression":return[e.argument];case"Identifier":case"Literal":case"RawCode":default:return[]}}(this)).length;n<r;++n)if(t[n].visit(e))return 1};(px={})[1]="Boolean",px[2]="<end>",px[3]="Identifier",px[4]="Keyword",px[5]="Null",px[6]="Numeric",px[7]="Punctuator",px[8]="String",px[9]="RegularExpression";var Ex="ILLEGAL",Cx=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"),Bx=new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function wx(e,t){if(!e)throw new Error("ASSERT: "+t)}function Qx(e){return e>=48&&e<=57}function kx(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function _x(e){return"01234567".indexOf(e)>=0}function xx(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function Sx(e){return 10===e||13===e||8232===e||8233===e}function Ox(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&Cx.test(String.fromCharCode(e))}function Dx(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&Bx.test(String.fromCharCode(e))}var Rx={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function jx(){for(var e;yx<mx&&(xx(e=vx.charCodeAt(yx))||Sx(e));)++yx}function Mx(e){var t,n,r,i=0;for(n="u"===e?4:2,t=0;t<n;++t)yx<mx&&kx(vx[yx])?(r=vx[yx++],i=16*i+"0123456789abcdef".indexOf(r.toLowerCase())):Xx({},"Unexpected token %0",Ex);return String.fromCharCode(i)}function Nx(){var e,t,n,r;for(t=0,"}"===(e=vx[yx])&&Xx({},"Unexpected token %0",Ex);yx<mx&&kx(e=vx[yx++]);)t=16*t+"0123456789abcdef".indexOf(e.toLowerCase());return(t>1114111||"}"!==e)&&Xx({},"Unexpected token %0",Ex),t<=65535?String.fromCharCode(t):(n=55296+(t-65536>>10),r=56320+(t-65536&1023),String.fromCharCode(n,r))}function Fx(){var e,t;for(e=vx.charCodeAt(yx++),t=String.fromCharCode(e),92===e&&(117!==vx.charCodeAt(yx)&&Xx({},"Unexpected token %0",Ex),++yx,(e=Mx("u"))&&"\\"!==e&&Ox(e.charCodeAt(0))||Xx({},"Unexpected token %0",Ex),t=e);yx<mx&&Dx(e=vx.charCodeAt(yx));)++yx,t+=String.fromCharCode(e),92===e&&(t=t.substr(0,t.length-1),117!==vx.charCodeAt(yx)&&Xx({},"Unexpected token %0",Ex),++yx,(e=Mx("u"))&&"\\"!==e&&Dx(e.charCodeAt(0))||Xx({},"Unexpected token %0",Ex),t+=e);return t}function Tx(){var e,t;return e=yx,{type:1===(t=92===vx.charCodeAt(yx)?Fx():function(){var e,t;for(e=yx++;yx<mx;){if(92===(t=vx.charCodeAt(yx)))return yx=e,Fx();if(!Dx(t))break;++yx}return vx.slice(e,yx)}()).length?3:Rx.hasOwnProperty(t)?4:"null"===t?5:"true"===t||"false"===t?1:3,value:t,start:e,end:yx}}function Lx(){var e,t,n,r,i=yx,a=vx.charCodeAt(yx),o=vx[yx];switch(a){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++yx,{type:7,value:String.fromCharCode(a),start:i,end:yx};default:if(61===(e=vx.charCodeAt(yx+1)))switch(a){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return yx+=2,{type:7,value:String.fromCharCode(a)+String.fromCharCode(e),start:i,end:yx};case 33:case 61:return yx+=2,61===vx.charCodeAt(yx)&&++yx,{type:7,value:vx.slice(i,yx),start:i,end:yx}}}return">>>="===(r=vx.substr(yx,4))?{type:7,value:r,start:i,end:yx+=4}:">>>"===(n=r.substr(0,3))||"<<="===n||">>="===n?{type:7,value:n,start:i,end:yx+=3}:o===(t=n.substr(0,2))[1]&&"+-<>&|".indexOf(o)>=0||"=>"===t?{type:7,value:t,start:i,end:yx+=2}:"<>=!+-*%&|^/".indexOf(o)>=0?{type:7,value:o,start:i,end:++yx}:void Xx({},"Unexpected token %0",Ex)}function Px(){var e,t,n;if(wx(Qx((n=vx[yx]).charCodeAt(0))||"."===n,"Numeric literal must start with a decimal digit or a decimal point"),t=yx,e="","."!==n){if(e=vx[yx++],n=vx[yx],"0"===e){if("x"===n||"X"===n)return++yx,function(e){for(var t="";yx<mx&&kx(vx[yx]);)t+=vx[yx++];return 0===t.length&&Xx({},"Unexpected token %0",Ex),Ox(vx.charCodeAt(yx))&&Xx({},"Unexpected token %0",Ex),{type:6,value:parseInt("0x"+t,16),start:e,end:yx}}(t);if(_x(n))return function(e){for(var t="0"+vx[yx++];yx<mx&&_x(vx[yx]);)t+=vx[yx++];return(Ox(vx.charCodeAt(yx))||Qx(vx.charCodeAt(yx)))&&Xx({},"Unexpected token %0",Ex),{type:6,value:parseInt(t,8),octal:!0,start:e,end:yx}}(t);n&&Qx(n.charCodeAt(0))&&Xx({},"Unexpected token %0",Ex)}for(;Qx(vx.charCodeAt(yx));)e+=vx[yx++];n=vx[yx]}if("."===n){for(e+=vx[yx++];Qx(vx.charCodeAt(yx));)e+=vx[yx++];n=vx[yx]}if("e"===n||"E"===n)if(e+=vx[yx++],"+"!==(n=vx[yx])&&"-"!==n||(e+=vx[yx++]),Qx(vx.charCodeAt(yx)))for(;Qx(vx.charCodeAt(yx));)e+=vx[yx++];else Xx({},"Unexpected token %0",Ex);return Ox(vx.charCodeAt(yx))&&Xx({},"Unexpected token %0",Ex),{type:6,value:parseFloat(e),start:t,end:yx}}function Ux(){var e,t,n,r;return Ix=null,jx(),e=yx,t=function(){var e,t,n,r;for(wx("/"===(e=vx[yx]),"Regular expression literal must start with a slash"),t=vx[yx++],n=!1,r=!1;yx<mx;)if(t+=e=vx[yx++],"\\"===e)Sx((e=vx[yx++]).charCodeAt(0))&&Xx({},"Invalid regular expression: missing /"),t+=e;else if(Sx(e.charCodeAt(0)))Xx({},"Invalid regular expression: missing /");else if(n)"]"===e&&(n=!1);else{if("/"===e){r=!0;break}"["===e&&(n=!0)}return r||Xx({},"Invalid regular expression: missing /"),{value:t.substr(1,t.length-2),literal:t}}(),n=function(){var e,t,n;for(t="",n="";yx<mx&&Dx((e=vx[yx]).charCodeAt(0));)++yx,"\\"===e&&yx<mx?Xx({},"Unexpected token %0",Ex):(n+=e,t+=e);return n.search(/[^gimuy]/g)>=0&&Xx({},"Invalid regular expression",n),{value:n,literal:t}}(),r=function(e,t){var n=e;t.indexOf("u")>=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}/g,(function(e,t){if(parseInt(t,16)<=1114111)return"x";Xx({},"Invalid regular expression")})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(n)}catch(r){Xx({},"Invalid regular expression")}try{return new RegExp(e,t)}catch(i){return null}}(t.value,n.value),{literal:t.literal+n.literal,value:r,regex:{pattern:t.value,flags:n.value},start:e,end:yx}}function Gx(){var e;return jx(),yx>=mx?{type:2,start:yx,end:yx}:Ox(e=vx.charCodeAt(yx))?Tx():40===e||41===e||59===e?Lx():39===e||34===e?function(){var e,t,n,r,i="",a=!1;for(wx("'"===(e=vx[yx])||'"'===e,"String literal must starts with a quote"),t=yx,++yx;yx<mx;){if((n=vx[yx++])===e){e="";break}if("\\"===n)if((n=vx[yx++])&&Sx(n.charCodeAt(0)))"\r"===n&&"\n"===vx[yx]&&++yx;else switch(n){case"u":case"x":"{"===vx[yx]?(++yx,i+=Nx()):i+=Mx(n);break;case"n":i+="\n";break;case"r":i+="\r";break;case"t":i+="\t";break;case"b":i+="\b";break;case"f":i+="\f";break;case"v":i+="\v";break;default:_x(n)?(0!==(r="01234567".indexOf(n))&&(a=!0),yx<mx&&_x(vx[yx])&&(a=!0,r=8*r+"01234567".indexOf(vx[yx++]),"0123".indexOf(n)>=0&&yx<mx&&_x(vx[yx])&&(r=8*r+"01234567".indexOf(vx[yx++]))),i+=String.fromCharCode(r)):i+=n}else{if(Sx(n.charCodeAt(0)))break;i+=n}}return""!==e&&Xx({},"Unexpected token %0",Ex),{type:8,value:i,octal:a,start:t,end:yx}}():46===e?Qx(vx.charCodeAt(yx+1))?Px():Lx():Qx(e)?Px():Lx()}function qx(){var e;return yx=(e=Ix).end,Ix=Gx(),yx=e.end,e}function Hx(){var e;e=yx,Ix=Gx(),yx=e}function Yx(e,t,n){var r=new bx("||"===e||"&&"===e?"LogicalExpression":"BinaryExpression");return r.operator=e,r.left=t,r.right=n,r}function Jx(e,t){var n=new bx("CallExpression");return n.callee=e,n.arguments=t,n}function zx(e){var t=new bx("Identifier");return t.name=e,t}function Kx(e){var t=new bx("Literal");return t.value=e.value,t.raw=vx.slice(e.start,e.end),e.regex&&("//"===t.raw&&(t.raw="/(?:)/"),t.regex=e.regex),t}function Wx(e,t,n){var r=new bx("MemberExpression");return r.computed="["===e,r.object=t,r.property=n,r.computed||(n.member=!0),r}function Vx(e,t,n){var r=new bx("Property");return r.key=t,r.value=n,r.kind=e,r}function Xx(e,t){var n,r=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,(function(e,t){return wx(t<r.length,"Message reference must be in range"),r[t]}));throw(n=new Error(i)).index=yx,n.description=i,n}function Zx(e){2===e.type&&Xx(e,"Unexpected end of input"),6===e.type&&Xx(e,"Unexpected number"),8===e.type&&Xx(e,"Unexpected string"),3===e.type&&Xx(e,"Unexpected identifier"),4===e.type&&Xx(e,"Unexpected reserved word"),Xx(e,"Unexpected token %0",e.value)}function $x(e){var t=qx();7===t.type&&t.value===e||Zx(t)}function eS(e){return 7===Ix.type&&Ix.value===e}function tS(e){return 4===Ix.type&&Ix.value===e}function nS(){var e=[];for(yx=Ix.start,$x("[");!eS("]");)eS(",")?(qx(),e.push(null)):(e.push(gS()),eS("]")||$x(","));return qx(),function(e){var t=new bx("ArrayExpression");return t.elements=e,t}(e)}function rS(){var e;return yx=Ix.start,8===(e=qx()).type||6===e.type?(e.octal&&Xx(e,"Octal literals are not allowed in strict mode."),Kx(e)):zx(e.value)}function iS(){var e,t,n;return yx=Ix.start,3===(e=Ix).type?(n=rS(),$x(":"),Vx("init",n,gS())):2!==e.type&&7!==e.type?(t=rS(),$x(":"),Vx("init",t,gS())):void Zx(e)}function aS(){var e,t,n=[],r={},i=String;for(yx=Ix.start,$x("{");!eS("}");)t="$"+("Identifier"===(e=iS()).key.type?e.key.name:i(e.key.value)),Object.prototype.hasOwnProperty.call(r,t)?Xx({},"Duplicate data property in object literal not allowed in strict mode"):r[t]=!0,n.push(e),eS("}")||$x(",");return $x("}"),function(e){var t=new bx("ObjectExpression");return t.properties=e,t}(n)}var oS={if:1};function sS(){var e,t,n;if(eS("("))return function(){var e;return $x("("),e=dS(),$x(")"),e}();if(eS("["))return nS();if(eS("{"))return aS();if(e=Ix.type,yx=Ix.start,3===e||oS[Ix.value])n=zx(qx().value);else if(8===e||6===e)Ix.octal&&Xx(Ix,"Octal literals are not allowed in strict mode."),n=Kx(qx());else{if(4===e)throw new Error("Disabled.");1===e?((t=qx()).value="true"===t.value,n=Kx(t)):5===e?((t=qx()).value=null,n=Kx(t)):eS("/")||eS("/=")?(n=Kx(Ux()),Hx()):Zx(qx())}return n}function uS(){var e=[];if($x("("),!eS(")"))for(;yx<mx&&(e.push(gS()),!eS(")"));)$x(",");return $x(")"),e}function AS(){return $x("."),function(){var e;return yx=Ix.start,function(e){return 3===e.type||4===e.type||1===e.type||5===e.type}(e=qx())||Zx(e),zx(e.value)}()}function cS(){var e;return $x("["),e=dS(),$x("]"),e}function lS(){var e=function(){var e;for(e=sS();;)if(eS("."))e=Wx(".",e,AS());else if(eS("("))e=Jx(e,uS());else{if(!eS("["))break;e=Wx("[",e,cS())}return e}();if(7===Ix.type&&(eS("++")||eS("--")))throw new Error("Disabled.");return e}function fS(){var e,t;if(7!==Ix.type&&4!==Ix.type)t=lS();else{if(eS("++")||eS("--"))throw new Error("Disabled.");if(eS("+")||eS("-")||eS("~")||eS("!"))e=qx(),t=fS(),t=function(e,t){var n=new bx("UnaryExpression");return n.operator=e,n.argument=t,n.prefix=!0,n}(e.value,t);else{if(tS("delete")||tS("void")||tS("typeof"))throw new Error("Disabled.");t=lS()}}return t}function hS(e){var t=0;if(7!==e.type&&4!==e.type)return 0;switch(e.value){case"||":t=1;break;case"&&":t=2;break;case"|":t=3;break;case"^":t=4;break;case"&":t=5;break;case"==":case"!=":case"===":case"!==":t=6;break;case"<":case">":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11}return t}function gS(){var e,t;return e=function(){var e,t,n,r,i,a,o,s,u,A;if(e=Ix,u=fS(),0===(i=hS(r=Ix)))return u;for(r.prec=i,qx(),t=[e,Ix],a=[u,r,o=fS()];(i=hS(Ix))>0;){for(;a.length>2&&i<=a[a.length-2].prec;)o=a.pop(),s=a.pop().value,u=a.pop(),t.pop(),n=Yx(s,u,o),a.push(n);(r=qx()).prec=i,a.push(r),t.push(Ix),n=fS(),a.push(n)}for(n=a[A=a.length-1],t.pop();A>1;)t.pop(),n=Yx(a[A-1].value,a[A-2],n),A-=2;return n}(),eS("?")&&(qx(),t=gS(),$x(":"),e=function(e,t,n){var r=new bx("ConditionalExpression");return r.test=e,r.consequent=t,r.alternate=n,r}(e,t,gS())),e}function dS(){var e=gS();if(eS(","))throw new Error("Disabled.");return e}var pS=function(e){yx=0,mx=(vx=e).length,Ix=null,Hx();var t=dS();if(2!==Ix.type)throw new Error("Unexpect token after expression.");return t},vS={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"},yS=function(e){function t(t,n,r){return function(i){return function(t,n,r,i){var a=e(n[0]);return r&&(a=r+"("+a+")",0===r.lastIndexOf("new ",0)&&(a="("+a+")")),a+"."+t+(i<0?"":0===i?"()":"("+n.slice(1).map(e).join(",")+")")}(t,i,n,r)}}var n="new Date";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(t){t.length<3&&Object(R.n)("Missing arguments to clamp function."),t.length>3&&Object(R.n)("Too many arguments to clamp function.");var n=t.map(e);return"Math.max("+n[1]+", Math.min("+n[2]+","+n[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:n,date:t("getDate",n,0),day:t("getDay",n,0),year:t("getFullYear",n,0),month:t("getMonth",n,0),hours:t("getHours",n,0),minutes:t("getMinutes",n,0),seconds:t("getSeconds",n,0),milliseconds:t("getMilliseconds",n,0),time:t("getTime",n,0),timezoneoffset:t("getTimezoneOffset",n,0),utcdate:t("getUTCDate",n,0),utcday:t("getUTCDay",n,0),utcyear:t("getUTCFullYear",n,0),utcmonth:t("getUTCMonth",n,0),utchours:t("getUTCHours",n,0),utcminutes:t("getUTCMinutes",n,0),utcseconds:t("getUTCSeconds",n,0),utcmilliseconds:t("getUTCMilliseconds",n,0),length:t("length",null,-1),join:t("join",null),indexof:t("indexOf",null),lastindexof:t("lastIndexOf",null),slice:t("slice",null),reverse:function(t){return"("+e(t[0])+").slice().reverse()"},parseFloat:"parseFloat",parseInt:"parseInt",upper:t("toUpperCase","String",0),lower:t("toLowerCase","String",0),substring:t("substring","String"),split:t("split","String"),replace:t("replace","String"),trim:t("trim","String",0),regexp:"RegExp",test:t("test","RegExp"),if:function(t){t.length<3&&Object(R.n)("Missing arguments to if function."),t.length>3&&Object(R.n)("Too many arguments to if function.");var n=t.map(e);return"("+n[0]+"?"+n[1]+":"+n[2]+")"}}};function mS(e,t,n,r){"Literal"!==t[0].type&&Object(R.n)("First argument to data functions must be a string literal.");var i=t[0].value,a=":"+i;if(!Object(R.v)(a,r))try{r[a]=n.getData(i).tuplesRef()}catch(o){}}function IS(e,t,n,r){if("Literal"===t[0].type)bS(n,r,t[0].value);else for(e in n.scales)bS(n,r,e)}function bS(e,t,n){var r="%"+n;if(!Object(R.v)(t,r))try{t[r]=e.scaleRef(n)}catch(i){}}function ES(e,t){var n;return Object(R.D)(e)?e:Object(R.H)(e)?(n=t.scales[e])&&n.value:void 0}var CS=function(){return new BS};function BS(){this.reset()}BS.prototype={constructor:BS,reset:function(){this.s=this.t=0},add:function(e){QS(wS,e,this.t),QS(this,wS.s,this.s),this.s?this.t+=wS.t:this.s=wS.t},valueOf:function(){return this.s}};var wS=new BS;function QS(e,t,n){var r=e.s=t+n,i=r-t,a=r-i;e.t=t-a+(n-i)}var kS=Math.PI,_S=kS/2,xS=kS/4,SS=2*kS,OS=180/kS,DS=kS/180,RS=Math.abs,jS=(Math.atan,Math.atan2),MS=Math.cos,NS=(Math.ceil,Math.exp,Math.floor,Math.log,Math.pow,Math.sin),FS=(Math.sign,Math.sqrt);Math.tan;function TS(e){return e>1?_S:e<-1?-_S:Math.asin(e)}function LS(){}function PS(e,t){e&&GS.hasOwnProperty(e.type)&&GS[e.type](e,t)}var US={Feature:function(e,t){PS(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)PS(n[r].geometry,t)}},GS={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){qS(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)qS(n[r],t,0)},Polygon:function(e,t){HS(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)HS(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)PS(n[r],t)}};function qS(e,t,n){var r,i=-1,a=e.length-n;for(t.lineStart();++i<a;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function HS(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)qS(e[n],t,1);t.polygonEnd()}var YS,JS,zS,KS,WS,VS=function(e,t){e&&US.hasOwnProperty(e.type)?US[e.type](e,t):PS(e,t)},XS=CS(),ZS=CS(),$S={point:LS,lineStart:LS,lineEnd:LS,polygonStart:function(){XS.reset(),$S.lineStart=eO,$S.lineEnd=tO},polygonEnd:function(){var e=+XS;ZS.add(e<0?SS+e:e),this.lineStart=this.lineEnd=this.point=LS},sphere:function(){ZS.add(SS)}};function eO(){$S.point=nO}function tO(){rO(YS,JS)}function nO(e,t){$S.point=rO,YS=e,JS=t,zS=e*=DS,KS=MS(t=(t*=DS)/2+xS),WS=NS(t)}function rO(e,t){var n=(e*=DS)-zS,r=n>=0?1:-1,i=r*n,a=MS(t=(t*=DS)/2+xS),o=NS(t),s=WS*o,u=KS*a+s*MS(i),A=s*r*NS(i);XS.add(jS(A,u)),zS=e,KS=a,WS=o}function iO(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}var aO,oO,sO,uO,AO,cO,lO,fO,hO,gO,dO=CS(),pO={point:vO,lineStart:mO,lineEnd:IO,polygonStart:function(){pO.point=bO,pO.lineStart=EO,pO.lineEnd=CO,dO.reset(),$S.polygonStart()},polygonEnd:function(){$S.polygonEnd(),pO.point=vO,pO.lineStart=mO,pO.lineEnd=IO,XS<0?(aO=-(sO=180),oO=-(uO=90)):dO>1e-6?uO=90:dO<-1e-6&&(oO=-90),gO[0]=aO,gO[1]=sO},sphere:function(){aO=-(sO=180),oO=-(uO=90)}};function vO(e,t){hO.push(gO=[aO=e,sO=e]),t<oO&&(oO=t),t>uO&&(uO=t)}function yO(e,t){var n,r=function(e){var t=e[0],n=e[1],r=MS(n);return[r*MS(t),r*NS(t),NS(n)]}([e*DS,t*DS]);if(fO){var i=iO(fO,r),a=iO([i[1],-i[0],0],i);!function(e){var t=FS(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}(a),a=[jS((n=a)[1],n[0]),TS(n[2])];var o,s=e-AO,u=s>0?1:-1,A=a[0]*OS*u,c=RS(s)>180;c^(u*AO<A&&A<u*e)?(o=a[1]*OS)>uO&&(uO=o):c^(u*AO<(A=(A+360)%360-180)&&A<u*e)?(o=-a[1]*OS)<oO&&(oO=o):(t<oO&&(oO=t),t>uO&&(uO=t)),c?e<AO?BO(aO,e)>BO(aO,sO)&&(sO=e):BO(e,sO)>BO(aO,sO)&&(aO=e):sO>=aO?(e<aO&&(aO=e),e>sO&&(sO=e)):e>AO?BO(aO,e)>BO(aO,sO)&&(sO=e):BO(e,sO)>BO(aO,sO)&&(aO=e)}else hO.push(gO=[aO=e,sO=e]);t<oO&&(oO=t),t>uO&&(uO=t),fO=r,AO=e}function mO(){pO.point=yO}function IO(){gO[0]=aO,gO[1]=sO,pO.point=vO,fO=null}function bO(e,t){if(fO){var n=e-AO;dO.add(RS(n)>180?n+(n>0?360:-360):n)}else cO=e,lO=t;$S.point(e,t),yO(e,t)}function EO(){$S.lineStart()}function CO(){bO(cO,lO),$S.lineEnd(),RS(dO)>1e-6&&(aO=-(sO=180)),gO[0]=aO,gO[1]=sO,fO=null}function BO(e,t){return(t-=e)<0?t+360:t}function wO(e,t){return e[0]-t[0]}function QO(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}var kO,_O,xO,SO,OO,DO,RO,jO,MO,NO,FO,TO,LO,PO,UO,GO,qO={sphere:LS,point:HO,lineStart:JO,lineEnd:WO,polygonStart:function(){qO.lineStart=VO,qO.lineEnd=XO},polygonEnd:function(){qO.lineStart=JO,qO.lineEnd=WO}};function HO(e,t){e*=DS;var n=MS(t*=DS);YO(n*MS(e),n*NS(e),NS(t))}function YO(e,t,n){++kO,xO+=(e-xO)/kO,SO+=(t-SO)/kO,OO+=(n-OO)/kO}function JO(){qO.point=zO}function zO(e,t){e*=DS;var n=MS(t*=DS);PO=n*MS(e),UO=n*NS(e),GO=NS(t),qO.point=KO,YO(PO,UO,GO)}function KO(e,t){e*=DS;var n=MS(t*=DS),r=n*MS(e),i=n*NS(e),a=NS(t),o=jS(FS((o=UO*a-GO*i)*o+(o=GO*r-PO*a)*o+(o=PO*i-UO*r)*o),PO*r+UO*i+GO*a);_O+=o,DO+=o*(PO+(PO=r)),RO+=o*(UO+(UO=i)),jO+=o*(GO+(GO=a)),YO(PO,UO,GO)}function WO(){qO.point=HO}function VO(){qO.point=ZO}function XO(){$O(TO,LO),qO.point=HO}function ZO(e,t){TO=e,LO=t,e*=DS,t*=DS,qO.point=$O;var n=MS(t);PO=n*MS(e),UO=n*NS(e),GO=NS(t),YO(PO,UO,GO)}function $O(e,t){e*=DS;var n=MS(t*=DS),r=n*MS(e),i=n*NS(e),a=NS(t),o=UO*a-GO*i,s=GO*r-PO*a,u=PO*i-UO*r,A=FS(o*o+s*s+u*u),c=TS(A),l=A&&-c/A;MO+=l*o,NO+=l*s,FO+=l*u,_O+=c,DO+=c*(PO+(PO=r)),RO+=c*(UO+(UO=i)),jO+=c*(GO+(GO=a)),YO(PO,UO,GO)}function eD(e,t){return function(n,r,i){if(n){var a=ES(n,(i||this).context);return a&&a.path[e](r)}return t(r)}}var tD=eD("area",(function(e){return ZS.reset(),VS(e,$S),2*ZS})),nD=eD("bounds",(function(e){var t,n,r,i,a,o,s;if(uO=sO=-(aO=oO=1/0),hO=[],VS(e,pO),n=hO.length){for(hO.sort(wO),t=1,a=[r=hO[0]];t<n;++t)QO(r,(i=hO[t])[0])||QO(r,i[1])?(BO(r[0],i[1])>BO(r[0],r[1])&&(r[1]=i[1]),BO(i[0],r[1])>BO(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,t=0,r=a[n=a.length-1];t<=n;r=i,++t)i=a[t],(s=BO(r[1],i[0]))>o&&(o=s,aO=i[0],sO=r[1])}return hO=gO=null,aO===1/0||oO===1/0?[[NaN,NaN],[NaN,NaN]]:[[aO,oO],[sO,uO]]})),rD=eD("centroid",(function(e){kO=_O=xO=SO=OO=DO=RO=jO=MO=NO=FO=0,VS(e,qO);var t=MO,n=NO,r=FO,i=t*t+n*n+r*r;return i<1e-12&&(t=DO,n=RO,r=jO,_O<1e-6&&(t=xO,n=SO,r=OO),(i=t*t+n*n+r*r)<1e-12)?[NaN,NaN]:[jS(n,t)*OS,TS(r/FS(i))*OS]}));function iD(e,t,n){try{e[t].apply(e,["EXPRESSION"].concat([].slice.call(n)))}catch(r){e.warn(r)}return n[n.length-1]}var aD=function(e,t,n){e.prototype=t.prototype=n,n.constructor=e};function oD(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function sD(){}var uD="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",AD="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",cD=/^#([0-9a-f]{3,8})$/,lD=new RegExp("^rgb\\("+["\\s*([+-]?\\d+)\\s*","\\s*([+-]?\\d+)\\s*","\\s*([+-]?\\d+)\\s*"]+"\\)$"),fD=new RegExp("^rgb\\("+[AD,AD,AD]+"\\)$"),hD=new RegExp("^rgba\\("+["\\s*([+-]?\\d+)\\s*","\\s*([+-]?\\d+)\\s*","\\s*([+-]?\\d+)\\s*",uD]+"\\)$"),gD=new RegExp("^rgba\\("+[AD,AD,AD,uD]+"\\)$"),dD=new RegExp("^hsl\\("+[uD,AD,AD]+"\\)$"),pD=new RegExp("^hsla\\("+[uD,AD,AD,uD]+"\\)$"),vD={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,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,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,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,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,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};function yD(){return this.rgb().formatHex()}function mD(){return this.rgb().formatRgb()}function ID(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=cD.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?bD(t):3===n?new wD(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ED(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ED(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=lD.exec(e))?new wD(t[1],t[2],t[3],1):(t=fD.exec(e))?new wD(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=hD.exec(e))?ED(t[1],t[2],t[3],t[4]):(t=gD.exec(e))?ED(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=dD.exec(e))?xD(t[1],t[2]/100,t[3]/100,1):(t=pD.exec(e))?xD(t[1],t[2]/100,t[3]/100,t[4]):vD.hasOwnProperty(e)?bD(vD[e]):"transparent"===e?new wD(NaN,NaN,NaN,0):null}function bD(e){return new wD(e>>16&255,e>>8&255,255&e,1)}function ED(e,t,n,r){return r<=0&&(e=t=n=NaN),new wD(e,t,n,r)}function CD(e){return e instanceof sD||(e=ID(e)),e?new wD((e=e.rgb()).r,e.g,e.b,e.opacity):new wD}function BD(e,t,n,r){return 1===arguments.length?CD(e):new wD(e,t,n,null==r?1:r)}function wD(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function QD(){return"#"+_D(this.r)+_D(this.g)+_D(this.b)}function kD(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function _D(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function xD(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new DD(e,t,n,r)}function SD(e){if(e instanceof DD)return new DD(e.h,e.s,e.l,e.opacity);if(e instanceof sD||(e=ID(e)),!e)return new DD;if(e instanceof DD)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(o=t===a?(n-r)/s+6*(n<r):n===a?(r-t)/s+2:(t-n)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new DD(o,s,u,e.opacity)}function OD(e,t,n,r){return 1===arguments.length?SD(e):new DD(e,t,n,null==r?1:r)}function DD(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function RD(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function jD(e){var t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function MD(e){var t=BD(e);return.2126*jD(t.r)+.7152*jD(t.g)+.0722*jD(t.b)}aD(sD,ID,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:yD,formatHex:yD,formatHsl:function(){return SD(this).formatHsl()},formatRgb:mD,toString:mD}),aD(wD,BD,oD(sD,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new wD(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new wD(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:QD,formatHex:QD,formatRgb:kD,toString:kD})),aD(DD,OD,oD(sD,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new DD(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new DD(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new wD(RD(e>=240?e-240:e+120,i,r),RD(e,i,r),RD(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));function ND(e,t){return e===t||e!==e&&t!==t||(Object(R.A)(e)?!(!Object(R.A)(t)||e.length!==t.length)&&function(e,t){for(var n=0,r=e.length;n<r;++n)if(!ND(e[n],t[n]))return!1;return!0}(e,t):!(!Object(R.F)(e)||!Object(R.F)(t))&&FD(e,t))}function FD(e,t){for(var n in e)if(!ND(e[n],t[n]))return!1;return!0}function TD(e){return function(t){return FD(e,t)}}var LD=function(e){return e.data};function PD(e,t){var n=sx.call(t,e);return n.root&&n.root.lookup||{}}var UD=function(){return"undefined"!==typeof window&&window||null};function GD(e,t){for(var n,r,i=t.fields,a=t.values,o=i.length,s=0;s<o;++s)if((r=i[s]).getter=R.t.getter||Object(R.t)(r.field),n=r.getter(e),Object(R.C)(n)&&(n=Object(R.cb)(n)),Object(R.C)(a[s])&&(a[s]=Object(R.cb)(a[s])),Object(R.C)(a[s][0])&&(a[s]=a[s].map(R.cb)),"E"===r.type){if(Object(R.A)(a[s])?a[s].indexOf(n)<0:n!==a[s])return!1}else if("R"===r.type){if(!Object(R.z)(n,a[s]))return!1}else if("R-RE"===r.type){if(!Object(R.z)(n,a[s],!0,!1))return!1}else if("R-E"===r.type){if(!Object(R.z)(n,a[s],!1,!1))return!1}else if("R-LE"===r.type&&!Object(R.z)(n,a[s],!1,!0))return!1;return!0}var qD={E_union:function(e,t){if(!e.length)return t;for(var n=0,r=t.length;n<r;++n)e.indexOf(t[n])<0&&e.push(t[n]);return e},E_intersect:function(e,t){return e.length?e.filter((function(e){return t.indexOf(e)>=0})):t},R_union:function(e,t){var n=Object(R.cb)(t[0]),r=Object(R.cb)(t[1]);return n>r&&(n=t[1],r=t[0]),e.length?(e[0]>n&&(e[0]=n),e[1]<r&&(e[1]=r),e):[n,r]},R_intersect:function(e,t){var n=Object(R.cb)(t[0]),r=Object(R.cb)(t[1]);return n>r&&(n=t[1],r=t[0]),e.length?r<e[0]||e[1]<n?[]:(e[0]<n&&(e[0]=n),e[1]>r&&(e[1]=r),e):[n,r]}};function HD(e,t,n,r){"Literal"!==t[0].type&&Object(R.n)("First argument to selection functions must be a string literal.");var i=t[0].value,a=":"+i;"intersect"!==(t.length>=2&&Object(R.U)(t).value)||Object(R.v)(r,"@unit")||(r["@unit"]=n.getData(i).indataRef(n,"unit")),Object(R.v)(r,a)||(r[a]=n.getData(i).tuplesRef())}var YD=Math.PI/180,JD=180/Math.PI;function zD(e){if(e instanceof WD)return new WD(e.l,e.a,e.b,e.opacity);if(e instanceof nR)return rR(e);e instanceof wD||(e=CD(e));var t,n,r=$D(e.r),i=$D(e.g),a=$D(e.b),o=VD((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?t=n=o:(t=VD((.4360747*r+.3850649*i+.1430804*a)/.96422),n=VD((.0139322*r+.0971045*i+.7141733*a)/.82521)),new WD(116*o-16,500*(t-o),200*(o-n),e.opacity)}function KD(e,t,n,r){return 1===arguments.length?zD(e):new WD(e,t,n,null==r?1:r)}function WD(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function VD(e){return e>6/29*(6/29)*(6/29)?Math.pow(e,1/3):e/(6/29*3*(6/29))+4/29}function XD(e){return e>6/29?e*e*e:6/29*3*(6/29)*(e-4/29)}function ZD(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function $D(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function eR(e){if(e instanceof nR)return new nR(e.h,e.c,e.l,e.opacity);if(e instanceof WD||(e=zD(e)),0===e.a&&0===e.b)return new nR(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*JD;return new nR(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function tR(e,t,n,r){return 1===arguments.length?eR(e):new nR(e,t,n,null==r?1:r)}function nR(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function rR(e){if(isNaN(e.h))return new WD(e.l,0,0,e.opacity);var t=e.h*YD;return new WD(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}aD(WD,KD,oD(sD,{brighter:function(e){return new WD(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new WD(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new wD(ZD(3.1338561*(t=.96422*XD(t))-1.6168667*(e=1*XD(e))-.4906146*(n=.82521*XD(n))),ZD(-.9787684*t+1.9161415*e+.033454*n),ZD(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),aD(nR,tR,oD(sD,{brighter:function(e){return new nR(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new nR(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return rR(this).rgb()}}));var iR={random:function(){return Wo()},cumulativeNormal:os,cumulativeLogNormal:fs,cumulativeUniform:ys,densityNormal:as,densityLogNormal:ls,densityUniform:vs,quantileNormal:ss,quantileLogNormal:hs,quantileUniform:ms,sampleNormal:is,sampleLogNormal:cs,sampleUniform:ps,isArray:R.A,isBoolean:R.B,isDate:R.C,isDefined:function(e){return void 0!==e},isNumber:R.E,isObject:R.F,isRegExp:R.G,isString:R.H,isTuple:Oe,isValid:function(e){return null!=e&&e===e},toBoolean:R.ab,toDate:R.bb,toNumber:R.cb,toString:R.eb,flush:R.u,lerp:R.J,merge:function(){var e=[].slice.call(arguments);return e.unshift({}),R.o.apply(null,e)},pad:R.P,peek:R.U,span:R.X,inrange:R.z,truncate:R.fb,rgb:BD,lab:KD,hcl:tR,hsl:OD,luminance:MD,contrast:function(e,t){var n=MD(e),r=MD(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},sequence:function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(i);++r<i;)a[r]=e+r*n;return a},format:Ax,utcFormat:lx,utcParse:hx,utcOffset:Vr,utcSequence:$r,timeFormat:cx,timeParse:fx,timeOffset:Wr,timeSequence:Zr,timeUnitSpecifier:Qn,monthFormat:function(e){return dx.call(this,e,1,"%B")},monthAbbrevFormat:function(e){return dx.call(this,e,1,"%b")},dayFormat:function(e){return dx.call(this,0,2+e,"%A")},dayAbbrevFormat:function(e){return dx.call(this,0,2+e,"%a")},quarter:R.V,utcquarter:R.hb,week:rr,utcweek:Ar,dayofyear:nr,utcdayofyear:ur,warn:function(){return iD(this.context.dataflow,"warn",arguments)},info:function(){return iD(this.context.dataflow,"info",arguments)},debug:function(){return iD(this.context.dataflow,"debug",arguments)},extent:R.p,inScope:function(e){var t=this.context.group,n=!1;if(t)for(;e;){if(e===t){n=!0;break}e=e.mark.group}return n},intersect:function(e,t,n){if(!e)return[];var r=Object(ks.a)(e,2),i=r[0],a=r[1],o=(new _l).set(i[0],i[1],a[0],a[1]);return Oy(n||this.context.dataflow.scenegraph().root,o,function(e){var t=null;if(e){var n=Object(R.i)(e.marktype),r=Object(R.i)(e.markname);t=function(e){return(!n.length||n.some((function(t){return e.marktype===t})))&&(!r.length||r.some((function(t){return e.name===t})))}}return t}(t))},clampRange:R.j,pinchDistance:function(e){var t=e.touches,n=t[0].clientX-t[1].clientX,r=t[0].clientY-t[1].clientY;return Math.sqrt(n*n+r*r)},pinchAngle:function(e){var t=e.touches;return Math.atan2(t[0].clientY-t[1].clientY,t[0].clientX-t[1].clientX)},screen:function(){var e=UD();return e?e.screen:{}},containerSize:function(){var e=this.context.dataflow,t=e.container&&e.container();return t?[t.clientWidth,t.clientHeight]:[void 0,void 0]},windowSize:function(){var e=UD();return e?[e.innerWidth,e.innerHeight]:[void 0,void 0]},bandspace:function(e,t,n){return og(e||0,t||0,n||0)},setdata:function(e,t){var n=this.context.dataflow,r=this.context.data[e].input;return n.pulse(r,n.changeset().remove(R.gb).insert(t)),1},pathShape:function(e){var t=null;return function(n){return n?Oc(n,t=t||Ic(e)):e}},panLinear:R.Q,panLog:R.R,panPow:R.S,panSymlog:R.T,zoomLinear:R.lb,zoomLog:R.mb,zoomPow:R.nb,zoomSymlog:R.ob,encode:function(e,t,n){if(e){var r=this.context.dataflow,i=e.mark.source;r.pulse(i,r.changeset().encode(e,t))}return void 0!==n?n:e},modify:function(e,t,n,r,i,a){var o,s,u=this.context.dataflow,A=this.context.data[e],c=A.input,l=A.changes,f=u.stamp();if(!1===u._trigger||!(c.value.length||t||r))return 0;if((!l||l.stamp<f)&&(A.changes=l=u.changeset(),l.stamp=f,u.runAfter((function(){A.modified=!0,u.pulse(c,l).run()}),!0,1)),n&&(o=!0===n?R.gb:Object(R.A)(n)||Oe(n)?n:TD(n),l.remove(o)),t&&l.insert(t),r&&(o=TD(r),c.value.some(o)?l.remove(o):l.insert(r)),i)for(s in a)l.modify(i,s,a[s]);return 1}},aR=["view","item","group","xy","x","y"],oR={};function sR(e,t,n){return 1===arguments.length?iR[e]:(iR[e]=t,n&&(oR[e]=n),AR&&(AR.functions[e]="this."+e),this)}sR("bandwidth",(function(e,t){var n=ES(e,(t||this).context);return n&&n.bandwidth?n.bandwidth():0}),IS),sR("copy",(function(e,t){var n=ES(e,(t||this).context);return n?n.copy():void 0}),IS),sR("domain",(function(e,t){var n=ES(e,(t||this).context);return n?n.domain():[]}),IS),sR("range",(function(e,t){var n=ES(e,(t||this).context);return n&&n.range?n.range():[]}),IS),sR("invert",(function(e,t,n){var r=ES(e,(n||this).context);return r?Object(R.A)(t)?(r.invertRange||r.invert)(t):(r.invert||r.invertExtent)(t):void 0}),IS),sR("scale",(function(e,t,n){var r=ES(e,(n||this).context);return r?r(t):void 0}),IS),sR("gradient",(function(e,t,n,r,i){e=ES(e,(i||this).context);var a=CA(t,n),o=e.domain(),s=o[0],u=Object(R.U)(o),A=R.x;return u-s?A=Qv(e,s,u):e=(e.interpolator?bp("sequential")().interpolator(e.interpolator()):bp("linear")().interpolate(e.interpolate()).range(e.range())).domain([s=0,u=1]),e.ticks&&(s!==(o=e.ticks(+r||15))[0]&&o.unshift(s),u!==Object(R.U)(o)&&o.push(u)),o.forEach((function(t){return a.stop(A(t),e(t))})),a}),IS),sR("geoArea",tD,IS),sR("geoBounds",nD,IS),sR("geoCentroid",rD,IS),sR("geoShape",(function(e,t,n){var r=ES(e,(n||this).context);return function(e){return r?r.path.context(e)(t):""}}),IS),sR("indata",(function(e,t,n){var r=this.context.data[e]["index:"+t],i=r?r.value.get(n):void 0;return i?i.count:i}),(function(e,t,n,r){"Literal"!==t[0].type&&Object(R.n)("First argument to indata must be a string literal."),"Literal"!==t[1].type&&Object(R.n)("Second argument to indata must be a string literal.");var i=t[0].value,a=t[1].value,o="@"+a;Object(R.v)(o,r)||(r[o]=n.getData(i).indataRef(n,a))})),sR("data",sx,mS),sR("treePath",(function(e,t,n){var r=PD(e,this),i=r[t],a=r[n];return i&&a?i.path(a).map(LD):void 0}),mS),sR("treeAncestors",(function(e,t){var n=PD(e,this)[t];return n?n.ancestors().map(LD):void 0}),mS),sR("vlSelectionTest",(function(e,t,n){for(var r,i,a,o,s,u=this.context.data[e],A=u?u.values.value:[],c=u?u["index:unit"]&&u["index:unit"].value:void 0,l="intersect"===n,f=A.length,h=0;h<f;++h)if(r=A[h],c&&l){if(-1===(a=(i=i||{})[o=r.unit]||0))continue;if(s=GD(t,r),i[o]=s?-1:++a,s&&1===c.size)return!0;if(!s&&a===c.get(o).count)return!1}else if(l^(s=GD(t,r)))return s;return f&&l}),HD),sR("vlSelectionResolve",(function(e,t,n){for(var r,i,a,o,s,u,A,c,l,f,h,g=this.context.data[e],d=g?g.values.value:[],p={},v={},y={},m=d.length,I=0;I<m;++I){for(o=(r=d[I]).unit,i=r.fields,a=r.values,f=0,h=i.length;f<h;++f)s=i[f],A=(u=p[s.field]||(p[s.field]={}))[o]||(u[o]=[]),y[s.field]=c=s.type.charAt(0),l=qD[c+"_union"],u[o]=l(A,Object(R.i)(a[f]));n&&(A=v[o]||(v[o]=[])).push(Object(R.i)(a).reduce((function(e,t,n){return e[i[n].field]=t,e}),{}))}return t=t||"union",Object.keys(p).forEach((function(e){p[e]=Object.keys(p[e]).map((function(t){return p[e][t]})).reduce((function(n,r){return void 0===n?r:qD[y[e]+"_"+t](n,r)}))})),d=Object.keys(v),n&&d.length&&(p.vlMulti="union"===t?Object(Q.a)({},"or",d.reduce((function(e,t){return e.push.apply(e,v[t]),e}),[])):Object(Q.a)({},"and",d.map((function(e){return Object(Q.a)({},"or",v[e])})))),p}),HD);var uR={blacklist:["_"],whitelist:["datum","event","item"],fieldvar:"datum",globalvar:function(e){return"_["+Object(R.Z)("$"+e)+"]"},functions:function(e){var t=yS(e);for(var n in aR.forEach((function(e){return t[e]="event.vega."+e})),iR)t[n]="this."+n;return Object(R.o)(t,function(e,t,n){t.__bandwidth=function(e){return e&&e.bandwidth?e.bandwidth():0},n._bandwidth=IS,n._range=IS,n._scale=IS;var r=function(t){return"_["+("Literal"===t.type?Object(R.Z)("%"+t.value):Object(R.Z)("%")+"+"+e(t))+"]"};return{_bandwidth:function(e){return"this.__bandwidth(".concat(r(e[0]),")")},_range:function(e){return"".concat(r(e[0]),".range()")},_scale:function(t){return"".concat(r(t[0]),"(").concat(e(t[1]),")")}}}(e,iR,oR)),t},constants:vS,visitors:oR},AR=function(e){var t=(e=e||{}).whitelist?Object(R.db)(e.whitelist):{},n=e.blacklist?Object(R.db)(e.blacklist):{},r=e.constants||vS,i=(e.functions||yS)(l),a=e.globalvar,o=e.fieldvar,s={},u={},A=0,c=Object(R.D)(a)?a:function(e){return a+'["'+e+'"]'};function l(e){if(Object(R.H)(e))return e;var t=f[e.type];return null==t&&Object(R.n)("Unsupported type: "+e.type),t(e)}var f={Literal:function(e){return e.raw},Identifier:function(e){var i=e.name;return A>0?i:Object(R.v)(n,i)?Object(R.n)("Illegal identifier: "+i):Object(R.v)(r,i)?r[i]:Object(R.v)(t,i)?i:(s[i]=1,c(i))},MemberExpression:function(e){var t=!e.computed,n=l(e.object);t&&(A+=1);var r=l(e.property);return n===o&&(u[function(e){var t=e&&e.length-1;return t&&('"'===e[0]&&'"'===e[t]||"'"===e[0]&&"'"===e[t])?e.slice(1,-1):e}(r)]=1),t&&(A-=1),n+(t?"."+r:"["+r+"]")},CallExpression:function(e){"Identifier"!==e.callee.type&&Object(R.n)("Illegal callee type: "+e.callee.type);var t=e.callee.name,n=e.arguments,r=Object(R.v)(i,t)&&i[t];return r||Object(R.n)("Unrecognized function: "+t),Object(R.D)(r)?r(n):r+"("+n.map(l).join(",")+")"},ArrayExpression:function(e){return"["+e.elements.map(l).join(",")+"]"},BinaryExpression:function(e){return"("+l(e.left)+e.operator+l(e.right)+")"},UnaryExpression:function(e){return"("+e.operator+l(e.argument)+")"},ConditionalExpression:function(e){return"("+l(e.test)+"?"+l(e.consequent)+":"+l(e.alternate)+")"},LogicalExpression:function(e){return"("+l(e.left)+e.operator+l(e.right)+")"},ObjectExpression:function(e){return"{"+e.properties.map(l).join(",")+"}"},Property:function(e){A+=1;var t=l(e.key);return A-=1,t+":"+l(e.value)}};function h(e){var t={code:l(e),globals:Object.keys(s),fields:Object.keys(u)};return s={},u={},t}return h.functions=i,h.constants=r,h}(uR),cR=function(e,t){var n,r,i={};try{e=Object(R.H)(e)?e:Object(R.Z)(e)+"",n=pS(e)}catch(a){Object(R.n)("Expression parse error: "+e)}return n.visit((function(e){if("CallExpression"===e.type){var n=e.callee.name,r=uR.visitors[n];r&&r(n,e.arguments,t,i)}})),(r=AR(n)).globals.forEach((function(e){var n="$"+e;!Object(R.v)(i,n)&&t.getSignal(e)&&(i[n]=t.signalRef(e))})),{$expr:Object(R.o)({code:r.code},t.options.ast?{ast:n}:null),$fields:r.fields,$params:i}},lR=Object(R.db)(["rule"]),fR=Object(R.db)(["group","image","rect"]);function hR(e){return(e+"").toLowerCase()}function gR(e,t,n){";"!==n[n.length-1]&&(n="return("+n+");");var r=Function.apply(null,t.concat(n));return e&&e.functions?r.bind(e.functions):r}var dR={operator:function(e,t){return gR(e,["_"],t.code)},parameter:function(e,t){return gR(e,["datum","_"],t.code)},event:function(e,t){return gR(e,["event"],t.code)},handler:function(e,t){return gR(e,["_","event"],"var datum=event.item&&event.item.datum;return ".concat(t.code,";"))},encode:function(e,t){var n=t.marktype,r=t.channels,i="var o=item,datum=o.datum,m=0,$;";for(var a in r){var o="o["+Object(R.Z)(a)+"]";i+="$=".concat(r[a].code,";if(").concat(o,"!==$)").concat(o,"=$,m=1;")}return i+=function(e,t){var n="";return lR[t]||(e.x2&&(e.x?(fR[t]&&(n+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),n+="o.width=o.x2-o.x;"):n+="o.x=o.x2-(o.width||0);"),e.xc&&(n+="o.x=o.xc-(o.width||0)/2;"),e.y2&&(e.y?(fR[t]&&(n+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),n+="o.height=o.y2-o.y;"):n+="o.y=o.y2-(o.height||0);"),e.yc&&(n+="o.y=o.yc-(o.height||0)/2;")),n}(r,n),gR(e,["item","_"],i+="return m;")},codegen:{get:function(e){var t="[".concat(e.map(R.Z).join("]["),"]"),n=Function("_","return _".concat(t,";"));return n.path=t,n},comparator:function(e,t){var n,r=Function("a","b","var u, v; return "+e.map((function(e,r){var i,a,o=t[r];return e.path?(i="a".concat(e.path),a="b".concat(e.path)):((n=n||{})["f"+r]=e,i="this.f".concat(r,"(a)"),a="this.f".concat(r,"(b)")),function(e,t,n,r){return"((u = ".concat(e,") < (v = ").concat(t,") || u == null) && v != null ? ").concat(n,"\n  : (u > v || v == null) && u != null ? ").concat(r,"\n  : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ").concat(n,"\n  : v !== v && u === u ? ").concat(r," : ")}(i,a,-o,o)})).join("")+"0;");return n?r.bind(n):r}}};function pR(e,t,n){if(!e||!Object(R.F)(e))return e;for(var r,i=0,a=vR.length;i<a;++i)if(r=vR[i],Object(R.v)(e,r.key))return r.parse(e,t,n);return e}var vR=[{key:"$ref",parse:function(e,t){return t.get(e.$ref)||Object(R.n)("Operator not defined: "+e.$ref)}},{key:"$key",parse:function(e,t){var n="k:"+e.$key+"_"+!!e.$flat;return t.fn[n]||(t.fn[n]=Object(R.I)(e.$key,e.$flat,t.expr.codegen))}},{key:"$expr",parse:function(e,t,n){e.$params&&t.parseParameters(e.$params,n);var r="e:"+e.$expr.code+"_"+e.$name;return t.fn[r]||(t.fn[r]=Object(R.f)(t.parameterExpression(e.$expr),e.$fields,e.$name))}},{key:"$field",parse:function(e,t){if(!e.$field)return null;var n="f:"+e.$field+"_"+e.$name;return t.fn[n]||(t.fn[n]=Object(R.t)(e.$field,e.$name,t.expr.codegen))}},{key:"$encode",parse:function(e,t){var n=e.$encode,r={};for(var i in n){var a=n[i];r[i]=Object(R.f)(t.encodeExpression(a.$expr),a.$fields),r[i].output=a.$output}return r}},{key:"$compare",parse:function(e,t){var n="c:"+e.$compare+"_"+e.$order,r=Object(R.i)(e.$compare).map((function(e){return e&&e.$tupleid?De:e}));return t.fn[n]||(t.fn[n]=Object(R.k)(r,e.$order,t.expr.codegen))}},{key:"$context",parse:function(e,t){return t}},{key:"$subflow",parse:function(e,t){var n=e.$subflow;return function(e,r,i){var a=t.fork().parse(n),o=a.get(n.operators[0].id),s=a.signals.parent;return s&&s.set(i),o.detachSubflow=function(){return t.detach(a)},o}}},{key:"$tupleid",parse:function(){return De}}];var yR={skip:!0};var mR=function(e,t,n,r){return new IR(e,t,n,r)};function IR(e,t,n,r){this.dataflow=e,this.transforms=t,this.events=e.events.bind(e),this.expr=r||dR,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},n&&(this.functions=Object.create(n),this.functions.context=this)}function bR(e){this.dataflow=e.dataflow,this.transforms=e.transforms,this.events=e.events,this.expr=e.expr,this.signals=Object.create(e.signals),this.scales=Object.create(e.scales),this.nodes=Object.create(e.nodes),this.data=Object.create(e.data),this.fn=Object.create(e.fn),e.functions&&(this.functions=Object.create(e.functions),this.functions.context=this)}IR.prototype=bR.prototype={fork:function(){var e=new bR(this);return(this.subcontext||(this.subcontext=[])).push(e),e},detach:function(e){this.subcontext=this.subcontext.filter((function(t){return t!==e}));for(var t=Object.keys(e.nodes),n=0,r=t;n<r.length;n++){var i=r[n];e.nodes[i]._targets=null}for(var a=0,o=t;a<o.length;a++){var s=o[a];e.nodes[s].detach()}e.nodes=null},get:function(e){return this.nodes[e]},set:function(e,t){return this.nodes[e]=t},add:function(e,t){var n=this,r=n.dataflow,i=e.value;if(n.set(e.id,t),"collect"===hR(e.type)&&i&&(i.$ingest?r.ingest(t,i.$ingest,i.$format):i.$request?r.preload(t,i.$request,i.$format):r.pulse(t,r.changeset().insert(i))),e.root&&(n.root=t),e.parent){var a=n.get(e.parent.$ref);a?(r.connect(a,[t]),t.targets().add(a)):(n.unresolved=n.unresolved||[]).push((function(){a=n.get(e.parent.$ref),r.connect(a,[t]),t.targets().add(a)}))}if(e.signal&&(n.signals[e.signal]=t),e.scale&&(n.scales[e.scale]=t),e.data){var o=function(r){var i=n.data[r]||(n.data[r]={});e.data[r].forEach((function(e){return i[e]=t}))};for(var s in e.data)o(s)}},resolve:function(){return(this.unresolved||[]).forEach((function(e){return e()})),delete this.unresolved,this},operator:function(e,t){this.add(e,this.dataflow.add(e.value,t))},transform:function(e,t){this.add(e,this.dataflow.add(this.transforms[hR(t)]))},stream:function(e,t){this.set(e.id,t)},update:function(e,t,n,r,i){this.dataflow.on(t,n,r,i,e.options)},operatorExpression:function(e){return this.expr.operator(this,e)},parameterExpression:function(e){return this.expr.parameter(this,e)},eventExpression:function(e){return this.expr.event(this,e)},handlerExpression:function(e){return this.expr.handler(this,e)},encodeExpression:function(e){return this.expr.encode(this,e)},parse:function(e){var t=this,n=e.operators||[];return e.background&&(t.background=e.background),e.eventConfig&&(t.eventConfig=e.eventConfig),e.locale&&(t.locale=e.locale),n.forEach((function(e){return t.parseOperator(e)})),n.forEach((function(e){return t.parseOperatorParameters(e)})),(e.streams||[]).forEach((function(e){return t.parseStream(e)})),(e.updates||[]).forEach((function(e){return t.parseUpdate(e)})),t.resolve()},parseOperator:function(e){"operator"!==hR(e.type)&&e.type?this.transform(e,e.type):this.operator(e,e.update?this.operatorExpression(e.update):null)},parseOperatorParameters:function(e){if(e.params){var t=this.get(e.id);t||Object(R.n)("Invalid operator id: "+e.id),this.dataflow.connect(t,t.parameters(this.parseParameters(e.params),e.react,e.initonly))}},parseParameters:function(e,t){t=t||{};var n=this;for(var r in e){var i=e[r];t[r]=Object(R.A)(i)?i.map((function(e){return pR(e,n,t)})):pR(i,n,t)}return t},parseStream:function(e){var t,n=this,r=null!=e.filter?n.eventExpression(e.filter):void 0,i=null!=e.stream?n.get(e.stream):void 0;e.source?i=n.events(e.source,e.type,r):e.merge&&(i=(t=e.merge.map((function(e){return n.get(e)})))[0].merge.apply(t[0],t.slice(1))),e.between&&(t=e.between.map((function(e){return n.get(e)})),i=i.between(t[0],t[1])),e.filter&&(i=i.filter(r)),null!=e.throttle&&(i=i.throttle(+e.throttle)),null!=e.debounce&&(i=i.debounce(+e.debounce)),null==i&&Object(R.n)("Invalid stream definition: "+JSON.stringify(e)),e.consume&&i.consume(!0),n.stream(e,i)},parseUpdate:function(e){var t,n=Object(R.F)(n=e.source)?n.$ref:n,r=this.get(n),i=e.update,a=void 0;r||Object(R.n)("Source not defined: "+e.source),t=e.target&&e.target.$expr?this.eventExpression(e.target.$expr):this.get(e.target),i&&i.$expr&&(i.$params&&(a=this.parseParameters(i.$params)),i=this.handlerExpression(i.$expr)),this.update(e,r,t,i,a)},getState:function(e){var t=this,n={};if(e.signals){var r=n.signals={};Object.keys(t.signals).forEach((function(n){var i=t.signals[n];e.signals(n,i)&&(r[n]=i.value)}))}if(e.data){var i=n.data={};Object.keys(t.data).forEach((function(n){var r=t.data[n];e.data(n,r)&&(i[n]=r.input.value)}))}return t.subcontext&&!1!==e.recurse&&(n.subcontext=t.subcontext.map((function(t){return t.getState(e)}))),n},setState:function(e){var t=this,n=t.dataflow,r=e.data,i=e.signals;Object.keys(i||{}).forEach((function(e){n.update(t.signals[e],i[e],yR)})),Object.keys(r||{}).forEach((function(e){n.pulse(t.data[e].input,n.changeset().remove(R.gb).insert(r[e]))})),(e.subcontext||[]).forEach((function(e,n){var r=t.subcontext[n];r&&r.setState(e)}))}};var ER={skip:!0};function CR(e,t){var n=e.autosize(),r=e.padding();return t-(n&&"padding"===n.contains?r.left+r.right:0)}function BR(e,t){var n=e.autosize(),r=e.padding();return t-(n&&"padding"===n.contains?r.top+r.bottom:0)}function wR(e,t){return t.modified&&Object(R.A)(t.input.value)&&e.indexOf("_:vega:_")}function QR(e,t){return!("parent"===e||t instanceof yo.proxy)}var kR=n(838),_R=function(e,t,n,r){var i=e.element();i&&i.setAttribute("title",function(e){return null==e?"":Object(R.A)(e)?xR(e):Object(R.F)(e)&&!Object(R.C)(e)?(t=e,Object.keys(t).map((function(e){var n=t[e];return e+": "+(Object(R.A)(n)?xR(n):SR(n))})).join("\n")):e+"";var t}(r))};function xR(e){return"["+e.map(SR).join(", ")+"]"}function SR(e){return Object(R.A)(e)?"[\u2026]":Object(R.F)(e)&&!Object(R.C)(e)?"{\u2026}":e}function OR(e,t){if(t=t||{},fo.call(this),t.loader&&this.loader(t.loader),t.logger&&this.logger(t.logger),null!=t.logLevel&&this.logLevel(t.logLevel),t.locale||e.locale){var n=Object(R.o)({},e.locale,t.locale);this.locale(Ua(n.number,n.time))}this._el=null,this._elBind=null,this._renderType=t.renderer||_y.Canvas,this._scenegraph=new wh;var r=this._scenegraph.root;this._renderer=null,this._tooltip=t.tooltip||_R,this._redraw=!0,this._handler=(new Kh).scene(r),this._globalCursor=!1,this._preventDefault=!1,this._timers=[],this._eventListeners=[],this._resizeListeners=[],this._eventConfig=function(e){var t=Object(R.o)({defaults:{}},e),n=function(e,t){t.forEach((function(t){Object(R.A)(e[t])&&(e[t]=Object(R.db)(e[t]))}))};return n(t.defaults,["prevent","allow"]),n(t,["view","window","selector"]),t}(e.eventConfig),this.globalCursor(this._eventConfig.globalCursor);var i=function(e,t,n){return mR(e,yo,iR,n).parse(t)}(this,e,t.expr);this._runtime=i,this._signals=i.signals,this._bind=(e.bindings||[]).map((function(e){return{state:null,param:Object(R.o)({},e)}})),i.root&&i.root.set(r),r.source=i.data.root.input,this.pulse(i.data.root.input,this.changeset().insert(r.items)),this._width=this.width(),this._height=this.height(),this._viewWidth=CR(this,this._width),this._viewHeight=BR(this,this._height),this._origin=[0,0],this._resize=0,this._autosize=1,function(e){var t=e._signals,n=t.width,r=t.height,i=t.padding;function a(){e._autosize=e._resize=1}e._resizeWidth=e.add(null,(function(t){e._width=t.size,e._viewWidth=CR(e,t.size),a()}),{size:n}),e._resizeHeight=e.add(null,(function(t){e._height=t.size,e._viewHeight=BR(e,t.size),a()}),{size:r});var o=e.add(null,a,{pad:i});e._resizeWidth.rank=n.rank+1,e._resizeHeight.rank=r.rank+1,o.rank=i.rank+1}(this),function(e){e.add(null,(function(t){return e._background=t.bg,e._resize=1,t.bg}),{bg:e._signals.background})}(this),function(e){var t=e._signals.cursor||(e._signals.cursor=e.add({user:"default",item:null}));e.on(e.events("view","mousemove"),t,(function(e,n){var r=t.value,i=r?Object(R.H)(r)?r:r.user:"default",a=n.item&&n.item.cursor||null;return r&&i===r.user&&a==r.item?r:{user:i,item:a}})),e.add(null,(function(t){var n=t.cursor,r=this.value;return Object(R.H)(n)||(r=n.item,n=n.user),Q_(e,n&&"default"!==n?n:r||n),r}),{cursor:t})}(this),this.description(e.description),t.hover&&this.hover(),t.container&&this.initialize(t.container,t.bind)}var DR=Object(R.y)(OR,fo);function RR(e,t){return Object(R.v)(e._signals,t)?e._signals[t]:Object(R.n)("Unrecognized signal name: "+Object(R.Z)(t))}function jR(e,t){var n=(e._targets||[]).filter((function(e){return e._update&&e._update.handler===t}));return n.length?n[0]:null}function MR(e,t,n,r){var i=jR(n,r);return i||((i=X_(e,(function(){return r(t,n.value)}))).handler=r,e.on(n,null,i)),e}function NR(e,t,n){var r=jR(t,n);return r&&t._targets.remove(r),e}DR.evaluate=function(){var e=Object(Qe.a)(Y.a.mark((function e(t,n,r){return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fo.prototype.evaluate.call(this,t,n);case 2:if(!this._redraw&&!this._resize){e.next=14;break}if(e.prev=3,!this._renderer){e.next=8;break}return this._resize&&(this._resize=0,D_(this)),e.next=8,this._renderer.renderAsync(this._scenegraph.root);case 8:this._redraw=!1,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(3),this.error(e.t0);case 14:return r&&ke(this,r),e.abrupt("return",this);case 16:case"end":return e.stop()}}),e,this,[[3,11]])})));return function(t,n,r){return e.apply(this,arguments)}}(),DR.dirty=function(e){this._redraw=!0,this._renderer&&this._renderer.dirty(e)},DR.description=function(e){if(arguments.length){var t=null!=e?e+"":null;return t!==this._desc&&w_(this._el,this._desc=t),this}return this._desc},DR.container=function(){return this._el},DR.scenegraph=function(){return this._scenegraph},DR.origin=function(){return this._origin.slice()},DR.signal=function(e,t,n){var r=RR(this,e);return 1===arguments.length?r.value:this.update(r,t,n)},DR.width=function(e){return arguments.length?this.signal("width",e):this.signal("width")},DR.height=function(e){return arguments.length?this.signal("height",e):this.signal("height")},DR.padding=function(e){return arguments.length?this.signal("padding",ex(e)):ex(this.signal("padding"))},DR.autosize=function(e){return arguments.length?this.signal("autosize",e):this.signal("autosize")},DR.background=function(e){return arguments.length?this.signal("background",e):this.signal("background")},DR.renderer=function(e){return arguments.length?(Sy(e)||Object(R.n)("Unrecognized renderer type: "+e),e!==this._renderType&&(this._renderType=e,this._resetRenderer()),this):this._renderType},DR.tooltip=function(e){return arguments.length?(e!==this._tooltip&&(this._tooltip=e,this._resetRenderer()),this):this._tooltip},DR.loader=function(e){return arguments.length?(e!==this._loader&&(fo.prototype.loader.call(this,e),this._resetRenderer()),this):this._loader},DR.resize=function(){return this._autosize=1,this.touch(RR(this,"autosize"))},DR._resetRenderer=function(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},DR._resizeView=function(e,t,n,r,i,a){this.runAfter((function(o){var s=0;o._autosize=0,o.width()!==n&&(s=1,o.signal("width",n,ER),o._resizeWidth.skip(!0)),o.height()!==r&&(s=1,o.signal("height",r,ER),o._resizeHeight.skip(!0)),o._viewWidth!==e&&(o._resize=1,o._viewWidth=e),o._viewHeight!==t&&(o._resize=1,o._viewHeight=t),o._origin[0]===i[0]&&o._origin[1]===i[1]||(o._resize=1,o._origin=i),s&&o.run("enter"),a&&o.runAfter((function(e){return e.resize()}))}),!1,1)},DR.addEventListener=function(e,t,n){var r=t;return n&&!1===n.trap||((r=X_(this,t)).raw=t),this._handler.on(e,r),this},DR.removeEventListener=function(e,t){for(var n,r,i=this._handler.handlers(e),a=i.length;--a>=0;)if(r=i[a].type,n=i[a].handler,e===r&&(t===n||t===n.raw)){this._handler.off(r,n);break}return this},DR.addResizeListener=function(e){var t=this._resizeListeners;return t.indexOf(e)<0&&t.push(e),this},DR.removeResizeListener=function(e){var t=this._resizeListeners,n=t.indexOf(e);return n>=0&&t.splice(n,1),this},DR.addSignalListener=function(e,t){return MR(this,e,RR(this,e),t)},DR.removeSignalListener=function(e,t){return NR(this,RR(this,e),t)},DR.addDataListener=function(e,t){return MR(this,e,k_(this,e).values,t)},DR.removeDataListener=function(e,t){return NR(this,k_(this,e).values,t)},DR.globalCursor=function(e){if(arguments.length){if(this._globalCursor!==!!e){var t=Q_(this,null);this._globalCursor=!!e,t&&Q_(this,t)}return this}return this._globalCursor},DR.preventDefault=function(e){return arguments.length?(this._preventDefault=e,this):this._preventDefault},DR.timer=function(e,t){this._timers.push(function(e,t,n){var r=new kR.a,i=t;return null==t?(r.restart(e,t,n),r):(t=+t,n=null==n?Object(kR.b)():+n,r.restart((function a(o){o+=i,r.restart(a,i+=t,n),e(o)}),t,n),r)}((function(t){e({timestamp:Date.now(),elapsed:t})}),t))},DR.events=function(e,t,n){var r,i=this,a=new Ve(n),o=function(n,r){i.runAsync(null,(function(){"view"===e&&function(e,t){var n=e._eventConfig.defaults,r=n.prevent,i=n.allow;return!1!==r&&!0!==i&&(!0===r||!1===i||(r?r[t]:i?!i[t]:e.preventDefault()))}(i,t)&&n.preventDefault(),a.receive(R_(i,n,r))}))};if("timer"===e)M_(i,"timer",t)&&i.timer(o,t);else if("view"===e)M_(i,"view",t)&&i.addEventListener(t,o,j_);else if("window"===e?M_(i,"window",t)&&"undefined"!==typeof window&&(r=[window]):"undefined"!==typeof document&&M_(i,"selector",t)&&(r=document.querySelectorAll(e)),r){for(var s=0,u=r.length;s<u;++s)r[s].addEventListener(t,o);i._eventListeners.push({type:t,sources:r,handler:o})}else i.warn("Can not resolve event source: "+e);return a},DR.finalize=function(){var e,t,n,r=this._tooltip,i=this._timers,a=this._eventListeners;for(e=i.length;--e>=0;)i[e].stop();for(e=a.length;--e>=0;)for(t=(n=a[e]).sources.length;--t>=0;)n.sources[t].removeEventListener(n.type,n.handler);return r&&r.call(this,this._handler,null,null,null),this},DR.hover=function(e,t){return t=[t||"update",(e=[e||"hover"])[0]],this.on(this.events("view","mouseover",N_),F_,T_(e)),this.on(this.events("view","mouseout",N_),F_,T_(t)),this},DR.data=function(e,t){return arguments.length<2?k_(this,e).values.value:__.call(this,e,Pe().remove(R.gb).insert(t))},DR.change=__,DR.insert=function(e,t){return __.call(this,e,Pe().insert(t))},DR.remove=function(e,t){return __.call(this,e,Pe().remove(t))},DR.scale=function(e){var t=this._runtime.scales;return Object(R.v)(t,e)||Object(R.n)("Unrecognized scale or projection: "+e),t[e].value},DR.initialize=function(e,t){var n=this,r=n._renderType,i=n._eventConfig.bind,a=Sy(r);e=n._el=e?Z_(n,e):null,function(e){var t=e.container();t&&(t.setAttribute("role","graphics-document"),t.setAttribute("aria-roleDescription","visualization"),w_(t,e.description()))}(n),a||n.error("Unrecognized renderer type: "+r);var o=a.handler||Kh,s=e?a.renderer:a.headless;return n._renderer=s?V_(n,n._renderer,e,s):null,n._handler=function(e,t,n,r){var i=new r(e.loader(),X_(e,e.tooltip())).scene(e.scenegraph().root).initialize(n,O_(e),e);return t&&t.handlers().forEach((function(e){i.on(e.type,e.handler)})),i}(n,n._handler,e,o),n._redraw=!0,e&&"none"!==i&&(t=t?n._elBind=Z_(n,t):e.appendChild(L_("form",{class:"vega-bindings"})),n._bind.forEach((function(e){e.param.element&&"container"!==i&&(e.element=Z_(n,e.param.element))})),n._bind.forEach((function(e){q_(n,e.element||t,e)}))),n},DR.toImageURL=function(e,t){return rx.apply(this,arguments)},DR.toCanvas=function(e,t){return ax.apply(this,arguments)},DR.toSVG=function(e){return ox.apply(this,arguments)},DR.getState=function(e){return this._runtime.getState(e||{data:wR,signals:QR,recurse:!0})},DR.setState=function(e){return this.runAsync(null,(function(t){t._trigger=!1,t._runtime.setState(e)}),(function(e){e._trigger=!0})),this};var FR=function(e){return Object(R.F)(e)?e:{type:e||"pad"}},TR=function(e){return+e||0},LR=function(e){return Object(R.F)(e)?e.signal?e:{top:TR(e.top),bottom:TR(e.bottom),left:TR(e.left),right:TR(e.right)}:{top:t=TR(e),bottom:t,left:t,right:t};var t},PR=function(e){return Object(R.F)(e)&&!Object(R.A)(e)?Object(R.o)({},e):{value:e}};function UR(e,t,n,r){return null!=n?(Object(R.F)(n)&&!Object(R.A)(n)?e.update[t]=n:e[r||"enter"][t]={value:n},1):0}function GR(e,t,n){for(var r in t)UR(e,r,t[r]);for(var i in n)UR(e,i,n[i],"update")}function qR(e,t,n){for(var r in t)n&&Object(R.v)(n,r)||(e[r]=Object(R.o)(e[r]||{},t[r]));return e}function HR(e,t){return t&&(t.enter&&t.enter[e]||t.update&&t.update[e])}function YR(e,t,n){e[t]=n&&n.signal?{signal:n.signal}:{value:n}}var JR=function(e){return Object(R.H)(e)?Object(R.Z)(e):e.signal?"(".concat(e.signal,")"):VR(e)};function zR(e){if(null!=e.gradient)return function(e){var t=[e.start,e.stop,e.count].map((function(e){return null==e?null:Object(R.Z)(e)}));for(;t.length&&null==Object(R.U)(t);)t.pop();return t.unshift(JR(e.gradient)),"gradient(".concat(t.join(","),")")}(e);var t=e.signal?"(".concat(e.signal,")"):e.color?function(e){return e.c?KR("hcl",e.h,e.c,e.l):e.h||e.s?KR("hsl",e.h,e.s,e.l):e.l||e.a?KR("lab",e.l,e.a,e.b):e.r||e.g||e.b?KR("rgb",e.r,e.g,e.b):null}(e.color):null!=e.field?VR(e.field):void 0!==e.value?Object(R.Z)(e.value):void 0;return null!=e.scale&&(t=function(e,t){var n=JR(e.scale);null!=e.range?t="lerp(_range(".concat(n,"), ").concat(+e.range,")"):(void 0!==t&&(t="_scale(".concat(n,", ").concat(t,")")),e.band&&(t=(t?t+"+":"")+"_bandwidth(".concat(n,")")+(1===+e.band?"":"*"+WR(e.band)),e.extra&&(t="(datum.extra ? _scale(".concat(n,", datum.extra.value) : ").concat(t,")"))),null==t&&(t="0"));return t}(e,t)),void 0===t&&(t=null),null!=e.exponent&&(t="pow(".concat(t,",").concat(WR(e.exponent),")")),null!=e.mult&&(t+="*".concat(WR(e.mult))),null!=e.offset&&(t+="+".concat(WR(e.offset))),e.round&&(t="round(".concat(t,")")),t}var KR=function(e,t,n,r){return"(".concat(e,"(").concat([t,n,r].map(zR).join(","),")+'')")};function WR(e){return Object(R.F)(e)?"("+zR(e)+")":e}function VR(e){return function e(t){var n,r,i;if(t.signal)n="datum",i=t.signal;else if(t.group||t.parent){for(r=Math.max(1,t.level||1),n="item";r-- >0;)n+=".mark.group";t.parent?(i=t.parent,n+=".datum"):i=t.group}else t.datum?(n="datum",i=t.datum):Object(R.n)("Invalid field reference: "+Object(R.Z)(t));t.signal||(i=Object(R.H)(i)?Object(R.Y)(i).map(R.Z).join("]["):e(i));return n+"["+i+"]"}(Object(R.F)(e)?e:{datum:e})}var XR=function(e,t,n,r,i,a){var o={};for(var s in(a=a||{}).encoders={$encode:o},e=function(e,t,n,r,i){var a,o,s,u={},A={};for(o in o="lineBreak","text"!==t||null==i[o]||HR(o,e)||YR(u,o,i[o]),("legend"==n||String(n).startsWith("axis"))&&(n=null),s="frame"===n?i.group:"mark"===n?Object(R.o)({},i.mark,i[t]):null)HR(o,e)||("fill"===o||"stroke"===o)&&(HR("fill",e)||HR("stroke",e))||YR(u,o,s[o]);for(o in Object(R.i)(r).forEach((function(t){var n=i.style&&i.style[t];for(var r in n)HR(r,e)||YR(u,r,n[r])})),e=Object(R.o)({},e),u)(s=u[o]).signal?(a=a||{})[o]=s:A[o]=s;return e.enter=Object(R.o)(A,e.enter),a&&(e.update=Object(R.o)(a,e.update)),e}(e,t,n,r,i.config))o[s]=ZR(e[s],t,a,i);return a};function ZR(e,t,n,r){var i,a={},o={};for(var s in e)null!=e[s]&&(a[s]=$R((i=e[s],Object(R.A)(i)?function(e){var t="";return e.forEach((function(e){var n=zR(e);t+=e.test?"(".concat(e.test,")?").concat(n,":"):n})),":"===Object(R.U)(t)&&(t+="null"),t}(i):zR(i)),r,n,o));return{$expr:{marktype:t,channels:a},$fields:Object.keys(o),$output:Object.keys(e)}}function $R(e,t,n,r){var i=cR(e,t);return i.$fields.forEach((function(e){return r[e]=1})),Object(R.o)(n,i.$params),i.$expr}var ej=["value","update","init","react","bind"];function tj(e,t){Object(R.n)(e+' for "outer" push: '+Object(R.Z)(t))}var nj=function(e,t){var n=e.name;if("outer"===e.push)t.signals[n]||tj("No prior signal definition",n),ej.forEach((function(t){void 0!==e[t]&&tj("Invalid property ",t)}));else{var r=t.addSignal(n,e.value);!1===e.react&&(r.react=!1),e.bind&&t.addBinding(n,e.bind)}};function rj(e,t,n,r){this.id=-1,this.type=e,this.value=t,this.params=n,r&&(this.parent=r)}function ij(e,t,n,r){return new rj(e,t,n,r)}function aj(e,t){return ij("operator",e,t)}function oj(e){var t={$ref:e.id};return e.id<0&&(e.refs=e.refs||[]).push(t),t}function sj(e,t){return t?{$field:e,$name:t}:{$field:e}}var uj=sj("key");function Aj(e,t){return{$compare:e,$order:t}}function cj(e,t){return(e&&e.signal?"$"+e.signal:e||"")+(e&&t?"_":"")+(t&&t.signal?"$"+t.signal:t||"")}function lj(e){return e&&e.signal}function fj(e){if(lj(e))return!0;if(Object(R.F)(e))for(var t in e)if(fj(e[t]))return!0;return!1}function hj(e,t){return null!=e?e:t}function gj(e){return e&&e.signal||e}function dj(e,t){return(e.merge?pj:e.stream?vj:e.type?yj:Object(R.n)("Invalid stream specification: "+Object(R.Z)(e)))(e,t)}function pj(e,t){var n=mj({merge:e.merge.map((function(e){return dj(e,t)}))},e,t);return t.addStream(n).id}function vj(e,t){var n=mj({stream:dj(e.stream,t)},e,t);return t.addStream(n).id}function yj(e,t){var n,r,i;return"timer"===e.type?(n=t.event("timer",e.throttle),e={between:e.between,filter:e.filter}):n=t.event("scope"===(i=e.source)?"view":i||"view",e.type),r=mj({stream:n},e,t),1===Object.keys(r).length?n:t.addStream(r).id}function mj(e,t,n){var r=t.between;return r&&(2!==r.length&&Object(R.n)('Stream "between" parameter must have 2 entries: '+Object(R.Z)(t)),e.between=[dj(r[0],n),dj(r[1],n)]),r=t.filter?[].concat(t.filter):[],(t.marktype||t.markname||t.markrole)&&r.push(function(e,t,n){var r="event.item";return r+(e&&"*"!==e?"&&"+r+".mark.marktype==='"+e+"'":"")+(n?"&&"+r+".mark.role==='"+n+"'":"")+(t?"&&"+r+".mark.name==='"+t+"'":"")}(t.marktype,t.markname,t.markrole)),"scope"===t.source&&r.push("inScope(event.item)"),r.length&&(e.filter=cR("("+r.join(")&&(")+")",n).$expr),null!=(r=t.throttle)&&(e.throttle=+r),null!=(r=t.debounce)&&(e.debounce=+r),t.consume&&(e.consume=!0),e}var Ij,bj,Ej=function(e,t,n){return Ij=t||Cj,bj=n||wj,kj(e.trim()).map(_j)},Cj="view",Bj=/[[\]{}]/,wj={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};function Qj(e,t,n,r,i){for(var a,o=0,s=e.length;t<s;++t){if(a=e[t],!o&&a===n)return t;i&&i.indexOf(a)>=0?--o:r&&r.indexOf(a)>=0&&++o}return t}function kj(e){for(var t=[],n=0,r=e.length,i=0;i<r;)i=Qj(e,i,",","[{","]}"),t.push(e.substring(n,i).trim()),n=++i;if(0===t.length)throw"Empty event selector: "+e;return t}function _j(e){return"["===e[0]?function(e){var t,n,r=e.length,i=1;if((i=Qj(e,i,"]","[","]"))===r)throw"Empty between selector: "+e;if(2!==(t=kj(e.substring(1,i))).length)throw"Between selector must have two elements: "+e;if(">"!==(e=e.slice(i+1).trim())[0])throw"Expected '>' after between selector: "+e;if(t=t.map(_j),(n=_j(e.slice(1).trim())).between)return{between:t,stream:n};n.between=t;return n}(e):function(e){var t,n,r={source:Ij},i=[],a=[0,0],o=0,s=0,u=e.length,A=0;if("}"===e[u-1]){if(!((A=e.lastIndexOf("{"))>=0))throw"Unmatched right brace: "+e;try{a=function(e){var t=e.split(",");if(!e.length||t.length>2)throw e;return t.map((function(t){var n=+t;if(n!==n)throw e;return n}))}(e.substring(A+1,u-1))}catch(l){throw"Invalid throttle specification: "+e}e=e.slice(0,A).trim(),u=e.length,A=0}if(!u)throw e;"@"===e[0]&&(o=++A);(t=Qj(e,A,":"))<u&&(i.push(e.substring(s,t).trim()),s=A=++t);if((A=Qj(e,A,"["))===u)i.push(e.substring(s,u).trim());else if(i.push(e.substring(s,A).trim()),n=[],(s=++A)===u)throw"Unmatched left bracket: "+e;for(;A<u;){if((A=Qj(e,A,"]"))===u)throw"Unmatched left bracket: "+e;if(n.push(e.substring(s,A).trim()),A<u-1&&"["!==e[++A])throw"Expected left bracket: "+e;s=++A}if(!(u=i.length)||Bj.test(i[u-1]))throw"Invalid event selector: "+e;u>1?(r.type=i[1],o?r.markname=i[0].slice(1):(c=i[0],bj[c]?r.marktype=i[0]:r.source=i[0])):r.type=i[0];var c;"!"===r.type.slice(-1)&&(r.consume=!0,r.type=r.type.slice(0,-1));null!=n&&(r.filter=n);a[0]&&(r.throttle=a[0]);a[1]&&(r.debounce=a[1]);return r}(e)}var xj={code:"_.$value",ast:{type:"Identifier",value:"value"}},Sj=function(e,t,n){var r=e.events,i=e.update,a=e.encode,o=[],s={target:n};r||Object(R.n)("Signal update missing events specification."),Object(R.H)(r)&&(r=Ej(r,t.isSubscope()?"scope":"view")),r=Object(R.i)(r).filter((function(e){return e.signal||e.scale?(o.push(e),0):1})),o.length>1&&(o=[Oj(o)]),r.length&&o.push(r.length>1?{merge:r}:r[0]),null!=a&&(i&&Object(R.n)("Signal encode and update are mutually exclusive."),i="encode(item(),"+Object(R.Z)(a)+")"),s.update=Object(R.H)(i)?cR(i,t):null!=i.expr?cR(i.expr,t):null!=i.value?i.value:null!=i.signal?{$expr:xj,$params:{$value:t.signalRef(i.signal)}}:Object(R.n)("Invalid signal update specification."),e.force&&(s.options={force:!0}),o.forEach((function(e){t.addUpdate(Object(R.o)(function(e,t){return{source:e.signal?t.signalRef(e.signal):e.scale?t.scaleRef(e.scale):dj(e,t)}}(e,t),s))}))};function Oj(e){return{signal:"["+e.map((function(e){return e.scale?'scale("'+e.scale+'")':e.signal}))+"]"}}var Dj=function(e){return function(t,n,r){return ij(e,n,t||void 0,r)}},Rj=Dj("aggregate"),jj=Dj("axisticks"),Mj=Dj("bound"),Nj=Dj("collect"),Fj=Dj("compare"),Tj=Dj("datajoin"),Lj=Dj("encode"),Pj=Dj("expression"),Uj=(Dj("extent"),Dj("facet")),Gj=Dj("field"),qj=Dj("key"),Hj=Dj("legendentries"),Yj=Dj("load"),Jj=Dj("mark"),zj=Dj("multiextent"),Kj=Dj("multivalues"),Wj=Dj("overlap"),Vj=Dj("params"),Xj=Dj("prefacet"),Zj=Dj("projection"),$j=Dj("proxy"),eM=Dj("relay"),tM=Dj("render"),nM=Dj("scale"),rM=Dj("sieve"),iM=Dj("sortitems"),aM=Dj("viewlayout"),oM=Dj("values"),sM=0,uM={min:"min",max:"max",count:"sum"};function AM(e,t){var n,r,i=t.getScale(e.name).params;for(n in i.domain=hM(e.domain,e,t),null!=e.range&&(i.range=function e(t,n,r){var i=t.range,a=n.config.range;if(i.signal)return n.signalRef(i.signal);if(Object(R.H)(i)){if(a&&Object(R.v)(a,i))return t=Object(R.o)({},t,{range:a[i]}),e(t,n,r);"width"===i?i=[0,{signal:"width"}]:"height"===i?i=wp(t.type)?[0,{signal:"height"}]:[{signal:"height"},0]:Object(R.n)("Unrecognized scale range value: "+Object(R.Z)(i))}else{if(i.scheme)return r.scheme=Object(R.A)(i.scheme)?lM(i.scheme,n):cM(i.scheme,n),i.extent&&(r.schemeExtent=lM(i.extent,n)),void(i.count&&(r.schemeCount=cM(i.count,n)));if(i.step)return void(r.rangeStep=cM(i.step,n));if(wp(t.type)&&!Object(R.A)(i))return hM(i,t,n);Object(R.A)(i)||Object(R.n)("Unsupported range type: "+Object(R.Z)(i))}return i.map((function(e){return(Object(R.A)(e)?lM:cM)(e,n)}))}(e,t,i)),null!=e.interpolate&&function(e,t){t.interpolate=cM(e.type||e),null!=e.gamma&&(t.interpolateGamma=cM(e.gamma))}(e.interpolate,i),null!=e.nice&&(i.nice=(r=e.nice,Object(R.F)(r)?{interval:cM(r.interval),step:cM(r.step)}:cM(r))),null!=e.bins&&(i.bins=function(e,t){return e.signal||Object(R.A)(e)?lM(e,t):t.objectProperty(e)}(e.bins,t)),e)Object(R.v)(i,n)||"name"===n||(i[n]=cM(e[n],t))}function cM(e,t){return Object(R.F)(e)?e.signal?t.signalRef(e.signal):Object(R.n)("Unsupported object: "+Object(R.Z)(e)):e}function lM(e,t){return e.signal?t.signalRef(e.signal):e.map((function(e){return cM(e,t)}))}function fM(e){Object(R.n)("Can not find data set: "+Object(R.Z)(e))}function hM(e,t,n){if(e)return e.signal?n.signalRef(e.signal):(Object(R.A)(e)?gM:e.fields?pM:dM)(e,t,n);null==t.domainMin&&null==t.domainMax||Object(R.n)("No scale domain defined for domainMin/domainMax to override.")}function gM(e,t,n){return e.map((function(e){return cM(e,n)}))}function dM(e,t,n){var r=n.getData(e.data);return r||fM(e.data),wp(t.type)?r.valuesRef(n,e.field,yM(e.sort,!1)):xp(t.type)?r.domainRef(n,e.field):r.extentRef(n,e.field)}function pM(e,t,n){var r=e.data,i=e.fields.reduce((function(e,t){return t=Object(R.H)(t)?{data:r,field:t}:Object(R.A)(t)||t.signal?function(e,t){var n="_:vega:_"+sM++,r=Nj({});if(Object(R.A)(e))r.value={$ingest:e};else if(e.signal){var i="setdata("+Object(R.Z)(n)+","+e.signal+")";r.params.input=t.signalRef(i)}return t.addDataPipeline(n,[r,rM({})]),{data:n,field:"data"}}(t,n):t,e.push(t),e}),[]);return(wp(t.type)?vM:xp(t.type)?mM:IM)(e,n,i)}function vM(e,t,n){var r,i,a,o,s,u=yM(e.sort,!0);return r=n.map((function(e){var n=t.getData(e.data);return n||fM(e.data),n.countsRef(t,e.field,u)})),i={groupby:uj,pulse:r},u&&(a=u.op||"count",s=u.field?cj(a,u.field):"count",i.ops=[uM[a]],i.fields=[t.fieldRef(s)],i.as=[s]),a=t.add(Rj(i)),o=t.add(Nj({pulse:oj(a)})),s=t.add(oM({field:uj,sort:t.sortRef(u),pulse:oj(o)})),oj(s)}function yM(e,t){return e&&(e.field||e.op?e.field||"count"===e.op?t&&e.field&&e.op&&!uM[e.op]&&Object(R.n)("Multiple domain scales can not be sorted using "+e.op):Object(R.n)("No field provided for sort aggregate op: "+e.op):Object(R.F)(e)?e.field="key":e={field:"key"}),e}function mM(e,t,n){var r=n.map((function(e){var n=t.getData(e.data);return n||fM(e.data),n.domainRef(t,e.field)}));return oj(t.add(Kj({values:r})))}function IM(e,t,n){var r=n.map((function(e){var n=t.getData(e.data);return n||fM(e.data),n.extentRef(t,e.field)}));return oj(t.add(zj({extents:r})))}function bM(e,t,n){return Object(R.A)(e)?e.map((function(e){return bM(e,t,n)})):Object(R.F)(e)?e.signal?n.signalRef(e.signal):"fit"===t?e:Object(R.n)("Unsupported parameter object: "+Object(R.Z)(e)):e}var EM=["size","shape","fill","stroke","strokeWidth","strokeDash","opacity"],CM={name:1,style:1,interactive:1},BM={value:0},wM={value:1},QM=function(e){return e.type="group",e.interactive=e.interactive||!1,e};function kM(e,t){var n=function(n,r){return hj(e[n],hj(t[n],r))};return n.isVertical=function(n){return"vertical"===hj(e.direction,t.direction||(n?t.symbolDirection:t.gradientDirection))},n.gradientLength=function(){return hj(e.gradientLength,t.gradientLength||t.gradientWidth)},n.gradientThickness=function(){return hj(e.gradientThickness,t.gradientThickness||t.gradientHeight)},n.entryColumns=function(){return hj(e.columns,hj(t.columns,+n.isVertical(!0)))},n}function _M(e,t){var n=t&&(t.update&&t.update[e]||t.enter&&t.enter[e]);return n&&n.signal?n:n?n.value:null}function xM(e,t,n){return"item.anchor === '".concat("start","' ? ").concat(e," : item.anchor === '").concat("end","' ? ").concat(t," : ").concat(n)}var SM=xM(Object(R.Z)("left"),Object(R.Z)("right"),Object(R.Z)("center"));function OM(e,t){return t?e?Object(R.F)(e)?Object.assign({},e,{offset:OM(e.offset,t)}):{value:e,offset:t}:t:e}var DM=function(e,t){return t?(e.name=t.name,e.style=t.style||e.style,e.interactive=!!t.interactive,e.encode=qR(e.encode,t,CM)):e.interactive=!1,e},RM=function(e,t,n,r){var i,a,o,s,u,A,c=kM(e,n),l=c.isVertical(),f=c.gradientThickness(),h=c.gradientLength();return l?(o=[0,1],s=[0,0],u=f,A=h):(o=[0,0],s=[1,0],u=h,A=f),GR(i={enter:a={opacity:BM,x:BM,y:BM,width:PR(u),height:PR(A)},update:Object(R.o)({},a,{opacity:wM,fill:{gradient:t,start:o,stop:s}}),exit:{opacity:BM}},{stroke:c("gradientStrokeColor"),strokeWidth:c("gradientStrokeWidth")},{opacity:c("gradientOpacity")}),DM({type:"rect",role:"legend-gradient",encode:i},r)},jM=function(e,t,n,r,i){var a,o,s,u,A,c,l=kM(e,n),f=l.isVertical(),h=l.gradientThickness(),g=l.gradientLength(),d="";return f?(s="y",A="y2",u="x",c="width",d="1-"):(s="x",A="x2",u="y",c="height"),(o={opacity:BM,fill:{scale:t,field:"value"}})[s]={signal:d+"datum.perc",mult:g},o[u]=BM,o[A]={signal:d+"datum.perc2",mult:g},o[c]=PR(h),GR(a={enter:o,update:Object(R.o)({},o,{opacity:wM}),exit:{opacity:BM}},{stroke:l("gradientStrokeColor"),strokeWidth:l("gradientStrokeWidth")},{opacity:l("gradientOpacity")}),DM({type:"rect",role:"legend-band",key:"value",from:i,encode:a},r)},MM="datum.".concat("perc",'<=0?"').concat("left",'":datum.').concat("perc",'>=1?"').concat("right",'":"').concat("center",'"'),NM="datum.".concat("perc",'<=0?"').concat("bottom",'":datum.').concat("perc",'>=1?"').concat("top",'":"').concat("middle",'"'),FM=function(e,t,n,r){var i,a,o,s,u,A=kM(e,t),c=A.isVertical(),l=PR(A.gradientThickness()),f=A.gradientLength(),h=A("labelOverlap"),g="";return GR(i={enter:a={opacity:BM},update:o={opacity:wM,text:{field:"label"}},exit:{opacity:BM}},{fill:A("labelColor"),fillOpacity:A("labelOpacity"),font:A("labelFont"),fontSize:A("labelFontSize"),fontStyle:A("labelFontStyle"),fontWeight:A("labelFontWeight"),limit:hj(e.labelLimit,t.gradientLabelLimit)}),c?(a.align={value:"left"},a.baseline=o.baseline={signal:NM},s="y",u="x",g="1-"):(a.align=o.align={signal:MM},a.baseline={value:"top"},s="x",u="y"),a[s]=o[s]={signal:g+"datum.perc",mult:f},a[u]=o[u]=l,l.offset=hj(e.labelOffset,t.gradientLabelOffset)||0,h=h?{separation:A("labelSeparation"),method:h,order:"datum.index"}:void 0,DM({type:"text",role:"legend-label",style:"guide-label",key:"value",from:r,encode:i,overlap:h},n)},TM=function(e,t,n,r,i){var a,o,s,u,A,c,l,f=kM(e,t),h=n.entries,g=!(!h||!h.interactive),d=h?h.name:void 0,p=f("clipHeight"),v=f("symbolOffset"),y={data:"value"},m={},I="(".concat(i,") ? datum.").concat("offset"," : datum.").concat("size"),b=p?PR(p):{field:"size"},E="datum.".concat("index"),C="max(1, ".concat(i,")");b.mult=.5,m={enter:a={opacity:BM,x:{signal:I,mult:.5,offset:v},y:b},update:o={opacity:wM,x:a.x,y:a.y},exit:{opacity:BM}};var B=null,w=null;return e.fill||(B=t.symbolBaseFillColor,w=t.symbolBaseStrokeColor),GR(m,{fill:f("symbolFillColor",B),shape:f("symbolType"),size:f("symbolSize"),stroke:f("symbolStrokeColor",w),strokeDash:f("symbolDash"),strokeDashOffset:f("symbolDashOffset"),strokeWidth:f("symbolStrokeWidth")},{opacity:f("symbolOpacity")}),EM.forEach((function(t){e[t]&&(o[t]=a[t]={scale:e[t],field:"value"})})),u=DM({type:"symbol",role:"legend-symbol",key:"value",from:y,clip:!!p||void 0,encode:m},n.symbols),(s=PR(v)).offset=f("labelOffset"),GR(m={enter:a={opacity:BM,x:{signal:I,offset:s},y:b},update:o={opacity:wM,text:{field:"label"},x:a.x,y:a.y},exit:{opacity:BM}},{align:f("labelAlign"),baseline:f("labelBaseline"),fill:f("labelColor"),fillOpacity:f("labelOpacity"),font:f("labelFont"),fontSize:f("labelFontSize"),fontStyle:f("labelFontStyle"),fontWeight:f("labelFontWeight"),limit:f("labelLimit")}),A=DM({type:"text",role:"legend-label",style:"guide-label",key:"value",from:y,encode:m},n.labels),m={enter:{noBound:{value:!p},width:BM,height:p?PR(p):BM,opacity:BM},exit:{opacity:BM},update:o={opacity:wM,row:{signal:null},column:{signal:null}}},f.isVertical(!0)?(c="ceil(item.mark.items.length / ".concat(C,")"),o.row.signal="".concat(E,"%").concat(c),o.column.signal="floor(".concat(E," / ").concat(c,")"),l={field:["row",E]}):(o.row.signal="floor(".concat(E," / ").concat(C,")"),o.column.signal="".concat(E," % ").concat(C),l={field:E}),o.column.signal="(".concat(i,")?").concat(o.column.signal,":").concat(E),QM({role:"scope",from:r={facet:{data:r,name:"value",groupby:"index"}},encode:qR(m,h,CM),marks:[u,A],name:d,interactive:g,sort:l})};var LM='item.orient === "left"',PM='item.orient === "right"',UM="(".concat(LM," || ").concat(PM,")"),GM="datum.vgrad && ".concat(UM),qM=xM('"top"','"bottom"','"middle"'),HM=xM('"right"','"left"','"center"'),YM="datum.vgrad && ".concat(PM," ? (").concat(HM,") : (").concat(UM," && !(datum.vgrad && ").concat(LM,')) ? "left" : ').concat(SM),JM="item._anchor || (".concat(UM,' ? "middle" : "start")'),zM="".concat(GM," ? (").concat(LM," ? -90 : 90) : 0"),KM="".concat(UM," ? (datum.vgrad ? (").concat(PM,' ? "bottom" : "top") : ').concat(qM,') : "top"'),WM=function(e,t){var n;return Object(R.F)(e)&&(e.signal?n=e.signal:e.path?n="pathShape("+VM(e.path)+")":e.sphere&&(n="geoShape("+VM(e.sphere)+', {type: "Sphere"})')),n?t.signalRef(n):!!e};function VM(e){return Object(R.F)(e)&&e.signal?e.signal:Object(R.Z)(e)}var XM=function(e){var t=e.role||"";return t.indexOf("axis")&&t.indexOf("legend")&&t.indexOf("title")?"group"===e.type?"scope":t||"mark":t},ZM=function(e){return{marktype:e.type,name:e.name||void 0,role:e.role||XM(e),zindex:+e.zindex||void 0,aria:e.aria,description:e.description}},$M=function(e,t){return e&&e.signal?t.signalRef(e.signal):!1!==e},eN=function(e,t){var n=mo(e.type);n||Object(R.n)("Unrecognized transform type: "+Object(R.Z)(e.type));var r=ij(n.type.toLowerCase(),null,tN(n,e,t));return e.signal&&t.addSignal(e.signal,t.proxy(r)),r.metadata=n.metadata||{},r};function tN(e,t,n){var r,i,a,o={};for(i=0,a=e.params.length;i<a;++i)o[(r=e.params[i]).name]=nN(r,t,n);return o}function nN(e,t,n){var r=e.type,i=t[e.name];return"index"===r?function(e,t,n){Object(R.H)(t.from)||Object(R.n)('Lookup "from" parameter must be a string literal.');return n.getData(t.from).lookupRef(n,t.key)}(0,t,n):void 0!==i?"param"===r?function(e,t,n){var r=t[e.name];return e.array?(Object(R.A)(r)||Object(R.n)("Expected an array of sub-parameters. Instead: "+Object(R.Z)(r)),r.map((function(t){return iN(e,t,n)}))):iN(e,r,n)}(e,t,n):"projection"===r?n.projectionRef(t[e.name]):e.array&&!lj(i)?i.map((function(t){return rN(e,t,n)})):rN(e,i,n):void(e.required&&Object(R.n)("Missing required "+Object(R.Z)(t.type)+" parameter: "+Object(R.Z)(e.name)))}function rN(e,t,n){var r=e.type;if(lj(t))return aN(r)?Object(R.n)("Expression references can not be signals."):oN(r)?n.fieldRef(t):sN(r)?n.compareRef(t):n.signalRef(t.signal);var i,a=e.expr||oN(r);return a&&((i=t)&&i.expr)?n.exprRef(t.expr,t.as):a&&function(e){return e&&e.field}(t)?sj(t.field,t.as):aN(r)?cR(t,n):function(e){return"data"===e}(r)?oj(n.getData(t).values):oN(r)?sj(t):sN(r)?n.compareRef(t):t}function iN(e,t,n){var r,i,a,o,s;for(o=0,s=e.params.length;o<s;++o){for(a in(i=e.params[o]).key)if(i.key[a]!==t[a]){i=null;break}if(i)break}return i||Object(R.n)("Unsupported parameter: "+Object(R.Z)(t)),r=Object(R.o)(tN(i,t,n),i.key),oj(n.add(Vj(r)))}function aN(e){return"expr"===e}function oN(e){return"field"===e}function sN(e){return"compare"===e}function uN(e,t){return e.$ref?e:e.data&&e.data.$ref?e.data:oj(t.getData(e.data).output)}function AN(e,t,n,r,i){this.scope=e,this.input=t,this.output=n,this.values=r,this.aggregate=i,this.index={}}AN.fromEntries=function(e,t){var n=t.length,r=1,i=t[0],a=t[n-1],o=t[n-2],s=null;for(i&&"load"===i.type&&(i=t[1]),e.add(t[0]);r<n;++r)t[r].params.pulse=oj(t[r-1]),e.add(t[r]),"aggregate"===t[r].type&&(s=t[r]);return new AN(e,i,o,a,s)};var cN=AN.prototype;function lN(e){return Object(R.H)(e)?e:null}function fN(e,t,n){var r,i=cj(n.op,n.field);if(t.ops){for(var a=0,o=t.as.length;a<o;++a)if(t.as[a]===i)return}else t.ops=["count"],t.fields=[null],t.as=["count"];n.op&&(t.ops.push((r=n.op.signal)?e.signalRef(r):n.op),t.fields.push(e.fieldRef(n.field)),t.as.push(i))}function hN(e,t,n,r,i,a,o){var s,u,A=t[n]||(t[n]={}),c=function(e){return Object(R.F)(e)?("descending"===e.order?"-":"+")+cj(e.op,e.field):""}(a),l=lN(i);if(null!=l&&(e=t.scope,s=A[l+=c?"|"+c:""]),!s){var f=a?{field:uj,pulse:t.countsRef(e,i,a)}:{field:e.fieldRef(i),pulse:oj(t.output)};c&&(f.sort=e.sortRef(a)),u=e.add(ij(r,void 0,f)),o&&(t.index[i]=u),s=oj(u),null!=l&&(A[l]=s)}return s}cN.countsRef=function(e,t,n){var r,i,a,o=this.counts||(this.counts={}),s=lN(t);return null!=s&&(e=this.scope,r=o[s]),r?n&&n.field&&fN(e,r.agg.params,n):(a={groupby:e.fieldRef(t,"key"),pulse:oj(this.output)},n&&n.field&&fN(e,a,n),i=e.add(Rj(a)),r=e.add(Nj({pulse:oj(i)})),r={agg:i,ref:oj(r)},null!=s&&(o[s]=r)),r.ref},cN.tuplesRef=function(){return oj(this.values)},cN.extentRef=function(e,t){return hN(e,this,"extent","extent",t,!1)},cN.domainRef=function(e,t){return hN(e,this,"domain","values",t,!1)},cN.valuesRef=function(e,t,n){return hN(e,this,"vals","values",t,n||!0)},cN.lookupRef=function(e,t){return hN(e,this,"lookup","tupleindex",t,!1)},cN.indataRef=function(e,t){return hN(e,this,"indata","tupleindex",t,!0,!0)};var gN=function(e,t,n){var r,i,a=e.remove,o=e.insert,s=e.toggle,u=e.modify,A=e.values,c=t.add(aj());r="if("+e.trigger+',modify("'+n+'",'+[o,a,s,u,A].map((function(e){return null==e?"null":e})).join(",")+"),0)",i=cR(r,t),c.update=i.$expr,c.params=i.$params},dN=function(e,t){var n,r,i,a,o,s,u,A,c,l,f,h,g,d,p=XM(e),v="group"===e.type,y=e.from&&e.from.facet,m=e.layout||"scope"===p||"frame"===p,I="mark"===p||m||y,b=e.overlap;i=function(e,t,n){var r,i,a,o,s;return e?(r=e.facet)&&(t||Object(R.n)("Only group marks can be faceted."),null!=r.field?o=s=uN(r,n):(e.data?s=oj(n.getData(e.data).aggregate):((a=eN(Object(R.o)({type:"aggregate",groupby:Object(R.i)(r.groupby)},r.aggregate),n)).params.key=n.keyRef(r.groupby),a.params.pulse=uN(r,n),o=s=oj(n.add(a))),i=n.keyRef(r.groupby,!0))):o=oj(n.add(Nj(null,[{}]))),o||(o=uN(e,n)),{key:i,pulse:o,parent:s}}(e.from,v,t),l=oj(r=t.add(Tj({key:i.key||(e.key?sj(e.key):void 0),pulse:i.pulse,clean:!v}))),r=a=t.add(Nj({pulse:l})),r=t.add(Jj({markdef:ZM(e),interactive:$M(e.interactive,t),clip:WM(e.clip,t),context:{$context:!0},groups:t.lookup(),parent:t.signals.parent?t.signalRef("parent"):null,index:t.markpath(),pulse:oj(r)})),f=oj(r),(r=o=t.add(Lj(XR(e.encode,e.type,p,e.style,t,{mod:!1,pulse:f})))).params.parent=t.encode(),e.transform&&e.transform.forEach((function(e){var n=eN(e,t),i=n.metadata;(i.generates||i.changes)&&Object(R.n)("Mark transforms should not generate new data."),i.nomod||(o.params.mod=!0),n.params.pulse=oj(r),t.add(r=n)})),e.sort&&(r=t.add(iM({sort:t.compareRef(e.sort),pulse:oj(r)}))),h=oj(r),(y||m)&&(g=oj(m=t.add(aM({layout:t.objectProperty(e.layout),legends:t.legends,mark:f,pulse:h})))),d=oj(s=t.add(Mj({mark:f,pulse:g||h}))),v&&(I&&((n=t.operators).pop(),m&&n.pop()),t.pushState(h,g||d,l),y?function(e,t,n){var r,i,a,o,s=e.from.facet,u=s.name,A=uN(s,t);s.name||Object(R.n)("Facet must have a name: "+Object(R.Z)(s)),s.data||Object(R.n)("Facet must reference a data set: "+Object(R.Z)(s)),s.field?o=t.add(Xj({field:t.fieldRef(s.field),pulse:A})):s.groupby?o=t.add(Uj({key:t.keyRef(s.groupby),group:oj(t.proxy(n.parent)),pulse:A})):Object(R.n)("Facet must specify groupby or field: "+Object(R.Z)(s)),i=(r=t.fork()).add(Nj()),a=r.add(rM({pulse:oj(i)})),r.addData(u,new AN(r,i,i,a)),r.addSignal("parent",null),o.params.subflow={$subflow:r.parse(e).toRuntime()}}(e,t,i):I?function(e,t,n){var r=t.add(Xj({pulse:n.pulse})),i=t.fork();i.add(rM()),i.addSignal("parent",null),r.params.subflow={$subflow:i.parse(e).toRuntime()}}(e,t,i):t.parse(e),t.popState(),I&&(m&&n.push(m),n.push(s))),b&&(d=function(e,t,n){var r,i=e.method,a=e.bound,o=e.separation,s={separation:lj(o)?n.signalRef(o.signal):o,method:lj(i)?n.signalRef(i.signal):i,pulse:t};e.order&&(s.sort=n.compareRef({field:e.order}));a&&(r=a.tolerance,s.boundTolerance=lj(r)?n.signalRef(r.signal):+r,s.boundScale=n.scaleRef(a.scale),s.boundOrient=a.orient);return oj(n.add(Wj(s)))}(b,d,t)),u=t.add(tM({pulse:d})),A=t.add(rM({pulse:oj(u)},void 0,t.parent())),null!=e.name&&(c=e.name,t.addData(c,new AN(t,a,u,A)),e.on&&e.on.forEach((function(e){(e.insert||e.remove||e.toggle)&&Object(R.n)("Marks only support modify triggers."),gN(e,t,c)})))};var pN=function(e,t){var n,r,i,a,o,s,u,A,c=t.config.legend,l=e.encode||{},f=l.legend||{},h=f.name||void 0,g=f.interactive,d=f.style,p=kM(e,c),v={},y=0;return EM.forEach((function(t){return e[t]?(v[t]=e[t],y=y||e[t]):0})),y||Object(R.n)("Missing valid scale for legend."),o=function(e,t){var n=e.type||"symbol";e.type||1!==function(e){return EM.reduce((function(t,n){return t+(e[n]?1:0)}),0)}(e)||!e.fill&&!e.stroke||(n=Bp(t)?"gradient":Qp(t)?"discrete":"symbol");return"gradient"!==n?n:Qp(t)?"discrete":"gradient"}(e,t.scaleType(y)),s={title:null!=e.title,scales:v,type:o,vgrad:"symbol"!==o&&p.isVertical()},u=oj(t.add(Nj(null,[s]))),f=qR(function(e,t,n){var r={enter:{},update:{}};return GR(r,{orient:e("orient"),offset:e("offset"),padding:e("padding"),titlePadding:e("titlePadding"),cornerRadius:e("cornerRadius"),fill:e("fillColor"),stroke:e("strokeColor"),strokeWidth:n.strokeWidth,strokeDash:n.strokeDash,x:e("legendX"),y:e("legendY"),format:t.format,formatType:t.formatType}),r}(p,e,c),f,CM),n={enter:{x:{value:0},y:{value:0}}},A=oj(t.add(Hj(i={type:o,scale:t.scaleRef(y),count:t.objectProperty(p("tickCount")),limit:t.property(p("symbolLimit")),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)}))),"gradient"===o?(a=[RM(e,y,c,l.gradient),FM(e,c,l.labels,A)],i.count=i.count||t.signalRef("max(2,2*floor((".concat(gj(p.gradientLength()),")/100))"))):"discrete"===o?a=[jM(e,y,c,l.gradient,A),FM(e,c,l.labels,A)]:(r=function(e,t){var n=kM(e,t);return{align:n("gridAlign"),columns:n.entryColumns(),center:{row:!0,column:!1},padding:{row:n("rowPadding"),column:n("columnPadding")}}}(e,c),a=[TM(e,c,l,A,gj(r.columns))],i.size=function(e,t,n){var r=gj(vN("size",e,n)),i=gj(vN("strokeWidth",e,n)),a=gj(function(e,t,n){return _M("fontSize",e)||function(e,t,n){var r=t.config.style[n];return r&&r[e]}("fontSize",t,n)}(n[1].encode,t,"guide-label"));return cR("max(ceil(sqrt(".concat(r,")+").concat(i,"),").concat(a,")"),t)}(e,t,a[0].marks)),a=[QM({role:"legend-entry",from:u,encode:n,marks:a,layout:r,interactive:g})],s.title&&a.push(function(e,t,n,r){var i,a=kM(e,t);return GR(i={enter:{opacity:BM},update:{opacity:wM,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:BM}},{orient:a("titleOrient"),_anchor:a("titleAnchor"),anchor:{signal:JM},angle:{signal:zM},align:{signal:YM},baseline:{signal:KM},text:e.title,fill:a("titleColor"),fillOpacity:a("titleOpacity"),font:a("titleFont"),fontSize:a("titleFontSize"),fontStyle:a("titleFontStyle"),fontWeight:a("titleFontWeight"),limit:a("titleLimit"),lineHeight:a("titleLineHeight")},{align:a("titleAlign"),baseline:a("titleBaseline")}),DM({type:"text",role:"legend-title",style:"guide-title",from:r,encode:i},n)}(e,c,l.title,u)),dN(QM({role:"legend",from:u,encode:f,marks:a,aria:p("aria"),description:p("description"),zindex:p("zindex"),name:h,interactive:g,style:d}),t)};function vN(e,t,n){return t[e]?'scale("'.concat(t[e],'",datum)'):_M(e,n[0].encode)}var yN='item.orient==="'.concat("left",'"?-90:item.orient==="').concat("right",'"?90:0'),mN=function(e,t){var n,r,i=kM(e=Object(R.H)(e)?{text:e}:e,t.config.title),a=e.encode||{},o=a.group||{},s=o.name||void 0,u=o.interactive,A=o.style,c=[];return n={},r=oj(t.add(Nj(null,[n]))),c.push(function(e,t,n,r){var i={value:0},a=e.text,o={enter:{opacity:i},update:{opacity:{value:1}},exit:{opacity:i}};return GR(o,{text:a,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("color"),font:t("font"),fontSize:t("fontSize"),fontStyle:t("fontStyle"),fontWeight:t("fontWeight"),lineHeight:t("lineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),DM({type:"text",role:"title-text",style:"group-title",from:r,encode:o},n)}(e,i,function(e){var t=e.encode;return t&&t.title||Object(R.o)({name:e.name,interactive:e.interactive,style:e.style},t)}(e),r)),e.subtitle&&c.push(function(e,t,n,r){var i={value:0},a=e.subtitle,o={enter:{opacity:i},update:{opacity:{value:1}},exit:{opacity:i}};return GR(o,{text:a,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("subtitleColor"),font:t("subtitleFont"),fontSize:t("subtitleFontSize"),fontStyle:t("subtitleFontStyle"),fontWeight:t("subtitleFontWeight"),lineHeight:t("subtitleLineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),DM({type:"text",role:"title-subtitle",style:"group-subtitle",from:r,encode:o},n)}(e,i,a.subtitle,r)),dN(QM({role:"title",from:r,encode:IN(i,o),marks:c,aria:i("aria"),description:i("description"),zindex:i("zindex"),name:s,interactive:u,style:A}),t)};function IN(e,t){var n={enter:{},update:{}};return GR(n,{orient:e("orient"),anchor:e("anchor"),align:{signal:SM},angle:{signal:yN},limit:e("limit"),frame:e("frame"),offset:e("offset")||0,padding:e("subtitlePadding")}),qR(n,t,CM)}function bN(e,t){var n=[];e.transform&&e.transform.forEach((function(e){n.push(eN(e,t))})),e.on&&e.on.forEach((function(n){gN(n,t,e.name)})),t.addDataPipeline(e.name,function(e,t,n){var r,i,a,o,s,u=[],A=null,c=!1,l=!1;e.values?fj(e.values)||fj(e.format)?(u.push(CN(t,e)),u.push(A=EN())):u.push(A=EN({$ingest:e.values,$format:e.format})):e.url?fj(e.url)||fj(e.format)?(u.push(CN(t,e)),u.push(A=EN())):u.push(A=EN({$request:e.url,$format:e.format})):e.source&&(A=r=Object(R.i)(e.source).map((function(e){return oj(t.getData(e).output)})),u.push(null));for(i=0,a=n.length;i<a;++i)o=n[i],s=o.metadata,A||s.source||u.push(A=EN()),u.push(o),s.generates&&(l=!0),s.modifies&&!l&&(c=!0),s.source?A=o:s.changes&&(A=null);r&&(a=r.length-1,u[0]=eM({derive:c,pulse:a?r:r[0]}),(c||a)&&u.splice(1,0,EN()));A||u.push(EN());return u.push(rM({})),u}(e,t,n))}function EN(e){var t=Nj({},e);return t.metadata={source:!0},t}function CN(e,t){return Yj({url:t.url?e.property(t.url):void 0,async:t.async?e.property(t.async):void 0,values:t.values?e.property(t.values):void 0,format:e.objectProperty(t.format)})}var BN=function(e){return"bottom"===e||"top"===e},wN=function(e,t,n){return lj(e)?ON(e.signal,t,n):"left"===e||"top"===e?t:n},QN=function(e,t,n){return lj(e)?xN(e.signal,t,n):BN(e)?t:n},kN=function(e,t,n){return lj(e)?SN(e.signal,t,n):BN(e)?n:t},_N=function(e,t,n){return lj(e)?DN(e.signal,t,n):"top"===e?{value:t}:{value:n}},xN=function(e,t,n){return jN("".concat(e," === '").concat("top","' || ").concat(e," === '").concat("bottom","'"),t,n)},SN=function(e,t,n){return jN("".concat(e," !== '").concat("top","' && ").concat(e," !== '").concat("bottom","'"),t,n)},ON=function(e,t,n){return NN("".concat(e," === '").concat("left","' || ").concat(e," === '").concat("top","'"),t,n)},DN=function(e,t,n){return NN("".concat(e," === '").concat("top","'"),t,n)},RN=function(e,t,n){return NN("".concat(e," === '").concat("right","'"),t,n)},jN=function(e,t,n){return t=null!=t?PR(t):t,n=null!=n?PR(n):n,MN(t)&&MN(n)?(t=t?t.signal||Object(R.Z)(t.value):null,n=n?n.signal||Object(R.Z)(n.value):null,{signal:"".concat(e," ? (").concat(t,") : (").concat(n,")")}):[Object(R.o)({test:e},t)].concat(n||[])},MN=function(e){return null==e||1===Object.keys(e).length},NN=function(e,t,n){return{signal:"".concat(e," ? (").concat(FN(t),") : (").concat(FN(n),")")}},FN=function(e){return lj(e)?e.signal:null==e?null:Object(R.Z)(e)},TN=function(e,t){var n=e.signal;return n&&n.endsWith("(null)")?{signal:n.slice(0,-6)+t.signal}:e};function LN(e,t,n,r){var i;if(t&&Object(R.v)(t,e))return t[e];if(Object(R.v)(n,e))return n[e];if(e.startsWith("title")){switch(e){case"titleColor":i="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":i=e[5].toLowerCase()+e.slice(6)}return r["guide-title"][i]}if(e.startsWith("label")){switch(e){case"labelColor":i="fill";break;case"labelFont":case"labelFontSize":i=e[5].toLowerCase()+e.slice(6)}return r["guide-label"][i]}return null}function PN(e){var t,n={},r=Object(D.a)(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(i)for(var a in i)n[a]=1}}catch(o){r.e(o)}finally{r.f()}return Object.keys(n)}function UN(e,t){return{scale:e.scale,range:t}}var GN=function(e,t,n,r,i){var a,o,s,u,A,c,l,f,h=kM(e,t),g=e.orient,d=e.gridScale,p=wN(g,1,-1),v=function(e,t){if(1===t);else if(Object(R.F)(e)){for(var n=e=Object(R.o)({},e);null!=n.mult;){if(!Object(R.F)(n.mult))return n.mult=lj(t)?{signal:"(".concat(n.mult,") * (").concat(t.signal,")")}:n.mult*t,e;n=n.mult=Object(R.o)({},n.mult)}n.mult=t}else e=lj(t)?{signal:"(".concat(t.signal,") * (").concat(e||0,")")}:t*(e||0);return e}(e.offset,p);return GR(a={enter:o={opacity:BM},update:u={opacity:wM},exit:s={opacity:BM}},{stroke:h("gridColor"),strokeCap:h("gridCap"),strokeDash:h("gridDash"),strokeDashOffset:h("gridDashOffset"),strokeOpacity:h("gridOpacity"),strokeWidth:h("gridWidth")}),A={scale:e.scale,field:"value",band:i.band,extra:i.extra,offset:i.offset,round:h("tickRound")},f=QN(g,{signal:"height"},{signal:"width"}),c=d?{scale:d,range:0,mult:p,offset:v}:{value:0,offset:v},l=d?{scale:d,range:1,mult:p,offset:v}:Object(R.o)(f,{mult:p,offset:v}),o.x=u.x=QN(g,A,c),o.y=u.y=kN(g,A,c),o.x2=u.x2=kN(g,l),o.y2=u.y2=QN(g,l),s.x=QN(g,A),s.y=kN(g,A),DM({type:"rule",role:"axis-grid",key:"value",from:r,encode:a},n)};function qN(e,t,n,r,i){return{signal:'flush(range("'+e+'"), scale("'+e+'", datum.value), '+t+","+n+","+r+","+i+")"}}var HN=function(e,t,n,r,i,a){var o,s,u,A,c,l,f,h,g,d,p=kM(e,t),v=e.orient,y=e.scale,m=wN(v,-1,1),I=gj(p("labelFlush")),b=gj(p("labelFlushOffset")),E=0===I||!!I,C=p("labelAlign"),B=p("labelBaseline");return(A=PR(i)).mult=m,A.offset=PR(p("labelPadding")||0),A.offset.mult=m,c={scale:y,field:"value",band:.5,offset:OM(a.offset,p("labelOffset"))},l=QN(v,E?qN(y,I,'"left"','"right"','"center"'):{value:"center"},function(e,t,n){return lj(e)?RN(e.signal,t,n):"right"===e?{value:t}:{value:n}}(v,"left","right")),f=QN(v,_N(v,"bottom","top"),E?qN(y,I,'"top"','"bottom"','"middle"'):{value:"middle"}),d=qN(y,I,"-(".concat(b,")"),b,0),E=E&&b,GR(o={enter:s={opacity:BM,x:QN(v,c,A),y:kN(v,c,A)},update:u={opacity:wM,text:{field:"label"},x:s.x,y:s.y,align:l,baseline:f},exit:{opacity:BM,x:s.x,y:s.y}},{dx:!C&&E?QN(v,d):null,dy:!B&&E?kN(v,d):null}),GR(o,{angle:p("labelAngle"),fill:p("labelColor"),fillOpacity:p("labelOpacity"),font:p("labelFont"),fontSize:p("labelFontSize"),fontWeight:p("labelFontWeight"),fontStyle:p("labelFontStyle"),limit:p("labelLimit"),lineHeight:p("labelLineHeight")},{align:C,baseline:B}),h=p("labelBound"),g=(g=p("labelOverlap"))||h?{separation:p("labelSeparation"),method:g,order:"datum.index",bound:h?{scale:y,orient:v,tolerance:h}:null}:void 0,u.align!==l&&(u.align=TN(u.align,l)),u.baseline!==f&&(u.baseline=TN(u.baseline,f)),DM({type:"text",role:"axis-label",style:"guide-label",key:"value",from:r,encode:o,overlap:g},n)},YN=function(e,t,n,r){var i,a,o,s,u=kM(e,t),A=e.orient,c=wN(A,-1,1);return i={enter:a={opacity:BM,anchor:PR(u("titleAnchor",null)),align:{signal:SM}},update:o=Object(R.o)({},a,{opacity:wM,text:PR(e.title)}),exit:{opacity:BM}},s={signal:'lerp(range("'.concat(e.scale,'"), ').concat(xM(0,1,.5),")")},o.x=QN(A,s),o.y=kN(A,s),a.angle=QN(A,BM,function(e,t){return 0===t?0:lj(e)?{signal:"(".concat(e.signal,") * ").concat(t)}:{value:e*t}}(c,90)),a.baseline=QN(A,_N(A,"bottom","top"),{value:"bottom"}),o.angle=a.angle,o.baseline=a.baseline,GR(i,{fill:u("titleColor"),fillOpacity:u("titleOpacity"),font:u("titleFont"),fontSize:u("titleFontSize"),fontStyle:u("titleFontStyle"),fontWeight:u("titleFontWeight"),limit:u("titleLimit"),lineHeight:u("titleLineHeight")},{align:u("titleAlign"),angle:u("titleAngle"),baseline:u("titleBaseline")}),function(e,t,n,r){var i=function(e,t){return null!=e?(n.update[t]=TN(PR(e),n.update[t]),!1):!HR(t,r)},a=i(e("titleX"),"x"),o=i(e("titleY"),"y");n.enter.auto=o===a?PR(o):QN(t,PR(o),PR(a))}(u,A,i,n),i.update.align=TN(i.update.align,a.align),i.update.angle=TN(i.update.angle,a.angle),i.update.baseline=TN(i.update.baseline,a.baseline),DM({type:"text",role:"axis-title",style:"guide-title",from:r,encode:i},n)};var JN=function(e,t){var n,r,i,a,o,s=function(e,t){var n,r,i,a,o,s,u,A,c=t.config,l=c.style,f=c.axis,h="band"===t.scaleType(e.scale)&&c.axisBand,g=e.orient;if(lj(g)){var d=PN([c.axisX,c.axisY]),p=PN([c.axisTop,c.axisBottom,c.axisLeft,c.axisRight]);n={};var v,y=Object(D.a)(d);try{for(y.s();!(v=y.n()).done;)n[i=v.value]=QN(g,LN(i,c.axisX,f,l),LN(i,c.axisY,f,l))}catch(b){y.e(b)}finally{y.f()}r={};var m,I=Object(D.a)(p);try{for(I.s();!(m=I.n()).done;)r[i=m.value]=(a=g.signal,o=LN(i,c.axisTop,f,l),s=LN(i,c.axisBottom,f,l),u=LN(i,c.axisLeft,f,l),A=LN(i,c.axisRight,f,l),{signal:(null!=u?"".concat(a," === '").concat("left","' ? (").concat(FN(u),") : "):"")+(null!=s?"".concat(a," === '").concat("bottom","' ? (").concat(FN(s),") : "):"")+(null!=A?"".concat(a," === '").concat("right","' ? (").concat(FN(A),") : "):"")+(null!=o?"".concat(a," === '").concat("top","' ? (").concat(FN(o),") : "):"")+"(null)"})}catch(b){I.e(b)}finally{I.f()}}else n="top"===g||"bottom"===g?c.axisX:c.axisY,r=c["axis"+g[0].toUpperCase()+g.slice(1)];return n||r||h?Object(R.o)({},f,n,r,h):f}(e,t),u=e.encode||{},A=u.axis||{},c=A.name||void 0,l=A.interactive,f=A.style,h=kM(e,s),g=function(e){var t,n,r=e("tickBand"),i=e("tickOffset");return r?r.signal?(t={signal:"(".concat(r.signal,") === 'extent' ? 1 : 0.5")},n={signal:"(".concat(r.signal,") === 'extent'")},Object(R.F)(i)||(i={signal:"(".concat(r.signal,") === 'extent' ? 0 : ").concat(i)})):"extent"===r?(t=1,n=!0,i=0):(t=.5,n=!1):(t=e("bandPosition"),n=e("tickExtra")),{extra:n,band:t,offset:i}}(h);return n={scale:e.scale,ticks:!!h("ticks"),labels:!!h("labels"),grid:!!h("grid"),domain:!!h("domain"),title:null!=e.title},r=oj(t.add(Nj({},[n]))),A=qR(function(e,t){var n={enter:{},update:{}};return GR(n,{orient:e("orient"),offset:e("offset")||0,position:hj(t.position,0),titlePadding:e("titlePadding"),minExtent:e("minExtent"),maxExtent:e("maxExtent"),range:{signal:'abs(span(range("'.concat(t.scale,'")))')},translate:e("translate"),format:t.format,formatType:t.formatType}),n}(h,e),A,CM),i=oj(t.add(jj({scale:t.scaleRef(e.scale),extra:t.property(g.extra),count:t.objectProperty(e.tickCount),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)}))),o=[],n.grid&&o.push(GN(e,s,u.grid,i,g)),n.ticks&&(a=h("tickSize"),o.push(function(e,t,n,r,i,a){var o,s,u,A,c,l,f=kM(e,t),h=e.orient,g=wN(h,-1,1);return GR(o={enter:s={opacity:BM},update:A={opacity:wM},exit:u={opacity:BM}},{stroke:f("tickColor"),strokeCap:f("tickCap"),strokeDash:f("tickDash"),strokeDashOffset:f("tickDashOffset"),strokeOpacity:f("tickOpacity"),strokeWidth:f("tickWidth")}),(c=PR(i)).mult=g,l={scale:e.scale,field:"value",band:a.band,extra:a.extra,offset:a.offset,round:f("tickRound")},A.y=s.y=QN(h,BM,l),A.y2=s.y2=QN(h,c),u.x=QN(h,l),A.x=s.x=kN(h,BM,l),A.x2=s.x2=kN(h,c),u.y=kN(h,l),DM({type:"rule",role:"axis-tick",key:"value",from:r,encode:o},n)}(e,s,u.ticks,i,a,g))),n.labels&&(a=n.ticks?a:0,o.push(HN(e,s,u.labels,i,a,g))),n.domain&&o.push(function(e,t,n,r){var i,a,o,s=kM(e,t),u=e.orient;GR(i={enter:a={opacity:BM},update:o={opacity:wM},exit:{opacity:BM}},{stroke:s("domainColor"),strokeCap:s("domainCap"),strokeDash:s("domainDash"),strokeDashOffset:s("domainDashOffset"),strokeWidth:s("domainWidth"),strokeOpacity:s("domainOpacity")});var A=UN(e,0),c=UN(e,1);return a.x=o.x=QN(u,A,BM),a.x2=o.x2=QN(u,c),a.y=o.y=kN(u,A,BM),a.y2=o.y2=kN(u,c),DM({type:"rule",role:"axis-domain",from:r,encode:i},n)}(e,s,u.domain,r)),n.title&&o.push(YN(e,s,u.title,r)),dN(QM({role:"axis",from:r,encode:A,marks:o,aria:h("aria"),description:h("description"),zindex:h("zindex"),name:c,interactive:l,style:f}),t)};var zN=function(e,t,n){var r=Object(R.i)(e.signals),i=Object(R.i)(e.scales);return n||r.forEach((function(e){return nj(e,t)})),Object(R.i)(e.projections).forEach((function(e){return function(e,t){var n=t.config.projection||{},r={};for(var i in e)"name"!==i&&(r[i]=bM(e[i],i,t));for(i in n)null==r[i]&&(r[i]=bM(n[i],i,t));t.addProjection(e.name,r)}(e,t)})),i.forEach((function(e){return function(e,t){var n=e.type||"linear";Ep(n)||Object(R.n)("Unrecognized scale type: "+Object(R.Z)(n)),t.addScale(e.name,{type:n,domain:void 0})}(e,t)})),Object(R.i)(e.data).forEach((function(e){return bN(e,t)})),i.forEach((function(e){return AM(e,t)})),(n||r).forEach((function(e){return function(e,t){var n=t.getSignal(e.name),r=e.update;e.init&&(r?Object(R.n)("Signals can not include both init and update expressions."):(r=e.init,n.initonly=!0)),r&&(r=cR(r,t),n.update=r.$expr,n.params=r.$params),e.on&&e.on.forEach((function(e){Sj(e,t,n.id)}))}(e,t)})),Object(R.i)(e.axes).forEach((function(e){return JN(e,t)})),Object(R.i)(e.marks).forEach((function(e){return dN(e,t)})),Object(R.i)(e.legends).forEach((function(e){return pN(e,t)})),e.title&&mN(e.title,t),t.parseLambdas(),t};function KN(e,t){var n=t.config,r=oj(t.root=t.add(aj())),i=function(e,t){var n=function(n){return hj(e[n],t[n])},r=[WN("background",n("background")),WN("autosize",FR(n("autosize"))),WN("padding",LR(n("padding"))),WN("width",n("width")||0),WN("height",n("height")||0)],i=r.reduce((function(e,t){return e[t.name]=t,e}),{}),a={};return Object(R.i)(e.signals).forEach((function(e){Object(R.v)(i,e.name)?e=Object(R.o)(i[e.name],e):r.push(e),a[e.name]=e})),Object(R.i)(t.signals).forEach((function(e){Object(R.v)(a,e.name)||Object(R.v)(i,e.name)||r.push(e)})),r}(e,n);i.forEach((function(e){return nj(e,t)})),t.description=e.description||n.description,t.eventConfig=n.events,t.legends=t.objectProperty(n.legend&&n.legend.layout),t.locale=n.locale;var a=t.add(Nj()),o=t.add(Lj(XR(function(e){return qR({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},e)}(e.encode),"group","frame",e.style,t,{pulse:oj(a)}))),s=t.add(aM({layout:t.objectProperty(e.layout),legends:t.legends,autosize:t.signalRef("autosize"),mark:r,pulse:oj(o)}));t.operators.pop(),t.pushState(oj(o),oj(s),null),zN(e,t,i),t.operators.push(s);var u=t.add(Mj({mark:r,pulse:oj(s)}));return u=t.add(tM({pulse:oj(u)})),u=t.add(rM({pulse:oj(u)})),t.addData("root",new AN(t,a,a,u)),t}function WN(e,t){return t&&t.signal?{name:e,update:t.signal}:{name:e,value:t}}function VN(e,t){this.config=e||{},this.options=t||{},this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.eventConfig=null,this.locale=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function XN(e){this.config=e.config,this.options=e.options,this.legends=e.legends,this.field=Object.create(e.field),this.signals=Object.create(e.signals),this.lambdas=Object.create(e.lambdas),this.scales=Object.create(e.scales),this.events=Object.create(e.events),this.data=Object.create(e.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++e._nextsub[0],this._nextsub=e._nextsub,this._parent=e._parent.slice(),this._encode=e._encode.slice(),this._lookup=e._lookup.slice(),this._markpath=e._markpath}var ZN=VN.prototype=XN.prototype;function $N(e){return(Object(R.A)(e)?eF:tF)(e)}function eF(e){for(var t,n="[",r=0,i=e.length;r<i;++r)t=e[r],n+=(r>0?",":"")+(Object(R.F)(t)?t.signal||$N(t):Object(R.Z)(t));return n+"]"}function tF(e){var t,n,r="{",i=0;for(t in e)n=e[t],r+=(++i>1?",":"")+Object(R.Z)(t)+":"+(Object(R.F)(n)?n.signal||$N(n):Object(R.Z)(n));return r+"}"}ZN.parse=function(e){return zN(e,this)},ZN.fork=function(){return new XN(this)},ZN.isSubscope=function(){return this._subid>0},ZN.toRuntime=function(){return this.finish(),{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig,locale:this.locale}},ZN.id=function(){return(this._subid?this._subid+":":0)+this._id++},ZN.add=function(e){return this.operators.push(e),e.id=this.id(),e.refs&&(e.refs.forEach((function(t){t.$ref=e.id})),e.refs=null),e},ZN.proxy=function(e){var t=e instanceof rj?oj(e):e;return this.add($j({value:t}))},ZN.addStream=function(e){return this.streams.push(e),e.id=this.id(),e},ZN.addUpdate=function(e){return this.updates.push(e),e},ZN.finish=function(){var e,t;for(e in this.root&&(this.root.root=!0),this.signals)this.signals[e].signal=e;for(e in this.scales)this.scales[e].scale=e;function n(e,t,n){var r;e&&((r=e.data||(e.data={}))[t]||(r[t]=[])).push(n)}for(e in this.data)for(var r in n((t=this.data[e]).input,e,"input"),n(t.output,e,"output"),n(t.values,e,"values"),t.index)n(t.index[r],e,"index:"+r);return this},ZN.pushState=function(e,t,n){this._encode.push(oj(this.add(rM({pulse:e})))),this._parent.push(t),this._lookup.push(n?oj(this.proxy(n)):null),this._markpath.push(-1)},ZN.popState=function(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},ZN.parent=function(){return Object(R.U)(this._parent)},ZN.encode=function(){return Object(R.U)(this._encode)},ZN.lookup=function(){return Object(R.U)(this._lookup)},ZN.markpath=function(){var e=this._markpath;return++e[e.length-1]},ZN.fieldRef=function(e,t){if(Object(R.H)(e))return sj(e,t);e.signal||Object(R.n)("Unsupported field reference: "+Object(R.Z)(e));var n,r=e.signal,i=this.field[r];return i||(n={name:this.signalRef(r)},t&&(n.as=t),this.field[r]=i=oj(this.add(Gj(n)))),i},ZN.compareRef=function(e){function t(e){return lj(e)?(r=!0,n.signalRef(e.signal)):function(e){return e&&e.expr}(e)?(r=!0,n.exprRef(e.expr)):e}var n=this,r=!1,i=Object(R.i)(e.field).map(t),a=Object(R.i)(e.order).map(t);return r?oj(this.add(Fj({fields:i,orders:a}))):Aj(i,a)},ZN.keyRef=function(e,t){var n=this.signals,r=!1;return e=Object(R.i)(e).map((function(e){return lj(e)?(r=!0,oj(n[e.signal])):e})),r?oj(this.add(qj({fields:e,flat:t}))):function(e,t){var n={$key:e};return t&&(n.$flat=!0),n}(e,t)},ZN.sortRef=function(e){if(!e)return e;var t=cj(e.op,e.field),n=e.order||"ascending";return n.signal?oj(this.add(Fj({fields:t,orders:this.signalRef(n.signal)}))):Aj(t,n)},ZN.event=function(e,t){var n=e+":"+t;if(!this.events[n]){var r=this.id();this.streams.push({id:r,source:e,type:t}),this.events[n]=r}return this.events[n]},ZN.hasOwnSignal=function(e){return Object(R.v)(this.signals,e)},ZN.addSignal=function(e,t){this.hasOwnSignal(e)&&Object(R.n)("Duplicate signal name: "+Object(R.Z)(e));var n=t instanceof rj?t:this.add(aj(t));return this.signals[e]=n},ZN.getSignal=function(e){return this.signals[e]||Object(R.n)("Unrecognized signal name: "+Object(R.Z)(e)),this.signals[e]},ZN.signalRef=function(e){return this.signals[e]?oj(this.signals[e]):(Object(R.v)(this.lambdas,e)||(this.lambdas[e]=this.add(aj(null))),oj(this.lambdas[e]))},ZN.parseLambdas=function(){for(var e=Object.keys(this.lambdas),t=0,n=e.length;t<n;++t){var r=e[t],i=cR(r,this),a=this.lambdas[r];a.params=i.$params,a.update=i.$expr}},ZN.property=function(e){return e&&e.signal?this.signalRef(e.signal):e},ZN.objectProperty=function(e){return e&&Object(R.F)(e)?this.signalRef(e.signal||$N(e)):e},ZN.exprRef=function(e,t){var n={expr:cR(e,this)};return t&&(n.expr.$name=t),oj(this.add(Pj(n)))},ZN.addBinding=function(e,t){this.bindings||Object(R.n)("Nested signals do not support binding: "+Object(R.Z)(e)),this.bindings.push(Object(R.o)({signal:e},t))},ZN.addScaleProj=function(e,t){Object(R.v)(this.scales,e)&&Object(R.n)("Duplicate scale or projection name: "+Object(R.Z)(e)),this.scales[e]=this.add(t)},ZN.addScale=function(e,t){this.addScaleProj(e,nM(t))},ZN.addProjection=function(e,t){this.addScaleProj(e,Zj(t))},ZN.getScale=function(e){return this.scales[e]||Object(R.n)("Unrecognized scale name: "+Object(R.Z)(e)),this.scales[e]},ZN.projectionRef=ZN.scaleRef=function(e){return oj(this.getScale(e))},ZN.projectionType=ZN.scaleType=function(e){return this.getScale(e).params.type},ZN.addData=function(e,t){return Object(R.v)(this.data,e)&&Object(R.n)("Duplicate data set name: "+Object(R.Z)(e)),this.data[e]=t},ZN.getData=function(e){return this.data[e]||Object(R.n)("Undefined data set name: "+Object(R.Z)(e)),this.data[e]},ZN.addDataPipeline=function(e,t){return Object(R.v)(this.data,e)&&Object(R.n)("Duplicate data set name: "+Object(R.Z)(e)),this.addData(e,AN.fromEntries(this,t))};var nF=function(e,t,n){return Object(R.F)(e)||Object(R.n)("Input Vega specification must be an object."),KN(e,new VN(t=Object(R.N)({description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:"#4c78a8"},area:{fill:"#4c78a8"},image:null,line:{stroke:"#4c78a8",strokeWidth:2},path:{stroke:"#4c78a8"},rect:{fill:"#4c78a8"},rule:{stroke:"#000"},shape:{stroke:"#4c78a8"},symbol:{fill:"#4c78a8",size:64},text:{fill:"#000",font:"sans-serif",fontSize:11},trail:{fill:"#4c78a8",size:2},style:{"guide-label":{fill:"#000",font:"sans-serif",fontSize:10},"guide-title":{fill:"#000",font:"sans-serif",fontSize:11,fontWeight:"bold"},"group-title":{fill:"#000",font:"sans-serif",fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:"#000",font:"sans-serif",fontSize:12},point:{size:30,strokeWidth:2,shape:"circle"},circle:{size:30,strokeWidth:2},square:{size:30,strokeWidth:2,shape:"square"},cell:{fill:"transparent",stroke:"#ddd"}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:"#888",grid:!1,gridWidth:1,gridColor:"#ddd",labels:!0,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:!0,tickColor:"#888",tickOffset:0,tickRound:!0,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-.5},projection:{type:"mercator"},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:"#ddd",gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:!0,symbolLimit:30,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:"#888",titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}},t,e.config),n)).toRuntime()};Object(R.o)(yo,a,s,u,A,c,l,f,h,g,d);var rF=n(1072);function iF(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}Object.create;Object.create;n(1306);var aF=n(1073),oF=n.n(aF),sF=n(527),uF=n.n(sF),AF=n(488),cF=n.n(AF);function lF(e){return!!e.or}function fF(e){return!!e.and}function hF(e){return!!e.not}function gF(e,t){return hF(e)?{not:gF(e.not,t)}:fF(e)?{and:e.and.map((function(e){return gF(e,t)}))}:lF(e)?{or:e.or.map((function(e){return gF(e,t)}))}:t(e)}var dF=uF.a,pF=oF.a;function vF(e,t){var n,r={},i=Object(D.a)(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;Object(R.v)(e,a)&&(r[a]=e[a])}}catch(o){i.e(o)}finally{i.f()}return r}function yF(e,t){var n,r=Object.assign({},e),i=Object(D.a)(t);try{for(i.s();!(n=i.n()).done;){delete r[n.value]}}catch(a){i.e(a)}finally{i.f()}return r}Set.prototype.toJSON=function(){return"Set(".concat(Object(im.a)(this).map((function(e){return cF()(e)})).join(","),")")};var mF=cF.a;function IF(e){if(Object(R.E)(e))return e;var t=Object(R.H)(e)?e:cF()(e);if(t.length<250)return t;for(var n=0,r=0;r<t.length;r++){n=(n<<5)-n+t.charCodeAt(r),n&=n}return n}function bF(e){return!1===e||null===e}function EF(e,t){return e.indexOf(t)>-1}function CF(e,t){var n,r=0,i=Object(D.a)(e.entries());try{for(i.s();!(n=i.n()).done;){var a=Object(ks.a)(n.value,2),o=a[0];if(t(a[1],o,r++))return!0}}catch(s){i.e(s)}finally{i.f()}return!1}function BF(e,t){var n,r=0,i=Object(D.a)(e.entries());try{for(i.s();!(n=i.n()).done;){var a=Object(ks.a)(n.value,2),o=a[0];if(!t(a[1],o,r++))return!1}}catch(s){i.e(s)}finally{i.f()}return!0}function wF(e,t){var n,r=Object(D.a)(OF(t));try{for(r.s();!(n=r.n()).done;){var i=n.value;Object(R.jb)(e,i,t[i],!0)}}catch(a){r.e(a)}finally{r.f()}}function QF(e,t){var n,r,i=[],a={},o=Object(D.a)(e);try{for(o.s();!(r=o.n()).done;){var s=r.value;(n=t(s))in a||(a[n]=1,i.push(s))}}catch(u){o.e(u)}finally{o.f()}return i}function kF(e,t){var n,r=Object(D.a)(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(t.has(i))return!0}}catch(a){r.e(a)}finally{r.f()}return!1}function _F(e){var t,n=new Set,r=Object(D.a)(e);try{var i=function(){var e,r=t.value,i=Object(R.Y)(r).map((function(e,t){return 0===t?e:"[".concat(e,"]")})),a=i.map((function(e,t){return i.slice(0,t+1).join("")})),o=Object(D.a)(a);try{for(o.s();!(e=o.n()).done;){var s=e.value;n.add(s)}}catch(u){o.e(u)}finally{o.f()}};for(r.s();!(t=r.n()).done;)i()}catch(a){r.e(a)}finally{r.f()}return n}function xF(e,t){return void 0===e||void 0===t||kF(_F(e),_F(t))}function SF(e){return 0===OF(e).length}var OF=Object.keys,DF=Object.values;function RF(e){var t=[];for(var n in e)Object(R.v)(e,n)&&t.push({key:n,value:e[n]});return t}function jF(e){return!0===e||!1===e}function MF(e){var t=e.replace(/\W/g,"_");return(e.match(/^\d+/)?"_":"")+t}function NF(e,t){return hF(e)?"!("+NF(e.not,t)+")":fF(e)?"("+e.and.map((function(e){return NF(e,t)})).join(") && (")+")":lF(e)?"("+e.or.map((function(e){return NF(e,t)})).join(") || (")+")":t(e)}function FF(e,t){if(0===t.length)return!0;var n=t.shift();return n in e&&FF(e[n],t)&&delete e[n],SF(e)}function TF(e){return e.charAt(0).toUpperCase()+e.substr(1)}function LF(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"datum",n=Object(R.Y)(e),r=[],i=1;i<=n.length;i++){var a="[".concat(n.slice(0,i).map(R.Z).join("]["),"]");r.push("".concat(t).concat(a))}return r.join(" && ")}function PF(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"datum";return"".concat(t,"[").concat(Object(R.Z)(Object(R.Y)(e).join(".")),"]")}function UF(e){return e.replace(/(\[|\]|\.|'|")/g,"\\$1")}function GF(e){return"".concat(Object(R.Y)(e).map(UF).join("\\."))}function qF(e,t,n){return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),n)}function HF(e){return"".concat(Object(R.Y)(e).join("."))}function YF(e){return e?Object(R.Y)(e).length:0}function JF(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var a=i[r];if(void 0!==a)return a}}var zF=42;function KF(e){var t=++zF;return e?String(e)+t:t}function WF(e){return function(e){return 0===e.indexOf("__")}(e)?e:"__".concat(e)}function VF(e){if(void 0!==e)return(e%360+360)%360}function XF(e){return!!Object(R.E)(e)||!isNaN(e)&&!isNaN(parseFloat(e))}var ZF={domainColor:{part:"domain",vgProp:"stroke"},labelAlign:{part:"labels",vgProp:"align"},labelBaseline:{part:"labels",vgProp:"baseline"},labelColor:{part:"labels",vgProp:"fill"},labelFont:{part:"labels",vgProp:"font"},labelFontSize:{part:"labels",vgProp:"fontSize"},labelFontStyle:{part:"labels",vgProp:"fontStyle"},labelFontWeight:{part:"labels",vgProp:"fontWeight"},labelOpacity:{part:"labels",vgProp:"opacity"},labelOffset:null,labelPadding:null,gridColor:{part:"grid",vgProp:"stroke"},gridDash:{part:"grid",vgProp:"strokeDash"},gridDashOffset:{part:"grid",vgProp:"strokeDash"},gridOpacity:{part:"grid",vgProp:"opacity"},gridWidth:{part:"grid",vgProp:"strokeWidth"},tickColor:{part:"ticks",vgProp:"stroke"},tickDash:{part:"ticks",vgProp:"strokeDash"},tickDashOffset:{part:"ticks",vgProp:"strokeDash"},tickOpacity:{part:"ticks",vgProp:"opacity"},tickSize:null,tickWidth:{part:"ticks",vgProp:"strokeWidth"},titleColor:{part:"title",vgProp:"fill"},title:null};function $F(e){return e&&e.condition}var eT=["domain","grid","labels","ticks","title"],tT={grid:"grid",gridCap:"grid",gridColor:"grid",gridDash:"grid",gridDashOffset:"grid",gridOpacity:"grid",gridScale:"grid",gridWidth:"grid",orient:"main",bandPosition:"both",aria:"main",description:"main",domain:"main",domainCap:"main",domainColor:"main",domainDash:"main",domainDashOffset:"main",domainOpacity:"main",domainWidth:"main",format:"main",formatType:"main",labelAlign:"main",labelAngle:"main",labelBaseline:"main",labelBound:"main",labelColor:"main",labelFlush:"main",labelFlushOffset:"main",labelFont:"main",labelFontSize:"main",labelFontStyle:"main",labelFontWeight:"main",labelLimit:"main",labelLineHeight:"main",labelOffset:"main",labelOpacity:"main",labelOverlap:"main",labelPadding:"main",labels:"main",labelSeparation:"main",maxExtent:"main",minExtent:"main",offset:"both",position:"main",tickCap:"main",tickColor:"main",tickDash:"main",tickDashOffset:"main",tickMinStep:"main",tickOffset:"both",tickOpacity:"main",tickRound:"both",ticks:"main",tickSize:"main",tickWidth:"both",title:"main",titleAlign:"main",titleAnchor:"main",titleAngle:"main",titleBaseline:"main",titleColor:"main",titleFont:"main",titleFontSize:"main",titleFontStyle:"main",titleFontWeight:"main",titleLimit:"main",titleLineHeight:"main",titleOpacity:"main",titlePadding:"main",titleX:"main",titleY:"main",encode:"both",scale:"both",tickBand:"both",tickCount:"both",tickExtra:"both",translate:"both",values:"both",zindex:"both"},nT={orient:1,aria:1,bandPosition:1,description:1,domain:1,domainCap:1,domainColor:1,domainDash:1,domainDashOffset:1,domainOpacity:1,domainWidth:1,format:1,formatType:1,grid:1,gridCap:1,gridColor:1,gridDash:1,gridDashOffset:1,gridOpacity:1,gridWidth:1,labelAlign:1,labelAngle:1,labelBaseline:1,labelBound:1,labelColor:1,labelFlush:1,labelFlushOffset:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelLineHeight:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labels:1,labelSeparation:1,maxExtent:1,minExtent:1,offset:1,position:1,tickBand:1,tickCap:1,tickColor:1,tickCount:1,tickDash:1,tickDashOffset:1,tickExtra:1,tickMinStep:1,tickOffset:1,tickOpacity:1,tickRound:1,ticks:1,tickSize:1,tickWidth:1,title:1,titleAlign:1,titleAnchor:1,titleAngle:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titlePadding:1,titleX:1,titleY:1,translate:1,values:1,zindex:1},rT=Object.assign(Object.assign({},nT),{style:1,labelExpr:1,encoding:1});function iT(e){return!!rT[e]}OF(rT);var aT={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"},oT=aT.arc,sT=aT.area,uT=aT.bar,AT=aT.image,cT=aT.line,lT=aT.point,fT=aT.rect,hT=aT.rule,gT=aT.text,dT=aT.tick,pT=aT.trail,vT=aT.circle,yT=aT.square,mT=aT.geoshape;function IT(e){return EF(["line","area","trail"],e)}function bT(e){return EF(["rect","bar","image","arc"],e)}var ET=OF(aT);function CT(e){return e.type}Object(R.db)(ET);var BT=[].concat(["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit"],["fill","fillOpacity"]),wT=OF({color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBand:1,timeUnitBandPosition:1}),QT={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]},kT={binSpacing:1,continuousBandSize:5,timeUnitBandPosition:.5},_T={binSpacing:0,continuousBandSize:5,timeUnitBandPosition:.5};function xT(e){return"mark"in e}var ST=function(){function e(t,n){Object(_.a)(this,e),this.name=t,this.run=n}return Object(x.a)(e,[{key:"hasMatchingType",value:function(e){return!!xT(e)&&(CT(t=e.mark)?t.type:t)===this.name;var t}}]),e}(),OT={argmax:1,argmin:1,average:1,count:1,distinct:1,product:1,max:1,mean:1,median:1,min:1,missing:1,q1:1,q3:1,ci0:1,ci1:1,stderr:1,stdev:1,stdevp:1,sum:1,valid:1,values:1,variance:1,variancep:1},DT={count:1,min:1,max:1};function RT(e){return!!e&&!!e.argmin}function jT(e){return!!e&&!!e.argmax}OF(OT);function MT(e){return Object(R.H)(e)&&!!OT[e]}var NT=["count","valid","missing","distinct"];function FT(e){return Object(R.H)(e)&&EF(NT,e)}var TT=["count","sum","distinct","valid","missing"],LT=Object(R.db)(["mean","average","median","q1","q3","min","max"]),PT="row",UT="column",GT="radius",qT="theta",HT="theta2",YT="color",JT="fill",zT="stroke",KT="shape",WT="size",VT={theta:1,theta2:1,radius:1,radius2:1};function XT(e){return e in VT}var ZT={longitude:1,longitude2:1,latitude:1,latitude2:1};var $T=OF(ZT),eL=Object.assign(Object.assign(Object.assign(Object.assign({},{x:1,y:1,x2:1,y2:1}),VT),ZT),{color:1,fill:1,stroke:1,opacity:1,fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeDash:1,size:1,angle:1,shape:1,order:1,text:1,detail:1,key:1,tooltip:1,href:1,url:1,description:1});function tL(e){return e===YT||e===JT||e===zT}var nL={row:1,column:1,facet:1},rL=OF(nL),iL=Object.assign(Object.assign({},eL),nL),aL=OF(iL),oL=(iL.order,iL.detail,iL.tooltip,iF(iL,["order","detail","tooltip"])),sL=(oL.row,oL.column,oL.facet,iF(oL,["row","column","facet"]));OF(oL),OF(sL);function uL(e){return!!iL[e]}var AL=["x2","y2","latitude2","longitude2",HT,"radius2"];function cL(e){return lL(e)!==e}function lL(e){switch(e){case"x2":return"x";case"y2":return"y";case"latitude2":return"latitude";case"longitude2":return"longitude";case HT:return qT;case"radius2":return GT}return e}function fL(e){if(XT(e))switch(e){case qT:return"startAngle";case HT:return"endAngle";case GT:return"outerRadius";case"radius2":return"innerRadius"}return e}function hL(e){switch(e){case"x":return"x2";case"y":return"y2";case"latitude":return"latitude2";case"longitude":return"longitude2";case qT:return HT;case GT:return"radius2"}}function gL(e){switch(e){case"x":case"x2":return"width";case"y":case"y2":return"height"}}OF(eL),eL.x,eL.y,eL.x2,eL.y2,eL.latitude,eL.longitude,eL.latitude2,eL.longitude2,eL.theta,eL.theta2,eL.radius,eL.radius2;var dL=iF(eL,["x","y","x2","y2","latitude","longitude","latitude2","longitude2","theta","theta2","radius","radius2"]),pL=OF(dL),vL={x:1,y:1},yL=OF(vL);function mL(e){return e in vL}var IL={theta:1,radius:1},bL=OF(IL);function EL(e){return"width"===e?"x":"y"}dL.text,dL.tooltip,dL.href,dL.url,dL.description,dL.detail,dL.key,dL.order;var CL=iF(dL,["text","tooltip","href","url","description","detail","key","order"]),BL=OF(CL);var wL=Object.assign(Object.assign(Object.assign({},vL),IL),CL),QL=OF(wL);function kL(e){return!!wL[e]}function _L(e,t){return function(e){switch(e){case YT:case JT:case zT:case"description":case"detail":case"key":case"tooltip":case"href":case"order":case"opacity":case"fillOpacity":case"strokeOpacity":case"strokeWidth":case"facet":case PT:case UT:return xL;case"x":case"y":case"latitude":case"longitude":return SL;case"x2":case"y2":case"latitude2":case"longitude2":return{area:"always",bar:"always",image:"always",rect:"always",rule:"always",circle:"binned",point:"binned",square:"binned",tick:"binned",line:"binned",trail:"binned"};case WT:return{point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",text:"always",line:"always",trail:"always"};case"strokeDash":return{line:"always",point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",geoshape:"always"};case KT:return{point:"always",geoshape:"always"};case"text":return{text:"always"};case"angle":return{point:"always",square:"always",text:"always"};case"url":return{image:"always"};case qT:case GT:return{text:"always",arc:"always"};case HT:case"radius2":return{arc:"always"}}}(e)[t]}var xL={arc:"always",area:"always",bar:"always",circle:"always",geoshape:"always",image:"always",line:"always",rule:"always",point:"always",rect:"always",square:"always",trail:"always",text:"always",tick:"always"},SL=iF(xL,["geoshape"]);function OL(e){switch(e){case"x":case"y":case qT:case GT:case WT:case"angle":case"strokeWidth":case"opacity":case"fillOpacity":case"strokeOpacity":case"x2":case"y2":case HT:case"radius2":return;case"facet":case PT:case UT:case KT:case"strokeDash":case"text":case"tooltip":case"href":case"url":case"description":return"discrete";case YT:case JT:case zT:return"flexible";case"latitude":case"longitude":case"latitude2":case"longitude2":case"detail":case"key":case"order":return}}function DL(e){return Object(R.B)(e)&&(e=Kq(e,void 0)),"bin"+OF(e).map((function(t){return NL(e[t])?MF("_".concat(t,"_").concat(Object.entries(e[t]))):MF("_".concat(t,"_").concat(e[t]))})).join("")}function RL(e){return!0===e||ML(e)&&!e.binned}function jL(e){return"binned"===e||ML(e)&&!0===e.binned}function ML(e){return Object(R.F)(e)}function NL(e){return null===e||void 0===e?void 0:e.selection}function FL(e){switch(e){case PT:case UT:case WT:case YT:case JT:case zT:case"strokeWidth":case"opacity":case"fillOpacity":case"strokeOpacity":case KT:return 6;case"strokeDash":return 4;default:return 10}}var TL=n(27);function LL(e){return"Invalid specification ".concat(JSON.stringify(e),'. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".')}var PL='Autosize "fit" only works for single views and layered views.';function UL(e){return"".concat("width"==e?"Width":"Height",' "container" only works for single views and layered views.')}function GL(e){var t="width"==e?"x":"y";return"".concat("width"==e?"Width":"Height",' "container" only works well with autosize "fit" or "fit-').concat(t,'".')}function qL(e){return e?'Dropping "fit-'.concat(e,'" because spec has discrete ').concat(gL(e),"."):'Dropping "fit" because spec has discrete size.'}function HL(e){return'Cannot project a selection on encoding channel "'.concat(e,'", which has no field.')}function YL(e,t){return'Cannot project a selection on encoding channel "'.concat(e,'" as it uses an aggregate function ("').concat(t,'").')}function JL(e){return'The "nearest" transform is not supported for '.concat(e," marks.")}function zL(e){return"Selection not supported for ".concat(e," yet.")}function KL(e){return'Cannot find a selection named "'.concat(e,'".')}var WL="Scale bindings are currently only supported for scales with unbinned, continuous domains.",VL="Legend bindings are only supported for selections over an individual field or encoding channel.";function XL(e){return'Cannot define and lookup the "'.concat(e,'" selection in the same view. ')+"Try moving the lookup into a second, layered view?"}function ZL(e){return'Unknown repeated value "'.concat(e,'".')}function $L(e){return'The "columns" property cannot be used when "'.concat(e,'" has nested row/column.')}var eP="Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415).";function tP(e){return'Unrecognized parse "'.concat(e,'".')}function nP(e,t,n){return'An ancestor parsed field "'.concat(e,'" as ').concat(n," but a child wants to parse the field as ").concat(t,".")}function rP(e){return"Ignoring an invalid transform: ".concat(mF(e),".")}var iP='If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.';function aP(e){return"Config.customFormatTypes is not true, thus custom format type and format for channel ".concat(e," are dropped.")}function oP(e){return"Layer's shared ".concat(e.join(",")," channel ").concat(1===e.length?"is":"are"," overriden.")}function sP(e){var t=e.parentProjection,n=e.projection;return"Layer's shared projection ".concat(mF(t)," is overridden by a child projection ").concat(mF(n),".")}var uP="Arc marks uses theta channel rather than angle, replacing angle with theta.";function AP(e,t,n){return"Channel ".concat(e," is a ").concat(t,". Converted to {value: ").concat(mF(n),"}.")}function cP(e){return'Invalid field type "'.concat(e,'".')}function lP(e,t){return'Invalid field type "'.concat(e,'" for aggregate: "').concat(t,'", using "quantitative" instead.')}function fP(e){return'Invalid aggregation operator "'.concat(e,'".')}function hP(e,t){return'Missing type for channel "'.concat(e,'", using "').concat(t,'" instead.')}function gP(e,t){var n=t.fill,r=t.stroke;return"Dropping color ".concat(e," as the plot also has ").concat(n&&r?"fill and stroke":n?"fill":"stroke",".")}function dP(e,t){return"Dropping ".concat(mF(e),' from channel "').concat(t,'" since it does not contain any data field, datum, value, or signal.')}function pP(e,t,n){return"".concat(e,"-encoding with type ").concat(t," is deprecated. Replacing with ").concat(n,"-encoding.")}var vP="Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.";function yP(e,t,n){return"".concat(e,' dropped as it is incompatible with "').concat(t,'"').concat(n?" when ".concat(n):"",".")}function mP(e){return"".concat(e,"-encoding is dropped as ").concat(e," is not a valid encoding channel.")}function IP(e){return"".concat(e," encoding should be discrete (ordinal / nominal / binned).")}function bP(e){return"Facet encoding dropped as ".concat(e.join(" and ")," ").concat(e.length>1?"are":"is"," also specified.")}function EP(e,t){return'Using discrete channel "'.concat(e,'" to encode "').concat(t,'" field can be misleading as it does not encode ').concat("ordinal"===t?"order":"magnitude",".")}function CP(e,t){return"Line mark is for continuous lines and thus cannot be used with ".concat(e&&t?"x2 and y2":e?"x2":"y2",". We will use the rule mark (line segments) instead.")}function BP(e,t){return'Specified orient "'.concat(e,'" overridden with "').concat(t,'".')}var wP="Custom domain scale cannot be unioned with default field-based domain.",QP='Scale\'s "rangeStep" is deprecated and will be removed in Vega-Lite 5.0. Please use "width"/"height": {"step": ...} instead. See https://vega.github.io/vega-lite/docs/size.html.';function kP(e){return'Cannot use the scale property "'.concat(e,'" with non-color channel.')}function _P(e){return"Using unaggregated domain with raw field has no effect (".concat(mF(e),").")}function xP(e){return'Unaggregated domain not applicable for "'.concat(e,'" since it produces values outside the origin domain of the source data.')}function SP(e){return"Unaggregated domain is currently unsupported for log scale (".concat(mF(e),").")}function OP(e){return'Cannot apply size to non-oriented mark "'.concat(e,'".')}function DP(e,t,n){return'Channel "'.concat(e,'" does not work with "').concat(t,'" scale. We are using "').concat(n,'" scale instead.')}function RP(e,t){return'FieldDef does not work with "'.concat(e,'" scale. We are using "').concat(t,'" scale instead.')}function jP(e,t,n){return"".concat(n,"-scale's \"").concat(t,'" is dropped as it does not work with ').concat(e," scale.")}function MP(e,t){return'Scale type "'.concat(t,'" does not work with mark "').concat(e,'".')}function NP(e){return'The step for "'.concat(e,'" is dropped because the ').concat("width"===e?"x":"y"," is continuous.")}function FP(e,t,n,r){return"Conflicting ".concat(t.toString(),' property "').concat(e.toString(),'" (').concat(mF(n)," and ").concat(mF(r),"). Using ").concat(mF(n),".")}function TP(e,t,n,r){return"Conflicting ".concat(t.toString(),' property "').concat(e.toString(),'" (').concat(mF(n)," and ").concat(mF(r),"). Using the union of the two domains.")}function LP(e){return'Setting the scale to be independent for "'.concat(e,'" means we also have to set the guide (axis or legend) to be independent.')}function PP(e){return"Dropping sort property ".concat(mF(e),' as unioned domains only support boolean or op "count", "min", and "max".')}var UP="Domains that should be unioned has conflicting sort properties. Sort will be set to true.",GP="Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect.",qP="Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect.",HP="Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.",YP="Invalid channel for axis.";function JP(e){return'Cannot stack "'.concat(e,'" if there is already "').concat(e,'2".')}function zP(e){return"Cannot stack non-linear scale (".concat(e,").")}function KP(e){return'Stacking is applied even though the aggregate function is non-summative ("'.concat(e,'").')}function WP(e,t){return"Invalid ".concat(e,": ").concat(mF(t),".")}function VP(e){return"Dropping day from datetime ".concat(mF(e)," as day cannot be combined with other units.")}function XP(e,t){return"".concat(t?"extent ":"").concat(t&&e?"and ":"").concat(e?"center ":"").concat(t&&e?"are ":"is ","not needed when data are aggregated.")}function ZP(e,t,n){return"".concat(e," is not usually used with ").concat(t," for ").concat(n,".")}function $P(e,t){return"Continuous axis should not have customized aggregation function ".concat(e,"; ").concat(t," already agregates the axis.")}function eU(e,t){return"Center is not needed to be specified in ".concat(t," when extent is ").concat(e,".")}function tU(e){return"1D error band does not support ".concat(e,".")}function nU(e){return"Channel ".concat(e,' is required for "binned" bin.')}function rU(e){return"Domain for ".concat(e," is required for threshold scale.")}var iU=Object(R.K)(R.e),aU=iU;function oU(e){return aU=e}function sU(){return aU=iU}function uU(){var e;(e=aU).warn.apply(e,arguments)}function AU(e){if(e&&Object(R.F)(e)){var t,n=Object(D.a)(mU);try{for(n.s();!(t=n.n()).done;){if(t.value in e)return!0}}catch(r){n.e(r)}finally{n.f()}}return!1}var cU=["january","february","march","april","may","june","july","august","september","october","november","december"],lU=cU.map((function(e){return e.substr(0,3)})),fU=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],hU=fU.map((function(e){return e.substr(0,3)}));function gU(e,t){var n=[];if(t&&void 0!==e.day&&OF(e).length>1&&(uU(v.droppedDay(e)),delete(e=pF(e)).day),void 0!==e.year?n.push(e.year):n.push(2012),void 0!==e.month){var r=t?function(e){if(XF(e)&&(e=+e),Object(R.E)(e))return e-1;var t=e.toLowerCase(),n=cU.indexOf(t);if(-1!==n)return n;var r=t.substr(0,3),i=lU.indexOf(r);if(-1!==i)return i;throw new Error(v.invalidTimeUnit("month",e))}(e.month):e.month;n.push(r)}else if(void 0!==e.quarter){var i=t?function(e){if(XF(e)&&(e=+e),Object(R.E)(e))return e>4&&uU(v.invalidTimeUnit("quarter",e)),e-1;throw new Error(v.invalidTimeUnit("quarter",e))}(e.quarter):e.quarter;n.push(Object(R.E)(i)?3*i:i+"*3")}else n.push(0);if(void 0!==e.date)n.push(e.date);else if(void 0!==e.day){var a=t?function(e){if(XF(e)&&(e=+e),Object(R.E)(e))return e%7;var t=e.toLowerCase(),n=fU.indexOf(t);if(-1!==n)return n;var r=t.substr(0,3),i=hU.indexOf(r);if(-1!==i)return i;throw new Error(v.invalidTimeUnit("day",e))}(e.day):e.day;n.push(Object(R.E)(a)?a+1:a+"+1")}else n.push(1);for(var o=0,s=["hours","minutes","seconds","milliseconds"];o<s.length;o++){var u=e[s[o]];n.push("undefined"===typeof u?0:u)}return n}function dU(e){var t=gU(e,!0).join(", ");return e.utc?"utc(".concat(t,")"):"datetime(".concat(t,")")}function pU(e){var t=gU(e,!1).join(", ");return e.utc?"utc(".concat(t,")"):"datetime(".concat(t,")")}function vU(e){var t=gU(e,!0);return e.utc?+new Date(Date.UTC.apply(Date,Object(im.a)(t))):+Object(TL.a)(Date,Object(im.a)(t))}var yU={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},mU=OF(yU);function IU(e){return e.startsWith("utc")}var bU={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function EU(e){var t,n=[],r=Object(D.a)(mU);try{for(r.s();!(t=r.n()).done;){var i=t.value;CU(e,i)&&n.push(i)}}catch(a){r.e(a)}finally{r.f()}return n}function CU(e,t){var n=e.indexOf(t);return!(n<0)&&(!(n>0&&"seconds"===t&&"i"===e.charAt(n-1))&&(!(e.length>n+3&&"day"===t&&"o"===e.charAt(n+3))&&!(n>0&&"year"===t&&"f"===e.charAt(n-1))))}function BU(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{end:!1},i=r.end,a=LF(t),o=IU(e)?"utc":"";function s(e){return"quarter"===e?"(".concat(o,"quarter(").concat(a,")-1)"):"".concat(o).concat(e,"(").concat(a,")")}var u,A={},c=Object(D.a)(mU);try{for(c.s();!(u=c.n()).done;){var l=u.value;CU(e,l)&&(A[l]=s(l),n=l)}}catch(f){c.e(f)}finally{c.f()}return i&&(A[n]+="+1"),pU(A)}function wU(e){if(e){var t=EU(e);return"timeUnitSpecifier(".concat(cF()(t),", ").concat(cF()(bU),")")}}function QU(e){var t;if(e)return Object(R.H)(e)?t={unit:e}:Object(R.F)(e)&&(t=Object.assign(Object.assign({},e),e.unit?{unit:e.unit}:{})),IU(t.unit)&&(t.utc=!0,t.unit=t.unit.substr(3)),t}function kU(e){var t=QU(e),n=t.utc,r=iF(t,["utc"]);return r.unit?(n?"utc":"")+OF(r).map((function(e){return MF("".concat("unit"===e?"":"_".concat(e,"_")).concat(r[e]))})).join(""):(n?"utc":"")+"timeunit"+OF(r).map((function(e){return MF("_".concat(e,"_").concat(r[e]))})).join("")}function _U(e){return e&&!!e.signal}function xU(e){return!!e.step}function SU(e){return!Object(R.A)(e)&&("field"in e&&"data"in e)}var OU=OF({aria:1,description:1,ariaRole:1,ariaRoleDescription:1,blend:1,opacity:1,fill:1,fillOpacity:1,stroke:1,strokeCap:1,strokeWidth:1,strokeOpacity:1,strokeDash:1,strokeDashOffset:1,strokeJoin:1,strokeOffset:1,strokeMiterLimit:1,startAngle:1,endAngle:1,padAngle:1,innerRadius:1,outerRadius:1,size:1,shape:1,interpolate:1,tension:1,orient:1,align:1,baseline:1,text:1,dir:1,dx:1,dy:1,ellipsis:1,limit:1,radius:1,theta:1,angle:1,font:1,fontSize:1,fontWeight:1,fontStyle:1,lineBreak:1,lineHeight:1,cursor:1,href:1,tooltip:1,cornerRadius:1,cornerRadiusTopLeft:1,cornerRadiusTopRight:1,cornerRadiusBottomLeft:1,cornerRadiusBottomRight:1,aspect:1,width:1,height:1}),DU={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},RU=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];function jU(e){return e&&!!e.field&&void 0!==e.equal}function MU(e){return e&&!!e.field&&void 0!==e.lt}function NU(e){return e&&!!e.field&&void 0!==e.lte}function FU(e){return e&&!!e.field&&void 0!==e.gt}function TU(e){return e&&!!e.field&&void 0!==e.gte}function LU(e){if(e&&e.field){if(Object(R.A)(e.range)&&2===e.range.length)return!0;if(_U(e.range))return!0}return!1}function PU(e){return e&&!!e.field&&(Object(R.A)(e.oneOf)||Object(R.A)(e.in))}function UU(e){return e&&!!e.field&&void 0!==e.valid}function GU(e){return PU(e)||jU(e)||LU(e)||MU(e)||FU(e)||NU(e)||TU(e)}function qU(e,t){return Xq(e,{timeUnit:t,wrapTime:!0})}function HU(e,t){return e.map((function(e){return qU(e,t)}))}function YU(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=e.field,i=null===(t=QU(e.timeUnit))||void 0===t?void 0:t.unit,a=i?"time("+BU(i,r)+")":Oq(e,{expr:"datum"});if(jU(e))return a+"==="+qU(e.equal,i);if(MU(e)){var o=e.lt;return"".concat(a,"<").concat(qU(o,i))}if(FU(e)){var s=e.gt;return"".concat(a,">").concat(qU(s,i))}if(NU(e)){var u=e.lte;return"".concat(a,"<=").concat(qU(u,i))}if(TU(e)){var A=e.gte;return"".concat(a,">=").concat(qU(A,i))}if(PU(e))return"indexof([".concat(HU(e.oneOf,i).join(","),"], ").concat(a,") !== -1");if(UU(e))return JU(a,e.valid);if(LU(e)){var c=e.range,l=_U(c)?{signal:"".concat(c.signal,"[0]")}:c[0],f=_U(c)?{signal:"".concat(c.signal,"[1]")}:c[1];if(null!==l&&null!==f&&n)return"inrange("+a+", ["+qU(l,i)+", "+qU(f,i)+"])";var h=[];return null!==l&&h.push("".concat(a," >= ").concat(qU(l,i))),null!==f&&h.push("".concat(a," <= ").concat(qU(f,i))),h.length>0?h.join(" && "):"true"}throw new Error("Invalid field predicate: ".concat(JSON.stringify(e)))}function JU(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t?"isValid(".concat(e,") && isFinite(+").concat(e,")"):"!isValid(".concat(e,") || !isFinite(+").concat(e,")")}function zU(e){var t;return GU(e)&&e.timeUnit?Object.assign(Object.assign({},e),{timeUnit:null===(t=QU(e.timeUnit))||void 0===t?void 0:t.unit}):e}var KU={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"};var WU=KU.quantitative,VU=KU.ordinal,XU=KU.temporal,ZU=KU.nominal,$U=KU.geojson,eG=OF(KU);var tG="linear",nG="log",rG="pow",iG="sqrt",aG="symlog",oG="time",sG="utc",uG="quantile",AG="quantize",cG="threshold",lG="point",fG="band",hG={linear:"numeric",log:"numeric",pow:"numeric",sqrt:"numeric",symlog:"numeric",identity:"numeric",sequential:"numeric",time:"time",utc:"time",ordinal:"ordinal","bin-ordinal":"bin-ordinal",point:"ordinal-position",band:"ordinal-position",quantile:"discretizing",quantize:"discretizing",threshold:"discretizing"},gG=OF(hG);function dG(e,t){var n=hG[e],r=hG[t];return n===r||"ordinal-position"===n&&"time"===r||"ordinal-position"===r&&"time"===n}var pG={linear:0,log:1,pow:1,sqrt:1,symlog:1,identity:1,sequential:1,time:0,utc:0,point:10,band:11,ordinal:0,"bin-ordinal":0,quantile:0,quantize:0,threshold:0};function vG(e){return pG[e]}var yG=["linear","log","pow","sqrt","symlog","time","utc"],mG=Object(R.db)(yG),IG=Object(R.db)(["linear","log","pow","sqrt","symlog"]);var bG=Object(R.db)(["quantile","quantize","threshold"]),EG=yG.concat(["quantile","quantize","threshold","sequential","identity"]),CG=Object(R.db)(EG),BG=Object(R.db)(["ordinal","bin-ordinal","point","band"]);function wG(e){return e in BG}function QG(e){return e in CG}function kG(e){return e in mG}function _G(e){return e in bG}function xG(e){return null===e||void 0===e?void 0:e.selection}var SG={type:1,domain:1,domainMid:1,align:1,range:1,scheme:1,bins:1,reverse:1,round:1,clamp:1,nice:1,base:1,exponent:1,constant:1,interpolate:1,zero:1,padding:1,paddingInner:1,paddingOuter:1},OG=(OF(SG),iF(SG,["type","domain","range","scheme"])),DG=OF(OG);!function(){var e,t,n={},r=Object(D.a)(aL);try{for(r.s();!(t=r.n()).done;){var i,a=t.value,o=Object(D.a)(eG);try{for(o.s();!(i=o.n()).done;){var s,u=i.value,A=Object(D.a)(gG);try{for(A.s();!(s=A.n()).done;){var c=s.value,l=FG(a,u);NG(a,c)&&MG(c,u)&&(n[l]=null!==(e=n[l])&&void 0!==e?e:[],n[l].push(c))}}catch(f){A.e(f)}finally{A.f()}}}catch(f){o.e(f)}finally{o.f()}}}catch(f){r.e(f)}finally{r.f()}}();function RG(e,t){switch(t){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!EF(["point","band","identity"],e);case"bins":return!EF(["point","band","identity","ordinal"],e);case"round":return kG(e)||"band"===e||"point"===e;case"padding":return kG(e)||EF(["point","band"],e);case"paddingOuter":case"align":return EF(["point","band"],e);case"paddingInner":return"band"===e;case"domainMid":case"clamp":return kG(e);case"nice":return kG(e)||"quantize"===e||"threshold"===e;case"exponent":return"pow"===e;case"base":return"log"===e;case"constant":return"symlog"===e;case"zero":return QG(e)&&!EF(["log","time","utc","threshold","quantile"],e)}}function jG(e,t){switch(t){case"interpolate":case"scheme":case"domainMid":return tL(e)?void 0:v.cannotUseScalePropertyWithNonColor(e);case"align":case"type":case"bins":case"domain":case"range":case"base":case"exponent":case"constant":case"nice":case"padding":case"paddingInner":case"paddingOuter":case"reverse":case"round":case"clamp":case"zero":return}}function MG(e,t){return EF([VU,ZU],t)?void 0===e||wG(e):t===XU?EF([oG,sG,void 0],e):t!==WU||EF([nG,rG,iG,aG,uG,AG,cG,tG,void 0],e)}function NG(e,t){if(!kL(e))return!1;switch(e){case"x":case"y":case qT:case GT:return kG(t)||EF(["band","point"],t);case WT:case"strokeWidth":case"opacity":case"fillOpacity":case"strokeOpacity":case"angle":return kG(t)||_G(t)||EF(["band","point","ordinal"],t);case YT:case JT:case zT:return"band"!==t;case"strokeDash":return"ordinal"===t||_G(t);case KT:return"ordinal"===t}}function FG(e,t){return e+"_"+t}function TG(e){var t=e.channel,n=e.channelDef,r=e.markDef,i=e.scale,a=e.config,o=HG(e);return yq(n)&&!FT(n.aggregate)&&i&&kG(i.get("type"))&&!1===i.get("zero")?LG({fieldDef:n,channel:t,markDef:r,ref:o,config:a}):o}function LG(e){var t=e.fieldDef,n=e.channel,r=e.markDef,i=e.ref,a=e.config;return IT(r.type)||null===oH("invalid",r,a)?i:[PG(t,n),i]}function PG(e,t){var n=UG(e,!0),r="y"===lL(t)?{field:{group:"height"}}:{value:0};return Object.assign({test:n},r)}function UG(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return JU(Object(R.H)(e)?e:Oq(e,{expr:"datum"}),!t)}function GG(e,t,n,r){var i={};if(t&&(i.scale=t),Iq(e)){var a=e.datum;AU(a)?i.signal=dU(a):_U(a)?i.signal=a.signal:i.value=a}else i.field=Oq(e,n);if(r){var o=r.offset,s=r.band;o&&(i.offset=o),s&&(i.band=s)}return i}function qG(e){var t=e.scaleName,n=e.fieldOrDatumDef,r=e.fieldOrDatumDef2,i=e.offset,a=e.startSuffix,o=e.band,s=void 0===o?.5:o,u=0<s&&s<1?"datum":void 0,A=Oq(n,{expr:u,suffix:a}),c=void 0!==r?Oq(r,{expr:u}):Oq(n,{suffix:"end",expr:u}),l={};if(0===s||1===s){l.scale=t;var f=0===s?A:c;l.field=f}else{var h="".concat(s," * ").concat(A," + ").concat(1-s," * ").concat(c);l.signal='scale("'.concat(t,'", ').concat(h,")")}return i&&(l.offset=i),l}function HG(e){var t,n=e.channel,r=e.channelDef,i=e.channel2Def,a=e.markDef,o=e.config,s=e.scaleName,u=e.scale,A=e.stack,c=e.offset,l=e.defaultRef,f=e.band;if(r){if(Cq(r)){if(Bq(r)){f=null!==f&&void 0!==f?f:hq({channel:n,fieldDef:r,fieldDef2:i,markDef:a,stack:A,config:o,isMidPoint:!0});var h=r.bin,g=r.timeUnit,d=r.type;if(RL(h)||f&&g&&d===XU)return A&&A.impute?GG(r,s,{binSuffix:"mid"},{offset:c}):f?qG({scaleName:s,fieldOrDatumDef:r,band:f,offset:c}):GG(r,s,$q(r,n)?{binSuffix:"range"}:{},{offset:c});if(jL(h)){if(yq(i))return qG({scaleName:s,fieldOrDatumDef:r,fieldOrDatumDef2:i,band:f,offset:c});var p="x"===n?"x2":"y2";uU(v.channelRequiredForBinned(p))}}var y=null===u||void 0===u?void 0:u.get("type");return GG(r,s,wG(y)?{binSuffix:"range"}:{},{offset:c,band:"band"===y?null!==(t=null!==f&&void 0!==f?f:r.band)&&void 0!==t?t:.5:void 0})}if(wq(r)){var m=r.value,I=c?{offset:c}:{};return Object.assign(Object.assign({},YG(n,m)),I)}}return Object(R.D)(l)&&(l=l()),l?Object.assign(Object.assign({},l),c?{offset:c}:{}):l}function YG(e,t){return EF(["x","x2"],e)&&"width"===t?{field:{group:"width"}}:EF(["y","y2"],e)&&"height"===t?{field:{group:"height"}}:nH(t)}function JG(e){return e&&"number"!==e&&"time"!==e}function zG(e,t,n){return"".concat(e,"(").concat(t).concat(n?", ".concat(JSON.stringify(n)):"",")")}function KG(e){var t,n,r=e.fieldOrDatumDef,i=e.format,a=e.formatType,o=e.expr,s=e.normalizeStack,u=e.config;if(JG(a))return VG({fieldOrDatumDef:r,format:i,formatType:a,expr:o,config:u});var A=WG(r,o,s);if(Vq(r)){var c=function(e,t,n,r,i){return!t||n?(n=Object(R.H)(n)?n:r,"".concat(i?"utc":"time","Format(").concat(e,", '").concat(n,"')")):function(e,t,n){if(e){var r=wU(e),i=n||IU(e);return"".concat(i?"utc":"time","Format(").concat(t,", ").concat(r,")")}}(t,e,i)}(A,yq(r)?null===(t=QU(r.timeUnit))||void 0===t?void 0:t.unit:void 0,i,u.timeFormat,Qq(r)&&(null===(n=r.scale)||void 0===n?void 0:n.type)===sG);return c?{signal:c}:void 0}return i=$G(mq(r),i,u),yq(r)&&RL(r.bin)?{signal:nq(A,Oq(r,{expr:o,binSuffix:"end"}),i,a,u)}:i||"quantitative"===mq(r)?{signal:"".concat(eq(A,i))}:{signal:"isValid(".concat(A,") ? ").concat(A,' : ""+').concat(A)}}function WG(e,t,n){return yq(e)?n?"".concat(Oq(e,{expr:t,suffix:"end"}),"-").concat(Oq(e,{expr:t,suffix:"start"})):Oq(e,{expr:t}):function(e){var t=e.datum;return AU(t)?dU(t):"".concat(JSON.stringify(t))}(e)}function VG(e){var t=e.fieldOrDatumDef,n=e.format,r=e.formatType,i=e.expr,a=e.normalizeStack,o=e.config,s=e.field;return s=null!==s&&void 0!==s?s:WG(t,i,a),yq(t)&&RL(t.bin)?{signal:nq(s,Oq(t,{expr:i,binSuffix:"end"}),n,r,o)}:{signal:zG(r,s,n)}}function XG(e,t,n,r,i,a){var o;if(!JG(r))return Vq(e)?function(e,t,n,r){if(e)return e;if(t)return{signal:wU(t)};return r?void 0:n.timeFormat}(n,yq(e)?null===(o=QU(e.timeUnit))||void 0===o?void 0:o.unit:void 0,i,a):$G(t,n,i)}function ZG(e,t,n){return e&&(_U(e)||"number"===e||"time"===e)?e:Vq(t)&&"time"!==n&&"utc"!==n?"time":void 0}function $G(e,t,n){return Object(R.H)(t)?t:e===WU?n.numberFormat:void 0}function eq(e,t){return"format(".concat(e,', "').concat(t||"",'")')}function tq(e,t,n,r){var i;return JG(n)?zG(n,e,t):eq(e,null!==(i=Object(R.H)(t)?t:void 0)&&void 0!==i?i:r.numberFormat)}function nq(e,t,n,r,i){var a=tq(e,n,r,i),o=tq(t,n,r,i);return"".concat(JU(e,!1),' ? "null" : ').concat(a,' + "').concat(" \u2013 ",'" + ').concat(o)}var rq={x:1,y:1,color:1,fill:1,stroke:1,strokeWidth:1,size:1,shape:1,fillOpacity:1,strokeOpacity:1,opacity:1,text:1};function iq(e){return e in rq}function aq(e){return!!e&&!!e.encoding}function oq(e){return!!e&&("count"===e.op||!!e.field)}function sq(e){return!!e&&Object(R.A)(e)}function uq(e){return"row"in e||"column"in e}function Aq(e){return!!e&&"header"in e}function cq(e){return"facet"in e}function lq(e){var t=e.field,n=e.timeUnit,r=e.bin,i=e.aggregate;return Object.assign(Object.assign(Object.assign(Object.assign({},n?{timeUnit:n}:{}),r?{bin:r}:{}),i?{aggregate:i}:{}),{field:t})}function fq(e){return Bq(e)&&"sort"in e}function hq(e){var t=e.channel,n=e.fieldDef,r=e.fieldDef2,i=e.markDef,a=e.stack,o=e.config,s=e.isMidPoint;if(Cq(n)&&void 0!==n.band)return n.band;if(yq(n)){var u=n.timeUnit,A=n.bin;if(u&&!r)return s?sH("timeUnitBandPosition",i,o):bT(i.type)?sH("timeUnitBand",i,o):0;if(RL(A))return bT(i.type)&&!s?1:.5}return(null===a||void 0===a?void 0:a.fieldChannel)===t&&s?.5:void 0}function gq(e,t,n,r,i,a){return!!(RL(t.bin)||t.timeUnit&&Bq(t)&&"temporal"===t.type)&&!!hq({channel:e,fieldDef:t,fieldDef2:n,stack:r,markDef:i,config:a})}function dq(e){return!!e&&"condition"in e}function pq(e){var t=e&&e.condition;return!!t&&!Object(R.A)(t)&&yq(t)}function vq(e){var t=e&&e.condition;return!!t&&!Object(R.A)(t)&&Cq(t)}function yq(e){return!!e&&(!!e.field||"count"===e.aggregate)}function mq(e){return e&&e.type}function Iq(e){return!!e&&"datum"in e}function bq(e){return Bq(e)&&Rq(e)||Eq(e)}function Eq(e){return Iq(e)&&Object(R.E)(e.datum)}function Cq(e){return yq(e)||Iq(e)}function Bq(e){return!!e&&("field"in e&&"type"in e||"count"===e.aggregate)}function wq(e){return e&&"value"in e&&"value"in e}function Qq(e){return!!e&&("scale"in e||"sort"in e)}function kq(e){return e&&("axis"in e||"stack"in e||"impute"in e)}function _q(e){return!!e&&"legend"in e}function xq(e){return!!e&&("format"in e||"formatType"in e)}function Sq(e){return"op"in e}function Oq(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=e.field,o=i.prefix,s=i.suffix,u="";if(jq(e))a=WF("count");else{var A;if(!i.nofn)if(Sq(e))A=e.op;else{var c=e.bin,l=e.aggregate,f=e.timeUnit;RL(c)?(A=DL(c),s=(null!==(t=i.binSuffix)&&void 0!==t?t:"")+(null!==(n=i.suffix)&&void 0!==n?n:"")):l?jT(l)?(u='["'.concat(a,'"]'),a="argmax_".concat(l.argmax)):RT(l)?(u='["'.concat(a,'"]'),a="argmin_".concat(l.argmin)):A=String(l):f&&(A=kU(f),s=(!EF(["range","mid"],i.binSuffix)&&i.binSuffix||"")+(null!==(r=i.suffix)&&void 0!==r?r:""))}A&&(a=a?"".concat(A,"_").concat(a):A)}return s&&(a="".concat(a,"_").concat(s)),o&&(a="".concat(o,"_").concat(a)),i.forAs?HF(a):i.expr?PF(a,i.expr)+u:GF(a)+u}function Dq(e){switch(e.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return yq(e)&&!!e.bin;case"temporal":return!1}throw new Error(v.invalidFieldType(e.type))}function Rq(e){return!Dq(e)}function jq(e){return"count"===e.aggregate}var Mq=function(e,t){switch(t.fieldTitle){case"plain":return e.field;case"functional":return function(e){var t=e.aggregate,n=e.bin,r=e.timeUnit,i=e.field;if(jT(t))return"".concat(i," for argmax(").concat(t.argmax,")");if(RT(t))return"".concat(i," for argmin(").concat(t.argmin,")");var a=QU(r),o=t||(null===a||void 0===a?void 0:a.unit)||(null===a||void 0===a?void 0:a.maxbins)&&"timeunit"||RL(n)&&"bin";return o?o.toUpperCase()+"("+i+")":i}(e);default:return function(e,t){var n,r=e.field,i=e.bin,a=e.timeUnit,o=e.aggregate;if("count"===o)return t.countTitle;if(RL(i))return"".concat(r," (binned)");if(a){var s=null===(n=QU(a))||void 0===n?void 0:n.unit;if(s)return"".concat(r," (").concat(EU(s).join("-"),")")}else if(o)return jT(o)?"".concat(r," for max ").concat(o.argmax):RT(o)?"".concat(r," for min ").concat(o.argmin):"".concat(TF(o)," of ").concat(r);return r}(e,t)}},Nq=Mq;function Fq(e){Nq=e}function Tq(){Fq(Mq)}function Lq(e,t,n){var r,i,a=n.allowDisabling,o=n.includeDefault,s=void 0===o||o,u=(null!==(r=Pq(e))&&void 0!==r?r:{}).title;if(!yq(e))return u;var A=e,c=s?Uq(A,t):void 0;return a?JF(u,A.title,c):null!==(i=null!==u&&void 0!==u?u:A.title)&&void 0!==i?i:c}function Pq(e){return kq(e)&&e.axis?e.axis:_q(e)&&e.legend?e.legend:Aq(e)&&e.header?e.header:void 0}function Uq(e,t){return Nq(e,t)}function Gq(e){var t;if(xq(e))return{format:e.format,formatType:e.formatType};var n=null!==(t=Pq(e))&&void 0!==t?t:{};return{format:n.format,formatType:n.formatType}}function qq(e){return yq(e)?e:pq(e)?e.condition:void 0}function Hq(e){return Cq(e)?e:vq(e)?e.condition:void 0}function Yq(e,t,n){if(Object(R.H)(e)||Object(R.E)(e)||Object(R.B)(e)){var r=Object(R.H)(e)?"string":Object(R.E)(e)?"number":"boolean";return uU(v.primitiveChannelDef(t,r,e)),{value:e}}return Cq(e)?Jq(e,t,n):vq(e)?Object.assign(Object.assign({},e),{condition:Jq(e.condition,t,n)}):e}function Jq(e,t,n){if(xq(e)){e.format;var r=e.formatType,i=iF(e,["format","formatType"]);if(JG(r)&&!n.customFormatTypes)return uU(v.customFormatTypeNotAllowed(t)),Jq(i,t,n)}else{var a=kq(e)?"axis":_q(e)?"legend":Aq(e)?"header":null;if(a&&e[a]){var o=e[a],s=(o.format,o.formatType),u=iF(o,["format","formatType"]);if(JG(s)&&!n.customFormatTypes)return uU(v.customFormatTypeNotAllowed(t)),Jq(Object.assign(Object.assign({},e),Object(Q.a)({},a,u)),t,n)}}return yq(e)?zq(e,t):function(e){var t=e.type;if(t)return e;var n=e.datum;return t=Object(R.E)(n)?"quantitative":Object(R.H)(n)?"nominal":AU(n)?"temporal":void 0,Object.assign(Object.assign({},e),{type:t})}(e)}function zq(e,t){var n=e.aggregate,r=e.timeUnit,i=e.bin,a=e.field,o=Object.assign({},e);if(!n||MT(n)||jT(n)||RT(n)||(uU(v.invalidAggregate(n)),delete o.aggregate),r&&(o.timeUnit=QU(r)),a&&(o.field="".concat(a)),RL(i)&&(o.bin=Kq(i,t)),jL(i)&&!mL(t)&&uU("Channel ".concat(t,' should not be used with "binned" bin.')),Bq(o)){var s=o.type,u=function(e){if(e)switch(e=e.toLowerCase()){case"q":case WU:return"quantitative";case"t":case XU:return"temporal";case"o":case VU:return"ordinal";case"n":case ZU:return"nominal";case $U:return"geojson"}}(s);s!==u&&(o.type=u),"quantitative"!==s&&FT(n)&&(uU(v.invalidFieldTypeForCountAggregate(s,n)),o.type="quantitative")}else if(!cL(t)){var A=function(e,t){if(e.timeUnit)return"temporal";if(RL(e.bin))return"quantitative";switch(OL(t)){case"continuous":return"quantitative";case"discrete":case"flexible":return"nominal";default:return"quantitative"}}(o,t);uU(v.missingFieldType(t,A)),o.type=A}if(Bq(o)){var c=function(e,t){var n=e.type;if("geojson"===n&&"shape"!==t)return{compatible:!1,warning:"Channel ".concat(t," should not be used with a geojson data.")};switch(t){case PT:case UT:case"facet":return Rq(e)?{compatible:!1,warning:v.facetChannelShouldBeDiscrete(t)}:Wq;case"x":case"y":case YT:case JT:case zT:case"text":case"detail":case"key":case"tooltip":case"href":case"url":case"angle":case qT:case GT:case"description":return Wq;case"longitude":case"longitude2":case"latitude":case"latitude2":return n!==WU?{compatible:!1,warning:"Channel ".concat(t," should be used with a quantitative field only, not ").concat(e.type," field.")}:Wq;case"opacity":case"fillOpacity":case"strokeOpacity":case"strokeWidth":case WT:case HT:case"radius2":case"x2":case"y2":return"nominal"!==n||e.sort?Wq:{compatible:!1,warning:"Channel ".concat(t," should not be used with an unsorted discrete field.")};case"strokeDash":return EF(["ordinal","nominal"],e.type)?Wq:{compatible:!1,warning:"StrokeDash channel should be used with only discrete data."};case KT:return EF(["ordinal","nominal","geojson"],e.type)?Wq:{compatible:!1,warning:"Shape channel should be used with only either discrete or geojson data."};case"order":return"nominal"!==e.type||"sort"in e?Wq:{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}}}(o,t),l=c.compatible,f=c.warning;l||uU(f)}if(fq(o)&&Object(R.H)(o.sort)){var h=o.sort;if(iq(h))return Object.assign(Object.assign({},o),{sort:{encoding:h}});var g=h.substr(1);if("-"===h.charAt(0)&&iq(g))return Object.assign(Object.assign({},o),{sort:{encoding:g,order:"descending"}})}if(Aq(o)){var d=o.header,p=d.orient,y=iF(d,["orient"]);if(p)return Object.assign(Object.assign({},o),{header:Object.assign(Object.assign({},y),{labelOrient:d.labelOrient||p,titleOrient:d.titleOrient||p})})}return o}function Kq(e,t){return Object(R.B)(e)?{maxbins:FL(t)}:"binned"===e?{binned:!0}:e.maxbins||e.step?e:Object.assign(Object.assign({},e),{maxbins:FL(t)})}var Wq={compatible:!0};function Vq(e){var t,n=Gq(e).formatType;return"time"===n||!n&&((t=e)&&("temporal"===t.type||yq(t)&&!!t.timeUnit))}function Xq(e,t){var n,r,i=t.timeUnit,a=t.type,o=t.wrapTime,s=t.undefinedIfExprNotRequired,u=i&&(null===(n=QU(i))||void 0===n?void 0:n.unit),A=u||"temporal"===a;return _U(e)?r=e.signal:AU(e)?(A=!0,r=dU(e)):(Object(R.H)(e)||Object(R.E)(e))&&A&&(r="datetime(".concat(JSON.stringify(e),")"),function(e){return!!yU[e]}(u)&&(Object(R.E)(e)&&e<1e4||Object(R.H)(e)&&isNaN(Date.parse(e)))&&(r=dU(Object(Q.a)({},u,e)))),r?o&&A?"time(".concat(r,")"):r:s?void 0:JSON.stringify(e)}function Zq(e,t){var n=e.type;return t.map((function(t){var r=Xq(t,{timeUnit:yq(e)?e.timeUnit:void 0,type:n,undefinedIfExprNotRequired:!0});return void 0!==r?{signal:r}:t}))}function $q(e,t){return RL(e.bin)?kL(t)&&EF(["ordinal","nominal"],e.type):(console.warn("Only call this method for binned field defs."),!1)}function eH(e){var t=e.anchor,n=e.frame,r=e.offset,i=e.orient,a=e.color,o=e.subtitleColor,s=e.subtitleFont,u=e.subtitleFontSize,A=e.subtitleFontStyle,c=e.subtitleFontWeight,l=e.subtitleLineHeight,f=e.subtitlePadding,h=iF(e,["anchor","frame","offset","orient","color","subtitleColor","subtitleFont","subtitleFontSize","subtitleFontStyle","subtitleFontWeight","subtitleLineHeight","subtitlePadding"]),g=Object.assign(Object.assign({},h),a?{fill:a}:{}),d=Object.assign(Object.assign(Object.assign(Object.assign({},t?{anchor:t}:{}),n?{frame:n}:{}),r?{offset:r}:{}),i?{orient:i}:{}),p=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o?{subtitleColor:o}:{}),s?{subtitleFont:s}:{}),u?{subtitleFontSize:u}:{}),A?{subtitleFontStyle:A}:{}),c?{subtitleFontWeight:c}:{}),l?{subtitleLineHeight:l}:{}),f?{subtitlePadding:f}:{});return{titleMarkConfig:g,subtitleMarkConfig:vF(g,["align","baseline","dx","dy","limit"]),nonMark:d,subtitle:p}}function tH(e){return Object(R.H)(e)||Object(R.A)(e)&&Object(R.H)(e[0])}function nH(e){return _U(e)?e:void 0!==e?{value:e}:void 0}function rH(e){return _U(e)?e.signal:Object(R.Z)(e.value)}function iH(e){return _U(e)?e.signal:null==e?null:Object(R.Z)(e)}function aH(e){var t;return[].concat(e.type,null!==(t=e.style)&&void 0!==t?t:[])}function oH(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.vgChannel,a=r.ignoreVgConfig;return i&&void 0!==t[i]?t[i]:void 0!==t[e]?t[e]:!a||i&&i!==e?sH(e,t,n,r):void 0}function sH(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.vgChannel;return JF(i?uH(e,t,n.style):void 0,uH(e,t,n.style),i?n[t.type][i]:void 0,n[t.type][e],i?n.mark[i]:n.mark[e])}function uH(e,t,n){return AH(e,aH(t),n)}function AH(e,t,n){var r;t=Object(R.i)(t);var i,a=Object(D.a)(t);try{for(a.s();!(i=a.n()).done;){var o=n[i.value];o&&void 0!==o[e]&&(r=o[e])}}catch(s){a.e(s)}finally{a.f()}return r}function cH(e,t){return Object(R.i)(e).reduce((function(e,n){var r;return e.field.push(Oq(n,t)),e.order.push(null!==(r=n.sort)&&void 0!==r?r:"ascending"),e}),{field:[],order:[]})}function lH(e,t){var n=Object(im.a)(e);return t.forEach((function(e){var t,r=Object(D.a)(n);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(dF(i,e))return}}catch(a){r.e(a)}finally{r.f()}n.push(e)})),n}function fH(e,t){return dF(e,t)||!t?e:e?[].concat(Object(im.a)(Object(R.i)(e)),Object(im.a)(Object(R.i)(t))).join(", "):t}function hH(e,t){var n=e.value,r=t.value;if(null==n||null===r)return{explicit:e.explicit,value:null};if((tH(n)||_U(n))&&(tH(r)||_U(r)))return{explicit:e.explicit,value:fH(n,r)};if(tH(n)||_U(n))return{explicit:e.explicit,value:n};if(tH(r)||_U(r))return{explicit:e.explicit,value:r};if(!tH(n)&&!_U(n)&&!tH(r)&&!_U(r))return{explicit:e.explicit,value:lH(n,r)};throw new Error("It should never reach here")}function gH(e,t){var n=e&&e[t];return!!n&&(Object(R.A)(n)?CF(n,(function(e){return!!e.field})):yq(n)||pq(n))}function dH(e){return CF(aL,(function(t){if(gH(e,t)){var n=e[t];if(Object(R.A)(n))return CF(n,(function(e){return!!e.aggregate}));var r=qq(n);return r&&!!r.aggregate}return!1}))}function pH(e,t){var n=[],r=[],i=[],a=[],o={};return mH(e,(function(s,u){if(yq(s)){var A=s.field,c=s.aggregate,l=s.bin,f=s.timeUnit,h=iF(s,["field","aggregate","bin","timeUnit"]);if(c||f||l){var g,d=Pq(s),p=d&&d.title,v=Oq(s,{forAs:!0}),y=Object.assign(Object.assign(Object.assign({},p?[]:{title:Lq(s,t,{allowDisabling:!0})}),h),{field:v});if(c){if(jT(c)?(g="argmax",v=Oq({op:"argmax",field:c.argmax},{forAs:!0}),y.field="".concat(v,".").concat(A)):RT(c)?(g="argmin",v=Oq({op:"argmin",field:c.argmin},{forAs:!0}),y.field="".concat(v,".").concat(A)):"boxplot"!==c&&"errorbar"!==c&&"errorband"!==c&&(g=c),g){var m={op:g,as:v};A&&(m.field=A),a.push(m)}}else if(n.push(v),Bq(s)&&RL(l)){if(r.push({bin:l,field:A,as:v}),n.push(Oq(s,{binSuffix:"end"})),$q(s,u)&&n.push(Oq(s,{binSuffix:"range"})),mL(u)){var I={field:v+"_end"};o[u+"2"]=I}y.bin="binned",cL(u)||(y.type=WU)}else if(f){i.push({timeUnit:f,field:A,as:v});var b=Bq(s)&&s.type!==XU&&"time";b&&("text"===u||"tooltip"===u?y.formatType=b:!function(e){return!!dL[e]}(u)?mL(u)&&(y.axis=Object.assign({formatType:b},y.axis)):y.legend=Object.assign({formatType:b},y.legend))}o[u]=y}else n.push(A),o[u]=e[u]}else o[u]=e[u]})),{bins:r,timeUnits:i,aggregate:a,groupby:n,encoding:o}}function vH(e,t,n){var r=t.type;return OF(e).reduce((function(i,a){if(!uL(a))return uU(v.invalidEncodingChannel(a)),i;var o=e[a];if("angle"!==a||"arc"!==r||e.theta||(uU(v.REPLACE_ANGLE_WITH_THETA),a=qT),!function(e,t,n){var r=_L(t,n);if(!r)return!1;if("binned"===r){var i=e["x2"===t?"x":"y"];return!!(yq(i)&&yq(e[t])&&jL(i.bin))}return!0}(e,a,r))return uU(v.incompatibleChannel(a,r)),i;if(a===WT&&"line"===r){var s=qq(e[a]);if(null===s||void 0===s?void 0:s.aggregate)return uU(v.LINE_WITH_VARYING_SIZE),i}if(a===YT&&(t.filled?"fill"in e:"stroke"in e))return uU(v.droppingColor("encoding",{fill:"fill"in e,stroke:"stroke"in e})),i;if("detail"===a||"order"===a&&!Object(R.A)(o)&&!wq(o)||"tooltip"===a&&Object(R.A)(o))o&&(i[a]=Object(R.i)(o).reduce((function(e,t){return yq(t)?e.push(zq(t,a)):uU(v.emptyFieldDef(t,a)),e}),[]));else{if("tooltip"===a&&null===o)i[a]=null;else if(!yq(o)&&!Iq(o)&&!wq(o)&&!dq(o)&&!_U(o))return uU(v.emptyFieldDef(o,a)),i;i[a]=Yq(o,a,n)}return i}),{})}function yH(e){var t,n=[],r=Object(D.a)(OF(e));try{for(r.s();!(t=r.n()).done;){var i=t.value;if(gH(e,i)){var a,o=e[i],s=Object(R.i)(o),u=Object(D.a)(s);try{for(u.s();!(a=u.n()).done;){var A=a.value;yq(A)?n.push(A):pq(A)&&n.push(A.condition)}}catch(c){u.e(c)}finally{u.f()}}}}catch(c){r.e(c)}finally{r.f()}return n}function mH(e,t,n){if(e){var r,i=Object(D.a)(OF(e));try{for(i.s();!(r=i.n()).done;){var a=r.value,o=e[a];if(Object(R.A)(o)){var s,u=Object(D.a)(o);try{for(u.s();!(s=u.n()).done;){var A=s.value;t.call(n,A,a)}}catch(c){u.e(c)}finally{u.f()}}else t.call(n,o,a)}}catch(c){i.e(c)}finally{i.f()}}}function IH(e,t,n,r){return e?OF(e).reduce((function(n,i){var a=e[i];return Object(R.A)(a)?a.reduce((function(e,n){return t.call(r,e,n,i)}),n):t.call(r,n,a,i)}),n):n}function bH(e,t){return OF(t).reduce((function(n,r){switch(r){case"x":case"y":case"href":case"description":case"url":case"x2":case"y2":case qT:case HT:case GT:case"radius2":case"latitude":case"longitude":case"latitude2":case"longitude2":case"text":case KT:case"angle":case"tooltip":return n;case"order":if("line"===e||"trail"===e)return n;case"detail":case"key":var i=t[r];if(Object(R.A)(i)||yq(i)){var a,o=Object(D.a)(Object(R.i)(i));try{for(o.s();!(a=o.n()).done;){var s=a.value;s.aggregate||n.push(Oq(s,{}))}}catch(A){o.e(A)}finally{o.f()}}return n;case WT:if("trail"===e)return n;case YT:case JT:case zT:case"opacity":case"fillOpacity":case"strokeOpacity":case"strokeDash":case"strokeWidth":var u=qq(t[r]);return u&&!u.aggregate&&n.push(Oq(u,{})),n}}),[])}function EH(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if("tooltip"in n)return{tooltip:n.tooltip};var i=e.map((function(e){var n=e.fieldPrefix,i=e.titlePrefix,a=r?" of ".concat(t.field):"";return{field:n+t.field,type:t.type,title:_U(i)?{signal:i+'"'.concat(escape(a),'"')}:i+a}}));return{tooltip:[].concat(Object(im.a)(i),Object(im.a)(yH(n)))}}function CH(e){var t=e.axis,n=e.title,r=e.field;return t&&void 0!==t.title?void 0:JF(n,r)}function BH(e,t,n,r,i){var a=n.scale,o=n.axis;return function(s){var u=s.partName,A=s.mark,c=s.positionPrefix,l=s.endPositionPrefix,f=void 0===l?void 0:l,h=s.aria,g=s.extraEncoding,d=void 0===g?{}:g,p=CH(n);return wH(e,u,i,h,{mark:A,encoding:Object.assign(Object.assign(Object.assign(Object(Q.a)({},t,Object.assign(Object.assign(Object.assign({field:c+"_"+n.field,type:n.type},void 0!==p?{title:p}:{}),void 0!==a?{scale:a}:{}),void 0!==o?{axis:o}:{})),Object(R.H)(f)?Object(Q.a)({},t+"2",{field:f+"_"+n.field}):{}),r),d)})}}function wH(e,t,n,r,i){var a=e.clip,o=e.color,s=e.opacity,u=e.type;return e[t]||void 0===e[t]&&n[t]?[Object.assign(Object.assign({},i),{mark:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n[t]),a?{clip:a}:{}),o?{color:o}:{}),s?{opacity:s}:{}),CT(i.mark)?i.mark:{type:i.mark}),{style:"".concat(u,"-").concat(t)}),Object(R.B)(e[t])?{}:e[t]),!1===r?{aria:r}:{})})]:[]}function QH(e,t,n){var r=e.encoding,i="vertical"===t?"y":"x",a=r[i],o=r[i+"2"],s=r[i+"Error"],u=r[i+"Error2"];return{continuousAxisChannelDef:kH(a,n),continuousAxisChannelDef2:kH(o,n),continuousAxisChannelDefError:kH(s,n),continuousAxisChannelDefError2:kH(u,n),continuousAxis:i}}function kH(e,t){if(e&&e.aggregate){var n=e.aggregate,r=iF(e,["aggregate"]);return n!==t&&uU(v.errorBarContinuousAxisHasCustomizedAggregate(n,t)),r}return e}function _H(e,t){var n=e.mark,r=e.encoding,i=r.x,a=r.y;if(bq(i)){if(bq(a)){var o=yq(i)&&i.aggregate,s=yq(a)&&a.aggregate;if(o||s!==t){if(s||o!==t){if(o===t&&s===t)throw new Error("Both x and y cannot have aggregate");return CT(n)&&n.orient?n.orient:"vertical"}return"horizontal"}return"vertical"}return"horizontal"}if(bq(a))return"vertical";throw new Error("Need a valid continuous axis for "+t+"s")}var xH=new ST("boxplot",OH);function SH(e){return Object(R.E)(e)?"tukey":e}function OH(e,t){var n,r,i=t.config,a=e.mark,o=(e.encoding,e.selection),s=(e.projection,iF(e,["mark","encoding","selection","projection"])),u=CT(a)?a:{type:a};o&&uU(v.selectionNotSupported("boxplot"));var A,c=null!==(n=u.extent)&&void 0!==n?n:i.boxplot.extent,l=oH("size",u,i),f=SH(c),h=function(e,t,n){var r=_H(e,"boxplot"),i=QH(e,r,"boxplot"),a=i.continuousAxisChannelDef,o=i.continuousAxis,s=a.field,u=SH(t),A=[].concat(Object(im.a)(DH(s)),[{op:"median",field:s,as:"mid_box_"+s},{op:"min",field:s,as:("min-max"===u?"lower_whisker_":"min_")+s},{op:"max",field:s,as:("min-max"===u?"upper_whisker_":"max_")+s}]),c="min-max"===u||"tukey"===u?[]:[{calculate:'datum["upper_box_'.concat(s,'"] - datum["lower_box_').concat(s,'"]'),as:"iqr_"+s},{calculate:'min(datum["upper_box_'.concat(s,'"] + datum["iqr_').concat(s,'"] * ').concat(t,', datum["max_').concat(s,'"])'),as:"upper_whisker_"+s},{calculate:'max(datum["lower_box_'.concat(s,'"] - datum["iqr_').concat(s,'"] * ').concat(t,', datum["min_').concat(s,'"])'),as:"lower_whisker_"+s}],l=e.encoding,f=o,h=(l[f],function(e){var t,n,r=e.tooltip,i=iF(e,["tooltip"]);if(!r)return{filteredEncoding:e};if(Object(R.A)(r)){var a,o=Object(D.a)(r);try{for(o.s();!(a=o.n()).done;){var s=a.value;s.aggregate?(t||(t=[]),t.push(s)):(n||(n=[]),n.push(s))}}catch(u){o.e(u)}finally{o.f()}t&&(i.tooltip=t)}else r.aggregate?i.tooltip=r:n=r;return Object(R.A)(n)&&1===n.length&&(n=n[0]),{customTooltipWithoutAggregatedField:n,filteredEncoding:i}}(iF(l,["symbol"===typeof f?f:f+""]))),g=h.customTooltipWithoutAggregatedField,d=pH(h.filteredEncoding,n),p=d.bins,v=d.timeUnits,y=d.aggregate,m=d.groupby,I=d.encoding,b="vertical"===r?"horizontal":"vertical",E=r;return{transform:[].concat(Object(im.a)(p),Object(im.a)(v),[{aggregate:[].concat(Object(im.a)(y),Object(im.a)(A)),groupby:m}],c),groupby:m,aggregate:y,continuousAxisChannelDef:a,continuousAxis:o,encodingWithoutContinuousAxis:I,ticksOrient:b,boxOrient:E,customTooltipWithoutAggregatedField:g}}(e,c,i),g=h.transform,d=h.continuousAxisChannelDef,p=h.continuousAxis,y=h.groupby,m=h.aggregate,I=h.encodingWithoutContinuousAxis,b=h.ticksOrient,E=h.boxOrient,C=h.customTooltipWithoutAggregatedField,B=(I.color,I.size),w=iF(I,["color","size"]),k=function(e){return BH(u,p,d,e,i.boxplot)},_=k(w),x=k(I),S=k(Object.assign(Object.assign({},w),B?{size:B}:{})),O=EH([{fieldPrefix:"min-max"===f?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:"min-max"===f?"lower_whisker_":"min_",titlePrefix:"Min"}],d,I),j={type:"tick",color:"black",opacity:1,orient:b,invalid:null},M="min-max"===f?O:EH([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],d,I),N=[].concat(Object(im.a)(_({partName:"rule",mark:{type:"rule",invalid:null},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",aria:!1,extraEncoding:M})),Object(im.a)(_({partName:"rule",mark:{type:"rule",invalid:null},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",aria:!1,extraEncoding:M})),Object(im.a)(_({partName:"ticks",mark:j,positionPrefix:"lower_whisker",aria:!1,extraEncoding:M})),Object(im.a)(_({partName:"ticks",mark:j,positionPrefix:"upper_whisker",aria:!1,extraEncoding:M}))),F=[].concat(Object(im.a)("tukey"!==f?N:[]),Object(im.a)(x({partName:"box",mark:Object.assign(Object.assign({type:"bar"},l?{size:l}:{}),{orient:E,invalid:null}),positionPrefix:"lower_box",endPositionPrefix:"upper_box",aria:!1,extraEncoding:O})),Object(im.a)(S({partName:"median",mark:Object.assign(Object.assign(Object.assign({type:"tick",invalid:null},Object(R.F)(i.boxplot.median)&&i.boxplot.median.color?{color:i.boxplot.median.color}:{}),l?{size:l}:{}),{orient:b,ariaRoleDescription:"box"}),positionPrefix:"mid_box",extraEncoding:O})));if("min-max"!==f){var T='datum["lower_box_'.concat(d.field,'"]'),L='datum["upper_box_'.concat(d.field,'"]'),P="(".concat(L," - ").concat(T,")"),U="".concat(T," - ").concat(c," * ").concat(P),G="".concat(L," + ").concat(c," * ").concat(P),q='datum["'.concat(d.field,'"]'),H={joinaggregate:DH(d.field),groupby:y},Y=void 0;"tukey"===f&&(Y={transform:[{filter:"(".concat(U," <= ").concat(q,") && (").concat(q," <= ").concat(G,")")},{aggregate:[{op:"min",field:d.field,as:"lower_whisker_"+d.field},{op:"max",field:d.field,as:"upper_whisker_"+d.field},{op:"min",field:"lower_box_"+d.field,as:"lower_box_"+d.field},{op:"max",field:"upper_box_"+d.field,as:"upper_box_"+d.field}].concat(Object(im.a)(m)),groupby:y}],layer:N});w.tooltip;var J=iF(w,["tooltip"]),z=d.scale,K=d.axis,W=CH(d),V=wH(u,"outliers",i.boxplot,!0,{transform:[{filter:"(".concat(q," < ").concat(U,") || (").concat(q," > ").concat(G,")")}],mark:"point",encoding:Object.assign(Object.assign(Object(Q.a)({},p,Object.assign(Object.assign(Object.assign({field:d.field,type:d.type},void 0!==W?{title:W}:{}),void 0!==z?{scale:z}:{}),void 0!==K?{axis:K}:{})),J),C?{tooltip:C}:{})})[0];V&&Y?A={transform:[H],layer:[V,Y]}:V?(A=V).transform.unshift(H):Y&&(A=Y).transform.unshift(H)}return A?Object.assign(Object.assign({},s),{layer:[A,{transform:g,layer:F}]}):Object.assign(Object.assign({},s),{transform:(null!==(r=s.transform)&&void 0!==r?r:[]).concat(g),layer:F})}function DH(e){return[{op:"q1",field:e,as:"lower_box_"+e},{op:"q3",field:e,as:"upper_box_"+e}]}var RH=new ST("errorbar",jH);function jH(e,t){var n=t.config,r=NH(e,"errorbar",n),i=r.transform,a=r.continuousAxisChannelDef,o=r.continuousAxis,s=r.encodingWithoutContinuousAxis,u=r.ticksOrient,A=r.markDef,c=r.outerSpec,l=r.tooltipEncoding,f=BH(A,o,a,s,n.errorbar),h={type:"tick",orient:u},g=[].concat(Object(im.a)(f({partName:"ticks",mark:h,positionPrefix:"lower",aria:!1,extraEncoding:l})),Object(im.a)(f({partName:"ticks",mark:h,positionPrefix:"upper",aria:!1,extraEncoding:l})),Object(im.a)(f({partName:"rule",mark:{type:"rule",ariaRoleDescription:"errorbar"},positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:l})));return Object.assign(Object.assign(Object.assign({},c),{transform:i}),g.length>1?{layer:g}:Object.assign({},g[0]))}function MH(e,t){var n=e.encoding;if(function(e){return(Cq(e.x)||Cq(e.y))&&!Cq(e.x2)&&!Cq(e.y2)&&!Cq(e.xError)&&!Cq(e.xError2)&&!Cq(e.yError)&&!Cq(e.yError2)}(n))return{orient:_H(e,t),inputType:"raw"};var r=function(e){return Cq(e.x2)||Cq(e.y2)}(n),i=function(e){return Cq(e.xError)||Cq(e.xError2)||Cq(e.yError)||Cq(e.yError2)}(n),a=n.x,o=n.y;if(r){if(i)throw new Error("".concat(t," cannot be both type aggregated-upper-lower and aggregated-error"));var s=n.x2,u=n.y2;if(Cq(s)&&Cq(u))throw new Error("".concat(t," cannot have both x2 and y2"));if(Cq(s)){if(bq(a))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error("Both x and x2 have to be quantitative in ".concat(t))}if(Cq(u)){if(bq(o))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error("Both y and y2 have to be quantitative in ".concat(t))}throw new Error("No ranged axis")}var A=n.xError,c=n.xError2,l=n.yError,f=n.yError2;if(Cq(c)&&!Cq(A))throw new Error("".concat(t," cannot have xError2 without xError"));if(Cq(f)&&!Cq(l))throw new Error("".concat(t," cannot have yError2 without yError"));if(Cq(A)&&Cq(l))throw new Error("".concat(t," cannot have both xError and yError with both are quantiative"));if(Cq(A)){if(bq(a))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}if(Cq(l)){if(bq(o))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}function NH(e,t,n){var r,i=e.mark,a=e.encoding,o=e.selection,s=(e.projection,iF(e,["mark","encoding","selection","projection"])),u=CT(i)?i:{type:i};o&&uU(v.selectionNotSupported(t));var A=MH(e,t),c=A.orient,l=A.inputType,f=QH(e,c,t),h=f.continuousAxisChannelDef,g=f.continuousAxisChannelDef2,d=f.continuousAxisChannelDefError,p=f.continuousAxisChannelDefError2,y=f.continuousAxis,m=function(e,t,n,r,i,a,o,s){var u,A=[],c=[],l=t.field,f=!1;if("raw"===a){var h,g,d,p=e.center?e.center:e.extent?"iqr"===e.extent?"median":"mean":s.errorbar.center,y=e.extent?e.extent:"mean"===p?"stderr":"iqr";if("median"===p!==("iqr"===y)&&uU(v.errorBarCenterIsUsedWithWrongExtent(p,y,o)),"stderr"===y||"stdev"===y)A=[{op:y,field:l,as:"extent_"+l},{op:p,field:l,as:"center_"+l}],c=[{calculate:'datum["center_'.concat(l,'"] + datum["extent_').concat(l,'"]'),as:"upper_"+l},{calculate:'datum["center_'.concat(l,'"] - datum["extent_').concat(l,'"]'),as:"lower_"+l}],u=[{fieldPrefix:"center_",titlePrefix:TF(p)},{fieldPrefix:"upper_",titlePrefix:FH(p,y,"+")},{fieldPrefix:"lower_",titlePrefix:FH(p,y,"-")}],f=!0;else e.center&&e.extent&&uU(v.errorBarCenterIsNotNeeded(e.extent,o)),"ci"===y?(h="mean",g="ci0",d="ci1"):(h="median",g="q1",d="q3"),A=[{op:g,field:l,as:"lower_"+l},{op:d,field:l,as:"upper_"+l},{op:h,field:l,as:"center_"+l}],u=[{fieldPrefix:"upper_",titlePrefix:Lq({field:l,aggregate:d,type:"quantitative"},s,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:Lq({field:l,aggregate:g,type:"quantitative"},s,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:Lq({field:l,aggregate:h,type:"quantitative"},s,{allowDisabling:!1})}]}else{(e.center||e.extent)&&uU(v.errorBarCenterAndExtentAreNotNeeded(e.center,e.extent)),"aggregated-upper-lower"===a?(u=[],c=[{calculate:'datum["'.concat(n.field,'"]'),as:"upper_"+l},{calculate:'datum["'.concat(l,'"]'),as:"lower_"+l}]):"aggregated-error"===a&&(u=[{fieldPrefix:"",titlePrefix:l}],c=[{calculate:'datum["'.concat(l,'"] + datum["').concat(r.field,'"]'),as:"upper_"+l}],i?c.push({calculate:'datum["'.concat(l,'"] + datum["').concat(i.field,'"]'),as:"lower_"+l}):c.push({calculate:'datum["'.concat(l,'"] - datum["').concat(r.field,'"]'),as:"lower_"+l}));var m,I=Object(D.a)(c);try{for(I.s();!(m=I.n()).done;){var b=m.value;u.push({fieldPrefix:b.as.substring(0,6),titlePrefix:qF(qF(b.calculate,'datum["',""),'"]',"")})}}catch(E){I.e(E)}finally{I.f()}}return{postAggregateCalculates:c,errorBarSpecificAggregate:A,tooltipSummary:u,tooltipTitleWithFieldName:f}}(u,h,g,d,p,l,t,n),I=m.errorBarSpecificAggregate,b=m.postAggregateCalculates,E=m.tooltipSummary,C=m.tooltipTitleWithFieldName,B=a,w=y,Q=(B[w],"x"===y?"x2":"y2"),k=(B[Q],"x"===y?"xError":"yError"),_=(B[k],"x"===y?"xError2":"yError2"),x=(B[_],pH(iF(B,["symbol"===typeof w?w:w+"","symbol"===typeof Q?Q:Q+"","symbol"===typeof k?k:k+"","symbol"===typeof _?_:_+""]),n)),S=x.bins,O=x.timeUnits,R=x.aggregate,j=x.groupby,M=x.encoding,N=[].concat(Object(im.a)(R),Object(im.a)(I)),F="raw"!==l?[]:j,T=EH(E,h,M,C);return{transform:[].concat(Object(im.a)(null!==(r=s.transform)&&void 0!==r?r:[]),Object(im.a)(S),Object(im.a)(O),Object(im.a)(0===N.length?[]:[{aggregate:N,groupby:F}]),Object(im.a)(b)),groupby:F,continuousAxisChannelDef:h,continuousAxis:y,encodingWithoutContinuousAxis:M,ticksOrient:"vertical"===c?"horizontal":"vertical",markDef:u,outerSpec:s,tooltipEncoding:T}}function FH(e,t,n){return TF(e)+" "+n+" "+t}var TH=new ST("errorband",LH);function LH(e,t){var n=t.config,r=NH(e,"errorband",n),i=r.transform,a=r.continuousAxisChannelDef,o=r.continuousAxis,s=r.encodingWithoutContinuousAxis,u=r.markDef,A=r.outerSpec,c=r.tooltipEncoding,l=u,f=BH(l,o,a,s,n.errorband),h=void 0!==e.encoding.x&&void 0!==e.encoding.y,g={type:h?"area":"rect"},d={type:h?"line":"rule"},p=Object.assign(Object.assign({},l.interpolate?{interpolate:l.interpolate}:{}),l.tension&&l.interpolate?{tension:l.tension}:{});return h?(g=Object.assign(Object.assign(Object.assign({},g),p),{ariaRoleDescription:"errorband"}),d=Object.assign(Object.assign({},d),p)):l.interpolate?uU(v.errorBand1DNotSupport("interpolate")):l.tension&&uU(v.errorBand1DNotSupport("tension")),Object.assign(Object.assign({},A),{transform:i,layer:[].concat(Object(im.a)(f({partName:"band",mark:g,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:c})),Object(im.a)(f({partName:"borders",mark:d,positionPrefix:"lower",aria:!1,extraEncoding:c})),Object(im.a)(f({partName:"borders",mark:d,positionPrefix:"upper",aria:!1,extraEncoding:c})))})}var PH={};function UH(e,t,n){var r=new ST(e,t);PH[e]={normalizer:r,parts:n}}UH("boxplot",OH,["box","median","outliers","rule","ticks"]),UH("errorbar",jH,["ticks","rule"]),UH("errorband",LH,["band","borders"]);var GH=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],qH=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],HH={fillColor:{part:"legend",vgProp:"fill"},gradientStrokeColor:{part:"gradient",vgProp:"stroke"},labelColor:{part:"labels",vgProp:"fill"},strokeColor:{part:"legend",vgProp:"stroke"},symbolFillColor:{part:"symbols",vgProp:"fill"},symbolStrokeColor:{part:"symbols",vgProp:"stroke"},titleColor:{part:"title",vgProp:"fill"}},YH={aria:1,clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,description:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1},JH=(OF(YH),{single:{on:"click",fields:["_vgsid_"],resolve:"global",empty:"all",clear:"dblclick"},multi:{on:"click",fields:["_vgsid_"],toggle:"event.shiftKey",resolve:"global",empty:"all",clear:"dblclick"},interval:{on:"[mousedown, window:mouseup] > window:mousemove!",encodings:["x","y"],translate:"[mousedown, window:mouseup] > window:mousemove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}});function zH(e){return!!e&&("legend"===e||!!e.legend)}function KH(e){return zH(e)&&Object(R.F)(e)}function WH(e){return"concat"in e}function VH(e){return"vconcat"in e}function XH(e){return"hconcat"in e}function ZH(e){return Object(R.F)(e)&&void 0!==e.step}function $H(e){return e.view||e.width||e.height}var eY=OF({align:1,bounds:1,center:1,columns:1,spacing:1});function tY(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e["width"===t?"continuousWidth":"continuousHeight"]}function nY(e,t){var n=rY(e,t);return ZH(n)?n.step:iY}function rY(e,t){var n;return JF(null!==(n=e[t])&&void 0!==n?n:e["width"===t?"discreteWidth":"discreteHeight"],{step:e.step})}var iY=20;var aY={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:{continuousWidth:200,continuousHeight:200,step:iY},mark:{color:"#4c78a8",invalid:"filter",timeUnitBand:1},arc:{},area:{},bar:kT,circle:{},geoshape:{},image:{},line:{},point:{},rect:_T,rule:{color:"black"},square:{},text:{color:"black"},tick:{thickness:1},trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:{pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:9,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4},projection:{},legend:{gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:JH,style:{},title:{},facet:{spacing:20},concat:{spacing:20}},oY=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],sY={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},uY={blue:oY[0],orange:oY[1],red:oY[2],teal:oY[3],green:oY[4],yellow:oY[5],purple:oY[6],pink:oY[7],brown:oY[8],gray0:"#000",gray1:"#111",gray2:"#222",gray3:"#333",gray4:"#444",gray5:"#555",gray6:"#666",gray7:"#777",gray8:"#888",gray9:"#999",gray10:"#aaa",gray11:"#bbb",gray12:"#ccc",gray13:"#ddd",gray14:"#eee",gray15:"#fff"};function AY(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{signals:[{name:"color",value:Object(R.F)(e)?Object.assign(Object.assign({},uY),e):uY}],mark:{color:{signal:"color.blue"}},rule:{color:{signal:"color.gray0"}},text:{color:{signal:"color.gray0"}},style:{"guide-label":{fill:{signal:"color.gray0"}},"guide-title":{fill:{signal:"color.gray0"}},"group-title":{fill:{signal:"color.gray0"}},"group-subtitle":{fill:{signal:"color.gray0"}},cell:{stroke:{signal:"color.gray8"}}},axis:{domainColor:{signal:"color.gray13"},gridColor:{signal:"color.gray8"},tickColor:{signal:"color.gray13"}},range:{category:[{signal:"color.blue"},{signal:"color.orange"},{signal:"color.red"},{signal:"color.teal"},{signal:"color.green"},{signal:"color.yellow"},{signal:"color.purple"},{signal:"color.pink"},{signal:"color.brown"},{signal:"color.grey8"}]}}}function cY(e){return{signals:[{name:"fontSize",value:Object(R.F)(e)?Object.assign(Object.assign({},sY),e):sY}],text:{fontSize:{signal:"fontSize.text"}},style:{"guide-label":{fontSize:{signal:"fontSize.guideLabel"}},"guide-title":{fontSize:{signal:"fontSize.guideTitle"}},"group-title":{fontSize:{signal:"fontSize.groupTitle"}},"group-subtitle":{fontSize:{signal:"fontSize.groupSubtitle"}}}}}function lY(e){return{text:{font:e},style:{"guide-label":{font:e},"guide-title":{font:e},"group-title":{font:e},"group-subtitle":{font:e}}}}function fY(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.color,n=e.font,r=e.fontSize,i=iF(e,["color","font","fontSize"]);return Object(R.N)({},aY,n?lY(n):{},t?AY(t):{},r?cY(r):{},i||{})}var hY=["view"].concat(Object(im.a)(ET)),gY=["color","fontSize","background","padding","facet","concat","numberFormat","timeFormat","countTitle","header","axisQuantitative","axisTemporal","axisDiscrete","axisPoint","axisXBand","axisXPoint","axisXDiscrete","axisXQuantitative","axisXTemporal","axisYBand","axisYPoint","axisYDiscrete","axisYQuantitative","axisYTemporal","scale","selection","overlay"],dY=Object.assign({view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"]},{area:["line","point"],bar:["binSpacing","continuousBandSize","discreteBandSize"],rect:["binSpacing","continuousBandSize","discreteBandSize"],line:["point"],tick:["bandSize","thickness"]});function pY(e){e=pF(e);var t,n=Object(D.a)(gY);try{for(n.s();!(t=n.n()).done;){delete e[t.value]}}catch(C){n.e(C)}finally{n.f()}if(e.axis)for(var r in e.axis)$F(e.axis[r])&&delete e.axis[r];if(e.legend){var i,a=Object(D.a)(GH);try{for(a.s();!(i=a.n()).done;){var o=i.value;delete e.legend[o]}}catch(C){a.e(C)}finally{a.f()}}if(e.mark){var s,u=Object(D.a)(wT);try{for(u.s();!(s=u.n()).done;){var A=s.value;delete e.mark[A]}}catch(C){u.e(C)}finally{u.f()}e.mark.tooltip&&Object(R.F)(e.mark.tooltip)&&delete e.mark.tooltip}var c,l=Object(D.a)(hY);try{for(l.s();!(c=l.n()).done;){var f,h=c.value,g=Object(D.a)(wT);try{for(g.s();!(f=g.n()).done;){var d=f.value;delete e[h][d]}}catch(C){g.e(C)}finally{g.f()}var p=dY[h];if(p){var v,y=Object(D.a)(p);try{for(y.s();!(v=y.n()).done;){var m=v.value;delete e[h][m]}}catch(C){y.e(C)}finally{y.f()}}vY(e,h)}}catch(C){l.e(C)}finally{l.f()}var I,b=Object(D.a)(OF(PH));try{for(b.s();!(I=b.n()).done;){delete e[I.value]}}catch(C){b.e(C)}finally{b.f()}for(var E in function(e){var t=eH(e.title),n=t.titleMarkConfig,r=t.subtitleMarkConfig,i=t.subtitle;SF(n)||(e.style["group-title"]=Object.assign(Object.assign({},e.style["group-title"]),n));SF(r)||(e.style["group-subtitle"]=Object.assign(Object.assign({},e.style["group-subtitle"]),r));SF(i)?delete e.title:e.title=i}(e),e)Object(R.F)(e[E])&&SF(e[E])&&delete e[E];return SF(e)?void 0:e}function vY(e,t,n,r){var i=r?e[t][r]:e[t];"view"===t&&(n="cell");var a=Object.assign(Object.assign({},i),e.style[null!==n&&void 0!==n?n:t]);SF(a)||(e.style[null!==n&&void 0!==n?n:t]=a),r||delete e[t]}function yY(e){return"layer"in e}var mY=n(42),IY=n(46),bY=function(){function e(){Object(_.a)(this,e)}return Object(x.a)(e,[{key:"map",value:function(e,t){return cq(e)?this.mapFacet(e,t):function(e){return"repeat"in e}(e)?this.mapRepeat(e,t):XH(e)?this.mapHConcat(e,t):VH(e)?this.mapVConcat(e,t):WH(e)?this.mapConcat(e,t):this.mapLayerOrUnit(e,t)}},{key:"mapLayerOrUnit",value:function(e,t){if(yY(e))return this.mapLayer(e,t);if(xT(e))return this.mapUnit(e,t);throw new Error(v.invalidSpec(e))}},{key:"mapLayer",value:function(e,t){var n=this;return Object.assign(Object.assign({},e),{layer:e.layer.map((function(e){return n.mapLayerOrUnit(e,t)}))})}},{key:"mapHConcat",value:function(e,t){var n=this;return Object.assign(Object.assign({},e),{hconcat:e.hconcat.map((function(e){return n.map(e,t)}))})}},{key:"mapVConcat",value:function(e,t){var n=this;return Object.assign(Object.assign({},e),{vconcat:e.vconcat.map((function(e){return n.map(e,t)}))})}},{key:"mapConcat",value:function(e,t){var n=this,r=e.concat,i=iF(e,["concat"]);return Object.assign(Object.assign({},i),{concat:r.map((function(e){return n.map(e,t)}))})}},{key:"mapFacet",value:function(e,t){return Object.assign(Object.assign({},e),{spec:this.map(e.spec,t)})}},{key:"mapRepeat",value:function(e,t){return Object.assign(Object.assign({},e),{spec:this.map(e.spec,t)})}}]),e}(),EY={zero:1,center:1,normalize:1};function CY(e){return e in EY}var BY=new Set([oT,uT,sT,hT,lT,vT,yT,cT,gT,dT]),wY=new Set([uT,sT,oT]);function QY(e,t){var n,r,i="x"===t?"y":"radius",a=e[t],o=e[i];if(yq(a)&&yq(o))if("quantitative"===mq(a)&&"quantitative"===mq(o)){if(a.stack)return t;if(o.stack)return i;var s=yq(a)&&!!a.aggregate;if(s!==(yq(o)&&!!o.aggregate))return s?t:i;var u=null===(n=a.scale)||void 0===n?void 0:n.type,A=null===(r=o.scale)||void 0===r?void 0:r.type;if(u&&"linear"!==u)return i;if(A&&"linear"!==A)return t}else{if("quantitative"===mq(a))return t;if("quantitative"===mq(o))return i}else{if("quantitative"===mq(a))return t;if("quantitative"===mq(o))return i}}function kY(e){switch(e){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}function _Y(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=CT(e)?e.type:e;if(!BY.has(r))return null;var i=QY(t,"x")||QY(t,"theta");if(!i)return null;var a=t[i],o=yq(a)?Oq(a,{}):void 0,s=kY(i),u=t[s],A=yq(u)?Oq(u,{}):void 0;A===o&&(A=void 0,u=void 0,s=void 0);var c,l=pL.reduce((function(e,n){if("tooltip"!==n&&gH(t,n)){var r,i=t[n],a=Object(D.a)(Object(R.i)(i));try{for(a.s();!(r=a.n()).done;){var o=qq(r.value);if(!o.aggregate){var s=Oq(o,{});s&&s===A||e.push({channel:n,fieldDef:o})}}}catch(u){a.e(u)}finally{a.f()}}return e}),[]);if(void 0!==a.stack?c=Object(R.B)(a.stack)?a.stack?"zero":null:a.stack:l.length>0&&wY.has(r)&&(c="zero"),!c||!CY(c))return null;if(dH(t)&&0===l.length)return null;if(a.scale&&a.scale.type&&a.scale.type!==tG){if(n.disallowNonLinearStack)return null;uU(v.cannotStackNonLinearScale(a.scale.type))}return Cq(t[hL(i)])?(void 0!==a.stack&&uU(v.cannotStackRangedMark(i)),null):(yq(a)&&a.aggregate&&!EF(TT,a.aggregate)&&uU(v.stackNonSummativeAggregate(a.aggregate)),{groupbyChannel:u?s:void 0,groupbyField:A,fieldChannel:i,impute:null!==a.impute&&IT(r),stackBy:l,offset:c})}function xY(e){e.point,e.line;var t=iF(e,["point","line"]);return OF(t).length>1?t:t.type}function SY(e){for(var t=0,n=["line","area","rule","trail"];t<n.length;t++){var r=n[t];e[r]&&(e=Object.assign(Object.assign({},e),Object(Q.a)({},r,yF(e[r],["point","line"]))))}return e}function OY(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return"transparent"===e.point?{opacity:0}:e.point?Object(R.F)(e.point)?e.point:{}:void 0!==e.point?null:t.point||n.shape?Object(R.F)(t.point)?t.point:{}:void 0}function DY(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.line?!0===e.line?{}:e.line:void 0!==e.line?null:t.line?!0===t.line?{}:t.line:void 0}var RY=function(){function e(){Object(_.a)(this,e),this.name="path-overlay"}return Object(x.a)(e,[{key:"hasMatchingType",value:function(e,t){if(xT(e)){var n=e.mark,r=e.encoding,i=CT(n)?n:{type:n};switch(i.type){case"line":case"rule":case"trail":return!!OY(i,t[i.type],r);case"area":return!!OY(i,t[i.type],r)||!!DY(i,t[i.type])}}return!1}},{key:"run",value:function(e,t,n){var r=t.config,i=e.selection,a=e.projection,o=e.encoding,s=e.mark,u=iF(e,["selection","projection","encoding","mark"]),A=CT(s)?s:{type:s},c=OY(A,r[A.type],o),l="area"===A.type&&DY(A,r[A.type]),f=[Object.assign(Object.assign({},i?{selection:i}:{}),{mark:xY(Object.assign(Object.assign({},"area"===A.type&&void 0===A.opacity&&void 0===A.fillOpacity?{opacity:.7}:{}),A)),encoding:yF(o,["shape"])})],h=_Y(A,o),g=o;if(h){var d=h.fieldChannel,p=h.offset;g=Object.assign(Object.assign({},o),Object(Q.a)({},d,Object.assign(Object.assign({},o[d]),p?{stack:p}:{})))}return l&&f.push(Object.assign(Object.assign({},a?{projection:a}:{}),{mark:Object.assign(Object.assign({type:"line"},vF(A,["clip","interpolate","tension","tooltip"])),l),encoding:g})),c&&f.push(Object.assign(Object.assign({},a?{projection:a}:{}),{mark:Object.assign(Object.assign({type:"point",opacity:1,filled:!0},vF(A,["clip","tooltip"])),c),encoding:g})),n(Object.assign(Object.assign({},u),{layer:f}),Object.assign(Object.assign({},t),{config:SY(r)}))}}]),e}(),jY=function(){function e(){Object(_.a)(this,e),this.name="RangeStep"}return Object(x.a)(e,[{key:"hasMatchingType",value:function(e){var t;if(xT(e)&&e.encoding){var n,r=Object(D.a)(yL);try{for(r.s();!(n=r.n()).done;){var i=n.value,a=e.encoding[i];if(a&&Cq(a)&&(null===(t=null===a||void 0===a?void 0:a.scale)||void 0===t?void 0:t.rangeStep))return!0}}catch(o){r.e(o)}finally{r.f()}}return!1}},{key:"run",value:function(e){var t,n,r={},i=Object.assign({},e.encoding),a=Object(D.a)(yL);try{for(a.s();!(n=a.n()).done;){var o=n.value,s=gL(o),u=i[o];if(u&&Cq(u)&&(null===(t=null===u||void 0===u?void 0:u.scale)||void 0===t?void 0:t.rangeStep)){var A=u.scale,c=iF(u,["scale"]),l=A,f=(l.rangeStep,iF(l,["rangeStep"]));r[s]={step:A.rangeStep},uU(v.RANGE_STEP_DEPRECATED),i=Object.assign(Object.assign({},i),Object(Q.a)({},o,Object.assign(Object.assign({},c),SF(f)?{}:{scale:f})))}}}catch(h){a.e(h)}finally{a.f()}return Object.assign(Object.assign(Object.assign({},r),e),{encoding:i})}}]),e}();function MY(e,t){return t?uq(e)?UY(e,t):TY(e,t):e}function NY(e,t){return t?UY(e,t):e}function FY(e,t,n){var r,i=t[e];return(r=i)&&!Object(R.H)(r)&&"repeat"in r?i.repeat in n?Object.assign(Object.assign({},t),Object(Q.a)({},e,n[i.repeat])):void uU(v.noSuchRepeatedValue(i.repeat)):t}function TY(e,t){if(void 0!==(e=FY("field",e,t))){if(null===e)return null;if(fq(e)&&oq(e.sort)){var n=FY("field",e.sort,t);e=Object.assign(Object.assign({},e),n?{sort:n}:{})}return e}}function LY(e,t){if(yq(e))return TY(e,t);var n=FY("datum",e,t);return n===e||n.type||(n.type="nominal"),n}function PY(e,t){if(!Cq(e)){if(vq(e)){var n=LY(e.condition,t);if(n)return Object.assign(Object.assign({},e),{condition:n});e.condition;return iF(e,["condition"])}return e}var r=LY(e,t);return r||(dq(e)?{condition:e.condition}:void 0)}function UY(e,t){var n={};for(var r in e)if(Object(R.v)(e,r)){var i=e[r];if(Object(R.A)(i))n[r]=i.map((function(e){return PY(e,t)})).filter((function(e){return e}));else{var a=PY(i,t);void 0!==a&&(n[r]=a)}}return n}var GY=function(){function e(){Object(_.a)(this,e),this.name="RuleForRangedLine"}return Object(x.a)(e,[{key:"hasMatchingType",value:function(e){if(xT(e)){var t=e.encoding;if("line"===e.mark){var n,r=Object(D.a)(AL);try{for(r.s();!(n=r.n()).done;){var i=n.value,a=t[lL(i)];if(t[i]&&(yq(a)&&!jL(a.bin)||Iq(a)))return!0}}catch(o){r.e(o)}finally{r.f()}}}return!1}},{key:"run",value:function(e,t,n){var r=e.encoding;return uU(v.lineWithRange(!!r.x2,!!r.y2)),n(Object.assign(Object.assign({},e),{mark:"rule"}),t)}}]),e}();function qY(e){var t=e.parentEncoding,n=e.encoding;if(t&&n){var r=OF(t).reduce((function(e,t){return n[t]&&e.push(t),e}),[]);r.length>0&&uU(v.encodingOverridden(r))}var i=Object.assign(Object.assign({},null!==t&&void 0!==t?t:{}),null!==n&&void 0!==n?n:{});return SF(i)?void 0:i}function HY(e){var t=e.parentProjection,n=e.projection;return t&&n&&uU(v.projectionOverridden({parentProjection:t,projection:n})),null!==n&&void 0!==n?n:t}function YY(e,t){void 0===t&&(t=fY(e.config));var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return JY.map(e,{config:t})}(e,t),r=function(e,t,n){var r=t.width,i=t.height,a=xT(e)||yY(e),o={};a?"container"==r&&"container"==i?(o.type="fit",o.contains="padding"):"container"==r?(o.type="fit-x",o.contains="padding"):"container"==i&&(o.type="fit-y",o.contains="padding"):("container"==r&&(uU(v.containerSizeNonSingle("width")),r=void 0),"container"==i&&(uU(v.containerSizeNonSingle("height")),i=void 0));var s=Object.assign(Object.assign(Object.assign({type:"pad"},o),n?zY(n.autosize):{}),zY(e.autosize));"fit"!==s.type||a||(uU(v.FIT_NON_SINGLE),s.type="pad");"container"==r&&"fit"!=s.type&&"fit-x"!=s.type&&uU(v.containerSizeNotCompatibleWithAutosize("width"));"container"==i&&"fit"!=s.type&&"fit-y"!=s.type&&uU(v.containerSizeNotCompatibleWithAutosize("height"));if(dF(s,{type:"pad"}))return;return s}(n,{width:e.width,height:e.height,autosize:e.autosize},t);return Object.assign(Object.assign({},n),r?{autosize:r}:{})}var JY=new(function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),(e=t.apply(this,arguments)).nonFacetUnitNormalizers=[xH,RH,TH,new RY,new GY,new jY],e}return Object(x.a)(n,[{key:"map",value:function(e,t){if(xT(e)){var r=gH(e.encoding,PT),i=gH(e.encoding,UT),a=gH(e.encoding,"facet");if(r||i||a)return this.mapFacetedUnit(e,t)}return Object(IY.a)(Object(mY.a)(n.prototype),"map",this).call(this,e,t)}},{key:"mapUnit",value:function(e,t){var n=t.parentEncoding,r=t.parentProjection,i=Object.assign(Object.assign({},e),{encoding:NY(e.encoding,t.repeater)});if(n||r)return this.mapUnitWithParentEncodingOrProjection(i,t);var a,o=this.mapLayerOrUnit.bind(this),s=Object(D.a)(this.nonFacetUnitNormalizers);try{for(s.s();!(a=s.n()).done;){var u=a.value;if(u.hasMatchingType(i,t.config))return u.run(i,t,o)}}catch(A){s.e(A)}finally{s.f()}return i}},{key:"mapRepeat",value:function(e,t){return function(e){return!Object(R.A)(e.repeat)&&e.repeat.layer}(e)?this.mapLayerRepeat(e,t):this.mapNonLayerRepeat(e,t)}},{key:"mapLayerRepeat",value:function(e,t){var n=this,r=e.repeat,i=e.spec,a=iF(e,["repeat","spec"]),o=r.row,s=r.column,u=r.layer,A=t.repeater,c=void 0===A?{}:A,l=t.repeaterPrefix,f=void 0===l?"":l;return o||s?this.mapRepeat(Object.assign(Object.assign({},e),{repeat:Object.assign(Object.assign({},o?{row:o}:{}),s?{column:s}:{}),spec:{repeat:{layer:u},spec:i}}),t):Object.assign(Object.assign({},a),{layer:u.map((function(e){var r=Object.assign(Object.assign({},c),{layer:e}),a=(i.name||"")+f+"child__layer_".concat(MF(e)),o=n.mapLayerOrUnit(i,Object.assign(Object.assign({},t),{repeater:r,repeaterPrefix:a}));return o.name=a,o}))})}},{key:"mapNonLayerRepeat",value:function(e,t){var n,r=e,i=r.repeat,a=r.spec,o=r.data,s=iF(e,["repeat","spec","data"]);!Object(R.A)(i)&&e.columns&&(e=yF(e,["columns"]),uU(v.columnsNotSupportByRowCol("repeat")));var u,A=[],c=t.repeater,l=void 0===c?{}:c,f=t.repeaterPrefix,h=void 0===f?"":f,g=!Object(R.A)(i)&&i.row||[l?l.row:null],d=!Object(R.A)(i)&&i.column||[l?l.column:null],p=Object(R.A)(i)&&i||[l?l.repeat:null],y=Object(D.a)(p);try{for(y.s();!(u=y.n()).done;){var m,I=u.value,b=Object(D.a)(g);try{for(b.s();!(m=b.n()).done;){var E,C=m.value,B=Object(D.a)(d);try{for(B.s();!(E=B.n()).done;){var w=E.value,Q={repeat:I,row:C,column:w,layer:l.layer},k=(a.name||"")+h+"child__"+(Object(R.A)(i)?"".concat(MF(I)):(i.row?"row_".concat(MF(C)):"")+(i.column?"column_".concat(MF(w)):"")),_=this.map(a,Object.assign(Object.assign({},t),{repeater:Q,repeaterPrefix:k}));_.name=k,A.push(yF(_,["data"]))}}catch(S){B.e(S)}finally{B.f()}}}catch(S){b.e(S)}finally{b.f()}}}catch(S){y.e(S)}finally{y.f()}var x=Object(R.A)(i)?e.columns:i.column?i.column.length:1;return Object.assign(Object.assign({data:null!==(n=a.data)&&void 0!==n?n:o,align:"all"},s),{columns:x,concat:A})}},{key:"mapFacet",value:function(e,t){return uq(e.facet)&&e.columns&&(e=yF(e,["columns"]),uU(v.columnsNotSupportByRowCol("facet"))),Object(IY.a)(Object(mY.a)(n.prototype),"mapFacet",this).call(this,e,t)}},{key:"mapUnitWithParentEncodingOrProjection",value:function(e,t){var n=e.encoding,r=e.projection,i=t.parentEncoding,a=t.parentProjection,o=t.config,s=HY({parentProjection:a,projection:r}),u=qY({parentEncoding:i,encoding:NY(n,t.repeater)});return this.mapUnit(Object.assign(Object.assign(Object.assign({},e),s?{projection:s}:{}),u?{encoding:u}:{}),{config:o})}},{key:"mapFacetedUnit",value:function(e,t){var n=e.encoding,r=n.row,i=n.column,a=n.facet,o=iF(n,["row","column","facet"]),s=e.mark,u=e.width,A=e.projection,c=e.height,l=e.view,f=e.selection,h=(e.encoding,iF(e,["mark","width","projection","height","view","selection","encoding"])),g=this.getFacetMappingAndLayout({row:r,column:i,facet:a},t),d=g.facetMapping,p=g.layout,v=NY(o,t.repeater);return this.mapFacet(Object.assign(Object.assign(Object.assign({},h),p),{facet:d,spec:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},u?{width:u}:{}),c?{height:c}:{}),l?{view:l}:{}),A?{projection:A}:{}),{mark:s,encoding:v}),f?{selection:f}:{})}),t)}},{key:"getFacetMappingAndLayout",value:function(e,t){var n,r=e.row,i=e.column,a=e.facet;if(r||i){a&&uU(v.facetChannelDropped([].concat(Object(im.a)(r?[PT]:[]),Object(im.a)(i?[UT]:[]))));for(var o={},s={},u=0,A=[PT,UT];u<A.length;u++){var c=A[u],l=e[c];if(l){l.align,l.center,l.spacing,l.columns;var f=iF(l,["align","center","spacing","columns"]);o[c]=f;for(var h=0,g=["align","center","spacing"];h<g.length;h++){var d=g[h];void 0!==l[d]&&(s[d]=null!==(n=s[d])&&void 0!==n?n:{},s[d][c]=l[d])}}}return{facetMapping:o,layout:s}}var p=a.align,y=a.center,m=a.spacing,I=a.columns;return{facetMapping:MY(iF(a,["align","center","spacing","columns"]),t.repeater),layout:Object.assign(Object.assign(Object.assign(Object.assign({},p?{align:p}:{}),y?{center:y}:{}),m?{spacing:m}:{}),I?{columns:I}:{})}}},{key:"mapLayer",value:function(e,t){var r=t.parentEncoding,i=t.parentProjection,a=iF(t,["parentEncoding","parentProjection"]),o=e.encoding,s=e.projection,u=iF(e,["encoding","projection"]),A=Object.assign(Object.assign({},a),{parentEncoding:qY({parentEncoding:r,encoding:o}),parentProjection:HY({parentProjection:i,projection:s})});return Object(IY.a)(Object(mY.a)(n.prototype),"mapLayer",this).call(this,u,A)}}]),n}(bY));function zY(e){return Object(R.H)(e)?{type:e}:null!==e&&void 0!==e?e:{}}var KY=["background","padding"];function WY(e){return KY.reduce((function(t,n){return e&&void 0!==e[n]&&(t[n]=e[n]),t}),{})}var VY=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(_.a)(this,e),this.explicit=t,this.implicit=n}return Object(x.a)(e,[{key:"clone",value:function(){return new e(pF(this.explicit),pF(this.implicit))}},{key:"combine",value:function(){return Object.assign(Object.assign({},this.explicit),this.implicit)}},{key:"get",value:function(e){return JF(this.explicit[e],this.implicit[e])}},{key:"getWithExplicit",value:function(e){return void 0!==this.explicit[e]?{explicit:!0,value:this.explicit[e]}:void 0!==this.implicit[e]?{explicit:!1,value:this.implicit[e]}:{explicit:!1,value:void 0}}},{key:"setWithExplicit",value:function(e,t){void 0!==t.value&&this.set(e,t.value,t.explicit)}},{key:"set",value:function(e,t,n){return delete this[n?"implicit":"explicit"][e],this[n?"explicit":"implicit"][e]=t,this}},{key:"copyKeyFromSplit",value:function(e,t){void 0!==t.explicit[e]?this.set(e,t.explicit[e],!0):void 0!==t.implicit[e]&&this.set(e,t.implicit[e],!1)}},{key:"copyKeyFromObject",value:function(e,t){void 0!==t[e]&&this.set(e,t[e],!0)}},{key:"copyAll",value:function(e){var t,n=Object(D.a)(OF(e.combine()));try{for(n.s();!(t=n.n()).done;){var r=t.value,i=e.getWithExplicit(r);this.setWithExplicit(r,i)}}catch(a){n.e(a)}finally{n.f()}}}]),e}();function XY(e){return{explicit:!0,value:e}}function ZY(e){return{explicit:!1,value:e}}function $Y(e){return function(t,n,r,i){var a=e(t.value,n.value);return a>0?t:a<0?n:eJ(t,n,r,i)}}function eJ(e,t,n,r){return e.explicit&&t.explicit&&uU(v.mergeConflictingProperty(n,r,e.value,t.value)),e}function tJ(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:eJ;return void 0===e||void 0===e.value?t:e.explicit&&!t.explicit?e:t.explicit&&!e.explicit?t:dF(e.value,t.value)?e:i(e,t,n,r)}var nJ=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(_.a)(this,n),(e=t.call(this,r,i)).explicit=r,e.implicit=i,e.parseNothing=a,e}return Object(x.a)(n,[{key:"clone",value:function(){var e=Object(IY.a)(Object(mY.a)(n.prototype),"clone",this).call(this);return e.parseNothing=this.parseNothing,e}}]),n}(VY);function rJ(e){return"url"in e}function iJ(e){return"values"in e}function aJ(e){return"name"in e&&!rJ(e)&&!iJ(e)&&!oJ(e)}function oJ(e){return e&&(sJ(e)||uJ(e)||AJ(e))}function sJ(e){return"sequence"in e}function uJ(e){return"sphere"in e}function AJ(e){return"graticule"in e}var cJ="main";function lJ(e){return"filter"in e}function fJ(e){return"lookup"in e}function hJ(e){return"pivot"in e}function gJ(e){return"density"in e}function dJ(e){return"quantile"in e}function pJ(e){return"regression"in e}function vJ(e){return"loess"in e}function yJ(e){return"sample"in e}function mJ(e){return"window"in e}function IJ(e){return"joinaggregate"in e}function bJ(e){return"flatten"in e}function EJ(e){return"calculate"in e}function CJ(e){return"bin"in e}function BJ(e){return"impute"in e}function wJ(e){return"timeUnit"in e}function QJ(e){return"aggregate"in e}function kJ(e){return"stack"in e}function _J(e){return"fold"in e}function xJ(e,t,n,r){var i=dq(t)&&t.condition,a=r(t);if(i){var o=Object(R.i)(i).map((function(t){var n=r(t),i=function(e){return e.selection}(t)?Pz(e,t.selection):Gz(e,t.test);return Object.assign({test:i},n)}));return Object(Q.a)({},n,[].concat(Object(im.a)(o),Object(im.a)(void 0!==a?[a]:[])))}return void 0!==a?Object(Q.a)({},n,a):{}}function SJ(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text",n=e.encoding[t];return xJ(e,n,t,(function(t){return OJ(t,e.config)}))}function OJ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"datum";if(e){if(wq(e))return nH(e.value);if(Cq(e)){var r=Gq(e),i=r.format,a=r.formatType;return KG({fieldOrDatumDef:e,format:i,formatType:a,expr:n,config:t})}}}function DJ(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.encoding,r=e.markDef,i=e.config,a=e.stack,o=n.tooltip;if(Object(R.A)(o))return{tooltip:jJ({tooltip:o},a,i,t)};var s=t.reactiveGeom?"datum.datum":"datum";return xJ(e,o,"tooltip",(function(e){var o=OJ(e,i,s);if(o)return o;if(null!==e){var u=oH("tooltip",r,i);return!0===u&&(u={content:"encoding"}),Object(R.H)(u)?{value:u}:Object(R.F)(u)?"encoding"===u.content?jJ(n,a,i,t):{signal:s}:void 0}}))}function RJ(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.reactiveGeom,a={},o=i?"datum.datum":"datum",s=[];function u(r,i){var u,A=lL(i),c=Bq(r)?r:Object.assign(Object.assign({},r),{type:e[A].type}),l=Object(R.i)(Lq(c,n,{allowDisabling:!1})).join(", ");if(mL(i)){var f="x"===i?"x2":"y2",h=qq(e[f]);if(jL(c.bin)&&h){var g=Oq(c,{expr:o}),d=Oq(h,{expr:o}),p=Gq(c);u=nq(g,d,p.format,p.formatType,n),a[f]=!0}else if(t&&t.fieldChannel===i&&"normalize"===t.offset){var v=Gq(c);u=KG({fieldOrDatumDef:c,format:v.format,formatType:v.formatType,expr:o,config:n,normalizeStack:!0}).signal}}u=null!==u&&void 0!==u?u:OJ(c,n,o).signal,s.push({channel:i,key:l,value:u})}mH(e,(function(e,t){yq(e)?u(e,t):pq(e)&&u(e.condition,t)}));for(var A={},c=0,l=s;c<l.length;c++){var f=l[c],h=f.channel,g=f.key,d=f.value;a[h]||A[g]||(A[Object(R.Z)(g)]=d)}return A}function jJ(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.reactiveGeom,a=RJ(e,t,n,{reactiveGeom:i}),o=RF(a).map((function(e){var t=e.key,n=e.value;return"".concat(t,": ").concat(n)}));return o.length>0?{signal:"{".concat(o.join(", "),"}")}:void 0}function MJ(e){var t=oH("aria",e.markDef,e.config);return!1===t?{}:Object.assign(Object.assign(Object.assign({},t?{aria:t}:{}),function(e){var t=e.mark,n=e.markDef,r=e.config;if(!1===r.aria)return{};var i=oH("ariaRoleDescription",n,r);if(null!=i)return{ariaRoleDescription:{value:i}};return t in DU?{}:{ariaRoleDescription:{value:t}}}(e)),function(e){var t=e.encoding,n=e.markDef,r=e.config,i=e.stack,a=t.description;if(a)return xJ(e,a,"description",(function(t){return OJ(t,e.config)}));var o=oH("description",n,r);if(null!=o)return{description:nH(o)};if(!1===r.aria)return{};var s=RJ(t,i,r);if(SF(s))return;return{description:{signal:RF(s).map((function(e){var t=e.key,n=e.value;return"".concat(t,' + ": " + (').concat(n,")")})).join(' + "; " + ')}}}(e))}function NJ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.markDef,i=t.encoding,a=t.config,o=n.vgChannel,s=n.defaultRef,u=n.defaultValue;void 0===s&&void 0!==(u=null!==u&&void 0!==u?u:oH(e,r,a,{vgChannel:o,ignoreVgConfig:!0}))&&(s=nH(u));var A=i[e];return xJ(t,A,null!==o&&void 0!==o?o:e,(function(n){return HG({channel:e,channelDef:n,markDef:r,config:a,scaleName:t.scaleName(e),scale:t.getScaleComponent(e),stack:null,defaultRef:s})}))}function FJ(e){var t,n,r,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{filled:void 0},o=e.markDef,s=e.encoding,u=e.config,A=o.type,c=null!==(t=a.filled)&&void 0!==t?t:oH("filled",o,u),l=EF(["bar","point","circle","square","geoshape"],A)?"transparent":void 0,f=null!==(r=null!==(n=oH(!0===c?"color":void 0,o,u,{vgChannel:"fill"}))&&void 0!==n?n:u.mark[!0===c&&"color"])&&void 0!==r?r:l,h=null!==(i=oH(!1===c?"color":void 0,o,u,{vgChannel:"stroke"}))&&void 0!==i?i:u.mark[!1===c&&"color"],g=c?"fill":"stroke",d=Object.assign(Object.assign({},f?{fill:nH(f)}:{}),h?{stroke:nH(h)}:{});return o.color&&(c?o.fill:o.stroke)&&uU(v.droppingColor("property",{fill:"fill"in o,stroke:"stroke"in o})),Object.assign(Object.assign(Object.assign(Object.assign({},d),NJ("color",e,{vgChannel:g,defaultValue:c?f:h})),NJ("fill",e,{defaultValue:s.fill?f:void 0})),NJ("stroke",e,{defaultValue:s.stroke?h:void 0}))}function TJ(e,t){var n=t[function(e){switch(e){case"x":return"xOffset";case"y":return"yOffset";case"x2":return"x2Offset";case"y2":return"y2Offset";case qT:return"thetaOffset";case GT:return"radiusOffset";case HT:return"theta2Offset";case"radius2":return"radius2Offset"}}(e)];if(n)return n}function LJ(e,t,n){var r=n.defaultPos,i=n.vgChannel,a=n.isMidPoint,o=t.encoding,s=t.markDef,u=t.config,A=t.stack,c=o[e],l=o[hL(e)],f=t.scaleName(e),h=t.getScaleComponent(e),g=TJ(e,s),d=PJ({model:t,defaultPos:r,channel:e,scaleName:f,scale:h}),p=!c&&mL(e)&&(o.latitude||o.longitude)?{field:t.getName(e)}:function(e){var t=e.channel,n=e.channelDef,r=e.isMidPoint,i=e.scaleName,a=e.stack,o=e.offset,s=e.markDef,u=e.config;if(Cq(n)&&a&&t===a.fieldChannel){if(yq(n)){var A=hq({channel:t,fieldDef:n,isMidPoint:r,markDef:s,stack:a,config:u});if(void 0!==A)return qG({scaleName:i,fieldOrDatumDef:n,startSuffix:"start",band:A,offset:o})}return GG(n,i,{suffix:"end"},{offset:o})}return TG(e)}({channel:e,channelDef:c,channel2Def:l,markDef:s,config:u,isMidPoint:a,scaleName:f,scale:h,stack:A,offset:g,defaultRef:d});return p?Object(Q.a)({},i||e,p):void 0}function PJ(e){var t=e.model,n=e.defaultPos,r=e.channel,i=e.scaleName,a=e.scale,o=t.markDef,s=t.config;return function(){var e=lL(r),u=fL(r),A=oH(r,o,s,{vgChannel:u});if(void 0!==A)return YG(r,A);switch(n){case"zeroOrMin":case"zeroOrMax":if(i){var c=a.get("type");if(EF([nG,oG,sG],c));else if(a.domainDefinitelyIncludesZero())return{scale:i,value:0}}if("zeroOrMin"===n)return"y"===e?{field:{group:"height"}}:{value:0};switch(e){case"radius":return{signal:"min(".concat(t.width.signal,",").concat(t.height.signal,")/2")};case"theta":return{signal:"2*PI"};case"x":return{field:{group:"width"}};case"y":return{value:0}}break;case"mid":var l=t[gL(r)];return Object.assign(Object.assign({},l),{mult:.5})}}}var UJ={left:"x",center:"xc",right:"x2"},GJ={top:"y",middle:"yc",bottom:"y2"};function qJ(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"middle";if("radius"===e||"theta"===e)return fL(e);var i="x"===e?"align":"baseline",a=oH(i,t,n);return"x"===e?UJ[a||("top"===r?"left":"center")]:GJ[a||r]}function HJ(e,t,n){var r=n.defaultPos,i=n.defaultPos2;return n.range?YJ(e,t,{defaultPos:r,defaultPos2:i}):LJ(e,t,{defaultPos:r})}function YJ(e,t,n){var r=n.defaultPos,i=n.defaultPos2,a=t.markDef,o=t.config,s=hL(e),u=gL(e),A=function(e,t,n){var r,i=e.encoding,a=e.mark,o=e.markDef,s=e.stack,u=e.config,A=lL(n),c=gL(n),l=fL(n),f=i[A],h=e.scaleName(A),g=e.getScaleComponent(A),d=TJ(n in i||n in o?n:A,e.markDef);if(!f&&("x2"===n||"y2"===n)&&(i.latitude||i.longitude))return Object(Q.a)({},l,{field:e.getName(n)});var p=function(e){var t=e.channel,n=e.channelDef,r=e.channel2Def,i=e.markDef,a=e.config,o=e.scaleName,s=e.scale,u=e.stack,A=e.offset,c=e.defaultRef;if(Cq(n)&&u&&t.charAt(0)===u.fieldChannel.charAt(0))return GG(n,o,{suffix:"start"},{offset:A});return TG({channel:t,channelDef:r,scaleName:o,scale:s,stack:u,markDef:i,config:a,offset:A,defaultRef:c})}({channel:n,channelDef:f,channel2Def:i[n],markDef:o,config:u,scaleName:h,scale:g,stack:s,offset:d,defaultRef:void 0});if(void 0!==p)return Object(Q.a)({},l,p);return JJ(n,o)||JJ(n,(r={},Object(Q.a)(r,n,uH(n,o,u.style)),Object(Q.a)(r,c,uH(c,o,u.style)),r))||JJ(n,u[a])||JJ(n,u.mark)||Object(Q.a)({},l,PJ({model:e,defaultPos:t,channel:n,scaleName:h,scale:g})())}(t,i,s),c=A[u]?qJ(e,a,o):fL(e);return Object.assign(Object.assign({},LJ(e,t,{defaultPos:r,vgChannel:c})),A)}function JJ(e,t){var n=gL(e),r=fL(e);return void 0!==t[r]?Object(Q.a)({},r,YG(e,t[r])):void 0!==t[e]?Object(Q.a)({},r,YG(e,t[e])):t[n]?Object(Q.a)({},n,YG(e,t[n])):void 0}function zJ(e,t,n){var r,i,a,o,s=e.config,u=e.encoding,A=e.markDef,c=e.stack,l=hL(t),f=gL(t),h=u[t],g=u[l],d=e.getScaleComponent(t),p=d?d.get("type"):void 0,y=e.scaleName(t),m=A.orient,I=null!==(i=null!==(r=u[f])&&void 0!==r?r:u.size)&&void 0!==i?i:oH("size",A,s,{vgChannel:f}),b="bar"===n&&("x"===t?"vertical"===m:"horizontal"===m);if(yq(h)&&(RL(h.bin)||jL(h.bin)||h.timeUnit&&!g)&&!I&&!wG(p)){var E=hq({channel:t,fieldDef:h,stack:c,markDef:A,config:s}),C=null===(a=e.component.axes[t])||void 0===a?void 0:a[0];return function(e){var t,n=e.fieldDef,r=e.fieldDef2,i=e.channel,a=e.band,o=e.scaleName,s=e.markDef,u=e.spacing,A=void 0===u?0:u,c=e.axisTranslate,l=e.reverse,f=e.config,h=hL(i),g=fL(i),d=fL(h),p=TJ(i,s);if(RL(n.bin)||n.timeUnit)return t={},Object(Q.a)(t,d,WJ({channel:i,fieldDef:n,scaleName:o,markDef:s,band:(1-a)/2,offset:KJ(h,A,l,c,p),config:f})),Object(Q.a)(t,g,WJ({channel:i,fieldDef:n,scaleName:o,markDef:s,band:1-(1-a)/2,offset:KJ(i,A,l,c,p),config:f})),t;if(jL(n.bin)){var y,m,I=GG(n,o,{},{offset:KJ(h,A,l,c,p)});if(yq(r))return y={},Object(Q.a)(y,d,I),Object(Q.a)(y,g,GG(r,o,{},{offset:KJ(i,A,l,c,p)})),y;if(ML(n.bin)&&n.bin.step)return m={},Object(Q.a)(m,d,I),Object(Q.a)(m,g,{signal:'scale("'.concat(o,'", ').concat(Oq(n,{expr:"datum"})," + ").concat(n.bin.step,")"),offset:KJ(i,A,l,c,p)}),m}return void uU(v.channelRequiredForBinned(h))}({fieldDef:h,fieldDef2:g,channel:t,markDef:A,scaleName:y,band:E,axisTranslate:null!==(o=null===C||void 0===C?void 0:C.get("translate"))&&void 0!==o?o:.5,spacing:mL(t)?oH("binSpacing",A,s):void 0,reverse:d.get("reverse"),config:s})}return(Cq(h)&&wG(p)||b)&&!g?function(e,t,n,r){var i,a,o=r.markDef,s=r.encoding,u=r.config,A=r.stack,c=o.orient,l=r.scaleName(n),f=r.getScaleComponent(n),h=gL(n),g=hL(n),d="horizontal"===c&&"y"===n||"vertical"===c&&"x"===n,p=oH(d?"size":h,o,u,{vgChannel:h});(s.size||void 0!==p)&&(d?a=NJ("size",r,{vgChannel:h,defaultValue:p}):uU(v.cannotApplySizeToNonOrientedMark(o.type)));var y=null!==(i=Cq(t)?hq({channel:n,fieldDef:t,markDef:o,stack:A,config:u}):void 0)&&void 0!==i?i:1;a=a||Object(Q.a)({},h,function(e,t,n,r,i,a){if(r){var o=r.get("type");if("point"===o||"band"===o){if(void 0!==i[e].discreteBandSize)return{value:i[e].discreteBandSize};if(o===lG){var s=r.get("range");return xU(s)&&Object(R.E)(s.step)?{value:s.step-2}:{value:iY-2}}return{scale:n,band:a}}return{value:i[e].continuousBandSize}}var u=nY(i.view,t),A=JF(i[e].discreteBandSize,u-2);return void 0!==A?{value:A}:void 0}(e,h,l,f,u,y));var m="band"!==(null===f||void 0===f?void 0:f.get("type"))||!("band"in a[h]),I=qJ(n,o,u,m?"middle":"top"),b=TJ(n,o),E=TG({channel:n,channelDef:t,markDef:o,config:u,scaleName:l,scale:f,stack:A,offset:b,defaultRef:PJ({model:r,defaultPos:"mid",channel:n,scaleName:l,scale:f}),band:m?.5:(1-y)/2});if(h)return Object.assign(Object(Q.a)({},I,E),a);var C,B=fL(g),w=a[h],k=b?Object.assign(Object.assign({},w),{offset:b}):w;return C={},Object(Q.a)(C,I,E),Object(Q.a)(C,B,Object(R.A)(E)?[E[0],Object.assign(Object.assign({},E[1]),{offset:k})]:Object.assign(Object.assign({},E),{offset:k})),C}(n,h,t,e):YJ(t,e,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"})}function KJ(e,t,n,r,i){if(XT(e))return 0;var a="x"===e||"y2"===e?-t/2:t/2;if(_U(n)){var o=iH(i);return{signal:"".concat(n.signal," ? ").concat(r-a).concat(o?"-"+o:""," : ").concat(r+a).concat(o?"+"+o:"")}}if(_U(i)){var s=r+(n?-a:a);return{signal:"".concat(s||"").concat(n?" - ":s?" + ":"").concat(i.signal)}}return i=i||0,r+(n?-i-a:+i+a)}function WJ(e){var t=e.channel,n=e.fieldDef,r=e.scaleName,i=e.markDef,a=e.band,o=e.offset,s=e.config;return LG({fieldDef:n,channel:t,markDef:i,ref:qG({scaleName:r,fieldOrDatumDef:n,band:a,offset:o}),config:s})}var VJ=new Set(["aria"]);function XJ(e,t){var n="include"===t.color?FJ(e):{},r=n.fill,i=void 0===r?void 0:r,a=n.stroke,o=void 0===a?void 0:a;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},function(e,t){return OU.reduce((function(n,r){return VJ.has(r)||void 0===e[r]||"ignore"===t[r]||(n[r]=nH(e[r])),n}),{})}(e.markDef,t)),ZJ(e,"fill",i)),ZJ(e,"stroke",o)),NJ("opacity",e)),NJ("fillOpacity",e)),NJ("strokeOpacity",e)),NJ("strokeWidth",e)),NJ("strokeDash",e)),DJ(e)),SJ(e,"href")),MJ(e))}function ZJ(e,t,n){var r=e.config,i=e.mark;if("hide"===oH("invalid",e.markDef,r)&&n&&!IT(i)){var a=function(e,t){var n=t.invalid,r=void 0!==n&&n,i=t.channels.reduce((function(t,n){var r=e.getScaleComponent(n);if(r){var i=r.get("type"),a=e.vgField(n,{expr:"datum"});a&&QG(i)&&(t[a]=!0)}return t}),{}),a=OF(i);if(a.length>0){var o=r?"||":"&&";return a.map((function(e){return UG(e,r)})).join(" ".concat(o," "))}return}(e,{invalid:!0,channels:QL});if(a)return Object(Q.a)({},t,[{test:a,value:null}].concat(Object(im.a)(Object(R.i)(n))))}return n?Object(Q.a)({},t,n):{}}function $J(e){var t=e.config;if(oH("invalid",e.markDef,t)){var n=function(e,t){var n=t.invalid,r=void 0!==n&&n,i=t.channels.reduce((function(t,n){var r=e.getScaleComponent(n);if(r){var i=r.get("type"),a=e.vgField(n,{expr:"datum"});a&&QG(i)&&(t[a]=!0)}return t}),{}),a=OF(i);if(a.length>0){var o=r?"||":"&&";return a.map((function(e){return UG(e,r)})).join(" ".concat(o," "))}return}(e,{channels:yL});if(n)return{defined:{signal:n}}}return{}}function ez(e,t){if(void 0!==t)return Object(Q.a)({},e,nH(t))}var tz={has:function(e){return"interval"!==e.type&&e.nearest},parse:function(e,t){if(t.events){var n,r=Object(D.a)(t.events);try{for(r.s();!(n=r.n()).done;){n.value.markname=e.getName("voronoi")}}catch(i){r.e(i)}finally{r.f()}}},marks:function(e,t,n){var r=t.project.hasChannel,i=r.x,a=r.y,o=e.mark;if(IT(o))return uU(v.nearestNotSupportForContinuous(o)),n;var s={name:e.getName("voronoi"),type:"path",interactive:!0,from:{data:e.getName("marks")},encode:{update:Object.assign({fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0}},DJ(e,{reactiveGeom:!0}))},transform:[{type:"voronoi",x:{expr:i||!a?"datum.datum.x || 0":"0"},y:{expr:a||!i?"datum.datum.y || 0":"0"},size:[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]}]},u=0,A=!1;return n.forEach((function(t,n){var r,i=null!==(r=t.name)&&void 0!==r?r:"";i===e.component.mark[0].name?u=n:i.indexOf("voronoi")>=0&&(A=!0)})),A||n.splice(u+1,0,s),n}},nz=function(){function e(t,n){Object(_.a)(this,e),this.debugName=n,this._children=[],this._parent=null,t&&(this.parent=t)}return Object(x.a)(e,[{key:"clone",value:function(){throw new Error("Cannot clone node")}},{key:"numChildren",value:function(){return this._children.length}},{key:"addChild",value:function(e,t){this._children.indexOf(e)>-1?console.warn("Attempt to add the same child twice."):void 0!==t?this._children.splice(t,0,e):this._children.push(e)}},{key:"removeChild",value:function(e){var t=this._children.indexOf(e);return this._children.splice(t,1),t}},{key:"remove",value:function(){var e,t=this._parent.removeChild(this),n=Object(D.a)(this._children);try{for(n.s();!(e=n.n()).done;){var r=e.value;r._parent=this._parent,this._parent.addChild(r,t++)}}catch(i){n.e(i)}finally{n.f()}}},{key:"insertAsParentOf",value:function(e){var t=e.parent;t.removeChild(this),this.parent=t,e.parent=this}},{key:"swapWithParent",value:function(){var e,t=this._parent,n=t.parent,r=Object(D.a)(this._children);try{for(r.s();!(e=r.n()).done;){e.value.parent=t}}catch(i){r.e(i)}finally{r.f()}this._children=[],t.removeChild(this),t.parent.removeChild(t),this.parent=n,t.parent=this}},{key:"parent",get:function(){return this._parent},set:function(e){this._parent=e,e&&e.addChild(this)}},{key:"children",get:function(){return this._children}}]),e}(),rz=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r,i,a){var o;return Object(_.a)(this,n),(o=t.call(this,e,r)).type=i,o.refCounts=a,o._source=o._name=r,o.refCounts&&!(o._name in o.refCounts)&&(o.refCounts[o._name]=0),o}return Object(x.a)(n,[{key:"clone",value:function(){var e=new this.constructor;return e.debugName="clone_"+this.debugName,e._source=this._source,e._name="clone_"+this._name,e.type=this.type,e.refCounts=this.refCounts,e.refCounts[e._name]=0,e}},{key:"dependentFields",value:function(){return new Set}},{key:"producedFields",value:function(){return new Set}},{key:"hash",value:function(){return void 0===this._hash&&(this._hash="Output ".concat(KF())),this._hash}},{key:"getSource",value:function(){return this.refCounts[this._name]++,this._source}},{key:"isRequired",value:function(){return!!this.refCounts[this._name]}},{key:"setSource",value:function(e){this._source=e}}]),n}(nz),iz=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(_.a)(this,n),(i=t.call(this,e)).formula=r,i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,pF(this.formula))}},{key:"merge",value:function(e){for(var t in this.formula=Object.assign({},this.formula),e.formula)this.formula[t]&&!e.formula[t].band||(this.formula[t]=e.formula[t]);var n,r=Object(D.a)(e.children);try{for(r.s();!(n=r.n()).done;){var i=n.value;e.removeChild(i),i.parent=this}}catch(a){r.e(a)}finally{r.f()}e.remove()}},{key:"producedFields",value:function(){return new Set(DF(this.formula).map((function(e){return e.as})))}},{key:"dependentFields",value:function(){return new Set(DF(this.formula).map((function(e){return e.field})))}},{key:"hash",value:function(){return"TimeUnit ".concat(IF(this.formula))}},{key:"assemble",value:function(){var e,t=[],n=Object(D.a)(DF(this.formula));try{for(n.s();!(e=n.n()).done;){var r=e.value,i=r.field,a=r.as,o=QU(r.timeUnit),s=o.unit,u=o.utc,A=iF(o,["unit","utc"]);t.push(Object.assign(Object.assign(Object.assign(Object.assign({field:GF(i),type:"timeunit"},s?{units:EU(s)}:{}),u?{timezone:"utc"}:{}),A),{as:[a,"".concat(a,"_end")]}))}}catch(c){n.e(c)}finally{n.f()}return t}}],[{key:"makeFromEncoding",value:function(e,t){var r=t.reduceFieldDef((function(e,n,r){var i=n.field,a=n.timeUnit,o=vV(t)?t.encoding[hL(r)]:void 0,s=vV(t)&&gq(r,n,o,t.stack,t.markDef,t.config);if(a){var u=Oq(n,{forAs:!0});e[IF({as:u,field:i,timeUnit:a})]=Object.assign({as:u,field:i,timeUnit:a},s?{band:!0}:{})}return e}),{});return SF(r)?null:new n(e,r)}},{key:"makeFromTransform",value:function(e,t){var r=Object.assign({},t),i=r.timeUnit,a=iF(r,["timeUnit"]),o=QU(i),s=Object.assign(Object.assign({},a),{timeUnit:o});return new n(e,Object(Q.a)({},IF(s),s))}}]),n}(nz),az=function e(){Object(_.a)(this,e);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this.items=n,this.hasChannel={},this.hasField={}},oz={has:function(e){return"single"===e.type&&"global"===e.resolve&&e.bind&&"scales"!==e.bind&&!zH(e.bind)},parse:function(e,t,n,r){r.on||delete t.events,r.clear||delete t.clear},topLevelSignals:function(e,t,n){var r=t.name,i=t.project,a=t.bind,o=t.init&&t.init[0],s=tz.has(t)?"(item().isVoronoi ? datum.datum : datum)":"datum";return i.items.forEach((function(e,i){var u,A,c=MF("".concat(r,"_").concat(e.field));n.filter((function(e){return e.name===c})).length||n.unshift(Object.assign(Object.assign({name:c},o?{init:Iz(o[i])}:{value:null}),{on:t.events?[{events:t.events,update:"datum && item().mark.marktype !== 'group' ? ".concat(s,"[").concat(Object(R.Z)(e.field),"] : null")}]:[],bind:null!==(A=null!==(u=a[e.field])&&void 0!==u?u:a[e.channel])&&void 0!==A?A:a}))})),n},signals:function(e,t,n){var r=t.name,i=t.project,a=n.filter((function(e){return e.name===r+Sz}))[0],o=r+"_tuple_fields",s=i.items.map((function(e){return MF("".concat(r,"_").concat(e.field))})),u=s.map((function(e){return"".concat(e," !== null")})).join(" && ");return s.length&&(a.update="".concat(u," ? {fields: ").concat(o,", values: [").concat(s.join(", "),"]} : null")),delete a.value,delete a.on,n}},sz={has:function(e){return"multi"===e.type&&!!e.toggle},signals:function(e,t,n){return n.concat({name:t.name+"_toggle",value:!1,on:[{events:t.events,update:t.toggle}]})},modifyExpr:function(e,t){var n=t.name+Sz,r=t.name+"_toggle";return"".concat(r," ? null : ").concat(n,", ")+("global"===t.resolve?"".concat(r," ? null : true, "):"".concat(r," ? null : {unit: ").concat(Nz(e),"}, "))+"".concat(r," ? ").concat(n," : null")}},uz={has:function(e){return void 0!==e.clear&&!1!==e.clear},parse:function(e,t,n){n.clear&&(t.clear=Object(R.H)(n.clear)?Ej(n.clear,"scope"):n.clear)},topLevelSignals:function(e,t,n){if(oz.has(t)){var r,i=Object(D.a)(t.project.items);try{var a=function(){var e=r.value,i=n.findIndex((function(n){return n.name===MF("".concat(t.name,"_").concat(e.field))}));-1!==i&&n[i].on.push({events:t.clear,update:"null"})};for(i.s();!(r=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}}return n},signals:function(e,t,n){function r(e,r){-1!==e&&n[e].on&&n[e].on.push({events:t.clear,update:r})}if("interval"===t.type){var i,a=Object(D.a)(t.project.items);try{var o=function(){var e=i.value,t=n.findIndex((function(t){return t.name===e.signals.visual}));(r(t,"[0, 0]"),-1===t)&&r(n.findIndex((function(t){return t.name===e.signals.data})),"null")};for(a.s();!(i=a.n()).done;)o()}catch(u){a.e(u)}finally{a.f()}}else{var s=n.findIndex((function(e){return e.name===t.name+Sz}));r(s,"null"),sz.has(t)&&r(s=n.findIndex((function(e){return e.name===t.name+"_toggle"})),"false")}return n}},Az={has:function(e){return"interval"===e.type&&"global"===e.resolve&&e.bind&&"scales"===e.bind},parse:function(e,t){var n,r=t.scales=[],i=Object(D.a)(t.project.items);try{for(i.s();!(n=i.n()).done;){var a=n.value,o=a.channel;if(kL(o)){var s=e.getScaleComponent(o),u=s?s.get("type"):void 0;if(s&&QG(u)){var A={selection:t.name,field:a.field};s.set("selectionExtent",A,!0),r.push(a)}else uU(v.SCALE_BINDINGS_CONTINUOUS)}}}catch(c){i.e(c)}finally{i.f()}},topLevelSignals:function(e,t,n){var r=t.scales.filter((function(e){return 0===n.filter((function(t){return t.name===e.signals.data})).length}));if(!e.parent||lz(e)||0===r.length)return n;var i=n.filter((function(e){return e.name===t.name}))[0],a=i.update;if(a.indexOf(Dz)>=0)i.update="{".concat(r.map((function(e){return"".concat(Object(R.Z)(e.field),": ").concat(e.signals.data)})).join(", "),"}");else{var o,s=Object(D.a)(r);try{for(s.s();!(o=s.n()).done;){var u=o.value,A="".concat(Object(R.Z)(u.field),": ").concat(u.signals.data);a.indexOf(A)<0&&(a="".concat(a.substring(0,a.length-1),", ").concat(A,"}"))}}catch(c){s.e(c)}finally{s.f()}i.update=a}return n.concat(r.map((function(e){return{name:e.signals.data}})))},signals:function(e,t,n){if(e.parent&&!lz(e)){var r,i=Object(D.a)(t.scales);try{var a=function(){var e=r.value,t=n.filter((function(t){return t.name===e.signals.data}))[0];t.push="outer",delete t.value,delete t.update};for(i.s();!(r=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}}return n}};function cz(e,t){var n=Object(R.Z)(e.scaleName(t));return"domain(".concat(n,")")}function lz(e){var t;return e.parent&&IV(e.parent)&&(null!==(t=!e.parent.parent)&&void 0!==t?t:lz(e.parent.parent))}var fz={has:function(e){var t="global"===e.resolve&&e.bind&&zH(e.bind),n=1===e.project.items.length&&"_vgsid_"!==e.project.items[0].field;return t&&!n&&uU(v.LEGEND_BINDINGS_PROJECT_LENGTH),t&&n},parse:function(e,t,n,r){var i;if(r.on||delete t.events,r.clear||delete t.clear,r.on||r.clear){var a,o='event.item && indexof(event.item.mark.role, "legend") < 0',s=Object(D.a)(t.events);try{for(s.s();!(a=s.n()).done;){var u=a.value;u.filter=Object(R.i)(null!==(i=u.filter)&&void 0!==i?i:[]),u.filter.indexOf(o)<0&&u.filter.push(o)}}catch(l){s.e(l)}finally{s.f()}}var A=KH(t.bind)?t.bind.legend:"click",c=Object(R.H)(A)?Ej(A,"view"):Object(R.i)(A);t.bind={legend:{merge:c}}},topLevelSignals:function(e,t,n){var r,i=t.name,a=KH(t.bind)&&t.bind.legend,o=function(e){return function(t){var n=pF(t);return n.markname=e,n}},s=Object(D.a)(t.project.items);try{var u=function(){var e=r.value;if(!e.hasLegend)return"continue";var s="".concat(MF(e.field),"_legend"),u="".concat(i,"_").concat(s);if(0===n.filter((function(e){return e.name===u})).length){var A=a.merge.map(o("".concat(s,"_symbols"))).concat(a.merge.map(o("".concat(s,"_labels")))).concat(a.merge.map(o("".concat(s,"_entries"))));n.unshift(Object.assign(Object.assign({name:u},t.init?{}:{value:null}),{on:[{events:A,update:"datum.value || item().items[0].items[0].datum.value",force:!0},{events:a.merge,update:"!event.item || !datum ? null : ".concat(u),force:!0}]}))}};for(s.s();!(r=s.n()).done;)u()}catch(A){s.e(A)}finally{s.f()}return n},signals:function(e,t,n){var r=t.name,i=t.project,a=n.find((function(e){return e.name===r+Sz})),o=r+"_tuple_fields",s=i.items.filter((function(e){return e.hasLegend})).map((function(e){return MF("".concat(r,"_").concat(MF(e.field),"_legend"))})),u=s.map((function(e){return"".concat(e," !== null")})).join(" && "),A="".concat(u," ? {fields: ").concat(o,", values: [").concat(s.join(", "),"]} : null");t.events&&s.length>0?a.on.push({events:s.map((function(e){return{signal:e}})),update:A}):s.length>0&&(a.update=A,delete a.value,delete a.on);var c=n.find((function(e){return e.name===r+"_toggle"})),l=KH(t.bind)&&t.bind.legend;return c&&(t.events?c.on.push(Object.assign(Object.assign({},c.on[0]),{events:l})):c.on[0].events=l),n}};var hz="_translate_delta",gz={has:function(e){return"interval"===e.type&&e.translate},signals:function(e,t,n){var r=t.name,i=Az.has(t),a=r+"_translate_anchor",o=t.project.hasChannel,s=o.x,u=o.y,A=Ej(t.translate,"scope");return i||(A=A.map((function(e){return e.between[0].markname=r+Cz,e}))),n.push({name:a,value:{},on:[{events:A.map((function(e){return e.between[0]})),update:"{x: x(unit), y: y(unit)"+(void 0!==s?", extent_x: "+(i?cz(e,"x"):"slice(".concat(s.signals.visual,")")):"")+(void 0!==u?", extent_y: "+(i?cz(e,"y"):"slice(".concat(u.signals.visual,")")):"")+"}"}]},{name:r+hz,value:{},on:[{events:A,update:"{x: ".concat(a,".x - x(unit), y: ").concat(a,".y - y(unit)}")}]}),void 0!==s&&dz(e,t,s,"width",n),void 0!==u&&dz(e,t,u,"height",n),n}};function dz(e,t,n,r,i){var a,o=t.name,s=o+"_translate_anchor",u=o+hz,A=n.channel,c=Az.has(t),l=i.filter((function(e){return e.name===n.signals[c?"data":"visual"]}))[0],f=e.getSizeSignalRef(r).signal,h=e.getScaleComponent(A),g=h.get("type"),d=c&&"x"===A?"-":"",p="".concat(s,".extent_").concat(A),v="".concat(d).concat(u,".").concat(A," / ")+(c?"".concat(f):"span(".concat(p,")")),y="".concat(c?"log"===g?"panLog":"pow"===g?"panPow":"panLinear":"panLinear","(").concat(p,", ").concat(v)+(c&&"pow"===g?", ".concat(null!==(a=h.get("exponent"))&&void 0!==a?a:1):"")+")";l.on.push({events:{signal:u},update:c?y:"clampRange(".concat(y,", 0, ").concat(f,")")})}var pz={has:function(e){return"interval"===e.type&&e.zoom},signals:function(e,t,n){var r=t.name,i=Az.has(t),a=r+"_zoom_delta",o=t.project.hasChannel,s=o.x,u=o.y,A=Object(R.Z)(e.scaleName("x")),c=Object(R.Z)(e.scaleName("y")),l=Ej(t.zoom,"scope");return i||(l=l.map((function(e){return e.markname=r+Cz,e}))),n.push({name:r+"_zoom_anchor",on:[{events:l,update:i?"{"+[A?"x: invert(".concat(A,", x(unit))"):"",c?"y: invert(".concat(c,", y(unit))"):""].filter((function(e){return!!e})).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:a,on:[{events:l,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),void 0!==s&&vz(e,t,s,"width",n),void 0!==u&&vz(e,t,u,"height",n),n}};function vz(e,t,n,r,i){var a,o=t.name,s=n.channel,u=Az.has(t),A=i.filter((function(e){return e.name===n.signals[u?"data":"visual"]}))[0],c=e.getSizeSignalRef(r).signal,l=e.getScaleComponent(s),f=l.get("type"),h=u?cz(e,s):A.name,g=o+"_zoom_delta",d="".concat(o).concat("_zoom_anchor",".").concat(s),p="".concat(u?"log"===f?"zoomLog":"pow"===f?"zoomPow":"zoomLinear":"zoomLinear","(").concat(h,", ").concat(d,", ").concat(g)+(u&&"pow"===f?", ".concat(null!==(a=l.get("exponent"))&&void 0!==a?a:1):"")+")";A.on.push({events:{signal:g},update:u?p:"clampRange(".concat(p,", 0, ").concat(c,")")})}var yz=[{has:function(){return!0},parse:function(e,t,n){var r,i,a,o=t.name,s=null!==(r=t.project)&&void 0!==r?r:t.project=new az,u={},A={},c=new Set,l=function(e,t){for(var n="visual"===t?e.channel:e.field,r=MF("".concat(o,"_").concat(n)),i=1;c.has(r);i++)r=MF("".concat(o,"_").concat(n,"_").concat(i));return c.add(r),Object(Q.a)({},t,r)};if(!n.fields&&!n.encodings){var f=e.config.selection[n.type];if(n.init){var h,g=Object(D.a)(Object(R.i)(n.init));try{for(g.s();!(h=g.n()).done;){var d,p=h.value,y=Object(D.a)(OF(p));try{for(y.s();!(d=y.n()).done;){var m=d.value;sL[m]?(n.encodings||(n.encodings=[])).push(m):"interval"===n.type?(uU('Interval selections should be initialized using "x" and/or "y" keys.'),n.encodings=f.encodings):(n.fields||(n.fields=[])).push(m)}}catch(F){y.e(F)}finally{y.f()}}}catch(F){g.e(F)}finally{g.f()}}else n.encodings=f.encodings,n.fields=f.fields}var I,b=Object(D.a)(null!==(i=n.fields)&&void 0!==i?i:[]);try{for(b.s();!(I=b.n()).done;){var E=I.value,C={type:"E",field:E};C.signals=Object.assign({},l(C,"data")),s.items.push(C),s.hasField[E]=C}}catch(F){b.e(F)}finally{b.f()}var B,w=Object(D.a)(null!==(a=n.encodings)&&void 0!==a?a:[]);try{for(w.s();!(B=w.n()).done;){var k=B.value,_=e.fieldDef(k);if(_){var x=_.field;if(_.aggregate){uU(v.cannotProjectAggregate(k,_.aggregate));continue}if(!x){uU(v.cannotProjectOnChannelWithoutField(k));continue}if(_.timeUnit){x=e.vgField(k);var S={timeUnit:_.timeUnit,as:x,field:_.field};A[IF(S)]=S}if(!u[x]){var O="E";if("interval"===t.type)QG(e.getScaleComponent(k).get("type"))&&(O="R");else _.bin&&(O="R-RE");var j={field:x,channel:k,type:O};j.signals=Object.assign(Object.assign({},l(j,"data")),l(j,"visual")),s.items.push(u[x]=j),s.hasField[x]=s.hasChannel[k]=u[x]}}else uU(v.cannotProjectOnChannelWithoutField(k))}}catch(F){w.e(F)}finally{w.f()}if(n.init){var M=function(e){return s.items.map((function(t){return void 0!==e[t.channel]?e[t.channel]:e[t.field]}))};if("interval"===n.type)t.init=M(n.init);else{var N=Object(R.i)(n.init);t.init=N.map(M)}}SF(A)||(s.timeUnit=new iz(null,A))},signals:function(e,t,n){var r=t.name+"_tuple_fields";return n.filter((function(e){return e.name===r})).length>0?n:n.concat({name:r,value:t.project.items.map((function(e){e.signals,e.hasLegend;var t=iF(e,["signals","hasLegend"]);return t.field=GF(t.field),t}))})}},sz,Az,fz,gz,pz,oz,tz,uz];function mz(e,t){var n,r=Object(D.a)(yz);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.has(e)&&t(i)}}catch(a){r.e(a)}finally{r.f()}}function Iz(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:R.x;if(Object(R.A)(e)){var r=e.map((function(e){return Iz(e,t,n)}));return t?"[".concat(r.join(", "),"]"):r}return AU(e)?n(t?dU(e):vU(e)):t?n(JSON.stringify(e)):e}function bz(e,t){return jz(e,(function(n,r){t=r.marks?r.marks(e,n,t):t,mz(n,(function(r){r.marks&&(t=r.marks(e,n,t))}))})),t}function Ez(e){return e.map((function(e){return e.on&&!e.on.length&&delete e.on,e}))}var Cz="_brush",Bz={signals:function(e,t){var n=t.name,r=n+"_tuple_fields",i=Az.has(t),a=[],o=[],s=[];if(t.translate&&!i){var u="!event.item || event.item.mark.name !== ".concat(Object(R.Z)(n+Cz));wz(t,(function(e,t){var n,r=Object(R.i)(null!==(n=t.between[0].filter)&&void 0!==n?n:t.between[0].filter=[]);return r.indexOf(u)<0&&r.push(u),e}))}t.project.items.forEach((function(n,r){var i=n.channel;if("x"===i||"y"===i){var u=t.init?t.init[r]:null,A=function(e,t,n,r){var i=n.channel,a=n.signals.visual,o=n.signals.data,s=Az.has(t),u=Object(R.Z)(e.scaleName(i)),A=e.getScaleComponent(i),c=A?A.get("type"):void 0,l=function(e){return"scale(".concat(u,", ").concat(e,")")},f=e.getSizeSignalRef("x"===i?"width":"height").signal,h="".concat(i,"(unit)"),g=wz(t,(function(e,t){return[].concat(Object(im.a)(e),[{events:t.between[0],update:"[".concat(h,", ").concat(h,"]")},{events:t,update:"[".concat(a,"[0], clamp(").concat(h,", 0, ").concat(f,")]")}])}));return g.push({events:{signal:t.name+"_scale_trigger"},update:QG(c)?"[".concat(l("".concat(o,"[0]")),", ").concat(l("".concat(o,"[1]")),"]"):"[0, 0]"}),s?[{name:o,on:[]}]:[Object.assign(Object.assign({name:a},r?{init:Iz(r,!0,l)}:{value:[]}),{on:g}),Object.assign(Object.assign({name:o},r?{init:Iz(r)}:{}),{on:[{events:{signal:a},update:"".concat(a,"[0] === ").concat(a,"[1] ? null : invert(").concat(u,", ").concat(a,")")}]})]}(e,t,n,u),c=n.signals.data,l=n.signals.visual,f=Object(R.Z)(e.scaleName(i)),h=QG(e.getScaleComponent(i).get("type"))?"+":"";a.push.apply(a,Object(im.a)(A)),o.push(c),s.push({scaleName:e.scaleName(i),expr:"(!isArray(".concat(c,") || ")+"(".concat(h,"invert(").concat(f,", ").concat(l,")[0] === ").concat(h).concat(c,"[0] && ")+"".concat(h,"invert(").concat(f,", ").concat(l,")[1] === ").concat(h).concat(c,"[1]))")})}else uU("Interval selections only support x and y encoding channels.")})),i||a.push({name:n+"_scale_trigger",value:{},on:[{events:s.map((function(e){return{scale:e.scaleName}})),update:s.map((function(e){return e.expr})).join(" && ")+" ? ".concat(n+"_scale_trigger"," : {}")}]});var A=t.init,c="unit: ".concat(Nz(e),", fields: ").concat(r,", values");return a.concat(Object.assign(Object.assign({name:n+Sz},A?{init:"{".concat(c,": ").concat(Iz(A),"}")}:{}),{on:[{events:[{signal:o.join(" || ")}],update:o.join(" && ")+" ? {".concat(c,": [").concat(o,"]} : null")}]}))},modifyExpr:function(e,t){return t.name+Sz+", "+("global"===t.resolve?"true":"{unit: ".concat(Nz(e),"}"))},marks:function(e,t,n){var r=t.name,i=t.project.hasChannel,a=i.x,o=i.y,s=a&&a.signals.visual,u=o&&o.signals.visual,A="data(".concat(Object(R.Z)(t.name+xz),")");if(Az.has(t))return n;var c={x:void 0!==a?{signal:"".concat(s,"[0]")}:{value:0},y:void 0!==o?{signal:"".concat(u,"[0]")}:{value:0},x2:void 0!==a?{signal:"".concat(s,"[1]")}:{field:{group:"width"}},y2:void 0!==o?{signal:"".concat(u,"[1]")}:{field:{group:"height"}}};if("global"===t.resolve){var l,f=Object(D.a)(OF(c));try{for(f.s();!(l=f.n()).done;){var h=l.value;c[h]=[Object.assign({test:"".concat(A,".length && ").concat(A,"[0].unit === ").concat(Nz(e))},c[h]),{value:0}]}}catch(I){f.e(I)}finally{f.f()}}var g=t.mark,d=g.fill,p=g.fillOpacity,v=g.cursor,y=iF(g,["fill","fillOpacity","cursor"]),m=OF(y).reduce((function(e,t){return e[t]=[{test:[void 0!==a&&"".concat(s,"[0] !== ").concat(s,"[1]"),void 0!==o&&"".concat(u,"[0] !== ").concat(u,"[1]")].filter((function(e){return e})).join(" && "),value:y[t]},{value:null}],e}),{});return[{name:r+Cz+"_bg",type:"rect",clip:!0,encode:{enter:{fill:{value:d},fillOpacity:{value:p}},update:c}}].concat(Object(im.a)(n),[{name:r+Cz,type:"rect",clip:!0,encode:{enter:Object.assign(Object.assign({},v?{cursor:{value:v}}:{}),{fill:{value:"transparent"}}),update:Object.assign(Object.assign({},c),m)}}])}};function wz(e,t){return e.events.reduce((function(e,n){return n.between?t(e,n):(uU("".concat(n," is not an ordered event stream for interval selections.")),e)}),[])}function Qz(e,t){var n=t.name,r=n+"_tuple_fields",i=t.project,a="(item().isVoronoi ? datum.datum : datum)",o=i.items.map((function(t){var n=e.fieldDef(t.channel);return n&&n.bin?"[".concat(a,"[").concat(Object(R.Z)(e.vgField(t.channel,{})),"], ")+"".concat(a,"[").concat(Object(R.Z)(e.vgField(t.channel,{binSuffix:"end"})),"]]"):"".concat(a,"[").concat(Object(R.Z)(t.field),"]")})).join(", "),s="unit: ".concat(Nz(e),", fields: ").concat(r,", values"),u=t.events;return[{name:n+Sz,on:u?[{events:u,update:"datum && item().mark.marktype !== 'group' ? {".concat(s,": [").concat(o,"]} : null"),force:!0}]:[]}]}var kz={signals:Qz,modifyExpr:function(e,t){return t.name+Sz+", "+("global"===t.resolve?"null":"{unit: ".concat(Nz(e),"}"))}},_z={signals:Qz,modifyExpr:function(e,t){return t.name+Sz+", "+("global"===t.resolve?"true":"{unit: ".concat(Nz(e),"}"))}},xz="_store",Sz="_tuple",Oz="_modify",Dz="vlSelectionResolve",Rz={single:_z,multi:kz,interval:Bz};function jz(e,t){var n=e.component.selection;if(n){var r,i=Object(D.a)(DF(n));try{for(i.s();!(r=i.n()).done;){var a=r.value;if(!0===t(a,Rz[a.type]))break}}catch(o){i.e(o)}finally{i.f()}}}function Mz(e){for(var t=e.parent;t&&!yV(t);)t=t.parent;return t}function Nz(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{escape:!0},n=t.escape,r=n?Object(R.Z)(e.name):e.name,i=Mz(e);if(i){var a,o=i.facet,s=Object(D.a)(rL);try{for(s.s();!(a=s.n()).done;){var u=a.value;o[u]&&(r+=" + '__facet_".concat(u,"_' + (facet[").concat(Object(R.Z)(i.vgField(u)),"])"))}}catch(A){s.e(A)}finally{s.f()}}return r}function Fz(e){var t=!1;return jz(e,(function(e){t=t||e.project.items.some((function(e){return"_vgsid_"===e.field}))})),t}function Tz(e){var t=pS(e),n=new Set;return t.visit((function(e){"MemberExpression"===e.type&&function e(t){return"MemberExpression"===t.object.type?e(t.object):"datum"===t.object.name}(e)&&n.add(function e(t){var n=[];return"Identifier"===t.type?[t.name]:"Literal"===t.type?[t.value]:("MemberExpression"===t.type&&(n.push.apply(n,Object(im.a)(e(t.object))),n.push.apply(n,Object(im.a)(e(t.property)))),n)}(e).slice(1).join("."))})),n}var Lz=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r,i){var a;return Object(_.a)(this,n),(a=t.call(this,e)).model=r,a.filter=i,a.expr=Gz(a.model,a.filter,Object(F.a)(a)),a._dependentFields=Tz(a.expr),a}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,this.model,pF(this.filter))}},{key:"dependentFields",value:function(){return this._dependentFields}},{key:"producedFields",value:function(){return new Set}},{key:"assemble",value:function(){return{type:"filter",expr:this.expr}}},{key:"hash",value:function(){return"Filter ".concat(this.expr)}}]),n}(nz);function Pz(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"datum",i=[];function a(t){var a=MF(t),o=e.getSelectionComponent(a,t),s=Object(R.Z)(a+xz);if(o.project.timeUnit){var u=null!==n&&void 0!==n?n:e.component.data.raw,A=o.project.timeUnit.clone();u.parent?A.insertAsParentOf(u):u.parent=A}return"none"!==o.empty&&i.push(s),"vlSelectionTest(".concat(s,", ").concat(r)+("global"===o.resolve?")":", ".concat(Object(R.Z)(o.resolve),")"))}var o=NF(t,a);return(i.length?"!("+i.map((function(e){return"length(data(".concat(e,"))")})).join(" || ")+") || ":"")+"(".concat(o,")")}function Uz(e,t){var n=t.encoding,r=t.field;if(n||r){if(n&&!r){var i=e.project.items.filter((function(e){return e.channel===n}));!i.length||i.length>1?(r=e.project.items[0].field,uU((i.length?"Multiple ":"No ")+"matching ".concat(Object(R.Z)(n)," encoding found for selection ").concat(Object(R.Z)(t.selection),". ")+'Using "field": '.concat(Object(R.Z)(r),"."))):r=i[0].field}}else r=e.project.items[0].field,e.project.items.length>1&&uU('A "field" or "encoding" must be specified when using a selection as a scale domain. '+'Using "field": '.concat(Object(R.Z)(r),"."));return"".concat(e.name,"[").concat(Object(R.Z)(r),"]")}function Gz(e,t,n){return NF(t,(function(t){return Object(R.H)(t)?t:function(e){return null===e||void 0===e?void 0:e.selection}(t)?Pz(e,t.selection,n):YU(t)}))}function qz(e,t){if(e)return Object(R.A)(e)&&!tH(e)?e.map((function(e){return Uq(e,t)})).join(", "):e}function Hz(e,t,n,r){var i,a,o;e.encode=null!==(i=e.encode)&&void 0!==i?i:{},e.encode[t]=null!==(a=e.encode[t])&&void 0!==a?a:{},e.encode[t].update=null!==(o=e.encode[t].update)&&void 0!==o?o:{},e.encode[t].update[n]=r}function Yz(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{header:!1},i=e.combine(),a=i.disable,o=i.orient,s=i.scale,u=i.labelExpr,A=i.title,c=i.zindex,l=iF(i,["disable","orient","scale","labelExpr","title","zindex"]);if(!a){for(var f in l){var h=tT[f],g=l[f];if(h&&h!==t&&"both"!==h)delete l[f];else if($F(g)){var d=g.condition,p=iF(g,["condition"]),v=Object(R.i)(d),y=ZF[f];if(y){var m=y.vgProp,I=y.part,b=[].concat(Object(im.a)(v.map((function(e){var t=e.test,n=iF(e,["test"]);return Object.assign({test:Gz(null,t)},n)}))),[p]);Hz(l,I,m,b),delete l[f]}else if(null===y){var E={signal:v.map((function(e){var t=e.test,n=iF(e,["test"]);return"".concat(Gz(null,t)," ? ").concat(rH(n)," : ")})).join("")+rH(p)};l[f]=E}}else if(_U(g)){var C=ZF[f];if(C){var B=C.vgProp,w=C.part;Hz(l,w,B,g),delete l[f]}}}if("grid"===t){if(!l.grid)return;if(l.encode){var Q=l.encode.grid;l.encode=Object.assign({},Q?{grid:Q}:{}),SF(l.encode)&&delete l.encode}return Object.assign(Object.assign({scale:s,orient:o},l),{domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:JF(c,0)})}if(r.header||!e.mainExtracted){if(void 0!==u&&Hz(l,"labels","text",{signal:u}),null===l.labelAlign&&delete l.labelAlign,l.encode){var k,_=Object(D.a)(eT);try{for(_.s();!(k=_.n()).done;){var x=k.value;e.hasAxisPart(x)||delete l.encode[x]}}catch(O){_.e(O)}finally{_.f()}SF(l.encode)&&delete l.encode}var S=qz(A,n);return Object.assign(Object.assign(Object.assign(Object.assign({scale:s,orient:o,grid:!1},S?{title:S}:{}),l),!1===n.aria?{aria:!1}:{}),{zindex:JF(c,0)})}}}function Jz(e){var t,n=e.component.axes,r=[],i=Object(D.a)(yL);try{for(i.s();!(t=i.n()).done;){var a=t.value;if(n[a]){var o,s=Object(D.a)(n[a]);try{for(s.s();!(o=s.n()).done;){var u=o.value;if(!u.get("disable")&&!u.get("gridScale")){var A="x"===a?"height":"width",c=e.getSizeSignalRef(A).signal;A!==c&&r.push({name:A,update:c})}}}catch(l){s.e(l)}finally{s.f()}}}}catch(l){i.e(l)}finally{i.f()}return r}var zz={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},Kz={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},Wz=OF(zz),Vz=OF(Kz);function Xz(e,t,n,r){return Object.assign.apply(null,[{}].concat(Object(im.a)(e.map((function(e){if("axisOrient"===e){var i,a="x"===n?"bottom":"left",o=t["x"===n?"axisBottom":"axisLeft"]||{},s=t["x"===n?"axisTop":"axisRight"]||{},u=new Set([].concat(Object(im.a)(OF(o)),Object(im.a)(OF(s)))),A={},c=Object(D.a)(u.values());try{for(c.s();!(i=c.n()).done;){var l=i.value;A[l]={signal:"".concat(r.signal,' === "').concat(a,'" ? ').concat(iH(o[l])," : ").concat(iH(s[l]))}}}catch(f){c.e(f)}finally{c.f()}return A}return t[e]})))))}function Zz(e,t,n,r){var i="band"===t?["axisDiscrete","axisBand"]:"point"===t?["axisDiscrete","axisPoint"]:t in IG?["axisQuantitative"]:"time"===t||"utc"===t?["axisTemporal"]:[],a="x"===e?"axisX":"axisY",o=_U(n)?"axisOrient":"axis"+TF(n),s=[].concat(i,Object(im.a)(i.map((function(e){return a+e.substr(4)})))),u=["axis",o,a];return{vlOnlyAxisConfig:Xz(s,r,e,n),vgAxisConfig:Xz(u,r,e,n),axisConfigStyle:$z([].concat(u,Object(im.a)(s)),r)}}function $z(e,t){var n,r,i=[{}],a=Object(D.a)(e);try{for(a.s();!(r=a.n()).done;){var o=null===(n=t[r.value])||void 0===n?void 0:n.style;if(o){o=Object(R.i)(o);var s,u=Object(D.a)(o);try{for(u.s();!(s=u.n()).done;){var A=s.value;i.push(t.style[A])}}catch(c){u.e(c)}finally{u.f()}}}}catch(c){a.e(c)}finally{a.f()}return Object.assign.apply(null,i)}function eK(e,t,n){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=AH(e,n,t.style);if(void 0!==a)return{configFrom:"style",configValue:a};for(var o=0,s=["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"];o<s.length;o++){var u=s[o];if(void 0!==(null===(r=i[u])||void 0===r?void 0:r[e]))return{configFrom:u,configValue:i[u][e]}}return{}}var tK={scale:function(e){var t=e.model,n=e.channel;return t.scaleName(n)},format:function(e){var t=e.fieldOrDatumDef,n=e.config,r=e.axis,i=r.format,a=r.formatType;return XG(t,t.type,i,a,n,!0)},formatType:function(e){var t=e.axis,n=e.fieldOrDatumDef,r=e.scaleType,i=t.formatType;return ZG(i,n,r)},grid:function(e){var t,n=e.fieldOrDatumDef,r=e.axis,i=e.scaleType;return(!yq(n)||!jL(n.bin))&&(null!==(t=r.grid)&&void 0!==t?t:function(e,t){return!wG(e)&&yq(t)&&!RL(null===t||void 0===t?void 0:t.bin)}(i,n))},gridScale:function(e){return function(e,t){var n="x"===t?"y":"x";if(e.getScaleComponent(n))return e.scaleName(n);return}(e.model,e.channel)},labelAlign:function(e){var t=e.axis,n=e.labelAngle,r=e.orient,i=e.channel;return t.labelAlign||iK(n,r,i)},labelAngle:function(e){return e.labelAngle},labelBaseline:function(e){var t=e.axis,n=e.labelAngle,r=e.orient,i=e.channel;return t.labelBaseline||rK(n,r,i)},labelFlush:function(e){var t,n=e.axis,r=e.fieldOrDatumDef,i=e.channel;return null!==(t=n.labelFlush)&&void 0!==t?t:function(e,t){if("x"===t&&EF(["quantitative","temporal"],e))return!0;return}(r.type,i)},labelOverlap:function(e){var t,n=e.axis,r=e.fieldOrDatumDef,i=e.scaleType;return null!==(t=n.labelOverlap)&&void 0!==t?t:function(e,t){if("nominal"!==e)return"log"!==t||"greedy";return}(r.type,i)},orient:function(e){return e.orient},tickCount:function(e){var t,n=e.channel,r=e.model,i=e.axis,a=e.fieldOrDatumDef,o=e.scaleType,s="x"===n?"width":"y"===n?"height":void 0,u=s?r.getSizeSignalRef(s):void 0;return null!==(t=i.tickCount)&&void 0!==t?t:function(e){var t,n=e.fieldOrDatumDef,r=e.scaleType,i=e.size;if(!e.values&&!wG(r)&&"log"!==r){if(yq(n)){if(RL(n.bin))return{signal:"ceil(".concat(i.signal,"/10)")};if(n.timeUnit&&EF(["month","hours","day","quarter"],null===(t=QU(n.timeUnit))||void 0===t?void 0:t.unit))return}return{signal:"ceil(".concat(i.signal,"/40)")}}return}({fieldOrDatumDef:a,scaleType:o,size:u,values:i.values})},title:function(e){var t=e.axis,n=e.model,r=e.channel;if(void 0!==t.title)return t.title;var i=aK(n,r);if(void 0!==i)return i;var a=n.typedFieldDef(r),o="x"===r?"x2":"y2",s=n.fieldDef(o);return lH(a?[lq(a)]:[],yq(s)?[lq(s)]:[])},values:function(e){return function(e,t){var n=e.values;if(Object(R.A)(n))return Zq(t,n);if(_U(n))return n;return}(e.axis,e.fieldOrDatumDef)},zindex:function(e){var t,n=e.axis,r=e.fieldOrDatumDef,i=e.mark;return null!==(t=n.zindex)&&void 0!==t?t:function(e,t){if("rect"===e&&Dq(t))return 1;return 0}(i,r)}};function nK(e){return"(((".concat(e.signal," % 360) + 360) % 360)")}function rK(e,t,n,r){if(void 0!==e){if("x"===n){if(_U(e)){var i=nK(e),a=_U(t)?"(".concat(t.signal,' === "top")'):"top"===t;return{signal:"(45 < ".concat(i," && ").concat(i," < 135) || (225 < ").concat(i," && ").concat(i,' < 315) ? "middle" :')+"(".concat(i," <= 45 || 315 <= ").concat(i,") === ").concat(a,' ? "bottom" : "top"')}}if(45<e&&e<135||225<e&&e<315)return"middle";if(_U(t)){var o=e<=45||315<=e?"===":"!==";return{signal:"".concat(t.signal," ").concat(o,' "top" ? "bottom" : "top"')}}return(e<=45||315<=e)===("top"===t)?"bottom":"top"}if(_U(e)){var s=nK(e),u=_U(t)?"(".concat(t.signal,' === "left")'):"left"===t,A=r?'"middle"':"null";return{signal:"".concat(s," <= 45 || 315 <= ").concat(s," || (135 <= ").concat(s," && ").concat(s," <= 225) ? ").concat(A," : (45 <= ").concat(s," && ").concat(s," <= 135) === ").concat(u,' ? "top" : "bottom"')}}if(e<=45||315<=e||135<=e&&e<=225)return r?"middle":null;if(_U(t)){var c=45<=e&&e<=135?"===":"!==";return{signal:"".concat(t.signal," ").concat(c,' "left" ? "top" : "bottom"')}}return(45<=e&&e<=135)===("left"===t)?"top":"bottom"}}function iK(e,t,n){if(void 0!==e){var r="x"===n,i=r?0:90,a=r?"bottom":"left";if(_U(e)){var o=nK(e),s=_U(t)?"(".concat(t.signal,' === "').concat(a,'")'):t===a;return{signal:"(".concat(i?"("+o+" + 90)":o," % 180 === 0) ? ").concat(r?null:'"center"'," :")+"(".concat(i," < ").concat(o," && ").concat(o," < ").concat(180+i,") === ").concat(s,' ? "left" : "right"')}}if((e+i)%180===0)return r?null:"center";if(_U(t)){var u=i<e&&e<180+i?"===":"!==",A="".concat(t.signal," ").concat(u,' "').concat(a,'"');return{signal:"".concat(A,' ? "left" : "right"')}}return(i<e&&e<180+i)===(t===a)?"left":"right"}}function aK(e,t){var n="x"===t?"x2":"y2",r=e.fieldDef(t),i=e.fieldDef(n),a=r?r.title:void 0,o=i?i.title:void 0;return a&&o?fH(a,o):a||(o||(void 0!==a?a:void 0!==o?o:void 0))}var oK=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(_.a)(this,n),(i=t.call(this,e)).transform=r,i._dependentFields=Tz(i.transform.calculate),i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,pF(this.transform))}},{key:"producedFields",value:function(){return new Set([this.transform.as])}},{key:"dependentFields",value:function(){return this._dependentFields}},{key:"assemble",value:function(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}}},{key:"hash",value:function(){return"Calculate ".concat(IF(this.transform))}}],[{key:"parseAllForSortIndex",value:function(e,t){return t.forEachFieldDef((function(t,r){if(Qq(t)&&sq(t.sort)){var i=t.field,a=t.timeUnit,o=t.sort,s=o.map((function(e,t){return"".concat(YU({field:i,timeUnit:a,equal:e})," ? ").concat(t," : ")})).join("")+o.length;e=new n(e,{calculate:s,as:sK(t,r,{forAs:!0})})}})),e}}]),n}(nz);function sK(e,t,n){return Oq(e,Object.assign({prefix:t,suffix:"sort_index"},null!==n&&void 0!==n?n:{}))}function uK(e,t){return EF(["top","bottom"],t)?"column":EF(["left","right"],t)||"row"===e?"row":"column"}function AK(e,t,n,r){var i="row"===r?n.headerRow:"column"===r?n.headerColumn:n.headerFacet;return JF(((null===t||void 0===t?void 0:t.header)||{})[e],i[e],n.header[e])}function cK(e,t,n,r){var i,a={},o=Object(D.a)(e);try{for(o.s();!(i=o.n()).done;){var s=i.value,u=AK(s,t,n,r);void 0!==u&&(a[s]=u)}}catch(A){o.e(A)}finally{o.f()}return a}var lK=["row","column"],fK=["header","footer"];function hK(e,t){var n=e.component.layoutHeaders[t].title,r=e.config?e.config:void 0,i=e.component.layoutHeaders[t].facetFieldDef?e.component.layoutHeaders[t].facetFieldDef:void 0,a=cK(["titleAnchor","titleAngle","titleOrient"],i,r,t),o=a.titleAnchor,s=a.titleAngle,u=uK(t,a.titleOrient),A=VF(s);return{name:"".concat(t,"-title"),type:"group",role:"".concat(u,"-title"),title:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:n},"row"===t?{orient:"left"}:{}),{style:"guide-title"}),dK(A,u)),gK(u,A,o)),EK(r,i,t,Wz,zz))}}function gK(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"middle";switch(n){case"start":return{align:"left"};case"end":return{align:"right"}}var r=iK(t,"row"===e?"left":"top","row"===e?"y":"x");return r?{align:r}:{}}function dK(e,t){var n=rK(e,"row"===t?"left":"top","row"===t?"y":"x",!0);return n?{baseline:n}:{}}function pK(e,t){var n,r=e.component.layoutHeaders[t],i=[],a=Object(D.a)(fK);try{for(a.s();!(n=a.n()).done;){var o=n.value;if(r[o]){var s,u=Object(D.a)(r[o]);try{for(u.s();!(s=u.n()).done;){var A=mK(e,t,o,r,s.value);null!=A&&i.push(A)}}catch(c){u.e(c)}finally{u.f()}}}}catch(c){a.e(c)}finally{a.f()}return i}function vK(e,t){var n,r=e.sort;return oq(r)?{field:Oq(r,{expr:"datum"}),order:null!==(n=r.order)&&void 0!==n?n:"ascending"}:Object(R.A)(r)?{field:sK(e,t,{expr:"datum"}),order:"ascending"}:{field:Oq(e,{expr:"datum"}),order:null!==r&&void 0!==r?r:"ascending"}}function yK(e,t,n){var r=cK(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],e,n,t),i=r.format,a=r.formatType,o=r.labelAngle,s=r.labelAnchor,u=r.labelOrient,A=r.labelExpr,c=KG({fieldOrDatumDef:e,format:i,formatType:a,expr:"parent",config:n}).signal,l=uK(t,u);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:{signal:A?qF(qF(A,"datum.label",c),"datum.value",Oq(e,{expr:"parent"})):c}},"row"===t?{orient:"left"}:{}),{style:"guide-label",frame:"group"}),dK(o,l)),gK(l,o,s)),EK(n,e,t,Vz,Kz))}function mK(e,t,n,r,i){if(i){var a=null,o=r.facetFieldDef,s=e.config?e.config:void 0;if(o&&i.labels){var u=cK(["labelOrient"],o,s,t).labelOrient;("row"===t&&!EF(["top","bottom"],u)||"column"===t&&!EF(["left","right"],u))&&(a=yK(o,t,s))}var A=yV(e)&&!uq(e.facet),c=i.axes,l=(null===c||void 0===c?void 0:c.length)>0;if(a||l){var f="row"===t?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:e.getName("".concat(t,"_").concat(n)),type:"group",role:"".concat(t,"-").concat(n)},r.facetFieldDef?{from:{data:e.getName(t+"_domain")},sort:vK(o,t)}:{}),l&&A?{from:{data:e.getName("facet_domain_".concat(t))}}:{}),a?{title:a}:{}),i.sizeSignal?{encode:{update:Object(Q.a)({},f,i.sizeSignal)}}:{}),l?{axes:c}:{})}}return null}var IK={column:{start:0,end:1},row:{start:1,end:0}};function bK(e,t){return IK[t][e]}function EK(e,t,n,r,i){var a,o={},s=Object(D.a)(r);try{for(s.s();!(a=s.n()).done;){var u=a.value;if(i[u]){var A=AK(u,t,e,n);void 0!==A&&(o[i[u]]=A)}}}catch(c){s.e(c)}finally{s.f()}return o}function CK(e){return[].concat(Object(im.a)(BK(e,"width")),Object(im.a)(BK(e,"height")),Object(im.a)(BK(e,"childWidth")),Object(im.a)(BK(e,"childHeight")))}function BK(e,t){var n="width"===t?"x":"y",r=e.component.layoutSize.get(t);if(!r||"merged"===r)return[];var i=e.getSizeSignalRef(t).signal;if("step"===r){var a=e.getScaleComponent(n);if(a){var o=a.get("type"),s=a.get("range");if(wG(o)&&xU(s)){var u=e.scaleName(n);if(yV(e.parent))if("independent"===e.parent.component.resolve.scale[n])return[wK(u,s)];return[wK(u,s),{name:i,update:QK(u,a,"domain('".concat(u,"').length"))}]}}throw new Error("layout size is step although width/height is not step.")}if("container"==r){var A=i.endsWith("width"),c=A?"containerSize()[0]":"containerSize()[1]",l=tY(e.config.view,A?"width":"height"),f="isFinite(".concat(c,") ? ").concat(c," : ").concat(l);return[{name:i,init:f,on:[{update:f,events:"window:resize"}]}]}return[{name:i,value:r}]}function wK(e,t){return{name:e+"_step",value:t.step}}function QK(e,t,n){var r=t.get("type"),i=t.get("padding"),a=JF(t.get("paddingOuter"),i),o=t.get("paddingInner");return o="band"===r?void 0!==o?o:i:1,"bandspace(".concat(n,", ").concat(o,", ").concat(a,") * ").concat(e,"_step")}function kK(e){return"childWidth"===e?"width":"childHeight"===e?"height":e}function _K(e,t){return OF(e).reduce((function(n,r){var i=e[r];return Object.assign(Object.assign({},n),xJ(t,i,r,(function(e){return _U(e)?e:{value:e.value}})))}),{})}function xK(e,t){if(IV(t)||yV(t))return"shared";if(mV(t))return mL(e)?"independent":"shared";throw new Error("invalid model type for resolve")}function SK(e,t){var n=e.scale[t],r=mL(t)?"axis":"legend";return"independent"===n?("shared"===e[r][t]&&uU(v.independentScaleMeansIndependentGuide(t)),"independent"):e[r][t]||"shared"}var OK=Object.assign(Object.assign({},YH),{disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1}),DK=OF(OK),RK=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return n}(VY),jK={symbols:function(e,t){var n,r,i,a,o,s=t.fieldOrDatumDef,u=t.model,A=t.channel,c=t.legendCmpt;if("symbol"!==t.legendType)return;var l=u.markDef,f=u.encoding,h=u.config,g=u.mark,d=l.filled&&"trail"!==g,p=Object.assign(Object.assign({},function(e,t,n){var r,i=Object(D.a)(n);try{for(i.s();!(r=i.n()).done;){var a=r.value,o=sH(a,t.markDef,t.config);void 0!==o&&(e[a]=nH(o))}}catch(s){i.e(s)}finally{i.f()}return e}({},u,BT)),FJ(u,{filled:d})),v=null!==(n=MK(f.opacity))&&void 0!==n?n:l.opacity;if(p.fill)if("fill"===A||d&&A===YT)delete p.fill;else if(p.fill.field)c.get("symbolFillColor")?delete p.fill:(p.fill=nH(null!==(r=h.legend.symbolBaseFillColor)&&void 0!==r?r:"black"),p.fillOpacity=nH(null!==v&&void 0!==v?v:1));else if(Object(R.A)(p.fill)){var y=null!==(o=null!==(a=NK(null!==(i=f.fill)&&void 0!==i?i:f.color))&&void 0!==a?a:l.fill)&&void 0!==o?o:d&&l.color;y&&(p.fill=nH(y))}if(p.stroke)if("stroke"===A||!d&&A===YT)delete p.stroke;else if(p.stroke.field)delete p.stroke;else if(Object(R.A)(p.stroke)){var m=JF(NK(f.stroke||f.color),l.stroke,d?l.color:void 0);m&&(p.stroke={value:m})}if("opacity"!==A){var I=yq(s)&&TK(u,c,s);I?p.opacity=[Object.assign({test:I},nH(null!==v&&void 0!==v?v:1)),nH(h.legend.unselectedOpacity)]:v&&(p.opacity=nH(v))}return SF(p=Object.assign(Object.assign({},p),e))?void 0:p},gradient:function(e,t){var n=t.model;if("gradient"!==t.legendType)return;var r={},i=MK(n.encoding.opacity)||n.markDef.opacity;i&&(r.opacity=nH(i));return SF(r=Object.assign(Object.assign({},r),e))?void 0:r},labels:function(e,t){var n=t.fieldOrDatumDef,r=t.model,i=t.channel,a=t.legendCmpt,o=r.legend(i)||{},s=r.config,u=yq(n)?TK(r,a,n):void 0,A=u?[{test:u,value:1},{value:s.legend.unselectedOpacity}]:void 0,c=o.format,l=o.formatType,f=JG(l)?VG({fieldOrDatumDef:n,field:"datum.value",format:c,formatType:l,config:s}):void 0,h=Object.assign(Object.assign(Object.assign({},A?{opacity:A}:{}),f?{text:f}:{}),e);return SF(h)?void 0:h},entries:function(e,t){var n=t.legendCmpt.get("selections");return(null===n||void 0===n?void 0:n.length)?Object.assign(Object.assign({},e),{fill:{value:"transparent"}}):e}};function MK(e){return FK(e,(function(e,t){return Math.max(e,t.value)}))}function NK(e){return FK(e,(function(e,t){return JF(e,t.value)}))}function FK(e,t){return function(e){var t=e&&e.condition;return!!t&&(Object(R.A)(t)||wq(t))}(e)?Object(R.i)(e.condition).reduce(t,e.value):wq(e)?e.value:void 0}function TK(e,t,n){var r=t.get("selections");if(null===r||void 0===r?void 0:r.length){var i=Object(R.Z)(n.field);return r.map((function(e){var t=Object(R.Z)(MF(e)+xz);return"(!length(data(".concat(t,")) || (").concat(e,"[").concat(i,"] && indexof(").concat(e,"[").concat(i,"], datum.value) >= 0))")})).join(" || ")}}var LK={direction:function(e){return e.direction},format:function(e){var t=e.fieldOrDatumDef,n=e.legend,r=e.config,i=n.format,a=n.formatType;return XG(t,t.type,i,a,r,!1)},formatType:function(e){var t=e.legend,n=e.fieldOrDatumDef,r=e.scaleType,i=t.formatType;return ZG(i,n,r)},gradientLength:function(e){var t,n,r=e.legend,i=e.legendConfig;return null!==(n=null!==(t=r.gradientLength)&&void 0!==t?t:i.gradientLength)&&void 0!==n?n:function(e){var t=e.legendConfig,n=e.model,r=e.direction,i=e.orient,a=e.scaleType,o=t.gradientHorizontalMaxLength,s=t.gradientHorizontalMinLength,u=t.gradientVerticalMaxLength,A=t.gradientVerticalMinLength;if(kG(a))return"horizontal"===r?"top"===i||"bottom"===i?GK(n,"width",s,o):s:GK(n,"height",A,u);return}(e)},labelOverlap:function(e){var t,n,r=e.legend,i=e.legendConfig,a=e.scaleType;return null!==(n=null!==(t=r.labelOverlap)&&void 0!==t?t:i.labelOverlap)&&void 0!==n?n:function(e){if(EF(["quantile","threshold","log"],e))return"greedy";return}(a)},symbolType:function(e){var t,n=e.legend,r=e.markDef,i=e.channel,a=e.encoding;return null!==(t=n.symbolType)&&void 0!==t?t:function(e,t,n,r){var i;if("shape"!==t){var a=null!==(i=NK(n))&&void 0!==i?i:r;if(a)return a}switch(e){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}(r.type,i,a.shape,r.shape)},title:function(e){return Lq(e.fieldOrDatumDef,e.config,{allowDisabling:!0})},type:function(e){var t=e.legendType,n=e.scaleType;if(tL(e.channel)&&kG(n)){if("gradient"===t)return}else if("symbol"===t)return;return t},values:function(e){var t=e.fieldOrDatumDef;return function(e,t){var n=e.values;if(Object(R.A)(n))return Zq(t,n);if(_U(n))return n;return}(e.legend,t)}};function PK(e){return JF(e.legend.type,function(e){var t=e.channel,n=e.timeUnit,r=e.scaleType;if(tL(t)){if(EF(["quarter","month","day"],n))return"symbol";if(kG(r))return"gradient"}return"symbol"}(e))}function UK(e){var t,n,r=e.legendConfig,i=e.legendType,a=e.orient;return null!==(n=null!==(t=e.legend.direction)&&void 0!==t?t:r[i?"gradientDirection":"symbolDirection"])&&void 0!==n?n:function(e,t){switch(e){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return"gradient"===t?"horizontal":void 0}}(a,i)}function GK(e,t,n,r){var i=e.getSizeSignalRef(t).signal;return{signal:"clamp(".concat(i,", ").concat(n,", ").concat(r,")")}}function qK(e){var t=vV(e)?function(e){for(var t=e.encoding,n={},r=0,i=[YT].concat(Object(im.a)(qH));r<i.length;r++){var a=i[r],o=Hq(t[a]);o&&e.getScaleComponent(a)&&(a===KT&&yq(o)&&o.type===$U||(n[a]=YK(e,a)))}return n}(e):function(e){var t,n=e.component,r=n.legends,i=n.resolve,a=Object(D.a)(e.children);try{for(a.s();!(t=a.n()).done;){var o=t.value;qK(o);var s,u=Object(D.a)(OF(o.component.legends));try{for(u.s();!(s=u.n()).done;){var A=s.value;i.legend[A]=SK(e.component.resolve,A),"shared"===i.legend[A]&&(r[A]=JK(r[A],o.component.legends[A]),r[A]||(i.legend[A]="independent",delete r[A]))}}catch(p){u.e(p)}finally{u.f()}}}catch(p){a.e(p)}finally{a.f()}var c,l=Object(D.a)(OF(r));try{for(l.s();!(c=l.n()).done;){var f,h=c.value,g=Object(D.a)(e.children);try{for(g.s();!(f=g.n()).done;){var d=f.value;d.component.legends[h]&&("shared"===i.legend[h]&&delete d.component.legends[h])}}catch(p){g.e(p)}finally{g.f()}}}catch(p){l.e(p)}finally{l.f()}return r}(e);return e.component.legends=t,t}function HK(e,t,n,r){switch(t){case"disable":return void 0!==n;case"values":return!!(null===n||void 0===n?void 0:n.values);case"title":if("title"===t&&e===(null===r||void 0===r?void 0:r.title))return!0}return e===(n||{})[t]}function YK(e,t){var n,r,i,a=e.legend(t),o=e.markDef,s=e.encoding,u=e.config,A=u.legend,c=new RK({},function(e,t){var n=e.scaleName(t);if("trail"===e.mark){if("color"===t)return{stroke:n};if("size"===t)return{strokeWidth:n}}return"color"===t?e.markDef.filled?{fill:n}:{stroke:n}:Object(Q.a)({},t,n)}(e,t));!function(e,t,n){var r,i=null===(r=e.fieldDef(t))||void 0===r?void 0:r.field;jz(e,(function(e){var r,a,o=null!==(r=e.project.hasField[i])&&void 0!==r?r:e.project.hasChannel[t];if(o&&fz.has(e)){var s=null!==(a=n.get("selections"))&&void 0!==a?a:[];s.push(e.name),n.set("selections",s,!1),o.hasLegend=!0}}))}(e,t,c);var l=void 0!==a?!a:A.disable;if(c.set("disable",l,void 0!==a),l)return c;a=a||{};var f,h=e.getScaleComponent(t).get("type"),g=Hq(s[t]),d=yq(g)?null===(n=QU(g.timeUnit))||void 0===n?void 0:n.unit:void 0,p=a.orient||u.legend.orient||"right",v=PK({legend:a,channel:t,timeUnit:d,scaleType:h}),y={legend:a,channel:t,model:e,markDef:o,encoding:s,fieldOrDatumDef:g,legendConfig:A,config:u,scaleType:h,orient:p,legendType:v,direction:UK({legend:a,legendType:v,orient:p,legendConfig:A})},m=Object(D.a)(DK);try{for(m.s();!(f=m.n()).done;){var I=f.value,b=I in LK?LK[I](y):a[I];if(void 0!==b){var E=HK(b,I,a,e.fieldDef(t));(E||void 0===u.legend[I])&&c.set(I,b,E)}}}catch(j){m.e(j)}finally{m.f()}for(var C=null!==(r=null===a||void 0===a?void 0:a.encoding)&&void 0!==r?r:{},B=c.get("selections"),w={},k={fieldOrDatumDef:g,model:e,channel:t,legendCmpt:c,legendType:v},_=0,x=["labels","legend","title","symbols","gradient","entries"];_<x.length;_++){var S=x[_],O=_K(null!==(i=C[S])&&void 0!==i?i:{},e),R=S in jK?jK[S](O,k):O;void 0===R||SF(R)||(w[S]=Object.assign(Object.assign(Object.assign({},(null===B||void 0===B?void 0:B.length)&&yq(g)?{name:"".concat(MF(g.field),"_legend_").concat(S)}:{}),(null===B||void 0===B?void 0:B.length)?{interactive:!!B}:{}),{update:R}))}return SF(w)||c.set("encode",w,!!(null===a||void 0===a?void 0:a.encoding)),c}function JK(e,t){var n,r,i,a;if(!e)return t.clone();var o=e.getWithExplicit("orient"),s=t.getWithExplicit("orient");if(!o.explicit||!s.explicit||o.value===s.value){var u,A=!1,c=Object(D.a)(DK);try{var l=function(){var n=u.value,r=tJ(e.getWithExplicit(n),t.getWithExplicit(n),n,"legend",(function(e,t){switch(n){case"symbolType":return function(e,t){if("circle"===t.value)return t;return e}(e,t);case"title":return hH(e,t);case"type":return A=!0,ZY("symbol")}return eJ(e,t,n,"legend")}));e.setWithExplicit(n,r)};for(c.s();!(u=c.n()).done;)l()}catch(f){c.e(f)}finally{c.f()}return A&&((null===(r=null===(n=e.implicit)||void 0===n?void 0:n.encode)||void 0===r?void 0:r.gradient)&&FF(e.implicit,["encode","gradient"]),(null===(a=null===(i=e.explicit)||void 0===i?void 0:i.encode)||void 0===a?void 0:a.gradient)&&FF(e.explicit,["encode","gradient"])),e}}function zK(e,t,n,r){var i,a,o;e.encode=null!==(i=e.encode)&&void 0!==i?i:{},e.encode[t]=null!==(a=e.encode[t])&&void 0!==a?a:{},e.encode[t].update=null!==(o=e.encode[t].update)&&void 0!==o?o:{},e.encode[t].update[n]=r}function KK(e){var t,n=e.component.legends,r={},i=Object(D.a)(OF(n));try{for(i.s();!(t=i.n()).done;){var a=t.value,o=e.getScaleComponent(a),s=mF(o.get("domains"));if(r[s]){var u,A=Object(D.a)(r[s]);try{for(A.s();!(u=A.n()).done;){JK(u.value,n[a])||r[s].push(n[a])}}catch(c){A.e(c)}finally{A.f()}}else r[s]=[n[a].clone()]}}catch(c){i.e(c)}finally{i.f()}return DF(r).flat().map((function(t){return function(e,t){var n,r=e.combine(),i=r.disable,a=r.labelExpr,o=(r.selections,iF(r,["disable","labelExpr","selections"]));if(i)return;!1===t.aria&&void 0==o.aria&&(o.aria=!1);if(null===(n=o.encode)||void 0===n?void 0:n.symbols){var s=o.encode.symbols.update;!s.fill||"transparent"===s.fill.value||s.stroke||o.stroke||(s.stroke={value:"transparent"});var u,A=Object(D.a)(qH);try{for(A.s();!(u=A.n()).done;){var l=u.value;o[l]&&delete s[l]}}catch(c){A.e(c)}finally{A.f()}}o.title||delete o.title;void 0!==a&&zK(o,"labels","text",{signal:a});for(var f in o){var h=o[f];if(_U(h)){var g=HH[f];if(g){var d=g.vgProp,p=g.part;zK(o,p,d,h),delete o[f]}}}return o}(t,e.config)})).filter((function(e){return void 0!==e}))}function WK(e){return IV(e)||mV(e)?function(e){return e.children.reduce((function(e,t){return e.concat(t.assembleProjections())}),VK(e))}(e):VK(e)}function VK(e){var t=e.component.projection;if(!t||t.merged)return[];var n=t.combine(),r=n.name;if(t.data){var i={signal:"[".concat(t.size.map((function(e){return e.signal})).join(", "),"]")},a=t.data.reduce((function(t,n){var r=_U(n)?n.signal:"data('".concat(e.lookupDataSource(n),"')");return EF(t,r)||t.push(r),t}),[]);if(a.length<=0)throw new Error("Projection's fit didn't find any data sources");return[Object.assign({name:r,size:i,fit:{signal:a.length>1?"[".concat(a.join(", "),"]"):a[0]}},n)]}return[Object.assign(Object.assign({name:r},{translate:{signal:"[width / 2, height / 2]"}}),n)]}var XK=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"],ZK=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r,i,a){var o;return Object(_.a)(this,n),(o=t.call(this,Object.assign({},r),{name:e})).specifiedProjection=r,o.size=i,o.data=a,o.merged=!1,o}return Object(x.a)(n,[{key:"isFit",get:function(){return!!this.data}}]),n}(VY);function $K(e){e.component.projection=vV(e)?function(e){var t;if(e.hasProjection){var n=e.specifiedProjection,r=!(n&&(null!=n.scale||null!=n.translate)),i=r?[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]:void 0,a=r?function(e){for(var t=[],n=e.encoding,r=0,i=[["longitude","latitude"],["longitude2","latitude2"]];r<i.length;r++){var a=i[r];(Hq(n[a[0]])||Hq(n[a[1]]))&&t.push({signal:e.getName("geojson_".concat(t.length))})}e.channelHasField(KT)&&e.typedFieldDef(KT).type===$U&&t.push({signal:e.getName("geojson_".concat(t.length))});0===t.length&&t.push(e.requestDataName(cJ));return t}(e):void 0;return new ZK(e.projectionName(!0),Object.assign(Object.assign({},null!==(t=e.config.projection)&&void 0!==t?t:{}),null!==n&&void 0!==n?n:{}),i,a)}return}(e):function(e){if(0===e.children.length)return;var t,n,r=Object(D.a)(e.children);try{for(r.s();!(n=r.n()).done;){$K(n.value)}}catch(f){r.e(f)}finally{r.f()}var i=BF(e.children,(function(e){var n=e.component.projection;if(n){if(t){var r=function(e,t){var n=BF(XK,(function(n){return!Object(R.v)(e.explicit,n)&&!Object(R.v)(t.explicit,n)||!(!Object(R.v)(e.explicit,n)||!Object(R.v)(t.explicit,n)||mF(e.get(n))!==mF(t.get(n)))}));if(mF(e.size)===mF(t.size)){if(n)return e;if(mF(e.explicit)===mF({}))return t;if(mF(t.explicit)===mF({}))return e}return null}(t,n);return r&&(t=r),!!r}return t=n,!0}return!0}));if(t&&i){var a,o=e.projectionName(!0),s=new ZK(o,t.specifiedProjection,t.size,pF(t.data)),u=Object(D.a)(e.children);try{for(u.s();!(a=u.n()).done;){var A=a.value,c=A.component.projection;if(c){var l;if(c.isFit)(l=s.data).push.apply(l,Object(im.a)(A.component.projection.data));A.renameProjection(c.get("name"),o),c.merged=!0}}}catch(f){u.e(f)}finally{u.f()}return s}return}(e)}var eW=n(137);function tW(e,t){return"".concat(DL(e),"_").concat(t)}function nW(e,t,n){var r,i=tW(null!==(r=Kq(n,void 0))&&void 0!==r?r:{},t);return e.getName("".concat(i,"_bins"))}function rW(e,t,n){var r,i;r=function(e){return"as"in e}(e)?Object(R.H)(e.as)?[e.as,"".concat(e.as,"_end")]:[e.as[0],e.as[1]]:[Oq(e,{forAs:!0}),Oq(e,{binSuffix:"end",forAs:!0})];var a=Object.assign({},Kq(t,void 0)),o=tW(a,e.field),s=function(e,t){return{signal:e.getName("".concat(t,"_bins")),extentSignal:e.getName("".concat(t,"_extent"))}}(n,o),u=s.signal,A=s.extentSignal;if(NL(a.extent)){var c=a.extent,l=c.selection;i=Uz(n.getSelectionComponent(MF(l),l),c),delete a.extent}return{key:o,binComponent:Object.assign(Object.assign(Object.assign({bin:a,field:e.field,as:[r]},u?{signal:u}:{}),A?{extentSignal:A}:{}),i?{span:i}:{})}}var iW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(_.a)(this,n),(i=t.call(this,e)).bins=r,i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,pF(this.bins))}},{key:"merge",value:function(e,t){var n,r=Object(D.a)(OF(e.bins));try{for(r.s();!(n=r.n()).done;){var i=n.value;i in this.bins?(t(e.bins[i].signal,this.bins[i].signal),this.bins[i].as=QF([].concat(Object(im.a)(this.bins[i].as),Object(im.a)(e.bins[i].as)),IF)):this.bins[i]=e.bins[i]}}catch(u){r.e(u)}finally{r.f()}var a,o=Object(D.a)(e.children);try{for(o.s();!(a=o.n()).done;){var s=a.value;e.removeChild(s),s.parent=this}}catch(u){o.e(u)}finally{o.f()}e.remove()}},{key:"producedFields",value:function(){return new Set(DF(this.bins).map((function(e){return e.as})).flat(2))}},{key:"dependentFields",value:function(){return new Set(DF(this.bins).map((function(e){return e.field})))}},{key:"hash",value:function(){return"Bin ".concat(IF(this.bins))}},{key:"assemble",value:function(){return DF(this.bins).flatMap((function(e){var t=[],n=Object(eW.a)(e.as),r=n[0],i=n.slice(1),a=e.bin,o=a.extent,s=iF(a,["extent"]),u=Object.assign(Object.assign(Object.assign({type:"bin",field:GF(e.field),as:r,signal:e.signal},NL(o)?{extent:null}:{extent:o}),e.span?{span:{signal:"span(".concat(e.span,")")}}:{}),s);!o&&e.extentSignal&&(t.push({type:"extent",field:GF(e.field),signal:e.extentSignal}),u.extent={signal:e.extentSignal}),t.push(u);var A,c=Object(D.a)(i);try{for(c.s();!(A=c.n()).done;)for(var l=A.value,f=0;f<2;f++)t.push({type:"formula",expr:Oq({field:r[f]},{expr:"datum"}),as:l[f]})}catch(h){c.e(h)}finally{c.f()}return e.formula&&t.push({type:"formula",expr:e.formula,as:e.formulaAs}),t}))}}],[{key:"makeFromEncoding",value:function(e,t){var r=t.reduceFieldDef((function(e,n,r){if(Bq(n)&&RL(n.bin)){var i=rW(n,n.bin,t),a=i.key,o=i.binComponent;e[a]=Object.assign(Object.assign(Object.assign({},o),e[a]),function(e,t,n,r){var i,a;if($q(t,n)){var o=vV(e)&&null!==(a=null!==(i=e.axis(n))&&void 0!==i?i:e.legend(n))&&void 0!==a?a:{},s=Oq(t,{expr:"datum"}),u=Oq(t,{expr:"datum",binSuffix:"end"});return{formulaAs:Oq(t,{binSuffix:"range",forAs:!0}),formula:nq(s,u,o.format,o.formatType,r)}}return{}}(t,n,r,t.config))}return e}),{});return SF(r)?null:new n(e,r)}},{key:"makeFromTransform",value:function(e,t,r){var i=rW(t,t.bin,r),a=i.key,o=i.binComponent;return new n(e,Object(Q.a)({},a,o))}}]),n}(nz),aW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e){var r,i;if(Object(_.a)(this,n),r=t.call(this,null),oJ(e=null!==e&&void 0!==e?e:{name:"source"})||(i=e.format?Object.assign({},yF(e.format,["parse"])):{}),iJ(e))r._data={values:e.values};else if(rJ(e)){if(r._data={url:e.url},!i.type){var a=/(?:\.([^.]+))?$/.exec(e.url)[1];EF(["json","csv","tsv","dsv","topojson"],a)||(a="json"),i.type=a}}else uJ(e)?r._data={values:[{type:"Sphere"}]}:(aJ(e)||oJ(e))&&(r._data={});return r._generator=oJ(e),e.name&&(r._name=e.name),i&&!SF(i)&&(r._data.format=i),r}return Object(x.a)(n,[{key:"dependentFields",value:function(){return new Set}},{key:"producedFields",value:function(){}},{key:"hasName",value:function(){return!!this._name}},{key:"remove",value:function(){throw new Error("Source nodes are roots and cannot be removed.")}},{key:"hash",value:function(){throw new Error("Cannot hash sources")}},{key:"assemble",value:function(){return Object.assign(Object.assign({name:this._name},this._data),{transform:[]})}},{key:"data",get:function(){return this._data}},{key:"isGenerator",get:function(){return this._generator}},{key:"dataName",get:function(){return this._name},set:function(e){this._name=e}},{key:"parent",set:function(e){throw new Error("Source nodes have to be roots.")}}]),n}(nz);function oW(e){var t,n=Object(D.a)(e);try{for(n.s();!(t=n.n()).done;){var r,i=t.value,a=Object(D.a)(i.children);try{for(a.s();!(r=a.n()).done;){var o=r.value;if(o.parent!==i)return console.error("Dataflow graph is inconsistent.",i,o),!1}}catch(s){a.e(s)}finally{a.f()}if(!oW(i.children))return!1}}catch(s){n.e(s)}finally{n.f()}return!0}var sW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(_.a)(this,n),(i=t.call(this,e)).params=r,i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,this.params)}},{key:"dependentFields",value:function(){return new Set}},{key:"producedFields",value:function(){}},{key:"hash",value:function(){return"Graticule ".concat(IF(this.params))}},{key:"assemble",value:function(){return Object.assign({type:"graticule"},!0===this.params?{}:this.params)}}]),n}(nz),uW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(_.a)(this,n),(i=t.call(this,e)).params=r,i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,this.params)}},{key:"dependentFields",value:function(){return new Set}},{key:"producedFields",value:function(){var e;return new Set([null!==(e=this.params.as)&&void 0!==e?e:"data"])}},{key:"hash",value:function(){return"Hash ".concat(IF(this.params))}},{key:"assemble",value:function(){return Object.assign({type:"sequence"},this.params)}}]),n}(nz);function AW(e){return e instanceof aW||e instanceof sW||e instanceof uW}var cW=function(){function e(){Object(_.a)(this,e),this._mutated=!1}return Object(x.a)(e,[{key:"setMutated",value:function(){this._mutated=!0}},{key:"mutatedFlag",get:function(){return this._mutated}}]),e}(),lW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),(e=t.call(this))._continue=!1,e}return Object(x.a)(n,[{key:"setContinue",value:function(){this._continue=!0}},{key:"reset",value:function(){}},{key:"optimizeNextFromLeaves",value:function(e){if(AW(e))return!1;var t=e.parent;return this.run(e).continueFlag&&this.optimizeNextFromLeaves(t),this.mutatedFlag}},{key:"continueFlag",get:function(){return this._continue}},{key:"flags",get:function(){return{continueFlag:this.continueFlag,mutatedFlag:this.mutatedFlag}},set:function(e){var t=e.continueFlag,n=e.mutatedFlag;t&&this.setContinue(),n&&this.setMutated()}}]),n}(cW),fW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return n}(cW);function hW(e,t,n,r){var i=vV(r)?r.encoding[hL(t)]:void 0;if(Bq(n)&&vV(r)&&gq(t,n,i,r.stack,r.markDef,r.config))e.add(Oq(n,{})),e.add(Oq(n,{suffix:"end"})),n.bin&&$q(n,t)&&e.add(Oq(n,{binSuffix:"range"}));else if(t in ZT){var a=function(e){switch(e){case"latitude":return"y";case"latitude2":return"y2";case"longitude":return"x";case"longitude2":return"x2"}}(t);e.add(r.getName(a))}else e.add(Oq(n));return e}var gW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r,i){var a;return Object(_.a)(this,n),(a=t.call(this,e)).dimensions=r,a.measures=i,a}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,new Set(this.dimensions),pF(this.measures))}},{key:"merge",value:function(e){return function(e,t){if(e.size!==t.size)return!1;var n,r=Object(D.a)(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!t.has(i))return!1}}catch(a){r.e(a)}finally{r.f()}return!0}(this.dimensions,e.dimensions)?(function(e,t){var n,r,i=Object(D.a)(OF(t));try{for(i.s();!(r=i.n()).done;){var a,o=r.value,s=t[o],u=Object(D.a)(OF(s));try{for(u.s();!(a=u.n()).done;){var A=a.value;o in e?e[o][A]=new Set([].concat(Object(im.a)(null!==(n=e[o][A])&&void 0!==n?n:[]),Object(im.a)(s[A]))):e[o]=Object(Q.a)({},A,s[A])}}catch(c){u.e(c)}finally{u.f()}}}catch(c){i.e(c)}finally{i.f()}}(this.measures,e.measures),!0):(function(){var e;(e=aU).debug.apply(e,arguments)}("different dimensions, cannot merge"),!1)}},{key:"addDimensions",value:function(e){e.forEach(this.dimensions.add,this.dimensions)}},{key:"dependentFields",value:function(){return new Set([].concat(Object(im.a)(this.dimensions),Object(im.a)(OF(this.measures))))}},{key:"producedFields",value:function(){var e,t=new Set,n=Object(D.a)(OF(this.measures));try{for(n.s();!(e=n.n()).done;){var r,i=e.value,a=Object(D.a)(OF(this.measures[i]));try{for(a.s();!(r=a.n()).done;){var o=r.value,s=this.measures[i][o];0===s.size?t.add("".concat(o,"_").concat(i)):s.forEach(t.add,t)}}catch(u){a.e(u)}finally{a.f()}}}catch(u){n.e(u)}finally{n.f()}return t}},{key:"hash",value:function(){return"Aggregate ".concat(IF({dimensions:this.dimensions,measures:this.measures}))}},{key:"assemble",value:function(){var e,t=[],n=[],r=[],i=Object(D.a)(OF(this.measures));try{for(i.s();!(e=i.n()).done;){var a,o=e.value,s=Object(D.a)(OF(this.measures[o]));try{for(s.s();!(a=s.n()).done;){var u,A=a.value,c=Object(D.a)(this.measures[o][A]);try{for(c.s();!(u=c.n()).done;){var l=u.value;r.push(l),t.push(A),n.push("*"===o?null:GF(o))}}catch(f){c.e(f)}finally{c.f()}}}catch(f){s.e(f)}finally{s.f()}}}catch(f){i.e(f)}finally{i.f()}return{type:"aggregate",groupby:Object(im.a)(this.dimensions).map(GF),ops:t,fields:n,as:r}}},{key:"groupBy",get:function(){return this.dimensions}}],[{key:"makeFromEncoding",value:function(e,t){var r=!1;t.forEachFieldDef((function(e){e.aggregate&&(r=!0)}));var i={},a=new Set;return r?(t.forEachFieldDef((function(e,n){var r,o,s,u,A=e.aggregate,c=e.field;if(A)if("count"===A)i["*"]=null!==(r=i["*"])&&void 0!==r?r:{},i["*"].count=new Set([Oq(e,{forAs:!0})]);else{if(RT(A)||jT(A)){var l=RT(A)?"argmin":"argmax",f=A[l];i[f]=null!==(o=i[f])&&void 0!==o?o:{},i[f][l]=new Set([Oq({op:l,field:f},{forAs:!0})])}else i[c]=null!==(s=i[c])&&void 0!==s?s:{},i[c][A]=new Set([Oq(e,{forAs:!0})]);kL(n)&&"unaggregated"===t.scaleDomain(n)&&(i[c]=null!==(u=i[c])&&void 0!==u?u:{},i[c].min=new Set([Oq({field:c,aggregate:"min"},{forAs:!0})]),i[c].max=new Set([Oq({field:c,aggregate:"max"},{forAs:!0})]))}else hW(a,n,e,t)})),a.size+OF(i).length===0?null:new n(e,a,i)):null}},{key:"makeFromTransform",value:function(e,t){var r,i,a,o,s=new Set,u={},A=Object(D.a)(t.aggregate);try{for(A.s();!(o=A.n()).done;){var c=o.value,l=c.op,f=c.field,h=c.as;l&&("count"===l?(u["*"]=null!==(r=u["*"])&&void 0!==r?r:{},u["*"].count=new Set([h||Oq(c,{forAs:!0})])):(u[f]=null!==(i=u[f])&&void 0!==i?i:{},u[f][l]=new Set([h||Oq(c,{forAs:!0})])))}}catch(v){A.e(v)}finally{A.f()}var g,d=Object(D.a)(null!==(a=t.groupby)&&void 0!==a?a:[]);try{for(d.s();!(g=d.n()).done;){var p=g.value;s.add(p)}}catch(v){d.e(v)}finally{d.f()}return s.size+OF(u).length===0?null:new n(e,s,u)}}]),n}(nz),dW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r,i,a){var o;Object(_.a)(this,n),(o=t.call(this,e)).model=r,o.name=i,o.data=a;var s,u=Object(D.a)(rL);try{for(u.s();!(s=u.n()).done;){var A=s.value,c=r.facet[A];if(c){var l=c.bin,f=c.sort;o[A]=Object.assign({name:r.getName("".concat(A,"_domain")),fields:[Oq(c)].concat(Object(im.a)(RL(l)?[Oq(c,{binSuffix:"end"})]:[]))},oq(f)?{sortField:f}:Object(R.A)(f)?{sortIndexField:sK(c,A)}:{})}}}catch(h){u.e(h)}finally{u.f()}return o.childModel=r.child,o}return Object(x.a)(n,[{key:"hash",value:function(){var e,t="Facet",n=Object(D.a)(rL);try{for(n.s();!(e=n.n()).done;){var r=e.value;this[r]&&(t+=" ".concat(r.charAt(0),":").concat(IF(this[r])))}}catch(i){n.e(i)}finally{n.f()}return t}},{key:"dependentFields",value:function(){var e,t=new Set(this.fields),n=Object(D.a)(rL);try{for(n.s();!(e=n.n()).done;){var r=e.value;this[r]&&(this[r].sortField&&t.add(this[r].sortField.field),this[r].sortIndexField&&t.add(this[r].sortIndexField))}}catch(i){n.e(i)}finally{n.f()}return t}},{key:"producedFields",value:function(){return new Set}},{key:"getSource",value:function(){return this.name}},{key:"getChildIndependentFieldsWithStep",value:function(){var e,t={},n=Object(D.a)(yL);try{for(n.s();!(e=n.n()).done;){var r=e.value,i=this.childModel.component.scales[r];if(i&&!i.merged){var a=i.get("type"),o=i.get("range");if(wG(a)&&xU(o)){var s=ZW($W(this.childModel,r));s?t[r]=s:uU("Unknown field for ".concat(r,". Cannot calculate view size."))}}}}catch(u){n.e(u)}finally{n.f()}return t}},{key:"assembleRowColumnHeaderData",value:function(e,t,n){var r={row:"y",column:"x"}[e],i=[],a=[],o=[];n&&n[r]&&(t?(i.push("distinct_".concat(n[r])),a.push("max")):(i.push(n[r]),a.push("distinct")),o.push("distinct_".concat(n[r])));var s=this[e],u=s.sortField,A=s.sortIndexField;if(u){var c=u.op,l=void 0===c?"min":c,f=u.field;i.push(f),a.push(l),o.push(Oq(u,{forAs:!0}))}else A&&(i.push(A),a.push("max"),o.push(A));return{name:this[e].name,source:null!==t&&void 0!==t?t:this.data,transform:[Object.assign({type:"aggregate",groupby:this[e].fields},i.length?{fields:i,ops:a,as:o}:{})]}}},{key:"assembleFacetHeaderData",value:function(e){var t,n,r,i=this.model.layout.columns,a=this.model.component.layoutHeaders,o=[],s={},u=Object(D.a)(lK);try{for(u.s();!(r=u.n()).done;){var A,c=r.value,l=Object(D.a)(fK);try{for(l.s();!(A=l.n()).done;){var f,h=A.value,g=null!==(t=a[c]&&a[c][h])&&void 0!==t?t:[],d=Object(D.a)(g);try{for(d.s();!(f=d.n()).done;){if((null===(n=f.value.axes)||void 0===n?void 0:n.length)>0){s[c]=!0;break}}}catch(I){d.e(I)}finally{d.f()}}}catch(I){l.e(I)}finally{l.f()}if(s[c]){var p='length(data("'.concat(this.facet.name,'"))'),v="row"===c?i?{signal:"ceil(".concat(p," / ").concat(i,")")}:1:i?{signal:"min(".concat(p,", ").concat(i,")")}:{signal:p};o.push({name:"".concat(this.facet.name,"_").concat(c),transform:[{type:"sequence",start:0,stop:v}]})}}}catch(I){u.e(I)}finally{u.f()}var y=s.row,m=s.column;return(y||m)&&o.unshift(this.assembleRowColumnHeaderData("facet",null,e)),o}},{key:"assemble",value:function(){var e,t,n=[],r=null,i=this.getChildIndependentFieldsWithStep(),a=this.column,o=this.row,s=this.facet;if(a&&o&&(i.x||i.y)){r="cross_".concat(this.column.name,"_").concat(this.row.name);var u=[].concat(null!==(e=i.x)&&void 0!==e?e:[],null!==(t=i.y)&&void 0!==t?t:[]),A=u.map((function(){return"distinct"}));n.push({name:r,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:u,ops:A}]})}for(var c=0,l=[UT,PT];c<l.length;c++){var f=l[c];this[f]&&n.push(this.assembleRowColumnHeaderData(f,r,i))}if(s){var h=this.assembleFacetHeaderData(i);h&&n.push.apply(n,Object(im.a)(h))}return n}},{key:"fields",get:function(){var e,t,n=[],r=Object(D.a)(rL);try{for(r.s();!(t=r.n()).done;){var i=t.value;(null===(e=this[i])||void 0===e?void 0:e.fields)&&n.push.apply(n,Object(im.a)(this[i].fields))}}catch(a){r.e(a)}finally{r.f()}return n}}]),n}(nz);function pW(e){return"'"===e[0]&&"'"===e[e.length-1]||'"'===e[0]&&'"'===e[e.length-1]?e.slice(1,-1):e}function vW(e,t){var n=LF(e);if("number"===t)return"toNumber(".concat(n,")");if("boolean"===t)return"toBoolean(".concat(n,")");if("string"===t)return"toString(".concat(n,")");if("date"===t)return"toDate(".concat(n,")");if("flatten"===t)return n;if(0===t.indexOf("date:")){var r=pW(t.slice(5,t.length));return"timeParse(".concat(n,",'").concat(r,"')")}if(0===t.indexOf("utc:")){var i=pW(t.slice(4,t.length));return"utcParse(".concat(n,",'").concat(i,"')")}return uU(v.unrecognizedParse(t)),null}function yW(e){var t={};return function e(t,n){if(hF(t))e(t.not,n);else if(fF(t)){var r,i=Object(D.a)(t.and);try{for(i.s();!(r=i.n()).done;){e(r.value,n)}}catch(s){i.e(s)}finally{i.f()}}else if(lF(t)){var a,o=Object(D.a)(t.or);try{for(o.s();!(a=o.n()).done;){e(a.value,n)}}catch(s){o.e(s)}finally{o.f()}}else n(t)}(e.filter,(function(e){var n;if(GU(e)){var r=null;jU(e)?r=e.equal:LU(e)?r=e.range[0]:PU(e)&&(r=(null!==(n=e.oneOf)&&void 0!==n?n:e.in)[0]),r&&(AU(r)?t[e.field]="date":Object(R.E)(r)?t[e.field]="number":Object(R.H)(r)&&(t[e.field]="string")),e.timeUnit&&(t[e.field]="date")}})),t}function mW(e){var t={};function n(e){var n;Vq(e)?t[e.field]="date":"quantitative"===e.type&&(n=e.aggregate,Object(R.H)(n)&&EF(["min","max"],n))?t[e.field]="number":YF(e.field)>1?e.field in t||(t[e.field]="flatten"):Qq(e)&&oq(e.sort)&&YF(e.sort.field)>1&&(e.sort.field in t||(t[e.sort.field]="flatten"))}if((vV(e)||yV(e))&&e.forEachFieldDef((function(t,r){if(Bq(t))n(t);else{var i=lL(r),a=e.fieldDef(i);n(Object.assign(Object.assign({},t),{type:a.type}))}})),vV(e)){var r=e.mark,i=e.markDef,a=e.encoding;if(IT(r)&&!e.encoding.order){var o=a["horizontal"===i.orient?"y":"x"];yq(o)&&"quantitative"===o.type&&!(o.field in t)&&(t[o.field]="number")}}return t}var IW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(_.a)(this,n),(i=t.call(this,e))._parse=r,i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,pF(this._parse))}},{key:"hash",value:function(){return"Parse ".concat(IF(this._parse))}},{key:"merge",value:function(e){this._parse=Object.assign(Object.assign({},this._parse),e.parse),e.remove()}},{key:"assembleFormatParse",value:function(){var e,t={},n=Object(D.a)(OF(this._parse));try{for(n.s();!(e=n.n()).done;){var r=e.value,i=this._parse[r];1===YF(r)&&(t[r]=i)}}catch(a){n.e(a)}finally{n.f()}return t}},{key:"producedFields",value:function(){return new Set(OF(this._parse))}},{key:"dependentFields",value:function(){return new Set(OF(this._parse))}},{key:"assembleTransforms",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return OF(this._parse).filter((function(e){return!t||YF(e)>1})).map((function(t){var n=vW(t,e._parse[t]);return n?{type:"formula",expr:n,as:HF(t)}:null})).filter((function(e){return null!==e}))}},{key:"parse",get:function(){return this._parse}}],[{key:"makeExplicit",value:function(e,t,n){var r={},i=t.data;return!oJ(i)&&i&&i.format&&i.format.parse&&(r=i.format.parse),this.makeWithAncestors(e,r,{},n)}},{key:"makeWithAncestors",value:function(e,t,r,i){var a,o=Object(D.a)(OF(r));try{for(o.s();!(a=o.n()).done;){var s=a.value,u=i.getWithExplicit(s);void 0!==u.value&&(u.explicit||u.value===r[s]||"derived"===u.value||"flatten"===r[s]?delete r[s]:uU(v.differentParse(s,r[s],u.value)))}}catch(I){o.e(I)}finally{o.f()}var A,c=Object(D.a)(OF(t));try{for(c.s();!(A=c.n()).done;){var l=A.value,f=i.get(l);void 0!==f&&(f===t[l]?delete t[l]:uU(v.differentParse(l,t[l],f)))}}catch(I){c.e(I)}finally{c.f()}var h=new VY(t,r);i.copyAll(h);var g,d={},p=Object(D.a)(OF(h.combine()));try{for(p.s();!(g=p.n()).done;){var y=g.value,m=h.get(y);null!==m&&(d[y]=m)}}catch(I){p.e(I)}finally{p.f()}return 0===OF(d).length||i.parseNothing?null:new n(e,d)}}]),n}(nz),bW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e){return Object(_.a)(this,n),t.call(this,e)}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null)}}]),Object(x.a)(n,[{key:"dependentFields",value:function(){return new Set}},{key:"producedFields",value:function(){return new Set(["_vgsid_"])}},{key:"hash",value:function(){return"Identifier"}},{key:"assemble",value:function(){return{type:"identifier",as:"_vgsid_"}}}]),n}(nz),EW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(_.a)(this,n),(i=t.call(this,e)).transform=r,i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,pF(this.transform))}},{key:"addDimensions",value:function(e){this.transform.groupby=QF(this.transform.groupby.concat(e),(function(e){return e}))}},{key:"dependentFields",value:function(){var e=new Set;return this.transform.groupby&&this.transform.groupby.forEach(e.add,e),this.transform.joinaggregate.map((function(e){return e.field})).filter((function(e){return void 0!==e})).forEach(e.add,e),e}},{key:"producedFields",value:function(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}},{key:"getDefaultName",value:function(e){var t;return null!==(t=e.as)&&void 0!==t?t:Oq(e)}},{key:"hash",value:function(){return"JoinAggregateTransform ".concat(IF(this.transform))}},{key:"assemble",value:function(){var e,t=[],n=[],r=[],i=Object(D.a)(this.transform.joinaggregate);try{for(i.s();!(e=i.n()).done;){var a=e.value;n.push(a.op),r.push(this.getDefaultName(a)),t.push(void 0===a.field?null:a.field)}}catch(s){i.e(s)}finally{i.f()}var o=this.transform.groupby;return Object.assign({type:"joinaggregate",as:r,ops:n,fields:t},void 0!==o?{groupby:o}:{})}}]),n}(nz);var CW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(_.a)(this,n),(i=t.call(this,e))._stack=r,i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,pF(this._stack))}},{key:"addDimensions",value:function(e){var t;(t=this._stack.facetby).push.apply(t,Object(im.a)(e))}},{key:"dependentFields",value:function(){var e=new Set;return e.add(this._stack.stackField),this.getGroupbyFields().forEach(e.add,e),this._stack.facetby.forEach(e.add,e),this._stack.sort.field.forEach(e.add,e),e}},{key:"producedFields",value:function(){return new Set(this._stack.as)}},{key:"hash",value:function(){return"Stack ".concat(IF(this._stack))}},{key:"getGroupbyFields",value:function(){var e=this._stack,t=e.dimensionFieldDef,n=e.impute,r=e.groupby;return t?t.bin?n?[Oq(t,{binSuffix:"mid"})]:[Oq(t,{}),Oq(t,{binSuffix:"end"})]:[Oq(t)]:null!==r&&void 0!==r?r:[]}},{key:"assemble",value:function(){var e=[],t=this._stack,n=t.facetby,r=t.dimensionFieldDef,i=t.stackField,a=t.stackby,o=t.sort,s=t.offset,u=t.impute,A=t.as;if(u&&r){var c=r.band,l=void 0===c?.5:c;r.bin&&e.push({type:"formula",expr:"".concat(l,"*")+Oq(r,{expr:"datum"})+"+".concat(1-l,"*")+Oq(r,{expr:"datum",binSuffix:"end"}),as:Oq(r,{binSuffix:"mid",forAs:!0})}),e.push({type:"impute",field:i,groupby:[].concat(Object(im.a)(a),Object(im.a)(n)),key:Oq(r,{binSuffix:"mid"}),method:"value",value:0})}return e.push({type:"stack",groupby:[].concat(Object(im.a)(this.getGroupbyFields()),Object(im.a)(n)),field:i,sort:o,as:A,offset:s}),e}},{key:"stack",get:function(){return this._stack}}],[{key:"makeFromTransform",value:function(e,t){var r=t.stack,i=t.groupby,a=t.as,o=t.offset,s=void 0===o?"zero":o,u=[],A=[];if(void 0!==t.sort){var c,l=Object(D.a)(t.sort);try{for(l.s();!(c=l.n()).done;){var f=c.value;u.push(f.field),A.push(JF(f.order,"ascending"))}}catch(h){l.e(h)}finally{l.f()}}return new n(e,{stackField:r,groupby:i,offset:s,sort:{field:u,order:A},facetby:[],as:function(e){return Object(R.A)(e)&&e.every((function(e){return Object(R.H)(e)}))&&e.length>1}(a)?a:Object(R.H)(a)?[a,a+"_end"]:[t.stack+"_start",t.stack+"_end"]})}},{key:"makeFromEncoding",value:function(e,t){var r=t.stack,i=t.encoding;if(!r)return null;var a,o=r.groupbyChannel,s=r.fieldChannel,u=r.offset,A=r.impute;o&&(a=qq(i[o]));var c,l=function(e){return e.stack.stackBy.reduce((function(e,t){var n=Oq(t.fieldDef);return n&&e.push(n),e}),[])}(t),f=t.encoding.order;return c=Object(R.A)(f)||yq(f)?cH(f):l.reduce((function(e,t){return e.field.push(t),e.order.push("y"===s?"descending":"ascending"),e}),{field:[],order:[]}),new n(e,{dimensionFieldDef:a,stackField:t.vgField(s),facetby:[],stackby:l,sort:c,offset:u,impute:A,as:[t.vgField(s,{suffix:"start",forAs:!0}),t.vgField(s,{suffix:"end",forAs:!0})]})}}]),n}(nz),BW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(_.a)(this,n),(i=t.call(this,e)).transform=r,i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,pF(this.transform))}},{key:"addDimensions",value:function(e){this.transform.groupby=QF(this.transform.groupby.concat(e),(function(e){return e}))}},{key:"dependentFields",value:function(){var e,t,n=new Set;return(null!==(e=this.transform.groupby)&&void 0!==e?e:[]).forEach(n.add,n),(null!==(t=this.transform.sort)&&void 0!==t?t:[]).forEach((function(e){return n.add(e.field)})),this.transform.window.map((function(e){return e.field})).filter((function(e){return void 0!==e})).forEach(n.add,n),n}},{key:"producedFields",value:function(){return new Set(this.transform.window.map(this.getDefaultName))}},{key:"getDefaultName",value:function(e){var t;return null!==(t=e.as)&&void 0!==t?t:Oq(e)}},{key:"hash",value:function(){return"WindowTransform ".concat(IF(this.transform))}},{key:"assemble",value:function(){var e,t,n=[],r=[],i=[],a=[],o=Object(D.a)(this.transform.window);try{for(o.s();!(t=o.n()).done;){var s=t.value;r.push(s.op),i.push(this.getDefaultName(s)),a.push(void 0===s.param?null:s.param),n.push(void 0===s.field?null:s.field)}}catch(v){o.e(v)}finally{o.f()}var u=this.transform.frame,A=this.transform.groupby;if(u&&null===u[0]&&null===u[1]&&r.every((function(e){return MT(e)})))return Object.assign({type:"joinaggregate",as:i,ops:r,fields:n},void 0!==A?{groupby:A}:{});var c=[],l=[];if(void 0!==this.transform.sort){var f,h=Object(D.a)(this.transform.sort);try{for(h.s();!(f=h.n()).done;){var g=f.value;c.push(g.field),l.push(null!==(e=g.order)&&void 0!==e?e:"ascending")}}catch(v){h.e(v)}finally{h.f()}}var d={field:c,order:l},p=this.transform.ignorePeers;return Object.assign(Object.assign(Object.assign({type:"window",params:a,as:i,ops:r,fields:n,sort:d},void 0!==p?{ignorePeers:p}:{}),void 0!==A?{groupby:A}:{}),void 0!==u?{frame:u}:{})}}]),n}(nz),wW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return Object(x.a)(n,[{key:"run",value:function(e){var t=e.parent;if(e instanceof IW){if(AW(t))return this.flags;if(t.numChildren()>1)return this.setContinue(),this.flags;if(t instanceof IW)this.setMutated(),t.merge(e);else{if(xF(t.producedFields(),e.dependentFields()))return this.setContinue(),this.flags;this.setMutated(),e.swapWithParent()}}return this.setContinue(),this.flags}}]),n}(lW),QW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return Object(x.a)(n,[{key:"mergeNodes",value:function(e,t){var n,r=t.shift(),i=Object(D.a)(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;e.removeChild(a),a.parent=r,a.remove()}}catch(o){i.e(o)}finally{i.f()}}},{key:"run",value:function(e){for(var t=e.children.map((function(e){return e.hash()})),n={},r=0;r<t.length;r++)void 0===n[t[r]]?n[t[r]]=[e.children[r]]:n[t[r]].push(e.children[r]);var i,a=Object(D.a)(OF(n));try{for(a.s();!(i=a.n()).done;){var o=i.value;n[o].length>1&&(this.setMutated(),this.mergeNodes(e,n[o]))}}catch(c){a.e(c)}finally{a.f()}var s,u=Object(D.a)(e.children);try{for(u.s();!(s=u.n()).done;){var A=s.value;this.run(A)}}catch(c){u.e(c)}finally{u.f()}return this.mutatedFlag}}]),n}(fW),kW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return Object(x.a)(n,[{key:"run",value:function(e){return e instanceof rz||e.numChildren()>0||e instanceof dW||(this.setMutated(),e.remove()),this.flags}}]),n}(lW),_W=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),(e=t.apply(this,arguments)).fields=new Set,e.prev=null,e}return Object(x.a)(n,[{key:"run",value:function(e){if(this.setContinue(),e instanceof iz){var t=e.producedFields();kF(t,this.fields)?(this.setMutated(),this.prev.remove()):this.fields=new Set([].concat(Object(im.a)(this.fields),Object(im.a)(t))),this.prev=e}return this.flags}},{key:"reset",value:function(){this.fields.clear()}}]),n}(lW),xW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return Object(x.a)(n,[{key:"run",value:function(e){this.setContinue();var t,n=e.parent.children.filter((function(e){return e instanceof iz})),r=n.pop(),i=Object(D.a)(n);try{for(i.s();!(t=i.n()).done;){var a=t.value;this.setMutated(),r.merge(a)}}catch(o){i.e(o)}finally{i.f()}return this.flags}}]),n}(lW);function SW(e){if(e instanceof dW)if(1!==e.numChildren()||e.children[0]instanceof rz){var t=e.model.component.data.main;!function e(t){if(t instanceof rz&&t.type===cJ&&1===t.numChildren()){var n=t.children[0];n instanceof dW||(n.swapWithParent(),e(t))}}(t);var n,r=(s=e,function e(t){if(!(t instanceof dW)){var n=t.clone();if(n instanceof rz){var r=FW+n.getSource();n.setSource(r),s.model.component.data.outputNodes[r]=n}else(n instanceof gW||n instanceof CW||n instanceof BW||n instanceof EW)&&n.addDimensions(s.fields);var i,a=Object(D.a)(t.children.flatMap(e));try{for(a.s();!(i=a.n()).done;)i.value.parent=n}catch(o){a.e(o)}finally{a.f()}return[n]}return t.children.flatMap(e)}),i=e.children.map(r).flat(),a=Object(D.a)(i);try{for(a.s();!(n=a.n()).done;){n.value.parent=t}}catch(u){a.e(u)}finally{a.f()}}else{var o=e.children[0];(o instanceof gW||o instanceof CW||o instanceof BW||o instanceof EW)&&o.addDimensions(e.fields),o.swapWithParent(),SW(e)}else e.children.map(SW);var s}var OW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){return Object(_.a)(this,n),t.call(this)}return Object(x.a)(n,[{key:"run",value:function(e){e instanceof rz&&!e.isRequired()&&(this.setMutated(),e.remove());var t,n=Object(D.a)(e.children);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.run(r)}}catch(i){n.e(i)}finally{n.f()}return this.mutatedFlag}}]),n}(fW),DW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(_.a)(this,n),(r=t.call(this)).requiresSelectionId=e&&Fz(e),r}return Object(x.a)(n,[{key:"run",value:function(e){e instanceof bW&&(this.requiresSelectionId&&(AW(e.parent)||e.parent instanceof gW||e.parent instanceof IW)||(this.setMutated(),e.remove()));var t,n=Object(D.a)(e.children);try{for(n.s();!(t=n.n()).done;){var r=t.value;this.run(r)}}catch(i){n.e(i)}finally{n.f()}return this.mutatedFlag}}]),n}(fW),RW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return Object(x.a)(n,[{key:"run",value:function(e){var t=e.parent,n=Object(im.a)(t.children),r=t.children.filter((function(e){return e instanceof IW}));if(t.numChildren()>1&&r.length>=1){var i,a={},o=new Set,s=Object(D.a)(r);try{for(s.s();!(i=s.n()).done;){var u,A=i.value.parse,c=Object(D.a)(OF(A));try{for(c.s();!(u=c.n()).done;){var l=u.value;l in a?a[l]!==A[l]&&o.add(l):a[l]=A[l]}}catch(b){c.e(b)}finally{c.f()}}}catch(b){s.e(b)}finally{s.f()}var f,h=Object(D.a)(o);try{for(h.s();!(f=h.n()).done;){delete a[f.value]}}catch(b){h.e(b)}finally{h.f()}if(!SF(a)){this.setMutated();var g,d=new IW(t,a),p=Object(D.a)(n);try{for(p.s();!(g=p.n()).done;){var v=g.value;if(v instanceof IW){var y,m=Object(D.a)(OF(a));try{for(m.s();!(y=m.n()).done;){var I=y.value;delete v.parse[I]}}catch(b){m.e(b)}finally{m.f()}}t.removeChild(v),v.parent=d,v instanceof IW&&0===OF(v.parse).length&&v.remove()}}catch(b){p.e(b)}finally{p.f()}}}return this.setContinue(),this.flags}}]),n}(lW),jW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return Object(x.a)(n,[{key:"run",value:function(e){var t,n=e.parent,r=n.children.filter((function(e){return e instanceof gW})),i={},a=Object(D.a)(r);try{for(a.s();!(t=a.n()).done;){var o=t.value,s=IF(o.groupBy);s in i||(i[s]=[]),i[s].push(o)}}catch(d){a.e(d)}finally{a.f()}var u,A=Object(D.a)(OF(i));try{for(A.s();!(u=A.n()).done;){var c=i[u.value];if(c.length>1){var l,f=c.pop(),h=Object(D.a)(c);try{for(h.s();!(l=h.n()).done;){var g=l.value;f.merge(g)&&(n.removeChild(g),g.parent=f,g.remove(),this.setMutated())}}catch(d){h.e(d)}finally{h.f()}}}}catch(d){A.e(d)}finally{A.f()}return this.setContinue(),this.flags}}]),n}(lW),MW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e){var r;return Object(_.a)(this,n),(r=t.call(this)).model=e,r}return Object(x.a)(n,[{key:"run",value:function(e){var t,n=e.parent,r=!(AW(n)||n instanceof Lz||n instanceof IW||n instanceof bW),i=[],a=[],o=Object(D.a)(n.children);try{for(o.s();!(t=o.n()).done;){var s=t.value;s instanceof iW&&(r&&!xF(n.producedFields(),s.dependentFields())?i.push(s):a.push(s))}}catch(p){o.e(p)}finally{o.f()}if(i.length>0){var u,A=i.pop(),c=Object(D.a)(i);try{for(c.s();!(u=c.n()).done;){var l=u.value;A.merge(l,this.model.renameSignal.bind(this.model))}}catch(p){c.e(p)}finally{c.f()}this.setMutated(),n instanceof iW?n.merge(A,this.model.renameSignal.bind(this.model)):A.swapWithParent()}if(a.length>1){var f,h=a.pop(),g=Object(D.a)(a);try{for(g.s();!(f=g.n()).done;){var d=f.value;h.merge(d,this.model.renameSignal.bind(this.model))}}catch(p){g.e(p)}finally{g.f()}this.setMutated()}return this.setContinue(),this.flags}}]),n}(lW),NW=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return Object(x.a)(n,[{key:"run",value:function(e){var t=e.parent,n=Object(im.a)(t.children);if(!CF(n,(function(e){return e instanceof rz}))||t.numChildren()<=1)return this.setContinue(),this.flags;var r,i,a=[],o=Object(D.a)(n);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s instanceof rz){for(var u=s;1===u.numChildren();){var A=u.children[0];if(!(A instanceof rz))break;u=A}a.push.apply(a,Object(im.a)(u.children)),r?(t.removeChild(s),s.parent=r.parent,r.parent.removeChild(r),r.parent=u,this.setMutated()):r=u}else a.push(s)}}catch(h){o.e(h)}finally{o.f()}if(a.length){this.setMutated();var c,l=Object(D.a)(a);try{for(l.s();!(c=l.n()).done;){var f=c.value;f.parent.removeChild(f),f.parent=r}}catch(h){l.e(h)}finally{l.f()}}return this.setContinue(),this.flags}}]),n}(lW),FW="scale_";function TW(e){var t=[];function n(e){if(0===e.numChildren())t.push(e);else{var r,i=Object(D.a)(e.children);try{for(i.s();!(r=i.n()).done;){n(r.value)}}catch(a){i.e(a)}finally{i.f()}}}var r,i=Object(D.a)(e);try{for(i.s();!(r=i.n()).done;){n(r.value)}}catch(a){i.e(a)}finally{i.f()}return t}function LW(e){return e}function PW(e,t){return t.map((function(t){if(e instanceof lW){var n=e.optimizeNextFromLeaves(t);return e.reset(),n}return e.run(t)})).some(LW)}function UW(e,t){var n=e.sources,r=new Set;return r.add(PW(new OW,n)),r.add(PW(new DW(t),n)),n=n.filter((function(e){return e.numChildren()>0})),r.add(PW(new kW,TW(n))),n=n.filter((function(e){return e.numChildren()>0})),r.add(PW(new wW,TW(n))),r.add(PW(new MW(t),TW(n))),r.add(PW(new _W,TW(n))),r.add(PW(new RW,TW(n))),r.add(PW(new jW,TW(n))),r.add(PW(new xW,TW(n))),r.add(PW(new QW,n)),r.add(PW(new NW,TW(n))),e.sources=n,r.has(!0)}function GW(e,t){oW(e.sources);for(var n=0,r=0,i=0;i<5&&UW(e,t);i++)n++;e.sources.map(SW);for(var a=0;a<5&&UW(e,t);a++)r++;oW(e.sources),5===Math.max(n,r)&&uU("Maximum optimization runs(".concat(5,") reached."))}var qW=function(){function e(t){Object(_.a)(this,e),Object.defineProperty(this,"signal",{enumerable:!0,get:t})}return Object(x.a)(e,null,[{key:"fromName",value:function(t,n){return new e((function(){return t(n)}))}}]),e}();function HW(e){vV(e)?function(e){var t,n=e.component.scales,r=Object(D.a)(OF(n));try{for(r.s();!(t=r.n()).done;){var i=t.value,a=YW(e,i);if(n[i].setWithExplicit("domains",a),WW(e,i),e.component.data.isFaceted){for(var o=e;!yV(o)&&o.parent;)o=o.parent;if("shared"===o.component.resolve.scale[i]){var s,u=Object(D.a)(a.value);try{for(u.s();!(s=u.n()).done;){var A=s.value;SU(A)&&(A.data=FW+A.data.replace(FW,""))}}catch(c){u.e(c)}finally{u.f()}}}}}catch(c){r.e(c)}finally{r.f()}}(e):function(e){var t,n=Object(D.a)(e.children);try{for(n.s();!(t=n.n()).done;){HW(t.value)}}catch(h){n.e(h)}finally{n.f()}var r,i=e.component.scales,a=Object(D.a)(OF(i));try{for(a.s();!(r=a.n()).done;){var o,s=r.value,u=void 0,A=null,c=Object(D.a)(e.children);try{for(c.s();!(o=c.n()).done;){var l=o.value.component.scales[s];if(l){u=void 0===u?l.getWithExplicit("domains"):tJ(u,l.getWithExplicit("domains"),"domains","scale",XW);var f=l.get("selectionExtent");A&&f&&A.selection!==f.selection&&uU("The same selection must be used to override scale domains in a layered view."),A=f}}}catch(h){c.e(h)}finally{c.f()}i[s].setWithExplicit("domains",u),A&&i[s].set("selectionExtent",A,!0)}}catch(h){a.e(h)}finally{a.f()}}(e)}function YW(e,t){var n=e.getScaleComponent(t).get("type"),r=e.encoding,i=function(e,t,n,r){if("unaggregated"===e){var i=VW(t,n),a=i.valid,o=i.reason;if(!a)return void uU(o)}else if(void 0===e&&r.useUnaggregatedDomain){if(VW(t,n).valid)return"unaggregated"}return e}(e.scaleDomain(t),e.typedFieldDef(t),n,e.config.scale);return i!==e.scaleDomain(t)&&(e.specifiedScales[t]=Object.assign(Object.assign({},e.specifiedScales[t]),{domain:i})),"x"===t&&Hq(r.x2)?Hq(r.x)?tJ(zW(n,i,e,"x"),zW(n,i,e,"x2"),"domain","scale",XW):zW(n,i,e,"x2"):"y"===t&&Hq(r.y2)?Hq(r.y)?tJ(zW(n,i,e,"y"),zW(n,i,e,"y2"),"domain","scale",XW):zW(n,i,e,"y2"):zW(n,i,e,t)}function JW(e,t,n){var r,i=null===(r=QU(n))||void 0===r?void 0:r.unit;return"temporal"===t||i?function(e,t,n){return e.map((function(e){var r=Xq(e,{timeUnit:n,type:t});return{signal:"{data: ".concat(r,"}")}}))}(e,t,i):[e]}function zW(e,t,n,r){var i=Hq(n.encoding[r]),a=i.type,o=i.timeUnit;if(function(e){return e&&e.unionWith}(t)){var s=zW(e,void 0,n,r),u=JW(t.unionWith,a,o);return XY([].concat(Object(im.a)(s.value),Object(im.a)(u)))}if(_U(t))return XY([t]);if(t&&"unaggregated"!==t&&!xG(t))return XY(JW(t,a,o));var A=n.stack;if(A&&r===A.fieldChannel){if("normalize"===A.offset)return ZY([[0,1]]);var c=n.requestDataName(cJ);return ZY([{data:c,field:n.vgField(r,{suffix:"start"})},{data:c,field:n.vgField(r,{suffix:"end"})}])}var l=kL(r)&&yq(i)?function(e,t,n){if(!wG(n))return;var r=e.fieldDef(t),i=r.sort;if(sq(i))return{op:"min",field:sK(r,t),order:"ascending"};var a=e.stack,o=a?[].concat(Object(im.a)(a.groupbyField?[a.groupbyField]:[]),Object(im.a)(a.stackBy.map((function(e){return e.fieldDef.field})))):void 0;if(oq(i)){var s=a&&!EF(o,i.field);return KW(i,s)}if(aq(i)){var u=i.encoding,A=i.order,c=e.fieldDef(u),l=c.aggregate,f=c.field,h=a&&!EF(o,f);if(RT(l)||jT(l))return KW({field:Oq(c),order:A},h);if(MT(l)||!l)return KW({op:l,field:f,order:A},h)}else{if("descending"===i)return{op:"min",field:e.vgField(t),order:"descending"};if(EF(["ascending",void 0],i))return!0}return}(n,r,e):void 0;if(Iq(i))return ZY(JW([i.datum],a,o));var f=i;if("unaggregated"===t){var h=n.requestDataName(cJ),g=i.field;return ZY([{data:h,field:Oq({field:g,aggregate:"min"})},{data:h,field:Oq({field:g,aggregate:"max"})}])}if(RL(f.bin)){if(wG(e))return ZY("bin-ordinal"===e?[]:[{data:jF(l)?n.requestDataName(cJ):n.requestDataName("raw"),field:n.vgField(r,$q(f,r)?{binSuffix:"range"}:{}),sort:!0!==l&&Object(R.F)(l)?l:{field:n.vgField(r,{}),op:"min"}}]);var d=f.bin;if(RL(d)){var p=nW(n,f.field,d);return ZY([new qW((function(){var e=n.getSignalName(p);return"[".concat(e,".start, ").concat(e,".stop]")}))])}return ZY([{data:n.requestDataName(cJ),field:n.vgField(r,{})}])}if(f.timeUnit&&EF(["time","utc"],e)&&gq(r,f,vV(n)?n.encoding[hL(r)]:void 0,n.stack,n.markDef,n.config)){var v=n.requestDataName(cJ);return ZY([{data:v,field:n.vgField(r)},{data:v,field:n.vgField(r,{suffix:"end"})}])}return ZY(l?[{data:jF(l)?n.requestDataName(cJ):n.requestDataName("raw"),field:n.vgField(r),sort:l}]:[{data:n.requestDataName(cJ),field:n.vgField(r)}])}function KW(e,t){var n=e.op,r=e.field,i=e.order;return Object.assign(Object.assign({op:null!==n&&void 0!==n?n:t?"sum":"min"},r?{field:GF(r)}:{}),i?{order:i}:{})}function WW(e,t){var n,r=e.component.scales[t],i=e.specifiedScales[t].domain,a=null===(n=e.fieldDef(t))||void 0===n?void 0:n.bin,o=xG(i)&&i,s=ML(a)&&NL(a.extent)&&a.extent;(o||s)&&r.set("selectionExtent",null!==o&&void 0!==o?o:s,!0)}function VW(e,t){var n=e.aggregate,r=e.type;return n?Object(R.H)(n)&&!LT[n]?{valid:!1,reason:v.unaggregateDomainWithNonSharedDomainOp(n)}:"quantitative"===r&&"log"===t?{valid:!1,reason:v.unaggregatedDomainWithLogScale(e)}:{valid:!0}:{valid:!1,reason:v.unaggregateDomainHasNoEffectForRawField(e)}}function XW(e,t,n,r){return e.explicit&&t.explicit&&uU(v.mergeConflictingDomainProperty(n,r,e.value,t.value)),{explicit:e.explicit,value:[].concat(Object(im.a)(e.value),Object(im.a)(t.value))}}function ZW(e){if(SU(e)&&Object(R.H)(e.field))return e.field;if(function(e){return!Object(R.A)(e)&&("fields"in e&&!("data"in e))}(e)){var t,n,r=Object(D.a)(e.fields);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(SU(i)&&Object(R.H)(i.field))if(t){if(t!==i.field)return uU(v.FACETED_INDEPENDENT_DIFFERENT_SOURCES),t}else t=i.field}}catch(o){r.e(o)}finally{r.f()}return uU(v.FACETED_INDEPENDENT_SAME_FIELDS_DIFFERENT_SOURCES),t}if(function(e){return!Object(R.A)(e)&&("fields"in e&&"data"in e)}(e)){uU(v.FACETED_INDEPENDENT_SAME_SOURCE);var a=e.fields[0];return Object(R.H)(a)?a:void 0}}function $W(e,t){return function(e){var t=QF(e.map((function(e){if(SU(e)){e.sort;return iF(e,["sort"])}return e})),IF),n=QF(e.map((function(e){if(SU(e)){var t=e.sort;return void 0===t||jF(t)||("op"in t&&"count"===t.op&&delete t.field,"ascending"===t.order&&delete t.order),t}})).filter((function(e){return void 0!==e})),IF);if(0!==t.length){if(1===t.length){var r=e[0];if(SU(r)&&n.length>0){var i=n[0];if(n.length>1)uU(v.MORE_THAN_ONE_SORT),i=!0;else if(Object(R.F)(i)&&"field"in i){var a=i.field;r.field===a&&(i=!i.order||{order:i.order})}return Object.assign(Object.assign({},r),{sort:i})}return r}var o,s=QF(n.map((function(e){return jF(e)||!("op"in e)||e.op in DT?e:(uU(v.domainSortDropped(e)),!0)})),IF);1===s.length?o=s[0]:s.length>1&&(uU(v.MORE_THAN_ONE_SORT),o=!0);var u=QF(e.map((function(e){return SU(e)?e.data:null})),(function(e){return e}));return 1===u.length&&null!==u[0]?Object.assign({data:u[0],fields:t.map((function(e){return e.field}))},o?{sort:o}:{}):Object.assign({fields:t},o?{sort:o}:{})}}(e.component.scales[t].get("domains").map((function(t){return SU(t)&&(t.data=e.lookupDataSource(t.data)),t})))}function eV(e){return IV(e)||mV(e)?e.children.reduce((function(e,t){return e.concat(eV(t))}),tV(e)):tV(e)}function tV(e){return OF(e.component.scales).reduce((function(t,n){var r=e.component.scales[n];if(r.merged)return t;var i,a=r.combine(),o=a.name,s=a.type,u=a.selectionExtent,A=(a.domains,a.range,a.reverse),c=iF(a,["name","type","selectionExtent","domains","range","reverse"]),l=function(e,t,n){if(mL(n)&&xU(e))return{step:{signal:t+"_step"}};return e}(a.range,o,n);u&&(i=function(e,t){var n=t.selection;return{signal:Uz(e.getSelectionComponent(n,MF(n)),t)}}(e,u));var f=$W(e,n);return t.push(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:o,type:s},f?{domain:f}:{}),i?{domainRaw:i}:{}),{range:l}),void 0!==A?{reverse:A}:{}),c)),t}),[])}var nV=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(_.a)(this,n),(i=t.call(this,{},{name:e})).merged=!1,i.setWithExplicit("type",r),i}return Object(x.a)(n,[{key:"domainDefinitelyIncludesZero",value:function(){return!1!==this.get("zero")||CF(this.get("domains"),(function(e){return Object(R.A)(e)&&2===e.length&&e[0]<=0&&e[1]>=0}))}}]),n}(VY),rV=["range","scheme"];function iV(e){return"x"===e?"width":"y"===e?"height":void 0}function aV(e,t){var n=e.fieldDef(t);if(n&&n.bin&&RL(n.bin)){var r=nW(e,n.field,n.bin),i=iV(t),a=e.getName(i);return new qW((function(){var t=e.getSignalName(r),n="(".concat(t,".stop - ").concat(t,".start) / ").concat(t,".step");return"".concat(e.getSignalName(a)," / (").concat(n,")")}))}}function oV(e,t){var n,r=t.specifiedScales[e],i=t.size,a=t.getScaleComponent(e).get("type"),o=Object(D.a)(rV);try{for(o.s();!(n=o.n()).done;){var s=n.value;if(void 0!==r[s]){var u=RG(a,s),A=jG(e,s);if(u)if(A)uU(A);else switch(s){case"range":return Object(R.A)(r.range)&&mL(e)?XY(r.range.map((function(e){if("width"===e||"height"===e){var n=t.getName(e),r=t.getSignalName.bind(t);return qW.fromName(r,n)}return e}))):XY(r.range);case"scheme":return XY(sV(r[s]))}else uU(v.scalePropertyNotWorkWithScaleType(a,s,e))}}}catch(f){o.e(f)}finally{o.f()}if("x"===e||"y"===e){var c="x"===e?"width":"height",l=i[c];if(ZH(l)){if(wG(a))return XY({step:l.step});uU(v.stepDropped(c))}}return ZY(function(e,t){var n=t.size,r=t.config,i=t.mark,a=t.encoding,o=t.getSignalName.bind(t),s=Hq(a[e]).type,u=t.getScaleComponent(e).get("type"),A=t.specifiedScales[e],c=A.domain,l=A.domainMid;switch(e){case"x":case"y":if(EF(["point","band"],u))if("x"!==e||n.width){if("y"===e&&!n.height){var f=rY(r.view,"height");if(ZH(f))return f}}else{var h=rY(r.view,"width");if(ZH(h))return h}var g=iV(e),d=t.getName(g);return"y"===e&&QG(u)?[qW.fromName(o,d),0]:[0,qW.fromName(o,d)];case WT:var p=t.component.scales[e].get("zero"),y=function e(t,n,r){if(n)return _U(n)?{signal:"".concat(n.signal," ? 0 : ").concat(e(t,!1,r))}:0;switch(t){case"bar":case"tick":return r.scale.minBandSize;case"line":case"trail":case"rule":return r.scale.minStrokeWidth;case"text":return r.scale.minFontSize;case"point":case"square":case"circle":return r.scale.minSize}throw new Error(v.incompatibleChannel("size",t))}(i,p,r),m=function(e,t,n,r){var i={x:aV(n,"x"),y:aV(n,"y")};switch(e){case"bar":case"tick":if(void 0!==r.scale.maxBandSize)return r.scale.maxBandSize;var a=uV(t,i,r.view);return Object(R.E)(a)?a-1:new qW((function(){return"".concat(a.signal," - 1")}));case"line":case"trail":case"rule":return r.scale.maxStrokeWidth;case"text":return r.scale.maxFontSize;case"point":case"square":case"circle":if(r.scale.maxSize)return r.scale.maxSize;var o=uV(t,i,r.view);return Object(R.E)(o)?Math.pow(.95*o,2):new qW((function(){return"pow(".concat(.95," * ").concat(o.signal,", 2)")}))}throw new Error(v.incompatibleChannel("size",e))}(i,n,t,r);return _G(u)?function(e,t,n){var r=function(){var r=iH(t),i=iH(e),a="(".concat(r," - ").concat(i,") / (").concat(n," - 1)");return"sequence(".concat(i,", ").concat(r," + ").concat(a,", ").concat(a,")")};return _U(t)?new qW(r):{signal:r()}}(y,m,function(e,t,n,r){switch(e){case"quantile":return t.scale.quantileCount;case"quantize":return t.scale.quantizeCount;case"threshold":return void 0!==n&&Object(R.A)(n)?n.length+1:(uU(v.domainRequiredForThresholdScale(r)),3)}}(u,r,c,e)):[y,m];case qT:return[0,2*Math.PI];case"angle":return[0,360];case GT:return[0,new qW((function(){var e=t.getSignalName("width"),n=t.getSignalName("height");return"min(".concat(e,",").concat(n,")/2")}))];case"strokeWidth":return[r.scale.minStrokeWidth,r.scale.maxStrokeWidth];case"strokeDash":return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case KT:return"symbol";case YT:case JT:case zT:return"ordinal"===u?"nominal"===s?"category":"ordinal":void 0!==l?"diverging":"rect"===i||"geoshape"===i?"heatmap":"ramp";case"opacity":case"fillOpacity":case"strokeOpacity":return[r.scale.minOpacity,r.scale.maxOpacity]}throw new Error("Scale range undefined for channel ".concat(e))}(e,t))}function sV(e){return function(e){return!Object(R.H)(e)&&!!e.name}(e)?Object.assign({scheme:e.name},yF(e,["name"])):{scheme:e}}function uV(e,t,n){var r=ZH(e.width)?e.width.step:nY(n,"width"),i=ZH(e.height)?e.height.step:nY(n,"height");return t.x||t.y?new qW((function(){var e=[t.x?t.x.signal:r,t.y?t.y.signal:i];return"min(".concat(e.join(", "),")")})):Math.min(r,i)}function AV(e,t){vV(e)?function(e,t){var n,r=e.component.scales,i=e.config,a=e.encoding,o=e.markDef,s=e.specifiedScales,u=Object(D.a)(OF(r));try{for(u.s();!(n=u.n()).done;){var A=n.value,c=s[A],l=r[A],f=e.getScaleComponent(A),h=Hq(a[A]),g=c[t],d=f.get("type"),p=f.get("padding"),y=f.get("paddingInner"),m=RG(d,t),I=jG(A,t);if(void 0!==g&&(m?I&&uU(I):uU(v.scalePropertyNotWorkWithScaleType(d,t,A))),m&&void 0===I)if(void 0!==g)l.copyKeyFromObject(t,c);else{var b=t in cV?cV[t]({model:e,channel:A,fieldOrDatumDef:h,scaleType:d,scalePadding:p,scalePaddingInner:y,domain:c.domain,markDef:o,config:i}):i.scale[t];void 0!==b&&l.set(t,b,!1)}}}catch(E){u.e(E)}finally{u.f()}}(e,t):fV(e,t)}var cV={bins:function(e){var t=e.model,n=e.fieldOrDatumDef;return yq(n)?function(e,t){var n=t.bin;if(RL(n)){var r=nW(e,t.field,n);return new qW((function(){return e.getSignalName(r)}))}if(jL(n)&&ML(n)&&void 0!==n.step)return{step:n.step};return}(t,n):void 0},interpolate:function(e){return function(e,t){if(EF([YT,JT,zT],e)&&"nominal"!==t)return"hcl";return}(e.channel,e.fieldOrDatumDef.type)},nice:function(e){return function(e,t,n){var r;if((null===(r=qq(n))||void 0===r?void 0:r.bin)||EF([oG,sG],e))return;return t in vL||void 0}(e.scaleType,e.channel,e.fieldOrDatumDef)},padding:function(e){var t=e.channel,n=e.scaleType,r=e.fieldOrDatumDef,i=e.markDef,a=e.config;return function(e,t,n,r,i,a){if(e in vL){if(kG(t)){if(void 0!==n.continuousPadding)return n.continuousPadding;var o=i.type,s=i.orient;if("bar"===o&&(!yq(r)||!r.bin&&!r.timeUnit)&&("vertical"===s&&"x"===e||"horizontal"===s&&"y"===e))return a.continuousBandSize}if(t===lG)return n.pointPadding}return}(t,n,a.scale,r,i,a.bar)},paddingInner:function(e){var t=e.scalePadding,n=e.channel,r=e.markDef,i=e.config;return function(e,t,n,r){if(void 0!==e)return;if(t in vL){var i=r.bandPaddingInner,a=r.barBandPaddingInner,o=r.rectBandPaddingInner;return JF(i,"bar"===n?a:o)}return}(t,n,r.type,i.scale)},paddingOuter:function(e){var t=e.scalePadding,n=e.channel,r=e.scaleType,i=e.markDef,a=e.scalePaddingInner,o=e.config;return function(e,t,n,r,i,a){if(void 0!==e)return;if(t in vL){if(n===fG)return JF(a.bandPaddingOuter,_U(i)?{signal:"".concat(i.signal,"/2")}:i/2)}return}(t,n,r,i.type,a,o.scale)},reverse:function(e){var t=e.fieldOrDatumDef,n=e.scaleType,r=e.channel,i=e.config;return function(e,t,n,r){if("x"===n&&void 0!==r.xReverse)return QG(e)&&"descending"===t?_U(r.xReverse)?{signal:"!".concat(r.xReverse.signal)}:!r.xReverse:r.xReverse;if(QG(e)&&"descending"===t)return!0;return}(n,yq(t)?t.sort:void 0,r,i.scale)},zero:function(e){return function(e,t,n,r,i){if(n&&"unaggregated"!==n&&QG(i)){if(Object(R.A)(n)){var a=n[0],o=n[n.length-1];if(a<=0&&o>=0)return!0}return!1}if("size"===e&&"quantitative"===t.type&&!_G(i))return!0;if((!yq(t)||!t.bin)&&EF([].concat(Object(im.a)(yL),Object(im.a)(bL)),e)){var s=r.orient;return!EF(["bar","area","line","trail"],r.type)||!("horizontal"===s&&"y"===e||"vertical"===s&&"x"===e)}return!1}(e.channel,e.fieldOrDatumDef,e.domain,e.markDef,e.scaleType)}};function lV(e){vV(e)?function(e){var t,n=e.component.scales,r=Object(D.a)(QL);try{for(r.s();!(t=r.n()).done;){var i=t.value,a=n[i];if(a){var o=oV(i,e);a.setWithExplicit("range",o)}}}catch(s){r.e(s)}finally{r.f()}}(e):fV(e,"range")}function fV(e,t){var n,r=e.component.scales,i=Object(D.a)(e.children);try{for(i.s();!(n=i.n()).done;){var a=n.value;"range"===t?lV(a):AV(a,t)}}catch(h){i.e(h)}finally{i.f()}var o,s=Object(D.a)(OF(r));try{for(s.s();!(o=s.n()).done;){var u,A=o.value,c=void 0,l=Object(D.a)(e.children);try{for(l.s();!(u=l.n()).done;){var f=u.value.component.scales[A];if(f)c=tJ(c,f.getWithExplicit(t),t,"scale",$Y((function(e,n){switch(t){case"range":return e.step&&n.step?e.step-n.step:0}return 0})))}}catch(h){l.e(h)}finally{l.f()}r[A].setWithExplicit(t,c)}}catch(h){s.e(h)}finally{s.f()}}function hV(e,t,n,r){var i=function(e,t,n){var r;switch(t.type){case"nominal":case"ordinal":if(tL(e)||"discrete"===OL(e))return"shape"===e&&"ordinal"===t.type&&uU(v.discreteChannelCannotEncode(e,"ordinal")),"ordinal";if(e in vL){if(EF(["rect","bar","image","rule"],n))return"band"}else if("arc"===n&&e in IL)return"band";return void 0!==t.band||kq(t)&&(null===(r=t.axis)||void 0===r?void 0:r.tickBand)?"band":"point";case"temporal":return tL(e)?"time":"discrete"===OL(e)?(uU(v.discreteChannelCannotEncode(e,"temporal")),"ordinal"):yq(t)&&t.timeUnit&&QU(t.timeUnit).utc?"utc":"time";case"quantitative":return tL(e)?yq(t)&&RL(t.bin)?"bin-ordinal":"linear":"discrete"===OL(e)?(uU(v.discreteChannelCannotEncode(e,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error(v.invalidFieldType(t.type))}(t,n,r),a=e.type;return kL(t)?void 0!==a?NG(t,a)?yq(n)&&!MG(a,n.type)?(uU(v.scaleTypeNotWorkWithFieldDef(a,i)),i):a:(uU(v.scaleTypeNotWorkWithChannel(t,a,i)),i):i:null}function gV(e){vV(e)?e.component.scales=function(e){var t=e.encoding,n=e.mark;return QL.reduce((function(r,i){var a=Hq(t[i]);if(a&&n===mT&&i===KT&&a.type===$U)return r;var o=a&&a.scale;if(a&&null!==o&&!1!==o){var s=hV(o=null!==o&&void 0!==o?o:{},i,a,n);r[i]=new nV(e.scaleName(i+"",!0),{value:s,explicit:o.type===s})}return r}),{})}(e):e.component.scales=function(e){var t,n,r=e.component.scales={},i={},a=e.component.resolve,o=Object(D.a)(e.children);try{for(o.s();!(n=o.n()).done;){var s=n.value;gV(s);var u,A=Object(D.a)(OF(s.component.scales));try{for(A.s();!(u=A.n()).done;){var c=u.value;if(a.scale[c]=null!==(t=a.scale[c])&&void 0!==t?t:xK(c,e),"shared"===a.scale[c]){var l=i[c],f=s.component.scales[c].getWithExplicit("type");l?dG(l.value,f.value)?i[c]=tJ(l,f,"type","scale",dV):(a.scale[c]="independent",delete i[c]):i[c]=f}}}catch(E){A.e(E)}finally{A.f()}}}catch(E){o.e(E)}finally{o.f()}var h,g=Object(D.a)(OF(i));try{for(g.s();!(h=g.n()).done;){var d=h.value,p=e.scaleName(d,!0),v=i[d];r[d]=new nV(p,v);var y,m=Object(D.a)(e.children);try{for(m.s();!(y=m.n()).done;){var I=y.value,b=I.component.scales[d];b&&(I.renameScale(b.get("name"),p),b.merged=!0)}}catch(E){m.e(E)}finally{m.f()}}}catch(E){g.e(E)}finally{g.f()}return r}(e)}var dV=$Y((function(e,t){return vG(e)-vG(t)}));var pV=function(){function e(){Object(_.a)(this,e),this.nameMap={}}return Object(x.a)(e,[{key:"rename",value:function(e,t){this.nameMap[e]=t}},{key:"has",value:function(e){return void 0!==this.nameMap[e]}},{key:"get",value:function(e){for(;this.nameMap[e]&&e!==this.nameMap[e];)e=this.nameMap[e];return e}}]),e}();function vV(e){return"unit"===(null===e||void 0===e?void 0:e.type)}function yV(e){return"facet"===(null===e||void 0===e?void 0:e.type)}function mV(e){return"concat"===(null===e||void 0===e?void 0:e.type)}function IV(e){return"layer"===(null===e||void 0===e?void 0:e.type)}var bV=function(){function e(t,n,r,i,a,o,s){var u,A,c=this;Object(_.a)(this,e),this.type=n,this.parent=r,this.config=a,this.view=s,this.children=[],this.correctDataNames=function(e){return e.from&&e.from.data&&(e.from.data=c.lookupDataSource(e.from.data)),e.from&&e.from.facet&&e.from.facet.data&&(e.from.facet.data=c.lookupDataSource(e.from.facet.data)),e},this.parent=r,this.config=a,this.name=null!==(u=t.name)&&void 0!==u?u:i,this.title=tH(t.title)?{text:t.title}:t.title,this.scaleNameMap=r?r.scaleNameMap:new pV,this.projectionNameMap=r?r.projectionNameMap:new pV,this.signalNameMap=r?r.signalNameMap:new pV,this.data=t.data,this.description=t.description,this.transforms=(null!==(A=t.transform)&&void 0!==A?A:[]).map((function(e){return lJ(e)?{filter:gF(e.filter,zU)}:e})),this.layout="layer"===n||"unit"===n?{}:function(e,t,n){var r,i,a=n[t],o={},s=a.spacing,u=a.columns;void 0!==s&&(o.spacing=s),void 0!==u&&(cq(e)&&!uq(e.facet)||WH(e))&&(o.columns=u),VH(e)&&(o.columns=1);var A,c=Object(D.a)(eY);try{for(c.s();!(A=c.n()).done;){var l=A.value;if(void 0!==e[l])if("spacing"===l){var f=e[l];o[l]=Object(R.E)(f)?f:{row:null!==(r=f.row)&&void 0!==r?r:s,column:null!==(i=f.column)&&void 0!==i?i:s}}else o[l]=e[l]}}catch(h){c.e(h)}finally{c.f()}return o}(t,n,a),this.component={data:{sources:r?r.component.data.sources:[],outputNodes:r?r.component.data.outputNodes:{},outputNodeRefCounts:r?r.component.data.outputNodeRefCounts:{},isFaceted:cq(t)||r&&r.component.data.isFaceted&&void 0===t.data},layoutSize:new VY,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:Object.assign({scale:{},axis:{},legend:{}},o?pF(o):{}),selection:null,scales:null,projection:null,axes:{},legends:{}}}return Object(x.a)(e,[{key:"parse",value:function(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}},{key:"parseScale",value:function(){!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.ignoreRange;gV(e),HW(e);var r,i=Object(D.a)(DG);try{for(i.s();!(r=i.n()).done;){var a=r.value;AV(e,a)}}catch(o){i.e(o)}finally{i.f()}n||lV(e)}(this)}},{key:"parseProjection",value:function(){$K(this)}},{key:"renameTopLevelLayoutSizeSignal",value:function(){"width"!==this.getName("width")&&this.renameSignal(this.getName("width"),"width"),"height"!==this.getName("height")&&this.renameSignal(this.getName("height"),"height")}},{key:"parseLegends",value:function(){qK(this)}},{key:"assembleGroupStyle",value:function(){var e,t;if("unit"===this.type||"layer"===this.type)return null!==(t=null===(e=this.view)||void 0===e?void 0:e.style)&&void 0!==t?t:"cell"}},{key:"assembleEncodeFromView",value:function(e){e.style;var t,n=iF(e,["style"]),r={},i=Object(D.a)(OF(n));try{for(i.s();!(t=i.n()).done;){var a=t.value,o=n[a];void 0!==o&&(r[a]=nH(o))}}catch(s){i.e(s)}finally{i.f()}return r}},{key:"assembleGroupEncodeEntry",value:function(e){var t={};return this.view&&(t=this.assembleEncodeFromView(this.view)),e||(this.description&&(t.description=nH(this.description)),"unit"!==this.type&&"layer"!==this.type)?SF(t)?void 0:t:Object.assign({width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height")},null!==t&&void 0!==t?t:{})}},{key:"assembleLayout",value:function(){if(this.layout){var e=this.layout,t=e.spacing,n=iF(e,["spacing"]),r=this.component,i=this.config,a=function(e,t){var n,r={},i=Object(D.a)(rL);try{for(i.s();!(n=i.n()).done;){var a=n.value,o=e[a];if(null===o||void 0===o?void 0:o.facetFieldDef){var s=cK(["titleAnchor","titleOrient"],o.facetFieldDef,t,a),u=s.titleAnchor,A=uK(a,s.titleOrient),c=bK(u,A);void 0!==c&&(r[A]=c)}}}catch(l){i.e(l)}finally{i.f()}return SF(r)?void 0:r}(r.layoutHeaders,i);return Object.assign(Object.assign(Object.assign({padding:t},this.assembleDefaultLayout()),n),a?{titleBand:a}:{})}}},{key:"assembleDefaultLayout",value:function(){return{}}},{key:"assembleHeaderMarks",value:function(){var e,t=this.component.layoutHeaders,n=[],r=Object(D.a)(rL);try{for(r.s();!(e=r.n()).done;){var i=e.value;t[i].title&&n.push(hK(this,i))}}catch(u){r.e(u)}finally{r.f()}var a,o=Object(D.a)(lK);try{for(o.s();!(a=o.n()).done;){var s=a.value;n=n.concat(pK(this,s))}}catch(u){o.e(u)}finally{o.f()}return n}},{key:"assembleAxes",value:function(){return function(e,t){var n=e.x,r=void 0===n?[]:n,i=e.y,a=void 0===i?[]:i;return[].concat(Object(im.a)(r.map((function(e){return Yz(e,"grid",t)}))),Object(im.a)(a.map((function(e){return Yz(e,"grid",t)}))),Object(im.a)(r.map((function(e){return Yz(e,"main",t)}))),Object(im.a)(a.map((function(e){return Yz(e,"main",t)})))).filter((function(e){return e}))}(this.component.axes,this.config)}},{key:"assembleLegends",value:function(){return KK(this)}},{key:"assembleProjections",value:function(){return WK(this)}},{key:"assembleTitle",value:function(){var e,t,n,r=null!==(e=this.title)&&void 0!==e?e:{},i=r.encoding,a=iF(r,["encoding"]),o=Object.assign(Object.assign(Object.assign({},eH(this.config.title).nonMark),a),i?{encode:{update:i}}:{});if(o.text)return EF(["unit","layer"],this.type)?EF(["middle",void 0],o.anchor)&&(o.frame=null!==(t=o.frame)&&void 0!==t?t:"group"):o.anchor=null!==(n=o.anchor)&&void 0!==n?n:"start",SF(o)?void 0:o}},{key:"assembleGroup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={};(e=e.concat(this.assembleSignals())).length>0&&(t.signals=e);var n=this.assembleLayout();n&&(t.layout=n),t.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());var r=!this.parent||yV(this.parent)?eV(this):[];r.length>0&&(t.scales=r);var i=this.assembleAxes();i.length>0&&(t.axes=i);var a=this.assembleLegends();return a.length>0&&(t.legends=a),t}},{key:"getName",value:function(e){return MF((this.name?this.name+"_":"")+e)}},{key:"requestDataName",value:function(e){var t,n=this.getName(e),r=this.component.data.outputNodeRefCounts;return r[n]=(null!==(t=r[n])&&void 0!==t?t:0)+1,n}},{key:"getSizeSignalRef",value:function(e){if(yV(this.parent)){var t=EL(kK(e)),n=this.component.scales[t];if(n&&!n.merged){var r=n.get("type"),i=n.get("range");if(wG(r)&&xU(i)){var a=n.get("name"),o=ZW($W(this,t));return o?{signal:QK(a,n,Oq({aggregate:"distinct",field:o},{expr:"datum"}))}:(uU("Unknown field for ".concat(t,". Cannot calculate view size.")),null)}}}return{signal:this.signalNameMap.get(this.getName(e))}}},{key:"lookupDataSource",value:function(e){var t=this.component.data.outputNodes[e];return t?t.getSource():e}},{key:"getSignalName",value:function(e){return this.signalNameMap.get(e)}},{key:"renameSignal",value:function(e,t){this.signalNameMap.rename(e,t)}},{key:"renameScale",value:function(e,t){this.scaleNameMap.rename(e,t)}},{key:"renameProjection",value:function(e,t){this.projectionNameMap.rename(e,t)}},{key:"scaleName",value:function(e,t){return t?this.getName(e):uL(e)&&kL(e)&&this.component.scales[e]||this.scaleNameMap.has(this.getName(e))?this.scaleNameMap.get(this.getName(e)):void 0}},{key:"projectionName",value:function(e){return e?this.getName("projection"):this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection"))?this.projectionNameMap.get(this.getName("projection")):void 0}},{key:"getScaleComponent",value:function(e){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");var t=this.component.scales[e];return t&&!t.merged?t:this.parent?this.parent.getScaleComponent(e):void 0}},{key:"getSelectionComponent",value:function(e,t){var n=this.component.selection[e];if(!n&&this.parent&&(n=this.parent.getSelectionComponent(e,t)),!n)throw new Error(v.selectionNotFound(t));return n}},{key:"hasAxisOrientSignalRef",value:function(){var e,t;return(null===(e=this.component.axes.x)||void 0===e?void 0:e.some((function(e){return e.hasOrientSignalRef()})))||(null===(t=this.component.axes.y)||void 0===t?void 0:t.some((function(e){return e.hasOrientSignalRef()})))}},{key:"width",get:function(){return this.getSizeSignalRef("width")}},{key:"height",get:function(){return this.getSizeSignalRef("height")}}]),e}(),EV=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return Object(x.a)(n,[{key:"vgField",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.fieldDef(e);if(n)return Oq(n,t)}},{key:"reduceFieldDef",value:function(e,t){return IH(this.getMapping(),(function(t,n,r){var i=qq(n);return i?e(t,i,r):t}),t)}},{key:"forEachFieldDef",value:function(e,t){mH(this.getMapping(),(function(t,n){var r=qq(t);r&&e(r,n)}),t)}}]),n}(bV),CV=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i,a,o,s;Object(_.a)(this,n),(i=t.call(this,e)).transform=r,i.transform=pF(r);var u=null!==(a=i.transform.as)&&void 0!==a?a:[void 0,void 0];return i.transform.as=[null!==(o=u[0])&&void 0!==o?o:"value",null!==(s=u[1])&&void 0!==s?s:"density"],i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,pF(this.transform))}},{key:"dependentFields",value:function(){var e;return new Set([this.transform.density].concat(Object(im.a)(null!==(e=this.transform.groupby)&&void 0!==e?e:[])))}},{key:"producedFields",value:function(){return new Set(this.transform.as)}},{key:"hash",value:function(){return"DensityTransform ".concat(IF(this.transform))}},{key:"assemble",value:function(){var e=this.transform,t=e.density,n=iF(e,["density"]);return Object.assign({type:"kde",field:t},n)}}]),n}(nz),BV=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(_.a)(this,n),(i=t.call(this,e)).filter=r,i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,Object.assign({},this.filter))}},{key:"dependentFields",value:function(){return new Set(OF(this.filter))}},{key:"producedFields",value:function(){return new Set}},{key:"hash",value:function(){return"FilterInvalid ".concat(IF(this.filter))}},{key:"assemble",value:function(){var e=this,t=OF(this.filter).reduce((function(t,n){var r=e.filter[n],i=Oq(r,{expr:"datum"});return null!==r&&("temporal"===r.type?t.push("(isDate(".concat(i,") || (isValid(").concat(i,") && isFinite(+").concat(i,")))")):"quantitative"===r.type&&(t.push("isValid(".concat(i,")")),t.push("isFinite(+".concat(i,")")))),t}),[]);return t.length>0?{type:"filter",expr:t.join(" && ")}:null}}],[{key:"make",value:function(e,t){var r=t.config,i=t.mark;if("filter"!==oH("invalid",t.markDef,r))return null;var a=t.reduceFieldDef((function(e,n,r){var a=kL(r)&&t.getScaleComponent(r);a&&(QG(a.get("type"))&&"count"!==n.aggregate&&!IT(i)&&(e[n.field]=n));return e}),{});return OF(a).length?new n(e,a):null}}]),n}(nz),wV=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;Object(_.a)(this,n),(i=t.call(this,e)).transform=r,i.transform=pF(r);var a=i.transform,o=a.flatten,s=a.as,u=void 0===s?[]:s;return i.transform.as=o.map((function(e,t){var n;return null!==(n=u[t])&&void 0!==n?n:e})),i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(this.parent,pF(this.transform))}},{key:"dependentFields",value:function(){return new Set(this.transform.flatten)}},{key:"producedFields",value:function(){return new Set(this.transform.as)}},{key:"hash",value:function(){return"FlattenTransform ".concat(IF(this.transform))}},{key:"assemble",value:function(){var e=this.transform;return{type:"flatten",fields:e.flatten,as:e.as}}}]),n}(nz),QV=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i,a,o,s;Object(_.a)(this,n),(i=t.call(this,e)).transform=r,i.transform=pF(r);var u=null!==(a=i.transform.as)&&void 0!==a?a:[void 0,void 0];return i.transform.as=[null!==(o=u[0])&&void 0!==o?o:"key",null!==(s=u[1])&&void 0!==s?s:"value"],i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,pF(this.transform))}},{key:"dependentFields",value:function(){return new Set(this.transform.fold)}},{key:"producedFields",value:function(){return new Set(this.transform.as)}},{key:"hash",value:function(){return"FoldTransform ".concat(IF(this.transform))}},{key:"assemble",value:function(){var e=this.transform;return{type:"fold",fields:e.fold,as:e.as}}}]),n}(nz),kV=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r,i,a){var o;return Object(_.a)(this,n),(o=t.call(this,e)).fields=r,o.geojson=i,o.signal=a,o}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,pF(this.fields),this.geojson,this.signal)}},{key:"dependentFields",value:function(){var e,t=(null!==(e=this.fields)&&void 0!==e?e:[]).filter(R.H);return new Set([].concat(Object(im.a)(this.geojson?[this.geojson]:[]),Object(im.a)(t)))}},{key:"producedFields",value:function(){return new Set}},{key:"hash",value:function(){return"GeoJSON ".concat(this.geojson," ").concat(this.signal," ").concat(IF(this.fields))}},{key:"assemble",value:function(){return Object.assign(Object.assign(Object.assign({type:"geojson"},this.fields?{fields:this.fields}:{}),this.geojson?{geojson:this.geojson}:{}),{signal:this.signal})}}],[{key:"parseAll",value:function(e,t){if(t.component.projection&&!t.component.projection.isFit)return e;for(var r=0,i=0,a=[["longitude","latitude"],["longitude2","latitude2"]];i<a.length;i++){var o=a[i].map((function(e){var n=Hq(t.encoding[e]);return yq(n)?n.field:Iq(n)?{expr:"".concat(n.datum)}:wq(n)?{expr:"".concat(n.value)}:void 0}));(o[0]||o[1])&&(e=new n(e,o,null,t.getName("geojson_".concat(r++))))}if(t.channelHasField(KT)){var s=t.typedFieldDef(KT);s.type===$U&&(e=new n(e,null,s.field,t.getName("geojson_".concat(r++))))}return e}}]),n}(nz),_V=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r,i,a){var o;return Object(_.a)(this,n),(o=t.call(this,e)).projection=r,o.fields=i,o.as=a,o}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,this.projection,pF(this.fields),pF(this.as))}},{key:"dependentFields",value:function(){return new Set(this.fields.filter(R.H))}},{key:"producedFields",value:function(){return new Set(this.as)}},{key:"hash",value:function(){return"Geopoint ".concat(this.projection," ").concat(IF(this.fields)," ").concat(IF(this.as))}},{key:"assemble",value:function(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}],[{key:"parseAll",value:function(e,t){if(!t.projectionName())return e;for(var r=0,i=[["longitude","latitude"],["longitude2","latitude2"]];r<i.length;r++){var a=i[r],o=a.map((function(e){var n=Hq(t.encoding[e]);return yq(n)?n.field:Iq(n)?{expr:"".concat(n.datum)}:wq(n)?{expr:"".concat(n.value)}:void 0})),s="longitude2"===a[0]?"2":"";(o[0]||o[1])&&(e=new n(e,t.projectionName(),o,[t.getName("x"+s),t.getName("y"+s)]))}return e}}]),n}(nz),xV=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(_.a)(this,n),(i=t.call(this,e)).transform=r,i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,pF(this.transform))}},{key:"dependentFields",value:function(){var e;return new Set([this.transform.impute,this.transform.key].concat(Object(im.a)(null!==(e=this.transform.groupby)&&void 0!==e?e:[])))}},{key:"producedFields",value:function(){return new Set([this.transform.impute])}},{key:"processSequence",value:function(e){var t=e.start,n=void 0===t?0:t,r=e.stop,i=e.step,a=[n,r].concat(Object(im.a)(i?[i]:[])).join(",");return{signal:"sequence(".concat(a,")")}}},{key:"hash",value:function(){return"Impute ".concat(IF(this.transform))}},{key:"assemble",value:function(){var e,t=this.transform,n=t.impute,r=t.key,i=t.keyvals,a=t.method,o=t.groupby,s=t.value,u=t.frame,A=void 0===u?[null,null]:u,c=Object.assign(Object.assign(Object.assign(Object.assign({type:"impute",field:n,key:r},i?{keyvals:(e=i,void 0!==(null===e||void 0===e?void 0:e.stop)?this.processSequence(i):i)}:{}),{method:"value"}),o?{groupby:o}:{}),{value:a&&"value"!==a?null:s});return a&&"value"!==a?[c,Object.assign({type:"window",as:["imputed_".concat(n,"_value")],ops:[a],fields:[n],frame:A,ignorePeers:!1},o?{groupby:o}:{}),{type:"formula",expr:"datum.".concat(n," === null ? datum.imputed_").concat(n,"_value : datum.").concat(n),as:n}]:[c]}}],[{key:"makeFromTransform",value:function(e,t){return new n(e,t)}},{key:"makeFromEncoding",value:function(e,t){var r=t.encoding,i=r.x,a=r.y;if(yq(i)&&yq(a)){var o=i.impute?i:a.impute?a:void 0;if(void 0===o)return;var s=i.impute?a:a.impute?i:void 0,u=o.impute,A=u.method,c=u.value,l=u.frame,f=u.keyvals,h=bH(t.mark,r);return new n(e,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({impute:o.field,key:s.field},A?{method:A}:{}),void 0!==c?{value:c}:{}),l?{frame:l}:{}),void 0!==f?{keyvals:f}:{}),h.length?{groupby:h}:{}))}return null}}]),n}(nz),SV=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i,a,o,s;Object(_.a)(this,n),(i=t.call(this,e)).transform=r,i.transform=pF(r);var u=null!==(a=i.transform.as)&&void 0!==a?a:[void 0,void 0];return i.transform.as=[null!==(o=u[0])&&void 0!==o?o:r.on,null!==(s=u[1])&&void 0!==s?s:r.loess],i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,pF(this.transform))}},{key:"dependentFields",value:function(){var e;return new Set([this.transform.loess,this.transform.on].concat(Object(im.a)(null!==(e=this.transform.groupby)&&void 0!==e?e:[])))}},{key:"producedFields",value:function(){return new Set(this.transform.as)}},{key:"hash",value:function(){return"LoessTransform ".concat(IF(this.transform))}},{key:"assemble",value:function(){var e=this.transform,t=e.loess,n=e.on,r=iF(e,["loess","on"]);return Object.assign({type:"loess",x:n,y:t},r)}}]),n}(nz),OV=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r,i){var a;return Object(_.a)(this,n),(a=t.call(this,e)).transform=r,a.secondary=i,a}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,pF(this.transform),this.secondary)}},{key:"dependentFields",value:function(){return new Set([this.transform.lookup])}},{key:"producedFields",value:function(){return new Set(this.transform.as?Object(R.i)(this.transform.as):this.transform.from.fields)}},{key:"hash",value:function(){return"Lookup ".concat(IF({transform:this.transform,secondary:this.secondary}))}},{key:"assemble",value:function(){var e;if(this.transform.from.fields)e=Object.assign({values:this.transform.from.fields},this.transform.as?{as:Object(R.i)(this.transform.as)}:{});else{var t=this.transform.as;Object(R.H)(t)||(uU(v.NO_FIELDS_NEEDS_AS),t="_lookup"),e={as:[t]}}return Object.assign(Object.assign({type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup]},e),this.transform.default?{default:this.transform.default}:{})}}],[{key:"make",value:function(e,t,r,i){var a=t.component.data.sources,o=r.from,s=null;if(function(e){return"data"in e}(o)){var u=zV(o.data,a);u||(u=new aW(o.data),a.push(u));var A=t.getName("lookup_".concat(i));s=new rz(u,A,"lookup",t.component.data.outputNodeRefCounts),t.component.data.outputNodes[A]=s}else if(function(e){return"selection"in e}(o)){var c=o.selection;if(r=Object.assign({as:c},r),!(s=t.getSelectionComponent(MF(c),c).materialized))throw new Error(v.noSameUnitLookup(c))}return new n(e,r,s.getSource())}}]),n}(nz),DV=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i,a,o,s;Object(_.a)(this,n),(i=t.call(this,e)).transform=r,i.transform=pF(r);var u=null!==(a=i.transform.as)&&void 0!==a?a:[void 0,void 0];return i.transform.as=[null!==(o=u[0])&&void 0!==o?o:"prob",null!==(s=u[1])&&void 0!==s?s:"value"],i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,pF(this.transform))}},{key:"dependentFields",value:function(){var e;return new Set([this.transform.quantile].concat(Object(im.a)(null!==(e=this.transform.groupby)&&void 0!==e?e:[])))}},{key:"producedFields",value:function(){return new Set(this.transform.as)}},{key:"hash",value:function(){return"QuantileTransform ".concat(IF(this.transform))}},{key:"assemble",value:function(){var e=this.transform,t=e.quantile,n=iF(e,["quantile"]);return Object.assign({type:"quantile",field:t},n)}}]),n}(nz),RV=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i,a,o,s;Object(_.a)(this,n),(i=t.call(this,e)).transform=r,i.transform=pF(r);var u=null!==(a=i.transform.as)&&void 0!==a?a:[void 0,void 0];return i.transform.as=[null!==(o=u[0])&&void 0!==o?o:r.on,null!==(s=u[1])&&void 0!==s?s:r.regression],i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,pF(this.transform))}},{key:"dependentFields",value:function(){var e;return new Set([this.transform.regression,this.transform.on].concat(Object(im.a)(null!==(e=this.transform.groupby)&&void 0!==e?e:[])))}},{key:"producedFields",value:function(){return new Set(this.transform.as)}},{key:"hash",value:function(){return"RegressionTransform ".concat(IF(this.transform))}},{key:"assemble",value:function(){var e=this.transform,t=e.regression,n=e.on,r=iF(e,["regression","on"]);return Object.assign({type:"regression",x:n,y:t},r)}}]),n}(nz),jV=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(_.a)(this,n),(i=t.call(this,e)).transform=r,i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,pF(this.transform))}},{key:"addDimensions",value:function(e){var t;this.transform.groupby=QF((null!==(t=this.transform.groupby)&&void 0!==t?t:[]).concat(e),(function(e){return e}))}},{key:"producedFields",value:function(){}},{key:"dependentFields",value:function(){var e;return new Set([this.transform.pivot,this.transform.value].concat(Object(im.a)(null!==(e=this.transform.groupby)&&void 0!==e?e:[])))}},{key:"hash",value:function(){return"PivotTransform ".concat(IF(this.transform))}},{key:"assemble",value:function(){var e=this.transform,t=e.pivot,n=e.value,r=e.groupby,i=e.limit,a=e.op;return Object.assign(Object.assign(Object.assign({type:"pivot",field:t,value:n},void 0!==i?{limit:i}:{}),void 0!==a?{op:a}:{}),void 0!==r?{groupby:r}:{})}}]),n}(nz),MV=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r){var i;return Object(_.a)(this,n),(i=t.call(this,e)).transform=r,i}return Object(x.a)(n,[{key:"clone",value:function(){return new n(null,pF(this.transform))}},{key:"dependentFields",value:function(){return new Set}},{key:"producedFields",value:function(){return new Set}},{key:"hash",value:function(){return"SampleTransform ".concat(IF(this.transform))}},{key:"assemble",value:function(){return{type:"sample",size:this.transform.sample}}}]),n}(nz);function NV(e){var t=0;return function n(r,i){var a,o,s;if(r instanceof aW&&(r.isGenerator||rJ(r.data)||(e.push(i),i={name:null,source:i.name,transform:[]})),r instanceof IW&&(r.parent instanceof aW&&!i.source?(i.format=Object.assign(Object.assign({},null!==(a=i.format)&&void 0!==a?a:{}),{parse:r.assembleFormatParse()}),(o=i.transform).push.apply(o,Object(im.a)(r.assembleTransforms(!0)))):(s=i.transform).push.apply(s,Object(im.a)(r.assembleTransforms()))),r instanceof dW){i.name||(i.name="data_".concat(t++)),!i.source||i.transform.length>0?(e.push(i),r.data=i.name):r.data=i.source;var u,A=Object(D.a)(r.assemble());try{for(A.s();!(u=A.n()).done;){var c=u.value;e.push(c)}}catch(d){A.e(d)}finally{A.f()}}else{var l;if((r instanceof sW||r instanceof uW||r instanceof BV||r instanceof Lz||r instanceof oK||r instanceof _V||r instanceof kV||r instanceof gW||r instanceof OV||r instanceof BW||r instanceof EW||r instanceof QV||r instanceof wV||r instanceof CV||r instanceof SV||r instanceof DV||r instanceof RV||r instanceof bW||r instanceof MV||r instanceof jV)&&i.transform.push(r.assemble()),r instanceof iW||r instanceof iz||r instanceof xV||r instanceof CW)(l=i.transform).push.apply(l,Object(im.a)(r.assemble()));if(r instanceof rz)if(i.source&&0===i.transform.length)r.setSource(i.source);else if(r.parent instanceof rz)r.setSource(i.name);else{if(i.name||(i.name="data_".concat(t++)),r.setSource(i.name),1===r.numChildren())e.push(i),i={name:null,source:i.name,transform:[]}}switch(r.numChildren()){case 0:r instanceof rz&&(!i.source||i.transform.length>0)&&e.push(i);break;case 1:n(r.children[0],i);break;default:i.name||(i.name="data_".concat(t++));var f=i.name;!i.source||i.transform.length>0?e.push(i):f=i.source;var h,g=Object(D.a)(r.children);try{for(g.s();!(h=g.n()).done;){n(h.value,{name:null,source:f,transform:[]})}}catch(d){g.e(d)}finally{g.f()}}}}}function FV(e,t){var n,r,i,a=[],o=NV(a),s=0,u=Object(D.a)(e.sources);try{for(u.s();!(i=u.n()).done;){var A=i.value;A.hasName()||(A.dataName="source_".concat(s++));var c=A.assemble();o(A,c)}}catch(x){u.e(x)}finally{u.f()}for(var l=0,f=a;l<f.length;l++){var h=f[l];0===h.transform.length&&delete h.transform}var g,d=0,p=Object(D.a)(a.entries());try{for(p.s();!(g=p.n()).done;){var v=Object(ks.a)(g.value,2),y=v[0],m=v[1];0!==(null!==(n=m.transform)&&void 0!==n?n:[]).length||m.source||a.splice(d++,0,a.splice(y,1)[0])}}catch(x){p.e(x)}finally{p.f()}for(var I=0,b=a;I<b.length;I++){var E,C=b[I],B=Object(D.a)(null!==(r=C.transform)&&void 0!==r?r:[]);try{for(B.s();!(E=B.n()).done;){var w=E.value;"lookup"===w.type&&(w.from=e.outputNodes[w.from].getSource())}}catch(x){B.e(x)}finally{B.f()}}for(var Q=0,k=a;Q<k.length;Q++){var _=k[Q];_.name in t&&(_.values=t[_.name])}return a}function TV(e,t){var n,r=e.facet,i=e.config,a=e.child,o=e.component;if(e.channelHasField(t)){var s=r[t],u=AK("title",null,i,t),A=Lq(s,i,{allowDisabling:!0,includeDefault:void 0===u||!!u});a.component.layoutHeaders[t].title&&(A=Object(R.A)(A)?A.join(", "):A,A+=" / "+a.component.layoutHeaders[t].title,a.component.layoutHeaders[t].title=null);var c=AK("labelOrient",s,i,t),l=JF((null!==(n=s.header)&&void 0!==n?n:{}).labels,i.header.labels,!0),f=EF(["bottom","right"],c)?"footer":"header";o.layoutHeaders[t]=Object(Q.a)({title:A,facetFieldDef:s},f,"facet"===t?[]:[LV(e,t,l)])}}function LV(e,t,n){var r="row"===t?"height":"width";return{labels:n,sizeSignal:e.child.component.layoutSize.get(r)?e.child.getSizeSignalRef(r):void 0,axes:[]}}function PV(e,t){var n,r,i=e.child;if(i.component.axes[t]){var a=e.component,o=a.layoutHeaders,s=a.resolve;if(s.axis[t]=SK(s,t),"shared"===s.axis[t]){var u,A="x"===t?"column":"row",c=o[A],l=Object(D.a)(i.component.axes[t]);try{for(l.s();!(u=l.n()).done;){var f=u.value,h="top"===(r=f.get("orient"))||"left"===r||_U(r)?"header":"footer";c[h]=null!==(n=c[h])&&void 0!==n?n:[LV(e,A,!1)];var g=Yz(f,"main",e.config,{header:!0});g&&c[h][0].axes.push(g),f.mainExtracted=!0}}catch(d){l.e(d)}finally{l.f()}}}}function UV(e){GV(e);var t=1===e.layout.columns?"width":"childWidth",n=void 0===e.layout.columns?"height":"childHeight";qV(e,t),qV(e,n)}function GV(e){var t,n=Object(D.a)(e.children);try{for(n.s();!(t=n.n()).done;){t.value.parseLayoutSize()}}catch(r){n.e(r)}finally{n.f()}}function qV(e,t){var n,r,i=kK(t),a=EL(i),o=e.component.resolve,s=e.component.layoutSize,u=Object(D.a)(e.children);try{for(u.s();!(r=u.n()).done;){var A=r.value.component.layoutSize.getWithExplicit(i),c=o.scale[a];if("independent"===c&&"step"===A.value){n=void 0;break}if(n){if("independent"===c&&n.value!==A.value){n=void 0;break}n=tJ(n,A,i,"")}else n=A}}catch(g){u.e(g)}finally{u.f()}if(n){var l,f=Object(D.a)(e.children);try{for(f.s();!(l=f.n()).done;){var h=l.value;e.renameSignal(h.getName(i),e.getName(t)),h.component.layoutSize.set(i,"merged",!1)}}catch(g){f.e(g)}finally{f.f()}s.setWithExplicit(t,n)}else s.setWithExplicit(t,{explicit:!1,value:void 0})}function HV(e,t){var n="width"===t?"x":"y",r=e.config,i=e.getScaleComponent(n);if(i){var a=i.get("type"),o=i.get("range");if(wG(a)){var s=rY(r.view,t);return xU(o)||ZH(s)?"step":s}return tY(r.view,t)}if(e.hasProjection||"arc"===e.mark)return tY(r.view,t);var u=rY(r.view,t);return ZH(u)?u.step:u}function YV(e,t,n){return Oq(t,Object.assign({suffix:"by_".concat(Oq(e))},null!==n&&void 0!==n?n:{}))}var JV=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r,i,a){var o;return Object(_.a)(this,n),(o=t.call(this,e,"facet",r,i,a,e.resolve)).child=mX(e.spec,Object(F.a)(o),o.getName("child"),void 0,a),o.children=[o.child],o.facet=o.initFacet(e.facet,a),o}return Object(x.a)(n,[{key:"initFacet",value:function(e,t){return uq(e)?IH(e,(function(e,n,r){return EF([PT,UT],r)?void 0===n.field?(uU(v.emptyFieldDef(n,r)),e):(e[r]=Yq(n,r,t),e):(uU(v.incompatibleChannel(r,"facet")),e)}),{}):{facet:Yq(e,"facet",t)}}},{key:"channelHasField",value:function(e){return!!this.facet[e]}},{key:"fieldDef",value:function(e){return this.facet[e]}},{key:"parseData",value:function(){this.component.data=WV(this),this.child.parseData()}},{key:"parseLayoutSize",value:function(){GV(this)}},{key:"parseSelections",value:function(){this.child.parseSelections(),this.component.selection=this.child.component.selection}},{key:"parseMarkGroup",value:function(){this.child.parseMarkGroup()}},{key:"parseAxesAndHeaders",value:function(){this.child.parseAxesAndHeaders(),function(e){var t,n=Object(D.a)(rL);try{for(n.s();!(t=n.n()).done;){TV(e,t.value)}}catch(r){n.e(r)}finally{n.f()}PV(e,"x"),PV(e,"y")}(this)}},{key:"assembleSelectionTopLevelSignals",value:function(e){return this.child.assembleSelectionTopLevelSignals(e)}},{key:"assembleSignals",value:function(){return this.child.assembleSignals(),[]}},{key:"assembleSelectionData",value:function(e){return this.child.assembleSelectionData(e)}},{key:"getHeaderLayoutMixins",value:function(){var e,t,n,r,i={},a=Object(D.a)(rL);try{for(a.s();!(r=a.n()).done;){var o,s=r.value,u=Object(D.a)(fK);try{for(u.s();!(o=u.n()).done;){var A=o.value,c=this.component.layoutHeaders[s],l=c[A],f=c.facetFieldDef;if(f){var h=AK("titleOrient",f,this.config,s);if(EF(["right","bottom"],h)){var g=uK(s,h);i.titleAnchor=null!==(e=i.titleAnchor)&&void 0!==e?e:{},i.titleAnchor[g]="end"}}if(null===l||void 0===l?void 0:l[0]){var d="row"===s?"height":"width",p="header"===A?"headerBand":"footerBand";"facet"===s||this.child.component.layoutSize.get(d)||(i[p]=null!==(t=i[p])&&void 0!==t?t:{},i[p][s]=.5),c.title&&(i.offset=null!==(n=i.offset)&&void 0!==n?n:{},i.offset["row"===s?"rowTitle":"columnTitle"]=10)}}}catch(v){u.e(v)}finally{u.f()}}}catch(v){a.e(v)}finally{a.f()}return i}},{key:"assembleDefaultLayout",value:function(){var e=this.facet,t=e.column,n=e.row,r=t?this.columnDistinctSignal():n?1:void 0,i="all";return(n||"independent"!==this.component.resolve.scale.x)&&(t||"independent"!==this.component.resolve.scale.y)||(i="none"),Object.assign(Object.assign(Object.assign({},this.getHeaderLayoutMixins()),r?{columns:r}:{}),{bounds:"full",align:i})}},{key:"assembleLayoutSignals",value:function(){return this.child.assembleLayoutSignals()}},{key:"columnDistinctSignal",value:function(){if(!(this.parent&&this.parent instanceof n)){var e=this.getName("column_domain");return{signal:"length(data('".concat(e,"'))")}}}},{key:"assembleGroup",value:function(e){return this.parent&&this.parent instanceof n?Object.assign(Object.assign({},this.channelHasField("column")?{encode:{update:{columns:{field:Oq(this.facet.column,{prefix:"distinct"})}}}}:{}),Object(IY.a)(Object(mY.a)(n.prototype),"assembleGroup",this).call(this,e)):Object(IY.a)(Object(mY.a)(n.prototype),"assembleGroup",this).call(this,e)}},{key:"getCardinalityAggregateForChild",value:function(){var e=[],t=[],r=[];if(this.child instanceof n){if(this.child.channelHasField("column")){var i=Oq(this.child.facet.column);e.push(i),t.push("distinct"),r.push("distinct_".concat(i))}}else{var a,o=Object(D.a)(yL);try{for(o.s();!(a=o.n()).done;){var s=a.value,u=this.child.component.scales[s];if(u&&!u.merged){var A=u.get("type"),c=u.get("range");if(wG(A)&&xU(c)){var l=ZW($W(this.child,s));l?(e.push(l),t.push("distinct"),r.push("distinct_".concat(l))):uU("Unknown field for ".concat(s,". Cannot calculate view size."))}}}}catch(f){o.e(f)}finally{o.f()}}return{fields:e,ops:t,as:r}}},{key:"assembleFacet",value:function(){var e,t=this.component.data.facetRoot,n=t.name,r=t.data,i=this.facet,a=i.row,o=i.column,s=this.getCardinalityAggregateForChild(),u=s.fields,A=s.ops,c=s.as,l=[],f=Object(D.a)(rL);try{for(f.s();!(e=f.n()).done;){var h=e.value,g=this.facet[h];if(g){l.push(Oq(g));var d=g.bin,p=g.sort;if(RL(d)&&l.push(Oq(g,{binSuffix:"end"})),oq(p)){var v=p.field,y=p.op,m=void 0===y?"min":y,I=YV(g,p);a&&o?(u.push(I),A.push("max"),c.push(I)):(u.push(v),A.push(m),c.push(I))}else if(Object(R.A)(p)){var b=sK(g,h);u.push(b),A.push("max"),c.push(b)}}}}catch(C){f.e(C)}finally{f.f()}var E=!!a&&!!o;return Object.assign({name:n,data:r,groupby:l},E||u.length>0?{aggregate:Object.assign(Object.assign({},E?{cross:E}:{}),u.length?{fields:u,ops:A,as:c}:{})}:{})}},{key:"facetSortFields",value:function(e){var t=this.facet[e];return t?oq(t.sort)?[YV(t,t.sort,{expr:"datum"})]:Object(R.A)(t.sort)?[sK(t,e,{expr:"datum"})]:[Oq(t,{expr:"datum"})]:[]}},{key:"facetSortOrder",value:function(e){var t=this.facet[e];if(t){var n=t.sort;return[(oq(n)?n.order:!Object(R.A)(n)&&n)||"ascending"]}return[]}},{key:"assembleLabelTitle",value:function(){var e=this.facet,t=this.config;if(e.facet)return yK(e.facet,"facet",t);var n,r={row:["top","bottom"],column:["left","right"]},i=Object(D.a)(lK);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(e[a]){var o=AK("labelOrient",e[a],t,a);if(EF(r[a],o))return yK(e[a],a,t)}}}catch(s){i.e(s)}finally{i.f()}}},{key:"assembleMarks",value:function(){var e=this,t=this.child,n=function(e){var t,n=[],r=NV(n),i=Object(D.a)(e.children);try{for(i.s();!(t=i.n()).done;){r(t.value,{source:e.name,name:null,transform:[]})}}catch(a){i.e(a)}finally{i.f()}return n}(this.component.data.facetRoot),r=t.assembleGroupEncodeEntry(!1),i=this.assembleLabelTitle()||t.assembleTitle(),a=t.assembleGroupStyle();return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:this.getName("cell"),type:"group"},i?{title:i}:{}),a?{style:a}:{}),{from:{facet:this.assembleFacet()},sort:{field:rL.map((function(t){return e.facetSortFields(t)})).flat(),order:rL.map((function(t){return e.facetSortOrder(t)})).flat()}}),n.length>0?{data:n}:{}),r?{encode:{update:r}}:{}),t.assembleGroup(function(e,t){if(e.component.selection&&OF(e.component.selection).length){var n=Object(R.Z)(e.getName("cell"));t.unshift({name:"facet",value:{},on:[{events:Ej("mousemove","scope"),update:"isTuple(facet) ? facet : group(".concat(n,").datum")}]})}return Ez(t)}(this,[])))]}},{key:"getMapping",value:function(){return this.facet}}]),n}(EV);function zV(e,t){var n,r,i,a,o,s,u,A,c,l,f,h=Object(D.a)(t);try{for(h.s();!(f=h.n()).done;){var g=f.value,d=g.data;if((!e.name||!g.hasName()||e.name===g.dataName)&&((!(null===(n=e.format)||void 0===n?void 0:n.mesh)||!(null===(r=d.format)||void 0===r?void 0:r.feature))&&(!(null===(i=e.format)||void 0===i?void 0:i.feature)&&!(null===(a=d.format)||void 0===a?void 0:a.feature)||(null===(o=e.format)||void 0===o?void 0:o.feature)===(null===(s=d.format)||void 0===s?void 0:s.feature))&&(!(null===(u=e.format)||void 0===u?void 0:u.mesh)&&!(null===(A=d.format)||void 0===A?void 0:A.mesh)||(null===(c=e.format)||void 0===c?void 0:c.mesh)===(null===(l=d.format)||void 0===l?void 0:l.mesh))))if(iJ(e)&&iJ(d)){if(dF(e.values,d.values))return g}else if(rJ(e)&&rJ(d)){if(e.url===d.url)return g}else if(aJ(e)&&e.name===g.dataName)return g}}catch(p){h.e(p)}finally{h.f()}return null}function KV(e,t){if(e.data||!e.parent){if(null===e.data){var n=new aW({values:[]});return t.push(n),n}var r=zV(e.data,t);if(r)return oJ(e.data)||(r.data.format=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];wF(e,null!==o&&void 0!==o?o:{})}return e}({},e.data.format,r.data.format)),!r.hasName()&&e.data.name&&(r.dataName=e.data.name),r;var i=new aW(e.data);return t.push(i),i}return e.parent.component.data.facetRoot?e.parent.component.data.facetRoot:e.parent.component.data.main}function WV(e){var t,n,r,i,a,o,s,u,A,c,l=KV(e,e.component.data.sources),f=e.component.data,h=f.outputNodes,g=f.outputNodeRefCounts,d=e.parent?e.parent.component.data.ancestorParse.clone():new nJ,p=e.data;oJ(p)?(sJ(p)?l=new uW(l,p.sequence):AJ(p)&&(l=new sW(l,p.graticule)),d.parseNothing=!0):null===(null===(t=null===p||void 0===p?void 0:p.format)||void 0===t?void 0:t.parse)&&(d.parseNothing=!0),l=null!==(n=IW.makeExplicit(l,e,d))&&void 0!==n?n:l,l=new bW(l);var y=e.parent&&IV(e.parent);(vV(e)||yV(e))&&y&&(l=null!==(r=iW.makeFromEncoding(l,e))&&void 0!==r?r:l),e.transforms.length>0&&(l=function(e,t,n){var r,i,a,o=0,s=Object(D.a)(t.transforms);try{for(s.s();!(a=s.n()).done;){var u=a.value,A=void 0,c=void 0;if(EJ(u))c=e=new oK(e,u),A="derived";else if(lJ(u)){var l=yW(u);c=e=null!==(r=IW.makeWithAncestors(e,{},l,n))&&void 0!==r?r:e,e=new Lz(e,t,u.filter)}else if(CJ(u))c=e=iW.makeFromTransform(e,u,t),A="number";else if(wJ(u)){A="date",void 0===n.getWithExplicit(u.field).value&&(e=new IW(e,Object(Q.a)({},u.field,A)),n.set(u.field,A,!1)),c=e=iz.makeFromTransform(e,u)}else if(QJ(u))c=e=gW.makeFromTransform(e,u),A="number",Fz(t)&&(e=new bW(e));else if(fJ(u))c=e=OV.make(e,t,u,o++),A="derived";else if(mJ(u))c=e=new BW(e,u),A="number";else if(IJ(u))c=e=new EW(e,u),A="number";else if(kJ(u))c=e=CW.makeFromTransform(e,u),A="derived";else if(_J(u))c=e=new QV(e,u),A="derived";else if(bJ(u))c=e=new wV(e,u),A="derived";else if(hJ(u))c=e=new jV(e,u),A="derived";else if(yJ(u))e=new MV(e,u);else if(BJ(u))c=e=xV.makeFromTransform(e,u),A="derived";else if(gJ(u))c=e=new CV(e,u),A="derived";else if(dJ(u))c=e=new DV(e,u),A="derived";else if(pJ(u))c=e=new RV(e,u),A="derived";else{if(!vJ(u)){uU(v.invalidTransformIgnored(u));continue}c=e=new SV(e,u),A="derived"}if(c&&void 0!==A){var f,h=Object(D.a)(null!==(i=c.producedFields())&&void 0!==i?i:[]);try{for(h.s();!(f=h.n()).done;){var g=f.value;n.set(g,A,!1)}}catch(d){h.e(d)}finally{h.f()}}}}catch(d){s.e(d)}finally{s.f()}return e}(l,e,d));var m=function(e){var t={};if(vV(e)&&e.component.selection){var n,r=Object(D.a)(OF(e.component.selection));try{for(r.s();!(n=r.n()).done;){var i,a=n.value,o=e.component.selection[a],s=Object(D.a)(o.project.items);try{for(s.s();!(i=s.n()).done;){var u=i.value;!u.channel&&YF(u.field)>1&&(t[u.field]="flatten")}}catch(A){s.e(A)}finally{s.f()}}}catch(A){r.e(A)}finally{r.f()}}return t}(e),I=mW(e);l=null!==(i=IW.makeWithAncestors(l,{},Object.assign(Object.assign({},m),I),d))&&void 0!==i?i:l,vV(e)&&(l=kV.parseAll(l,e),l=_V.parseAll(l,e)),(vV(e)||yV(e))&&(y||(l=null!==(a=iW.makeFromEncoding(l,e))&&void 0!==a?a:l),l=null!==(o=iz.makeFromEncoding(l,e))&&void 0!==o?o:l,l=oK.parseAllForSortIndex(l,e));var b=e.getName("raw"),E=new rz(l,b,"raw",g);if(h[b]=E,l=E,vV(e)){var C=gW.makeFromEncoding(l,e);C&&(l=C,Fz(e)&&(l=new bW(l))),l=null!==(s=xV.makeFromEncoding(l,e))&&void 0!==s?s:l,l=null!==(u=CW.makeFromEncoding(l,e))&&void 0!==u?u:l}vV(e)&&(l=null!==(A=BV.make(l,e))&&void 0!==A?A:l);var B=e.getName(cJ),w=new rz(l,B,cJ,g);h[B]=w,l=w,vV(e)&&function(e,t){jz(e,(function(n){var r=n.name,i=e.getName("lookup_".concat(r));e.component.data.outputNodes[i]=n.materialized=new rz(new Lz(t,e,{selection:r}),i,"lookup",e.component.data.outputNodeRefCounts)}))}(e,w);var k=null;if(yV(e)){var _=e.getName("facet");l=null!==(c=function(e,t){var n=t.row,r=t.column;if(n&&r){for(var i=null,a=0,o=[n,r];a<o.length;a++){var s=o[a];if(oq(s.sort)){var u=s.sort,A=u.field,c=u.op;e=i=new EW(e,{joinaggregate:[{op:void 0===c?"min":c,field:A,as:YV(s,s.sort,{forAs:!0})}],groupby:[Oq(s)]})}}return i}return null}(l,e.facet))&&void 0!==c?c:l,k=new dW(l,e,_,w.getSource()),h[_]=k}return Object.assign(Object.assign({},e.component.data),{outputNodes:h,outputNodeRefCounts:g,raw:E,main:w,facetRoot:k,ancestorParse:d})}var VV=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r,i,a){var o,s,u,A,c;return Object(_.a)(this,n),o=t.call(this,e,"concat",r,i,a,e.resolve),"shared"!==(null===(u=null===(s=e.resolve)||void 0===s?void 0:s.axis)||void 0===u?void 0:u.x)&&"shared"!==(null===(c=null===(A=e.resolve)||void 0===A?void 0:A.axis)||void 0===c?void 0:c.y)||uU(v.CONCAT_CANNOT_SHARE_AXIS),o.children=o.getChildren(e).map((function(e,t){return mX(e,Object(F.a)(o),o.getName("concat_"+t),void 0,a)})),o}return Object(x.a)(n,[{key:"parseData",value:function(){this.component.data=WV(this);var e,t=Object(D.a)(this.children);try{for(t.s();!(e=t.n()).done;){e.value.parseData()}}catch(n){t.e(n)}finally{t.f()}}},{key:"parseSelections",value:function(){this.component.selection={};var e,t=Object(D.a)(this.children);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.parseSelections();var r,i=Object(D.a)(OF(n.component.selection));try{for(i.s();!(r=i.n()).done;){var a=r.value;this.component.selection[a]=n.component.selection[a]}}catch(o){i.e(o)}finally{i.f()}}}catch(o){t.e(o)}finally{t.f()}}},{key:"parseMarkGroup",value:function(){var e,t=Object(D.a)(this.children);try{for(t.s();!(e=t.n()).done;){e.value.parseMarkGroup()}}catch(n){t.e(n)}finally{t.f()}}},{key:"parseAxesAndHeaders",value:function(){var e,t=Object(D.a)(this.children);try{for(t.s();!(e=t.n()).done;){e.value.parseAxesAndHeaders()}}catch(n){t.e(n)}finally{t.f()}}},{key:"getChildren",value:function(e){return VH(e)?e.vconcat:XH(e)?e.hconcat:e.concat}},{key:"parseLayoutSize",value:function(){UV(this)}},{key:"parseAxisGroup",value:function(){return null}},{key:"assembleSelectionTopLevelSignals",value:function(e){return this.children.reduce((function(e,t){return t.assembleSelectionTopLevelSignals(e)}),e)}},{key:"assembleSignals",value:function(){return this.children.forEach((function(e){return e.assembleSignals()})),[]}},{key:"assembleLayoutSignals",value:function(){var e,t=CK(this),n=Object(D.a)(this.children);try{for(n.s();!(e=n.n()).done;){var r=e.value;t.push.apply(t,Object(im.a)(r.assembleLayoutSignals()))}}catch(i){n.e(i)}finally{n.f()}return t}},{key:"assembleSelectionData",value:function(e){return this.children.reduce((function(e,t){return t.assembleSelectionData(e)}),e)}},{key:"assembleMarks",value:function(){return this.children.map((function(e){var t=e.assembleTitle(),n=e.assembleGroupStyle(),r=e.assembleGroupEncodeEntry(!1);return Object.assign(Object.assign(Object.assign(Object.assign({type:"group",name:e.getName("group")},t?{title:t}:{}),n?{style:n}:{}),r?{encode:{update:r}}:{}),e.assembleGroup())}))}},{key:"assembleDefaultLayout",value:function(){var e=this.layout.columns;return Object.assign(Object.assign({},null!=e?{columns:e}:{}),{bounds:"full",align:"each"})}}]),n}(bV);var XV=Object.assign(Object.assign({disable:1,gridScale:1,scale:1},nT),{labelExpr:1,encode:1}),ZV=OF(XV),$V=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(_.a)(this,n),(e=t.call(this)).explicit=r,e.implicit=i,e.mainExtracted=a,e}return Object(x.a)(n,[{key:"clone",value:function(){return new n(pF(this.explicit),pF(this.implicit),this.mainExtracted)}},{key:"hasAxisPart",value:function(e){return"axis"===e||("grid"===e||"title"===e?!!this.get(e):!(!1===(t=this.get(e))||null===t));var t}},{key:"hasOrientSignalRef",value:function(){return _U(this.explicit.orient)}}]),n}(VY);var eX={bottom:"top",top:"bottom",left:"right",right:"left"};function tX(e,t){if(!e)return t.map((function(e){return e.clone()}));if(e.length===t.length){for(var n=e.length,r=0;r<n;r++){var i=e[r],a=t[r];if(!!i!==!!a)return;if(i&&a){var o=i.getWithExplicit("orient"),s=a.getWithExplicit("orient");if(o.explicit&&s.explicit&&o.value!==s.value)return;e[r]=nX(i,a)}}return e}}function nX(e,t){var n,r=Object(D.a)(ZV);try{var i=function(){var r=n.value,i=tJ(e.getWithExplicit(r),t.getWithExplicit(r),r,"axis",(function(e,t){switch(r){case"title":return hH(e,t);case"gridScale":return{explicit:e.explicit,value:JF(e.value,t.value)}}return eJ(e,t,r,"axis")}));e.setWithExplicit(r,i)};for(r.s();!(n=r.n()).done;)i()}catch(a){r.e(a)}finally{r.f()}return e}function rX(e,t,n,r,i){if("disable"===t)return void 0!==n;switch(n=n||{},t){case"titleAngle":case"labelAngle":return e===(_U(n.labelAngle)?n.labelAngle:VF(n.labelAngle));case"values":return!!n.values;case"encode":return!!n.encoding||!!n.labelAngle;case"title":if(e===aK(r,i))return!0}return e===n[t]}var iX=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function aX(e,t){var n,r,i,a=t.axis(e),o=new $V,s=Hq(t.encoding[e]),u=t.mark,A=t.config,c=(null===a||void 0===a?void 0:a.orient)||(null===(n=A["x"===e?"axisX":"axisY"])||void 0===n?void 0:n.orient)||(null===(r=A.axis)||void 0===r?void 0:r.orient)||function(e){return"x"===e?"bottom":"left"}(e),l=t.getScaleComponent(e).get("type"),f=Zz(e,l,c,t.config),h=void 0!==a?!a:eK("disable",A,null===a||void 0===a?void 0:a.style,f).configValue;if(o.set("disable",h,void 0!==a),h)return o;var g,d=function(e,t,n,r,i){var a=null===t||void 0===t?void 0:t.labelAngle;if(void 0!==a)return _U(a)?a:VF(a);var o=eK("labelAngle",e.config,null===t||void 0===t?void 0:t.style,i).configValue;return void 0!==o?VF(o):"x"===n&&EF([ZU,VU],r.type)?270:void 0}(t,a=a||{},e,s,f),p={fieldOrDatumDef:s,axis:a,channel:e,model:t,scaleType:l,orient:c,labelAngle:d,mark:u,config:A},v=Object(D.a)(ZV);try{for(v.s();!(g=v.n()).done;){var y=g.value,m=y in tK?tK[y](p):iT(y)?a[y]:void 0,I=void 0!==m,b=rX(m,y,a,t,e);if(I&&b)o.set(y,m,b);else{var E=iT(y)&&"values"!==y?eK(y,t.config,a.style,f):{},C=E.configValue,B=void 0===C?void 0:C,w=E.configFrom,Q=void 0===w?void 0:w,k=void 0!==B;I&&!k?o.set(y,m,b):("vgAxisConfig"!==Q||iX.has(y)&&k||$F(B)||_U(B))&&o.set(y,B,!1)}}}catch(S){v.e(S)}finally{v.f()}var _=null!==(i=a.encoding)&&void 0!==i?i:{},x=eT.reduce((function(n,r){var i;if(!o.hasAxisPart(r))return n;var a=_K(null!==(i=_[r])&&void 0!==i?i:{},t),s="labels"===r?function(e,t,n){var r,i=e.encoding,a=e.config,o=null!==(r=Hq(i[t]))&&void 0!==r?r:Hq(i[hL(t)]),s=e.axis(t)||{},u=s.format,A=s.formatType;return JG(A)?Object.assign({text:VG({fieldOrDatumDef:o,field:"datum.value",format:u,formatType:A,config:a})},n):n}(t,e,a):a;return void 0===s||SF(s)||(n[r]={update:s}),n}),{});return SF(x)||o.set("encode",x,!!a.encoding||void 0!==a.labelAngle),o}function oX(e){var t,n=e.encoding,r=e.size,i=Object(D.a)(yL);try{for(i.s();!(t=i.n()).done;){var a=t.value,o=gL(a);ZH(r[o])&&bq(n[a])&&(delete r[o],uU(v.stepDropped(o)))}}catch(s){i.e(s)}finally{i.f()}return r}function sX(e,t,n,r){var i=r.graticule,a=CT(e)?Object.assign({},e):{type:e},o=oH("orient",a,n);if(a.orient=function(e,t,n){switch(e){case lT:case vT:case yT:case gT:case fT:case AT:return}var r=t.x,i=t.y,a=t.x2,o=t.y2;switch(e){case uT:if(yq(r)&&(jL(r.bin)||yq(i)&&i.aggregate&&!r.aggregate))return"vertical";if(yq(i)&&(jL(i.bin)||yq(r)&&r.aggregate&&!i.aggregate))return"horizontal";if(o||a){if(n)return n;if(!a&&(yq(r)&&r.type===WU&&!RL(r.bin)||Eq(r)))return"horizontal";if(!o&&(yq(i)&&i.type===WU&&!RL(i.bin)||Eq(i)))return"vertical"}case hT:if(a&&(!yq(r)||!jL(r.bin))&&o&&(!yq(i)||!jL(i.bin)))return;case sT:if(o)return yq(i)&&jL(i.bin)?"horizontal":"vertical";if(a)return yq(r)&&jL(r.bin)?"vertical":"horizontal";if(e===hT){if(r&&!i)return"vertical";if(i&&!r)return"horizontal"}case cT:case dT:var s=bq(r),u=bq(i);if(s&&!u)return"tick"!==e?"horizontal":"vertical";if(!s&&u)return"tick"!==e?"vertical":"horizontal";if(s&&u){var A=r,c=i,l=A.type===XU,f=c.type===XU;return l&&!f?"tick"!==e?"vertical":"horizontal":!l&&f?"tick"!==e?"horizontal":"vertical":!A.aggregate&&c.aggregate?"tick"!==e?"vertical":"horizontal":A.aggregate&&!c.aggregate?"tick"!==e?"horizontal":"vertical":n||"vertical"}return n||void 0}return"vertical"}(a.type,t,o),void 0!==o&&o!==a.orient&&uU(v.orientOverridden(a.orient,o)),"bar"===a.type&&a.orient){var s=oH("cornerRadiusEnd",a,n);if(void 0!==s){var u,A="horizontal"===a.orient&&t.x2||"vertical"===a.orient&&t.y2?["cornerRadius"]:QT[a.orient],c=Object(D.a)(A);try{for(c.s();!(u=c.n()).done;){a[u.value]=s}}catch(l){c.e(l)}finally{c.f()}void 0!==a.cornerRadiusEnd&&delete a.cornerRadiusEnd}}return void 0===oH("opacity",a,n)&&(a.opacity=function(e,t){if(EF([lT,dT,vT,yT],e)&&!dH(t))return.7;return}(a.type,t)),void 0===a.filled&&(a.filled=!i&&function(e,t){var n=sH("filled",e,t),r=e.type;return JF(n,r!==lT&&r!==cT&&r!==hT)}(a,n)),void 0===oH("cursor",a,n)&&(a.cursor=function(e,t,n){if(t.href||e.href||oH("href",e,n))return"pointer";return e.cursor}(a,t,n)),a}function uX(e,t){e.config;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},XJ(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"})),LJ("x",e,{defaultPos:"mid"})),LJ("y",e,{defaultPos:"mid"})),NJ("size",e)),NJ("angle",e)),function(e,t,n){if(n)return{shape:{value:n}};return NJ("shape",e)}(e,0,t))}function AX(e){var t,n=e.config,r=e.markDef,i=r.orient,a="horizontal"===i?"width":"height",o=e.getScaleComponent("horizontal"===i?"x":"y"),s=null!==(t=oH("size",r,n,{vgChannel:a}))&&void 0!==t?t:n.tick.bandSize;if(void 0!==s)return s;var u=o?o.get("range"):void 0;return u&&xU(u)&&Object(R.E)(u.step)?3*u.step/4:3*nY(n.view,a)/4}var cX={arc:{vgMark:"arc",encodeEntry:function(e){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},XJ(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),LJ("x",e,{defaultPos:"mid"})),LJ("y",e,{defaultPos:"mid"})),zJ(e,"radius","arc")),zJ(e,"theta","arc"))}},area:{vgMark:"area",encodeEntry:function(e){return Object.assign(Object.assign(Object.assign(Object.assign({},XJ(e,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"})),HJ("x",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"horizontal"===e.markDef.orient})),HJ("y",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"vertical"===e.markDef.orient})),$J(e))}},bar:{vgMark:"rect",encodeEntry:function(e){return Object.assign(Object.assign(Object.assign({},XJ(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),zJ(e,"x","bar")),zJ(e,"y","bar"))}},circle:{vgMark:"symbol",encodeEntry:function(e){return uX(e,"circle")}},geoshape:{vgMark:"shape",encodeEntry:function(e){return Object.assign({},XJ(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}))},postEncodingTransform:function(e){var t=e.encoding.shape;return[Object.assign({type:"geoshape",projection:e.projectionName()},t&&yq(t)&&t.type===$U?{field:Oq(t,{expr:"datum"})}:{})]}},image:{vgMark:"image",encodeEntry:function(e){return Object.assign(Object.assign(Object.assign(Object.assign({},XJ(e,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"})),zJ(e,"x","image")),zJ(e,"y","image")),SJ(e,"url"))}},line:{vgMark:"line",encodeEntry:function(e){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},XJ(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),LJ("x",e,{defaultPos:"mid"})),LJ("y",e,{defaultPos:"mid"})),NJ("size",e,{vgChannel:"strokeWidth"})),$J(e))}},point:{vgMark:"symbol",encodeEntry:function(e){return uX(e)}},rect:{vgMark:"rect",encodeEntry:function(e){return Object.assign(Object.assign(Object.assign({},XJ(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),zJ(e,"x","rect")),zJ(e,"y","rect"))}},rule:{vgMark:"rule",encodeEntry:function(e){var t=e.markDef.orient;return e.encoding.x||e.encoding.y||e.encoding.latitude||e.encoding.longitude?Object.assign(Object.assign(Object.assign(Object.assign({},XJ(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),HJ("x",e,{defaultPos:"horizontal"===t?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"vertical"!==t})),HJ("y",e,{defaultPos:"vertical"===t?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"horizontal"!==t})),NJ("size",e,{vgChannel:"strokeWidth"})):{}}},square:{vgMark:"symbol",encodeEntry:function(e){return uX(e,"square")}},text:{vgMark:"text",encodeEntry:function(e){var t=e.config;e.encoding;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},XJ(e,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"})),LJ("x",e,{defaultPos:"mid"})),LJ("y",e,{defaultPos:"mid"})),SJ(e)),NJ("size",e,{vgChannel:"fontSize"})),NJ("angle",e)),ez("align",function(e,t,n){if(void 0===oH("align",e,n))return"center";return}(e.markDef,0,t))),ez("baseline",function(e,t,n){if(void 0===oH("baseline",e,n))return"middle";return}(e.markDef,0,t))),LJ("radius",e,{defaultPos:null,isMidPoint:!0})),LJ("theta",e,{defaultPos:null,isMidPoint:!0}))}},tick:{vgMark:"rect",encodeEntry:function(e){var t=e.config,n=e.markDef,r=n.orient,i="horizontal"===r?"width":"height",a="horizontal"===r?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},XJ(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),LJ("x",e,{defaultPos:"mid",vgChannel:"xc"})),LJ("y",e,{defaultPos:"mid",vgChannel:"yc"})),NJ("size",e,{defaultValue:AX(e),vgChannel:i})),Object(Q.a)({},a,nH(oH("thickness",n,t))))}},trail:{vgMark:"trail",encodeEntry:function(e){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},XJ(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"})),LJ("x",e,{defaultPos:"mid"})),LJ("y",e,{defaultPos:"mid"})),NJ("size",e)),$J(e))}}};function lX(e){return EF([cT,sT,pT],e.mark)?function(e){var t=bH(e.mark,e.encoding),n=hX(e,{fromPrefix:t.length>0?"faceted_path_":""});return t.length>0?[{name:e.getName("pathgroup"),type:"group",from:{facet:{name:"faceted_path_"+e.requestDataName(cJ),data:e.requestDataName(cJ),groupby:t}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:n}]:n}(e):EF([uT],e.mark)?function(e){var t=RU.some((function(t){return oH(t,e.markDef,e.config)}));if(e.stack&&!e.fieldDef("size")&&t){var n,r,i=hX(e,{fromPrefix:"stack_group_"}),a=Object(ks.a)(i,1)[0],o=e.scaleName(e.stack.fieldChannel),s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.vgField(e.stack.fieldChannel,t)},u=function(e,t){var n=[s({prefix:"min",suffix:"start",expr:t}),s({prefix:"max",suffix:"start",expr:t}),s({prefix:"min",suffix:"end",expr:t}),s({prefix:"max",suffix:"end",expr:t})];return"".concat(e,"(").concat(n.map((function(e){return"scale('".concat(o,"',").concat(e,")")})).join(","),")")};"x"===e.stack.fieldChannel?(n=Object.assign(Object.assign({},vF(a.encode.update,["y","yc","y2","height"].concat(Object(im.a)(RU)))),{x:{signal:u("min","datum")},x2:{signal:u("max","datum")},clip:{value:!0}}),r={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},a.encode.update=Object.assign(Object.assign({},yF(a.encode.update,["y","yc","y2"])),{height:{field:{group:"height"}}})):(n=Object.assign(Object.assign({},vF(a.encode.update,["x","xc","x2","width"])),{y:{signal:u("min","datum")},y2:{signal:u("max","datum")},clip:{value:!0}}),r={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},a.encode.update=Object.assign(Object.assign({},yF(a.encode.update,["x","xc","x2"])),{width:{field:{group:"width"}}}));var A,c=Object(D.a)(RU);try{for(c.s();!(A=c.n()).done;){var l=A.value,f=sH(l,e.markDef,e.config);a.encode.update[l]?(n[l]=a.encode.update[l],delete a.encode.update[l]):f&&(n[l]=nH(f)),f&&(a.encode.update[l]={value:0})}}catch(d){c.e(d)}finally{c.f()}var h=e.fieldDef(e.stack.groupbyChannel),g=Oq(h)?[Oq(h)]:[];((null===h||void 0===h?void 0:h.bin)||(null===h||void 0===h?void 0:h.timeUnit))&&g.push(Oq(h,{binSuffix:"end"}));return(n=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce((function(t,n){if(a.encode.update[n])return Object.assign(Object.assign({},t),Object(Q.a)({},n,a.encode.update[n]));var r=sH(n,e.markDef,e.config);return void 0!==r?Object.assign(Object.assign({},t),Object(Q.a)({},n,nH(r))):t}),n)).stroke&&(n.strokeForeground={value:!0},n.strokeOffset={value:0}),[{type:"group",from:{facet:{data:e.requestDataName(cJ),name:"stack_group_"+e.requestDataName(cJ),groupby:g,aggregate:{fields:[s({suffix:"start"}),s({suffix:"start"}),s({suffix:"end"}),s({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:n},marks:[{type:"group",encode:{update:r},marks:[a]}]}]}return hX(e)}(e):hX(e)}function fX(e){var t=e.encoding,n=e.stack,r=e.mark,i=e.markDef,a=e.config,o=t.order;if(!(!Object(R.A)(o)&&wq(o)&&bF(o.value)||!o&&bF(oH("order",i,a)))){if((Object(R.A)(o)||yq(o))&&!n)return cH(o,{expr:"datum"});if(IT(r)){var s="horizontal"===i.orient?"y":"x",u=t[s];if(yq(u)){var A=u.sort;return Object(R.A)(A)?{field:Oq(u,{prefix:s,suffix:"sort_index",expr:"datum"})}:oq(A)?{field:Oq({aggregate:dH(e.encoding)?A.op:void 0,field:A.field},{expr:"datum"})}:aq(A)?{field:Oq(e.fieldDef(A.encoding),{expr:"datum"}),order:A.order}:null===A?void 0:{field:Oq(u,{binSuffix:e.stack&&e.stack.impute?"mid":void 0,expr:"datum"})}}}else;}}function hX(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fromPrefix:""},n=e.mark,r=e.markDef,i=e.config,a=JF(r.clip,gX(e),dX(e)),o=aH(r),s=e.encoding.key,u=fX(e),A=pX(e),c=oH("aria",r,i),l=cX[n].postEncodingTransform?cX[n].postEncodingTransform(e):null;return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:e.getName("marks"),type:cX[n].vgMark},a?{clip:!0}:{}),o?{style:o}:{}),s?{key:s.field}:{}),u?{sort:u}:{}),A||{}),!1===c?{aria:c}:{}),{from:{data:t.fromPrefix+e.requestDataName(cJ)},encode:{update:cX[n].encodeEntry(e)}}),l?{transform:l}:{})]}function gX(e){var t=e.getScaleComponent("x"),n=e.getScaleComponent("y");return!!(t&&t.get("selectionExtent")||n&&n.get("selectionExtent"))||void 0}function dX(e){var t=e.component.projection;return!(!t||t.isFit)||void 0}function pX(e){if(!e.component.selection)return null;for(var t=OF(e.component.selection).length,n=t,r=e.parent;r&&0===n;)n=OF(r.component.selection).length,r=r.parent;return n?{interactive:t>0}:null}var vX=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r,i){var a,o,s,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},A=arguments.length>4?arguments[4]:void 0;Object(_.a)(this,n),(a=t.call(this,e,"unit",r,i,A,void 0,$H(e)?e.view:void 0)).specifiedScales={},a.specifiedAxes={},a.specifiedLegends={},a.specifiedProjection={},a.selection={},a.children=[];var c=CT(e.mark)?e.mark.type:e.mark;a.markDef=sX(e.mark,null!==(o=e.encoding)&&void 0!==o?o:{},A,{graticule:e.data&&AJ(e.data)});var l=a.encoding=vH(null!==(s=e.encoding)&&void 0!==s?s:{},a.markDef,A);return a.size=oX({encoding:l,size:$H(e)?Object.assign(Object.assign(Object.assign({},u),e.width?{width:e.width}:{}),e.height?{height:e.height}:{}):u}),a.stack=_Y(c,l),a.specifiedScales=a.initScales(c,l),a.specifiedAxes=a.initAxes(l),a.specifiedLegends=a.initLegend(l),a.specifiedProjection=e.projection,a.selection=e.selection,a}return Object(x.a)(n,[{key:"scaleDomain",value:function(e){var t=this.specifiedScales[e];return t?t.domain:void 0}},{key:"axis",value:function(e){return this.specifiedAxes[e]}},{key:"legend",value:function(e){return this.specifiedLegends[e]}},{key:"initScales",value:function(e,t){return QL.reduce((function(e,n){var r,i=Hq(t[n]);return i&&(e[n]=null!==(r=i.scale)&&void 0!==r?r:{}),e}),{})}},{key:"initAxes",value:function(e){return yL.reduce((function(t,n){var r=e[n];if(Cq(r)||"x"===n&&Cq(e.x2)||"y"===n&&Cq(e.y2)){var i=Cq(r)?r.axis:void 0;t[n]=i?Object.assign({},i):i}return t}),{})}},{key:"initLegend",value:function(e){return BL.reduce((function(t,n){var r=Hq(e[n]);if(r&&function(e){switch(e){case YT:case JT:case zT:case WT:case KT:case"opacity":case"strokeWidth":case"strokeDash":return!0;case"fillOpacity":case"strokeOpacity":case"angle":return!1}}(n)){var i=r.legend;t[n]=i?Object.assign({},i):i}return t}),{})}},{key:"parseData",value:function(){this.component.data=WV(this)}},{key:"parseLayoutSize",value:function(){!function(e){var t,n=e.size,r=e.component,i=Object(D.a)(yL);try{for(i.s();!(t=i.n()).done;){var a=gL(t.value);if(n[a]){var o=n[a];r.layoutSize.set(a,ZH(o)?"step":o,!0)}else{var s=HV(e,a);r.layoutSize.set(a,s,!1)}}}catch(u){i.e(u)}finally{i.f()}}(this)}},{key:"parseSelections",value:function(){this.component.selection=function(e,t){var n,r,i={},a=e.config.selection,o=Object(D.a)(OF(null!==t&&void 0!==t?t:{}));try{var s=function(){var o=r.value,s=pF(t[o]),u=a[s.type],A=(u.fields,u.encodings,iF(u,["fields","encodings"]));for(var c in A)"encodings"===c&&s.fields||"fields"===c&&s.encodings||("mark"===c&&(s[c]=Object.assign(Object.assign({},A[c]),s[c])),void 0!==s[c]&&!0!==s[c]||(s[c]=null!==(n=A[c])&&void 0!==n?n:s[c]));var l=MF(o),f=i[l]=Object.assign(Object.assign({},s),{name:l,events:Object(R.H)(s.on)?Ej(s.on,"scope"):pF(s.on)});mz(f,(function(n){n.has(f)&&n.parse&&n.parse(e,f,s,t[o])}))};for(o.s();!(r=o.n()).done;)s()}catch(u){o.e(u)}finally{o.f()}return i}(this,this.selection)}},{key:"parseMarkGroup",value:function(){this.component.mark=lX(this)}},{key:"parseAxesAndHeaders",value:function(){var e;this.component.axes=(e=this,yL.reduce((function(t,n){return e.component.scales[n]&&(t[n]=[aX(n,e)]),t}),{}))}},{key:"assembleSelectionTopLevelSignals",value:function(e){return function(e,t){var n=!1;return jz(e,(function(r,i){var a=r.name,o=Object(R.Z)(a+xz);if(0===t.filter((function(e){return e.name===a})).length){var s="global"===r.resolve?"union":r.resolve,u="multi"===r.type?", true)":")";t.push({name:r.name,update:"".concat(Dz,"(").concat(o,", ").concat(Object(R.Z)(s)).concat(u)})}n=!0,i.topLevelSignals&&(t=i.topLevelSignals(e,r,t)),mz(r,(function(n){n.topLevelSignals&&(t=n.topLevelSignals(e,r,t))}))})),n&&0===t.filter((function(e){return"unit"===e.name})).length&&t.unshift({name:"unit",value:{},on:[{events:"mousemove",update:"isTuple(group()) ? group() : unit"}]}),Ez(t)}(this,e)}},{key:"assembleSignals",value:function(){return[].concat(Object(im.a)(Jz(this)),Object(im.a)((t=[],jz(e=this,(function(n,r){var i,a=n.name,o=r.modifyExpr(e,n);(i=t).push.apply(i,Object(im.a)(r.signals(e,n))),mz(n,(function(r){r.signals&&(t=r.signals(e,n,t)),r.modifyExpr&&(o=r.modifyExpr(e,n,o))})),t.push({name:a+Oz,on:[{events:{signal:n.name+Sz},update:"modify(".concat(Object(R.Z)(n.name+xz),", ").concat(o,")")}]})})),Ez(t))));var e,t}},{key:"assembleSelectionData",value:function(e){return function(e,t){var n=Object(im.a)(t);return jz(e,(function(t){var r={name:t.name+xz};if(t.init){var i=t.project.items.map((function(e){e.signals;return iF(e,["signals"])})),a=t.init.map((function(e){return Iz(e,!1)}));r.values="interval"===t.type?[{unit:Nz(e,{escape:!1}),fields:i,values:a}]:a.map((function(t){return{unit:Nz(e,{escape:!1}),fields:i,values:t}}))}n.filter((function(e){return e.name===t.name+xz})).length||n.push(r)})),n}(this,e)}},{key:"assembleLayout",value:function(){return null}},{key:"assembleLayoutSignals",value:function(){return CK(this)}},{key:"assembleMarks",value:function(){var e,t=null!==(e=this.component.mark)&&void 0!==e?e:[];return this.parent&&IV(this.parent)||(t=bz(this,t)),t.map(this.correctDataNames)}},{key:"getMapping",value:function(){return this.encoding}},{key:"channelHasField",value:function(e){return gH(this.encoding,e)}},{key:"fieldDef",value:function(e){return qq(this.encoding[e])}},{key:"typedFieldDef",value:function(e){var t=this.fieldDef(e);return Bq(t)?t:null}},{key:"hasProjection",get:function(){var e=this.encoding,t=this.mark===mT,n=e&&$T.some((function(t){return Cq(e[t])}));return t||n}},{key:"mark",get:function(){return this.markDef.type}}]),n}(EV),yX=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(e,r,i,a,o){var s;Object(_.a)(this,n),s=t.call(this,e,"layer",r,i,o,e.resolve,e.view);var u=Object.assign(Object.assign(Object.assign({},a),e.width?{width:e.width}:{}),e.height?{height:e.height}:{});return s.children=e.layer.map((function(e,t){if(yY(e))return new n(e,Object(F.a)(s),s.getName("layer_"+t),u,o);if(xT(e))return new vX(e,Object(F.a)(s),s.getName("layer_"+t),u,o);throw new Error(v.invalidSpec(e))})),s}return Object(x.a)(n,[{key:"parseData",value:function(){this.component.data=WV(this);var e,t=Object(D.a)(this.children);try{for(t.s();!(e=t.n()).done;){e.value.parseData()}}catch(n){t.e(n)}finally{t.f()}}},{key:"parseLayoutSize",value:function(){var e;GV(e=this),qV(e,"width"),qV(e,"height")}},{key:"parseSelections",value:function(){this.component.selection={};var e,t=Object(D.a)(this.children);try{for(t.s();!(e=t.n()).done;){var n=e.value;n.parseSelections();var r,i=Object(D.a)(OF(n.component.selection));try{for(i.s();!(r=i.n()).done;){var a=r.value;this.component.selection[a]=n.component.selection[a]}}catch(o){i.e(o)}finally{i.f()}}}catch(o){t.e(o)}finally{t.f()}}},{key:"parseMarkGroup",value:function(){var e,t=Object(D.a)(this.children);try{for(t.s();!(e=t.n()).done;){e.value.parseMarkGroup()}}catch(n){t.e(n)}finally{t.f()}}},{key:"parseAxesAndHeaders",value:function(){!function(e){var t,n,r=e.component,i=r.axes,a=r.resolve,o={top:0,bottom:0,right:0,left:0},s=Object(D.a)(e.children);try{for(s.s();!(n=s.n()).done;){var u=n.value;u.parseAxesAndHeaders();var A,c=Object(D.a)(OF(u.component.axes));try{for(c.s();!(A=c.n()).done;){var l=A.value;a.axis[l]=SK(e.component.resolve,l),"shared"===a.axis[l]&&(i[l]=tX(i[l],u.component.axes[l]),i[l]||(a.axis[l]="independent",delete i[l]))}}catch(_){c.e(_)}finally{c.f()}}}catch(_){s.e(_)}finally{s.f()}var f,h=Object(D.a)(yL);try{for(h.s();!(f=h.n()).done;){var g,d=f.value,p=Object(D.a)(e.children);try{for(p.s();!(g=p.n()).done;){var v=g.value;if(v.component.axes[d]){if("independent"===a.axis[d]){i[d]=(null!==(t=i[d])&&void 0!==t?t:[]).concat(v.component.axes[d]);var y,m=Object(D.a)(v.component.axes[d]);try{for(m.s();!(y=m.n()).done;){var I=y.value,b=I.getWithExplicit("orient"),E=b.value,C=b.explicit;if(!_U(E)){if(o[E]>0&&!C){var B=eX[E];o[E]>o[B]&&I.set("orient",B,!1)}o[E]++}}}catch(_){m.e(_)}finally{m.f()}}delete v.component.axes[d]}}}catch(_){p.e(_)}finally{p.f()}if("independent"===a.axis[d]&&i[d]&&i[d].length>1){var w,Q=Object(D.a)(i[d]);try{for(Q.s();!(w=Q.n()).done;){var k=w.value;k.get("grid")&&!k.explicit.grid&&(k.implicit.grid=!1)}}catch(_){Q.e(_)}finally{Q.f()}}}}catch(_){h.e(_)}finally{h.f()}}(this)}},{key:"assembleSelectionTopLevelSignals",value:function(e){return this.children.reduce((function(e,t){return t.assembleSelectionTopLevelSignals(e)}),e)}},{key:"assembleSignals",value:function(){return this.children.reduce((function(e,t){return e.concat(t.assembleSignals())}),Jz(this))}},{key:"assembleLayoutSignals",value:function(){return this.children.reduce((function(e,t){return e.concat(t.assembleLayoutSignals())}),CK(this))}},{key:"assembleSelectionData",value:function(e){return this.children.reduce((function(e,t){return t.assembleSelectionData(e)}),e)}},{key:"assembleTitle",value:function(){var e=Object(IY.a)(Object(mY.a)(n.prototype),"assembleTitle",this).call(this);if(e)return e;var t,r=Object(D.a)(this.children);try{for(r.s();!(t=r.n()).done;){if(e=t.value.assembleTitle())return e}}catch(i){r.e(i)}finally{r.f()}}},{key:"assembleLayout",value:function(){return null}},{key:"assembleMarks",value:function(){return function(e,t){var n,r=Object(D.a)(e.children);try{for(r.s();!(n=r.n()).done;){var i=n.value;vV(i)&&(t=bz(i,t))}}catch(a){r.e(a)}finally{r.f()}return t}(this,this.children.flatMap((function(e){return e.assembleMarks()})))}},{key:"assembleLegends",value:function(){return this.children.reduce((function(e,t){return e.concat(t.assembleLegends())}),KK(this))}}]),n}(bV);function mX(e,t,n,r,i){if(cq(e))return new JV(e,t,n,i);if(yY(e))return new yX(e,t,n,r,i);if(xT(e))return new vX(e,t,n,r,i);if(function(e){return VH(e)||XH(e)||WH(e)}(e))return new VV(e,t,n,i);throw new Error(v.invalidSpec(e))}function IX(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.logger&&oU(t.logger),t.fieldTitle&&Fq(t.fieldTitle);try{var n=fY(Object(R.N)(t.config,e.config)),r=YY(e,n),i=mX(r,null,"",void 0,n);i.parse(),GW(i.component.data,i);var a=EX(i,bX(e,r.autosize,n,i),e.datasets,e.usermeta);return{spec:a,normalized:r}}finally{t.logger&&sU(),t.fieldTitle&&Tq()}}function bX(e,t,n,r){var i,a=r.component.layoutSize.get("width"),o=r.component.layoutSize.get("height");if(void 0===t?(t={type:"pad"},r.hasAxisOrientSignalRef()&&(t.resize=!0)):Object(R.H)(t)&&(t={type:t}),a&&o&&("fit"===(i=t.type)||"fit-x"===i||"fit-y"===i))if("step"===a&&"step"===o)uU(v.droppingFit()),t.type="pad";else if("step"===a||"step"===o){var s="step"===a?"width":"height";uU(v.droppingFit(EL(s)));var u="width"===s?"height":"width";t.type=function(e){return e?"fit-".concat(EL(e)):"fit"}(u)}return Object.assign(Object.assign(Object.assign({},1===OF(t).length&&t.type?"pad"===t.type?{}:{autosize:t.type}:{autosize:t}),WY(n)),WY(e))}function EX(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,i=e.config?pY(e.config):void 0,a=[].concat(e.assembleSelectionData([]),FV(e.component.data,n)),o=e.assembleProjections(),s=e.assembleTitle(),u=e.assembleGroupStyle(),A=e.assembleGroupEncodeEntry(!0),c=e.assembleLayoutSignals();return c=c.filter((function(e){return"width"!==e.name&&"height"!==e.name||void 0===e.value||(t[e.name]=+e.value,!1)})),Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({$schema:"https://vega.github.io/schema/vega/v5.json"},e.description?{description:e.description}:{}),t),s?{title:s}:{}),u?{style:u}:{}),A?{encode:{update:A}}:{}),{data:a}),o.length>0?{projections:o}:{}),e.assembleGroup([].concat(Object(im.a)(c),Object(im.a)(e.assembleSelectionTopLevelSignals([]))))),i?{config:i}:{}),r?{usermeta:r}:{})}var CX=new(function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){return Object(_.a)(this,n),t.apply(this,arguments)}return Object(x.a)(n,[{key:"mapUnit",value:function(e,t){var n=t.config;if(e.encoding){var r=e.encoding,i=e.transform,a=pH(r,n),o=a.bins,s=a.timeUnits,u=a.aggregate,A=a.groupby,c=a.encoding,l=[].concat(Object(im.a)(i||[]),Object(im.a)(o),Object(im.a)(s),Object(im.a)(0===u.length?[]:[{aggregate:u,groupby:A}]));return Object.assign(Object.assign(Object.assign({},e),l.length>0?{transform:l}:{}),{encoding:c})}return e}}]),n}(bY));function BX(e,t){return CX.map(e,{config:t})}var wX,QX=rF.version,kX=n(906),_X=n.n(kX),xX=n(1074),SX={background:"#333",title:{color:"#fff"},style:{"guide-label":{fill:"#fff"},"guide-title":{fill:"#fff"}},axis:{domainColor:"#fff",gridColor:"#888",tickColor:"#fff"}},OX={background:"#fff",arc:{fill:"#4572a7"},area:{fill:"#4572a7"},line:{stroke:"#4572a7",strokeWidth:2},path:{stroke:"#4572a7"},rect:{fill:"#4572a7"},shape:{stroke:"#4572a7"},symbol:{fill:"#4572a7",strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},DX={arc:{fill:"#30a2da"},area:{fill:"#30a2da"},axis:{domainColor:"#cbcbcb",grid:!0,gridColor:"#cbcbcb",gridWidth:1,labelColor:"#999",labelFontSize:10,titleColor:"#333",tickColor:"#cbcbcb",tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:"#f0f0f0",group:{fill:"#f0f0f0"},legend:{labelColor:"#333",labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:"#333",titleFontSize:14,titlePadding:10},line:{stroke:"#30a2da",strokeWidth:2},path:{stroke:"#30a2da",strokeWidth:.5},rect:{fill:"#30a2da"},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:"#30a2da"},bar:{binSpacing:2,fill:"#30a2da",stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},RX={group:{fill:"#e5e5e5"},arc:{fill:"#000"},area:{fill:"#000"},line:{stroke:"#000"},path:{stroke:"#000"},rect:{fill:"#000"},shape:{stroke:"#000"},symbol:{fill:"#000",size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},jX="Benton Gothic Bold, sans-serif",MX={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"ice-7":["#edefee","#dadfe2","#c4ccd2","#a6b7c6","#849eae","#607785","#47525d"]},NX={background:"#ffffff",title:{anchor:"start",color:"#000000",font:jX,fontSize:22,fontWeight:"normal"},arc:{fill:"#82c6df"},area:{fill:"#82c6df"},line:{stroke:"#82c6df",strokeWidth:2},path:{stroke:"#82c6df"},rect:{fill:"#82c6df"},shape:{stroke:"#82c6df"},symbol:{fill:"#82c6df",size:30},axis:{labelFont:"Benton Gothic, sans-serif",labelFontSize:11.5,labelFontWeight:"normal",titleFont:jX,titleFontSize:13,titleFontWeight:"normal"},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:"Benton Gothic, sans-serif",labelFontSize:11.5,symbolType:"square",titleFont:jX,titleFontSize:13,titleFontWeight:"normal"},range:{category:MX["category-6"],diverging:MX["fireandice-6"],heatmap:MX["fire-7"],ordinal:MX["fire-7"],ramp:MX["fire-7"]}},FX={background:"#f9f9f9",arc:{fill:"#ab5787"},area:{fill:"#ab5787"},line:{stroke:"#ab5787"},path:{stroke:"#ab5787"},rect:{fill:"#ab5787"},shape:{stroke:"#ab5787"},symbol:{fill:"#ab5787",size:30},axis:{domainColor:"#979797",domainWidth:.5,gridWidth:.2,labelColor:"#979797",tickColor:"#979797",tickWidth:.2,titleColor:"#979797"},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},TX={background:"#fff",arc:{fill:"#3e5c69"},area:{fill:"#3e5c69"},line:{stroke:"#3e5c69"},path:{stroke:"#3e5c69"},rect:{fill:"#3e5c69"},shape:{stroke:"#3e5c69"},symbol:{fill:"#3e5c69"},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},LX={"main-colors":["#1696d2","#d2d2d2","#000000","#fdbf11","#ec008b","#55b748","#5c5859","#db2b27"],"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"shades-gray":["#F5F5F5","#ECECEC","#E3E3E3","#DCDBDB","#D2D2D2","#9D9D9D","#696969","#353535"],"shades-yellow":["#FFF2CF","#FCE39E","#FDD870","#FCCB41","#FDBF11","#E88E2D","#CA5800","#843215"],"shades-magenta":["#F5CBDF","#EB99C2","#E46AA7","#E54096","#EC008B","#AF1F6B","#761548","#351123"],"shades-green":["#DCEDD9","#BCDEB4","#98CF90","#78C26D","#55B748","#408941","#2C5C2D","#1A2E19"],"shades-black":["#D5D5D4","#ADABAC","#848081","#5C5859","#332D2F","#262223","#1A1717","#0E0C0D"],"shades-red":["#F8D5D4","#F1AAA9","#E9807D","#E25552","#DB2B27","#A4201D","#6E1614","#370B0A"],"one-group":["#1696d2","#000000"],"two-groups-cat-1":["#1696d2","#000000"],"two-groups-cat-2":["#1696d2","#fdbf11"],"two-groups-cat-3":["#1696d2","#db2b27"],"two-groups-seq":["#a2d4ec","#1696d2"],"three-groups-cat":["#1696d2","#fdbf11","#000000"],"three-groups-seq":["#a2d4ec","#1696d2","#0a4c6a"],"four-groups-cat-1":["#000000","#d2d2d2","#fdbf11","#1696d2"],"four-groups-cat-2":["#1696d2","#ec0008b","#fdbf11","#5c5859"],"four-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a"],"five-groups-cat-1":["#1696d2","#fdbf11","#d2d2d2","#ec008b","#000000"],"five-groups-cat-2":["#1696d2","#0a4c6a","#d2d2d2","#fdbf11","#332d2f"],"five-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a","#000000"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-cat-2":["#1696d2","#d2d2d2","#ec008b","#fdbf11","#332d2f","#0a4c6a"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},PX={background:"#FFFFFF",title:{anchor:"start",fontSize:18,font:"Lato"},axisX:{domain:!0,domainColor:"#000000",domainWidth:1,grid:!1,labelFontSize:12,labelFont:"Lato",labelAngle:0,tickColor:"#000000",tickSize:5,titleFontSize:12,titlePadding:10,titleFont:"Lato"},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:"#DEDDDD",gridWidth:1,labelFontSize:12,labelFont:"Lato",labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:"Lato",titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:"Lato",symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:"Lato",orient:"right",offset:10},view:{stroke:"transparent"},range:{category:LX["six-groups-cat-1"],diverging:LX["diverging-colors"],heatmap:LX["diverging-colors"],ordinal:LX["six-groups-seq"],ramp:LX["shades-blue"]},area:{fill:"#1696d2"},rect:{fill:"#1696d2"},line:{color:"#1696d2",stroke:"#1696d2",strokeWidth:5},trail:{color:"#1696d2",stroke:"#1696d2",strokeWidth:0,size:1},path:{stroke:"#1696d2",strokeWidth:.5},point:{filled:!0},text:{font:"Lato",color:"#1696d2",fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:"#1696d2",stroke:null}},arc:{fill:"#1696d2"},shape:{stroke:"#1696d2"},symbol:{fill:"#1696d2",size:30}},UX={arc:{fill:"#3366CC"},area:{fill:"#3366CC"},path:{stroke:"#3366CC"},rect:{fill:"#3366CC"},shape:{stroke:"#3366CC"},symbol:{stroke:"#3366CC"},circle:{fill:"#3366CC"},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:"Arial, sans-serif",fontSize:12},"guide-title":{font:"Arial, sans-serif",fontSize:12},"group-title":{font:"Arial, sans-serif",fontSize:12}},title:{font:"Arial, sans-serif",fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:"#ccc",tickColor:"#ccc",domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},GX=xX.version,qX=function(e,t,n){var r=e.open(t),i=new URL(t).origin,a=40;e.addEventListener("message",(function t(n){n.source===r&&(a=0,e.removeEventListener("message",t,!1))}),!1),setTimeout((function e(){a<=0||(r.postMessage(n,i),setTimeout(e,250),a-=1)}),250)},HX='.vega-embed {\n  position: relative;\n  display: inline-block; }\n  .vega-embed.has-actions {\n    padding-right: 38px; }\n  .vega-embed details:not([open]) > :not(summary) {\n    display: none !important; }\n  .vega-embed summary {\n    list-style: none;\n    position: absolute;\n    top: 0;\n    right: 0;\n    padding: 6px;\n    z-index: 1000;\n    background: white;\n    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);\n    color: #1b1e23;\n    border: 1px solid #aaa;\n    border-radius: 999px;\n    opacity: 0.2;\n    transition: opacity 0.4s ease-in;\n    outline: none;\n    cursor: pointer;\n    line-height: 0px; }\n    .vega-embed summary::-webkit-details-marker {\n      display: none; }\n    .vega-embed summary:active {\n      box-shadow: #aaa 0px 0px 0px 1px inset; }\n    .vega-embed summary svg {\n      width: 14px;\n      height: 14px; }\n  .vega-embed details[open] summary {\n    opacity: 0.7; }\n  .vega-embed:hover summary,\n  .vega-embed:focus summary {\n    opacity: 1 !important;\n    transition: opacity 0.2s ease; }\n  .vega-embed .vega-actions {\n    position: absolute;\n    z-index: 1001;\n    top: 35px;\n    right: -9px;\n    display: flex;\n    flex-direction: column;\n    padding-bottom: 8px;\n    padding-top: 8px;\n    border-radius: 4px;\n    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);\n    border: 1px solid #d9d9d9;\n    background: white;\n    animation-duration: 0.15s;\n    animation-name: scale-in;\n    animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);\n    text-align: left; }\n    .vega-embed .vega-actions a {\n      padding: 8px 16px;\n      font-family: sans-serif;\n      font-size: 14px;\n      font-weight: 600;\n      white-space: nowrap;\n      color: #434a56;\n      text-decoration: none; }\n      .vega-embed .vega-actions a:hover {\n        background-color: #f7f7f9;\n        color: black; }\n    .vega-embed .vega-actions::before, .vega-embed .vega-actions::after {\n      content: "";\n      display: inline-block;\n      position: absolute; }\n    .vega-embed .vega-actions::before {\n      left: auto;\n      right: 14px;\n      top: -16px;\n      border: 8px solid #0000;\n      border-bottom-color: #d9d9d9; }\n    .vega-embed .vega-actions::after {\n      left: auto;\n      right: 15px;\n      top: -14px;\n      border: 7px solid #0000;\n      border-bottom-color: #fff; }\n\n.vega-embed-wrapper {\n  max-width: 100%;\n  overflow: scroll;\n  padding-right: 14px; }\n\n@keyframes scale-in {\n  from {\n    opacity: 0;\n    transform: scale(0.6); }\n  to {\n    opacity: 1;\n    transform: scale(1); } }\n';function YX(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i];JX(e,o)}return e}function JX(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object(R.jb)(e,i,t[i],!0)}}String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return this.substr(!t||t<0?0:+t,e.length)===e});var zX=p,KX=y,WX="undefined"!==typeof window?window:void 0;void 0===KX&&(null===(wX=null===WX||void 0===WX?void 0:WX.vl)||void 0===wX?void 0:wX.compile)&&(KX=WX.vl);var VX={export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},XX={CLICK_TO_VIEW_ACTIONS:"Click to view actions",COMPILED_ACTION:"View Compiled Vega",EDITOR_ACTION:"Open in Vega Editor",PNG_ACTION:"Save as PNG",SOURCE_ACTION:"View Source",SVG_ACTION:"Save as SVG"},ZX={vega:"Vega","vega-lite":"Vega-Lite"},$X={vega:zX.version,"vega-lite":KX?KX.version:"not available"},eZ={vega:function(e){return e},"vega-lite":function(e,t){return KX.compile(e,{config:t}).spec}},tZ='\n<svg viewBox="0 0 16 16" fill="currentColor" stroke="none" stroke-width="1" stroke-linecap="round" stroke-linejoin="round">\n  <circle r="2" cy="8" cx="2"></circle>\n  <circle r="2" cy="8" cx="8"></circle>\n  <circle r="2" cy="8" cx="14"></circle>\n</svg>';function nZ(e){return"function"===typeof e}function rZ(e,t,n,r){var i="<html><head>".concat(t,'</head><body><pre><code class="json">'),a="</code></pre>".concat(n,"</body></html>"),o=window.open("");o.document.write(i+e+a),o.document.title="".concat(ZX[r]," JSON Source")}function iZ(e,t){var n;if(e.$schema){var r=_X()(e.$schema);t&&t!==r.library&&console.warn("The given visualization spec is written in ".concat(ZX[r.library],", but mode argument sets ").concat(null!==(n=ZX[t])&&void 0!==n?n:t,"."));var i=r.library;return Object(Be.satisfies)($X[i],"^".concat(r.version.slice(1)))||console.warn("The input spec uses ".concat(ZX[i]," ").concat(r.version,", but the current version of ").concat(ZX[i]," is v").concat($X[i],".")),i}return"mark"in e||"encoding"in e||"layer"in e||"hconcat"in e||"vconcat"in e||"facet"in e||"repeat"in e?"vega-lite":"marks"in e||"signals"in e||"scales"in e||"axes"in e?"vega":null!==t&&void 0!==t?t:"vega"}function aZ(e){return!(!e||!("load"in e))}function oZ(e,t){var n;return J(this,void 0,void 0,Y.a.mark((function r(){var i,a;return Y.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!Object(R.H)(e.config)){r.next=8;break}return r.t1=JSON,r.next=4,t.load(e.config);case 4:r.t2=r.sent,r.t0=r.t1.parse.call(r.t1,r.t2),r.next=9;break;case 8:r.t0=null!==(n=e.config)&&void 0!==n?n:{};case 9:if(i=r.t0,!Object(R.H)(e.patch)){r.next=18;break}return r.t4=JSON,r.next=14,t.load(e.patch);case 14:r.t5=r.sent,r.t3=r.t4.parse.call(r.t4,r.t5),r.next=19;break;case 18:r.t3=e.patch;case 19:return a=r.t3,r.abrupt("return",Object.assign(Object.assign(Object.assign({},e),a?{patch:a}:{}),i?{config:i}:{}));case 21:case"end":return r.stop()}}),r)})))}function sZ(e,t){var n,r,i,a,o,s,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},A=arguments.length>3?arguments[3]:void 0;return J(this,void 0,void 0,Y.a.mark((function c(){var l,f,h,g,d,p,v,y,I,b,E,C,B,w,Q,k,_,x,S,O,D,j,M,F,T,L,P,U,G,q,H,z,K;return Y.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(K=function(){D&&document.removeEventListener("click",D),Q.finalize()},l=u.theme?Object(R.N)(m[u.theme],null!==(n=u.config)&&void 0!==n?n:{}):u.config,f=Object(R.B)(u.actions)?u.actions:YX({},VX,null!==(r=u.actions)&&void 0!==r?r:{}),h=Object.assign(Object.assign({},XX),u.i18n),g=null!==(i=u.renderer)&&void 0!==i?i:"canvas",d=null!==(a=u.logLevel)&&void 0!==a?a:zX.Warn,p=null!==(o=u.downloadFileName)&&void 0!==o?o:"visualization",!1!==u.defaultStyle&&(v="vega-embed-style",document.getElementById(v)||((y=document.createElement("style")).id=v,y.innerText=void 0===u.defaultStyle||!0===u.defaultStyle?HX.toString():u.defaultStyle,document.head.appendChild(y))),I=iZ(t,u.mode),b=eZ[I](t,l),"vega-lite"===I&&b.$schema&&(E=_X()(b.$schema),Object(Be.satisfies)($X.vega,"^".concat(E.version.slice(1)))||console.warn("The compiled spec uses Vega ".concat(E.version,", but current version is v").concat($X.vega,"."))),C="string"===typeof e?document.querySelector(e):e){c.next=14;break}throw Error("".concat(e," does not exist"));case 14:return C.classList.add("vega-embed"),f&&C.classList.add("has-actions"),C.innerHTML="",(B=u.patch)&&(b=B instanceof Function?B(b):Ae(b,B,!0,!1).newDocument),u.formatLocale&&zX.formatLocale(u.formatLocale),u.timeFormatLocale&&zX.timeFormatLocale(u.timeFormatLocale),w=zX.parse(b,"vega-lite"===I?{}:l),Q=new zX.View(w,{loader:A,logLevel:d,renderer:g}),!1!==u.tooltip&&(k=nZ(u.tooltip)?u.tooltip:new N(!0===u.tooltip?{}:u.tooltip).call,Q.tooltip(k)),void 0===(_=u.hover)&&(_="vega"===I),_&&(S=(x="boolean"===typeof _?{}:_).hoverSet,O=x.updateSet,Q.hover(S,O)),u&&(null!=u.width&&Q.width(u.width),null!=u.height&&Q.height(u.height),null!=u.padding&&Q.padding(u.padding)),c.next=30,Q.initialize(e).runAsync();case 30:if(!1!==f){if(j=C,!1!==u.defaultStyle&&((M=document.createElement("details")).title=h.CLICK_TO_VIEW_ACTIONS,C.append(M),j=M,(F=document.createElement("summary")).innerHTML=tZ,M.append(F),D=function(e){M.contains(e.target)||M.removeAttribute("open")},document.addEventListener("click",D)),T=document.createElement("div"),j.append(T),T.classList.add("vega-actions"),!0===f||!1!==f.export)for(L=function(){var e=U[P];if(!0===f||!0===f.export||f.export[e]){var t=h["".concat(e.toUpperCase(),"_ACTION")],n=document.createElement("a");n.text=t,n.href="#",n.target="_blank",n.download="".concat(p,".").concat(e),n.addEventListener("mousedown",(function(t){return J(this,void 0,void 0,Y.a.mark((function n(){var r;return Y.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.preventDefault(),n.next=3,Q.toImageURL(e,u.scaleFactor);case 3:r=n.sent,this.href=r;case 5:case"end":return n.stop()}}),n,this)})))})),T.append(n)}},P=0,U=["svg","png"];P<U.length;P++)L();!0!==f&&!1===f.source||((G=document.createElement("a")).text=h.SOURCE_ACTION,G.href="#",G.addEventListener("click",(function(e){var n,r;rZ(Ce()(t),null!==(n=u.sourceHeader)&&void 0!==n?n:"",null!==(r=u.sourceFooter)&&void 0!==r?r:"",I),e.preventDefault()})),T.append(G)),"vega-lite"!==I||!0!==f&&!1===f.compiled||((q=document.createElement("a")).text=h.COMPILED_ACTION,q.href="#",q.addEventListener("click",(function(e){var t,n;rZ(Ce()(b),null!==(t=u.sourceHeader)&&void 0!==t?t:"",null!==(n=u.sourceFooter)&&void 0!==n?n:"","vega"),e.preventDefault()})),T.append(q)),!0!==f&&!1===f.editor||(H=null!==(s=u.editorUrl)&&void 0!==s?s:"https://vega.github.io/editor/",(z=document.createElement("a")).text=h.EDITOR_ACTION,z.href="#",z.addEventListener("click",(function(e){qX(window,H,{config:l,mode:I,renderer:g,spec:Ce()(t)}),e.preventDefault()})),T.append(z))}return c.abrupt("return",{view:Q,spec:t,vgSpec:b,finalize:K});case 32:case"end":return c.stop()}}),c)})))}function uZ(e,t){Object.keys(t).forEach((function(n){!function(e,t,n){var r;n&&((r=n)&&"[object Function]"==={}.toString.call(r)?n(e.data(t)):e.change(t,zX.changeset().remove((function(){return!0})).insert(n)))}(e,n,t[n])}))}function AZ(e){var t=new Set;return e.forEach((function(e){Object.keys(e).forEach((function(e){t.add(e)}))})),t}var cZ=function(){};function lZ(e,t){var n=Object.keys(t);return n.forEach((function(n){try{e.addSignalListener(n,t[n])}catch(r){console.warn("Cannot add invalid signal listener.",r)}})),n.length>0}function fZ(e,t){var n=Object.keys(t);return n.forEach((function(n){try{e.removeSignalListener(n,t[n])}catch(r){console.warn("Cannot remove invalid signal listener.",r)}})),n.length>0}function hZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gZ(){return(gZ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function dZ(e){var t=e.spec,n=e.width,r=e.height;return"undefined"!==typeof n&&"undefined"!==typeof r?gZ({},t,{width:n,height:r}):"undefined"!==typeof n?gZ({},t,{width:n}):"undefined"!==typeof r?gZ({},t,{height:r}):t}var pZ=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),hZ(Object(F.a)(e),"containerRef",C.a.createRef()),hZ(Object(F.a)(e),"viewPromise",void 0),hZ(Object(F.a)(e),"handleError",(function(t){var n=e.props.onError;(void 0===n?cZ:n)(t),console.warn(t)})),hZ(Object(F.a)(e),"modifyView",(function(t){e.viewPromise&&e.viewPromise.then((function(e){return e&&t(e),!0})).catch(e.handleError)})),e}return Object(x.a)(n,[{key:"componentDidMount",value:function(){this.createView()}},{key:"componentDidUpdate",value:function(e){var t=this,n=AZ([this.props,e]);if(n.delete("className"),n.delete("signalListeners"),n.delete("spec"),n.delete("style"),n.delete("width"),n.delete("height"),!this.viewPromise||Array.from(n).some((function(n){return t.props[n]!==e[n]})))this.clearView(),this.createView();else{var r=function(e,t){if(e===t)return!1;var n={width:!1,height:!1,isExpensive:!1},r=AZ([e,t]);return!r.has("width")||"width"in e&&"width"in t&&e.width===t.width||("width"in e&&"number"===typeof e.width?n.width=e.width:n.isExpensive=!0),!r.has("height")||"height"in e&&"height"in t&&e.height===t.height||("height"in e&&"number"===typeof e.height?n.height=e.height:n.isExpensive=!0),r.delete("width"),r.delete("height"),Object(im.a)(r).some((function(n){return!(n in e)||!(n in t)||!uF()(e[n],t[n])}))&&(n.isExpensive=!0),!(!1===n.width&&!1===n.height&&!n.isExpensive)&&n}(dZ(this.props),dZ(e)),i=this.props.signalListeners,a=e.signalListeners;if(r)if(r.isExpensive)this.clearView(),this.createView();else{var o=!q(i,a);this.modifyView((function(e){!1!==r.width&&e.width(r.width),!1!==r.height&&e.height(r.height),o&&(a&&fZ(e,a),i&&lZ(e,i)),e.run()}))}else q(i,a)||this.modifyView((function(e){a&&fZ(e,a),i&&lZ(e,i),e.run()}))}}},{key:"componentWillUnmount",value:function(){this.clearView()}},{key:"createView",value:function(){var e=this.props,t=e.onNewView,n=e.signalListeners,r=void 0===n?{}:n,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["spec","onNewView","signalListeners"]);if(this.containerRef.current){var a=dZ(this.props);this.viewPromise=function(e,t){var n,r,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return J(this,void 0,void 0,Y.a.mark((function o(){var s,u,A,c,l;return Y.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(s=aZ(a.loader)?a.loader:zX.loader(a.loader),!Object(R.H)(t)){o.next=9;break}return o.t1=JSON,o.next=5,s.load(t);case 5:o.t2=o.sent,o.t0=o.t1.parse.call(o.t1,o.t2),o.next=10;break;case 9:o.t0=t;case 10:return u=o.t0,o.next=13,oZ(null!==(n=u.usermeta&&u.usermeta.embedOptions)&&void 0!==n?n:{},s);case 13:return A=o.sent,o.next=16,oZ(a,s);case 16:return c=o.sent,l=Object.assign(Object.assign({},YX(c,A)),{config:Object(R.N)(null!==(r=c.config)&&void 0!==r?r:{},null!==(i=A.config)&&void 0!==i?i:{})}),o.next=20,sZ(e,u,l,s);case 20:return o.abrupt("return",o.sent);case 21:case"end":return o.stop()}}),o)})))}(this.containerRef.current,a,i).then((function(e){var t=e.view;return lZ(t,r)&&t.run(),t})).catch(this.handleError),t&&this.modifyView(t)}}},{key:"clearView",value:function(){return this.modifyView((function(e){e.finalize()})),this.viewPromise=void 0,this}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.style;return C.a.createElement("div",{ref:this.containerRef,className:t,style:n})}}]),n}(C.a.PureComponent);function vZ(){return(vZ=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function yZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}hZ(pZ,"propTypes",{className:U.a.string,onError:U.a.func});var mZ=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=t.call.apply(t,[this].concat(i)),yZ(Object(F.a)(e),"vegaEmbed",C.a.createRef()),yZ(Object(F.a)(e),"handleNewView",(function(t){e.update();var n=e.props.onNewView;(void 0===n?cZ:n)(t)})),e}return Object(x.a)(n,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(e){q(this.props.data,e.data)||this.update()}},{key:"update",value:function(){var e=this.props.data;e&&this.vegaEmbed.current&&Object.keys(e).length>0&&this.vegaEmbed.current.modifyView((function(t){uZ(t,e),t.resize().run()}))}},{key:"render",value:function(){var e=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(this.props,["data"]);return C.a.createElement(pZ,vZ({ref:this.vegaEmbed},e,{onNewView:this.handleNewView}))}}]),n}(C.a.PureComponent);yZ(mZ,"defaultProps",{data:{}});function IZ(e){var t=e.spec,n=e.data,r=e.signalListeners,i=Object(b.a)({},t,{data:{name:"table"}}),a=Object(E.useMemo)((function(){return C.a.createElement(mZ,{spec:i,data:Object(Q.a)({},"table",n),signalListeners:r,tooltip:(new N).call,renderer:"canvas",scaleFactor:3})}),[i,n,r]);return i&&n&&n.length>0?C.a.createElement(E.Suspense,{fallback:C.a.createElement("div",null,"Loading...")},a):null}var bZ=Symbol("data"),EZ=0;function CZ(e){return(e||"")+ ++EZ}var BZ=function(){function e(){Object(_.a)(this,e)}return Object(x.a)(e,[{key:"toJSON",value:function(){return DZ(this)}}]),e}();function wZ(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return 1===n.length&&Array.isArray(n[0])?e[bZ]=n[0]:n.forEach((function(t){Object.assign(e[bZ],PZ(t)&&t[bZ]||t)})),e}function QZ(e){var t;return Array.isArray(e)?(t=[]).concat.apply(t,Object(im.a)(e)):e}function kZ(e,t){return e[bZ][t]}function _Z(e,t,n){e[bZ][t]=RZ(n)}function xZ(e){var t=Object.create(Object.getPrototypeOf(e));return Object.assign(t,e),t[bZ]=Object.assign({},e[bZ]),t}function SZ(e,t){e[bZ]=t||{}}function OZ(e,t){return e&&e.toJSON?e.toJSON(t):DZ(e)}function DZ(e){if(LZ(e))return e.map((function(e){return OZ(e)}));if(PZ(e)){var t=e[bZ]||e;return LZ(t)?OZ(t):Object.keys(t).reduce((function(e,n){return e[n]=OZ(t[n]),e}),{})}return e}function RZ(e){return PZ(e)&&!e[bZ]?Object(Q.a)({},bZ,e||{}):e}function jZ(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var a=(t=[]).concat.apply(t,r).map((function(t){return OZ(t,e)}));return RZ(Object.assign.apply(Object,[{}].concat(Object(im.a)(a))))}function MZ(e,t,n){var r=t.reduce((function(e,t){return e[t]=1,e}),{}),i={},a={};for(var o in e)(r[o]?i:a)[o]=e[o];return i[n]=a,i}var NZ,FZ,TZ,LZ=Array.isArray;function PZ(e){return e===Object(e)&&!LZ(e)}function UZ(e){return"string"===typeof e}function GZ(){for(var e=Object.assign({},TZ),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.view=Object.assign.apply(Object,[{},TZ.view].concat(n)),e}function qZ(){return"undefined"===typeof document?void 0:document.createElement("div")}function HZ(e){var t=NZ?NZ.version.split(".")[0]:"4";return Object.assign({$schema:"https://vega.github.io/schema/vega-lite/v".concat(t,".json")},e.toJSON())}function YZ(e,t){if(!NZ||!FZ)throw Error('Vega / Vega-Lite not registered. Use the "register" method.');var n=NZ.compile(HZ(e),t.config),r=new FZ.View(FZ.parse(n.spec),t.view);return t.init&&t.init(r),r}function JZ(e){return zZ.apply(this,arguments)}function zZ(){return(zZ=Object(Qe.a)(Y.a.mark((function e(t){var n,r;return Y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=GZ({container:t&&t.container||qZ()},t),e.next=3,YZ(this,t).runAsync();case 3:return n=e.sent,(r=n.container()||{}).value=n,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function KZ(e){return YZ(this,GZ(e))}function WZ(){return HZ(this)}function VZ(e){return JSON.stringify(HZ(this),null,e)}function XZ(e,t,n){return NZ=t,FZ=e,TZ=n||{},this}var ZZ=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"repeat",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"spec",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"align",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"align",e),t}return kZ(this,"align")}},{key:"autosize",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"autosize",e),t}return kZ(this,"autosize")}},{key:"background",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"background",e),t}return kZ(this,"background")}},{key:"bounds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bounds",e),t}return kZ(this,"bounds")}},{key:"center",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"center",e),t}return kZ(this,"center")}},{key:"columns",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"columns",e),t}return kZ(this,"columns")}},{key:"config",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"config",e),t}return kZ(this,"config")}},{key:"datasets",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datasets",e),t}return kZ(this,"datasets")}},{key:"description",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"description",e),t}return kZ(this,"description")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"padding",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"padding",e),t}return kZ(this,"padding")}},{key:"resolve",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"resolve",e),t}return kZ(this,"resolve")}},{key:"spacing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"spacing",e),t}return kZ(this,"spacing")}},{key:"spec",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"spec",e),t}return kZ(this,"spec")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"usermeta",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"usermeta",e),t}return kZ(this,"usermeta")}},{key:"data",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"data",e=LZ(e)?{values:e}:UZ(e)?{url:e}:e),t}return kZ(this,"data")}},{key:"transform",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"transform",t=QZ(t)),r}return kZ(this,"transform")}},{key:"facet",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.slice(0,1);var r=t$.apply(void 0,Object(im.a)(t));return r.spec(this)}},{key:"render",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return JZ.apply(this,t)}},{key:"toView",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return KZ.apply(this,t)}},{key:"toSpec",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return WZ.apply(this,t)}},{key:"toString",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return VZ.apply(this,t)}}]),n}(BZ);function $Z(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(ZZ,t)}var e$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"facet",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"spec",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"align",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"align",e),t}return kZ(this,"align")}},{key:"autosize",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"autosize",e),t}return kZ(this,"autosize")}},{key:"background",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"background",e),t}return kZ(this,"background")}},{key:"bounds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bounds",e),t}return kZ(this,"bounds")}},{key:"center",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"center",e),t}return kZ(this,"center")}},{key:"columns",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"columns",e),t}return kZ(this,"columns")}},{key:"config",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"config",e),t}return kZ(this,"config")}},{key:"datasets",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datasets",e),t}return kZ(this,"datasets")}},{key:"description",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"description",e),t}return kZ(this,"description")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"padding",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"padding",e),t}return kZ(this,"padding")}},{key:"resolve",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"resolve",e),t}return kZ(this,"resolve")}},{key:"spacing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"spacing",e),t}return kZ(this,"spacing")}},{key:"spec",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"spec",e),t}return kZ(this,"spec")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"usermeta",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"usermeta",e),t}return kZ(this,"usermeta")}},{key:"data",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"data",e=LZ(e)?{values:e}:UZ(e)?{url:e}:e),t}return kZ(this,"data")}},{key:"transform",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"transform",t=QZ(t)),r}return kZ(this,"transform")}},{key:"repeat",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.slice(0,1);var r=$Z.apply(void 0,Object(im.a)(t));return r.spec(this)}},{key:"render",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return JZ.apply(this,t)}},{key:"toView",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return KZ.apply(this,t)}},{key:"toSpec",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return WZ.apply(this,t)}},{key:"toString",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return VZ.apply(this,t)}}]),n}(BZ);function t$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(e$,t)}var n$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=i.map((function(e){return UZ(e)?{type:e}:e})),_Z(Object(F.a)(e),"mark",jZ(0,kZ(Object(F.a)(e),"mark"),i)),e}return Object(x.a)(n,[{key:"align",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"align",e),t}return kZ(this,"align")}},{key:"autosize",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"autosize",e),t}return kZ(this,"autosize")}},{key:"background",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"background",e),t}return kZ(this,"background")}},{key:"bounds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bounds",e),t}return kZ(this,"bounds")}},{key:"center",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"center",e),t}return kZ(this,"center")}},{key:"config",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"config",e),t}return kZ(this,"config")}},{key:"datasets",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datasets",e),t}return kZ(this,"datasets")}},{key:"description",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"description",e),t}return kZ(this,"description")}},{key:"height",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"height",e),t}return kZ(this,"height")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"padding",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"padding",e),t}return kZ(this,"padding")}},{key:"resolve",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"resolve",e),t}return kZ(this,"resolve")}},{key:"spacing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"spacing",e),t}return kZ(this,"spacing")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"usermeta",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"usermeta",e),t}return kZ(this,"usermeta")}},{key:"view",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"view",e),t}return kZ(this,"view")}},{key:"width",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"width",e),t}return kZ(this,"width")}},{key:"mark",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){t=t.map((function(e){return UZ(e)?{type:e}:e}));var r=xZ(this);return _Z(r,"mark",jZ(0,t)),r}return kZ(this,"mark")}},{key:"encode",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1===t.length&&Array.isArray(t[0])&&(t=t[0]),t.length){var r=kZ(this,"encoding"),i=xZ(this);return r&&(t=[r].concat(t)),_Z(i,"encoding",jZ(1,t)),i}return kZ(this,"encoding")}},{key:"select",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1===t.length&&Array.isArray(t[0])&&(t=t[0]),t.length){var r=kZ(this,"selection"),i=xZ(this);return r&&(t=[r].concat(t)),_Z(i,"selection",jZ(1,t)),i}return kZ(this,"selection")}},{key:"project",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"projection",e),t}return kZ(this,"projection")}},{key:"data",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"data",e=LZ(e)?{values:e}:UZ(e)?{url:e}:e),t}return kZ(this,"data")}},{key:"transform",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"transform",t=QZ(t)),r}return kZ(this,"transform")}},{key:"markArc",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=[{type:"arc"}].concat(t);var r=xZ(this);return _Z(r,"mark",jZ(0,t)),r}},{key:"markArea",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=[{type:"area"}].concat(t);var r=xZ(this);return _Z(r,"mark",jZ(0,t)),r}},{key:"markBar",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=[{type:"bar"}].concat(t);var r=xZ(this);return _Z(r,"mark",jZ(0,t)),r}},{key:"markBoxplot",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=[{type:"boxplot"}].concat(t);var r=xZ(this);return _Z(r,"mark",jZ(0,t)),r}},{key:"markCircle",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=[{type:"circle"}].concat(t);var r=xZ(this);return _Z(r,"mark",jZ(0,t)),r}},{key:"markErrorband",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=[{type:"errorband"}].concat(t);var r=xZ(this);return _Z(r,"mark",jZ(0,t)),r}},{key:"markErrorbar",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=[{type:"errorbar"}].concat(t);var r=xZ(this);return _Z(r,"mark",jZ(0,t)),r}},{key:"markGeoshape",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=[{type:"geoshape"}].concat(t);var r=xZ(this);return _Z(r,"mark",jZ(0,t)),r}},{key:"markImage",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=[{type:"image"}].concat(t);var r=xZ(this);return _Z(r,"mark",jZ(0,t)),r}},{key:"markLine",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=[{type:"line"}].concat(t);var r=xZ(this);return _Z(r,"mark",jZ(0,t)),r}},{key:"markPoint",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=[{type:"point"}].concat(t);var r=xZ(this);return _Z(r,"mark",jZ(0,t)),r}},{key:"markRect",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=[{type:"rect"}].concat(t);var r=xZ(this);return _Z(r,"mark",jZ(0,t)),r}},{key:"markRule",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=[{type:"rule"}].concat(t);var r=xZ(this);return _Z(r,"mark",jZ(0,t)),r}},{key:"markSquare",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=[{type:"square"}].concat(t);var r=xZ(this);return _Z(r,"mark",jZ(0,t)),r}},{key:"markText",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=[{type:"text"}].concat(t);var r=xZ(this);return _Z(r,"mark",jZ(0,t)),r}},{key:"markTick",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=[{type:"tick"}].concat(t);var r=xZ(this);return _Z(r,"mark",jZ(0,t)),r}},{key:"markTrail",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=[{type:"trail"}].concat(t);var r=xZ(this);return _Z(r,"mark",jZ(0,t)),r}},{key:"facet",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.slice(0,1);var r=t$.apply(void 0,Object(im.a)(t));return r.spec(this)}},{key:"repeat",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.slice(0,1);var r=$Z.apply(void 0,Object(im.a)(t));return r.spec(this)}},{key:"render",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return JZ.apply(this,t)}},{key:"toView",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return KZ.apply(this,t)}},{key:"toSpec",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return WZ.apply(this,t)}},{key:"toString",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return VZ.apply(this,t)}}]),n}(BZ);function r$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(n$,t)}function i$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r$.apply(void 0,[{type:"arc"}].concat(t))}function a$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r$.apply(void 0,[{type:"area"}].concat(t))}function o$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r$.apply(void 0,[{type:"bar"}].concat(t))}function s$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r$.apply(void 0,[{type:"boxplot"}].concat(t))}function u$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r$.apply(void 0,[{type:"circle"}].concat(t))}function A$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r$.apply(void 0,[{type:"errorband"}].concat(t))}function c$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r$.apply(void 0,[{type:"errorbar"}].concat(t))}function l$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r$.apply(void 0,[{type:"geoshape"}].concat(t))}function f$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r$.apply(void 0,[{type:"image"}].concat(t))}function h$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r$.apply(void 0,[{type:"line"}].concat(t))}function g$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r$.apply(void 0,[{type:"point"}].concat(t))}function d$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r$.apply(void 0,[{type:"rect"}].concat(t))}function p$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r$.apply(void 0,[{type:"rule"}].concat(t))}function v$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r$.apply(void 0,[{type:"square"}].concat(t))}function y$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r$.apply(void 0,[{type:"text"}].concat(t))}function m$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r$.apply(void 0,[{type:"tick"}].concat(t))}function I$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r$.apply(void 0,[{type:"trail"}].concat(t))}var b$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=QZ(i),_Z(Object(F.a)(e),"layer",i),e}return Object(x.a)(n,[{key:"autosize",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"autosize",e),t}return kZ(this,"autosize")}},{key:"background",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"background",e),t}return kZ(this,"background")}},{key:"config",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"config",e),t}return kZ(this,"config")}},{key:"datasets",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datasets",e),t}return kZ(this,"datasets")}},{key:"description",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"description",e),t}return kZ(this,"description")}},{key:"encoding",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"encoding",e),t}return kZ(this,"encoding")}},{key:"height",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"height",e),t}return kZ(this,"height")}},{key:"layer",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"layer",t=QZ(t)),r}return kZ(this,"layer")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"padding",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"padding",e),t}return kZ(this,"padding")}},{key:"resolve",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"resolve",e),t}return kZ(this,"resolve")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"usermeta",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"usermeta",e),t}return kZ(this,"usermeta")}},{key:"view",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"view",e),t}return kZ(this,"view")}},{key:"width",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"width",e),t}return kZ(this,"width")}},{key:"project",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"projection",e),t}return kZ(this,"projection")}},{key:"data",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"data",e=LZ(e)?{values:e}:UZ(e)?{url:e}:e),t}return kZ(this,"data")}},{key:"transform",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"transform",t=QZ(t)),r}return kZ(this,"transform")}},{key:"facet",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.slice(0,1);var r=t$.apply(void 0,Object(im.a)(t));return r.spec(this)}},{key:"repeat",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.slice(0,1);var r=$Z.apply(void 0,Object(im.a)(t));return r.spec(this)}},{key:"render",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return JZ.apply(this,t)}},{key:"toView",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return KZ.apply(this,t)}},{key:"toSpec",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return WZ.apply(this,t)}},{key:"toString",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return VZ.apply(this,t)}}]),n}(BZ);function E$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(b$,t)}var C$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=QZ(i),_Z(Object(F.a)(e),"concat",i),e}return Object(x.a)(n,[{key:"align",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"align",e),t}return kZ(this,"align")}},{key:"autosize",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"autosize",e),t}return kZ(this,"autosize")}},{key:"background",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"background",e),t}return kZ(this,"background")}},{key:"bounds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bounds",e),t}return kZ(this,"bounds")}},{key:"center",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"center",e),t}return kZ(this,"center")}},{key:"columns",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"columns",e),t}return kZ(this,"columns")}},{key:"concat",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"concat",t=QZ(t)),r}return kZ(this,"concat")}},{key:"config",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"config",e),t}return kZ(this,"config")}},{key:"datasets",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datasets",e),t}return kZ(this,"datasets")}},{key:"description",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"description",e),t}return kZ(this,"description")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"padding",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"padding",e),t}return kZ(this,"padding")}},{key:"resolve",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"resolve",e),t}return kZ(this,"resolve")}},{key:"spacing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"spacing",e),t}return kZ(this,"spacing")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"usermeta",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"usermeta",e),t}return kZ(this,"usermeta")}},{key:"data",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"data",e=LZ(e)?{values:e}:UZ(e)?{url:e}:e),t}return kZ(this,"data")}},{key:"transform",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"transform",t=QZ(t)),r}return kZ(this,"transform")}},{key:"facet",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.slice(0,1);var r=t$.apply(void 0,Object(im.a)(t));return r.spec(this)}},{key:"repeat",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.slice(0,1);var r=$Z.apply(void 0,Object(im.a)(t));return r.spec(this)}},{key:"render",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return JZ.apply(this,t)}},{key:"toView",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return KZ.apply(this,t)}},{key:"toSpec",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return WZ.apply(this,t)}},{key:"toString",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return VZ.apply(this,t)}}]),n}(BZ);function B$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(C$,t)}var w$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=QZ(i),_Z(Object(F.a)(e),"hconcat",i),e}return Object(x.a)(n,[{key:"autosize",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"autosize",e),t}return kZ(this,"autosize")}},{key:"background",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"background",e),t}return kZ(this,"background")}},{key:"bounds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bounds",e),t}return kZ(this,"bounds")}},{key:"center",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"center",e),t}return kZ(this,"center")}},{key:"config",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"config",e),t}return kZ(this,"config")}},{key:"datasets",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datasets",e),t}return kZ(this,"datasets")}},{key:"description",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"description",e),t}return kZ(this,"description")}},{key:"hconcat",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"hconcat",t=QZ(t)),r}return kZ(this,"hconcat")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"padding",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"padding",e),t}return kZ(this,"padding")}},{key:"resolve",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"resolve",e),t}return kZ(this,"resolve")}},{key:"spacing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"spacing",e),t}return kZ(this,"spacing")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"usermeta",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"usermeta",e),t}return kZ(this,"usermeta")}},{key:"data",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"data",e=LZ(e)?{values:e}:UZ(e)?{url:e}:e),t}return kZ(this,"data")}},{key:"transform",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"transform",t=QZ(t)),r}return kZ(this,"transform")}},{key:"facet",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.slice(0,1);var r=t$.apply(void 0,Object(im.a)(t));return r.spec(this)}},{key:"repeat",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.slice(0,1);var r=$Z.apply(void 0,Object(im.a)(t));return r.spec(this)}},{key:"render",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return JZ.apply(this,t)}},{key:"toView",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return KZ.apply(this,t)}},{key:"toSpec",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return WZ.apply(this,t)}},{key:"toString",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return VZ.apply(this,t)}}]),n}(BZ);function Q$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(w$,t)}var k$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=QZ(i),_Z(Object(F.a)(e),"vconcat",i),e}return Object(x.a)(n,[{key:"autosize",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"autosize",e),t}return kZ(this,"autosize")}},{key:"background",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"background",e),t}return kZ(this,"background")}},{key:"bounds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bounds",e),t}return kZ(this,"bounds")}},{key:"center",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"center",e),t}return kZ(this,"center")}},{key:"config",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"config",e),t}return kZ(this,"config")}},{key:"datasets",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datasets",e),t}return kZ(this,"datasets")}},{key:"description",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"description",e),t}return kZ(this,"description")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"padding",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"padding",e),t}return kZ(this,"padding")}},{key:"resolve",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"resolve",e),t}return kZ(this,"resolve")}},{key:"spacing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"spacing",e),t}return kZ(this,"spacing")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"usermeta",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"usermeta",e),t}return kZ(this,"usermeta")}},{key:"vconcat",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"vconcat",t=QZ(t)),r}return kZ(this,"vconcat")}},{key:"data",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"data",e=LZ(e)?{values:e}:UZ(e)?{url:e}:e),t}return kZ(this,"data")}},{key:"transform",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"transform",t=QZ(t)),r}return kZ(this,"transform")}},{key:"facet",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.slice(0,1);var r=t$.apply(void 0,Object(im.a)(t));return r.spec(this)}},{key:"repeat",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.slice(0,1);var r=$Z.apply(void 0,Object(im.a)(t));return r.spec(this)}},{key:"render",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return JZ.apply(this,t)}},{key:"toView",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return KZ.apply(this,t)}},{key:"toSpec",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return WZ.apply(this,t)}},{key:"toString",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return VZ.apply(this,t)}}]),n}(BZ);function _$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(k$,t)}var x$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"data",LZ(arguments.length<=0?void 0:arguments[0])?{values:arguments.length<=0?void 0:arguments[0]}:UZ(arguments.length<=0?void 0:arguments[0])?{url:arguments.length<=0?void 0:arguments[0]}:arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"data",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"data",e),t}return kZ(this,"data")}},{key:"fields",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"fields",t=QZ(t)),r}return kZ(this,"fields")}},{key:"key",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"key",e),t}return kZ(this,"key")}}]),n}(BZ);function S$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(x$,t)}var O$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"data",LZ(arguments.length<=0?void 0:arguments[0])?{values:arguments.length<=0?void 0:arguments[0]}:UZ(arguments.length<=0?void 0:arguments[0])?{url:arguments.length<=0?void 0:arguments[0]}:arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"align",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"align",e),t}return kZ(this,"align")}},{key:"autosize",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"autosize",e),t}return kZ(this,"autosize")}},{key:"background",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"background",e),t}return kZ(this,"background")}},{key:"bounds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bounds",e),t}return kZ(this,"bounds")}},{key:"center",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"center",e),t}return kZ(this,"center")}},{key:"config",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"config",e),t}return kZ(this,"config")}},{key:"datasets",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datasets",e),t}return kZ(this,"datasets")}},{key:"description",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"description",e),t}return kZ(this,"description")}},{key:"height",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"height",e),t}return kZ(this,"height")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"padding",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"padding",e),t}return kZ(this,"padding")}},{key:"resolve",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"resolve",e),t}return kZ(this,"resolve")}},{key:"spacing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"spacing",e),t}return kZ(this,"spacing")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"usermeta",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"usermeta",e),t}return kZ(this,"usermeta")}},{key:"view",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"view",e),t}return kZ(this,"view")}},{key:"width",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"width",e),t}return kZ(this,"width")}},{key:"encode",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1===t.length&&Array.isArray(t[0])&&(t=t[0]),t.length){var r=kZ(this,"encoding"),i=xZ(this);return r&&(t=[r].concat(t)),_Z(i,"encoding",jZ(1,t)),i}return kZ(this,"encoding")}},{key:"select",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1===t.length&&Array.isArray(t[0])&&(t=t[0]),t.length){var r=kZ(this,"selection"),i=xZ(this);return r&&(t=[r].concat(t)),_Z(i,"selection",jZ(1,t)),i}return kZ(this,"selection")}},{key:"project",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"projection",e),t}return kZ(this,"projection")}},{key:"data",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"data",e=LZ(e)?{values:e}:UZ(e)?{url:e}:e),t}return kZ(this,"data")}},{key:"transform",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"transform",t=QZ(t)),r}return kZ(this,"transform")}},{key:"fields",value:function(){var e,t=S$();return(e=t=wZ(t,this)).fields.apply(e,arguments)}},{key:"key",value:function(){var e,t=S$();return(e=t=wZ(t,this)).key.apply(e,arguments)}},{key:"mark",value:function(){var e=r$.apply(void 0,arguments);return wZ(e,this)}},{key:"layer",value:function(){var e=E$.apply(void 0,arguments);return wZ(e,this)}},{key:"hconcat",value:function(){var e=Q$.apply(void 0,arguments);return wZ(e,this)}},{key:"vconcat",value:function(){var e=_$.apply(void 0,arguments);return wZ(e,this)}},{key:"facet",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.slice(0,1);var r=t$.apply(void 0,Object(im.a)(t));return r.spec(this)}},{key:"repeat",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t=t.slice(0,1);var r=$Z.apply(void 0,Object(im.a)(t));return r.spec(this)}},{key:"render",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return JZ.apply(this,t)}},{key:"toView",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return KZ.apply(this,t)}},{key:"toSpec",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return WZ.apply(this,t)}},{key:"toString",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return VZ.apply(this,t)}}]),n}(BZ);function D$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(O$,t)}var R$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"url",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"format",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"format",e),t}return kZ(this,"format")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"url",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"url",e),t}return kZ(this,"url")}}]),n}(BZ);function j$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(R$,t)}var M$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"values",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"format",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"format",e),t}return kZ(this,"format")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"values",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"values",e),t}return kZ(this,"values")}}]),n}(BZ);function N$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(M$,t)}var F$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"start",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"stop",arguments.length<=1?void 0:arguments[1]),void 0!==(arguments.length<=2?void 0:arguments[2])&&_Z(Object(F.a)(e),"step",arguments.length<=2?void 0:arguments[2]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"start",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"start",e),t}return kZ(this,"start")}},{key:"step",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"step",e),t}return kZ(this,"step")}},{key:"stop",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"stop",e),t}return kZ(this,"stop")}},{key:"toJSON",value:function(){return{sequence:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}}]),n}(BZ);function T$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(F$,t)}var L$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"toJSON",value:function(){return{sphere:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}}]),n}(BZ);function P$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(L$,t)}var U$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"extent",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"extent",t=QZ(t)),r}return kZ(this,"extent")}},{key:"extentMajor",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"extentMajor",t=QZ(t)),r}return kZ(this,"extentMajor")}},{key:"extentMinor",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"extentMinor",t=QZ(t)),r}return kZ(this,"extentMinor")}},{key:"precision",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"precision",e),t}return kZ(this,"precision")}},{key:"step",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"step",t=QZ(t)),r}return kZ(this,"step")}},{key:"stepMajor",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"stepMajor",t=QZ(t)),r}return kZ(this,"stepMajor")}},{key:"stepMinor",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"stepMinor",t=QZ(t)),r}return kZ(this,"stepMinor")}},{key:"toJSON",value:function(){return{graticule:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}}]),n}(BZ);function G$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(U$,t)}var q$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"type","csv"),i=i.map((function(e){return PZ(e)||LZ(e)?{values:e}:UZ(e)?{url:e}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"parse",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"parse",e),t}return kZ(this,"parse")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"url",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"url",e),t}return kZ(this,"url")}},{key:"values",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"values",e),t}return kZ(this,"values")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"toJSON",value:function(){return MZ(Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this),["url","values","name"],"format")}}]),n}(BZ);function H$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(q$,t)}var Y$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"type","dsv"),i=i.map((function(e){return PZ(e)||LZ(e)?{values:e}:UZ(e)?{url:e}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"delimiter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"delimiter",e),t}return kZ(this,"delimiter")}},{key:"parse",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"parse",e),t}return kZ(this,"parse")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"url",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"url",e),t}return kZ(this,"url")}},{key:"values",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"values",e),t}return kZ(this,"values")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"toJSON",value:function(){return MZ(Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this),["url","values","name"],"format")}}]),n}(BZ);function J$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(Y$,t)}var z$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"type","json"),i=i.map((function(e){return PZ(e)||LZ(e)?{values:e}:UZ(e)?{url:e}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"parse",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"parse",e),t}return kZ(this,"parse")}},{key:"property",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"property",e),t}return kZ(this,"property")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"url",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"url",e),t}return kZ(this,"url")}},{key:"values",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"values",e),t}return kZ(this,"values")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"toJSON",value:function(){return MZ(Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this),["url","values","name"],"format")}}]),n}(BZ);function K$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(z$,t)}var W$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"type","topojson"),i=i.map((function(e){return PZ(e)||LZ(e)?{values:e}:UZ(e)?{url:e}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"feature",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"feature",e),t}return kZ(this,"feature")}},{key:"mesh",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"mesh",e),t}return kZ(this,"mesh")}},{key:"parse",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"parse",e),t}return kZ(this,"parse")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"url",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"url",e),t}return kZ(this,"url")}},{key:"values",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"values",e),t}return kZ(this,"values")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"toJSON",value:function(){return MZ(Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this),["url","values","name"],"format")}}]),n}(BZ);function V$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(W$,t)}var X$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"type","tsv"),i=i.map((function(e){return PZ(e)||LZ(e)?{values:e}:UZ(e)?{url:e}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"parse",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"parse",e),t}return kZ(this,"parse")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"url",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"url",e),t}return kZ(this,"url")}},{key:"values",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"values",e),t}return kZ(this,"values")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"toJSON",value:function(){return MZ(Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this),["url","values","name"],"format")}}]),n}(BZ);function Z$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(X$,t)}var $$=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"type","csv");for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"parse",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"parse",e),t}return kZ(this,"parse")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}}]),n}(BZ);function e0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)($$,t)}var t0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"type","dsv");for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"delimiter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"delimiter",e),t}return kZ(this,"delimiter")}},{key:"parse",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"parse",e),t}return kZ(this,"parse")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}}]),n}(BZ);function n0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(t0,t)}var r0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"type","json");for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"parse",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"parse",e),t}return kZ(this,"parse")}},{key:"property",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"property",e),t}return kZ(this,"property")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}}]),n}(BZ);function i0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(r0,t)}var a0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"type","topojson");for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"feature",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"feature",e),t}return kZ(this,"feature")}},{key:"mesh",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"mesh",e),t}return kZ(this,"mesh")}},{key:"parse",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"parse",e),t}return kZ(this,"parse")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}}]),n}(BZ);function o0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(a0,t)}var s0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"type","tsv");for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"parse",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"parse",e),t}return kZ(this,"parse")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}}]),n}(BZ);function u0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(s0,t)}var A0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"condition",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"condition",e),t}return kZ(this,"condition")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"legend",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"legend",e),t}return kZ(this,"legend")}},{key:"scale",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"scale",e),t}return kZ(this,"scale")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{angle:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function c0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(A0,t)}var l0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"condition",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"condition",e),t}return kZ(this,"condition")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"legend",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"legend",e),t}return kZ(this,"legend")}},{key:"scale",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"scale",e),t}return kZ(this,"scale")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{color:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function f0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(l0,t)}var h0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=i.map((function(e){return UZ(e)?{field:e,type:"ordinal"}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"align",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"align",e),t}return kZ(this,"align")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"center",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"center",e),t}return kZ(this,"center")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"header",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"header",e),t}return kZ(this,"header")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"spacing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"spacing",e),t}return kZ(this,"spacing")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{column:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function g0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(h0,t)}var d0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=i.map((function(e){return LZ(e)?e.map((function(e){return UZ(e)?{field:e,type:"nominal"}:e})):UZ(e)?{field:e,type:"nominal"}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{detail:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function p0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(d0,t)}var v0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=i.map((function(e){return UZ(e)?{field:e,type:"ordinal"}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"align",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"align",e),t}return kZ(this,"align")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"bounds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bounds",e),t}return kZ(this,"bounds")}},{key:"center",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"center",e),t}return kZ(this,"center")}},{key:"columns",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"columns",e),t}return kZ(this,"columns")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"header",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"header",e),t}return kZ(this,"header")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"spacing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"spacing",e),t}return kZ(this,"spacing")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{facet:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function y0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(v0,t)}var m0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"condition",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"condition",e),t}return kZ(this,"condition")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"legend",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"legend",e),t}return kZ(this,"legend")}},{key:"scale",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"scale",e),t}return kZ(this,"scale")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{fill:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function I0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(m0,t)}var b0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"condition",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"condition",e),t}return kZ(this,"condition")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"legend",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"legend",e),t}return kZ(this,"legend")}},{key:"scale",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"scale",e),t}return kZ(this,"scale")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{fillOpacity:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function E0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(b0,t)}var C0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=i.map((function(e){return UZ(e)?{field:e,type:"nominal"}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"condition",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"condition",e),t}return kZ(this,"condition")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"format",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"format",e),t}return kZ(this,"format")}},{key:"formatType",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"formatType",e),t}return kZ(this,"formatType")}},{key:"labelExpr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"labelExpr",e),t}return kZ(this,"labelExpr")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{href:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function B0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(C0,t)}var w0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=i.map((function(e){return UZ(e)?{field:e,type:"nominal"}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{key:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function Q0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(w0,t)}var k0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=i.map((function(e){return UZ(e)?{field:e,type:"quantitative"}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{latitude:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function _0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(k0,t)}var x0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=i.map((function(e){return UZ(e)?{field:e,type:"quantitative"}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{latitude2:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function S0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(x0,t)}var O0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=i.map((function(e){return UZ(e)?{field:e,type:"quantitative"}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{longitude:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function D0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(O0,t)}var R0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=i.map((function(e){return UZ(e)?{field:e,type:"quantitative"}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{longitude2:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function j0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(R0,t)}var M0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"condition",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"condition",e),t}return kZ(this,"condition")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"legend",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"legend",e),t}return kZ(this,"legend")}},{key:"scale",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"scale",e),t}return kZ(this,"scale")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{opacity:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function N0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(M0,t)}var F0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=i.map((function(e){return UZ(e)?{field:e,type:"ordinal"}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{order:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function T0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(F0,t)}var L0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"scale",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"scale",e),t}return kZ(this,"scale")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"stack",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"stack",e),t}return kZ(this,"stack")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{radius:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function P0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(L0,t)}var U0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{radius2:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function G0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(U0,t)}var q0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=i.map((function(e){return UZ(e)?{field:e,type:"ordinal"}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"align",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"align",e),t}return kZ(this,"align")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"center",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"center",e),t}return kZ(this,"center")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"header",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"header",e),t}return kZ(this,"header")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"spacing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"spacing",e),t}return kZ(this,"spacing")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{row:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function H0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(q0,t)}var Y0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=i.map((function(e){return UZ(e)?{field:e,type:"nominal"}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"condition",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"condition",e),t}return kZ(this,"condition")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"legend",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"legend",e),t}return kZ(this,"legend")}},{key:"scale",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"scale",e),t}return kZ(this,"scale")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{shape:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function J0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(Y0,t)}var z0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"condition",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"condition",e),t}return kZ(this,"condition")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"legend",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"legend",e),t}return kZ(this,"legend")}},{key:"scale",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"scale",e),t}return kZ(this,"scale")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{size:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function K0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(z0,t)}var W0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"condition",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"condition",e),t}return kZ(this,"condition")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"legend",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"legend",e),t}return kZ(this,"legend")}},{key:"scale",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"scale",e),t}return kZ(this,"scale")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{stroke:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function V0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(W0,t)}var X0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"condition",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"condition",e),t}return kZ(this,"condition")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"legend",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"legend",e),t}return kZ(this,"legend")}},{key:"scale",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"scale",e),t}return kZ(this,"scale")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"value",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"value",t=QZ(t)),r}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{strokeDash:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function Z0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(X0,t)}var $0=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"condition",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"condition",e),t}return kZ(this,"condition")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"legend",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"legend",e),t}return kZ(this,"legend")}},{key:"scale",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"scale",e),t}return kZ(this,"scale")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{strokeOpacity:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function e1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)($0,t)}var t1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"condition",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"condition",e),t}return kZ(this,"condition")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"legend",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"legend",e),t}return kZ(this,"legend")}},{key:"scale",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"scale",e),t}return kZ(this,"scale")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{strokeWidth:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function n1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(t1,t)}var r1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=i.map((function(e){return UZ(e)?{field:e,type:"nominal"}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"condition",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"condition",e),t}return kZ(this,"condition")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"format",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"format",e),t}return kZ(this,"format")}},{key:"formatType",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"formatType",e),t}return kZ(this,"formatType")}},{key:"labelExpr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"labelExpr",e),t}return kZ(this,"labelExpr")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{text:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function i1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(r1,t)}var a1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"scale",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"scale",e),t}return kZ(this,"scale")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"stack",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"stack",e),t}return kZ(this,"stack")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{theta:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function o1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(a1,t)}var s1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{theta2:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function u1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(s1,t)}var A1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=i.map((function(e){return LZ(e)?e.map((function(e){return UZ(e)?{field:e,type:"nominal"}:e})):UZ(e)?{field:e,type:"nominal"}:e})),wZ.apply(void 0,[Object(F.a)(e)].concat(Object(im.a)(i))),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"condition",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"condition",e),t}return kZ(this,"condition")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"format",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"format",e),t}return kZ(this,"format")}},{key:"formatType",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"formatType",e),t}return kZ(this,"formatType")}},{key:"labelExpr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"labelExpr",e),t}return kZ(this,"labelExpr")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{tooltip:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function c1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(A1,t)}var l1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"condition",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"condition",e),t}return kZ(this,"condition")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"format",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"format",e),t}return kZ(this,"format")}},{key:"formatType",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"formatType",e),t}return kZ(this,"formatType")}},{key:"labelExpr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"labelExpr",e),t}return kZ(this,"labelExpr")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{url:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function f1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(l1,t)}var h1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"axis",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"axis",e),t}return kZ(this,"axis")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"impute",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"impute",e),t}return kZ(this,"impute")}},{key:"scale",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"scale",e),t}return kZ(this,"scale")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"stack",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"stack",e),t}return kZ(this,"stack")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{x:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function g1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(h1,t)}var d1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{x2:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function p1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(d1,t)}var v1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{xError:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function y1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(v1,t)}var m1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{xError2:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function I1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(m1,t)}var b1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"axis",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"axis",e),t}return kZ(this,"axis")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"impute",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"impute",e),t}return kZ(this,"impute")}},{key:"scale",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"scale",e),t}return kZ(this,"scale")}},{key:"sort",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sort",e),t}return kZ(this,"sort")}},{key:"stack",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"stack",e),t}return kZ(this,"stack")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{y:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function E1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(b1,t)}var C1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"datum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"datum",e),t}return kZ(this,"datum")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{y2:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function B1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(C1,t)}var w1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{yError:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function Q1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(w1,t)}var k1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"aggregate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"aggregate",e),t}return kZ(this,"aggregate")}},{key:"band",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"band",e),t}return kZ(this,"band")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"title",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"title",e),t}return kZ(this,"title")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}},{key:"fieldN",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","nominal"),t}return kZ(this,"field")}},{key:"fieldO",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","ordinal"),t}return kZ(this,"field")}},{key:"fieldQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),t}return kZ(this,"field")}},{key:"fieldT",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),t}return kZ(this,"field")}},{key:"if",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length&&(t[0]={test:t[0]}),arguments.length){var r=kZ(this,"condition")||[],i=xZ(this);return _Z(i,"condition",(t=[].concat(r,jZ(0,t))).length>1?t:t[0]),i}return kZ(this,"condition")}},{key:"count",value:function(){var e=xZ(this);return _Z(e,"type","quantitative"),_Z(e,"aggregate","count"),e}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","valid"),t}return kZ(this,"field")}},{key:"missing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","missing"),t}return kZ(this,"field")}},{key:"distinct",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","distinct"),t}return kZ(this,"field")}},{key:"sum",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","sum"),t}return kZ(this,"field")}},{key:"mean",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","mean"),t}return kZ(this,"field")}},{key:"product",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","product"),t}return kZ(this,"field")}},{key:"average",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","average"),t}return kZ(this,"field")}},{key:"variance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variance"),t}return kZ(this,"field")}},{key:"variancep",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","variancep"),t}return kZ(this,"field")}},{key:"stdev",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdev"),t}return kZ(this,"field")}},{key:"stdevp",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stdevp"),t}return kZ(this,"field")}},{key:"stderr",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","stderr"),t}return kZ(this,"field")}},{key:"median",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","median"),t}return kZ(this,"field")}},{key:"q1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q1"),t}return kZ(this,"field")}},{key:"q3",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","q3"),t}return kZ(this,"field")}},{key:"ci0",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci0"),t}return kZ(this,"field")}},{key:"ci1",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","ci1"),t}return kZ(this,"field")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","min"),t}return kZ(this,"field")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","max"),t}return kZ(this,"field")}},{key:"argmin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmin"),t}return kZ(this,"field")}},{key:"argmax",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","quantitative"),_Z(t,"aggregate","argmax"),t}return kZ(this,"field")}},{key:"year",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","year"),t}return kZ(this,"field")}},{key:"quarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quarter"),t}return kZ(this,"field")}},{key:"month",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","month"),t}return kZ(this,"field")}},{key:"day",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","day"),t}return kZ(this,"field")}},{key:"date",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","date"),t}return kZ(this,"field")}},{key:"hours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hours"),t}return kZ(this,"field")}},{key:"minutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutes"),t}return kZ(this,"field")}},{key:"seconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","seconds"),t}return kZ(this,"field")}},{key:"milliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","milliseconds"),t}return kZ(this,"field")}},{key:"yearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquarter"),t}return kZ(this,"field")}},{key:"timeYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearquartermonth"),t}return kZ(this,"field")}},{key:"timeYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonth"),t}return kZ(this,"field")}},{key:"timeYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdate"),t}return kZ(this,"field")}},{key:"timeYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehours"),t}return kZ(this,"field")}},{key:"timeYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"timeYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","yearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","quartermonth"),t}return kZ(this,"field")}},{key:"timeMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdate"),t}return kZ(this,"field")}},{key:"timeMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","monthdatehours"),t}return kZ(this,"field")}},{key:"timeHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutes"),t}return kZ(this,"field")}},{key:"timeHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","hoursminutesseconds"),t}return kZ(this,"field")}},{key:"timeMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","minutesseconds"),t}return kZ(this,"field")}},{key:"timeSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","secondsmilliseconds"),t}return kZ(this,"field")}},{key:"utcyear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyear"),t}return kZ(this,"field")}},{key:"utcquarter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquarter"),t}return kZ(this,"field")}},{key:"utcmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonth"),t}return kZ(this,"field")}},{key:"utcday",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcday"),t}return kZ(this,"field")}},{key:"utcdate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcdate"),t}return kZ(this,"field")}},{key:"utchours",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchours"),t}return kZ(this,"field")}},{key:"utcminutes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutes"),t}return kZ(this,"field")}},{key:"utcseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcseconds"),t}return kZ(this,"field")}},{key:"utcmilliseconds",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmilliseconds"),t}return kZ(this,"field")}},{key:"utcyearmonth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYQ",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquarter"),t}return kZ(this,"field")}},{key:"utcYQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearquartermonth"),t}return kZ(this,"field")}},{key:"utcYM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonth"),t}return kZ(this,"field")}},{key:"utcYMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdate"),t}return kZ(this,"field")}},{key:"utcYMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehours"),t}return kZ(this,"field")}},{key:"utcYMDHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutes"),t}return kZ(this,"field")}},{key:"utcYMDHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcyearmonthdatehoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcQM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcquartermonth"),t}return kZ(this,"field")}},{key:"utcMD",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdate"),t}return kZ(this,"field")}},{key:"utcMDH",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcmonthdatehours"),t}return kZ(this,"field")}},{key:"utcHM",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutes"),t}return kZ(this,"field")}},{key:"utcHMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utchoursminutesseconds"),t}return kZ(this,"field")}},{key:"utcMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcminutesseconds"),t}return kZ(this,"field")}},{key:"utcSMS",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),_Z(t,"type","temporal"),_Z(t,"timeUnit","utcsecondsmilliseconds"),t}return kZ(this,"field")}},{key:"toJSON",value:function(e){return e?{yError2:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}:Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)}}]),n}(BZ);function _1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(k1,t)}var x1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function S1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(x1,t)}function O1(){var e=S1.apply(void 0,arguments);return _Z(e,"type","nominal"),e}function D1(){var e=S1.apply(void 0,arguments);return _Z(e,"type","ordinal"),e}function R1(){var e=S1.apply(void 0,arguments);return _Z(e,"type","quantitative"),e}function j1(){var e=S1.apply(void 0,arguments);return _Z(e,"type","temporal"),e}var M1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"encoding",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"encoding",e),t}return kZ(this,"encoding")}}]),n}(BZ);function N1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(M1,t)}var F1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"repeat",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"repeat",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"repeat",e),t}return kZ(this,"repeat")}}]),n}(BZ);function T1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(F1,t)}var L1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"value",arguments.length<=0?void 0:arguments[0]),e}return n}(BZ);function P1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(L1,t)}var U1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"type",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"center",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"center",t=QZ(t)),r}return kZ(this,"center")}},{key:"clipAngle",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"clipAngle",e),t}return kZ(this,"clipAngle")}},{key:"clipExtent",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"clipExtent",t=QZ(t)),r}return kZ(this,"clipExtent")}},{key:"coefficient",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"coefficient",e),t}return kZ(this,"coefficient")}},{key:"distance",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"distance",e),t}return kZ(this,"distance")}},{key:"extent",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"extent",t=QZ(t)),r}return kZ(this,"extent")}},{key:"fit",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"fit",t=1!==t.length||Array.isArray(t[0])?QZ(t):t[0]),r}return kZ(this,"fit")}},{key:"fraction",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"fraction",e),t}return kZ(this,"fraction")}},{key:"lobes",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lobes",e),t}return kZ(this,"lobes")}},{key:"parallel",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"parallel",e),t}return kZ(this,"parallel")}},{key:"parallels",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"parallels",t=QZ(t)),r}return kZ(this,"parallels")}},{key:"pointRadius",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"pointRadius",e),t}return kZ(this,"pointRadius")}},{key:"precision",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"precision",e),t}return kZ(this,"precision")}},{key:"radius",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"radius",e),t}return kZ(this,"radius")}},{key:"ratio",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"ratio",e),t}return kZ(this,"ratio")}},{key:"reflectX",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"reflectX",e),t}return kZ(this,"reflectX")}},{key:"reflectY",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"reflectY",e),t}return kZ(this,"reflectY")}},{key:"rotate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"rotate",t=QZ(t)),r}return kZ(this,"rotate")}},{key:"scale",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"scale",e),t}return kZ(this,"scale")}},{key:"size",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"size",t=QZ(t)),r}return kZ(this,"size")}},{key:"spacing",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"spacing",e),t}return kZ(this,"spacing")}},{key:"tilt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"tilt",e),t}return kZ(this,"tilt")}},{key:"translate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"translate",t=QZ(t)),r}return kZ(this,"translate")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}}]),n}(BZ);function G1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(U1,t)}var q1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"type","interval"),e._sel=void 0!==(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:CZ("sel"),e}return Object(x.a)(n,[{key:"bind",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bind",e),t}return kZ(this,"bind")}},{key:"clear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"clear",e),t}return kZ(this,"clear")}},{key:"empty",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"empty",e),t}return kZ(this,"empty")}},{key:"encodings",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"encodings",t=QZ(t)),r}return kZ(this,"encodings")}},{key:"fields",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"fields",t=QZ(t)),r}return kZ(this,"fields")}},{key:"init",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"init",e),t}return kZ(this,"init")}},{key:"mark",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"mark",e),t}return kZ(this,"mark")}},{key:"on",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"on",e),t}return kZ(this,"on")}},{key:"resolve",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"resolve",e),t}return kZ(this,"resolve")}},{key:"translate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"translate",e),t}return kZ(this,"translate")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"zoom",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"zoom",e),t}return kZ(this,"zoom")}},{key:"toJSON",value:function(e){return e?Object(Q.a)({},this._sel,Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)):{selection:this._sel}}}]),n}(BZ);function H1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(q1,t)}var Y1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"type","multi"),e._sel=void 0!==(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:CZ("sel"),e}return Object(x.a)(n,[{key:"bind",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bind",e),t}return kZ(this,"bind")}},{key:"clear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"clear",e),t}return kZ(this,"clear")}},{key:"empty",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"empty",e),t}return kZ(this,"empty")}},{key:"encodings",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"encodings",t=QZ(t)),r}return kZ(this,"encodings")}},{key:"fields",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"fields",t=QZ(t)),r}return kZ(this,"fields")}},{key:"init",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"init",t=QZ(t)),r}return kZ(this,"init")}},{key:"nearest",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"nearest",e),t}return kZ(this,"nearest")}},{key:"on",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"on",e),t}return kZ(this,"on")}},{key:"resolve",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"resolve",e),t}return kZ(this,"resolve")}},{key:"toggle",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"toggle",e),t}return kZ(this,"toggle")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"toJSON",value:function(e){return e?Object(Q.a)({},this._sel,Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)):{selection:this._sel}}}]),n}(BZ);function J1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(Y1,t)}var z1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"type","single"),e._sel=void 0!==(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:CZ("sel"),e}return Object(x.a)(n,[{key:"bind",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bind",e),t}return kZ(this,"bind")}},{key:"clear",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"clear",e),t}return kZ(this,"clear")}},{key:"empty",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"empty",e),t}return kZ(this,"empty")}},{key:"encodings",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"encodings",t=QZ(t)),r}return kZ(this,"encodings")}},{key:"fields",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"fields",t=QZ(t)),r}return kZ(this,"fields")}},{key:"init",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"init",e),t}return kZ(this,"init")}},{key:"nearest",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"nearest",e),t}return kZ(this,"nearest")}},{key:"on",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"on",e),t}return kZ(this,"on")}},{key:"resolve",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"resolve",e),t}return kZ(this,"resolve")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}},{key:"toJSON",value:function(e){return e?Object(Q.a)({},this._sel,Object(IY.a)(Object(mY.a)(n.prototype),"toJSON",this).call(this)):{selection:this._sel}}}]),n}(BZ);function K1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(z1,t)}var W1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"input","checkbox");for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return wZ.apply(void 0,[Object(F.a)(e)].concat(i)),e}return Object(x.a)(n,[{key:"debounce",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"debounce",e),t}return kZ(this,"debounce")}},{key:"element",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"element",e),t}return kZ(this,"element")}},{key:"input",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"input",e),t}return kZ(this,"input")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}}]),n}(BZ);function V1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(W1,t)}var X1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"input","select"),i=QZ(i),_Z(Object(F.a)(e),"options",i),e}return Object(x.a)(n,[{key:"debounce",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"debounce",e),t}return kZ(this,"debounce")}},{key:"element",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"element",e),t}return kZ(this,"element")}},{key:"input",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"input",e),t}return kZ(this,"input")}},{key:"labels",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"labels",t=QZ(t)),r}return kZ(this,"labels")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"options",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"options",t=QZ(t)),r}return kZ(this,"options")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}}]),n}(BZ);function Z1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(X1,t)}var $1=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"input","radio"),i=QZ(i),_Z(Object(F.a)(e),"options",i),e}return Object(x.a)(n,[{key:"debounce",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"debounce",e),t}return kZ(this,"debounce")}},{key:"element",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"element",e),t}return kZ(this,"element")}},{key:"input",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"input",e),t}return kZ(this,"input")}},{key:"labels",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"labels",t=QZ(t)),r}return kZ(this,"labels")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"options",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"options",t=QZ(t)),r}return kZ(this,"options")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}}]),n}(BZ);function e2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)($1,t)}var t2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"input","range"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"min",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"max",arguments.length<=1?void 0:arguments[1]),void 0!==(arguments.length<=2?void 0:arguments[2])&&_Z(Object(F.a)(e),"step",arguments.length<=2?void 0:arguments[2]),e}return Object(x.a)(n,[{key:"debounce",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"debounce",e),t}return kZ(this,"debounce")}},{key:"element",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"element",e),t}return kZ(this,"element")}},{key:"input",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"input",e),t}return kZ(this,"input")}},{key:"max",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"max",e),t}return kZ(this,"max")}},{key:"min",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"min",e),t}return kZ(this,"min")}},{key:"name",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"name",e),t}return kZ(this,"name")}},{key:"step",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"step",e),t}return kZ(this,"step")}},{key:"type",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"type",e),t}return kZ(this,"type")}}]),n}(BZ);function n2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(t2,t)}var r2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"not",arguments.length<=0?void 0:arguments[0]),e}return n}(BZ);function i2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(r2,t)}var a2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=QZ(i),_Z(Object(F.a)(e),"and",i),e}return n}(BZ);function o2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(a2,t)}var s2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=QZ(i),_Z(Object(F.a)(e),"or",i),e}return n}(BZ);function u2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(s2,t)}var A2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=QZ(i),_Z(Object(F.a)(e),"aggregate",i),e}return Object(x.a)(n,[{key:"aggregate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"aggregate",t=QZ(t)),r}return kZ(this,"aggregate")}},{key:"groupby",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"groupby",t=QZ(t)),r}return kZ(this,"groupby")}}]),n}(BZ);function c2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(A2,t)}var l2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),_Z(Object(F.a)(e),"bin",void 0===(arguments.length<=1?void 0:arguments[1])||(arguments.length<=1?void 0:arguments[1])),e}return Object(x.a)(n,[{key:"as",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"as",t=1!==t.length||Array.isArray(t[0])?QZ(t):t[0]),r}return kZ(this,"as")}},{key:"bin",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bin",e),t}return kZ(this,"bin")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}}]),n}(BZ);function f2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(l2,t)}var h2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"calculate",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"calculate",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"calculate",e),t}return kZ(this,"calculate")}}]),n}(BZ);function g2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(h2,t)}var d2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"density",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"as",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"as",t=QZ(t)),r}return kZ(this,"as")}},{key:"bandwidth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bandwidth",e),t}return kZ(this,"bandwidth")}},{key:"counts",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"counts",e),t}return kZ(this,"counts")}},{key:"cumulative",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"cumulative",e),t}return kZ(this,"cumulative")}},{key:"density",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"density",e),t}return kZ(this,"density")}},{key:"extent",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"extent",t=QZ(t)),r}return kZ(this,"extent")}},{key:"groupby",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"groupby",t=QZ(t)),r}return kZ(this,"groupby")}},{key:"maxsteps",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"maxsteps",e),t}return kZ(this,"maxsteps")}},{key:"minsteps",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"minsteps",e),t}return kZ(this,"minsteps")}},{key:"steps",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"steps",e),t}return kZ(this,"steps")}}]),n}(BZ);function p2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(d2,t)}var v2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"filter",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"filter",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"filter",e),t}return kZ(this,"filter")}}]),n}(BZ);function y2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(v2,t)}var m2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=QZ(i),_Z(Object(F.a)(e),"flatten",i),e}return Object(x.a)(n,[{key:"as",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"as",t=QZ(t)),r}return kZ(this,"as")}},{key:"flatten",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"flatten",t=QZ(t)),r}return kZ(this,"flatten")}}]),n}(BZ);function I2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(m2,t)}var b2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=QZ(i),_Z(Object(F.a)(e),"fold",i),e}return Object(x.a)(n,[{key:"as",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"as",t=QZ(t)),r}return kZ(this,"as")}},{key:"fold",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"fold",t=QZ(t)),r}return kZ(this,"fold")}}]),n}(BZ);function E2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(b2,t)}var C2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"impute",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"key",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"frame",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"frame",t=QZ(t)),r}return kZ(this,"frame")}},{key:"groupby",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"groupby",t=QZ(t)),r}return kZ(this,"groupby")}},{key:"impute",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"impute",e),t}return kZ(this,"impute")}},{key:"key",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"key",e),t}return kZ(this,"key")}},{key:"keyvals",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"keyvals",t=1!==t.length||Array.isArray(t[0])?QZ(t):t[0]),r}return kZ(this,"keyvals")}},{key:"method",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"method",e),t}return kZ(this,"method")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}}]),n}(BZ);function B2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(C2,t)}var w2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=QZ(i),_Z(Object(F.a)(e),"joinaggregate",i),e}return Object(x.a)(n,[{key:"groupby",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"groupby",t=QZ(t)),r}return kZ(this,"groupby")}},{key:"joinaggregate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"joinaggregate",t=QZ(t)),r}return kZ(this,"joinaggregate")}}]),n}(BZ);function Q2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(w2,t)}var k2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=QZ(i),_Z(Object(F.a)(e),"joinaggregate",i),e}return Object(x.a)(n,[{key:"groupby",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"groupby",t=QZ(t)),r}return kZ(this,"groupby")}},{key:"joinaggregate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"joinaggregate",t=QZ(t)),r}return kZ(this,"joinaggregate")}}]),n}(BZ);function _2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(k2,t)}var x2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"loess",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"as",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"as",t=QZ(t)),r}return kZ(this,"as")}},{key:"bandwidth",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"bandwidth",e),t}return kZ(this,"bandwidth")}},{key:"groupby",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"groupby",t=QZ(t)),r}return kZ(this,"groupby")}},{key:"loess",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"loess",e),t}return kZ(this,"loess")}},{key:"on",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"on",e),t}return kZ(this,"on")}}]),n}(BZ);function S2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(x2,t)}var O2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"lookup",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"as",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"as",t=1!==t.length||Array.isArray(t[0])?QZ(t):t[0]),r}return kZ(this,"as")}},{key:"default",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"default",e),t}return kZ(this,"default")}},{key:"from",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"from",e),t}return kZ(this,"from")}},{key:"lookup",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lookup",e),t}return kZ(this,"lookup")}}]),n}(BZ);function D2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(O2,t)}var R2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"pivot",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"groupby",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"groupby",t=QZ(t)),r}return kZ(this,"groupby")}},{key:"limit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"limit",e),t}return kZ(this,"limit")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"pivot",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"pivot",e),t}return kZ(this,"pivot")}},{key:"value",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"value",e),t}return kZ(this,"value")}}]),n}(BZ);function j2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(R2,t)}var M2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"quantile",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"as",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"as",t=QZ(t)),r}return kZ(this,"as")}},{key:"groupby",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"groupby",t=QZ(t)),r}return kZ(this,"groupby")}},{key:"probs",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"probs",t=QZ(t)),r}return kZ(this,"probs")}},{key:"quantile",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"quantile",e),t}return kZ(this,"quantile")}},{key:"step",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"step",e),t}return kZ(this,"step")}}]),n}(BZ);function N2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(M2,t)}var F2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"regression",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"as",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"as",t=QZ(t)),r}return kZ(this,"as")}},{key:"extent",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"extent",t=QZ(t)),r}return kZ(this,"extent")}},{key:"groupby",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"groupby",t=QZ(t)),r}return kZ(this,"groupby")}},{key:"method",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"method",e),t}return kZ(this,"method")}},{key:"on",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"on",e),t}return kZ(this,"on")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}},{key:"params",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"params",e),t}return kZ(this,"params")}},{key:"regression",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"regression",e),t}return kZ(this,"regression")}}]),n}(BZ);function T2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(F2,t)}var L2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"sample",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"sample",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"sample",e),t}return kZ(this,"sample")}}]),n}(BZ);function P2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(L2,t)}var U2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"stack",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"as",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"as",t=1!==t.length||Array.isArray(t[0])?QZ(t):t[0]),r}return kZ(this,"as")}},{key:"groupby",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"groupby",t=QZ(t)),r}return kZ(this,"groupby")}},{key:"offset",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"offset",e),t}return kZ(this,"offset")}},{key:"sort",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"sort",t=QZ(t)),r}return kZ(this,"sort")}},{key:"stack",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"stack",e),t}return kZ(this,"stack")}}]),n}(BZ);function G2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(U2,t)}var q2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"timeUnit",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"field",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}}]),n}(BZ);function H2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(q2,t)}var Y2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=QZ(i),_Z(Object(F.a)(e),"window",i),e}return Object(x.a)(n,[{key:"frame",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"frame",t=QZ(t)),r}return kZ(this,"frame")}},{key:"groupby",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"groupby",t=QZ(t)),r}return kZ(this,"groupby")}},{key:"ignorePeers",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"ignorePeers",e),t}return kZ(this,"ignorePeers")}},{key:"sort",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"sort",t=QZ(t)),r}return kZ(this,"sort")}},{key:"window",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"window",t=QZ(t)),r}return kZ(this,"window")}}]),n}(BZ);function J2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(Y2,t)}var z2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){for(var e,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),i=QZ(i),_Z(Object(F.a)(e),"groupby",i),e}return Object(x.a)(n,[{key:"aggregate",value:function(){var e=c2.apply(void 0,arguments);return wZ(e,this)}},{key:"density",value:function(){var e=p2.apply(void 0,arguments);return wZ(e,this)}},{key:"join",value:function(){var e=_2.apply(void 0,arguments);return wZ(e,this)}},{key:"joinaggregate",value:function(){var e=Q2.apply(void 0,arguments);return wZ(e,this)}},{key:"loess",value:function(){var e=S2.apply(void 0,arguments);return wZ(e,this)}},{key:"pivot",value:function(){var e=j2.apply(void 0,arguments);return wZ(e,this)}},{key:"quantile",value:function(){var e=N2.apply(void 0,arguments);return wZ(e,this)}},{key:"regression",value:function(){var e=T2.apply(void 0,arguments);return wZ(e,this)}},{key:"window",value:function(){var e=J2.apply(void 0,arguments);return wZ(e,this)}}]),n}(BZ);function K2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(z2,t)}var W2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","count"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"as",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function V2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(W2,t)}var X2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","valid"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function Z2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(X2,t)}var $2=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","missing"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function e3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)($2,t)}var t3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","distinct"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function n3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(t3,t)}var r3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","sum"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function i3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(r3,t)}var a3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","mean"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function o3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(a3,t)}var s3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","product"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function u3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(s3,t)}var A3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","average"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function c3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(A3,t)}var l3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","variance"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function f3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(l3,t)}var h3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","variancep"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function g3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(h3,t)}var d3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","stdev"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function p3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(d3,t)}var v3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","stdevp"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function y3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(v3,t)}var m3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","stderr"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function I3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(m3,t)}var b3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","median"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function E3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(b3,t)}var C3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","q1"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function B3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(C3,t)}var w3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","q3"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function Q3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(w3,t)}var k3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","ci0"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function _3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(k3,t)}var x3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","ci1"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function S3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(x3,t)}var O3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","min"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function D3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(O3,t)}var R3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","max"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function j3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(R3,t)}var M3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","argmin"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function N3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(M3,t)}var F3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","argmax"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"order",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"order",e),t}return kZ(this,"order")}}]),n}(BZ);function T3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(F3,t)}var L3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","row_number"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"as",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"param",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"param",e),t}return kZ(this,"param")}}]),n}(BZ);function P3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(L3,t)}var U3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","rank"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"as",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"param",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"param",e),t}return kZ(this,"param")}}]),n}(BZ);function G3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(U3,t)}var q3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","dense_rank"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"as",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"param",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"param",e),t}return kZ(this,"param")}}]),n}(BZ);function H3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(q3,t)}var Y3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","percent_rank"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"as",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"param",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"param",e),t}return kZ(this,"param")}}]),n}(BZ);function J3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(Y3,t)}var z3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","cume_dist"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"as",arguments.length<=0?void 0:arguments[0]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"param",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"param",e),t}return kZ(this,"param")}}]),n}(BZ);function K3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(z3,t)}var W3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","ntile"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"param",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"param",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"param",e),t}return kZ(this,"param")}}]),n}(BZ);function V3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(W3,t)}var X3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","lag"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"param",arguments.length<=1?void 0:arguments[1]),void 0!==(arguments.length<=2?void 0:arguments[2])&&_Z(Object(F.a)(e),"as",arguments.length<=2?void 0:arguments[2]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"param",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"param",e),t}return kZ(this,"param")}}]),n}(BZ);function Z3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(X3,t)}var $3=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","lead"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"param",arguments.length<=1?void 0:arguments[1]),void 0!==(arguments.length<=2?void 0:arguments[2])&&_Z(Object(F.a)(e),"as",arguments.length<=2?void 0:arguments[2]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"param",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"param",e),t}return kZ(this,"param")}}]),n}(BZ);function e4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)($3,t)}var t4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","first_value"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"param",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"param",e),t}return kZ(this,"param")}}]),n}(BZ);function n4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(t4,t)}var r4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","last_Value"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"param",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"param",e),t}return kZ(this,"param")}}]),n}(BZ);function i4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(r4,t)}var a4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"op","nth_value"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"param",arguments.length<=1?void 0:arguments[1]),void 0!==(arguments.length<=2?void 0:arguments[2])&&_Z(Object(F.a)(e),"as",arguments.length<=2?void 0:arguments[2]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"op",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"op",e),t}return kZ(this,"op")}},{key:"param",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"param",e),t}return kZ(this,"param")}}]),n}(BZ);function o4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(a4,t)}var s4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","year"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function u4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(s4,t)}var A4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","quarter"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function c4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(A4,t)}var l4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","month"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function f4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(l4,t)}var h4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","day"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function g4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(h4,t)}var d4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","date"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function p4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(d4,t)}var v4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","hours"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function y4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(v4,t)}var m4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","minutes"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function I4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(m4,t)}var b4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","seconds"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function E4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(b4,t)}var C4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","milliseconds"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function B4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(C4,t)}var w4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","yearmonth"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function Q4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(w4,t)}var k4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","yearquarter"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function _4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(k4,t)}var x4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","yearquartermonth"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function S4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(x4,t)}var O4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","yearmonth"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function D4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(O4,t)}var R4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","yearmonthdate"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function j4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(R4,t)}var M4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","yearmonthdatehours"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function N4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(M4,t)}var F4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","yearmonthdatehoursminutes"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function T4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(F4,t)}var L4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","yearmonthdatehoursminutesseconds"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function P4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(L4,t)}var U4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","quartermonth"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function G4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(U4,t)}var q4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","monthdate"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function H4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(q4,t)}var Y4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","monthdatehours"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function J4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(Y4,t)}var z4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","hoursminutes"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function K4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(z4,t)}var W4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","hoursminutesseconds"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function V4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(W4,t)}var X4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","minutesseconds"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function Z4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(X4,t)}var $4=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","secondsmilliseconds"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function e5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)($4,t)}var t5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcyear"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function n5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(t5,t)}var r5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcquarter"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function i5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(r5,t)}var a5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcmonth"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function o5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(a5,t)}var s5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcday"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function u5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(s5,t)}var A5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcdate"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function c5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(A5,t)}var l5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utchours"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function f5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(l5,t)}var h5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcminutes"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function g5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(h5,t)}var d5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcseconds"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function p5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(d5,t)}var v5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcmilliseconds"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function y5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(v5,t)}var m5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcyearmonth"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function I5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(m5,t)}var b5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcyearquarter"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function E5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(b5,t)}var C5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcyearquartermonth"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function B5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(C5,t)}var w5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcyearmonth"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function Q5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(w5,t)}var k5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcyearmonthdate"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function _5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(k5,t)}var x5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcyearmonthdatehours"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function S5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(x5,t)}var O5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcyearmonthdatehoursminutes"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function D5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(O5,t)}var R5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcyearmonthdatehoursminutesseconds"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function j5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(R5,t)}var M5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcquartermonth"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function N5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(M5,t)}var F5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcmonthdate"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function T5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(F5,t)}var L5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcmonthdatehours"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function P5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(L5,t)}var U5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utchoursminutes"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function G5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(U5,t)}var q5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utchoursminutesseconds"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function H5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(q5,t)}var Y5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcminutesseconds"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function J5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(Y5,t)}var z5=function(e){Object(T.a)(n,e);var t=Object(L.a)(n);function n(){var e;return Object(_.a)(this,n),e=t.call(this),SZ(Object(F.a)(e)),_Z(Object(F.a)(e),"timeUnit","utcsecondsmilliseconds"),void 0!==(arguments.length<=0?void 0:arguments[0])&&_Z(Object(F.a)(e),"field",arguments.length<=0?void 0:arguments[0]),void 0!==(arguments.length<=1?void 0:arguments[1])&&_Z(Object(F.a)(e),"as",arguments.length<=1?void 0:arguments[1]),e}return Object(x.a)(n,[{key:"as",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"as",e),t}return kZ(this,"as")}},{key:"field",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"field",e),t}return kZ(this,"field")}},{key:"timeUnit",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"timeUnit",e),t}return kZ(this,"timeUnit")}},{key:"equals",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"equal",e),t}return kZ(this,"equal")}},{key:"gte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gte",e),t}return kZ(this,"gte")}},{key:"gt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"gt",e),t}return kZ(this,"gt")}},{key:"lte",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lte",e),t}return kZ(this,"lte")}},{key:"lt",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"lt",e),t}return kZ(this,"lt")}},{key:"oneOf",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"oneOf",t=QZ(t)),r}return kZ(this,"oneOf")}},{key:"inRange",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(arguments.length){var r=xZ(this);return _Z(r,"range",t=QZ(t)),r}return kZ(this,"range")}},{key:"valid",value:function(e){if(arguments.length){var t=xZ(this);return _Z(t,"valid",e),t}return kZ(this,"valid")}}]),n}(BZ);function K5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(TL.a)(z5,t)}var W5={dark:{background:null,title:{color:"#fff"},style:{"guide-label":{fill:"#fff"},"guide-title":{fill:"#fff"}},axis:{domainColor:"#fff",gridColor:"#888",tickColor:"#fff"}},light:{background:null}};var V5=n(123);n.d(t,"a",(function(){return Z5}));var X5=(XZ(p,y),I);function Z5(e){var t=e.data,n=e.theme,r=e.width,i=e.height,a=e.marginRight,o=void 0===a?90:a,s=e.marginBottom,u=void 0===s?120:s,A=e.keyLength,c=void 0===A?36:A,l=t.map((function(e){return Object(b.a)({},e,{keyName:e.key+e.name,colorString:Object(V5.c)(e.color)})})),f={domain:l.map((function(e){return e.key})),range:l.map((function(e){return e.colorString}))},h=l.map((function(e){return e.keyName})),g=X5.markBar().encode(X5.x().fieldN("keyName").axis({labelExpr:"substring(datum.label, ".concat(c,")")}).title("Cell Set Name").sort(h),X5.y().fieldQ("size").title("Cell Set Size"),X5.color().fieldN("key").scale(f).legend(null),X5.tooltip().fieldQ("size")).width(w()(r-o,10,1/0)).height(w()(i-u,10,1/0)).config(W5[n]).toJSON();return C.a.createElement(IZ,{data:l,spec:g})}},function(e,t,n){"use strict";var r=n(24),i=n(0),a=n.n(i),o=n(20),s=n(104),u=n.n(s),A=n(110),c=n.n(A),l=n(147),f=n.n(l),h=n(136),g=n.n(h),d=n(52),p=n.n(d),v=n(146),y=n.n(v),m=n(41),I=n.n(m),b=n(312),E=n(238),C=n.n(E),B=n(37);function w(e){var t=e.cellCount,n=e.cellSize,r=e.computeMetadataCallback,i=e.computeMetadataCallbackProps,a=e.nextCellsCount,o=e.nextCellSize,s=e.nextScrollToIndex,u=e.scrollToIndex,A=e.updateScrollOffsetForScrollToIndex;t===a&&("number"!==typeof n&&"number"!==typeof o||n===o)||(r(i),u>=0&&u===s&&A())}var Q=n(532),k=n.n(Q),_=(n(28),function(){function e(t){var n=t.cellCount,r=t.cellSizeGetter,i=t.estimatedCellSize;u()(this,e),I()(this,"_cellSizeAndPositionData",{}),I()(this,"_lastMeasuredIndex",-1),I()(this,"_lastBatchedIndex",-1),I()(this,"_cellCount",void 0),I()(this,"_cellSizeGetter",void 0),I()(this,"_estimatedCellSize",void 0),this._cellSizeGetter=r,this._cellCount=n,this._estimatedCellSize=i}return c()(e,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(e){var t=e.cellCount,n=e.estimatedCellSize,r=e.cellSizeGetter;this._cellCount=t,this._estimatedCellSize=n,this._cellSizeGetter=r}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(e){if(e<0||e>=this._cellCount)throw Error("Requested index ".concat(e," is outside of range 0..").concat(this._cellCount));if(e>this._lastMeasuredIndex)for(var t=this.getSizeAndPositionOfLastMeasuredCell(),n=t.offset+t.size,r=this._lastMeasuredIndex+1;r<=e;r++){var i=this._cellSizeGetter({index:r});if(void 0===i||isNaN(i))throw Error("Invalid size returned for cell ".concat(r," of value ").concat(i));null===i?(this._cellSizeAndPositionData[r]={offset:n,size:0},this._lastBatchedIndex=e):(this._cellSizeAndPositionData[r]={offset:n,size:i},n+=i,this._lastMeasuredIndex=e)}return this._cellSizeAndPositionData[e]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var e=this.getSizeAndPositionOfLastMeasuredCell();return e.offset+e.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,n=void 0===t?"auto":t,r=e.containerSize,i=e.currentOffset,a=e.targetIndex;if(r<=0)return 0;var o,s=this.getSizeAndPositionOfCell(a),u=s.offset,A=u-r+s.size;switch(n){case"start":o=u;break;case"end":o=A;break;case"center":o=u-(r-s.size)/2;break;default:o=Math.max(A,Math.min(u,i))}var c=this.getTotalSize();return Math.max(0,Math.min(c-r,o))}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,n=e.offset;if(0===this.getTotalSize())return{};var r=n+t,i=this._findNearestCell(n),a=this.getSizeAndPositionOfCell(i);n=a.offset+a.size;for(var o=i;n<r&&o<this._cellCount-1;)o++,n+=this.getSizeAndPositionOfCell(o).size;return{start:i,stop:o}}},{key:"resetCell",value:function(e){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,e-1)}},{key:"_binarySearch",value:function(e,t,n){for(;t<=e;){var r=t+Math.floor((e-t)/2),i=this.getSizeAndPositionOfCell(r).offset;if(i===n)return r;i<n?t=r+1:i>n&&(e=r-1)}return t>0?t-1:0}},{key:"_exponentialSearch",value:function(e,t){for(var n=1;e<this._cellCount&&this.getSizeAndPositionOfCell(e).offset<t;)e+=n,n*=2;return this._binarySearch(Math.min(e,this._cellCount-1),Math.floor(e/2),t)}},{key:"_findNearestCell",value:function(e){if(isNaN(e))throw Error("Invalid offset ".concat(e," specified"));e=Math.max(0,e);var t=this.getSizeAndPositionOfLastMeasuredCell(),n=Math.max(0,this._lastMeasuredIndex);return t.offset>=e?this._binarySearch(n,0,e):this._exponentialSearch(n,e)}}]),e}()),x=function(){return"undefined"!==typeof window&&window.chrome?16777100:15e5},S=function(){function e(t){var n=t.maxScrollSize,r=void 0===n?x():n,i=k()(t,["maxScrollSize"]);u()(this,e),I()(this,"_cellSizeAndPositionManager",void 0),I()(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new _(i),this._maxScrollSize=r}return c()(e,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(e){this._cellSizeAndPositionManager.configure(e)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize(),a=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:i});return Math.round(a*(i-r))}},{key:"getSizeAndPositionOfCell",value:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,n=void 0===t?"auto":t,r=e.containerSize,i=e.currentOffset,a=e.targetIndex;i=this._safeOffsetToOffset({containerSize:r,offset:i});var o=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:n,containerSize:r,currentOffset:i,targetIndex:a});return this._offsetToSafeOffset({containerSize:r,offset:o})}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,n=e.offset;return n=this._safeOffsetToOffset({containerSize:t,offset:n}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:t,offset:n})}},{key:"resetCell",value:function(e){this._cellSizeAndPositionManager.resetCell(e)}},{key:"_getOffsetPercentage",value:function(e){var t=e.containerSize,n=e.offset,r=e.totalSize;return r<=t?0:n/(r-t)}},{key:"_offsetToSafeOffset",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize();if(r===i)return n;var a=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:r});return Math.round(a*(i-t))}},{key:"_safeOffsetToOffset",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize();if(r===i)return n;var a=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:i});return Math.round(a*(r-t))}}]),e}();function O(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t={};return function(n){var r=n.callback,i=n.indices,a=Object.keys(i),o=!e||a.every((function(e){var t=i[e];return Array.isArray(t)?t.length>0:t>=0})),s=a.length!==Object.keys(t).length||a.some((function(e){var n=t[e],r=i[e];return Array.isArray(r)?n.join(",")!==r.join(","):n!==r}));t=i,o&&s&&r(i)}}function D(e){var t=e.cellSize,n=e.cellSizeAndPositionManager,r=e.previousCellsCount,i=e.previousCellSize,a=e.previousScrollToAlignment,o=e.previousScrollToIndex,s=e.previousSize,u=e.scrollOffset,A=e.scrollToAlignment,c=e.scrollToIndex,l=e.size,f=e.sizeJustIncreasedFromZero,h=e.updateScrollIndexCallback,g=n.getCellCount(),d=c>=0&&c<g;d&&(l!==s||f||!i||"number"===typeof t&&t!==i||A!==a||c!==o)?h(c):!d&&g>0&&(l<s||g<r)&&u>n.getTotalSize()-l&&h(g-1)}var R,j,M=!("undefined"===typeof window||!window.document||!window.document.createElement);function N(e){if((!R&&0!==R||e)&&M){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),R=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return R}var F,T,L=(j="undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).requestAnimationFrame||j.webkitRequestAnimationFrame||j.mozRequestAnimationFrame||j.oRequestAnimationFrame||j.msRequestAnimationFrame||function(e){return j.setTimeout(e,1e3/60)},P=j.cancelAnimationFrame||j.webkitCancelAnimationFrame||j.mozCancelAnimationFrame||j.oCancelAnimationFrame||j.msCancelAnimationFrame||function(e){j.clearTimeout(e)},U=L,G=P,q=function(e){return G(e.id)},H=function(e,t){var n;Promise.resolve().then((function(){n=Date.now()}));var r={id:U((function i(){Date.now()-n>=t?e.call():r.id=U(i)}))};return r};function Y(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 J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(n,!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var z="observed",K="requested",W=(T=F=function(e){function t(e){var n;u()(this,t),n=f()(this,g()(t).call(this,e)),I()(p()(n),"_onGridRenderedMemoizer",O()),I()(p()(n),"_onScrollMemoizer",O(!1)),I()(p()(n),"_deferredInvalidateColumnIndex",null),I()(p()(n),"_deferredInvalidateRowIndex",null),I()(p()(n),"_recomputeScrollLeftFlag",!1),I()(p()(n),"_recomputeScrollTopFlag",!1),I()(p()(n),"_horizontalScrollBarSize",0),I()(p()(n),"_verticalScrollBarSize",0),I()(p()(n),"_scrollbarPresenceChanged",!1),I()(p()(n),"_scrollingContainer",void 0),I()(p()(n),"_childrenToDisplay",void 0),I()(p()(n),"_columnStartIndex",void 0),I()(p()(n),"_columnStopIndex",void 0),I()(p()(n),"_rowStartIndex",void 0),I()(p()(n),"_rowStopIndex",void 0),I()(p()(n),"_renderedColumnStartIndex",0),I()(p()(n),"_renderedColumnStopIndex",0),I()(p()(n),"_renderedRowStartIndex",0),I()(p()(n),"_renderedRowStopIndex",0),I()(p()(n),"_initialScrollTop",void 0),I()(p()(n),"_initialScrollLeft",void 0),I()(p()(n),"_disablePointerEventsTimeoutId",void 0),I()(p()(n),"_styleCache",{}),I()(p()(n),"_cellCache",{}),I()(p()(n),"_debounceScrollEndedCallback",(function(){n._disablePointerEventsTimeoutId=null,n.setState({isScrolling:!1,needToResetStyleCache:!1})})),I()(p()(n),"_invokeOnGridRenderedHelper",(function(){var e=n.props.onSectionRendered;n._onGridRenderedMemoizer({callback:e,indices:{columnOverscanStartIndex:n._columnStartIndex,columnOverscanStopIndex:n._columnStopIndex,columnStartIndex:n._renderedColumnStartIndex,columnStopIndex:n._renderedColumnStopIndex,rowOverscanStartIndex:n._rowStartIndex,rowOverscanStopIndex:n._rowStopIndex,rowStartIndex:n._renderedRowStartIndex,rowStopIndex:n._renderedRowStopIndex}})})),I()(p()(n),"_setScrollingContainerRef",(function(e){n._scrollingContainer=e})),I()(p()(n),"_onScroll",(function(e){e.target===n._scrollingContainer&&n.handleScrollEvent(e.target)}));var r=new S({cellCount:e.columnCount,cellSizeGetter:function(n){return t._wrapSizeGetter(e.columnWidth)(n)},estimatedCellSize:t._getEstimatedColumnSize(e)}),i=new S({cellCount:e.rowCount,cellSizeGetter:function(n){return t._wrapSizeGetter(e.rowHeight)(n)},estimatedCellSize:t._getEstimatedRowSize(e)});return n.state={instanceProps:{columnSizeAndPositionManager:r,rowSizeAndPositionManager:i,prevColumnWidth:e.columnWidth,prevRowHeight:e.rowHeight,prevColumnCount:e.columnCount,prevRowCount:e.rowCount,prevIsScrolling:!0===e.isScrolling,prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:1,scrollDirectionVertical:1,scrollLeft:0,scrollTop:0,scrollPositionChangeReason:null,needToResetStyleCache:!1},e.scrollToRow>0&&(n._initialScrollTop=n._getCalculatedScrollTop(e,n.state)),e.scrollToColumn>0&&(n._initialScrollLeft=n._getCalculatedScrollLeft(e,n.state)),n}return y()(t,e),c()(t,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?this.props.scrollToAlignment:t,r=e.columnIndex,i=void 0===r?this.props.scrollToColumn:r,a=e.rowIndex,o=void 0===a?this.props.scrollToRow:a,s=J({},this.props,{scrollToAlignment:n,scrollToColumn:i,scrollToRow:o});return{scrollLeft:this._getCalculatedScrollLeft(s),scrollTop:this._getCalculatedScrollTop(s)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var t=e.scrollLeft,n=void 0===t?0:t,r=e.scrollTop,i=void 0===r?0:r;if(!(i<0)){this._debounceScrollEnded();var a=this.props,o=a.autoHeight,s=a.autoWidth,u=a.height,A=a.width,c=this.state.instanceProps,l=c.scrollbarSize,f=c.rowSizeAndPositionManager.getTotalSize(),h=c.columnSizeAndPositionManager.getTotalSize(),g=Math.min(Math.max(0,h-A+l),n),d=Math.min(Math.max(0,f-u+l),i);if(this.state.scrollLeft!==g||this.state.scrollTop!==d){var p={isScrolling:!0,scrollDirectionHorizontal:g!==this.state.scrollLeft?g>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:d!==this.state.scrollTop?d>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:z};o||(p.scrollTop=d),s||(p.scrollLeft=g),p.needToResetStyleCache=!1,this.setState(p)}this._invokeOnScrollMemoizer({scrollLeft:g,scrollTop:d,totalColumnsWidth:h,totalRowsHeight:f})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this._deferredInvalidateColumnIndex="number"===typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex="number"===typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,n):n}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,n=e.rowCount,r=this.state.instanceProps;r.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),r.rowSizeAndPositionManager.getSizeAndPositionOfCell(n-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r,a=this.props,o=a.scrollToColumn,s=a.scrollToRow,u=this.state.instanceProps;u.columnSizeAndPositionManager.resetCell(n),u.rowSizeAndPositionManager.resetCell(i),this._recomputeScrollLeftFlag=o>=0&&(1===this.state.scrollDirectionHorizontal?n<=o:n>=o),this._recomputeScrollTopFlag=s>=0&&(1===this.state.scrollDirectionVertical?i<=s:i>=s),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,n=e.rowIndex,r=this.props.columnCount,i=this.props;r>1&&void 0!==t&&this._updateScrollLeftForScrollToColumn(J({},i,{scrollToColumn:t})),void 0!==n&&this._updateScrollTopForScrollToRow(J({},i,{scrollToRow:n}))}},{key:"componentDidMount",value:function(){var e=this.props,n=e.getScrollbarSize,r=e.height,i=e.scrollLeft,a=e.scrollToColumn,o=e.scrollTop,s=e.scrollToRow,u=e.width,A=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),A.scrollbarSizeMeasured||this.setState((function(e){var t=J({},e,{needToResetStyleCache:!1});return t.instanceProps.scrollbarSize=n(),t.instanceProps.scrollbarSizeMeasured=!0,t})),"number"===typeof i&&i>=0||"number"===typeof o&&o>=0){var c=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:i,scrollTop:o});c&&(c.needToResetStyleCache=!1,this.setState(c))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var l=r>0&&u>0;a>=0&&l&&this._updateScrollLeftForScrollToColumn(),s>=0&&l&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:i||0,scrollTop:o||0,totalColumnsWidth:A.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:A.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var n=this,r=this.props,i=r.autoHeight,a=r.autoWidth,o=r.columnCount,s=r.height,u=r.rowCount,A=r.scrollToAlignment,c=r.scrollToColumn,l=r.scrollToRow,f=r.width,h=this.state,g=h.scrollLeft,d=h.scrollPositionChangeReason,p=h.scrollTop,v=h.instanceProps;this._handleInvalidatedGridSize();var y=o>0&&0===e.columnCount||u>0&&0===e.rowCount;d===K&&(!a&&g>=0&&(g!==this._scrollingContainer.scrollLeft||y)&&(this._scrollingContainer.scrollLeft=g),!i&&p>=0&&(p!==this._scrollingContainer.scrollTop||y)&&(this._scrollingContainer.scrollTop=p));var m=(0===e.width||0===e.height)&&s>0&&f>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):D({cellSizeAndPositionManager:v.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:g,scrollToAlignment:A,scrollToIndex:c,size:f,sizeJustIncreasedFromZero:m,updateScrollIndexCallback:function(){return n._updateScrollLeftForScrollToColumn(n.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):D({cellSizeAndPositionManager:v.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:p,scrollToAlignment:A,scrollToIndex:l,size:s,sizeJustIncreasedFromZero:m,updateScrollIndexCallback:function(){return n._updateScrollTopForScrollToRow(n.props)}}),this._invokeOnGridRenderedHelper(),g!==t.scrollLeft||p!==t.scrollTop){var I=v.rowSizeAndPositionManager.getTotalSize(),b=v.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:g,scrollTop:p,totalColumnsWidth:b,totalRowsHeight:I})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&q(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,n=e.autoHeight,r=e.autoWidth,a=e.className,o=e.containerProps,s=e.containerRole,u=e.containerStyle,A=e.height,c=e.id,l=e.noContentRenderer,f=e.role,h=e.style,g=e.tabIndex,d=e.width,p=this.state,v=p.instanceProps,y=p.needToResetStyleCache,m=this._isScrolling(),I={boxSizing:"border-box",direction:"ltr",height:n?"auto":A,position:"relative",width:r?"auto":d,WebkitOverflowScrolling:"touch",willChange:"transform"};y&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var b=v.columnSizeAndPositionManager.getTotalSize(),E=v.rowSizeAndPositionManager.getTotalSize(),w=E>A?v.scrollbarSize:0,Q=b>d?v.scrollbarSize:0;Q===this._horizontalScrollBarSize&&w===this._verticalScrollBarSize||(this._horizontalScrollBarSize=Q,this._verticalScrollBarSize=w,this._scrollbarPresenceChanged=!0),I.overflowX=b+w<=d?"hidden":"auto",I.overflowY=E+Q<=A?"hidden":"auto";var k=this._childrenToDisplay,_=0===k.length&&A>0&&d>0;return i.createElement("div",C()({ref:this._setScrollingContainerRef},o,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:Object(B.a)("ReactVirtualized__Grid",a),id:c,onScroll:this._onScroll,role:f,style:J({},I,{},h),tabIndex:g}),k.length>0&&i.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:s,style:J({width:t?"auto":b,height:E,maxWidth:b,maxHeight:E,overflow:"hidden",pointerEvents:m?"none":"",position:"relative"},u)},k),_&&l())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=e.cellRenderer,r=e.cellRangeRenderer,i=e.columnCount,a=e.deferredMeasurementCache,o=e.height,s=e.overscanColumnCount,u=e.overscanIndicesGetter,A=e.overscanRowCount,c=e.rowCount,l=e.width,f=e.isScrollingOptOut,h=t.scrollDirectionHorizontal,g=t.scrollDirectionVertical,d=t.instanceProps,p=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,v=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,y=this._isScrolling(e,t);if(this._childrenToDisplay=[],o>0&&l>0){var m=d.columnSizeAndPositionManager.getVisibleCellRange({containerSize:l,offset:v}),I=d.rowSizeAndPositionManager.getVisibleCellRange({containerSize:o,offset:p}),b=d.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:l,offset:v}),E=d.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:o,offset:p});this._renderedColumnStartIndex=m.start,this._renderedColumnStopIndex=m.stop,this._renderedRowStartIndex=I.start,this._renderedRowStopIndex=I.stop;var C=u({direction:"horizontal",cellCount:i,overscanCellsCount:s,scrollDirection:h,startIndex:"number"===typeof m.start?m.start:0,stopIndex:"number"===typeof m.stop?m.stop:-1}),B=u({direction:"vertical",cellCount:c,overscanCellsCount:A,scrollDirection:g,startIndex:"number"===typeof I.start?I.start:0,stopIndex:"number"===typeof I.stop?I.stop:-1}),w=C.overscanStartIndex,Q=C.overscanStopIndex,k=B.overscanStartIndex,_=B.overscanStopIndex;if(a){if(!a.hasFixedHeight())for(var x=k;x<=_;x++)if(!a.has(x,0)){w=0,Q=i-1;break}if(!a.hasFixedWidth())for(var S=w;S<=Q;S++)if(!a.has(0,S)){k=0,_=c-1;break}}this._childrenToDisplay=r({cellCache:this._cellCache,cellRenderer:n,columnSizeAndPositionManager:d.columnSizeAndPositionManager,columnStartIndex:w,columnStopIndex:Q,deferredMeasurementCache:a,horizontalOffsetAdjustment:b,isScrolling:y,isScrollingOptOut:f,parent:this,rowSizeAndPositionManager:d.rowSizeAndPositionManager,rowStartIndex:k,rowStopIndex:_,scrollLeft:v,scrollTop:p,styleCache:this._styleCache,verticalOffsetAdjustment:E,visibleColumnIndices:m,visibleRowIndices:I}),this._columnStartIndex=w,this._columnStopIndex=Q,this._rowStartIndex=k,this._rowStopIndex=_}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&q(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=H(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if("number"===typeof this._deferredInvalidateColumnIndex&&"number"===typeof this._deferredInvalidateRowIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,i=e.totalColumnsWidth,a=e.totalRowsHeight;this._onScrollMemoizer({callback:function(e){var n=e.scrollLeft,r=e.scrollTop,o=t.props,s=o.height;(0,o.onScroll)({clientHeight:s,clientWidth:o.width,scrollHeight:a,scrollLeft:n,scrollTop:r,scrollWidth:i})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?Boolean(e.isScrolling):Boolean(t.isScrolling)}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var n=e.scrollLeft,r=e.scrollTop,i=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:n,scrollTop:r});i&&(i.needToResetStyleCache=!1,this.setState(i))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollLeft(e,n)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=t._getScrollLeftForScrollToColumnStateUpdate(e,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollTop(e,n)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,t=this._cellCache,n=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var r=this._rowStartIndex;r<=this._rowStopIndex;r++)for(var i=this._columnStartIndex;i<=this._columnStopIndex;i++){var a="".concat(r,"-").concat(i);this._styleCache[a]=e[a],n&&(this._cellCache[a]=t[a])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=t._getScrollTopForScrollToRowStateUpdate(e,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}}],[{key:"getDerivedStateFromProps",value:function(e,n){var r={};0===e.columnCount&&0!==n.scrollLeft||0===e.rowCount&&0!==n.scrollTop?(r.scrollLeft=0,r.scrollTop=0):(e.scrollLeft!==n.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==n.scrollTop&&e.scrollToRow<0)&&Object.assign(r,t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var i,a,o=n.instanceProps;return r.needToResetStyleCache=!1,e.columnWidth===o.prevColumnWidth&&e.rowHeight===o.prevRowHeight||(r.needToResetStyleCache=!0),o.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:t._getEstimatedColumnSize(e),cellSizeGetter:t._wrapSizeGetter(e.columnWidth)}),o.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:t._getEstimatedRowSize(e),cellSizeGetter:t._wrapSizeGetter(e.rowHeight)}),0!==o.prevColumnCount&&0!==o.prevRowCount||(o.prevColumnCount=0,o.prevRowCount=0),e.autoHeight&&!1===e.isScrolling&&!0===o.prevIsScrolling&&Object.assign(r,{isScrolling:!1}),w({cellCount:o.prevColumnCount,cellSize:"number"===typeof o.prevColumnWidth?o.prevColumnWidth:null,computeMetadataCallback:function(){return o.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:"number"===typeof e.columnWidth?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:o.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){i=t._getScrollLeftForScrollToColumnStateUpdate(e,n)}}),w({cellCount:o.prevRowCount,cellSize:"number"===typeof o.prevRowHeight?o.prevRowHeight:null,computeMetadataCallback:function(){return o.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:"number"===typeof e.rowHeight?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:o.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){a=t._getScrollTopForScrollToRowStateUpdate(e,n)}}),o.prevColumnCount=e.columnCount,o.prevColumnWidth=e.columnWidth,o.prevIsScrolling=!0===e.isScrolling,o.prevRowCount=e.rowCount,o.prevRowHeight=e.rowHeight,o.prevScrollToColumn=e.scrollToColumn,o.prevScrollToRow=e.scrollToRow,o.scrollbarSize=e.getScrollbarSize(),void 0===o.scrollbarSize?(o.scrollbarSizeMeasured=!1,o.scrollbarSize=0):o.scrollbarSizeMeasured=!0,r.instanceProps=o,J({},r,{},i,{},a)}},{key:"_getEstimatedColumnSize",value:function(e){return"number"===typeof e.columnWidth?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return"number"===typeof e.rowHeight?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var t=e.prevState,n=e.scrollLeft,r=e.scrollTop,i={scrollPositionChangeReason:K};return"number"===typeof n&&n>=0&&(i.scrollDirectionHorizontal=n>t.scrollLeft?1:-1,i.scrollLeft=n),"number"===typeof r&&r>=0&&(i.scrollDirectionVertical=r>t.scrollTop?1:-1,i.scrollTop=r),"number"===typeof n&&n>=0&&n!==t.scrollLeft||"number"===typeof r&&r>=0&&r!==t.scrollTop?i:{}}},{key:"_wrapSizeGetter",value:function(e){return"function"===typeof e?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var n=e.columnCount,r=e.height,i=e.scrollToAlignment,a=e.scrollToColumn,o=e.width,s=t.scrollLeft,u=t.instanceProps;if(n>0){var A=n-1,c=a<0?A:Math.min(A,a),l=u.rowSizeAndPositionManager.getTotalSize(),f=u.scrollbarSizeMeasured&&l>r?u.scrollbarSize:0;return u.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:i,containerSize:o-f,currentOffset:s,targetIndex:c})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,n){var r=n.scrollLeft,i=t._getCalculatedScrollLeft(e,n);return"number"===typeof i&&i>=0&&r!==i?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:i,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,t){var n=e.height,r=e.rowCount,i=e.scrollToAlignment,a=e.scrollToRow,o=e.width,s=t.scrollTop,u=t.instanceProps;if(r>0){var A=r-1,c=a<0?A:Math.min(A,a),l=u.columnSizeAndPositionManager.getTotalSize(),f=u.scrollbarSizeMeasured&&l>o?u.scrollbarSize:0;return u.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:i,containerSize:n-f,currentOffset:s,targetIndex:c})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,n){var r=n.scrollTop,i=t._getCalculatedScrollTop(e,n);return"number"===typeof i&&i>=0&&r!==i?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:-1,scrollTop:i}):{}}}]),t}(i.PureComponent),I()(F,"propTypes",null),T);I()(W,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(e){for(var t=e.cellCache,n=e.cellRenderer,r=e.columnSizeAndPositionManager,i=e.columnStartIndex,a=e.columnStopIndex,o=e.deferredMeasurementCache,s=e.horizontalOffsetAdjustment,u=e.isScrolling,A=e.isScrollingOptOut,c=e.parent,l=e.rowSizeAndPositionManager,f=e.rowStartIndex,h=e.rowStopIndex,g=e.styleCache,d=e.verticalOffsetAdjustment,p=e.visibleColumnIndices,v=e.visibleRowIndices,y=[],m=r.areOffsetsAdjusted()||l.areOffsetsAdjusted(),I=!u&&!m,b=f;b<=h;b++)for(var E=l.getSizeAndPositionOfCell(b),C=i;C<=a;C++){var B=r.getSizeAndPositionOfCell(C),w=C>=p.start&&C<=p.stop&&b>=v.start&&b<=v.stop,Q="".concat(b,"-").concat(C),k=void 0;I&&g[Q]?k=g[Q]:o&&!o.has(b,C)?k={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(k={height:E.size,left:B.offset+s,position:"absolute",top:E.offset+d,width:B.size},g[Q]=k);var _={columnIndex:C,isScrolling:u,isVisible:w,key:Q,parent:c,rowIndex:b,style:k},x=void 0;!A&&!u||s||d?x=n(_):(t[Q]||(t[Q]=n(_)),x=t[Q]),null!=x&&!1!==x&&y.push(x)}return y},containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:N,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(e){var t=e.cellCount,n=e.overscanCellsCount,r=e.scrollDirection,i=e.startIndex,a=e.stopIndex;return 1===r?{overscanStartIndex:Math.max(0,i),overscanStopIndex:Math.min(t-1,a+n)}:{overscanStartIndex:Math.max(0,i-n),overscanStopIndex:Math.min(t-1,a)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),Object(b.a)(W);var V=W;function X(e){var t=e.cellCount,n=e.overscanCellsCount,r=e.scrollDirection,i=e.startIndex,a=e.stopIndex;return n=Math.max(1,n),1===r?{overscanStartIndex:Math.max(0,i-1),overscanStopIndex:Math.min(t-1,a+n)}:{overscanStartIndex:Math.max(0,i-n),overscanStopIndex:Math.min(t-1,a+1)}}var Z,$;function ee(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}var te=($=Z=function(e){function t(){var e,n;u()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=f()(this,(e=g()(t)).call.apply(e,[this].concat(i))),I()(p()(n),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),I()(p()(n),"_columnStartIndex",0),I()(p()(n),"_columnStopIndex",0),I()(p()(n),"_rowStartIndex",0),I()(p()(n),"_rowStopIndex",0),I()(p()(n),"_onKeyDown",(function(e){var t=n.props,r=t.columnCount,i=t.disabled,a=t.mode,o=t.rowCount;if(!i){var s=n._getScrollState(),u=s.scrollToColumn,A=s.scrollToRow,c=n._getScrollState(),l=c.scrollToColumn,f=c.scrollToRow;switch(e.key){case"ArrowDown":f="cells"===a?Math.min(f+1,o-1):Math.min(n._rowStopIndex+1,o-1);break;case"ArrowLeft":l="cells"===a?Math.max(l-1,0):Math.max(n._columnStartIndex-1,0);break;case"ArrowRight":l="cells"===a?Math.min(l+1,r-1):Math.min(n._columnStopIndex+1,r-1);break;case"ArrowUp":f="cells"===a?Math.max(f-1,0):Math.max(n._rowStartIndex-1,0)}l===u&&f===A||(e.preventDefault(),n._updateScrollState({scrollToColumn:l,scrollToRow:f}))}})),I()(p()(n),"_onSectionRendered",(function(e){var t=e.columnStartIndex,r=e.columnStopIndex,i=e.rowStartIndex,a=e.rowStopIndex;n._columnStartIndex=t,n._columnStopIndex=r,n._rowStartIndex=i,n._rowStopIndex=a})),n}return y()(t,e),c()(t,[{key:"setScrollIndexes",value:function(e){var t=e.scrollToColumn,n=e.scrollToRow;this.setState({scrollToRow:n,scrollToColumn:t})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,r=this._getScrollState(),a=r.scrollToColumn,o=r.scrollToRow;return i.createElement("div",{className:t,onKeyDown:this._onKeyDown},n({onSectionRendered:this._onSectionRendered,scrollToColumn:a,scrollToRow:o}))}},{key:"_getScrollState",value:function(){return this.props.isControlled?this.props:this.state}},{key:"_updateScrollState",value:function(e){var t=e.scrollToColumn,n=e.scrollToRow,r=this.props,i=r.isControlled,a=r.onScrollToChange;"function"===typeof a&&a({scrollToColumn:t,scrollToRow:n}),i||this.setState({scrollToColumn:t,scrollToRow:n})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.isControlled?{}:e.scrollToColumn!==t.instanceProps.prevScrollToColumn||e.scrollToRow!==t.instanceProps.prevScrollToRow?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(n,!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{scrollToColumn:e.scrollToColumn,scrollToRow:e.scrollToRow,instanceProps:{prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow}}):{}}}]),t}(i.PureComponent),I()(Z,"propTypes",null),$);I()(te,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0}),Object(b.a)(te);var ne,re,ie=n(803);function ae(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 oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ae(n,!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var se=(re=ne=function(e){function t(){var e,n;u()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=f()(this,(e=g()(t)).call.apply(e,[this].concat(i))),I()(p()(n),"state",{height:n.props.defaultHeight||0,width:n.props.defaultWidth||0}),I()(p()(n),"_parentNode",void 0),I()(p()(n),"_autoSizer",void 0),I()(p()(n),"_window",void 0),I()(p()(n),"_detectElementResize",void 0),I()(p()(n),"_onResize",(function(){var e=n.props,t=e.disableHeight,r=e.disableWidth,i=e.onResize;if(n._parentNode){var a=n._parentNode.offsetHeight||0,o=n._parentNode.offsetWidth||0,s=(n._window||window).getComputedStyle(n._parentNode)||{},u=parseInt(s.paddingLeft,10)||0,A=parseInt(s.paddingRight,10)||0,c=parseInt(s.paddingTop,10)||0,l=parseInt(s.paddingBottom,10)||0,f=a-c-l,h=o-u-A;(!t&&n.state.height!==f||!r&&n.state.width!==h)&&(n.setState({height:a-c-l,width:o-u-A}),i({height:a,width:o}))}})),I()(p()(n),"_setRef",(function(e){n._autoSizer=e})),n}return y()(t,e),c()(t,[{key:"componentDidMount",value:function(){var e=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._window=this._autoSizer.parentNode.ownerDocument.defaultView,this._detectElementResize=Object(ie.a)(e,this._window),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.disableHeight,a=e.disableWidth,o=e.style,s=this.state,u=s.height,A=s.width,c={overflow:"visible"},l={};return r||(c.height=0,l.height=u),a||(c.width=0,l.width=A),i.createElement("div",{className:n,ref:this._setRef,style:oe({},c,{},o)},t(l))}}]),t}(i.Component),I()(ne,"propTypes",null),re);I()(se,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}});var ue,Ae,ce=n(75),le=(Ae=ue=function(e){function t(){var e,n;u()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=f()(this,(e=g()(t)).call.apply(e,[this].concat(i))),I()(p()(n),"_child",void 0),I()(p()(n),"_measure",(function(){var e=n.props,t=e.cache,r=e.columnIndex,i=void 0===r?0:r,a=e.parent,o=e.rowIndex,s=void 0===o?n.props.index||0:o,u=n._getCellMeasurements(),A=u.height,c=u.width;A===t.getHeight(s,i)&&c===t.getWidth(s,i)||(t.set(s,i,c,A),a&&"function"===typeof a.recomputeGridSize&&a.recomputeGridSize({columnIndex:i,rowIndex:s}))})),I()(p()(n),"_registerChild",(function(e){!e||e instanceof Element||console.warn("CellMeasurer registerChild expects to be passed Element or null"),n._child=e,e&&n._maybeMeasureCell()})),n}return y()(t,e),c()(t,[{key:"componentDidMount",value:function(){this._maybeMeasureCell()}},{key:"componentDidUpdate",value:function(){this._maybeMeasureCell()}},{key:"render",value:function(){var e=this.props.children;return"function"===typeof e?e({measure:this._measure,registerChild:this._registerChild}):e}},{key:"_getCellMeasurements",value:function(){var e=this.props.cache,t=this._child||Object(ce.findDOMNode)(this);if(t&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){var n=t.style.width,r=t.style.height;e.hasFixedWidth()||(t.style.width="auto"),e.hasFixedHeight()||(t.style.height="auto");var i=Math.ceil(t.offsetHeight),a=Math.ceil(t.offsetWidth);return n&&(t.style.width=n),r&&(t.style.height=r),{height:i,width:a}}return{height:0,width:0}}},{key:"_maybeMeasureCell",value:function(){var e=this.props,t=e.cache,n=e.columnIndex,r=void 0===n?0:n,i=e.parent,a=e.rowIndex,o=void 0===a?this.props.index||0:a;if(!t.has(o,r)){var s=this._getCellMeasurements(),u=s.height,A=s.width;t.set(o,r,A,u),i&&"function"===typeof i.invalidateCellSizeAfterRender&&i.invalidateCellSizeAfterRender({columnIndex:r,rowIndex:o})}}}]),t}(i.PureComponent),I()(ue,"propTypes",null),Ae);I()(le,"__internalCellMeasurerFlag",!1);function fe(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 he(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fe(n,!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ge="observed",de="requested",pe=function(e){function t(){var e,n;u()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=f()(this,(e=g()(t)).call.apply(e,[this].concat(i))),I()(p()(n),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),I()(p()(n),"_calculateSizeAndPositionDataOnNextUpdate",!1),I()(p()(n),"_onSectionRenderedMemoizer",O()),I()(p()(n),"_onScrollMemoizer",O(!1)),I()(p()(n),"_invokeOnSectionRenderedHelper",(function(){var e=n.props,t=e.cellLayoutManager,r=e.onSectionRendered;n._onSectionRenderedMemoizer({callback:r,indices:{indices:t.getLastRenderedIndices()}})})),I()(p()(n),"_setScrollingContainerRef",(function(e){n._scrollingContainer=e})),I()(p()(n),"_updateScrollPositionForScrollToCell",(function(){var e=n.props,t=e.cellLayoutManager,r=e.height,i=e.scrollToAlignment,a=e.scrollToCell,o=e.width,s=n.state,u=s.scrollLeft,A=s.scrollTop;if(a>=0){var c=t.getScrollPositionForCell({align:i,cellIndex:a,height:r,scrollLeft:u,scrollTop:A,width:o});c.scrollLeft===u&&c.scrollTop===A||n._setScrollPosition(c)}})),I()(p()(n),"_onScroll",(function(e){if(e.target===n._scrollingContainer){n._enablePointerEventsAfterDelay();var t=n.props,r=t.cellLayoutManager,i=t.height,a=t.isScrollingChange,o=t.width,s=n._scrollbarSize,u=r.getTotalSize(),A=u.height,c=u.width,l=Math.max(0,Math.min(c-o+s,e.target.scrollLeft)),f=Math.max(0,Math.min(A-i+s,e.target.scrollTop));if(n.state.scrollLeft!==l||n.state.scrollTop!==f){var h=e.cancelable?ge:de;n.state.isScrolling||a(!0),n.setState({isScrolling:!0,scrollLeft:l,scrollPositionChangeReason:h,scrollTop:f})}n._invokeOnScrollMemoizer({scrollLeft:l,scrollTop:f,totalWidth:c,totalHeight:A})}})),n._scrollbarSize=N(),void 0===n._scrollbarSize?(n._scrollbarSizeMeasured=!1,n._scrollbarSize=0):n._scrollbarSizeMeasured=!0,n}return y()(t,e),c()(t,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.props,t=e.cellLayoutManager,n=e.scrollLeft,r=e.scrollToCell,i=e.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=N(),this._scrollbarSizeMeasured=!0,this.setState({})),r>=0?this._updateScrollPositionForScrollToCell():(n>=0||i>=0)&&this._setScrollPosition({scrollLeft:n,scrollTop:i}),this._invokeOnSectionRenderedHelper();var a=t.getTotalSize(),o=a.height,s=a.width;this._invokeOnScrollMemoizer({scrollLeft:n||0,scrollTop:i||0,totalHeight:o,totalWidth:s})}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.height,i=n.scrollToAlignment,a=n.scrollToCell,o=n.width,s=this.state,u=s.scrollLeft,A=s.scrollPositionChangeReason,c=s.scrollTop;A===de&&(u>=0&&u!==t.scrollLeft&&u!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=u),c>=0&&c!==t.scrollTop&&c!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=c)),r===e.height&&i===e.scrollToAlignment&&a===e.scrollToCell&&o===e.width||this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoHeight,n=e.cellCount,r=e.cellLayoutManager,a=e.className,o=e.height,s=e.horizontalOverscanSize,u=e.id,A=e.noContentRenderer,c=e.style,l=e.verticalOverscanSize,f=e.width,h=this.state,g=h.isScrolling,d=h.scrollLeft,p=h.scrollTop;(this._lastRenderedCellCount!==n||this._lastRenderedCellLayoutManager!==r||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=n,this._lastRenderedCellLayoutManager=r,this._calculateSizeAndPositionDataOnNextUpdate=!1,r.calculateSizeAndPositionData());var v=r.getTotalSize(),y=v.height,m=v.width,I=Math.max(0,d-s),b=Math.max(0,p-l),E=Math.min(m,d+f+s),C=Math.min(y,p+o+l),w=o>0&&f>0?r.cellRenderers({height:C-b,isScrolling:g,width:E-I,x:I,y:b}):[],Q={boxSizing:"border-box",direction:"ltr",height:t?"auto":o,position:"relative",WebkitOverflowScrolling:"touch",width:f,willChange:"transform"},k=y>o?this._scrollbarSize:0,_=m>f?this._scrollbarSize:0;return Q.overflowX=m+k<=f?"hidden":"auto",Q.overflowY=y+_<=o?"hidden":"auto",i.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:Object(B.a)("ReactVirtualized__Collection",a),id:u,onScroll:this._onScroll,role:"grid",style:he({},Q,{},c),tabIndex:0},n>0&&i.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:y,maxHeight:y,maxWidth:m,overflow:"hidden",pointerEvents:g?"none":"",width:m}},w),0===n&&A())}},{key:"_enablePointerEventsAfterDelay",value:function(){var e=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout((function(){(0,e.props.isScrollingChange)(!1),e._disablePointerEventsTimeoutId=null,e.setState({isScrolling:!1})}),150)}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,i=e.totalHeight,a=e.totalWidth;this._onScrollMemoizer({callback:function(e){var n=e.scrollLeft,r=e.scrollTop,o=t.props,s=o.height;(0,o.onScroll)({clientHeight:s,clientWidth:o.width,scrollHeight:i,scrollLeft:n,scrollTop:r,scrollWidth:a})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_setScrollPosition",value:function(e){var t=e.scrollLeft,n=e.scrollTop,r={scrollPositionChangeReason:de};t>=0&&(r.scrollLeft=t),n>=0&&(r.scrollTop=n),(t>=0&&t!==this.state.scrollLeft||n>=0&&n!==this.state.scrollTop)&&this.setState(r)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 0!==e.cellCount||0===t.scrollLeft&&0===t.scrollTop?e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop?e.scrollTop:t.scrollTop,scrollPositionChangeReason:de}:null:{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:de}}}]),t}(i.PureComponent);I()(pe,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0}),pe.propTypes={},Object(b.a)(pe);var ve=pe,ye=function(){function e(t){var n=t.height,r=t.width,i=t.x,a=t.y;u()(this,e),this.height=n,this.width=r,this.x=i,this.y=a,this._indexMap={},this._indices=[]}return c()(e,[{key:"addCellIndex",value:function(e){var t=e.index;this._indexMap[t]||(this._indexMap[t]=!0,this._indices.push(t))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}]),e}(),me=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;u()(this,e),this._sectionSize=t,this._cellMetadata=[],this._sections={}}return c()(e,[{key:"getCellIndices",value:function(e){var t=e.height,n=e.width,r=e.x,i=e.y,a={};return this.getSections({height:t,width:n,x:r,y:i}).forEach((function(e){return e.getCellIndices().forEach((function(e){a[e]=e}))})),Object.keys(a).map((function(e){return a[e]}))}},{key:"getCellMetadata",value:function(e){var t=e.index;return this._cellMetadata[t]}},{key:"getSections",value:function(e){for(var t=e.height,n=e.width,r=e.x,i=e.y,a=Math.floor(r/this._sectionSize),o=Math.floor((r+n-1)/this._sectionSize),s=Math.floor(i/this._sectionSize),u=Math.floor((i+t-1)/this._sectionSize),A=[],c=a;c<=o;c++)for(var l=s;l<=u;l++){var f="".concat(c,".").concat(l);this._sections[f]||(this._sections[f]=new ye({height:this._sectionSize,width:this._sectionSize,x:c*this._sectionSize,y:l*this._sectionSize})),A.push(this._sections[f])}return A}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var e=this;return Object.keys(this._sections).map((function(t){return e._sections[t].toString()}))}},{key:"registerCell",value:function(e){var t=e.cellMetadatum,n=e.index;this._cellMetadata[n]=t,this.getSections(t).forEach((function(e){return e.addCellIndex({index:n})}))}}]),e}();function Ie(e){var t=e.align,n=void 0===t?"auto":t,r=e.cellOffset,i=e.cellSize,a=e.containerSize,o=e.currentOffset,s=r,u=s-a+i;switch(n){case"start":return s;case"end":return u;case"center":return s-(a-i)/2;default:return Math.max(u,Math.min(s,o))}}var be=function(e){function t(e,n){var r;return u()(this,t),(r=f()(this,g()(t).call(this,e,n)))._cellMetadata=[],r._lastRenderedCellIndices=[],r._cellCache=[],r._isScrollingChange=r._isScrollingChange.bind(p()(r)),r._setCollectionViewRef=r._setCollectionViewRef.bind(p()(r)),r}return y()(t,e),c()(t,[{key:"forceUpdate",value:function(){void 0!==this._collectionView&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var e=C()({},this.props);return i.createElement(ve,C()({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},e))}},{key:"calculateSizeAndPositionData",value:function(){var e=this.props,t=function(e){for(var t=e.cellCount,n=e.cellSizeAndPositionGetter,r=e.sectionSize,i=[],a=new me(r),o=0,s=0,u=0;u<t;u++){var A=n({index:u});if(null==A.height||isNaN(A.height)||null==A.width||isNaN(A.width)||null==A.x||isNaN(A.x)||null==A.y||isNaN(A.y))throw Error("Invalid metadata returned for cell ".concat(u,":\n        x:").concat(A.x,", y:").concat(A.y,", width:").concat(A.width,", height:").concat(A.height));o=Math.max(o,A.y+A.height),s=Math.max(s,A.x+A.width),i[u]=A,a.registerCell({cellMetadatum:A,index:u})}return{cellMetadata:i,height:o,sectionManager:a,width:s}}({cellCount:e.cellCount,cellSizeAndPositionGetter:e.cellSizeAndPositionGetter,sectionSize:e.sectionSize});this._cellMetadata=t.cellMetadata,this._sectionManager=t.sectionManager,this._height=t.height,this._width=t.width}},{key:"getLastRenderedIndices",value:function(){return this._lastRenderedCellIndices}},{key:"getScrollPositionForCell",value:function(e){var t=e.align,n=e.cellIndex,r=e.height,i=e.scrollLeft,a=e.scrollTop,o=e.width,s=this.props.cellCount;if(n>=0&&n<s){var u=this._cellMetadata[n];i=Ie({align:t,cellOffset:u.x,cellSize:u.width,containerSize:o,currentOffset:i,targetIndex:n}),a=Ie({align:t,cellOffset:u.y,cellSize:u.height,containerSize:r,currentOffset:a,targetIndex:n})}return{scrollLeft:i,scrollTop:a}}},{key:"getTotalSize",value:function(){return{height:this._height,width:this._width}}},{key:"cellRenderers",value:function(e){var t=this,n=e.height,r=e.isScrolling,i=e.width,a=e.x,o=e.y,s=this.props,u=s.cellGroupRenderer,A=s.cellRenderer;return this._lastRenderedCellIndices=this._sectionManager.getCellIndices({height:n,width:i,x:a,y:o}),u({cellCache:this._cellCache,cellRenderer:A,cellSizeAndPositionGetter:function(e){var n=e.index;return t._sectionManager.getCellMetadata({index:n})},indices:this._lastRenderedCellIndices,isScrolling:r})}},{key:"_isScrollingChange",value:function(e){e||(this._cellCache=[])}},{key:"_setCollectionViewRef",value:function(e){this._collectionView=e}}]),t}(i.PureComponent);I()(be,"defaultProps",{"aria-label":"grid",cellGroupRenderer:function(e){var t=e.cellCache,n=e.cellRenderer,r=e.cellSizeAndPositionGetter,i=e.indices,a=e.isScrolling;return i.map((function(e){var i=r({index:e}),o={index:e,isScrolling:a,key:e,style:{height:i.height,left:i.x,position:"absolute",top:i.y,width:i.width}};return a?(e in t||(t[e]=n(o)),t[e]):n(o)})).filter((function(e){return!!e}))}}),be.propTypes={};var Ee=function(e){function t(e,n){var r;return u()(this,t),(r=f()(this,g()(t).call(this,e,n)))._registerChild=r._registerChild.bind(p()(r)),r}return y()(t,e),c()(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.columnMaxWidth,r=t.columnMinWidth,i=t.columnCount,a=t.width;n===e.columnMaxWidth&&r===e.columnMinWidth&&i===e.columnCount&&a===e.width||this._registeredChild&&this._registeredChild.recomputeGridSize()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.columnMaxWidth,r=e.columnMinWidth,i=e.columnCount,a=e.width,o=r||1,s=n?Math.min(n,a):a,u=a/i;return u=Math.max(o,u),u=Math.min(s,u),u=Math.floor(u),t({adjustedWidth:Math.min(a,u*i),columnWidth:u,getColumnWidth:function(){return u},registerChild:this._registerChild})}},{key:"_registerChild",value:function(e){if(e&&"function"!==typeof e.recomputeGridSize)throw Error("Unexpected child type registered; only Grid/MultiGrid children are supported.");this._registeredChild=e,this._registeredChild&&this._registeredChild.recomputeGridSize()}}]),t}(i.PureComponent);Ee.propTypes={};var Ce=n(509),Be=n.n(Ce),we=function(e){function t(e,n){var r;return u()(this,t),(r=f()(this,g()(t).call(this,e,n)))._loadMoreRowsMemoizer=O(),r._onRowsRendered=r._onRowsRendered.bind(p()(r)),r._registerChild=r._registerChild.bind(p()(r)),r}return y()(t,e),c()(t,[{key:"resetLoadMoreRowsCache",value:function(e){this._loadMoreRowsMemoizer=O(),e&&this._doStuff(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"render",value:function(){return(0,this.props.children)({onRowsRendered:this._onRowsRendered,registerChild:this._registerChild})}},{key:"_loadUnloadedRanges",value:function(e){var t=this,n=this.props.loadMoreRows;e.forEach((function(e){var r=n(e);r&&r.then((function(){(function(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,r=e.startIndex,i=e.stopIndex;return!(r>n||i<t)})({lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:e.startIndex,stopIndex:e.stopIndex})&&t._registeredChild&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n="function"===typeof e.recomputeGridSize?e.recomputeGridSize:e.recomputeRowHeights;n?n.call(e,t):e.forceUpdate()}(t._registeredChild,t._lastRenderedStartIndex)}))}))}},{key:"_onRowsRendered",value:function(e){var t=e.startIndex,n=e.stopIndex;this._lastRenderedStartIndex=t,this._lastRenderedStopIndex=n,this._doStuff(t,n)}},{key:"_doStuff",value:function(e,t){var n,r=this,i=this.props,a=i.isRowLoaded,o=i.minimumBatchSize,s=i.rowCount,u=i.threshold,A=function(e){for(var t=e.isRowLoaded,n=e.minimumBatchSize,r=e.rowCount,i=e.startIndex,a=e.stopIndex,o=[],s=null,u=null,A=i;A<=a;A++){t({index:A})?null!==u&&(o.push({startIndex:s,stopIndex:u}),s=u=null):(u=A,null===s&&(s=A))}if(null!==u){for(var c=Math.min(Math.max(u,s+n-1),r-1),l=u+1;l<=c&&!t({index:l});l++)u=l;o.push({startIndex:s,stopIndex:u})}if(o.length)for(var f=o[0];f.stopIndex-f.startIndex+1<n&&f.startIndex>0;){var h=f.startIndex-1;if(t({index:h}))break;f.startIndex=h}return o}({isRowLoaded:a,minimumBatchSize:o,rowCount:s,startIndex:Math.max(0,e-u),stopIndex:Math.min(s-1,t+u)}),c=(n=[]).concat.apply(n,Be()(A.map((function(e){return[e.startIndex,e.stopIndex]}))));this._loadMoreRowsMemoizer({callback:function(){r._loadUnloadedRanges(A)},indices:{squashedUnloadedRanges:c}})}},{key:"_registerChild",value:function(e){this._registeredChild=e}}]),t}(i.PureComponent);I()(we,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),we.propTypes={};var Qe,ke,_e=(ke=Qe=function(e){function t(){var e,n;u()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=f()(this,(e=g()(t)).call.apply(e,[this].concat(i))),I()(p()(n),"Grid",void 0),I()(p()(n),"_cellRenderer",(function(e){var t=e.parent,r=e.rowIndex,i=e.style,a=e.isScrolling,o=e.isVisible,s=e.key,u=n.props.rowRenderer,A=Object.getOwnPropertyDescriptor(i,"width");return A&&A.writable&&(i.width="100%"),u({index:r,style:i,isScrolling:a,isVisible:o,key:s,parent:t})})),I()(p()(n),"_setRef",(function(e){n.Grid=e})),I()(p()(n),"_onScroll",(function(e){var t=e.clientHeight,r=e.scrollHeight,i=e.scrollTop;(0,n.props.onScroll)({clientHeight:t,scrollHeight:r,scrollTop:i})})),I()(p()(n),"_onSectionRendered",(function(e){var t=e.rowOverscanStartIndex,r=e.rowOverscanStopIndex,i=e.rowStartIndex,a=e.rowStopIndex;(0,n.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:r,startIndex:i,stopIndex:a})})),n}return y()(t,e),c()(t,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,n=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:n,columnIndex:0}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:n,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:i,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.noRowsRenderer,r=e.scrollToIndex,a=e.width,o=Object(B.a)("ReactVirtualized__List",t);return i.createElement(V,C()({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:o,columnWidth:a,columnCount:1,noContentRenderer:n,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:r}))}}]),t}(i.PureComponent),I()(Qe,"propTypes",null),ke);I()(_e,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:X,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});var xe=n(508),Se=n.n(xe);var Oe={ge:function(e,t,n,r,i){return"function"===typeof n?function(e,t,n,r,i){for(var a=n+1;t<=n;){var o=t+n>>>1;i(e[o],r)>=0?(a=o,n=o-1):t=o+1}return a}(e,void 0===r?0:0|r,void 0===i?e.length-1:0|i,t,n):function(e,t,n,r){for(var i=n+1;t<=n;){var a=t+n>>>1;e[a]>=r?(i=a,n=a-1):t=a+1}return i}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},gt:function(e,t,n,r,i){return"function"===typeof n?function(e,t,n,r,i){for(var a=n+1;t<=n;){var o=t+n>>>1;i(e[o],r)>0?(a=o,n=o-1):t=o+1}return a}(e,void 0===r?0:0|r,void 0===i?e.length-1:0|i,t,n):function(e,t,n,r){for(var i=n+1;t<=n;){var a=t+n>>>1;e[a]>r?(i=a,n=a-1):t=a+1}return i}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},lt:function(e,t,n,r,i){return"function"===typeof n?function(e,t,n,r,i){for(var a=t-1;t<=n;){var o=t+n>>>1;i(e[o],r)<0?(a=o,t=o+1):n=o-1}return a}(e,void 0===r?0:0|r,void 0===i?e.length-1:0|i,t,n):function(e,t,n,r){for(var i=t-1;t<=n;){var a=t+n>>>1;e[a]<r?(i=a,t=a+1):n=a-1}return i}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},le:function(e,t,n,r,i){return"function"===typeof n?function(e,t,n,r,i){for(var a=t-1;t<=n;){var o=t+n>>>1;i(e[o],r)<=0?(a=o,t=o+1):n=o-1}return a}(e,void 0===r?0:0|r,void 0===i?e.length-1:0|i,t,n):function(e,t,n,r){for(var i=t-1;t<=n;){var a=t+n>>>1;e[a]<=r?(i=a,t=a+1):n=a-1}return i}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},eq:function(e,t,n,r,i){return"function"===typeof n?function(e,t,n,r,i){for(;t<=n;){var a=t+n>>>1,o=i(e[a],r);if(0===o)return a;o<=0?t=a+1:n=a-1}return-1}(e,void 0===r?0:0|r,void 0===i?e.length-1:0|i,t,n):function(e,t,n,r){for(;t<=n;){var i=t+n>>>1,a=e[i];if(a===r)return i;a<=r?t=i+1:n=i-1}return-1}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)}};function De(e,t,n,r,i){this.mid=e,this.left=t,this.right=n,this.leftPoints=r,this.rightPoints=i,this.count=(t?t.count:0)+(n?n.count:0)+r.length}var Re=De.prototype;function je(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function Me(e,t){var n=He(t);e.mid=n.mid,e.left=n.left,e.right=n.right,e.leftPoints=n.leftPoints,e.rightPoints=n.rightPoints,e.count=n.count}function Ne(e,t){var n=e.intervals([]);n.push(t),Me(e,n)}function Fe(e,t){var n=e.intervals([]),r=n.indexOf(t);return r<0?0:(n.splice(r,1),Me(e,n),1)}function Te(e,t,n){for(var r=0;r<e.length&&e[r][0]<=t;++r){var i=n(e[r]);if(i)return i}}function Le(e,t,n){for(var r=e.length-1;r>=0&&e[r][1]>=t;--r){var i=n(e[r]);if(i)return i}}function Pe(e,t){for(var n=0;n<e.length;++n){var r=t(e[n]);if(r)return r}}function Ue(e,t){return e-t}function Ge(e,t){var n=e[0]-t[0];return n||e[1]-t[1]}function qe(e,t){var n=e[1]-t[1];return n||e[0]-t[0]}function He(e){if(0===e.length)return null;for(var t=[],n=0;n<e.length;++n)t.push(e[n][0],e[n][1]);t.sort(Ue);var r=t[t.length>>1],i=[],a=[],o=[];for(n=0;n<e.length;++n){var s=e[n];s[1]<r?i.push(s):r<s[0]?a.push(s):o.push(s)}var u=o,A=o.slice();return u.sort(Ge),A.sort(qe),new De(r,He(i),He(a),u,A)}function Ye(e){this.root=e}Re.intervals=function(e){return e.push.apply(e,this.leftPoints),this.left&&this.left.intervals(e),this.right&&this.right.intervals(e),e},Re.insert=function(e){var t=this.count-this.leftPoints.length;if(this.count+=1,e[1]<this.mid)this.left?4*(this.left.count+1)>3*(t+1)?Ne(this,e):this.left.insert(e):this.left=He([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?Ne(this,e):this.right.insert(e):this.right=He([e]);else{var n=Oe.ge(this.leftPoints,e,Ge),r=Oe.ge(this.rightPoints,e,qe);this.leftPoints.splice(n,0,e),this.rightPoints.splice(r,0,e)}},Re.remove=function(e){var t=this.count-this.leftPoints;if(e[1]<this.mid)return this.left?4*(this.right?this.right.count:0)>3*(t-1)?Fe(this,e):2===(a=this.left.remove(e))?(this.left=null,this.count-=1,1):(1===a&&(this.count-=1),a):0;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?Fe(this,e):2===(a=this.right.remove(e))?(this.right=null,this.count-=1,1):(1===a&&(this.count-=1),a):0;if(1===this.count)return this.leftPoints[0]===e?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var n=this,r=this.left;r.right;)n=r,r=r.right;if(n===this)r.right=this.right;else{var i=this.left,a=this.right;n.count-=r.count,n.right=r.left,r.left=i,r.right=a}je(this,r),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?je(this,this.left):je(this,this.right);return 1}for(i=Oe.ge(this.leftPoints,e,Ge);i<this.leftPoints.length&&this.leftPoints[i][0]===e[0];++i)if(this.leftPoints[i]===e){this.count-=1,this.leftPoints.splice(i,1);for(a=Oe.ge(this.rightPoints,e,qe);a<this.rightPoints.length&&this.rightPoints[a][1]===e[1];++a)if(this.rightPoints[a]===e)return this.rightPoints.splice(a,1),1}return 0},Re.queryPoint=function(e,t){if(e<this.mid){if(this.left)if(n=this.left.queryPoint(e,t))return n;return Te(this.leftPoints,e,t)}if(e>this.mid){var n;if(this.right)if(n=this.right.queryPoint(e,t))return n;return Le(this.rightPoints,e,t)}return Pe(this.leftPoints,t)},Re.queryInterval=function(e,t,n){var r;if(e<this.mid&&this.left&&(r=this.left.queryInterval(e,t,n)))return r;if(t>this.mid&&this.right&&(r=this.right.queryInterval(e,t,n)))return r;return t<this.mid?Te(this.leftPoints,t,n):e>this.mid?Le(this.rightPoints,e,n):Pe(this.leftPoints,n)};var Je=Ye.prototype;Je.insert=function(e){this.root?this.root.insert(e):this.root=new De(e[0],null,null,[e],[e])},Je.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},Je.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},Je.queryInterval=function(e,t,n){if(e<=t&&this.root)return this.root.queryInterval(e,t,n)},Object.defineProperty(Je,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(Je,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});var ze,Ke,We=function(){function e(){var t;u()(this,e),I()(this,"_columnSizeMap",{}),I()(this,"_intervalTree",t&&0!==t.length?new Ye(He(t)):new Ye(null)),I()(this,"_leftMap",{})}return c()(e,[{key:"estimateTotalHeight",value:function(e,t,n){var r=e-this.count;return this.tallestColumnSize+Math.ceil(r/t)*n}},{key:"range",value:function(e,t,n){var r=this;this._intervalTree.queryInterval(e,e+t,(function(e){var t=Se()(e,3),i=t[0],a=(t[1],t[2]);return n(a,r._leftMap[a],i)}))}},{key:"setPosition",value:function(e,t,n,r){this._intervalTree.insert([n,n+r,e]),this._leftMap[e]=t;var i=this._columnSizeMap,a=i[t];i[t]=void 0===a?n+r:Math.max(a,n+r)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var n in e){var r=e[n];t=0===t?r:Math.min(t,r)}return t}},{key:"tallestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var n in e){var r=e[n];t=Math.max(t,r)}return t}}]),e}();function Ve(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 Xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ve(n,!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ve(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ze=(Ke=ze=function(e){function t(){var e,n;u()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=f()(this,(e=g()(t)).call.apply(e,[this].concat(i))),I()(p()(n),"state",{isScrolling:!1,scrollTop:0}),I()(p()(n),"_debounceResetIsScrollingId",void 0),I()(p()(n),"_invalidateOnUpdateStartIndex",null),I()(p()(n),"_invalidateOnUpdateStopIndex",null),I()(p()(n),"_positionCache",new We),I()(p()(n),"_startIndex",null),I()(p()(n),"_startIndexMemoized",null),I()(p()(n),"_stopIndex",null),I()(p()(n),"_stopIndexMemoized",null),I()(p()(n),"_debounceResetIsScrollingCallback",(function(){n.setState({isScrolling:!1})})),I()(p()(n),"_setScrollingContainerRef",(function(e){n._scrollingContainer=e})),I()(p()(n),"_onScroll",(function(e){var t=n.props.height,r=e.currentTarget.scrollTop,i=Math.min(Math.max(0,n._getEstimatedTotalHeight()-t),r);r===i&&(n._debounceResetIsScrolling(),n.state.scrollTop!==i&&n.setState({isScrolling:!0,scrollTop:i}))})),n}return y()(t,e),c()(t,[{key:"clearCellPositions",value:function(){this._positionCache=new We,this.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.rowIndex;null===this._invalidateOnUpdateStartIndex?(this._invalidateOnUpdateStartIndex=t,this._invalidateOnUpdateStopIndex=t):(this._invalidateOnUpdateStartIndex=Math.min(this._invalidateOnUpdateStartIndex,t),this._invalidateOnUpdateStopIndex=Math.max(this._invalidateOnUpdateStopIndex,t))}},{key:"recomputeCellPositions",value:function(){var e=this._positionCache.count-1;this._positionCache=new We,this._populatePositionCache(0,e),this.forceUpdate()}},{key:"componentDidMount",value:function(){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback()}},{key:"componentDidUpdate",value:function(e,t){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback(),this.props.scrollTop!==e.scrollTop&&this._debounceResetIsScrolling()}},{key:"componentWillUnmount",value:function(){this._debounceResetIsScrollingId&&q(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.autoHeight,a=n.cellCount,o=n.cellMeasurerCache,s=n.cellRenderer,u=n.className,A=n.height,c=n.id,l=n.keyMapper,f=n.overscanByPixels,h=n.role,g=n.style,d=n.tabIndex,p=n.width,v=n.rowDirection,y=this.state,m=y.isScrolling,b=y.scrollTop,E=[],C=this._getEstimatedTotalHeight(),w=this._positionCache.shortestColumnSize,Q=this._positionCache.count,k=0;if(this._positionCache.range(Math.max(0,b-f),A+2*f,(function(n,r,i){var a;"undefined"===typeof e?(k=n,e=n):(k=Math.min(k,n),e=Math.max(e,n)),E.push(s({index:n,isScrolling:m,key:l(n),parent:t,style:(a={height:o.getHeight(n)},I()(a,"ltr"===v?"left":"right",r),I()(a,"position","absolute"),I()(a,"top",i),I()(a,"width",o.getWidth(n)),a)}))})),w<b+A+f&&Q<a)for(var _=Math.min(a-Q,Math.ceil((b+A+f-w)/o.defaultHeight*p/o.defaultWidth)),x=Q;x<Q+_;x++)e=x,E.push(s({index:x,isScrolling:m,key:l(x),parent:this,style:{width:o.getWidth(x)}}));return this._startIndex=k,this._stopIndex=e,i.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:Object(B.a)("ReactVirtualized__Masonry",u),id:c,onScroll:this._onScroll,role:h,style:Xe({boxSizing:"border-box",direction:"ltr",height:r?"auto":A,overflowX:"hidden",overflowY:C<A?"hidden":"auto",position:"relative",width:p,WebkitOverflowScrolling:"touch",willChange:"transform"},g),tabIndex:d},i.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:C,maxWidth:"100%",maxHeight:C,overflow:"hidden",pointerEvents:m?"none":"",position:"relative"}},E))}},{key:"_checkInvalidateOnUpdate",value:function(){if("number"===typeof this._invalidateOnUpdateStartIndex){var e=this._invalidateOnUpdateStartIndex,t=this._invalidateOnUpdateStopIndex;this._invalidateOnUpdateStartIndex=null,this._invalidateOnUpdateStopIndex=null,this._populatePositionCache(e,t),this.forceUpdate()}}},{key:"_debounceResetIsScrolling",value:function(){var e=this.props.scrollingResetTimeInterval;this._debounceResetIsScrollingId&&q(this._debounceResetIsScrollingId),this._debounceResetIsScrollingId=H(this._debounceResetIsScrollingCallback,e)}},{key:"_getEstimatedTotalHeight",value:function(){var e=this.props,t=e.cellCount,n=e.cellMeasurerCache,r=e.width,i=Math.max(1,Math.floor(r/n.defaultWidth));return this._positionCache.estimateTotalHeight(t,i,n.defaultHeight)}},{key:"_invokeOnScrollCallback",value:function(){var e=this.props,t=e.height,n=e.onScroll,r=this.state.scrollTop;this._onScrollMemoized!==r&&(n({clientHeight:t,scrollHeight:this._getEstimatedTotalHeight(),scrollTop:r}),this._onScrollMemoized=r)}},{key:"_invokeOnCellsRenderedCallback",value:function(){this._startIndexMemoized===this._startIndex&&this._stopIndexMemoized===this._stopIndex||((0,this.props.onCellsRendered)({startIndex:this._startIndex,stopIndex:this._stopIndex}),this._startIndexMemoized=this._startIndex,this._stopIndexMemoized=this._stopIndex)}},{key:"_populatePositionCache",value:function(e,t){for(var n=this.props,r=n.cellMeasurerCache,i=n.cellPositioner,a=e;a<=t;a++){var o=i(a),s=o.left,u=o.top;this._positionCache.setPosition(a,s,u,r.getHeight(a))}}}],[{key:"getDerivedStateFromProps",value:function(e,t){return void 0!==e.scrollTop&&t.scrollTop!==e.scrollTop?{isScrolling:!0,scrollTop:e.scrollTop}:null}}]),t}(i.PureComponent),I()(ze,"propTypes",null),Ke);function $e(){}I()(Ze,"defaultProps",{autoHeight:!1,keyMapper:function(e){return e},onCellsRendered:$e,onScroll:$e,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:150,style:{},tabIndex:0,rowDirection:"ltr"});Object(b.a)(Ze);var et=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u()(this,e),I()(this,"_cellMeasurerCache",void 0),I()(this,"_columnIndexOffset",void 0),I()(this,"_rowIndexOffset",void 0),I()(this,"columnWidth",(function(e){var n=e.index;t._cellMeasurerCache.columnWidth({index:n+t._columnIndexOffset})})),I()(this,"rowHeight",(function(e){var n=e.index;t._cellMeasurerCache.rowHeight({index:n+t._rowIndexOffset})}));var r=n.cellMeasurerCache,i=n.columnIndexOffset,a=void 0===i?0:i,o=n.rowIndexOffset,s=void 0===o?0:o;this._cellMeasurerCache=r,this._columnIndexOffset=a,this._rowIndexOffset=s}return c()(e,[{key:"clear",value:function(e,t){this._cellMeasurerCache.clear(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getHeight(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getWidth(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.has(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"set",value:function(e,t,n,r){this._cellMeasurerCache.set(e+this._rowIndexOffset,t+this._columnIndexOffset,n,r)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),e}();function tt(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 nt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tt(n,!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tt(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var rt=function(e){function t(e,n){var r;u()(this,t),r=f()(this,g()(t).call(this,e,n)),I()(p()(r),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),I()(p()(r),"_deferredInvalidateColumnIndex",null),I()(p()(r),"_deferredInvalidateRowIndex",null),I()(p()(r),"_bottomLeftGridRef",(function(e){r._bottomLeftGrid=e})),I()(p()(r),"_bottomRightGridRef",(function(e){r._bottomRightGrid=e})),I()(p()(r),"_cellRendererBottomLeftGrid",(function(e){var t=e.rowIndex,n=k()(e,["rowIndex"]),a=r.props,o=a.cellRenderer,s=a.fixedRowCount;return t===a.rowCount-s?i.createElement("div",{key:n.key,style:nt({},n.style,{height:20})}):o(nt({},n,{parent:p()(r),rowIndex:t+s}))})),I()(p()(r),"_cellRendererBottomRightGrid",(function(e){var t=e.columnIndex,n=e.rowIndex,i=k()(e,["columnIndex","rowIndex"]),a=r.props,o=a.cellRenderer,s=a.fixedColumnCount,u=a.fixedRowCount;return o(nt({},i,{columnIndex:t+s,parent:p()(r),rowIndex:n+u}))})),I()(p()(r),"_cellRendererTopRightGrid",(function(e){var t=e.columnIndex,n=k()(e,["columnIndex"]),a=r.props,o=a.cellRenderer,s=a.columnCount,u=a.fixedColumnCount;return t===s-u?i.createElement("div",{key:n.key,style:nt({},n.style,{width:20})}):o(nt({},n,{columnIndex:t+u,parent:p()(r)}))})),I()(p()(r),"_columnWidthRightGrid",(function(e){var t=e.index,n=r.props,i=n.columnCount,a=n.fixedColumnCount,o=n.columnWidth,s=r.state,u=s.scrollbarSize;return s.showHorizontalScrollbar&&t===i-a?u:"function"===typeof o?o({index:t+a}):o})),I()(p()(r),"_onScroll",(function(e){var t=e.scrollLeft,n=e.scrollTop;r.setState({scrollLeft:t,scrollTop:n});var i=r.props.onScroll;i&&i(e)})),I()(p()(r),"_onScrollbarPresenceChange",(function(e){var t=e.horizontal,n=e.size,i=e.vertical,a=r.state,o=a.showHorizontalScrollbar,s=a.showVerticalScrollbar;if(t!==o||i!==s){r.setState({scrollbarSize:n,showHorizontalScrollbar:t,showVerticalScrollbar:i});var u=r.props.onScrollbarPresenceChange;"function"===typeof u&&u({horizontal:t,size:n,vertical:i})}})),I()(p()(r),"_onScrollLeft",(function(e){var t=e.scrollLeft;r._onScroll({scrollLeft:t,scrollTop:r.state.scrollTop})})),I()(p()(r),"_onScrollTop",(function(e){var t=e.scrollTop;r._onScroll({scrollTop:t,scrollLeft:r.state.scrollLeft})})),I()(p()(r),"_rowHeightBottomGrid",(function(e){var t=e.index,n=r.props,i=n.fixedRowCount,a=n.rowCount,o=n.rowHeight,s=r.state,u=s.scrollbarSize;return s.showVerticalScrollbar&&t===a-i?u:"function"===typeof o?o({index:t+i}):o})),I()(p()(r),"_topLeftGridRef",(function(e){r._topLeftGrid=e})),I()(p()(r),"_topRightGridRef",(function(e){r._topRightGrid=e}));var a=e.deferredMeasurementCache,o=e.fixedColumnCount,s=e.fixedRowCount;return r._maybeCalculateCachedStyles(!0),a&&(r._deferredMeasurementCacheBottomLeftGrid=s>0?new et({cellMeasurerCache:a,columnIndexOffset:0,rowIndexOffset:s}):a,r._deferredMeasurementCacheBottomRightGrid=o>0||s>0?new et({cellMeasurerCache:a,columnIndexOffset:o,rowIndexOffset:s}):a,r._deferredMeasurementCacheTopRightGrid=o>0?new et({cellMeasurerCache:a,columnIndexOffset:o,rowIndexOffset:0}):a),r}return y()(t,e),c()(t,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r;this._deferredInvalidateColumnIndex="number"===typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,n):n,this._deferredInvalidateRowIndex="number"===typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,i):i}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r,a=this.props,o=a.fixedColumnCount,s=a.fixedRowCount,u=Math.max(0,n-o),A=Math.max(0,i-s);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:A}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:u,rowIndex:A}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:i}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:u,rowIndex:i}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.scrollLeft,n=e.scrollTop;if(t>0||n>0){var r={};t>0&&(r.scrollLeft=t),n>0&&(r.scrollTop=n),this.setState(r)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var e=this.props,t=e.onScroll,n=e.onSectionRendered,r=(e.onScrollbarPresenceChange,e.scrollLeft,e.scrollToColumn),a=(e.scrollTop,e.scrollToRow),o=k()(e,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),0===this.props.width||0===this.props.height)return null;var s=this.state,u=s.scrollLeft,A=s.scrollTop;return i.createElement("div",{style:this._containerOuterStyle},i.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(o),this._renderTopRightGrid(nt({},o,{onScroll:t,scrollLeft:u}))),i.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(nt({},o,{onScroll:t,scrollTop:A})),this._renderBottomRightGrid(nt({},o,{onScroll:t,onSectionRendered:n,scrollLeft:u,scrollToColumn:r,scrollToRow:a,scrollTop:A}))))}},{key:"_getBottomGridHeight",value:function(e){return e.height-this._getTopGridHeight(e)}},{key:"_getLeftGridWidth",value:function(e){var t=e.fixedColumnCount,n=e.columnWidth;if(null==this._leftGridWidth)if("function"===typeof n){for(var r=0,i=0;i<t;i++)r+=n({index:i});this._leftGridWidth=r}else this._leftGridWidth=n*t;return this._leftGridWidth}},{key:"_getRightGridWidth",value:function(e){return e.width-this._getLeftGridWidth(e)}},{key:"_getTopGridHeight",value:function(e){var t=e.fixedRowCount,n=e.rowHeight;if(null==this._topGridHeight)if("function"===typeof n){for(var r=0,i=0;i<t;i++)r+=n({index:i});this._topGridHeight=r}else this._topGridHeight=n*t;return this._topGridHeight}},{key:"_handleInvalidatedGridSize",value:function(){if("number"===typeof this._deferredInvalidateColumnIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t}),this.forceUpdate()}}},{key:"_maybeCalculateCachedStyles",value:function(e){var t=this.props,n=t.columnWidth,r=t.enableFixedColumnScroll,i=t.enableFixedRowScroll,a=t.height,o=t.fixedColumnCount,s=t.fixedRowCount,u=t.rowHeight,A=t.style,c=t.styleBottomLeftGrid,l=t.styleBottomRightGrid,f=t.styleTopLeftGrid,h=t.styleTopRightGrid,g=t.width,d=e||a!==this._lastRenderedHeight||g!==this._lastRenderedWidth,p=e||n!==this._lastRenderedColumnWidth||o!==this._lastRenderedFixedColumnCount,v=e||s!==this._lastRenderedFixedRowCount||u!==this._lastRenderedRowHeight;(e||d||A!==this._lastRenderedStyle)&&(this._containerOuterStyle=nt({height:a,overflow:"visible",width:g},A)),(e||d||v)&&(this._containerTopStyle={height:this._getTopGridHeight(this.props),position:"relative",width:g},this._containerBottomStyle={height:a-this._getTopGridHeight(this.props),overflow:"visible",position:"relative",width:g}),(e||c!==this._lastRenderedStyleBottomLeftGrid)&&(this._bottomLeftGridStyle=nt({left:0,overflowX:"hidden",overflowY:r?"auto":"hidden",position:"absolute"},c)),(e||p||l!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=nt({left:this._getLeftGridWidth(this.props),position:"absolute"},l)),(e||f!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=nt({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},f)),(e||p||h!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=nt({left:this._getLeftGridWidth(this.props),overflowX:i?"auto":"hidden",overflowY:"hidden",position:"absolute",top:0},h)),this._lastRenderedColumnWidth=n,this._lastRenderedFixedColumnCount=o,this._lastRenderedFixedRowCount=s,this._lastRenderedHeight=a,this._lastRenderedRowHeight=u,this._lastRenderedStyle=A,this._lastRenderedStyleBottomLeftGrid=c,this._lastRenderedStyleBottomRightGrid=l,this._lastRenderedStyleTopLeftGrid=f,this._lastRenderedStyleTopRightGrid=h,this._lastRenderedWidth=g}},{key:"_prepareForRender",value:function(){this._lastRenderedColumnWidth===this.props.columnWidth&&this._lastRenderedFixedColumnCount===this.props.fixedColumnCount||(this._leftGridWidth=null),this._lastRenderedFixedRowCount===this.props.fixedRowCount&&this._lastRenderedRowHeight===this.props.rowHeight||(this._topGridHeight=null),this._maybeCalculateCachedStyles(),this._lastRenderedColumnWidth=this.props.columnWidth,this._lastRenderedFixedColumnCount=this.props.fixedColumnCount,this._lastRenderedFixedRowCount=this.props.fixedRowCount,this._lastRenderedRowHeight=this.props.rowHeight}},{key:"_renderBottomLeftGrid",value:function(e){var t=e.enableFixedColumnScroll,n=e.fixedColumnCount,r=e.fixedRowCount,a=e.rowCount,o=e.hideBottomLeftGridScrollbar,s=this.state.showVerticalScrollbar;if(!n)return null;var u=s?1:0,A=this._getBottomGridHeight(e),c=this._getLeftGridWidth(e),l=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,f=o?c+l:c,h=i.createElement(V,C()({},e,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:n,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:A,onScroll:t?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,a-r)+u,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:f}));return o?i.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:nt({},this._bottomLeftGridStyle,{height:A,width:c,overflowY:"hidden"})},h):h}},{key:"_renderBottomRightGrid",value:function(e){var t=e.columnCount,n=e.fixedColumnCount,r=e.fixedRowCount,a=e.rowCount,o=e.scrollToColumn,s=e.scrollToRow;return i.createElement(V,C()({},e,{cellRenderer:this._cellRendererBottomRightGrid,className:this.props.classNameBottomRightGrid,columnCount:Math.max(0,t-n),columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheBottomRightGrid,height:this._getBottomGridHeight(e),onScroll:this._onScroll,onScrollbarPresenceChange:this._onScrollbarPresenceChange,ref:this._bottomRightGridRef,rowCount:Math.max(0,a-r),rowHeight:this._rowHeightBottomGrid,scrollToColumn:o-n,scrollToRow:s-r,style:this._bottomRightGridStyle,width:this._getRightGridWidth(e)}))}},{key:"_renderTopLeftGrid",value:function(e){var t=e.fixedColumnCount,n=e.fixedRowCount;return t&&n?i.createElement(V,C()({},e,{className:this.props.classNameTopLeftGrid,columnCount:t,height:this._getTopGridHeight(e),ref:this._topLeftGridRef,rowCount:n,style:this._topLeftGridStyle,tabIndex:null,width:this._getLeftGridWidth(e)})):null}},{key:"_renderTopRightGrid",value:function(e){var t=e.columnCount,n=e.enableFixedRowScroll,r=e.fixedColumnCount,a=e.fixedRowCount,o=e.scrollLeft,s=e.hideTopRightGridScrollbar,u=this.state,A=u.showHorizontalScrollbar,c=u.scrollbarSize;if(!a)return null;var l=A?1:0,f=this._getTopGridHeight(e),h=this._getRightGridWidth(e),g=A?c:0,d=f,p=this._topRightGridStyle;s&&(d=f+g,p=nt({},this._topRightGridStyle,{left:0}));var v=i.createElement(V,C()({},e,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,t-r)+l,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:d,onScroll:n?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:a,scrollLeft:o,style:p,tabIndex:null,width:h}));return s?i.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:nt({},this._topRightGridStyle,{height:f,width:h,overflowX:"hidden"})},v):v}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft&&e.scrollLeft>=0?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop&&e.scrollTop>=0?e.scrollTop:t.scrollTop}:null}}]),t}(i.PureComponent);I()(rt,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1}),rt.propTypes={},Object(b.a)(rt);var it=function(e){function t(e,n){var r;return u()(this,t),(r=f()(this,g()(t).call(this,e,n))).state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},r._onScroll=r._onScroll.bind(p()(r)),r}return y()(t,e),c()(t,[{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.clientHeight,r=t.clientWidth,i=t.scrollHeight,a=t.scrollLeft,o=t.scrollTop,s=t.scrollWidth;return e({clientHeight:n,clientWidth:r,onScroll:this._onScroll,scrollHeight:i,scrollLeft:a,scrollTop:o,scrollWidth:s})}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.clientWidth,r=e.scrollHeight,i=e.scrollLeft,a=e.scrollTop,o=e.scrollWidth;this.setState({clientHeight:t,clientWidth:n,scrollHeight:r,scrollLeft:i,scrollTop:a,scrollWidth:o})}}]),t}(i.PureComponent);it.propTypes={};function at(e){var t=e.className,n=e.columns,r=e.style;return i.createElement("div",{className:t,role:"row",style:r},n)}at.propTypes=null;var ot={ASC:"ASC",DESC:"DESC"};function st(e){var t=e.sortDirection,n=Object(B.a)("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":t===ot.ASC,"ReactVirtualized__Table__sortableHeaderIcon--DESC":t===ot.DESC});return i.createElement("svg",{className:n,width:18,height:18,viewBox:"0 0 24 24"},t===ot.ASC?i.createElement("path",{d:"M7 14l5-5 5 5z"}):i.createElement("path",{d:"M7 10l5 5 5-5z"}),i.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function ut(e){var t=e.dataKey,n=e.label,r=e.sortBy,a=e.sortDirection,o=r===t,s=[i.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"===typeof n?n:null},n)];return o&&s.push(i.createElement(st,{key:"SortIndicator",sortDirection:a})),s}function At(e){var t=e.className,n=e.columns,r=e.index,a=e.key,o=e.onRowClick,s=e.onRowDoubleClick,u=e.onRowMouseOut,A=e.onRowMouseOver,c=e.onRowRightClick,l=e.rowData,f=e.style,h={"aria-rowindex":r+1};return(o||s||u||A||c)&&(h["aria-label"]="row",h.tabIndex=0,o&&(h.onClick=function(e){return o({event:e,index:r,rowData:l})}),s&&(h.onDoubleClick=function(e){return s({event:e,index:r,rowData:l})}),u&&(h.onMouseOut=function(e){return u({event:e,index:r,rowData:l})}),A&&(h.onMouseOver=function(e){return A({event:e,index:r,rowData:l})}),c&&(h.onContextMenu=function(e){return c({event:e,index:r,rowData:l})})),i.createElement("div",C()({},h,{className:t,key:a,role:"row",style:f}),n)}st.propTypes={},ut.propTypes=null,At.propTypes=null;var ct=function(e){function t(){return u()(this,t),f()(this,g()(t).apply(this,arguments))}return y()(t,e),t}(i.Component);function lt(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 ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lt(n,!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lt(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}I()(ct,"defaultProps",{cellDataGetter:function(e){var t=e.dataKey,n=e.rowData;return"function"===typeof n.get?n.get(t):n[t]},cellRenderer:function(e){var t=e.cellData;return null==t?"":String(t)},defaultSortDirection:ot.ASC,flexGrow:0,flexShrink:1,headerRenderer:ut,style:{}}),ct.propTypes={};var ht=function(e){function t(e){var n;return u()(this,t),(n=f()(this,g()(t).call(this,e))).state={scrollbarWidth:0},n._createColumn=n._createColumn.bind(p()(n)),n._createRow=n._createRow.bind(p()(n)),n._onScroll=n._onScroll.bind(p()(n)),n._onSectionRendered=n._onSectionRendered.bind(p()(n)),n._setRef=n._setRef.bind(p()(n)),n}return y()(t,e),c()(t,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,n=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:n}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:n,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:i,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var e=Object(ce.findDOMNode)(this.Grid),t=e.clientWidth||0;return(e.offsetWidth||0)-t}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.className,a=t.disableHeader,o=t.gridClassName,s=t.gridStyle,u=t.headerHeight,A=t.headerRowRenderer,c=t.height,l=t.id,f=t.noRowsRenderer,h=t.rowClassName,g=t.rowStyle,d=t.scrollToIndex,p=t.style,v=t.width,y=this.state.scrollbarWidth,m=a?c:c-u,I="function"===typeof h?h({index:-1}):h,b="function"===typeof g?g({index:-1}):g;return this._cachedColumnStyles=[],i.Children.toArray(n).forEach((function(t,n){var r=e._getFlexStyleForColumn(t,t.props.style);e._cachedColumnStyles[n]=ft({overflow:"hidden"},r)})),i.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":i.Children.toArray(n).length,"aria-rowcount":this.props.rowCount,className:Object(B.a)("ReactVirtualized__Table",r),id:l,role:"grid",style:p},!a&&A({className:Object(B.a)("ReactVirtualized__Table__headerRow",I),columns:this._getHeaderColumns(),style:ft({height:u,overflow:"hidden",paddingRight:y,width:v},b)}),i.createElement(V,C()({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:Object(B.a)("ReactVirtualized__Table__Grid",o),cellRenderer:this._createRow,columnWidth:v,columnCount:1,height:m,id:void 0,noContentRenderer:f,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:y,scrollToRow:d,style:ft({},s,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,n=e.columnIndex,r=e.isScrolling,a=e.parent,o=e.rowData,s=e.rowIndex,u=this.props.onColumnClick,A=t.props,c=A.cellDataGetter,l=A.cellRenderer,f=A.className,h=A.columnData,g=A.dataKey,d=A.id,p=l({cellData:c({columnData:h,dataKey:g,rowData:o}),columnData:h,columnIndex:n,dataKey:g,isScrolling:r,parent:a,rowData:o,rowIndex:s}),v=this._cachedColumnStyles[n],y="string"===typeof p?p:null;return i.createElement("div",{"aria-colindex":n+1,"aria-describedby":d,className:Object(B.a)("ReactVirtualized__Table__rowColumn",f),key:"Row"+s+"-Col"+n,onClick:function(e){u&&u({columnData:h,dataKey:g,event:e})},role:"gridcell",style:v,title:y},p)}},{key:"_createHeader",value:function(e){var t,n,r,a,o,s=e.column,u=e.index,A=this.props,c=A.headerClassName,l=A.headerStyle,f=A.onHeaderClick,h=A.sort,g=A.sortBy,d=A.sortDirection,p=s.props,v=p.columnData,y=p.dataKey,m=p.defaultSortDirection,I=p.disableSort,b=p.headerRenderer,E=p.id,C=p.label,w=!I&&h,Q=Object(B.a)("ReactVirtualized__Table__headerColumn",c,s.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:w}),k=this._getFlexStyleForColumn(s,ft({},l,{},s.props.headerStyle)),_=b({columnData:v,dataKey:y,disableSort:I,label:C,sortBy:g,sortDirection:d});if(w||f){var x=g!==y?m:d===ot.DESC?ot.ASC:ot.DESC,S=function(e){w&&h({defaultSortDirection:m,event:e,sortBy:y,sortDirection:x}),f&&f({columnData:v,dataKey:y,event:e})};o=s.props["aria-label"]||C||y,a="none",r=0,t=S,n=function(e){"Enter"!==e.key&&" "!==e.key||S(e)}}return g===y&&(a=d===ot.ASC?"ascending":"descending"),i.createElement("div",{"aria-label":o,"aria-sort":a,className:Q,id:E,key:"Header-Col"+u,onClick:t,onKeyDown:n,role:"columnheader",style:k,tabIndex:r},_)}},{key:"_createRow",value:function(e){var t=this,n=e.rowIndex,r=e.isScrolling,a=e.key,o=e.parent,s=e.style,u=this.props,A=u.children,c=u.onRowClick,l=u.onRowDoubleClick,f=u.onRowRightClick,h=u.onRowMouseOver,g=u.onRowMouseOut,d=u.rowClassName,p=u.rowGetter,v=u.rowRenderer,y=u.rowStyle,m=this.state.scrollbarWidth,I="function"===typeof d?d({index:n}):d,b="function"===typeof y?y({index:n}):y,E=p({index:n}),C=i.Children.toArray(A).map((function(e,i){return t._createColumn({column:e,columnIndex:i,isScrolling:r,parent:o,rowData:E,rowIndex:n,scrollbarWidth:m})})),w=Object(B.a)("ReactVirtualized__Table__row",I),Q=ft({},s,{height:this._getRowHeight(n),overflow:"hidden",paddingRight:m},b);return v({className:w,columns:C,index:n,isScrolling:r,key:a,onRowClick:c,onRowDoubleClick:l,onRowRightClick:f,onRowMouseOver:h,onRowMouseOut:g,rowData:E,style:Q})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),r=ft({},t,{flex:n,msFlex:n,WebkitFlex:n});return e.props.maxWidth&&(r.maxWidth=e.props.maxWidth),e.props.minWidth&&(r.minWidth=e.props.minWidth),r}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,n=t.children;return(t.disableHeader?[]:i.Children.toArray(n)).map((function(t,n){return e._createHeader({column:t,index:n})}))}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return"function"===typeof t?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.scrollHeight,r=e.scrollTop;(0,this.props.onScroll)({clientHeight:t,scrollHeight:n,scrollTop:r})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,n=e.rowOverscanStopIndex,r=e.rowStartIndex,i=e.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:n,startIndex:r,stopIndex:i})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setScrollbarWidth",value:function(){var e=this.getScrollbarWidth();this.setState({scrollbarWidth:e})}}]),t}(i.PureComponent);I()(ht,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:X,overscanRowCount:10,rowRenderer:At,headerRowRenderer:at,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),ht.propTypes={};var gt=[],dt=null,pt=null;function vt(){pt&&(pt=null,document.body&&null!=dt&&(document.body.style.pointerEvents=dt),dt=null)}function yt(){vt(),gt.forEach((function(e){return e.__resetIsScrolling()}))}function mt(e){e.currentTarget===window&&null==dt&&document.body&&(dt=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),function(){pt&&q(pt);var e=0;gt.forEach((function(t){e=Math.max(e,t.props.scrollingResetTimeInterval)})),pt=H(yt,e)}(),gt.forEach((function(t){t.props.scrollElement===e.currentTarget&&t.__handleWindowScrollEvent()}))}function It(e,t){gt.some((function(e){return e.props.scrollElement===t}))||t.addEventListener("scroll",mt),gt.push(e)}function bt(e,t){(gt=gt.filter((function(t){return t!==e}))).length||(t.removeEventListener("scroll",mt),pt&&(q(pt),vt()))}var Et,Ct,Bt=function(e){return e===window},wt=function(e){return e.getBoundingClientRect()};function Qt(e,t){if(e){if(Bt(e)){var n=window,r=n.innerHeight,i=n.innerWidth;return{height:"number"===typeof r?r:0,width:"number"===typeof i?i:0}}return wt(e)}return{height:t.serverHeight,width:t.serverWidth}}function kt(e,t){if(Bt(t)&&document.documentElement){var n=document.documentElement,r=wt(e),i=wt(n);return{top:r.top-i.top,left:r.left-i.left}}var a=_t(t),o=wt(e),s=wt(t);return{top:o.top+a.top-s.top,left:o.left+a.left-s.left}}function _t(e){return Bt(e)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:e.scrollTop,left:e.scrollLeft}}function xt(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 St(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xt(n,!0).forEach((function(t){I()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xt(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ot=function(){return"undefined"!==typeof window?window:void 0},Dt=(Ct=Et=function(e){function t(){var e,n;u()(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=f()(this,(e=g()(t)).call.apply(e,[this].concat(i))),I()(p()(n),"_window",Ot()),I()(p()(n),"_isMounted",!1),I()(p()(n),"_positionFromTop",0),I()(p()(n),"_positionFromLeft",0),I()(p()(n),"_detectElementResize",void 0),I()(p()(n),"_child",void 0),I()(p()(n),"state",St({},Qt(n.props.scrollElement,n.props),{isScrolling:!1,scrollLeft:0,scrollTop:0})),I()(p()(n),"_registerChild",(function(e){!e||e instanceof Element||console.warn("WindowScroller registerChild expects to be passed Element or null"),n._child=e,n.updatePosition()})),I()(p()(n),"_onChildScroll",(function(e){var t=e.scrollTop;if(n.state.scrollTop!==t){var r=n.props.scrollElement;r&&("function"===typeof r.scrollTo?r.scrollTo(0,t+n._positionFromTop):r.scrollTop=t+n._positionFromTop)}})),I()(p()(n),"_registerResizeListener",(function(e){e===window?window.addEventListener("resize",n._onResize,!1):n._detectElementResize.addResizeListener(e,n._onResize)})),I()(p()(n),"_unregisterResizeListener",(function(e){e===window?window.removeEventListener("resize",n._onResize,!1):e&&n._detectElementResize.removeResizeListener(e,n._onResize)})),I()(p()(n),"_onResize",(function(){n.updatePosition()})),I()(p()(n),"__handleWindowScrollEvent",(function(){if(n._isMounted){var e=n.props.onScroll,t=n.props.scrollElement;if(t){var r=_t(t),i=Math.max(0,r.left-n._positionFromLeft),a=Math.max(0,r.top-n._positionFromTop);n.setState({isScrolling:!0,scrollLeft:i,scrollTop:a}),e({scrollLeft:i,scrollTop:a})}}})),I()(p()(n),"__resetIsScrolling",(function(){n.setState({isScrolling:!1})})),n}return y()(t,e),c()(t,[{key:"updatePosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,t=this.props.onResize,n=this.state,r=n.height,i=n.width,a=this._child||ce.findDOMNode(this);if(a instanceof Element&&e){var o=kt(a,e);this._positionFromTop=o.top,this._positionFromLeft=o.left}var s=Qt(e,this.props);r===s.height&&i===s.width||(this.setState({height:s.height,width:s.width}),t({height:s.height,width:s.width}))}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=Object(ie.a)(),this.updatePosition(e),e&&(It(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var n=this.props.scrollElement,r=e.scrollElement;r!==n&&null!=r&&null!=n&&(this.updatePosition(n),bt(this,r),It(this,n),this._unregisterResizeListener(r),this._registerResizeListener(n))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(bt(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.isScrolling,r=t.scrollTop,i=t.scrollLeft,a=t.height,o=t.width;return e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:a,isScrolling:n,scrollLeft:i,scrollTop:r,width:o})}}]),t}(i.PureComponent),I()(Et,"propTypes",null),Ct);I()(Dt,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:Ot(),serverHeight:0,serverWidth:0});var Rt=n(330),jt=n.n(Rt),Mt=n(1063),Nt=n.n(Mt),Ft=n(1064),Tt=n.n(Ft),Lt=n(97),Pt=n.n(Lt);function Ut(e){var t=e.columns,n=e.data,s=e.onChange,u=e.idKey,A=void 0===u?"id":u,c=e.valueKey,l=void 0===c?"value":c,f=e.allowMultiple,h=void 0!==f&&f,g=e.allowUncheck,d=void 0!==g&&g,p=e.showTableHead,v=void 0===p||p,y=e.showTableInputs,m=void 0!==y&&y,I=e.testHeight,b=void 0===I?void 0:I,E=e.testWidth,C=void 0===E?void 0:E,B=Object(i.useState)(null),w=Object(r.a)(B,2),Q=w[0],k=w[1],_=Object(i.useCallback)((function(e,t){(t||d)&&k(h?t?Nt()(Q||[],[e]):Tt()(Q||[],[e]):t?[e]:[])}),[h,d,Q]),x=Object(i.useCallback)((function(e){var t=e.target,n=t.checked,r=t.value;_(r,n)}),[_]),S=Object(i.useCallback)((function(e){return e.map((function(e){var t;return t={},Object(o.a)(t,A,e),Object(o.a)(t,"data",n.find((function(t){return t[A]===e}))),t}))}),[n,A]),O=Object(i.useCallback)((function(e){return Array.isArray(Q)&&Q.includes(e)}),[Q]);Object(i.useEffect)((function(){var e=n.map((function(e){return e[l]?e[A]:null})).filter(Boolean);Pt()(e,Q)||(e.length>0?k(e):k(null))}),[n,A,l]),Object(i.useEffect)((function(){if(s&&Q){var e=S(Q);h?s(e):1===Q.length?s(e[0]):0===Q.length&&s(null)}}),[Q]);var D=jt()(),R=m?"":"hidden-input-column",j=function(e){var r=e.index,i=e.style;return a.a.createElement("div",{key:n[r][A],className:"table-item table-row ".concat(O(n[r][A])?"row-checked ":""),style:i,role:"button",onClick:function(){return _(n[r][A],!O(n[r][A]))}},a.a.createElement("div",{className:"input-container ".concat(R," table-cell")},a.a.createElement("label",{htmlFor:"".concat(D,"_").concat(n[r][A])},a.a.createElement("input",{id:"".concat(D,"_").concat(n[r][A]),type:"checkbox",className:h?"checkbox":"radio",name:D,value:n[r][A],onChange:x,checked:O(n[r][A])}))),t.map((function(e){return a.a.createElement("div",{className:"table-cell",key:e},n[r][e])})))},M=function(e){var n=e.style;return a.a.createElement("div",{className:"".concat(R," table-row"),style:n},t.map((function(e){return a.a.createElement("div",{key:e},e)})))};return a.a.createElement("div",{className:"selectable-table"},a.a.createElement(se,null,(function(e){var t=e.width,r=e.height;return a.a.createElement(ht,{height:b||r,gridStyle:{outline:"none"},rowCount:n.length,rowHeight:24,headerHeight:v?24:void 0,rowRenderer:j,width:C||t,headerRowRenderer:v?M:void 0,rowGetter:function(e){var t=e.index;return n[t]}})})))}function Gt(e){var t=e.geneList,n=void 0===t?[]:t,o=e.geneSelection,s=void 0===o?[]:o,u=e.geneFilter,A=void 0===u?null:u,c=e.setGeneSelection,l=Object(i.useState)(""),f=Object(r.a)(l,2),h=f[0],g=f[1],d=Object(i.useState)(n),p=Object(r.a)(d,2),v=p[0],y=p[1];Object(i.useEffect)((function(){var e=n.filter((function(e){return e.toLowerCase().includes(h.toLowerCase())}));y(e)}),[h,n]);var m=v.filter((function(e){return!A||A.includes(e)})).sort((function(e,t){return e.localeCompare(t)})).map((function(e){return{name:e,value:!!s&&s.includes(e)}}));return a.a.createElement(a.a.Fragment,null,a.a.createElement("input",{className:"search-bar",type:"text",placeholder:"Search",value:h,onChange:function(e){g(e.target.value)}}),a.a.createElement(Ut,{columns:["name"],data:m,idKey:"name",valueKey:"value",onChange:function(e){c&&e&&e.name&&c([e.name])},allowUncheck:!1,showTableHead:!1}))}n.d(t,"a",(function(){return Gt}))},function(e,t,n){"use strict";var r=n(24),i=n(47),a=n(22),o=n(0),s=n.n(o),u=n(97),A=n.n(u),c=n(20),l=n(268),f=n.n(l),h=n(274),g=n.n(h),d=n(729),p=n.n(d),v=n(730),y=n.n(v),m=n(731),I=n.n(m),b=n(732),E=n.n(b),C=n(28),B=n.n(C),w=n(173),Q=n.n(w),k=n(533),_=n.n(k),x=n(317);function S(e){var t=[];return s.a.Children.forEach(e,(function(e){void 0!==e&&null!==e&&(Array.isArray(e)?t=t.concat(S(e)):Object(x.isFragment)(e)&&e.props?t=t.concat(S(e.props.children)):t.push(e))})),t}var O=n(312),D={rcTree:B.a.shape({root:B.a.object,prefixCls:B.a.string,selectable:B.a.bool,showIcon:B.a.bool,icon:B.a.oneOfType([B.a.node,B.a.func]),draggable:B.a.bool,checkable:B.a.oneOfType([B.a.bool,B.a.node]),checkStrictly:B.a.bool,disabled:B.a.bool,openTransitionName:B.a.string,openAnimation:B.a.oneOfType([B.a.string,B.a.object]),loadData:B.a.func,filterTreeNode:B.a.func,renderTreeNode:B.a.func,isKeyChecked:B.a.func,onNodeClick:B.a.func,onNodeDoubleClick:B.a.func,onNodeExpand:B.a.func,onNodeSelect:B.a.func,onNodeCheck:B.a.func,onNodeMouseEnter:B.a.func,onNodeMouseLeave:B.a.func,onNodeContextMenu:B.a.func,onNodeDragStart:B.a.func,onNodeDragEnter:B.a.func,onNodeDragOver:B.a.func,onNodeDragLeave:B.a.func,onNodeDragEnd:B.a.func,onNodeDrop:B.a.func})},R=f()({},D,{rcTreeNode:B.a.shape({onUpCheckConduct:B.a.func})}),j=n(804),M=n.n(j),N=n(75),F=n.n(N);function T(e){return e instanceof HTMLElement?e:F.a.findDOMNode(e)}var L=n(489),P=n.n(L),U=!("undefined"===typeof window||!window.document||!window.document.createElement);function G(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}var q=function(e,t){var n={animationend:G("Animation","AnimationEnd"),transitionend:G("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}(U,"undefined"!==typeof window?window:{}),H={};U&&(H=document.createElement("div").style);var Y={};function J(e){if(Y[e])return Y[e];var t=q[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i<r;i+=1){var a=n[i];if(Object.prototype.hasOwnProperty.call(t,a)&&a in H)return Y[e]=t[a],Y[e]}return""}var z=J("animationend"),K=J("transitionend"),W=!(!z||!K);function V(e,t){return e?"object"===typeof e?e[t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}))]:e+"-"+t:null}var X={eventProps:B.a.object,visible:B.a.bool,children:B.a.func,motionName:B.a.oneOfType([B.a.string,B.a.object]),motionAppear:B.a.bool,motionEnter:B.a.bool,motionLeave:B.a.bool,motionLeaveImmediately:B.a.bool,removeOnLeave:B.a.bool,leavedClassName:B.a.string,onAppearStart:B.a.func,onAppearActive:B.a.func,onAppearEnd:B.a.func,onEnterStart:B.a.func,onEnterActive:B.a.func,onEnterEnd:B.a.func,onLeaveStart:B.a.func,onLeaveActive:B.a.func,onLeaveEnd:B.a.func};var Z=function(e){var t=e,n=!!s.a.forwardRef;function r(e){return!(!e.motionName||!t)}"object"===typeof e&&(t=e.transitionSupport,n="forwardRef"in e?e.forwardRef:n);var i=function(e){function t(){p()(this,t);var e=I()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.onDomUpdate=function(){var t=e.state,n=t.status,i=t.newStatus,a=e.props,o=a.onAppearStart,s=a.onEnterStart,u=a.onLeaveStart,A=a.onAppearActive,c=a.onEnterActive,l=a.onLeaveActive,f=a.motionAppear,h=a.motionEnter,g=a.motionLeave;if(r(e.props)){var d=e.getElement();e.$cacheEle!==d&&(e.removeEventListener(e.$cacheEle),e.addEventListener(d),e.$cacheEle=d),i&&"appear"===n&&f?e.updateStatus(o,null,null,(function(){e.updateActiveStatus(A,"appear")})):i&&"enter"===n&&h?e.updateStatus(s,null,null,(function(){e.updateActiveStatus(c,"enter")})):i&&"leave"===n&&g&&e.updateStatus(u,null,null,(function(){e.updateActiveStatus(l,"leave")}))}},e.onMotionEnd=function(t){var n=e.state,r=n.status,i=n.statusActive,a=e.props,o=a.onAppearEnd,s=a.onEnterEnd,u=a.onLeaveEnd;"appear"===r&&i?e.updateStatus(o,{status:"none"},t):"enter"===r&&i?e.updateStatus(s,{status:"none"},t):"leave"===r&&i&&e.updateStatus(u,{status:"none"},t)},e.setNodeRef=function(t){var n=e.props.internalRef;e.node=t,"function"===typeof n?n(t):n&&"current"in n&&(n.current=t)},e.getElement=function(){return T(e.node||e)},e.addEventListener=function(t){t&&(t.addEventListener(K,e.onMotionEnd),t.addEventListener(z,e.onMotionEnd))},e.removeEventListener=function(t){t&&(t.removeEventListener(K,e.onMotionEnd),t.removeEventListener(z,e.onMotionEnd))},e.updateStatus=function(t,n,r,i){var a=t?t(e.getElement(),r):null;if(!1!==a&&!e._destroyed){var o=void 0;i&&(o=function(){e.nextFrame(i)}),e.setState(f()({statusStyle:"object"===typeof a?a:null,newStatus:!1},n),o)}},e.updateActiveStatus=function(t,n){e.nextFrame((function(){e.state.status===n&&e.updateStatus(t,{statusActive:!0})}))},e.nextFrame=function(t){e.cancelNextFrame(),e.raf=P()(t)},e.cancelNextFrame=function(){e.raf&&(P.a.cancel(e.raf),e.raf=null)},e.state={status:"none",statusActive:!1,newStatus:!1,statusStyle:null},e.$cacheEle=null,e.node=null,e.raf=null,e}return E()(t,e),y()(t,[{key:"componentDidMount",value:function(){this.onDomUpdate()}},{key:"componentDidUpdate",value:function(){this.onDomUpdate()}},{key:"componentWillUnmount",value:function(){this._destroyed=!0,this.removeEventListener(this.$cacheEle),this.cancelNextFrame()}},{key:"render",value:function(){var e,t=this.state,n=t.status,i=t.statusActive,a=t.statusStyle,o=this.props,s=o.children,u=o.motionName,A=o.visible,c=o.removeOnLeave,l=o.leavedClassName,h=o.eventProps;return s?"none"!==n&&r(this.props)?s(f()({},h,{className:Q()((e={},g()(e,V(u,n),"none"!==n),g()(e,V(u,n+"-active"),"none"!==n&&i),g()(e,u,"string"===typeof u),e)),style:a}),this.setNodeRef):A?s(f()({},h),this.setNodeRef):c?null:s(f()({},h,{className:l}),this.setNodeRef):null}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,i=t.status;if(!r(e))return{};var a=e.visible,o=e.motionAppear,s=e.motionEnter,u=e.motionLeave,A=e.motionLeaveImmediately,c={prevProps:e};return("appear"===i&&!o||"enter"===i&&!s||"leave"===i&&!u)&&(c.status="none",c.statusActive=!1,c.newStatus=!1),!n&&a&&o&&(c.status="appear",c.statusActive=!1,c.newStatus=!0),n&&!n.visible&&a&&s&&(c.status="enter",c.statusActive=!1,c.newStatus=!0),(n&&n.visible&&!a&&u||!n&&A&&!a&&u)&&(c.status="leave",c.statusActive=!1,c.newStatus=!0),c}}]),t}(s.a.Component);return i.propTypes=f()({},X,{internalRef:B.a.oneOfType([B.a.object,B.a.func])}),i.defaultProps={visible:!0,motionEnter:!0,motionAppear:!0,motionLeave:!0,removeOnLeave:!0},Object(O.a)(i),n?s.a.forwardRef((function(e,t){return s.a.createElement(i,f()({internalRef:t},e))})):i}(W),$=function(e){function t(e){p()(this,t);var n=I()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return ee.call(n),n.state={dragNodeHighlight:!1},n}return E()(t,e),y()(t,[{key:"getChildContext",value:function(){return f()({},this.context,{rcTreeNode:{}})}},{key:"componentDidMount",value:function(){var e=this.props.eventKey,t=this.context.rcTree.registerTreeNode;this.syncLoadData(this.props),t(e,this)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"componentWillUnmount",value:function(){var e=this.props.eventKey;(0,this.context.rcTree.registerTreeNode)(e,null)}},{key:"isSelectable",value:function(){var e=this.props.selectable,t=this.context.rcTree.selectable;return"boolean"===typeof e?e:t}},{key:"render",value:function(){var e,t=this.props.loading,n=this.props,r=n.className,i=n.style,a=n.dragOver,o=n.dragOverGapTop,u=n.dragOverGapBottom,A=n.isLeaf,c=n.expanded,l=n.selected,h=n.checked,d=n.halfChecked,p=M()(n,["className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","expanded","selected","checked","halfChecked"]),v=this.context.rcTree,y=v.prefixCls,m=v.filterTreeNode,I=v.draggable,b=this.isDisabled(),E=Ie(p);return s.a.createElement("li",f()({className:Q()(r,(e={},g()(e,y+"-treenode-disabled",b),g()(e,y+"-treenode-switcher-"+(c?"open":"close"),!A),g()(e,y+"-treenode-checkbox-checked",h),g()(e,y+"-treenode-checkbox-indeterminate",d),g()(e,y+"-treenode-selected",l),g()(e,y+"-treenode-loading",t),g()(e,"drag-over",!b&&a),g()(e,"drag-over-gap-top",!b&&o),g()(e,"drag-over-gap-bottom",!b&&u),g()(e,"filter-node",m&&m(this)),e)),style:i,role:"treeitem",onDragEnter:I?this.onDragEnter:void 0,onDragOver:I?this.onDragOver:void 0,onDragLeave:I?this.onDragLeave:void 0,onDrop:I?this.onDrop:void 0,onDragEnd:I?this.onDragEnd:void 0},E),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector(),this.renderChildren())}}]),t}(s.a.Component);$.propTypes={eventKey:B.a.string,prefixCls:B.a.string,className:B.a.string,style:B.a.object,root:B.a.object,onSelect:B.a.func,expanded:B.a.bool,selected:B.a.bool,checked:B.a.bool,loaded:B.a.bool,loading:B.a.bool,halfChecked:B.a.bool,children:B.a.node,title:B.a.node,pos:B.a.string,dragOver:B.a.bool,dragOverGapTop:B.a.bool,dragOverGapBottom:B.a.bool,isLeaf:B.a.bool,checkable:B.a.bool,selectable:B.a.bool,disabled:B.a.bool,disableCheckbox:B.a.bool,icon:B.a.oneOfType([B.a.node,B.a.func]),switcherIcon:B.a.oneOfType([B.a.node,B.a.func])},$.contextTypes=R,$.childContextTypes=R,$.defaultProps={title:"---"};var ee=function(){var e=this;this.onSelectorClick=function(t){(0,e.context.rcTree.onNodeClick)(t,e),e.isSelectable()?e.onSelect(t):e.onCheck(t)},this.onSelectorDoubleClick=function(t){(0,e.context.rcTree.onNodeDoubleClick)(t,e)},this.onSelect=function(t){if(!e.isDisabled()){var n=e.context.rcTree.onNodeSelect;t.preventDefault(),n(t,e)}},this.onCheck=function(t){if(!e.isDisabled()){var n=e.props,r=n.disableCheckbox,i=n.checked,a=e.context.rcTree.onNodeCheck;if(e.isCheckable()&&!r)t.preventDefault(),a(t,e,!i)}},this.onMouseEnter=function(t){(0,e.context.rcTree.onNodeMouseEnter)(t,e)},this.onMouseLeave=function(t){(0,e.context.rcTree.onNodeMouseLeave)(t,e)},this.onContextMenu=function(t){(0,e.context.rcTree.onNodeContextMenu)(t,e)},this.onDragStart=function(t){var n=e.context.rcTree.onNodeDragStart;t.stopPropagation(),e.setState({dragNodeHighlight:!0}),n(t,e);try{t.dataTransfer.setData("text/plain","")}catch(r){}},this.onDragEnter=function(t){var n=e.context.rcTree.onNodeDragEnter;t.preventDefault(),t.stopPropagation(),n(t,e)},this.onDragOver=function(t){var n=e.context.rcTree.onNodeDragOver;t.preventDefault(),t.stopPropagation(),n(t,e)},this.onDragLeave=function(t){var n=e.context.rcTree.onNodeDragLeave;t.stopPropagation(),n(t,e)},this.onDragEnd=function(t){var n=e.context.rcTree.onNodeDragEnd;t.stopPropagation(),e.setState({dragNodeHighlight:!1}),n(t,e)},this.onDrop=function(t){var n=e.context.rcTree.onNodeDrop;t.preventDefault(),t.stopPropagation(),e.setState({dragNodeHighlight:!1}),n(t,e)},this.onExpand=function(t){(0,e.context.rcTree.onNodeExpand)(t,e)},this.setSelectHandle=function(t){e.selectHandle=t},this.getNodeChildren=function(){var t=S(e.props.children).filter((function(e){return e})),n=ue(t);return t.length!==n.length&&re(),n},this.getNodeState=function(){var t=e.props.expanded;return e.isLeaf()?null:t?"open":"close"},this.isLeaf=function(){var t=e.props,n=t.isLeaf,r=t.loaded,i=e.context.rcTree.loadData,a=0!==e.getNodeChildren().length;return!1!==n&&(n||!i&&!a||i&&r&&!a)},this.isDisabled=function(){var t=e.props.disabled,n=e.context.rcTree.disabled;return!1!==t&&!(!n&&!t)},this.isCheckable=function(){var t=e.props.checkable,n=e.context.rcTree.checkable;return!(!n||!1===t)&&n},this.syncLoadData=function(t){var n=t.expanded,r=t.loading,i=t.loaded,a=e.context.rcTree,o=a.loadData,s=a.onNodeLoad;r||o&&n&&!e.isLeaf()&&(0!==e.getNodeChildren().length||i||s(e))},this.renderSwitcher=function(){var t=e.props,n=t.expanded,r=t.switcherIcon,i=e.context.rcTree,a=i.prefixCls,o=i.switcherIcon,u=r||o;if(e.isLeaf())return s.a.createElement("span",{className:Q()(a+"-switcher",a+"-switcher-noop")},"function"===typeof u?u(f()({},e.props,{isLeaf:!0})):u);var A=Q()(a+"-switcher",a+"-switcher_"+(n?"open":"close"));return s.a.createElement("span",{onClick:e.onExpand,className:A},"function"===typeof u?u(f()({},e.props,{isLeaf:!1})):u)},this.renderCheckbox=function(){var t=e.props,n=t.checked,r=t.halfChecked,i=t.disableCheckbox,a=e.context.rcTree.prefixCls,o=e.isDisabled(),u=e.isCheckable();if(!u)return null;var A="boolean"!==typeof u?u:null;return s.a.createElement("span",{className:Q()(a+"-checkbox",n&&a+"-checkbox-checked",!n&&r&&a+"-checkbox-indeterminate",(o||i)&&a+"-checkbox-disabled"),onClick:e.onCheck},A)},this.renderIcon=function(){var t=e.props.loading,n=e.context.rcTree.prefixCls;return s.a.createElement("span",{className:Q()(n+"-iconEle",n+"-icon__"+(e.getNodeState()||"docu"),t&&n+"-icon_loading")})},this.renderSelector=function(){var t=e.state.dragNodeHighlight,n=e.props,r=n.title,i=n.selected,a=n.icon,o=n.loading,u=e.context.rcTree,A=u.prefixCls,c=u.showIcon,l=u.icon,h=u.draggable,g=u.loadData,d=e.isDisabled(),p=A+"-node-content-wrapper",v=void 0;if(c){var y=a||l;v=y?s.a.createElement("span",{className:Q()(A+"-iconEle",A+"-icon__customize")},"function"===typeof y?s.a.createElement(y,f()({},e.props)):y):e.renderIcon()}else g&&o&&(v=e.renderIcon());var m=s.a.createElement("span",{className:A+"-title"},r);return s.a.createElement("span",{ref:e.setSelectHandle,title:"string"===typeof r?r:"",className:Q()(""+p,p+"-"+(e.getNodeState()||"normal"),!d&&(i||t)&&A+"-node-selected",!d&&h&&"draggable"),draggable:!d&&h||void 0,"aria-grabbed":!d&&h||void 0,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onContextMenu:e.onContextMenu,onClick:e.onSelectorClick,onDoubleClick:e.onSelectorDoubleClick,onDragStart:h?e.onDragStart:void 0},v,m)},this.renderChildren=function(){var t=e.props,n=t.expanded,r=t.pos,i=e.context.rcTree,a=i.prefixCls,o=i.motion,u=i.renderTreeNode,A=e.getNodeChildren();return 0===A.length?null:s.a.createElement(Z,f()({visible:n},o),(function(e){var t=e.style,i=e.className;return s.a.createElement("ul",{className:Q()(i,a+"-child-tree",n&&a+"-child-tree-open"),style:t,"data-expanded":n,role:"group"},le(A,(function(e,t){return u(e,t,r)})))}))}};$.isTreeNode=1,Object(O.a)($);var te=$,ne=!1;function re(){ne||(ne=!0,_()(!1,"Tree only accept TreeNode as children."))}function ie(e,t){var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function ae(e,t){var n=e.slice();return-1===n.indexOf(t)&&n.push(t),n}function oe(e,t){return e+"-"+t}function se(e){return e&&e.type&&e.type.isTreeNode}function ue(e){return S(e).filter(se)}function Ae(e){var t=e.props||{},n=t.disabled,r=t.disableCheckbox;return!(!n&&!r)}function ce(e,t){!function n(r,i,a){var s=r?r.props.children:e,u=r?oe(a.pos,i):0,A=ue(s);if(r){var c={node:r,index:i,pos:u,key:r.key||u,parentPos:a.node?a.pos:null};t(c)}o.Children.forEach(A,(function(e,t){n(e,t,{node:r,pos:u})}))}(null)}function le(e,t){var n=S(e).map(t);return 1===n.length?n[0]:n}function fe(e,t){var n=t.props,r=n.eventKey,i=n.pos,a=[];return ce(e,(function(e){var t=e.key;a.push(t)})),a.push(r||i),a}function he(e,t){var n=e.clientY,r=t.selectHandle.getBoundingClientRect(),i=r.top,a=r.bottom,o=r.height,s=Math.max(.25*o,2);return n<=i+s?-1:n>=a-s?1:0}function ge(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function de(e){return e?e.map((function(e){return String(e)})):e}var pe=function(e){return e};function ve(e){if(!e)return null;var t=void 0;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==typeof e)return _()(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t.checkedKeys=de(t.checkedKeys),t.halfCheckedKeys=de(t.halfCheckedKeys),t}function ye(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i={},a={};function o(e){if(i[e]!==t){var r=n[e];if(r){var s=r.children,u=r.parent;if(!Ae(r.node)){var A=!0,c=!1;(s||[]).filter((function(e){return!Ae(e.node)})).forEach((function(e){var t=e.key,n=i[t],r=a[t];(n||r)&&(c=!0),n||(A=!1)})),i[e]=!!t&&A,a[e]=c,u&&o(u.key)}}}}function s(e){if(i[e]!==t){var r=n[e];if(r){var a=r.children;Ae(r.node)||(i[e]=t,(a||[]).forEach((function(e){s(e.key)})))}}}function u(e){var r=n[e];if(r){var a=r.children,u=r.parent,A=r.node;i[e]=t,Ae(A)||((a||[]).filter((function(e){return!Ae(e.node)})).forEach((function(e){s(e.key)})),u&&o(u.key))}else _()(!1,"'"+e+"' does not exist in the tree.")}(r.checkedKeys||[]).forEach((function(e){i[e]=!0})),(r.halfCheckedKeys||[]).forEach((function(e){a[e]=!0})),(e||[]).forEach((function(e){u(e)}));var A=[],c=[];return Object.keys(i).forEach((function(e){i[e]&&A.push(e)})),Object.keys(a).forEach((function(e){!i[e]&&a[e]&&c.push(e)})),{checkedKeys:A,halfCheckedKeys:c}}function me(e,t){var n={};return(e||[]).forEach((function(e){!function e(r){if(!n[r]){var i=t[r];if(i){n[r]=!0;var a=i.parent;Ae(i.node)||a&&e(a.key)}}}(e)})),Object.keys(n)}function Ie(e){return Object.keys(e).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)||(t[n]=e[n]),t}),{})}var be=function(e){function t(e){p()(this,t);var n=I()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onNodeDragStart=function(e,t){var r=n.state.expandedKeys,i=n.props.onDragStart,a=t.props,o=a.eventKey,s=a.children;n.dragNode=t,n.setState({dragNodesKeys:fe(s,t),expandedKeys:ie(r,o)}),i&&i({event:e,node:t})},n.onNodeDragEnter=function(e,t){var r=n.state.expandedKeys,i=n.props.onDragEnter,a=t.props,o=a.pos,s=a.eventKey;if(n.dragNode){var u=he(e,t);n.dragNode.props.eventKey!==s||0!==u?setTimeout((function(){n.setState({dragOverNodeKey:s,dropPosition:u}),n.delayedDragEnterLogic||(n.delayedDragEnterLogic={}),Object.keys(n.delayedDragEnterLogic).forEach((function(e){clearTimeout(n.delayedDragEnterLogic[e])})),n.delayedDragEnterLogic[o]=setTimeout((function(){var a=ae(r,s);"expandedKeys"in n.props||n.setState({expandedKeys:a}),i&&i({event:e,node:t,expandedKeys:a})}),400)}),0):n.setState({dragOverNodeKey:"",dropPosition:null})}},n.onNodeDragOver=function(e,t){var r=n.props.onDragOver,i=t.props.eventKey;if(n.dragNode&&i===n.state.dragOverNodeKey){var a=he(e,t);if(a===n.state.dropPosition)return;n.setState({dropPosition:a})}r&&r({event:e,node:t})},n.onNodeDragLeave=function(e,t){var r=n.props.onDragLeave;n.setState({dragOverNodeKey:""}),r&&r({event:e,node:t})},n.onNodeDragEnd=function(e,t){var r=n.props.onDragEnd;n.setState({dragOverNodeKey:""}),r&&r({event:e,node:t}),n.dragNode=null},n.onNodeDrop=function(e,t){var r=n.state,i=r.dragNodesKeys,a=void 0===i?[]:i,o=r.dropPosition,s=n.props.onDrop,u=t.props,A=u.eventKey,c=u.pos;if(n.setState({dragOverNodeKey:""}),-1===a.indexOf(A)){var l=function(e){return e.split("-")}(c),f={event:e,node:t,dragNode:n.dragNode,dragNodesKeys:a.slice(),dropPosition:o+Number(l[l.length-1])};0!==o&&(f.dropToGap=!0),s&&s(f),n.dragNode=null}else _()(!1,"Can not drop to dragNode(include it's children node)")},n.onNodeClick=function(e,t){var r=n.props.onClick;r&&r(e,t)},n.onNodeDoubleClick=function(e,t){var r=n.props.onDoubleClick;r&&r(e,t)},n.onNodeSelect=function(e,t){var r=n.state.selectedKeys,i=n.state.keyEntities,a=n.props,o=a.onSelect,s=a.multiple,u=t.props,A=u.selected,c=u.eventKey,l=!A,f=(r=l?s?ae(r,c):[c]:ie(r,c)).map((function(e){var t=i[e];return t?t.node:null})).filter((function(e){return e}));(n.setUncontrolledState({selectedKeys:r}),o)&&o(r,{event:"select",selected:l,node:t,selectedNodes:f,nativeEvent:e.nativeEvent})},n.onNodeCheck=function(e,t,r){var i=n.state,a=i.keyEntities,o=i.checkedKeys,s=i.halfCheckedKeys,u=n.props,A=u.checkStrictly,c=u.onCheck,l=t.props.eventKey,f=void 0,h={event:"check",node:t,checked:r,nativeEvent:e.nativeEvent};if(A){var g=r?ae(o,l):ie(o,l);f={checked:g,halfChecked:ie(s,l)},h.checkedNodes=g.map((function(e){return a[e]})).filter((function(e){return e})).map((function(e){return e.node})),n.setUncontrolledState({checkedKeys:g})}else{var d=ye([l],r,a,{checkedKeys:o,halfCheckedKeys:s}),p=d.checkedKeys,v=d.halfCheckedKeys;f=p,h.checkedNodes=[],h.checkedNodesPositions=[],h.halfCheckedKeys=v,p.forEach((function(e){var t=a[e];if(t){var n=t.node,r=t.pos;h.checkedNodes.push(n),h.checkedNodesPositions.push({node:n,pos:r})}})),n.setUncontrolledState({checkedKeys:p,halfCheckedKeys:v})}c&&c(f,h)},n.onNodeLoad=function(e){return new Promise((function(t){n.setState((function(r){var i=r.loadedKeys,a=void 0===i?[]:i,o=r.loadingKeys,s=void 0===o?[]:o,u=n.props,A=u.loadData,c=u.onLoad,l=e.props.eventKey;return A&&-1===a.indexOf(l)&&-1===s.indexOf(l)?(A(e).then((function(){var r=ae(n.state.loadedKeys,l),i=ie(n.state.loadingKeys,l);c&&c(r,{event:"load",node:e});n.setUncontrolledState({loadedKeys:r}),n.setState({loadingKeys:i}),t()})),{loadingKeys:ae(s,l)}):{}}))}))},n.onNodeExpand=function(e,t){var r=n.state.expandedKeys,i=n.props,a=i.onExpand,o=i.loadData,s=t.props,u=s.eventKey,A=s.expanded,c=r.indexOf(u),l=!A;if(_()(A&&-1!==c||!A&&-1===c,"Expand state not sync with index check"),r=l?ae(r,u):ie(r,u),n.setUncontrolledState({expandedKeys:r}),a&&a(r,{node:t,expanded:l,nativeEvent:e.nativeEvent}),l&&o){var f=n.onNodeLoad(t);return f?f.then((function(){n.setUncontrolledState({expandedKeys:r})})):null}return null},n.onNodeMouseEnter=function(e,t){var r=n.props.onMouseEnter;r&&r({event:e,node:t})},n.onNodeMouseLeave=function(e,t){var r=n.props.onMouseLeave;r&&r({event:e,node:t})},n.onNodeContextMenu=function(e,t){var r=n.props.onRightClick;r&&(e.preventDefault(),r({event:e,node:t}))},n.setUncontrolledState=function(e){var t=!1,r={};Object.keys(e).forEach((function(i){i in n.props||(t=!0,r[i]=e[i])})),t&&n.setState(r)},n.registerTreeNode=function(e,t){t?n.domTreeNodes[e]=t:delete n.domTreeNodes[e]},n.isKeyChecked=function(e){var t=n.state.checkedKeys;return-1!==(void 0===t?[]:t).indexOf(e)},n.renderTreeNode=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=n.state,a=i.keyEntities,o=i.expandedKeys,u=void 0===o?[]:o,A=i.selectedKeys,c=void 0===A?[]:A,l=i.halfCheckedKeys,f=void 0===l?[]:l,h=i.loadedKeys,g=void 0===h?[]:h,d=i.loadingKeys,p=void 0===d?[]:d,v=i.dragOverNodeKey,y=i.dropPosition,m=oe(r,t),I=e.key||m;return a[I]?s.a.cloneElement(e,{key:I,eventKey:I,expanded:-1!==u.indexOf(I),selected:-1!==c.indexOf(I),loaded:-1!==g.indexOf(I),loading:-1!==p.indexOf(I),checked:n.isKeyChecked(I),halfChecked:-1!==f.indexOf(I),pos:m,dragOver:v===I&&0===y,dragOverGapTop:v===I&&-1===y,dragOverGapBottom:v===I&&1===y}):(re(),null)},n.state={posEntities:{},keyEntities:{},selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],treeNode:[]},n.domTreeNodes={},n}return E()(t,e),y()(t,[{key:"getChildContext",value:function(){var e=this.props,t=e.prefixCls,n=e.selectable,r=e.showIcon,i=e.icon,a=e.draggable,o=e.checkable,s=e.checkStrictly,u=e.disabled,A=e.loadData,c=e.filterTreeNode,l=e.motion;return{rcTree:{prefixCls:t,selectable:n,showIcon:r,icon:i,switcherIcon:e.switcherIcon,draggable:a,checkable:o,checkStrictly:s,disabled:u,motion:l,loadData:A,filterTreeNode:c,renderTreeNode:this.renderTreeNode,isKeyChecked:this.isKeyChecked,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop,registerTreeNode:this.registerTreeNode}}}},{key:"render",value:function(){var e=this,t=this.state.treeNode,n=this.props,r=n.prefixCls,i=n.className,a=n.focusable,o=n.style,u=n.showLine,A=n.tabIndex,c=void 0===A?0:A,l=Ie(this.props);return a&&(l.tabIndex=c,l.onKeyDown=this.onKeyDown),s.a.createElement("ul",f()({},l,{className:Q()(r,i,g()({},r+"-show-line",u)),style:o,role:"tree",unselectable:"on"}),le(t,(function(t,n){return e.renderTreeNode(t,n)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r={prevProps:e};function i(t){return!n&&t in e||n&&n[t]!==e[t]}var a=null;if(i("treeData")?a=function e(t,n){if(!t)return[];var r=(n||{}).processProps,i=void 0===r?pe:r;return(Array.isArray(t)?t:[t]).map((function(t){var r=t.children,a=M()(t,["children"]),o=e(r,n);return s.a.createElement(te,i(a),o)}))}(e.treeData):i("children")&&(a=S(e.children)),a){r.treeNode=a;var o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,r=t.processEntity,i=t.onProcessFinished,a={},o={},s={posEntities:a,keyEntities:o};return n&&(s=n(s)||s),ce(e,(function(e){var t=e.node,n=e.index,i=e.pos,u=e.key,A=e.parentPos,c={node:t,index:n,key:u,pos:i};a[i]=c,o[u]=c,c.parent=a[A],c.parent&&(c.parent.children=c.parent.children||[],c.parent.children.push(c)),r&&r(c,s)})),i&&i(s),s}(a);r.posEntities=o.posEntities,r.keyEntities=o.keyEntities}var u=r.keyEntities||t.keyEntities;if(i("expandedKeys")||n&&i("autoExpandParent")?r.expandedKeys=e.autoExpandParent||!n&&e.defaultExpandParent?me(e.expandedKeys,u):e.expandedKeys:!n&&e.defaultExpandAll?r.expandedKeys=Object.keys(u):!n&&e.defaultExpandedKeys&&(r.expandedKeys=e.autoExpandParent||e.defaultExpandParent?me(e.defaultExpandedKeys,u):e.defaultExpandedKeys),e.selectable&&(i("selectedKeys")?r.selectedKeys=ge(e.selectedKeys,e):!n&&e.defaultSelectedKeys&&(r.selectedKeys=ge(e.defaultSelectedKeys,e))),e.checkable){var A=void 0;if(i("checkedKeys")?A=ve(e.checkedKeys)||{}:!n&&e.defaultCheckedKeys?A=ve(e.defaultCheckedKeys)||{}:a&&(A=ve(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),A){var c=A,l=c.checkedKeys,f=void 0===l?[]:l,h=c.halfCheckedKeys,g=void 0===h?[]:h;if(!e.checkStrictly){var d=ye(f,!0,u);f=d.checkedKeys,g=d.halfCheckedKeys}r.checkedKeys=f,r.halfCheckedKeys=g}}return i("loadedKeys")&&(r.loadedKeys=e.loadedKeys),r}}]),t}(s.a.Component);be.propTypes={prefixCls:B.a.string,className:B.a.string,style:B.a.object,tabIndex:B.a.oneOfType([B.a.string,B.a.number]),children:B.a.any,treeData:B.a.array,showLine:B.a.bool,showIcon:B.a.bool,icon:B.a.oneOfType([B.a.node,B.a.func]),focusable:B.a.bool,selectable:B.a.bool,disabled:B.a.bool,multiple:B.a.bool,checkable:B.a.oneOfType([B.a.bool,B.a.node]),checkStrictly:B.a.bool,draggable:B.a.bool,defaultExpandParent:B.a.bool,autoExpandParent:B.a.bool,defaultExpandAll:B.a.bool,defaultExpandedKeys:B.a.arrayOf(B.a.string),expandedKeys:B.a.arrayOf(B.a.string),defaultCheckedKeys:B.a.arrayOf(B.a.string),checkedKeys:B.a.oneOfType([B.a.arrayOf(B.a.oneOfType([B.a.string,B.a.number])),B.a.object]),defaultSelectedKeys:B.a.arrayOf(B.a.string),selectedKeys:B.a.arrayOf(B.a.string),onClick:B.a.func,onDoubleClick:B.a.func,onExpand:B.a.func,onCheck:B.a.func,onSelect:B.a.func,onLoad:B.a.func,loadData:B.a.func,loadedKeys:B.a.arrayOf(B.a.string),onMouseEnter:B.a.func,onMouseLeave:B.a.func,onRightClick:B.a.func,onDragStart:B.a.func,onDragEnter:B.a.func,onDragOver:B.a.func,onDragLeave:B.a.func,onDragEnd:B.a.func,onDrop:B.a.func,filterTreeNode:B.a.func,motion:B.a.object,switcherIcon:B.a.oneOfType([B.a.node,B.a.func])},be.childContextTypes=D,be.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[]},Object(O.a)(be);var Ee=be;Ee.TreeNode=te;var Ce=Ee,Be=s.a.forwardRef((function(e,t){var n,r=e.prefixCls,i=e.className,a=e.showIcon,o=e.blockNode,u=e.children,A=e.checkable;return s.a.createElement(Ce,Object.assign({itemHeight:32,ref:t},e,{className:Q()(i,(n={},Object(c.a)(n,"".concat(r,"-icon-hide"),!a),Object(c.a)(n,"".concat(r,"-block-node"),o),n)),checkable:A?s.a.createElement("span",{className:"".concat(r,"-checkbox-inner")}):A}),u)}));Be.defaultProps={virtual:!1,checkable:!1,showIcon:!1,blockNode:!0,prefixCls:"rc-tree"};var we=Be,Qe=n(728),ke=n(11),_e=n(13),xe=n(8),Se=n(14),Oe=n(15),De=n(318),Re=n.n(De),je=n(1065),Me=n(123),Ne=n(85);function Fe(e,t){for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}function Te(e){return(Te="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Le(e,t){"function"===typeof e?e(t):"object"===Te(e)&&e&&"current"in e&&(e.current=t)}function Pe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){Le(t,e)}))}}var Ue=n(1066),Ge=n.n(Ue);function qe(e,t,n,r){var i=F.a.unstable_batchedUpdates?function(e){F.a.unstable_batchedUpdates(n,e)}:n;return Ge()(e,t,i,r)}function He(e){return(He="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Je(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 ze(e,t){return!t||"object"!==He(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ke(e){return(Ke=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function We(e,t){return(We=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ve,Xe=function(e){function t(){return Ye(this,t),ze(this,Ke(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&We(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){this.createContainer()}},{key:"componentDidUpdate",value:function(e){var t=this.props.didUpdate;t&&t(e)}},{key:"componentWillUnmount",value:function(){this.removeContainer()}},{key:"createContainer",value:function(){this._container=this.props.getContainer(),this.forceUpdate()}},{key:"removeContainer",value:function(){this._container&&this._container.parentNode.removeChild(this._container)}},{key:"render",value:function(){return this._container?F.a.createPortal(this.props.children,this._container):null}}])&&Je(n.prototype,r),i&&Je(n,i),t}(s.a.Component);function Ze(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 $e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(n),!0).forEach((function(t){et(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tt(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function nt(e){return(nt="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function it(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}Xe.propTypes={getContainer:B.a.func.isRequired,children:B.a.node.isRequired,didUpdate:B.a.func};var at={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function ot(){if(void 0!==Ve)return Ve;Ve="";var e=document.createElement("p").style;for(var t in at)t+"Transform"in e&&(Ve=t);return Ve}function st(){return ot()?"".concat(ot(),"TransitionProperty"):"transitionProperty"}function ut(){return ot()?"".concat(ot(),"Transform"):"transform"}function At(e,t){var n=st();n&&(e.style[n]=t,"transitionProperty"!==n&&(e.style.transitionProperty=t))}function ct(e,t){var n=ut();n&&(e.style[n]=t,"transform"!==n&&(e.style.transform=t))}var lt,ft=/matrix\((.*)\)/,ht=/matrix3d\((.*)\)/;function gt(e){var t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}function dt(e,t,n){var r=n;if("object"!==nt(t))return"undefined"!==typeof r?("number"===typeof r&&(r="".concat(r,"px")),void(e.style[t]=r)):lt(e,t);for(var i in t)t.hasOwnProperty(i)&&dt(e,i,t[i])}function pt(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!==typeof n){var i=e.document;"number"!==typeof(n=i.documentElement[r])&&(n=i.body[r])}return n}function vt(e){return pt(e)}function yt(e){return pt(e,!0)}function mt(e){var t=function(e){var t,n,r,i=e.ownerDocument,a=i.body,o=i&&i.documentElement;return n=(t=e.getBoundingClientRect()).left,r=t.top,{left:n-=o.clientLeft||a.clientLeft||0,top:r-=o.clientTop||a.clientTop||0}}(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=vt(r),t.top+=yt(r),t}function It(e){return null!==e&&void 0!==e&&e==e.window}function bt(e){return It(e)?e.document:9===e.nodeType?e:e.ownerDocument}var Et=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),Ct=/^(top|right|bottom|left)$/,Bt="left";function wt(e,t){return"left"===e?t.useCssRight?"right":e:t.useCssBottom?"bottom":e}function Qt(e){return"left"===e?"right":"right"===e?"left":"top"===e?"bottom":"bottom"===e?"top":void 0}function kt(e,t,n){"static"===dt(e,"position")&&(e.style.position="relative");var r=-999,i=-999,a=wt("left",n),o=wt("top",n),s=Qt(a),u=Qt(o);"left"!==a&&(r=999),"top"!==o&&(i=999);var A,c="",l=mt(e);("left"in t||"top"in t)&&(c=(A=e).style.transitionProperty||A.style[st()]||"",At(e,"none")),"left"in t&&(e.style[s]="",e.style[a]="".concat(r,"px")),"top"in t&&(e.style[u]="",e.style[o]="".concat(i,"px")),gt(e);var f=mt(e),h={};for(var g in t)if(t.hasOwnProperty(g)){var d=wt(g,n),p="left"===g?r:i,v=l[g]-f[g];h[d]=d===g?p+v:p-v}dt(e,h),gt(e),("left"in t||"top"in t)&&At(e,c);var y={};for(var m in t)if(t.hasOwnProperty(m)){var I=wt(m,n),b=t[m]-l[m];y[I]=m===I?h[I]+b:h[I]-b}dt(e,y)}function _t(e,t){var n=mt(e),r=function(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("transform")||t.getPropertyValue(ut());if(n&&"none"!==n){var r=n.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(r[12]||r[4],0),y:parseFloat(r[13]||r[5],0)}}return{x:0,y:0}}(e),i={x:r.x,y:r.y};"left"in t&&(i.x=r.x+t.left-n.left),"top"in t&&(i.y=r.y+t.top-n.top),function(e,t){var n=window.getComputedStyle(e,null),r=n.getPropertyValue("transform")||n.getPropertyValue(ut());if(r&&"none"!==r){var i,a=r.match(ft);if(a)(i=(a=a[1]).split(",").map((function(e){return parseFloat(e,10)})))[4]=t.x,i[5]=t.y,ct(e,"matrix(".concat(i.join(","),")"));else(i=r.match(ht)[1].split(",").map((function(e){return parseFloat(e,10)})))[12]=t.x,i[13]=t.y,ct(e,"matrix3d(".concat(i.join(","),")"))}else ct(e,"translateX(".concat(t.x,"px) translateY(").concat(t.y,"px) translateZ(0)"))}(e,i)}function xt(e,t){for(var n=0;n<e.length;n++)t(e[n])}function St(e){return"border-box"===lt(e,"boxSizing")}"undefined"!==typeof window&&(lt=window.getComputedStyle?function(e,t,n){var r=n,i="",a=bt(e);return(r=r||a.defaultView.getComputedStyle(e,null))&&(i=r.getPropertyValue(t)||r[t]),i}:function(e,t){var n=e.currentStyle&&e.currentStyle[t];if(Et.test(n)&&!Ct.test(t)){var r=e.style,i=r[Bt],a=e.runtimeStyle[Bt];e.runtimeStyle[Bt]=e.currentStyle[Bt],r[Bt]="fontSize"===t?"1em":n||0,n=r.pixelLeft+"px",r[Bt]=i,e.runtimeStyle[Bt]=a}return""===n?"auto":n});var Ot=["margin","border","padding"];function Dt(e,t,n){var r,i={},a=e.style;for(r in t)t.hasOwnProperty(r)&&(i[r]=a[r],a[r]=t[r]);for(r in n.call(e),t)t.hasOwnProperty(r)&&(a[r]=i[r])}function Rt(e,t,n){var r,i,a,o=0;for(i=0;i<t.length;i++)if(r=t[i])for(a=0;a<n.length;a++){var s=void 0;s="border"===r?"".concat(r).concat(n[a],"Width"):r+n[a],o+=parseFloat(lt(e,s))||0}return o}var jt={getParent:function(e){var t=e;do{t=11===t.nodeType&&t.host?t.host:t.parentNode}while(t&&1!==t.nodeType&&9!==t.nodeType);return t}};function Mt(e,t,n){var r=n;if(It(e))return"width"===t?jt.viewportWidth(e):jt.viewportHeight(e);if(9===e.nodeType)return"width"===t?jt.docWidth(e):jt.docHeight(e);var i="width"===t?["Left","Right"]:["Top","Bottom"],a="width"===t?e.getBoundingClientRect().width:e.getBoundingClientRect().height,o=(lt(e),St(e)),s=0;(null===a||void 0===a||a<=0)&&(a=void 0,(null===(s=lt(e,t))||void 0===s||Number(s)<0)&&(s=e.style[t]||0),s=parseFloat(s)||0),void 0===r&&(r=o?1:-1);var u=void 0!==a||o,A=a||s;return-1===r?u?A-Rt(e,["border","padding"],i):s:u?1===r?A:A+(2===r?-Rt(e,["border"],i):Rt(e,["margin"],i)):s+Rt(e,Ot.slice(r),i)}xt(["Width","Height"],(function(e){jt["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],jt["viewport".concat(e)](n))},jt["viewport".concat(e)]=function(t){var n="client".concat(e),r=t.document,i=r.body,a=r.documentElement[n];return"CSS1Compat"===r.compatMode&&a||i&&i[n]||a}}));var Nt={position:"absolute",visibility:"hidden",display:"block"};function Ft(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=t[0];return 0!==i.offsetWidth?r=Mt.apply(void 0,t):Dt(i,Nt,(function(){r=Mt.apply(void 0,t)})),r}function Tt(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}xt(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);jt["outer".concat(t)]=function(t,n){return t&&Ft(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];jt[e]=function(t,r){var i=r;if(void 0===i)return t&&Ft(t,e,-1);if(t){lt(t);return St(t)&&(i+=Rt(t,["padding","border"],n)),dt(t,e,i)}}}));var Lt={getWindow:function(e){if(e&&e.document&&e.setTimeout)return e;var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},getDocument:bt,offset:function(e,t,n){if("undefined"===typeof t)return mt(e);!function(e,t,n){if(n.ignoreShake){var r=mt(e),i=r.left.toFixed(0),a=r.top.toFixed(0),o=t.left.toFixed(0),s=t.top.toFixed(0);if(i===o&&a===s)return}n.useCssRight||n.useCssBottom?kt(e,t,n):n.useCssTransform&&ut()in document.body.style?_t(e,t):kt(e,t,n)}(e,t,n||{})},isWindow:It,each:xt,css:dt,clone:function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);if(e.overflow)for(t in e)e.hasOwnProperty(t)&&(n.overflow[t]=e.overflow[t]);return n},mix:Tt,getWindowScrollLeft:function(e){return vt(e)},getWindowScrollTop:function(e){return yt(e)},merge:function(){for(var e={},t=0;t<arguments.length;t++)Lt.mix(e,t<0||arguments.length<=t?void 0:arguments[t]);return e},viewportWidth:0,viewportHeight:0};Tt(Lt,jt);var Pt=Lt.getParent;function Ut(e){if(Lt.isWindow(e)||9===e.nodeType)return null;var t,n=Lt.getDocument(e).body,r=Lt.css(e,"position");if(!("fixed"===r||"absolute"===r))return"html"===e.nodeName.toLowerCase()?null:Pt(e);for(t=Pt(e);t&&t!==n&&9!==t.nodeType;t=Pt(t))if("static"!==(r=Lt.css(t,"position")))return t;return null}var Gt=Lt.getParent;function qt(e,t){for(var n={left:0,right:1/0,top:0,bottom:1/0},r=Ut(e),i=Lt.getDocument(e),a=i.defaultView||i.parentWindow,o=i.body,s=i.documentElement;r;){if(-1!==navigator.userAgent.indexOf("MSIE")&&0===r.clientWidth||r===o||r===s||"visible"===Lt.css(r,"overflow")){if(r===o||r===s)break}else{var u=Lt.offset(r);u.left+=r.clientLeft,u.top+=r.clientTop,n.top=Math.max(n.top,u.top),n.right=Math.min(n.right,u.left+r.clientWidth),n.bottom=Math.min(n.bottom,u.top+r.clientHeight),n.left=Math.max(n.left,u.left)}r=Ut(r)}var A=null;Lt.isWindow(e)||9===e.nodeType||(A=e.style.position,"absolute"===Lt.css(e,"position")&&(e.style.position="fixed"));var c=Lt.getWindowScrollLeft(a),l=Lt.getWindowScrollTop(a),f=Lt.viewportWidth(a),h=Lt.viewportHeight(a),g=s.scrollWidth,d=s.scrollHeight,p=window.getComputedStyle(o);if("hidden"===p.overflowX&&(g=a.innerWidth),"hidden"===p.overflowY&&(d=a.innerHeight),e.style&&(e.style.position=A),t||function(e){if(Lt.isWindow(e)||9===e.nodeType)return!1;var t=Lt.getDocument(e).body,n=null;for(n=Gt(e);n&&n!==t;n=Gt(n)){if("fixed"===Lt.css(n,"position"))return!0}return!1}(e))n.left=Math.max(n.left,c),n.top=Math.max(n.top,l),n.right=Math.min(n.right,c+f),n.bottom=Math.min(n.bottom,l+h);else{var v=Math.max(g,c+f);n.right=Math.min(n.right,v);var y=Math.max(d,l+h);n.bottom=Math.min(n.bottom,y)}return n.top>=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function Ht(e){var t,n,r;if(Lt.isWindow(e)||9===e.nodeType){var i=Lt.getWindow(e);t={left:Lt.getWindowScrollLeft(i),top:Lt.getWindowScrollTop(i)},n=Lt.viewportWidth(i),r=Lt.viewportHeight(i)}else t=Lt.offset(e),n=Lt.outerWidth(e),r=Lt.outerHeight(e);return t.width=n,t.height=r,t}function Yt(e,t){var n=t.charAt(0),r=t.charAt(1),i=e.width,a=e.height,o=e.left,s=e.top;return"c"===n?s+=a/2:"b"===n&&(s+=a),"c"===r?o+=i/2:"r"===r&&(o+=i),{left:o,top:s}}function Jt(e,t,n,r,i){var a=Yt(t,n[1]),o=Yt(e,n[0]),s=[o.left-a.left,o.top-a.top];return{left:Math.round(e.left-s[0]+r[0]-i[0]),top:Math.round(e.top-s[1]+r[1]-i[1])}}function zt(e,t,n){return e.left<n.left||e.left+t.width>n.right}function Kt(e,t,n){return e.top<n.top||e.top+t.height>n.bottom}function Wt(e,t,n){var r=[];return Lt.each(e,(function(e){r.push(e.replace(t,(function(e){return n[e]})))})),r}function Vt(e,t){return e[t]=-e[t],e}function Xt(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function Zt(e,t){e[0]=Xt(e[0],t.width),e[1]=Xt(e[1],t.height)}function $t(e,t,n,r){var i=n.points,a=n.offset||[0,0],o=n.targetOffset||[0,0],s=n.overflow,u=n.source||e;a=[].concat(a),o=[].concat(o);var A={},c=0,l=qt(u,!(!(s=s||{})||!s.alwaysByViewport)),f=Ht(u);Zt(a,f),Zt(o,t);var h=Jt(f,t,i,a,o),g=Lt.merge(f,h);if(l&&(s.adjustX||s.adjustY)&&r){if(s.adjustX&&zt(h,f,l)){var d=Wt(i,/[lr]/gi,{l:"r",r:"l"}),p=Vt(a,0),v=Vt(o,0);(function(e,t,n){return e.left>n.right||e.left+t.width<n.left})(Jt(f,t,d,p,v),f,l)||(c=1,i=d,a=p,o=v)}if(s.adjustY&&Kt(h,f,l)){var y=Wt(i,/[tb]/gi,{t:"b",b:"t"}),m=Vt(a,1),I=Vt(o,1);(function(e,t,n){return e.top>n.bottom||e.top+t.height<n.top})(Jt(f,t,y,m,I),f,l)||(c=1,i=y,a=m,o=I)}c&&(h=Jt(f,t,i,a,o),Lt.mix(g,h));var b=zt(h,f,l),E=Kt(h,f,l);(b||E)&&(i=n.points,a=n.offset||[0,0],o=n.targetOffset||[0,0]),A.adjustX=s.adjustX&&b,A.adjustY=s.adjustY&&E,(A.adjustX||A.adjustY)&&(g=function(e,t,n,r){var i=Lt.clone(e),a={width:t.width,height:t.height};return r.adjustX&&i.left<n.left&&(i.left=n.left),r.resizeWidth&&i.left>=n.left&&i.left+a.width>n.right&&(a.width-=i.left+a.width-n.right),r.adjustX&&i.left+a.width>n.right&&(i.left=Math.max(n.right-a.width,n.left)),r.adjustY&&i.top<n.top&&(i.top=n.top),r.resizeHeight&&i.top>=n.top&&i.top+a.height>n.bottom&&(a.height-=i.top+a.height-n.bottom),r.adjustY&&i.top+a.height>n.bottom&&(i.top=Math.max(n.bottom-a.height,n.top)),Lt.mix(i,a)}(h,f,l,A))}return g.width!==f.width&&Lt.css(u,"width",Lt.width(u)+g.width-f.width),g.height!==f.height&&Lt.css(u,"height",Lt.height(u)+g.height-f.height),Lt.offset(u,{left:g.left,top:g.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:i,offset:a,targetOffset:o,overflow:A}}function en(e,t,n){var r=n.target||t;return $t(e,Ht(r),n,!function(e,t){var n=qt(e,t),r=Ht(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}(r,n.overflow&&n.overflow.alwaysByViewport))}function tn(e,t,n){var r,i,a=Lt.getDocument(e),o=a.defaultView||a.parentWindow,s=Lt.getWindowScrollLeft(o),u=Lt.getWindowScrollTop(o),A=Lt.viewportWidth(o),c=Lt.viewportHeight(o);r="pageX"in t?t.pageX:s+t.clientX,i="pageY"in t?t.pageY:u+t.clientY;var l=r>=0&&r<=s+A&&i>=0&&i<=u+c;return $t(e,{left:r,top:i,width:0,height:0},function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?it(n,!0).forEach((function(t){rt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):it(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n,{points:[n.points[0],"cc"]}),l)}en.__getOffsetParent=Ut,en.__getVisibleRectForElement=qt;var nn=n(1067);function rn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return an(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return an(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function an(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function on(e,t){var n=null,r=null;var i=new nn.a((function(e){var i=rn(e,1)[0].target.getBoundingClientRect(),a=i.width,o=i.height,s=Math.floor(a),u=Math.floor(o);n===s&&r===u||t({width:s,height:u}),n=s,r=u}));return e&&i.observe(e),function(){i.disconnect()}}function sn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return un(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return un(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function un(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function An(e){return(An="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cn(e){return"function"!==typeof e?null:e()}function ln(e){return"object"===An(e)&&e?e:null}var fn=s.a.forwardRef((function(e,t){var n=e.children,r=e.disabled,i=e.target,a=e.align,o=e.onAlign,u=e.monitorWindowResize,A=e.monitorBufferTime,c=void 0===A?0:A,l=s.a.useRef({}),f=s.a.useRef(),h=s.a.Children.only(n),g=s.a.useRef({});g.current.disabled=r,g.current.target=i,g.current.onAlign=o;var d=sn(function(e,t){var n=s.a.useRef(!1),r=s.a.useRef(null);function i(){window.clearTimeout(r.current)}return[function a(o){if(n.current&&!0!==o)i(),r.current=window.setTimeout((function(){n.current=!1,a()}),t);else{if(!1===e())return;n.current=!0,i(),r.current=window.setTimeout((function(){n.current=!1}),t)}},function(){n.current=!1,i()}]}((function(){var e=g.current,t=e.disabled,n=e.target;if(!t&&n){var r,i=f.current,s=cn(n),u=ln(n);l.current.element=s,l.current.point=u;var A=document.activeElement;return s?r=en(i,s,a):u&&(r=tn(i,u,a)),function(e,t){e!==document.activeElement&&Fe(t,e)&&e.focus()}(A,i),o&&o(i,r),!0}return!1}),c),2),p=d[0],v=d[1],y=s.a.useRef({cancel:function(){}}),m=s.a.useRef({cancel:function(){}});s.a.useEffect((function(){var e,t,n=cn(i),r=ln(i);f.current!==m.current.element&&(m.current.cancel(),m.current.element=f.current,m.current.cancel=on(f.current,p)),l.current.element===n&&((e=l.current.point)===(t=r)||e&&t&&("pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t&&e.clientX===t.clientX&&e.clientY===t.clientY))||(p(),y.current.element!==n&&(y.current.cancel(),y.current.element=n,y.current.cancel=on(n,p)))})),s.a.useEffect((function(){r?v():p()}),[r]);var I=s.a.useRef(null);return s.a.useEffect((function(){u?I.current||(I.current=qe(window,"resize",p)):I.current&&(I.current.remove(),I.current=null)}),[u]),s.a.useEffect((function(){return function(){y.current.cancel(),m.current.cancel(),I.current&&I.current.remove(),v()}}),[]),s.a.useImperativeHandle(t,(function(){return{forceAlign:function(){return p(!0)}}})),s.a.isValidElement(h)&&(h=s.a.cloneElement(h,{ref:Pe(h.ref,f)})),h}));fn.displayName="Align";var hn=fn,gn=!("undefined"===typeof window||!window.document||!window.document.createElement);function dn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}var pn=function(e,t){var n={animationend:dn("Animation","AnimationEnd"),transitionend:dn("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}(gn,"undefined"!==typeof window?window:{}),vn={};gn&&(vn=document.createElement("div").style);var yn={};function mn(e){if(yn[e])return yn[e];var t=pn[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i<r;i+=1){var a=n[i];if(Object.prototype.hasOwnProperty.call(t,a)&&a in vn)return yn[e]=t[a],yn[e]}return""}var In=mn("animationend"),bn=mn("transitionend"),En=!(!In||!bn);function Cn(e,t){return e?"object"===typeof e?e[t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}))]:e+"-"+t:null}var Bn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wn=function(){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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function Qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var kn=function(e){var t=e,n=!!s.a.forwardRef;function r(e){return!(!e.motionName||!t)}"object"===typeof e&&(t=e.transitionSupport,n="forwardRef"in e?e.forwardRef:n);var i=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.onDomUpdate=function(){var t=e.state,n=t.status,i=t.newStatus,a=e.props,o=a.onAppearStart,s=a.onEnterStart,u=a.onLeaveStart,A=a.onAppearActive,c=a.onEnterActive,l=a.onLeaveActive,f=a.motionAppear,h=a.motionEnter,g=a.motionLeave;if(r(e.props)){var d=e.getElement();e.$cacheEle!==d&&(e.removeEventListener(e.$cacheEle),e.addEventListener(d),e.$cacheEle=d),i&&"appear"===n&&f?e.updateStatus(o,null,null,(function(){e.updateActiveStatus(A,"appear")})):i&&"enter"===n&&h?e.updateStatus(s,null,null,(function(){e.updateActiveStatus(c,"enter")})):i&&"leave"===n&&g&&e.updateStatus(u,null,null,(function(){e.updateActiveStatus(l,"leave")}))}},e.onMotionEnd=function(t){var n=e.state,r=n.status,i=n.statusActive,a=e.props,o=a.onAppearEnd,s=a.onEnterEnd,u=a.onLeaveEnd;"appear"===r&&i?e.updateStatus(o,{status:"none"},t):"enter"===r&&i?e.updateStatus(s,{status:"none"},t):"leave"===r&&i&&e.updateStatus(u,{status:"none"},t)},e.setNodeRef=function(t){var n=e.props.internalRef;e.node=t,"function"===typeof n?n(t):n&&"current"in n&&(n.current=t)},e.getElement=function(){try{return T(e.node||e)}catch(t){return e.$cacheEle}},e.addEventListener=function(t){t&&(t.addEventListener(bn,e.onMotionEnd),t.addEventListener(In,e.onMotionEnd))},e.removeEventListener=function(t){t&&(t.removeEventListener(bn,e.onMotionEnd),t.removeEventListener(In,e.onMotionEnd))},e.updateStatus=function(t,n,r,i){var a=t?t(e.getElement(),r):null;if(!1!==a&&!e._destroyed){var o=void 0;i&&(o=function(){e.nextFrame(i)}),e.setState(Bn({statusStyle:"object"===typeof a?a:null,newStatus:!1},n),o)}},e.updateActiveStatus=function(t,n){e.nextFrame((function(){if(e.state.status===n){var r=e.props.motionDeadline;e.updateStatus(t,{statusActive:!0}),r>0&&setTimeout((function(){e.onMotionEnd({deadline:!0})}),r)}}))},e.nextFrame=function(t){e.cancelNextFrame(),e.raf=P()(t)},e.cancelNextFrame=function(){e.raf&&(P.a.cancel(e.raf),e.raf=null)},e.state={status:"none",statusActive:!1,newStatus:!1,statusStyle:null},e.$cacheEle=null,e.node=null,e.raf=null,e}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),wn(t,[{key:"componentDidMount",value:function(){this.onDomUpdate()}},{key:"componentDidUpdate",value:function(){this.onDomUpdate()}},{key:"componentWillUnmount",value:function(){this._destroyed=!0,this.removeEventListener(this.$cacheEle),this.cancelNextFrame()}},{key:"render",value:function(){var e,t=this.state,n=t.status,i=t.statusActive,a=t.statusStyle,o=this.props,s=o.children,u=o.motionName,A=o.visible,c=o.removeOnLeave,l=o.leavedClassName,f=o.eventProps;return s?"none"!==n&&r(this.props)?s(Bn({},f,{className:Q()((e={},Qn(e,Cn(u,n),"none"!==n),Qn(e,Cn(u,n+"-active"),"none"!==n&&i),Qn(e,u,"string"===typeof u),e)),style:a}),this.setNodeRef):A?s(Bn({},f),this.setNodeRef):c?null:s(Bn({},f,{className:l}),this.setNodeRef):null}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,i=t.status;if(!r(e))return{};var a=e.visible,o=e.motionAppear,s=e.motionEnter,u=e.motionLeave,A=e.motionLeaveImmediately,c={prevProps:e};return("appear"===i&&!o||"enter"===i&&!s||"leave"===i&&!u)&&(c.status="none",c.statusActive=!1,c.newStatus=!1),!n&&a&&o&&(c.status="appear",c.statusActive=!1,c.newStatus=!0),n&&!n.visible&&a&&s&&(c.status="enter",c.statusActive=!1,c.newStatus=!0),(n&&n.visible&&!a&&u||!n&&A&&!a&&u)&&(c.status="leave",c.statusActive=!1,c.newStatus=!0),c}}]),t}(s.a.Component);return i.defaultProps={visible:!0,motionEnter:!0,motionAppear:!0,motionLeave:!0,removeOnLeave:!0},n?s.a.forwardRef((function(e,t){return s.a.createElement(i,Bn({internalRef:t},e))})):i}(En),_n=s.a.forwardRef((function(e,t){var n=e.prefixCls,r=e.className,i=e.visible,a=e.style,o=e.children,u=e.onMouseEnter,A=e.onMouseLeave,c=e.onMouseDown,l=e.onTouchStart,f=o;return s.a.Children.count(o)>1&&(f=s.a.createElement("div",{className:"".concat(n,"-content")},o)),s.a.createElement("div",{ref:t,className:Q()(r,!i&&"".concat(e.hiddenClassName)),onMouseEnter:u,onMouseLeave:A,onMouseDown:c,onTouchStart:l,style:a},f)}));_n.displayName="PopupInner";var xn=_n;function Sn(e){var t=e.prefixCls,n=e.motion,r=e.animation,i=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:i?{motionName:i}:null)}function On(e){return(On="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dn(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Rn(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 jn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rn(Object(n),!0).forEach((function(t){Mn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fn(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 Tn(e,t){return(Tn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ln(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Un(e);if(t){var i=Un(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Pn(this,n)}}function Pn(e,t){return!t||"object"!==On(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Un(e){return(Un=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gn=kn;function qn(e){return e&&e.motionName}var Hn=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tn(e,t)}(a,e);var t,n,r,i=Ln(a);function a(){var e;return Nn(this,a),(e=i.apply(this,arguments)).state={targetWidth:void 0,targetHeight:void 0,status:null,prevVisible:null,alignClassName:null},e.popupRef=s.a.createRef(),e.alignRef=s.a.createRef(),e.nextFrameState=null,e.nextFrameId=null,e.onAlign=function(t,n){var r=e.state.status,i=e.props,a=i.getClassNameFromAlign,o=i.onAlign,s=a(n);"align"===r?e.setState({alignClassName:s,status:"aligned"},(function(){e.alignRef.current.forceAlign()})):"aligned"===r?(e.setState({alignClassName:s,status:"afterAlign"}),o(t,n)):e.setState({alignClassName:s})},e.onMotionEnd=function(){var t=e.props.visible;e.setState({status:t?"AfterMotion":"stable"})},e.setStateOnNextFrame=function(t){e.cancelFrameState(),e.nextFrameState=jn(jn({},e.nextFrameState),t),e.nextFrameId=P()((function(){var t=jn({},e.nextFrameState);e.nextFrameState=null,e.setState(t)}))},e.getMotion=function(){return jn({},Sn(e.props))},e.getAlignTarget=function(){var t=e.props,n=t.point,r=t.getRootDomNode;return n||r},e.cancelFrameState=function(){P.a.cancel(e.nextFrameId)},e.renderPopupElement=function(){var t=e.state,n=t.status,r=t.targetHeight,i=t.targetWidth,a=t.alignClassName,o=e.props,u=o.prefixCls,A=o.className,c=o.style,l=o.stretch,f=o.visible,h=o.align,g=o.destroyPopupOnHide,d=o.onMouseEnter,p=o.onMouseLeave,v=o.onMouseDown,y=o.onTouchStart,m=o.children,I=Q()(u,A,a),b="".concat(u,"-hidden"),E={};l&&(-1!==l.indexOf("height")?E.height=r:-1!==l.indexOf("minHeight")&&(E.minHeight=r),-1!==l.indexOf("width")?E.width=i:-1!==l.indexOf("minWidth")&&(E.minWidth=i));var C=jn(jn(jn(jn({},E),e.getZIndexStyle()),c),{},{opacity:"stable"!==n&&f?0:void 0}),B=e.getMotion(),w=f;f&&"beforeMotion"!==n&&"motion"!==n&&"stable"!==n&&(B.motionAppear=!1,B.motionEnter=!1,B.motionLeave=!1),"afterAlign"!==n&&"beforeMotion"!==n||(w=!1);var k=!f||"align"!==n&&"aligned"!==n&&"stable"!==n,_=!0;return"stable"===n&&(_=f),g&&!_?null:s.a.createElement(Gn,Object.assign({visible:w},B,{removeOnLeave:!1,onEnterEnd:e.onMotionEnd,onLeaveEnd:e.onMotionEnd}),(function(t,n){var r=t.style,i=t.className;return s.a.createElement(hn,{target:e.getAlignTarget(),key:"popup",ref:e.alignRef,monitorWindowResize:!0,disabled:k,align:h,onAlign:e.onAlign},s.a.createElement(xn,{prefixCls:u,visible:_,hiddenClassName:b,className:Q()(I,i),ref:Pe(n,e.popupRef),onMouseEnter:d,onMouseLeave:p,onMouseDown:v,onTouchStart:y,style:jn(jn({},C),r)},m))}))},e.renderMaskElement=function(){var t=e.props,n=t.mask,r=t.maskMotion,i=t.maskTransitionName,a=t.maskAnimation,o=t.prefixCls,u=t.visible;if(!n)return null;var A={};return r&&r.motionName&&(A=jn({motionAppear:!0},Sn({motion:r,prefixCls:o,transitionName:i,animation:a}))),s.a.createElement(Gn,Object.assign({},A,{visible:u,removeOnLeave:!0}),(function(t){var n=t.className;return s.a.createElement("div",{style:e.getZIndexStyle(),key:"mask",className:Q()("".concat(o,"-mask"),n)})}))},e}return t=a,r=[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.visible,r=Dn(e,["visible"]),i=t.prevVisible,a=t.status,o={prevVisible:n,status:a},s=Sn(r);return null===i&&!1===n?o.status="stable":n!==i&&(n||qn(s)&&["motion","AfterMotion","stable"].includes(a)?o.status=null:o.status="stable",n&&(o.alignClassName=null)),o}}],(n=[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this.state.status,t=this.props,n=t.getRootDomNode,r=t.visible,i=t.stretch;if(this.cancelFrameState(),r&&"stable"!==e)switch(e){case null:this.setStateOnNextFrame({status:i?"measure":"align"});break;case"afterAlign":this.setStateOnNextFrame({status:qn(this.getMotion())?"beforeMotion":"stable"});break;case"AfterMotion":this.setStateOnNextFrame({status:"stable"});break;default:var a=["measure","align",null,"beforeMotion","motion"],o=a.indexOf(e),s=a[o+1];-1!==o&&s&&this.setStateOnNextFrame({status:s})}if("measure"===e){var u=n();u&&this.setStateOnNextFrame({targetHeight:u.offsetHeight,targetWidth:u.offsetWidth})}}},{key:"componentWillUnmount",value:function(){this.cancelFrameState()}},{key:"getZIndexStyle",value:function(){return{zIndex:this.props.zIndex}}},{key:"render",value:function(){return s.a.createElement("div",null,this.renderMaskElement(),this.renderPopupElement())}}])&&Fn(t.prototype,n),r&&Fn(t,r),a}(o.Component),Yn=s.a.createContext(null);function Jn(e){return(Jn="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zn(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 Kn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wn(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 Vn(e,t){return(Vn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xn(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=er(e);if(t){var i=er(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Zn(this,n)}}function Zn(e,t){return!t||"object"!==Jn(t)&&"function"!==typeof t?$n(e):t}function $n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function er(e){return(er=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tr(){}function nr(){return""}function rr(){return window.document}var ir=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var ar=function(e){var t=function(t){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Vn(e,t)}(o,t);var n,r,i,a=Xn(o);function o(e){var t,n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=a.call(this,e)).popupRef=s.a.createRef(),t.triggerRef=s.a.createRef(),t.onMouseEnter=function(e){var n=t.props.mouseEnterDelay;t.fireEvents("onMouseEnter",e),t.delaySetPopupVisible(!0,n,n?null:e)},t.onMouseMove=function(e){t.fireEvents("onMouseMove",e),t.setPoint(e)},t.onMouseLeave=function(e){t.fireEvents("onMouseLeave",e),t.delaySetPopupVisible(!1,t.props.mouseLeaveDelay)},t.onPopupMouseEnter=function(){t.clearDelayTimer()},t.onPopupMouseLeave=function(e){e.relatedTarget&&!e.relatedTarget.setTimeout&&t.popupRef.current&&t.popupRef.current.popupRef.current&&Fe(t.popupRef.current.popupRef.current,e.relatedTarget)||t.delaySetPopupVisible(!1,t.props.mouseLeaveDelay)},t.onFocus=function(e){t.fireEvents("onFocus",e),t.clearDelayTimer(),t.isFocusToShow()&&(t.focusTime=Date.now(),t.delaySetPopupVisible(!0,t.props.focusDelay))},t.onMouseDown=function(e){t.fireEvents("onMouseDown",e),t.preClickTime=Date.now()},t.onTouchStart=function(e){t.fireEvents("onTouchStart",e),t.preTouchTime=Date.now()},t.onBlur=function(e){t.fireEvents("onBlur",e),t.clearDelayTimer(),t.isBlurToHide()&&t.delaySetPopupVisible(!1,t.props.blurDelay)},t.onContextMenu=function(e){e.preventDefault(),t.fireEvents("onContextMenu",e),t.setPopupVisible(!0,e)},t.onContextMenuClose=function(){t.isContextMenuToShow()&&t.close()},t.onClick=function(e){if(t.fireEvents("onClick",e),t.focusTime){var n;if(t.preClickTime&&t.preTouchTime?n=Math.min(t.preClickTime,t.preTouchTime):t.preClickTime?n=t.preClickTime:t.preTouchTime&&(n=t.preTouchTime),Math.abs(n-t.focusTime)<20)return;t.focusTime=0}t.preClickTime=0,t.preTouchTime=0,t.isClickToShow()&&(t.isClickToHide()||t.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var r=!t.state.popupVisible;(t.isClickToHide()&&!r||r&&t.isClickToShow())&&t.setPopupVisible(!t.state.popupVisible,e)},t.onPopupMouseDown=function(){var e;(t.hasPopupMouseDown=!0,clearTimeout(t.mouseDownTimeout),t.mouseDownTimeout=window.setTimeout((function(){t.hasPopupMouseDown=!1}),0),t.context)&&(e=t.context).onPopupMouseDown.apply(e,arguments)},t.onDocumentClick=function(e){if(!t.props.mask||t.props.maskClosable){var n=e.target,r=t.getRootDomNode(),i=t.getPopupDomNode();Fe(r,n)||Fe(i,n)||t.hasPopupMouseDown||t.close()}},t.getRootDomNode=function(){var e=t.props.getTriggerDOMNode;if(e)return e(t.triggerRef.current);try{var n=T(t.triggerRef.current);if(n)return n}catch(r){}return F.a.findDOMNode($n(t))},t.getPopupClassNameFromAlign=function(e){var n=[],r=t.props,i=r.popupPlacement,a=r.builtinPlacements,o=r.prefixCls,s=r.alignPoint,u=r.getPopupClassNameFromAlign;return i&&a&&n.push(function(e,t,n,r){for(var i=n.points,a=Object.keys(e),o=0;o<a.length;o+=1){var s=a[o];if(tt(e[s].points,i,r))return"".concat(t,"-placement-").concat(s)}return""}(a,o,e,s)),u&&n.push(u(e)),n.join(" ")},t.getComponent=function(){var e=t.props,n=e.prefixCls,r=e.destroyPopupOnHide,i=e.popupClassName,a=e.onPopupAlign,o=e.popupMotion,u=e.popupAnimation,A=e.popupTransitionName,c=e.popupStyle,l=e.mask,f=e.maskAnimation,h=e.maskTransitionName,g=e.maskMotion,d=e.zIndex,p=e.popup,v=e.stretch,y=e.alignPoint,m=t.state,I=m.popupVisible,b=m.point,E=t.getPopupAlign(),C={};return t.isMouseEnterToShow()&&(C.onMouseEnter=t.onPopupMouseEnter),t.isMouseLeaveToHide()&&(C.onMouseLeave=t.onPopupMouseLeave),C.onMouseDown=t.onPopupMouseDown,C.onTouchStart=t.onPopupMouseDown,s.a.createElement(Hn,Object.assign({prefixCls:n,destroyPopupOnHide:r,visible:I,point:y&&b,className:i,align:E,onAlign:a,animation:u,getClassNameFromAlign:t.getPopupClassNameFromAlign},C,{stretch:v,getRootDomNode:t.getRootDomNode,style:c,mask:l,zIndex:d,transitionName:A,maskAnimation:f,maskTransitionName:h,maskMotion:g,ref:t.popupRef,motion:o}),"function"===typeof p?p():p)},t.getContainer=function(){var e=$n(t).props,n=document.createElement("div");return n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%",(e.getPopupContainer?e.getPopupContainer(t.getRootDomNode()):e.getDocument().body).appendChild(n),n},t.setPoint=function(e){t.props.alignPoint&&e&&t.setState({point:{pageX:e.pageX,pageY:e.pageY}})},t.handlePortalUpdate=function(){t.state.prevPopupVisible!==t.state.popupVisible&&t.props.afterPopupVisibleChange(t.state.popupVisible)},n="popupVisible"in e?!!e.popupVisible:!!e.defaultPopupVisible,t.state={prevPopupVisible:n,popupVisible:n},ir.forEach((function(e){t["fire".concat(e)]=function(n){t.fireEvents(e,n)}})),t}return n=o,i=[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.popupVisible,r={};return void 0!==n&&t.popupVisible!==n&&(r.popupVisible=n,r.prevPopupVisible=t.popupVisible),r}}],(r=[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e,t=this.props;if(this.state.popupVisible)return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(e=t.getDocument(),this.clickOutsideHandler=qe(e,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(e=e||t.getDocument(),this.touchOutsideHandler=qe(e,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(e=e||t.getDocument(),this.contextMenuOutsideHandler1=qe(e,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=qe(window,"blur",this.onContextMenuClose)));this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout)}},{key:"getPopupDomNode",value:function(){return this.popupRef.current&&this.popupRef.current.popupRef.current?this.popupRef.current.popupRef.current:null}},{key:"getPopupAlign",value:function(){var e=this.props,t=e.popupPlacement,n=e.popupAlign,r=e.builtinPlacements;return t&&r?function(e,t,n){return $e($e({},e[t]||{}),n)}(r,t,n):n}},{key:"setPopupVisible",value:function(e,t){var n=this.props.alignPoint,r=this.state.popupVisible;this.clearDelayTimer(),r!==e&&("popupVisible"in this.props||this.setState({popupVisible:e,prevPopupVisible:r}),this.props.onPopupVisibleChange(e)),n&&t&&this.setPoint(t)}},{key:"delaySetPopupVisible",value:function(e,t,n){var r=this,i=1e3*t;if(this.clearDelayTimer(),i){var a=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=window.setTimeout((function(){r.setPopupVisible(e,a),r.clearDelayTimer()}),i)}else this.setPopupVisible(e,n)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(e){var t=this.props.children.props,n=this.props;return t[e]&&n[e]?this["fire".concat(e)]:t[e]||n[e]}},{key:"isClickToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isContextMenuToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("contextMenu")||-1!==n.indexOf("contextMenu")}},{key:"isClickToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isMouseEnterToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseEnter")}},{key:"isMouseLeaveToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseLeave")}},{key:"isFocusToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("focus")}},{key:"isBlurToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("blur")}},{key:"forcePopupAlign",value:function(){this.state.popupVisible&&this.popupRef.current&&this.popupRef.current.alignRef.current&&this.popupRef.current.alignRef.current.forceAlign()}},{key:"fireEvents",value:function(e,t){var n=this.props.children.props[e];n&&n(t);var r=this.props[e];r&&r(t)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var t=this.state.popupVisible,n=this.props,r=n.children,i=n.forceRender,a=n.alignPoint,o=n.className,u=s.a.Children.only(r),A={key:"trigger"};this.isContextMenuToShow()?A.onContextMenu=this.onContextMenu:A.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(A.onClick=this.onClick,A.onMouseDown=this.onMouseDown,A.onTouchStart=this.onTouchStart):(A.onClick=this.createTwoChains("onClick"),A.onMouseDown=this.createTwoChains("onMouseDown"),A.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(A.onMouseEnter=this.onMouseEnter,a&&(A.onMouseMove=this.onMouseMove)):A.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?A.onMouseLeave=this.onMouseLeave:A.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(A.onFocus=this.onFocus,A.onBlur=this.onBlur):(A.onFocus=this.createTwoChains("onFocus"),A.onBlur=this.createTwoChains("onBlur"));var c=Q()(u&&u.props&&u.props.className,o);c&&(A.className=c);var l,f=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zn(Object(n),!0).forEach((function(t){Kn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},A);(l=u).type&&l.type.prototype&&!l.type.prototype.render||"function"===typeof l&&l.prototype&&!l.prototype.render||(f.ref=Pe(this.triggerRef,u.ref));var h,g=s.a.cloneElement(u,f);return(t||this.popupRef.current||i)&&(h=s.a.createElement(e,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),s.a.createElement(Yn.Provider,{value:{onPopupMouseDown:this.onPopupMouseDown}},g,h)}}])&&Wn(n.prototype,r),i&&Wn(n,i),o}(s.a.Component);return t.contextType=Yn,t.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:nr,getDocument:rr,onPopupVisibleChange:tr,afterPopupVisibleChange:tr,onPopupAlign:tr,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[]},t}(Xe),or={adjustX:1,adjustY:1},sr=[0,0],ur={left:{points:["cr","cl"],overflow:or,offset:[-4,0],targetOffset:sr},right:{points:["cl","cr"],overflow:or,offset:[4,0],targetOffset:sr},top:{points:["bc","tc"],overflow:or,offset:[0,-4],targetOffset:sr},bottom:{points:["tc","bc"],overflow:or,offset:[0,4],targetOffset:sr},topLeft:{points:["bl","tl"],overflow:or,offset:[0,-4],targetOffset:sr},leftTop:{points:["tr","tl"],overflow:or,offset:[-4,0],targetOffset:sr},topRight:{points:["br","tr"],overflow:or,offset:[0,-4],targetOffset:sr},rightTop:{points:["tl","tr"],overflow:or,offset:[4,0],targetOffset:sr},bottomRight:{points:["tr","br"],overflow:or,offset:[0,4],targetOffset:sr},rightBottom:{points:["bl","br"],overflow:or,offset:[4,0],targetOffset:sr},bottomLeft:{points:["tl","bl"],overflow:or,offset:[0,4],targetOffset:sr},leftBottom:{points:["br","bl"],overflow:or,offset:[-4,0],targetOffset:sr}},Ar=function(e){var t=e.overlay,n=e.prefixCls,r=e.id;return s.a.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip"},"function"===typeof t?t():t)};function cr(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 lr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fr(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var hr=Object(o.forwardRef)((function(e,t){var n=e.overlayClassName,r=e.trigger,i=void 0===r?["hover"]:r,a=e.mouseEnterDelay,u=void 0===a?0:a,A=e.mouseLeaveDelay,c=void 0===A?.1:A,l=e.overlayStyle,f=e.prefixCls,h=void 0===f?"rc-tooltip":f,g=e.children,d=e.onVisibleChange,p=e.afterVisibleChange,v=e.transitionName,y=e.animation,m=e.placement,I=void 0===m?"right":m,b=e.align,E=void 0===b?{}:b,C=e.destroyTooltipOnHide,B=void 0!==C&&C,w=e.defaultVisible,Q=e.getTooltipContainer,k=fr(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer"]),_=Object(o.useRef)(null);Object(o.useImperativeHandle)(t,(function(){return _.current}));var x=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cr(Object(n),!0).forEach((function(t){lr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},k);"visible"in e&&(x.popupVisible=e.visible);return s.a.createElement(ar,Object.assign({popupClassName:n,prefixCls:h,popup:function(){var t=e.arrowContent,n=void 0===t?null:t,r=e.overlay,i=e.id;return[s.a.createElement("div",{className:"".concat(h,"-arrow"),key:"arrow"},n),s.a.createElement(Ar,{key:"content",prefixCls:h,id:i,overlay:r})]},action:i,builtinPlacements:ur,popupPlacement:I,ref:_,popupAlign:E,getPopupContainer:Q,onPopupVisibleChange:d,afterPopupVisibleChange:p,popupTransitionName:v,popupAnimation:y,defaultPopupVisible:w,destroyPopupOnHide:B,mouseLeaveDelay:c,popupStyle:l,mouseEnterDelay:u},x),g)}));function gr(e){var t=e.title,n=e.content,r=e.overlayClassName,i=Object(o.useRef)(),a=Object(o.useCallback)((function(){return i.current?i.current.closest(".vitessce-container"):null}),[i]),u=t||n;return s.a.createElement(s.a.Fragment,null,s.a.createElement("span",{ref:i}),s.a.createElement(hr,Object.assign({getTooltipContainer:a,overlayClassName:r,overlay:u},e)))}function dr(e){return s.a.createElement(gr,e)}function pr(e){var t=e.title,n=e.subtitle,i=e.onClick,a=e.handler,u=e.handlerKey,A=e.confirm,c=e.visible,l=Object(o.useState)(!1),f=Object(r.a)(l,2),h=f[0],g=f[1];function d(){!A||h?(i(),a()):g(!0)}Object(o.useEffect)((function(){g(!1)}),[c]);var p="".concat(h?"Confirm ":"").concat(t);return s.a.createElement("button",{title:p,type:"button",onClick:d,onKeyPress:function(e){return Object(Me.b)(e,u,d)}},p,n&&s.a.createElement(s.a.Fragment,null,s.a.createElement("br",null),s.a.createElement("span",{className:"small"},n)))}function vr(e){var t=e.menuConfig,n=e.onClick,r=e.color,i=void 0===r?null:r,a=e.palette,o=void 0===a?null:a,u=e.setColor,A=void 0===u?null:u,c=e.visible;var l=o?o.map(Me.c):Ne.d.concat([[255,255,255],[128,128,128],[0,0,0]]).map(Me.c);return s.a.createElement("div",null,i&&A&&l&&s.a.createElement(je.TwitterPicker,{className:"popover-menu-color",disableAlpha:!0,width:108,triangle:"hide",colors:l,color:Object(Me.c)(i),onChangeComplete:function(e){var t=e.rgb;t&&A&&A([t.r,t.g,t.b])}}),s.a.createElement("ul",{className:"popover-menu-list"},t.map((function(e){return s.a.createElement("li",{key:e.title+e.subtitle},s.a.createElement(pr,Object.assign({},e,{onClick:n,visible:c})))}))))}function yr(e){var t=e.menuConfig,n=e.placement,i=e.children,a=e.color,u=void 0===a?null:a,A=e.setColor,c=void 0===A?null:A,l=e.palette,f=void 0===l?null:l,h=Object(o.useState)(!1),g=Object(r.a)(h,2),d=g[0],p=g[1];return s.a.createElement(dr,{content:s.a.createElement(vr,{menuConfig:t,onClick:function(){return p(!1)},color:u,setColor:c,palette:f,visible:d}),placement:n,visible:d,onVisibleChange:p},i)}function mr(){return(mr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ir(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}gr.defaultProps={overlayClassName:"help-tooltip",placement:"top",trigger:"hover",mouseEnterDelay:.2,mouseLeaveDelay:0},dr.defaultProps={overlayClassName:"popover",placement:"top",trigger:"click",mouseEnterDelay:0,mouseLeaveDelay:0};var br=o.createElement("path",{d:"M12 18c1.657 0 3 1.343 3 3s-1.343 3-3 3-3-1.343-3-3 1.343-3 3-3zm0-9c1.657 0 3 1.343 3 3s-1.343 3-3 3-3-1.343-3-3 1.343-3 3-3zm0-9c1.657 0 3 1.343 3 3s-1.343 3-3 3-3-1.343-3-3 1.343-3 3-3z"});function Er(e){var t=e.svgRef,n=e.title,r=e.titleId,i=Ir(e,["svgRef","title","titleId"]);return o.createElement("svg",mr({width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":r},i),n?o.createElement("title",{id:r},n):null,br)}var Cr=o.forwardRef((function(e,t){return o.createElement(Er,mr({svgRef:t},e))}));n.p;function Br(e){var t=e.path,n=e.level,r=e.height,i=e.onCheckNode,o=e.onNodeRemove,s=e.onNodeSetIsEditing,u=e.onExportLevelZeroNodeJSON,A=e.onExportLevelZeroNodeTabular,c=e.onExportSetJSON,l=e.checkable,f=e.editable,h=e.exportable,g=e.checked;return[].concat(Object(a.a)(f?[{title:"Rename",handler:function(){s(t,!0)},handlerKey:"r"},{title:"Delete",confirm:!0,handler:function(){o(t)},handlerKey:"d"}]:[]),Object(a.a)(0===n&&h?[{title:"Export hierarchy",subtitle:"(to JSON file)",handler:function(){u(t)},handlerKey:"j"}].concat(Object(a.a)(r<=1?[{title:"Export hierarchy",subtitle:"(to CSV file)",handler:function(){A(t)},handlerKey:"t"}]:[])):[]),Object(a.a)(n>0?[].concat(Object(a.a)(l?[{title:g?"Uncheck":"Check",handler:function(){i(t,!g)},handlerKey:"s"}]:[]),Object(a.a)(h?[{title:"Export set",subtitle:"(to JSON file)",handler:function(){c(t)},handlerKey:"e"}]:[])):[]))}function wr(e){var t,n=e.title,r=e.path,i=e.nodeKey,a=e.level,o=e.height,u=e.color,c=e.checkbox,l=e.isChecking,f=e.isLeaf,h=e.onNodeSetColor,g=e.onNodeView,d=e.expanded,p=e.onCheckLevel,v=e.checkedLevelPath,y=e.checkedLevelIndex,m=e.disableTooltip,I=e.size,b=e.datatype,E=e.editable,C=0===a&&!d,B=y&&A()(r,v)&&y<o?y+1:1,w=new Intl.NumberFormat("en-US").format(I);t=C?Object(Me.e)(B):f||!d?"Color individual set (".concat(w," ").concat(b).concat(1===I?"":"s",")"):"Color by expanded descendants";var Q=0!==a||d?function(){return g(r)}:function(){return p(i,B)},k=m?{visible:!1}:{},_=Br(e);return s.a.createElement("span",null,s.a.createElement(gr,Object.assign({title:t},k),s.a.createElement("button",{type:"button",onClick:Q,onKeyPress:function(e){return Object(Me.b)(e,"v",(function(){return g(r)}))},className:"title-button"},n)),_.length>0?s.a.createElement(yr,{menuConfig:Br(e),color:a>0&&E?u||Ne.b:null,setColor:function(e){return h(r,e)}},s.a.createElement(Cr,{className:"node-menu-icon"})):null,a>0&&l?c:null,a>0&&s.a.createElement("span",{className:"node-size-label"},w))}function Qr(e){var t=e.title,n=e.path,i=e.onNodeSetName,a=e.onNodeCheckNewName,u=Object(o.useState)(t),A=Object(r.a)(u,2),c=A[0],l=A[1],f=a(n,c);function h(){f||i(n,c,!0)}return s.a.createElement("span",{className:"title-button-with-input"},s.a.createElement("input",{autoFocus:!0,className:"title-input",type:"text",value:c,onChange:function(e){l(e.target.value)},onKeyPress:function(e){return Object(Me.b)(e,"Enter",h)},onFocus:function(e){return e.target.select()}}),!f&&s.a.createElement("button",{type:"button",className:"title-save-button",onClick:h},"Save"))}function kr(e){var t=e.isEditing,n=e.isCurrentSet;return t||n?s.a.createElement(Qr,e):s.a.createElement(wr,e)}function _r(e){var t=e.nodeKey,n=e.path,r=e.height,i=e.onCheckLevel,a=e.checkedLevelPath,o=e.checkedLevelIndex;function u(e){if(e.target.checked){var n=parseInt(e.target.value,10);i(t,n)}}return s.a.createElement("div",{className:"level-buttons-container"},Re()(1,r+1).map((function(e){return s.a.createElement("div",{className:"level-buttons",key:e},s.a.createElement(gr,{title:Object(Me.e)(e)},s.a.createElement("input",{className:"level-radio-button",type:"checkbox",value:e,checked:A()(n,a)&&e===o,onChange:u})))})))}function xr(e){var t=e.isLeaf,n=e.isOpen,r=e.color,i=r?Object(Me.c)(r):void 0;return t?s.a.createElement("i",{className:"anticon anticon-circle rc-tree-switcher-icon"},s.a.createElement("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em","aria-hidden":"true"},s.a.createElement("rect",{fill:i,x:300,y:300,width:424,height:424}))):s.a.createElement("i",{className:"anticon anticon-caret-down rc-tree-switcher-icon"},s.a.createElement("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em","aria-hidden":"true"},s.a.createElement("path",{fill:n?"#444":i,d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"})))}var Sr=function(e){Object(Se.a)(n,e);var t=Object(Oe.a)(n);function n(){var e;Object(ke.a)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).renderSelector=function(){var t=e.props,n=t.title,r=t.isCurrentSet,i=t.isSelected,a=t.isEditing,o=t.onDragStart,u=e.context.rcTree,A=u.prefixCls,c=u.draggable,l="".concat(A,"-node-content-wrapper"),f=!r&&!a&&c;return s.a.createElement("span",{ref:e.setSelectHandle,title:n,className:Q()(l,"".concat(l,"-").concat(e.getNodeState()||"normal"),i&&"".concat(A,"-node-selected"),f&&"draggable"),draggable:f,"aria-grabbed":f,onDragStart:f?function(t){o(),e.onDragStart(t)}:void 0},s.a.createElement(kr,Object.assign({},e.props,{prefixClass:A,checkbox:e.renderCheckbox()})),e.renderLevels())},e.renderLevels=function(){var t=e.props,n=t.level,r=t.expanded;return 0!==n||r?null:s.a.createElement(_r,e.props)},e.renderSwitcher=function(){var t=e.props,n=t.expanded,r=t.isLeaf,i=t.color,a=e.context.rcTree,o=a.prefixCls,u=a.onNodeExpand,A=function(t){r||u(t,Object(xe.a)(e))},l=Q()("".concat(o,"-switcher"),Object(c.a)({},"".concat(o,"-switcher_").concat(n?"open":"close"),!r));return s.a.createElement("span",{className:l,onClick:A,onKeyPress:function(e){return Object(Me.b)(e,"d",A)},role:"button",tabIndex:"0"},s.a.createElement(xr,{isLeaf:r,isOpen:n,color:i}))},e}return Object(_e.a)(n,[{key:"render",value:function(){var e,t=this,n=this.props,r=n.style,i=n.loading,a=n.level,o=n.dragOver,u=n.dragOverGapTop,A=n.dragOverGapBottom,l=n.isLeaf,f=n.expanded,h=n.selected,g=n.checked,d=n.halfChecked,p=n.onDragEnd,v=n.expandable,y=Object(Qe.a)(n,["style","loading","level","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","expanded","selected","checked","halfChecked","onDragEnd","expandable"]),m=this.context.rcTree,I=m.prefixCls,b=m.filterTreeNode,E=m.draggable,C=this.isDisabled(),B=Ie(y);return s.a.createElement("li",Object.assign({className:Q()("rc-tree-treenode","level-".concat(a,"-treenode"),(e={},Object(c.a)(e,"".concat(I,"-treenode-disabled"),C),Object(c.a)(e,"".concat(I,"-treenode-switcher-").concat(f?"open":"close"),!l),Object(c.a)(e,"".concat(I,"-treenode-checkbox-checked"),g),Object(c.a)(e,"".concat(I,"-treenode-checkbox-indeterminate"),d),Object(c.a)(e,"".concat(I,"-treenode-selected"),h),Object(c.a)(e,"".concat(I,"-treenode-loading"),i),Object(c.a)(e,"drag-over",!C&&o),Object(c.a)(e,"drag-over-gap-top",!C&&u),Object(c.a)(e,"drag-over-gap-bottom",!C&&A),Object(c.a)(e,"filter-node",b&&b(this)),e)),style:r,role:"treeitem",onDragEnter:E?this.onDragEnter:void 0,onDragOver:E?this.onDragOver:void 0,onDragLeave:E?this.onDragLeave:void 0,onDrop:E?this.onDrop.bind(this):void 0,onDragEnd:E?function(e){p(),t.onDragEnd(e)}:void 0},B),v?this.renderSwitcher():null,this.renderSelector(),this.renderChildren())}}]),n}(te),Or=n(371),Dr=n(91);function Rr(){return(Rr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function jr(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Mr(e){var t=e.svgRef,n=e.title,r=e.titleId,i=jr(e,["svgRef","title","titleId"]);return o.createElement("svg",Rr({viewBox:"0 0 16.433999 10.234",height:12,width:18,ref:t,"aria-labelledby":r},i),n?o.createElement("title",{id:r},n):null,o.createElement("g",{transform:"translate(0.117,-2.883)"},o.createElement("path",{d:"m 11.467471,11.811278 c 0.198237,-0.322177 0.508,-1.011333 0.653661,-1.454255 0.659343,-2.0049141 0.44323,-4.2620847 -0.577734,-6.0340822 l -0.168844,-0.2930481 0.105744,0.017887 c 0.759902,0.1285441 1.368762,0.3699553 1.856675,0.7361658 1.988296,1.4923476 2.192477,4.3353549 0.434717,6.0529895 -0.641216,0.626581 -1.299647,0.94683 -2.294136,1.115833 l -0.108488,0.01844 z M 4.3162122,11.919169 C 1.9278944,11.487872 0.46692382,9.0323123 1.234873,6.7401372 1.5621727,5.763213 2.2610593,4.9489746 3.1840041,4.4693005 3.5978035,4.2542401 3.9427842,4.145371 4.5197023,4.0477802 L 4.6254464,4.0298927 4.4571836,4.3223069 C 3.4332707,6.1017061 3.2180432,8.3476022 3.878868,10.357023 c 0.1458466,0.443487 0.4554716,1.132155 0.6542959,1.455285 0.054471,0.08853 0.087814,0.159599 0.074096,0.157937 -0.013718,-0.0017 -0.1446898,-0.02465 -0.2910477,-0.05108 z M 5.0000001,3 C 2.2,3 0,5.2 0,8 c 0,2.8 2.2,5 5.0000001,5 0.6,0 1.1,-0.1 1.6,-0.3 C 5.3000001,11.6 4.5,9.7999998 4.5,8 4.5,6.2 5.3000001,4.5 6.6000001,3.3 c -0.5,-0.2 -1,-0.3 -1.6,-0.3 z M 4.65,4.02 C 3.92,5.17 3.51,6.54 3.51,8 c 0,1.4599998 0.42,2.83 1.14,3.98 C 2.61,11.8 1.01,10.08 1.01,8 1.01,5.92 2.61,4.2 4.65,4.02 Z M 8,4 C 6.8,4.9 6,6.4 6,8 6,9.6 6.8,11.1 8,12 9.2,11.1 10,9.7 10,8 10,6.3 9.2,4.9 8,4 Z m 3,-1 c 2.8,0 5,2.2 5,5 0,2.8 -2.2,5 -5,5 C 10.4,13 9.9,12.9 9.4,12.7 10.7,11.6 11.5,9.8 11.5,8 11.5,6.2 10.7,4.5 9.4,3.3 9.9,3.1 10.4,3 11,3 Z m 0.35,1.02 c 0.73,1.15 1.14,2.52 1.14,3.98 0,1.46 -0.42,2.83 -1.14,3.98 2.04,-0.18 3.64,-1.9 3.64,-3.98 0,-2.08 -1.6,-3.8 -3.64,-3.98 z",style:{strokeWidth:.234,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1}})))}var Nr=o.forwardRef((function(e,t){return o.createElement(Mr,Rr({svgRef:t},e))}));n.p;function Fr(){return(Fr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Tr(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Lr(e){var t=e.svgRef,n=e.title,r=e.titleId,i=Tr(e,["svgRef","title","titleId"]);return o.createElement("svg",Fr({width:18,height:12,viewBox:"0 0 16 10",ref:t,"aria-labelledby":r},i),n?o.createElement("title",{id:r},n):null,o.createElement("g",{transform:"translate(0,-3)"},o.createElement("path",{d:"M 5.0000001,3 C 2.2,3 0,5.2 0,8 c 0,2.8 2.2,5 5.0000001,5 0.6,0 1.1,-0.1 1.6,-0.3 C 5.3000001,11.6 4.5,9.7999998 4.5,8 4.5,6.2 5.3000001,4.5 6.6000001,3.3 c -0.5,-0.2 -1,-0.3 -1.6,-0.3 z M 4.65,4.02 C 3.92,5.17 3.51,6.54 3.51,8 c 0,1.4599998 0.42,2.83 1.14,3.98 C 2.61,11.8 1.01,10.08 1.01,8 1.01,5.92 2.61,4.2 4.65,4.02 Z M 8,4 C 6.8,4.9 6,6.4 6,8 6,9.6 6.8,11.1 8,12 9.2,11.1 10,9.7 10,8 10,6.3 9.2,4.9 8,4 Z m 3,-1 c 2.8,0 5,2.2 5,5 0,2.8 -2.2,5 -5,5 C 10.4,13 9.9,12.9 9.4,12.7 10.7,11.6 11.5,9.8 11.5,8 11.5,6.2 10.7,4.5 9.4,3.3 9.9,3.1 10.4,3 11,3 Z m 0.35,1.02 c 0.73,1.15 1.14,2.52 1.14,3.98 0,1.46 -0.42,2.83 -1.14,3.98 2.04,-0.18 3.64,-1.9 3.64,-3.98 0,-2.08 -1.6,-3.8 -3.64,-3.98 z",style:{strokeWidth:.234,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1}})))}var Pr=o.forwardRef((function(e,t){return o.createElement(Lr,Fr({svgRef:t},e))}));n.p;function Ur(){return(Ur=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Gr(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var qr=o.createElement("rect",{x:"5%",width:"90%",height:"100%",fill:"white"}),Hr=o.createElement("g",null,o.createElement("rect",{x:0,y:0,width:25.3804963846,height:16,mask:"url(#union-mask)"}));function Yr(e){var t=e.svgRef,n=e.title,r=e.titleId,i=Gr(e,["svgRef","title","titleId"]);return o.createElement("svg",Ur({id:"svg14",viewBox:"0 0 25.3804963846 16",height:16,width:25.3804963846,ref:t,"aria-labelledby":r},i),n?o.createElement("title",{id:r},n):null,o.createElement("defs",null,o.createElement("mask",{id:"union-mask",x:0,y:0,width:25.3804963846,height:16},qr,o.createElement("g",{transform:"translate(4.69,0)"},o.createElement("path",{d:"m 11.467471,11.811278 c 0.198237,-0.322177 0.508,-1.011333 0.653661,-1.454255 0.659343,-2.0049141 0.44323,-4.2620847 -0.577734,-6.0340822 l -0.168844,-0.2930481 0.105744,0.017887 c 0.759902,0.1285441 1.368762,0.3699553 1.856675,0.7361658 1.988296,1.4923476 2.192477,4.3353549 0.434717,6.0529895 -0.641216,0.626581 -1.299647,0.94683 -2.294136,1.115833 l -0.108488,0.01844 z M 4.3162122,11.919169 C 1.9278944,11.487872 0.46692382,9.0323123 1.234873,6.7401372 1.5621727,5.763213 2.2610593,4.9489746 3.1840041,4.4693005 3.5978035,4.2542401 3.9427842,4.145371 4.5197023,4.0477802 L 4.6254464,4.0298927 4.4571836,4.3223069 C 3.4332707,6.1017061 3.2180432,8.3476022 3.878868,10.357023 c 0.1458466,0.443487 0.4554716,1.132155 0.6542959,1.455285 0.054471,0.08853 0.087814,0.159599 0.074096,0.157937 -0.013718,-0.0017 -0.1446898,-0.02465 -0.2910477,-0.05108 z M 5.0000001,3 C 2.2,3 0,5.2 0,8 c 0,2.8 2.2,5 5.0000001,5 0.6,0 1.1,-0.1 1.6,-0.3 C 5.3000001,11.6 4.5,9.7999998 4.5,8 4.5,6.2 5.3000001,4.5 6.6000001,3.3 c -0.5,-0.2 -1,-0.3 -1.6,-0.3 z M 4.65,4.02 C 3.92,5.17 3.51,6.54 3.51,8 c 0,1.4599998 0.42,2.83 1.14,3.98 C 2.61,11.8 1.01,10.08 1.01,8 1.01,5.92 2.61,4.2 4.65,4.02 Z M 8,4 C 6.8,4.9 6,6.4 6,8 6,9.6 6.8,11.1 8,12 9.2,11.1 10,9.7 10,8 10,6.3 9.2,4.9 8,4 Z m 3,-1 c 2.8,0 5,2.2 5,5 0,2.8 -2.2,5 -5,5 C 10.4,13 9.9,12.9 9.4,12.7 10.7,11.6 11.5,9.8 11.5,8 11.5,6.2 10.7,4.5 9.4,3.3 9.9,3.1 10.4,3 11,3 Z m 0.35,1.02 c 0.73,1.15 1.14,2.52 1.14,3.98 0,1.46 -0.42,2.83 -1.14,3.98 2.04,-0.18 3.64,-1.9 3.64,-3.98 0,-2.08 -1.6,-3.8 -3.64,-3.98 z",style:{strokeWidth:.234,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1},fill:"black"})))),Hr)}var Jr=o.forwardRef((function(e,t){return o.createElement(Yr,Ur({svgRef:t},e))}));n.p;function zr(e){var t=e.datatype,n=e.onError,r=e.onImportTree,i=e.onCreateLevelZeroNode,u=e.importable,A=e.editable,c=Object(o.useCallback)((function(e,i){return function(){var a=document.createElement("input");a.setAttribute("type","file"),a.setAttribute("accept",i),document.body.appendChild(a),a.click(),a.addEventListener("change",(function(i){if(window.File&&window.FileReader&&window.FileList&&window.Blob){var a=i.target.files;if(a&&1===a.length){var o=new FileReader;o.addEventListener("load",(function(){var i=o.result;try{var a=e(i,t);n(!1),r(a)}catch(s){n(s.message)}}),!1),o.readAsText(a[0])}else n("Incorrect number of files selected.")}else n("Local file reading APIs are not fully supported in this browser.")})),a.remove()}}),[t,n,r]),l=[].concat(Object(a.a)(A?[{title:"Create hierarchy",handler:i,handlerKey:"n"}]:[]),Object(a.a)(u?[{title:"Import hierarchy",subtitle:"(from CSV file)",handler:c(Or.e,Dr.e),handlerKey:"c"},{title:"Import hierarchy",subtitle:"(from JSON file)",handler:c(Or.d,Dr.d),handlerKey:"j"}]:[]));return l.length>0?s.a.createElement(yr,{menuConfig:l},s.a.createElement("button",{className:"plus-button",type:"submit"},"+")):null}function Kr(e){var t=e.onUnion,n=e.onIntersection,r=e.onComplement,i=e.operatable,a=e.hasCheckedSetsToUnion,o=e.hasCheckedSetsToIntersect,u=e.hasCheckedSetsToComplement;return s.a.createElement(s.a.Fragment,null,i&&s.a.createElement(s.a.Fragment,null,s.a.createElement("button",{onClick:t,title:"New set from union of checked sets",type:"submit",disabled:!a},s.a.createElement(Nr,null)),s.a.createElement("button",{onClick:n,title:"New set from intersection of checked sets",type:"submit",disabled:!o},s.a.createElement(Pr,null)),s.a.createElement("button",{onClick:r,title:"New set from complement of checked sets",type:"submit",disabled:!u},s.a.createElement(Jr,null))))}var Wr=n(134);function Vr(e,t){return Object(i.a)({},e,{tree:e?e.tree.map((function(e){return function e(t,n,r){var o,s=[].concat(Object(a.a)(n),[t.name]);return Object(i.a)({},t,{},t.children?{children:t.children.map((function(t){return e(t,s,r)}))}:{},{color:(null===r||void 0===r||null===(o=r.find((function(e){return A()(e.path,s)})))||void 0===o?void 0:o.color)||Ne.b})}(e,[],t)})):[]})}function Xr(e){var t=e.sets,n=e.additionalSets,i=e.setColor,u=e.levelSelection,c=e.setSelection,l=e.setExpansion,f=e.datatype,h=e.draggable,g=void 0===h||h,d=e.checkable,p=void 0===d||d,v=e.editable,y=void 0===v||v,m=e.expandable,I=void 0===m||m,b=e.operatable,E=void 0===b||b,C=e.exportable,B=void 0===C||C,w=e.importable,Q=void 0===w||w,k=e.onError,_=e.onCheckNode,x=e.onExpandNode,S=e.onDropNode,O=e.onCheckLevel,D=e.onNodeSetColor,R=e.onNodeSetName,j=e.onNodeCheckNewName,M=e.onNodeRemove,N=e.onNodeView,F=e.onImportTree,T=e.onCreateLevelZeroNode,L=e.onExportLevelZeroNodeJSON,P=e.onExportLevelZeroNodeTabular,U=e.onExportSetJSON,G=e.onUnion,q=e.onIntersection,H=e.onComplement,Y=e.hasCheckedSetsToUnion,J=e.hasCheckedSetsToIntersect,z=e.hasCheckedSetsToComplement,K=Object(o.useState)(!1),W=Object(r.a)(K,2),V=W[0],X=W[1],Z=Object(o.useState)(null),$=Object(r.a)(Z,2),ee=$[0],te=$[1],ne=Object(o.useMemo)((function(){return Vr(t,i)}),[t,i]),re=Object(o.useMemo)((function(){return Vr(n,i)}),[n,i]),ie=re?re.tree.flatMap((function(e){return function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t)return null;var r=[].concat(Object(a.a)(n),[t.name]);return t.children?[Object(Me.g)(r)].concat(Object(a.a)(t.children.flatMap((function(t){return e(t,r)})))):Object(Me.g)(r)}(e,[])})):[],ae=(c||[]).map(Me.g),oe=(l||[]).map(Me.g),se=ae.filter((function(e){return!ie.includes(e)})),ue=oe.filter((function(e){return!ie.includes(e)})),Ae=ae.filter((function(e){return ie.includes(e)})),ce=oe.filter((function(e){return ie.includes(e)}));function le(e,t,n){return e?e.map((function(e){var r=[].concat(Object(a.a)(n),[e.name]);return s.a.createElement(Sr,Object.assign({key:Object(Me.g)(r)},Object(Wr.h)(e,r,i),{isEditing:A()(ee,r),datatype:f,draggable:g&&!t,editable:y&&!t,checkable:p,expandable:I,exportable:B,isChecking:!0,checkedLevelPath:u?u.levelZeroPath:null,checkedLevelIndex:u?u.levelIndex:null,onCheckNode:_,onCheckLevel:O,onNodeView:N,onNodeSetColor:D,onNodeSetName:function(e,t){R(e,t),te(null)},onNodeCheckNewName:j,onNodeSetIsEditing:te,onNodeRemove:M,onExportLevelZeroNodeJSON:L,onExportLevelZeroNodeTabular:P,onExportSetJSON:U,disableTooltip:V,onDragStart:function(){return X(!0)},onDragEnd:function(){return X(!1)}}),le(e.children,t,r))})):null}return s.a.createElement("div",{className:"sets-manager"},s.a.createElement("div",{className:"sets-manager-tree"},s.a.createElement(we,{draggable:!1,checkable:p,checkedKeys:se,expandedKeys:ue,autoExpandParent:!0,onCheck:function(e,t){return _(t.node.props.nodeKey,t.checked)},onExpand:function(e,t){return x(e,t.node.props.nodeKey,t.expanded)}},le(ne.tree,!0,[])),s.a.createElement(we,{draggable:!0,checkable:p,checkedKeys:Ae,expandedKeys:ce,autoExpandParent:!0,onCheck:function(e,t){return _(t.node.props.nodeKey,t.checked)},onExpand:function(e,t){return x(e,t.node.props.nodeKey,t.expanded)},onDrop:function(e){var t=e.node.props.eventKey,n=e.dragNode.props.eventKey,r=e.dropToGap,i=e.dropPosition;S(t,n,i,r)}},le(re.tree,!1,[])),s.a.createElement(zr,{datatype:f,onError:k,onImportTree:F,onCreateLevelZeroNode:T,importable:Q,editable:y})),s.a.createElement("div",{className:"set-operation-buttons"},s.a.createElement(Kr,{onUnion:G,onIntersection:q,onComplement:H,operatable:E,hasCheckedSetsToUnion:Y,hasCheckedSetsToIntersect:J,hasCheckedSetsToComplement:z})))}n.d(t,"a",(function(){return Xr}))},function(e,t,n){"use strict";var r=n(9),i=n.n(r),a=n(22),o=n(20),s=n(47),u=n(24),A=n(60),c=n(0),l=n.n(c),f=n(189),h=n(809),g=n(33),d=n(18),p=(n(28),n(37)),v=n(48),y=n(87),m=n(530),I=n(73),b=c.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,a=e.color,o=void 0===a?"default":a,s=e.component,u=void 0===s?"button":s,A=e.disabled,l=void 0!==A&&A,f=e.disableElevation,h=void 0!==f&&f,v=e.disableFocusRipple,y=void 0!==v&&v,b=e.endIcon,E=e.focusVisibleClassName,C=e.fullWidth,B=void 0!==C&&C,w=e.size,Q=void 0===w?"medium":w,k=e.startIcon,_=e.type,x=void 0===_?"button":_,S=e.variant,O=void 0===S?"text":S,D=Object(g.a)(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),R=k&&c.createElement("span",{className:Object(p.a)(r.startIcon,r["iconSize".concat(Object(I.a)(Q))])},k),j=b&&c.createElement("span",{className:Object(p.a)(r.endIcon,r["iconSize".concat(Object(I.a)(Q))])},b);return c.createElement(m.a,Object(d.a)({className:Object(p.a)(r.root,r[O],i,"inherit"===o?r.colorInherit:"default"!==o&&r["".concat(O).concat(Object(I.a)(o))],"medium"!==Q&&[r["".concat(O,"Size").concat(Object(I.a)(Q))],r["size".concat(Object(I.a)(Q))]],h&&r.disableElevation,l&&r.disabled,B&&r.fullWidth),component:u,disabled:l,focusRipple:!y,focusVisibleClassName:Object(p.a)(r.focusVisible,E),ref:t,type:x},D),c.createElement("span",{className:r.label},R,n,j))})),E=Object(v.a)((function(e){return{root:Object(d.a)({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Object(y.b)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(y.b)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(y.b)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(Object(y.b)(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:Object(y.b)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(Object(y.b)(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:Object(y.b)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(b),C=n(805),B=n.n(C),w=n(353),Q=n(352),k=n(354);var _=n(16),x=(n(317),n(175)),S=n(202),O=n(75),D=n.n(O),R=!1,j=n(267),M=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,a=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(i="exited",r.appearStatus="entering"):i="entered":i=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:i},r.nextCallback=null,r}Object(S.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!==typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),"entering"===t?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[D.a.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),u=r?s.appear:s.enter;!e&&!n||R?this.safeSetState({status:"entered"},(function(){t.props.onEntered(a)})):(this.props.onEnter(a,o),this.safeSetState({status:"entering"},(function(){t.props.onEntering(a,o),t.onTransitionEnd(u,(function(){t.safeSetState({status:"entered"},(function(){t.props.onEntered(a,o)}))}))})))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:D.a.findDOMNode(this);t&&!R?(this.props.onExit(r),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:D.a.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Object(x.a)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return l.a.createElement(j.a.Provider,{value:null},"function"===typeof n?n(e,r):l.a.cloneElement(l.a.Children.only(n),r))},t}(l.a.Component);function N(){}M.contextType=j.a,M.propTypes={},M.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:N,onEntering:N,onEntered:N,onExit:N,onExiting:N,onExited:N},M.UNMOUNTED="unmounted",M.EXITED="exited",M.ENTERING="entering",M.ENTERED="entered",M.EXITING="exiting";var F=M,T=n(355);function L(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"===typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}var P=n(358),U=c.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,a=e.collapsedHeight,o=void 0===a?"0px":a,s=e.component,u=void 0===s?"div":s,A=e.in,l=e.onEnter,f=e.onEntered,h=e.onEntering,v=e.onExit,y=e.onExiting,m=e.style,I=e.timeout,b=void 0===I?T.b.standard:I,E=Object(g.a)(e,["children","classes","className","collapsedHeight","component","in","onEnter","onEntered","onEntering","onExit","onExiting","style","timeout"]),C=Object(P.a)(),B=c.useRef(),w=c.useRef(null),Q=c.useRef(),k="number"===typeof o?"".concat(o,"px"):o;c.useEffect((function(){return function(){clearTimeout(B.current)}}),[]);return c.createElement(F,Object(d.a)({in:A,onEnter:function(e,t){e.style.height=k,l&&l(e,t)},onEntered:function(e,t){e.style.height="auto",f&&f(e,t)},onEntering:function(e,t){var n=w.current?w.current.clientHeight:0,r=L({style:m,timeout:b},{mode:"enter"}).duration;if("auto"===b){var i=C.transitions.getAutoHeightDuration(n);e.style.transitionDuration="".concat(i,"ms"),Q.current=i}else e.style.transitionDuration="string"===typeof r?r:"".concat(r,"ms");e.style.height="".concat(n,"px"),h&&h(e,t)},onExit:function(e){var t=w.current?w.current.clientHeight:0;e.style.height="".concat(t,"px"),v&&v(e)},onExiting:function(e){var t=w.current?w.current.clientHeight:0,n=L({style:m,timeout:b},{mode:"exit"}).duration;if("auto"===b){var r=C.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(r,"ms"),Q.current=r}else e.style.transitionDuration="string"===typeof n?n:"".concat(n,"ms");e.style.height=k,y&&y(e)},addEndListener:function(e,t){"auto"===b&&(B.current=setTimeout(t,Q.current||0))},timeout:"auto"===b?null:b},E),(function(e,a){return c.createElement(u,Object(d.a)({className:Object(p.a)(r.container,i,{entered:r.entered,exited:!A&&"0px"===k&&r.hidden}[e]),style:Object(d.a)({minHeight:k},m),ref:t},a),c.createElement("div",{className:r.wrapper,ref:w},c.createElement("div",{className:r.wrapperInner},n)))}))}));U.muiSupportAuto=!0;var G=Object(v.a)((function(e){return{container:{height:0,overflow:"hidden",transition:e.transitions.create("height")},entered:{height:"auto",overflow:"visible"},hidden:{visibility:"hidden"},wrapper:{display:"flex"},wrapperInner:{width:"100%"}}}),{name:"MuiCollapse"})(U),q=n(798);var H=c.createContext({}),Y=n(370),J=c.forwardRef((function(e,t){var n,r=e.children,i=e.classes,a=e.className,o=e.defaultExpanded,s=void 0!==o&&o,u=e.disabled,A=void 0!==u&&u,l=e.expanded,f=e.onChange,h=e.square,v=void 0!==h&&h,y=e.TransitionComponent,m=void 0===y?G:y,I=e.TransitionProps,b=Object(g.a)(e,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),E=Object(Y.a)({controlled:l,default:s,name:"ExpansionPanel"}),C=Object(_.a)(E,2),B=C[0],x=C[1],S=c.useCallback((function(e){x(!B),f&&f(e,!B)}),[B,f,x]),O=c.Children.toArray(r),D=(n=O,Object(w.a)(n)||Object(Q.a)(n)||Object(k.a)()),R=D[0],j=D.slice(1),M=c.useMemo((function(){return{expanded:B,disabled:A,toggle:S}}),[B,A,S]);return c.createElement(q.a,Object(d.a)({className:Object(p.a)(i.root,a,B&&i.expanded,A&&i.disabled,!v&&i.rounded),ref:t,square:v},b),c.createElement(H.Provider,{value:M},R),c.createElement(m,Object(d.a)({in:B,timeout:"auto"},I),c.createElement("div",{"aria-labelledby":R.props.id,id:R.props["aria-controls"],role:"region"},j)))})),z=Object(v.a)((function(e){var t={duration:e.transitions.duration.shortest};return{root:{position:"relative",transition:e.transitions.create(["margin"],t),"&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:e.palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-child":{"&:before":{display:"none"}},"&$expanded":{margin:"16px 0","&:first-child":{marginTop:0},"&:last-child":{marginBottom:0},"&:before":{opacity:0}},"&$expanded + &":{"&:before":{display:"none"}},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},rounded:{borderRadius:0,"&:first-child":{borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},"&:last-child":{borderBottomLeftRadius:e.shape.borderRadius,borderBottomRightRadius:e.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},expanded:{},disabled:{}}}),{name:"MuiExpansionPanel"})(J),K=n(862),W=c.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,a=e.expandIcon,o=e.IconButtonProps,s=e.onBlur,u=e.onClick,A=e.onFocusVisible,l=Object(g.a)(e,["children","classes","className","expandIcon","IconButtonProps","onBlur","onClick","onFocusVisible"]),f=c.useState(!1),h=f[0],v=f[1],y=c.useContext(H),I=y.disabled,b=void 0!==I&&I,E=y.expanded,C=y.toggle;return c.createElement(m.a,Object(d.a)({focusRipple:!1,disableRipple:!0,disabled:b,component:"div","aria-expanded":E,className:Object(p.a)(r.root,i,b&&r.disabled,E&&r.expanded,h&&r.focused),onFocusVisible:function(e){v(!0),A&&A(e)},onBlur:function(e){v(!1),s&&s(e)},onClick:function(e){C&&C(e),u&&u(e)},ref:t},l),c.createElement("div",{className:Object(p.a)(r.content,E&&r.expanded)},n),a&&c.createElement(K.a,Object(d.a)({className:Object(p.a)(r.expandIcon,E&&r.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},o),a))})),V=Object(v.a)((function(e){var t={duration:e.transitions.duration.shortest};return{root:{display:"flex",minHeight:48,transition:e.transitions.create(["min-height","background-color"],t),padding:"0 24px 0 24px","&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused":{backgroundColor:e.palette.grey[300]},"&$disabled":{opacity:.38}},expanded:{},focused:{},disabled:{},content:{display:"flex",flexGrow:1,transition:e.transitions.create(["margin"],t),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:e.transitions.create("transform",t),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}}),{name:"MuiExpansionPanelSummary"})(W),X=c.forwardRef((function(e,t){var n=e.classes,r=e.className,i=Object(g.a)(e,["classes","className"]);return c.createElement("div",Object(d.a)({className:Object(p.a)(n.root,r),ref:t},i))})),Z=Object(v.a)({root:{display:"flex",padding:"8px 24px 24px"}},{name:"MuiExpansionPanelDetails"})(X),$=n(1070),ee=n.n($),te=n(1083),ne=n(1075),re=n(858),ie=n(23),ae=n(25);function oe(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=this,s=function(){e.apply(o,i)};clearTimeout(t),t=setTimeout(s,n)}return r.clear=function(){clearTimeout(t)},r}var se=n(107),ue=n(487),Ae=n(256),ce=n(765),le=n(860),fe=n(861),he=n(68),ge=n(92),de=n(356),pe=n(3),ve=n(2),ye=n(357);function me(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Ie(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function be(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,a=[t,n].concat(Object(ie.a)(r)),o=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===a.indexOf(e)&&-1===o.indexOf(e.tagName)&&me(e,i)}))}function Ee(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function Ce(e,t){var n,r=[],i=[],a=e.container;if(!t.disableScrollLock){if(function(e){var t=Object(se.a)(e);return t.body===e?Object(ue.a)(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(a)){var o=Object(ye.a)();r.push({value:a.style.paddingRight,key:"padding-right",el:a}),a.style["padding-right"]="".concat(Ie(a)+o,"px"),n=Object(se.a)(a).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(Ie(e)+o,"px")}))}var s=a.parentElement,u="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:a;r.push({value:u.style.overflow,key:"overflow",el:u}),u.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var Be=function(){function e(){Object(pe.a)(this,e),this.modals=[],this.containers=[]}return Object(ve.a)(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&me(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);be(t,e.mountNode,e.modalRef,r,!0);var i=Ee(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=Ee(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=Ce(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=Ee(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&me(e.modalRef,!0),be(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&me(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();var we=function(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,i=e.disableEnforceFocus,a=void 0!==i&&i,o=e.disableRestoreFocus,s=void 0!==o&&o,u=e.getDoc,A=e.isEnabled,l=e.open,f=c.useRef(),h=c.useRef(null),g=c.useRef(null),d=c.useRef(),p=c.useRef(null),v=c.useCallback((function(e){p.current=O.findDOMNode(e)}),[]),y=Object(he.a)(t.ref,v);return c.useMemo((function(){l&&"undefined"!==typeof window&&(d.current=u().activeElement)}),[l]),c.useEffect((function(){if(l){var e=Object(se.a)(p.current);r||!p.current||p.current.contains(e.activeElement)||(p.current.hasAttribute("tabIndex")||p.current.setAttribute("tabIndex",-1),p.current.focus());var t=function(){a||!A()||f.current?f.current=!1:p.current&&!p.current.contains(e.activeElement)&&p.current.focus()},n=function(t){!a&&A()&&9===t.keyCode&&e.activeElement===p.current&&(f.current=!0,t.shiftKey?g.current.focus():h.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var i=setInterval((function(){t()}),50);return function(){clearInterval(i),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(d.current&&d.current.focus&&d.current.focus(),d.current=null)}}}),[r,a,s,A,l]),c.createElement(c.Fragment,null,c.createElement("div",{tabIndex:0,ref:h,"data-test":"sentinelStart"}),c.cloneElement(t,{ref:y}),c.createElement("div",{tabIndex:0,ref:g,"data-test":"sentinelEnd"}))},Qe={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},ke=c.forwardRef((function(e,t){var n=e.invisible,r=void 0!==n&&n,i=e.open,a=Object(g.a)(e,["invisible","open"]);return i?c.createElement("div",Object(d.a)({"aria-hidden":!0,ref:t},a,{style:Object(d.a)({},Qe.root,{},r?Qe.invisible:{},{},a.style)})):null}));var _e=new Be,xe=c.forwardRef((function(e,t){var n=Object(ce.a)(),r=Object(le.a)({name:"MuiModal",props:Object(d.a)({},e),theme:n}),i=r.BackdropComponent,a=void 0===i?ke:i,o=r.BackdropProps,s=r.children,u=r.closeAfterTransition,A=void 0!==u&&u,l=r.container,f=r.disableAutoFocus,h=void 0!==f&&f,p=r.disableBackdropClick,v=void 0!==p&&p,y=r.disableEnforceFocus,m=void 0!==y&&y,I=r.disableEscapeKeyDown,b=void 0!==I&&I,E=r.disablePortal,C=void 0!==E&&E,B=r.disableRestoreFocus,w=void 0!==B&&B,Q=r.disableScrollLock,k=void 0!==Q&&Q,_=r.hideBackdrop,x=void 0!==_&&_,S=r.keepMounted,D=void 0!==S&&S,R=r.manager,j=void 0===R?_e:R,M=r.onBackdropClick,N=r.onClose,F=r.onEscapeKeyDown,T=r.onRendered,L=r.open,P=Object(g.a)(r,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),U=c.useState(!0),G=U[0],q=U[1],H=c.useRef({}),Y=c.useRef(null),J=c.useRef(null),z=Object(he.a)(J,t),K=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(r),W=function(){return Object(se.a)(Y.current)},V=function(){return H.current.modalRef=J.current,H.current.mountNode=Y.current,H.current},X=function(){j.mount(V(),{disableScrollLock:k}),J.current.scrollTop=0},Z=Object(ge.a)((function(){var e=function(e){return e="function"===typeof e?e():e,O.findDOMNode(e)}(l)||W().body;j.add(V(),e),J.current&&X()})),$=c.useCallback((function(){return j.isTopModal(V())}),[j]),ee=Object(ge.a)((function(e){Y.current=e,e&&(T&&T(),L&&$()?X():me(J.current,!0))})),te=c.useCallback((function(){j.remove(V())}),[j]);if(c.useEffect((function(){return function(){te()}}),[te]),c.useEffect((function(){L?Z():K&&A||te()}),[L,te,K,A,Z]),!D&&!L&&(!K||G))return null;var ne=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:de.a}),re={};return void 0===s.props.tabIndex&&(re.tabIndex=s.props.tabIndex||"-1"),K&&(re.onEnter=Object(Ae.a)((function(){q(!1)}),s.props.onEnter),re.onExited=Object(Ae.a)((function(){q(!0),A&&te()}),s.props.onExited)),c.createElement(fe.a,{ref:ee,container:l,disablePortal:C},c.createElement("div",Object(d.a)({ref:z,onKeyDown:function(e){"Escape"===e.key&&$()&&(e.stopPropagation(),F&&F(e),!b&&N&&N(e,"escapeKeyDown"))},role:"presentation"},P,{style:Object(d.a)({},ne.root,{},!L&&G?ne.hidden:{},{},P.style)}),x?null:c.createElement(a,Object(d.a)({open:L,onClick:function(e){e.target===e.currentTarget&&(M&&M(e),!v&&N&&N(e,"backdropClick"))}},o)),c.createElement(we,{disableEnforceFocus:m,disableAutoFocus:h,disableRestoreFocus:w,getDoc:W,isEnabled:$,open:L},c.cloneElement(s,re))))}));function Se(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var Oe={entering:{opacity:1,transform:Se(1)},entered:{opacity:1,transform:"none"}},De=c.forwardRef((function(e,t){var n=e.children,r=e.in,i=e.onEnter,a=e.onExit,o=e.style,s=e.timeout,u=void 0===s?"auto":s,A=Object(g.a)(e,["children","in","onEnter","onExit","style","timeout"]),l=c.useRef(),f=c.useRef(),h=Object(he.a)(n.ref,t),p=Object(P.a)();return c.useEffect((function(){return function(){clearTimeout(l.current)}}),[]),c.createElement(F,Object(d.a)({appear:!0,in:r,onEnter:function(e,t){!function(e){e.scrollTop}(e);var n,r=L({style:o,timeout:u},{mode:"enter"}),a=r.duration,s=r.delay;"auto"===u?(n=p.transitions.getAutoHeightDuration(e.clientHeight),f.current=n):n=a,e.style.transition=[p.transitions.create("opacity",{duration:n,delay:s}),p.transitions.create("transform",{duration:.666*n,delay:s})].join(","),i&&i(e,t)},onExit:function(e){var t,n=L({style:o,timeout:u},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===u?(t=p.transitions.getAutoHeightDuration(e.clientHeight),f.current=t):t=r,e.style.transition=[p.transitions.create("opacity",{duration:t,delay:i}),p.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=Se(.75),a&&a(e)},addEndListener:function(e,t){"auto"===u&&(l.current=setTimeout(t,f.current||0))},timeout:"auto"===u?null:u},A),(function(e,t){return c.cloneElement(n,Object(d.a)({style:Object(d.a)({opacity:0,transform:Se(.75),visibility:"exited"!==e||r?void 0:"hidden"},Oe[e],{},o,{},n.props.style),ref:h},t))}))}));De.muiSupportAuto=!0;var Re=De;function je(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Me(e,t){var n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Ne(e){return[e.horizontal,e.vertical].map((function(e){return"number"===typeof e?"".concat(e,"px"):e})).join(" ")}function Fe(e){return"function"===typeof e?e():e}var Te=c.forwardRef((function(e,t){var n=e.action,r=e.anchorEl,i=e.anchorOrigin,a=void 0===i?{vertical:"top",horizontal:"left"}:i,o=e.anchorPosition,s=e.anchorReference,u=void 0===s?"anchorEl":s,A=e.children,l=e.classes,f=e.className,h=e.container,v=e.elevation,y=void 0===v?8:v,m=e.getContentAnchorEl,I=e.marginThreshold,b=void 0===I?16:I,E=e.onEnter,C=e.onEntered,B=e.onEntering,w=e.onExit,Q=e.onExited,k=e.onExiting,_=e.open,x=e.PaperProps,S=void 0===x?{}:x,D=e.transformOrigin,R=void 0===D?{vertical:"top",horizontal:"left"}:D,j=e.TransitionComponent,M=void 0===j?Re:j,N=e.transitionDuration,F=void 0===N?"auto":N,T=e.TransitionProps,L=void 0===T?{}:T,P=Object(g.a)(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),U=c.useRef(),G=c.useCallback((function(e){if("anchorPosition"===u)return o;var t=Fe(r),n=(t instanceof Object(ue.a)(t).Element?t:Object(se.a)(U.current).body).getBoundingClientRect(),i=0===e?a.vertical:"center";return{top:n.top+je(n,i),left:n.left+Me(n,a.horizontal)}}),[r,a.horizontal,a.vertical,o,u]),H=c.useCallback((function(e){var t=0;if(m&&"anchorEl"===u){var n=m(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}0}return t}),[a.vertical,u,m]),Y=c.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:je(e,R.vertical)+t,horizontal:Me(e,R.horizontal)}}),[R.horizontal,R.vertical]),J=c.useCallback((function(e){var t=H(e),n={width:e.offsetWidth,height:e.offsetHeight},i=Y(n,t);if("none"===u)return{top:null,left:null,transformOrigin:Ne(i)};var a=G(t),o=a.top-i.vertical,s=a.left-i.horizontal,A=o+n.height,c=s+n.width,l=Object(ue.a)(Fe(r)),f=l.innerHeight-b,h=l.innerWidth-b;if(o<b){var g=o-b;o-=g,i.vertical+=g}else if(A>f){var d=A-f;o-=d,i.vertical+=d}if(s<b){var p=s-b;s-=p,i.horizontal+=p}else if(c>h){var v=c-h;s-=v,i.horizontal+=v}return{top:"".concat(Math.round(o),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:Ne(i)}}),[r,u,G,H,Y,b]),z=c.useCallback((function(){var e=U.current;if(e){var t=J(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[J]),K=c.useCallback((function(e){U.current=O.findDOMNode(e)}),[]);c.useEffect((function(){_&&z()})),c.useImperativeHandle(n,(function(){return _?{updatePosition:function(){z()}}:null}),[_,z]),c.useEffect((function(){if(_){var e=oe((function(){z()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("rezise",e)}}}),[_,z]);var W=F;"auto"!==F||M.muiSupportAuto||(W=void 0);var V=h||(r?Object(se.a)(Fe(r)).body:void 0);return c.createElement(xe,Object(d.a)({container:V,open:_,ref:t,BackdropProps:{invisible:!0},className:Object(p.a)(l.root,f)},P),c.createElement(M,Object(d.a)({appear:!0,in:_,onEnter:E,onEntered:C,onExit:w,onExited:Q,onExiting:k,timeout:W},L,{onEntering:Object(Ae.a)((function(e,t){B&&B(e,t),z()}),L.onEntering)}),c.createElement(q.a,Object(d.a)({elevation:y,ref:K},S,{className:Object(p.a)(l.paper,S.className)}),A)))})),Le=Object(v.a)({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(Te),Pe=n(895),Ue=n(115),Ge={vertical:"top",horizontal:"right"},qe={vertical:"top",horizontal:"left"},He=c.forwardRef((function(e,t){var n=e.autoFocus,r=void 0===n||n,i=e.children,a=e.classes,o=e.disableAutoFocusItem,s=void 0!==o&&o,u=e.MenuListProps,A=void 0===u?{}:u,l=e.onClose,f=e.onEntering,h=e.open,v=e.PaperProps,y=void 0===v?{}:v,m=e.PopoverClasses,I=e.transitionDuration,b=void 0===I?"auto":I,E=e.variant,C=void 0===E?"selectedMenu":E,B=Object(g.a)(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","variant"]),w=Object(P.a)(),Q=r&&!s&&h,k=c.useRef(null),_=c.useRef(null),x=-1;c.Children.map(i,(function(e,t){c.isValidElement(e)&&(e.props.disabled||("menu"!==C&&e.props.selected||-1===x)&&(x=t))}));var S=c.Children.map(i,(function(e,t){return t===x?c.cloneElement(e,{ref:function(t){_.current=O.findDOMNode(t),Object(Ue.a)(e.ref,t)}}):e}));return c.createElement(Le,Object(d.a)({getContentAnchorEl:function(){return _.current},classes:m,onClose:l,onEntering:function(e,t){k.current&&k.current.adjustStyleForScrollbar(e,w),f&&f(e,t)},anchorOrigin:"rtl"===w.direction?Ge:qe,transformOrigin:"rtl"===w.direction?Ge:qe,PaperProps:Object(d.a)({},y,{classes:Object(d.a)({},y.classes,{root:a.paper})}),open:h,ref:t,transitionDuration:b},B),c.createElement(Pe.a,Object(d.a)({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),l&&l(e,"tabKeyDown"))},actions:k,autoFocus:r&&(-1===x||s),autoFocusItem:Q,variant:C},A,{className:Object(p.a)(a.list,A.className)}),S))})),Ye=Object(v.a)({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(He);function Je(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function ze(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(Je(e.value)&&""!==e.value||t&&Je(e.defaultValue)&&""!==e.defaultValue)}function Ke(e,t){return"object"===Object(ae.a)(t)&&null!==t?e===t:String(e)===String(t)}var We=c.forwardRef((function(e,t){var n=e.autoFocus,r=e.autoWidth,i=e.children,a=e.classes,o=e.className,s=e.defaultValue,u=e.disabled,A=e.displayEmpty,l=e.IconComponent,f=e.inputRef,h=e.labelId,v=e.MenuProps,y=void 0===v?{}:v,m=e.multiple,b=e.name,E=e.onBlur,C=e.onChange,B=e.onClose,w=e.onFocus,Q=e.onOpen,k=e.open,x=e.readOnly,S=e.renderValue,O=(e.required,e.SelectDisplayProps),D=void 0===O?{}:O,R=e.tabIndex,j=(e.type,e.value),M=e.variant,N=void 0===M?"standard":M,F=Object(g.a)(e,["autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","required","SelectDisplayProps","tabIndex","type","value","variant"]),T=Object(Y.a)({controlled:j,default:s,name:"SelectInput"}),L=Object(_.a)(T,2),P=L[0],U=L[1],G=c.useRef(null),q=c.useState(null),H=q[0],J=q[1],z=c.useRef(null!=k).current,K=c.useState(),W=K[0],V=K[1],X=c.useState(!1),Z=X[0],$=X[1],ee=Object(he.a)(t,f);c.useImperativeHandle(ee,(function(){return{focus:function(){H.focus()},node:G.current,value:P}}),[H,P]),c.useEffect((function(){n&&H&&H.focus()}),[n,H]);var te,ne,re=function(e,t){e?Q&&Q(t):B&&B(t),z||(V(r?null:H.clientWidth),$(e))},ae=function(e){return function(t){var n;if(m||re(!1,t),m){n=Array.isArray(P)?Object(ie.a)(P):[];var r=P.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;U(n),C&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:n,name:b}}),C(t,e))}},oe=null!==H&&(z?k:Z);delete F["aria-invalid"];var se=[],ue=!1;(ze({value:P})||A)&&(S?te=S(P):ue=!0);var Ae=c.Children.map(i,(function(e){if(!c.isValidElement(e))return null;var t;if(m){if(!Array.isArray(P))throw new Error("Material-UI: the `value` prop must be an array when using the `Select` component with `multiple`.");(t=P.some((function(t){return Ke(t,e.props.value)})))&&ue&&se.push(e.props.children)}else(t=Ke(P,e.props.value))&&ue&&(ne=e.props.children);return t&&!0,c.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:ae(e),onKeyUp:function(t){" "===t.key&&t.preventDefault();var n=e.props.onKeyUp;"function"===typeof n&&n(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));ue&&(te=m?se.join(", "):ne);var ce,le=W;!r&&z&&H&&(le=H.clientWidth),ce="undefined"!==typeof R?R:u?null:0;var fe=D.id||(b?"mui-component-select-".concat(b):void 0);return c.createElement(c.Fragment,null,c.createElement("div",Object(d.a)({className:Object(p.a)(a.root,a.select,a.selectMenu,a[N],o,u&&a.disabled),ref:J,tabIndex:ce,role:"button","aria-expanded":oe?"true":void 0,"aria-labelledby":"".concat(h||""," ").concat(fe||""),"aria-haspopup":"listbox",onKeyDown:function(e){if(!x){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),re(!0,e))}},onMouseDown:u||x?null:function(e){0===e.button&&(e.preventDefault(),H.focus(),re(!0,e))},onBlur:function(e){!oe&&E&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:P,name:b}}),E(e))},onFocus:w},D,{id:fe}),function(e){return null==e||"string"===typeof e&&!e.trim()}(te)?c.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):te),c.createElement("input",Object(d.a)({value:Array.isArray(P)?P.join(","):P,name:b,ref:G,type:"hidden",autoFocus:n},F)),c.createElement(l,{className:Object(p.a)(a.icon,a["icon".concat(Object(I.a)(N))],oe&&a.iconOpen)}),c.createElement(Ye,Object(d.a)({id:"menu-".concat(b||""),anchorEl:H,open:oe,onClose:function(e){re(!1,e)}},y,{MenuListProps:Object(d.a)({"aria-labelledby":h,role:"listbox",disableListWrap:!0},y.MenuListProps),PaperProps:Object(d.a)({},y.PaperProps,{style:Object(d.a)({minWidth:le},null!=y.PaperProps?y.PaperProps.style:null)})}),Ae))}));function Ve(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e}),{})}var Xe=n(375),Ze=n(374),$e=Object(Ze.a)(c.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),et=n(540);function tt(e,t){return parseInt(e[t],10)||0}var nt="undefined"!==typeof window?c.useLayoutEffect:c.useEffect,rt={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"},it=c.forwardRef((function(e,t){var n=e.onChange,r=e.rows,i=e.rowsMax,a=e.rowsMin,o=void 0===a?1:a,s=e.style,u=e.value,A=Object(g.a)(e,["onChange","rows","rowsMax","rowsMin","style","value"]),l=r||o,f=c.useRef(null!=u).current,h=c.useRef(null),p=Object(he.a)(t,h),v=c.useRef(null),y=c.useRef(0),m=c.useState({}),I=m[0],b=m[1],E=c.useCallback((function(){var t=h.current,n=window.getComputedStyle(t),r=v.current;r.style.width=n.width,r.value=t.value||e.placeholder||"x";var a=n["box-sizing"],o=tt(n,"padding-bottom")+tt(n,"padding-top"),s=tt(n,"border-bottom-width")+tt(n,"border-top-width"),u=r.scrollHeight-o;r.value="x";var A=r.scrollHeight-o,c=u;l&&(c=Math.max(Number(l)*A,c)),i&&(c=Math.min(Number(i)*A,c));var f=(c=Math.max(c,A))+("border-box"===a?o+s:0),g=Math.abs(c-u)<=1;b((function(e){return y.current<20&&(f>0&&Math.abs((e.outerHeightStyle||0)-f)>1||e.overflow!==g)?(y.current+=1,{overflow:g,outerHeightStyle:f}):e}))}),[i,l,e.placeholder]);c.useEffect((function(){var e=oe((function(){y.current=0,E()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[E]),nt((function(){E()})),c.useEffect((function(){y.current=0}),[u]);return c.createElement(c.Fragment,null,c.createElement("textarea",Object(d.a)({value:u,onChange:function(e){y.current=0,f||E(),n&&n(e)},ref:p,rows:l,style:Object(d.a)({height:I.outerHeightStyle,overflow:I.overflow?"hidden":null},s)},A)),c.createElement("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:v,tabIndex:-1,style:Object(d.a)({},rt,{},s)}))})),at="undefined"===typeof window?c.useEffect:c.useLayoutEffect,ot=c.forwardRef((function(e,t){var n=e["aria-describedby"],r=e.autoComplete,i=e.autoFocus,a=e.classes,o=e.className,s=(e.color,e.defaultValue),u=e.disabled,A=e.endAdornment,l=(e.error,e.fullWidth),f=void 0!==l&&l,h=e.id,v=e.inputComponent,y=void 0===v?"input":v,m=e.inputProps,b=void 0===m?{}:m,E=e.inputRef,C=(e.margin,e.multiline),B=void 0!==C&&C,w=e.name,Q=e.onBlur,k=e.onChange,_=e.onClick,x=e.onFocus,S=e.onKeyDown,O=e.onKeyUp,D=e.placeholder,R=e.readOnly,j=e.renderSuffix,M=e.rows,N=e.rowsMax,F=e.rowsMin,T=e.startAdornment,L=e.type,P=void 0===L?"text":L,U=e.value,G=Object(g.a)(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","startAdornment","type","value"]),q=null!=b.value?b.value:U,H=c.useRef(null!=q).current,Y=c.useRef(),J=c.useCallback((function(e){0}),[]),z=Object(he.a)(b.ref,J),K=Object(he.a)(E,z),W=Object(he.a)(Y,K),V=c.useState(!1),X=V[0],Z=V[1],$=Object(et.b)();var ee=Ve({props:e,muiFormControl:$,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});ee.focused=$?$.focused:X,c.useEffect((function(){!$&&u&&X&&(Z(!1),Q&&Q())}),[$,u,X,Q]);var te=$&&$.onFilled,ne=$&&$.onEmpty,re=c.useCallback((function(e){ze(e)?te&&te():ne&&ne()}),[te,ne]);at((function(){H&&re({value:q})}),[q,re,H]);c.useEffect((function(){re(Y.current)}),[]);var ie=y,ae=Object(d.a)({},b,{ref:W});"string"!==typeof ie?ae=Object(d.a)({inputRef:W,type:P},ae,{ref:null}):B?!M||N||F?(ae=Object(d.a)({rows:M,rowsMax:N},ae),ie=it):ie="textarea":ae=Object(d.a)({type:P},ae);return c.useEffect((function(){$&&$.setAdornedStart(Boolean(T))}),[$,T]),c.createElement("div",Object(d.a)({className:Object(p.a)(a.root,a["color".concat(Object(I.a)(ee.color||"primary"))],o,ee.disabled&&a.disabled,ee.error&&a.error,f&&a.fullWidth,ee.focused&&a.focused,$&&a.formControl,B&&a.multiline,T&&a.adornedStart,A&&a.adornedEnd,"dense"===ee.margin&&a.marginDense),onClick:function(e){Y.current&&e.currentTarget===e.target&&Y.current.focus(),_&&_(e)},ref:t},G),T,c.createElement(et.a.Provider,{value:null},c.createElement(ie,Object(d.a)({"aria-invalid":ee.error,"aria-describedby":n,autoComplete:r,autoFocus:i,defaultValue:s,disabled:ee.disabled,id:h,onAnimationStart:function(e){re("mui-auto-fill-cancel"===e.animationName?Y.current:{value:"x"})},name:w,placeholder:D,readOnly:R,required:ee.required,rows:M,value:q,onKeyDown:S,onKeyUp:O},ae,{className:Object(p.a)(a.input,b.className,ee.disabled&&a.disabled,B&&a.inputMultiline,ee.hiddenLabel&&a.inputHiddenLabel,T&&a.inputAdornedStart,A&&a.inputAdornedEnd,"search"===P&&a.inputTypeSearch,"dense"===ee.margin&&a.inputMarginDense),onBlur:function(e){Q&&Q(e),b.onBlur&&b.onBlur(e),$&&$.onBlur?$.onBlur(e):Z(!1)},onChange:function(e){if(!H){var t=e.target||Y.current;if(null==t)throw new TypeError("Material-UI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://material-ui.com/r/input-component-ref-interface for more info.");re({value:t.value})}for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];b.onChange&&b.onChange.apply(b,[e].concat(r)),k&&k.apply(void 0,[e].concat(r))},onFocus:function(e){ee.disabled?e.stopPropagation():(x&&x(e),b.onFocus&&b.onFocus(e),$&&$.onFocus?$.onFocus(e):Z(!0))}}))),A,j?j(Object(d.a)({},ee,{startAdornment:T})):null)})),st=Object(v.a)((function(e){var t="light"===e.palette.type,n={color:"currentColor",opacity:t?.42:.5,transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},i={opacity:t?.42:.5};return{"@global":{"@keyframes mui-auto-fill":{from:{}},"@keyframes mui-auto-fill-cancel":{from:{}}},root:Object(d.a)({},e.typography.body1,{color:e.palette.text.primary,lineHeight:"1.1875em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center","&$disabled":{color:e.palette.text.disabled,cursor:"default"}}),formControl:{},focused:{},disabled:{},adornedStart:{},adornedEnd:{},error:{},marginDense:{},multiline:{padding:"".concat(6,"px 0 ").concat(7,"px"),"&$marginDense":{paddingTop:3}},colorSecondary:{},fullWidth:{width:"100%"},input:{font:"inherit",color:"currentColor",padding:"".concat(6,"px 0 ").concat(7,"px"),border:0,boxSizing:"content-box",background:"none",height:"1.1875em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{"-webkit-appearance":"none"},"label[data-shrink=false] + $formControl &":{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},"&$disabled":{opacity:1},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},inputMarginDense:{paddingTop:3},inputMultiline:{height:"auto",resize:"none",padding:0},inputTypeSearch:{"-moz-appearance":"textfield","-webkit-appearance":"textfield"},inputAdornedStart:{},inputAdornedEnd:{},inputHiddenLabel:{}}}),{name:"MuiInputBase"})(ot),ut=c.forwardRef((function(e,t){var n=e.disableUnderline,r=e.classes,i=e.fullWidth,a=void 0!==i&&i,o=e.inputComponent,s=void 0===o?"input":o,u=e.multiline,A=void 0!==u&&u,l=e.type,f=void 0===l?"text":l,h=Object(g.a)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return c.createElement(st,Object(d.a)({classes:Object(d.a)({},r,{root:Object(p.a)(r.root,!n&&r.underline),underline:null}),fullWidth:a,inputComponent:s,multiline:A,ref:t,type:f},h))}));ut.muiName="Input";var At=Object(v.a)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(t),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(t)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}}),{name:"MuiInput"})(ut),ct=c.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.disabled,a=e.IconComponent,o=e.inputRef,s=e.variant,u=void 0===s?"standard":s,A=Object(g.a)(e,["classes","className","disabled","IconComponent","inputRef","variant"]);return c.createElement(c.Fragment,null,c.createElement("select",Object(d.a)({className:Object(p.a)(n.root,n.select,n[u],r,i&&n.disabled),disabled:i,ref:o||t},A)),e.multiple?null:c.createElement(a,{className:Object(p.a)(n.icon,n["icon".concat(Object(I.a)(u))])}))})),lt=function(e){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:e.palette.background.paper},"&&":{paddingRight:24}},filled:{"&&":{paddingRight:32}},outlined:{borderRadius:e.shape.borderRadius,"&&":{paddingRight:32}},selectMenu:{height:"auto",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",color:e.palette.action.active,pointerEvents:"none"},iconOpen:{transform:"rotate(180deg)"},iconFilled:{right:7},iconOutlined:{right:7}}},ft=c.createElement(At,null),ht=c.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.IconComponent,a=void 0===i?$e:i,o=e.input,s=void 0===o?ft:o,u=e.inputProps,A=(e.variant,Object(g.a)(e,["children","classes","IconComponent","input","inputProps","variant"])),l=Ve({props:e,muiFormControl:Object(Xe.a)(),states:["variant"]});return c.cloneElement(s,Object(d.a)({inputComponent:ct,inputProps:Object(d.a)({children:n,classes:r,IconComponent:a,variant:l.variant,type:void 0},u,{},s?s.props.inputProps:{}),ref:t},A))}));ht.muiName="Select";Object(v.a)(lt,{name:"MuiNativeSelect"})(ht);var gt=c.forwardRef((function(e,t){var n=e.disableUnderline,r=e.classes,i=e.fullWidth,a=void 0!==i&&i,o=e.inputComponent,s=void 0===o?"input":o,u=e.multiline,A=void 0!==u&&u,l=e.type,f=void 0===l?"text":l,h=Object(g.a)(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return c.createElement(st,Object(d.a)({classes:Object(d.a)({},r,{root:Object(p.a)(r.root,!n&&r.underline),underline:null}),fullWidth:a,inputComponent:s,multiline:A,ref:t,type:f},h))}));gt.muiName="Input";var dt=Object(v.a)((function(e){var t="light"===e.palette.type,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:r,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:t?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:r}},"&$focused":{backgroundColor:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(n),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(e.palette.text.primary)},"&$disabled:before":{borderBottomStyle:"dotted"}},focused:{},disabled:{},adornedStart:{paddingLeft:12},adornedEnd:{paddingRight:12},error:{},marginDense:{},multiline:{padding:"27px 12px 10px","&$marginDense":{paddingTop:23,paddingBottom:6}},input:{padding:"27px 12px 10px","&:-webkit-autofill":{WebkitBoxShadow:"dark"===e.palette.type?"0 0 0 100px #266798 inset":null,WebkitTextFillColor:"dark"===e.palette.type?"#fff":null,borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},inputMarginDense:{paddingTop:23,paddingBottom:6},inputHiddenLabel:{paddingTop:18,paddingBottom:19,"&$inputMarginDense":{paddingTop:10,paddingBottom:11}},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiFilledInput"})(gt),pt=n(1),vt=c.forwardRef((function(e,t){e.children;var n=e.classes,r=e.className,i=e.label,a=e.labelWidth,o=e.notched,s=e.style,u=Object(g.a)(e,["children","classes","className","label","labelWidth","notched","style"]),A="rtl"===Object(P.a)().direction?"right":"left";if(void 0!==i)return c.createElement("fieldset",Object(d.a)({"aria-hidden":!0,className:Object(p.a)(n.root,r),ref:t,style:s},u),c.createElement("legend",{className:Object(p.a)(n.legendLabelled,o&&n.legendNotched)},i?c.createElement("span",null,i):c.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})));var l=a>0?.75*a+8:.01;return c.createElement("fieldset",Object(d.a)({"aria-hidden":!0,style:Object(d.a)(Object(pt.a)({},"padding".concat(Object(I.a)(A)),8),s),className:Object(p.a)(n.root,r),ref:t},u),c.createElement("legend",{className:n.legend,style:{width:o?l:.01}},c.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})))})),yt=Object(v.a)((function(e){return{root:{position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:0,paddingLeft:8,pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},legendLabelled:{display:"block",width:"auto",textAlign:"left",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),"& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},legendNotched:{maxWidth:1e3,transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}}),{name:"PrivateNotchedOutline"})(vt),mt=c.forwardRef((function(e,t){var n=e.classes,r=e.fullWidth,i=void 0!==r&&r,a=e.inputComponent,o=void 0===a?"input":a,s=e.label,u=e.labelWidth,A=void 0===u?0:u,l=e.multiline,f=void 0!==l&&l,h=e.notched,v=e.type,y=void 0===v?"text":v,m=Object(g.a)(e,["classes","fullWidth","inputComponent","label","labelWidth","multiline","notched","type"]);return c.createElement(st,Object(d.a)({renderSuffix:function(e){return c.createElement(yt,{className:n.notchedOutline,label:s,labelWidth:A,notched:"undefined"!==typeof h?h:Boolean(e.startAdornment||e.filled||e.focused)})},classes:Object(d.a)({},n,{root:Object(p.a)(n.root,n.underline),notchedOutline:null}),fullWidth:i,inputComponent:o,multiline:f,ref:t,type:y},m))}));mt.muiName="Input";var It=Object(v.a)((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:e.shape.borderRadius,"&:hover $notchedOutline":{borderColor:e.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:t}},"&$focused $notchedOutline":{borderColor:e.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:e.palette.error.main},"&$disabled $notchedOutline":{borderColor:e.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:e.palette.secondary.main}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},marginDense:{},multiline:{padding:"18.5px 14px","&$marginDense":{paddingTop:10.5,paddingBottom:10.5}},notchedOutline:{borderColor:t},input:{padding:"18.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"dark"===e.palette.type?"0 0 0 100px #266798 inset":null,WebkitTextFillColor:"dark"===e.palette.type?"#fff":null,borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiOutlinedInput"})(mt),bt=lt,Et=c.createElement(At,null),Ct=c.createElement(dt,null),Bt=c.forwardRef((function e(t,n){var r=t.autoWidth,i=void 0!==r&&r,a=t.children,o=t.classes,s=t.displayEmpty,u=void 0!==s&&s,A=t.IconComponent,l=void 0===A?$e:A,f=t.id,h=t.input,p=t.inputProps,v=t.label,y=t.labelId,m=t.labelWidth,I=void 0===m?0:m,b=t.MenuProps,E=t.multiple,C=void 0!==E&&E,B=t.native,w=void 0!==B&&B,Q=t.onClose,k=t.onOpen,_=t.open,x=t.renderValue,S=t.SelectDisplayProps,O=t.variant,D=void 0===O?"standard":O,R=Object(g.a)(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","label","labelId","labelWidth","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"]),j=w?ct:We,M=Ve({props:t,muiFormControl:Object(Xe.a)(),states:["variant"]}).variant||D,N=h||{standard:Et,outlined:c.createElement(It,{label:v,labelWidth:I}),filled:Ct}[M];return c.cloneElement(N,Object(d.a)({inputComponent:j,inputProps:Object(d.a)({children:a,IconComponent:l,variant:M,type:void 0,multiple:C},w?{id:f}:{autoWidth:i,displayEmpty:u,labelId:y,MenuProps:b,onClose:Q,onOpen:k,open:_,renderValue:x,SelectDisplayProps:Object(d.a)({id:f},S)},{},p,{classes:p?Object(re.a)({baseClasses:o,newClasses:p.classes,Component:e}):o},h?h.props.inputProps:{}),ref:n},R))}));Bt.muiName="Select";var wt=Object(v.a)(bt,{name:"MuiSelect"})(Bt),Qt=n(273),kt=n.n(Qt),_t=n(97),xt=n.n(_t),St=n(396),Ot=n(1069),Dt=n.n(Ot),Rt=n(894),jt=n(242),Mt=n(1068),Nt=n.n(Mt),Ft=n(85),Tt=Object(St.a)((function(e){return{container:{width:"70px",height:"40px",display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"},button:{padding:"3px",width:"16px"},icon:{width:"17px",height:"17px",stroke:e.palette.action.selected,"stroke-width":"1px"}}})),Lt=function(e){var t=e.handleChange,n=Tt();return l.a.createElement("div",{className:n.container,"aria-label":"color-swatch"},Ft.e.map((function(e){return l.a.createElement(K.a,{className:n.button,key:e,onClick:function(){return t(e)}},l.a.createElement(Nt.a,{fontSize:"small",style:{color:"rgb(".concat(e,")")},className:n.icon}))})))},Pt=Object(St.a)((function(){return{menuButton:{backgroundColor:"transparent"},colors:{"&:hover":{backgroundColor:"transparent"},paddingLeft:"2px",paddingRight:"2px"}}}));var Ut=function(e){var t=e.handlePropertyChange,n=e.handleChannelRemove,r=e.handleIQRUpdate,i=Object(c.useReducer)((function(e){return!e}),!1),a=Object(u.a)(i,2),o=a[0],s=a[1],A=Pt();return l.a.createElement(jt.b,{open:o,toggle:s,buttonIcon:l.a.createElement(Dt.a,{fontSize:"small"}),buttonClassName:A.menuButton},l.a.createElement(Rt.a,{dense:!0,disableGutters:!0,onClick:function(){s(),n()}},l.a.createElement(jt.a,null,"Remove")),l.a.createElement(Rt.a,{dense:!0,disableGutters:!0,onClick:r},l.a.createElement(jt.a,null,"Use IQR")),l.a.createElement(Rt.a,{dense:!0,disableGutters:!0,className:A.colors},l.a.createElement(Lt,{handleChange:function(e){t("color",e)}})))};function Gt(e){var t=5;Number.isInteger(e)||--t,e<1&&--t;var n=Intl.NumberFormat("en-US",{maximumSignificantDigits:t,useGrouping:!1}).format(e);return n.length<=5?n:e.toExponential(0)}function qt(e){var t=e.handleChange,n=e.disableOptions,r=e.channelOptions,i=e.selectionIndex;return l.a.createElement(wt,{native:!0,value:i,onChange:function(e){return t(Number(e.target.value))}},r.map((function(e,t){return l.a.createElement("option",{disabled:n,key:e,value:t},e)})))}function Ht(e){var t=e.color,n=e.slider,r=void 0===n?[0,0]:n,i=e.handleChange,a=e.domain,o=void 0===a?[0,0]:a,s=e.dtype,A=Object(u.a)(o,2),f=A[0],h=A[1],g=Object(c.useCallback)(kt()(i,3,{trailing:!0}),[i]),d=h-f<500&&"<f4"===s?(h-f)/500:1;return l.a.createElement(ne.a,{value:r,valueLabelFormat:Gt,onChange:function(e,t){return g(t)},valueLabelDisplay:"auto",getAriaLabel:function(){return"".concat(t,"-").concat(r)},min:f,max:h,step:d,orientation:"horizontal",style:{color:t,marginTop:"7px"}})}function Yt(e){var t=e.color,n=e.checked,r=e.toggle;return l.a.createElement(te.a,{onChange:r,checked:n,style:{color:t,"&$checked":{color:t}}})}var Jt=function(e){var t=e.visibility,n=void 0!==t&&t,r=e.slider,i=e.color,a=e.channels,A=e.channelId,g=e.domainType,d=e.dimName,p=e.theme,v=e.loader,y=e.colormapOn,m=e.channelOptions,I=e.handlePropertyChange,b=e.handleChannelRemove,E=e.handleIQRUpdate,C=e.selectionIndex,B=e.disableOptions,w=void 0!==B&&B,Q=v.dtype,k=Object(c.useState)(null),_=Object(u.a)(k,2),x=_[0],S=_[1],O=Object(c.useState)(null),D=Object(u.a)(O,2),R=D[0],j=D[1],M=Object(c.useState)([Object(s.a)({},a[A].selection)]),N=Object(u.a)(M,2),F=N[0],T=N[1],L=function(e,t,n){var r=e||"light"===n&&t.every((function(e){return 255===e}))?[220,220,220]:t;return"rgb(".concat(r,")")}(y,i,p);return Object(c.useEffect)((function(){var e=!0;if(Q&&v&&a){var t=[Object(s.a)({},a[A].selection)],n=g!==R,r=!xt()(t,F);if(n||r)if("Full"===g){var i=[[0,f.DTYPE_VALUES[Q].max]],o=Object(u.a)(i,1)[0];e&&(S(o),j(g),r&&T(t))}else Object(f.getChannelStats)({loader:v,loaderSelection:t}).then((function(n){var i=n.map((function(e){return e.domain})),a=Object(u.a)(i,1)[0];e&&(S(a),j(g),r&&T(t))}))}return function(){e=!1}}),[R,a,A,v,Q,g,F]),l.a.createElement(h.a,{container:!0,direction:"column",m:1,justify:"center"},l.a.createElement(h.a,{container:!0,direction:"row",justify:"space-between"},l.a.createElement(h.a,{item:!0,xs:10},l.a.createElement(qt,{handleChange:function(e){return I("selection",function(e){return Object(o.a)({},d,e)}(e))},selectionIndex:C,disableOptions:w,channelOptions:m})),l.a.createElement(h.a,{item:!0,xs:1,style:{marginTop:"4px"}},l.a.createElement(Ut,{handlePropertyChange:I,handleChannelRemove:b,handleIQRUpdate:E}))),l.a.createElement(h.a,{container:!0,direction:"row",justify:"space-between"},l.a.createElement(h.a,{item:!0,xs:2},l.a.createElement(Yt,{color:L,checked:n,toggle:function(){return I("visible",!n)}})),l.a.createElement(h.a,{item:!0,xs:9},x&&l.a.createElement(Ht,{color:L,slider:r,domain:x,dtype:Q,handleChange:function(e){return I("slider",e)}}))))},zt=c.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,a=(e.color,e.component),o=void 0===a?"label":a,s=(e.disabled,e.error,e.filled,e.focused,e.required,Object(g.a)(e,["children","classes","className","color","component","disabled","error","filled","focused","required"])),u=Ve({props:e,muiFormControl:Object(Xe.a)(),states:["color","required","focused","disabled","error","filled"]});return c.createElement(o,Object(d.a)({className:Object(p.a)(r.root,r["color".concat(Object(I.a)(u.color||"primary"))],i,u.disabled&&r.disabled,u.error&&r.error,u.filled&&r.filled,u.focused&&r.focused,u.required&&r.required),ref:t},s),n,u.required&&c.createElement("span",{className:Object(p.a)(r.asterisk,u.error&&r.error)},"\u2009","*"))})),Kt=Object(v.a)((function(e){return{root:Object(d.a)({color:e.palette.text.secondary},e.typography.body1,{lineHeight:1,padding:0,"&$focused":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),colorSecondary:{"&$focused":{color:e.palette.secondary.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:e.palette.error.main}}}}),{name:"MuiFormLabel"})(zt),Wt=c.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.disableAnimation,a=void 0!==i&&i,o=(e.margin,e.shrink),s=(e.variant,Object(g.a)(e,["classes","className","disableAnimation","margin","shrink","variant"])),u=Object(Xe.a)(),A=o;"undefined"===typeof A&&u&&(A=u.filled||u.focused||u.adornedStart);var l=Ve({props:e,muiFormControl:u,states:["margin","variant"]});return c.createElement(Kt,Object(d.a)({"data-shrink":A,className:Object(p.a)(n.root,r,u&&n.formControl,!a&&n.animated,A&&n.shrink,"dense"===l.margin&&n.marginDense,{filled:n.filled,outlined:n.outlined}[l.variant]),classes:{focused:n.focused,disabled:n.disabled,error:n.error,required:n.required,asterisk:n.asterisk},ref:t},s))})),Vt=Object(v.a)((function(e){return{root:{display:"block",transformOrigin:"top left"},focused:{},disabled:{},error:{},required:{},asterisk:{},formControl:{position:"absolute",left:0,top:0,transform:"translate(0, 24px) scale(1)"},marginDense:{transform:"translate(0, 21px) scale(1)"},shrink:{transform:"translate(0, 1.5px) scale(0.75)",transformOrigin:"top left"},animated:{transition:e.transitions.create(["color","transform"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},filled:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 20px) scale(1)","&$marginDense":{transform:"translate(12px, 17px) scale(1)"},"&$shrink":{transform:"translate(12px, 10px) scale(0.75)","&$marginDense":{transform:"translate(12px, 7px) scale(0.75)"}}},outlined:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 20px) scale(1)","&$marginDense":{transform:"translate(14px, 12px) scale(1)"},"&$shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}}),{name:"MuiInputLabel"})(Wt),Xt=n(125),Zt=["Full","Min/Max"];function $t(e){var t=e.value,n=e.inputId,r=e.handleChange;return l.a.createElement(wt,{native:!0,onChange:function(e){return r(""===e.target.value?null:e.target.value)},value:t,inputProps:{name:"colormap",id:n},style:{width:"100%"}},l.a.createElement("option",{"aria-label":"None",value:""},"None"),Ft.a.map((function(e){return l.a.createElement("option",{key:e,value:e},e)})))}function en(e){var t=e.value,n=e.handleChange;return l.a.createElement(ne.a,{value:t,onChange:function(e,t){return n(t)},valueLabelDisplay:"auto",getAriaLabel:function(){return"opacity slider"},min:0,max:1,step:.01,orientation:"horizontal",style:{marginTop:"7px"}})}function tn(e){var t=e.value,n=e.inputId,r=e.handleChange;return l.a.createElement(wt,{native:!0,onChange:function(e){return r(e.target.value)},value:t,inputProps:{name:"domain-selector",id:n},style:{width:"100%"}},Zt.map((function(e){return l.a.createElement("option",{key:e,value:e},e)})))}function nn(e){var t=e.field,n=e.value,r=e.handleChange,i=e.possibleValues;return l.a.createElement(ne.a,{value:n,onChange:function(e,n){r({selection:Object(o.a)({},t,n),event:e})},onChangeCommitted:function(e,n){r({selection:Object(o.a)({},t,n),event:e})},valueLabelDisplay:"auto",getAriaLabel:function(){return"".concat(t," slider")},marks:i.map((function(e){return{value:e}})),min:Number(i[0]),max:Number(i.slice(-1)),orientation:"horizontal",style:{marginTop:"7px"},step:null})}function rn(e){var t=e.name,n=e.inputId,r=e.children;return l.a.createElement(h.a,{container:!0,direction:"row",alignItems:"flex-start",justify:"space-between"},l.a.createElement(h.a,{item:!0,xs:6},l.a.createElement(Vt,{htmlFor:n},t,":")),l.a.createElement(h.a,{item:!0,xs:6},r))}var an=function(e){var t=e.colormap,n=e.opacity,r=e.handleColormapChange,i=e.handleOpacityChange,a=e.globalControlDimensions,o=e.globalDimensionValues,s=e.handleGlobalChannelsSelectionChange,u=e.handleDomainChange,A=e.channels,c=e.dimensions,f=e.domainType,g=e.isRgb,d=c.length>0&&A.length>0;return l.a.createElement(h.a,{container:!0,direction:"column",style:{width:"100%"}},g?null:l.a.createElement(l.a.Fragment,null,l.a.createElement(h.a,{item:!0},l.a.createElement(rn,{name:"Colormap",inputId:"colormap-select"},l.a.createElement($t,{value:t||"",inputId:"colormap-select",handleChange:r}))),l.a.createElement(h.a,{item:!0},l.a.createElement(rn,{name:"Domain",inputId:"domain-selector"},l.a.createElement(tn,{value:f||Xt.e,handleChange:function(e){u(e)}})))),l.a.createElement(h.a,{item:!0},l.a.createElement(rn,{name:"Opacity",inputId:"opacity-slider"},l.a.createElement(en,{value:n,handleChange:i}))),d&&a.map((function(e){var t=e.field,n=e.values;return n.length>1&&l.a.createElement(rn,{name:t,inputId:"".concat(t,"-slider"),key:t},l.a.createElement(nn,{field:t,value:o[t],handleChange:s,possibleValues:n}))})))},on=n(766);function sn(e,t,n){return un.apply(this,arguments)}function un(){return(un=Object(A.a)(i.a.mark((function e(t,n,r){var a,o,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(f.getChannelStats)({loader:t,loaderSelection:n});case 2:return o=e.sent,s=o.map((function(e){return e.autoSliders})),"Min/Max"===r&&(a=o.map((function(e){return e.domain}))),"Full"===r&&(a=n.map((function(){return[0,f.DTYPE_VALUES[t.dtype].max]}))),e.abrupt("return",{domains:a,sliders:s});case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}n.d(t,"a",(function(){return cn}));var An={borderStyle:"dashed",marginTop:"10px",fontWeight:400};function cn(e){var t,n=e.layer,r=e.name,g=e.loader,d=e.theme,p=e.handleLayerRemove,v=e.handleLayerChange,y=n.colormap,m=n.opacity,I=n.channels,b=(null===(t=I[0])||void 0===t?void 0:t.selection)||{},C=g.dimensions,w=Object(c.useState)(n.domainType),Q=Object(u.a)(w,2),k=Q[0],_=Q[1],x=Object(c.useState)(Xt.g.filter((function(e){return b[e]})).reduce((function(e,t){return Object(s.a)({},e,Object(o.a)({},t,b[t]))}),{})),S=Object(u.a)(x,2),O=S[0],D=S[1];function R(e,t){v(Object(s.a)({},n,{channels:e,domainType:t}))}function j(e,t){var r=Object(a.a)(I);r[t]=e,v(Object(s.a)({},n,{channels:r}))}function M(e){var t=[].concat(Object(a.a)(I),[e]);v(Object(s.a)({},n,{channels:t}))}var N=function(){var e=Object(A.a)(i.a.mark((function e(){var t,n,r,a,o,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={},C.forEach((function(e){t[e.field]=Xt.g.includes(e.field)?O[e.field]:0})),e.next=4,sn(g,[t],k);case 4:n=e.sent,r=n.domains,a=n.sliders,o=r[0],s=a[0]||o,!0,M({selection:t,slider:s,visible:!0,color:[255,255,255]});case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=function(){var e=Object(A.a)(i.a.mark((function e(t){var n,r,a,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _(t),n=I.map((function(e){return e.selection})),r=I.map((function(e){return e.slider})),e.next=5,sn(g,n,t);case 5:a=e.sent,o=a.domains,r=r.map((function(e,t){var n=Object(u.a)(e,2),r=n[0],i=n[1];return[Math.max(r,o[t][0]),Math.min(i,o[t][1])]})),R(I.map((function(e,t){return Object(s.a)({},e,{slider:r[t]})})),t);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),T=function(){var e=Object(A.a)(i.a.mark((function e(t){var r,a,o,u,A,c,l;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.selection,a=t.event,o=I.map((function(e){return Object(s.a)({},e.selection,{},r)})),!(u="mouseup"===a.type)){e.next=9;break}return e.next=6,sn(g,o,k);case 6:e.t0=e.sent,e.next=10;break;case 9:e.t0={domains:[],sliders:[]};case 10:A=e.t0,c=A.sliders,u&&(l=I.map((function(e,t){return Object(s.a)({},e,{slider:c[t],selection:Object(s.a)({},e.selection,{},r)})})),i=l,v(Object(s.a)({},n,{channels:i}))),D((function(e){return Object(s.a)({},e,{},r)}));case 14:case"end":return e.stop()}var i}),e)})));return function(t){return e.apply(this,arguments)}}(),L=[];if(C.length>0){var P="ome-tiff"===g.type?C.find((function(e){return"channel"===e.field})):C[0],U=P.values,G=P.field;L=I.map((function(e,t){var r=function(){var n=Object(A.a)(i.a.mark((function n(r,a){var A,c,l,f,h;return i.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(A=Object(o.a)({},r,a),"selection"!==r){n.next=10;break}return A.selection=Object(s.a)({},O,{},A.selection),c=[Object(s.a)({},I[t][r],{},a)],n.next=6,sn(g,c,k);case 6:l=n.sent,f=l.sliders,h=Object(u.a)(f,1),A.slider=h[0];case 10:j(Object(s.a)({},e,{},A),t);case 11:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}(),c=function(){var n=Object(A.a)(i.a.mark((function n(){var r,a,o,u;return i.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Object(f.getChannelStats)({loader:g,loaderSelection:[I[t].selection]});case 2:r=n.sent,a=r[0],o=a.q1,u=a.q3,j(Object(s.a)({},e,{slider:[o,u]}),t);case 5:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();return l.a.createElement(h.a,{key:"channel-controller-".concat(t),item:!0,style:{width:"100%"}},l.a.createElement(Jt,{dimName:G,visibility:e.visible,selectionIndex:e.selection[G],slider:e.slider,color:e.color,channels:I,channelId:t,domainType:k,loader:g,globalDimensionValues:O,theme:d,channelOptions:U,colormapOn:Boolean(y),handlePropertyChange:r,handleChannelRemove:function(){!function(e){var t=Object(a.a)(I);t.splice(e,1),v(Object(s.a)({},n,{channels:t}))}(t)},handleIQRUpdate:c}))}))}var q=Object(on.a)(),H=Object(on.b)();return l.a.createElement(z,{defaultExpanded:!0,className:q.root},l.a.createElement(V,{expandIcon:l.a.createElement(ee.a,null),"aria-controls":"layer-".concat(r,"-controls"),classes:Object(s.a)({},H)},r),l.a.createElement(Z,{className:q.root},l.a.createElement(h.a,{item:!0},l.a.createElement(an,{channels:I,dimensions:C,opacity:m,colormap:y,domainType:k,globalControlDimensions:C.filter((function(e){return Xt.g.includes(e.field)})),globalDimensionValues:O,handleOpacityChange:function(e){v(Object(s.a)({},n,{opacity:e}))},handleColormapChange:function(e){v(Object(s.a)({},n,{colormap:e}))},handleGlobalChannelsSelectionChange:T,isRgb:g.isRgb,handleDomainChange:F})),g.isRgb?null:L,!g.isRgb&&l.a.createElement(h.a,{item:!0},l.a.createElement(E,{disabled:I.length===f.MAX_SLIDERS_AND_CHANNELS,onClick:N,fullWidth:!0,variant:"outlined",style:An,startIcon:l.a.createElement(B.a,null),size:"small"},"Add Channel")),l.a.createElement(h.a,{item:!0},l.a.createElement(E,{onClick:p,fullWidth:!0,variant:"outlined",style:An,size:"small"},"Remove Image Layer"))))}},function(e,t,n){var r=n(722);e.exports={re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n(792).SEMVER_SPEC_VERSION,SemVer:n(321),compareIdentifiers:n(886).compareIdentifiers,rcompareIdentifiers:n(886).rcompareIdentifiers,parse:n(723),valid:n(1283),clean:n(1284),inc:n(1285),diff:n(1286),major:n(1287),minor:n(1288),patch:n(1289),prerelease:n(1290),compare:n(378),rcompare:n(1291),compareLoose:n(1292),compareBuild:n(888),sort:n(1293),rsort:n(1294),gt:n(794),lt:n(889),eq:n(887),neq:n(1049),gte:n(890),lte:n(891),cmp:n(1050),coerce:n(1295),Comparator:n(795),Range:n(379),satisfies:n(796),toComparators:n(1296),maxSatisfying:n(1297),minSatisfying:n(1298),minVersion:n(1299),validRange:n(1300),outside:n(892),gtr:n(1301),ltr:n(1302),intersects:n(1303),simplifyRange:n(1304),subset:n(1305)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=/\/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:t[0],version:t[1]}}},,,,,,,,,,,,,function(e,t,n){"use strict";t.a={name:"fp32",vs:"#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND\nconst float TWO_PI = 6.2831854820251465;\nconst float PI_2 = 1.5707963705062866;\nconst float PI_16 = 0.1963495463132858;\n\nconst float SIN_TABLE_0 = 0.19509032368659973;\nconst float SIN_TABLE_1 = 0.3826834261417389;\nconst float SIN_TABLE_2 = 0.5555702447891235;\nconst float SIN_TABLE_3 = 0.7071067690849304;\n\nconst float COS_TABLE_0 = 0.9807852506637573;\nconst float COS_TABLE_1 = 0.9238795042037964;\nconst float COS_TABLE_2 = 0.8314695954322815;\nconst float COS_TABLE_3 = 0.7071067690849304;\n\nconst float INVERSE_FACTORIAL_3 = 1.666666716337204e-01;\nconst float INVERSE_FACTORIAL_5 = 8.333333767950535e-03;\nconst float INVERSE_FACTORIAL_7 = 1.9841270113829523e-04;\nconst float INVERSE_FACTORIAL_9 = 2.75573188446287533e-06;\n\nfloat sin_taylor_fp32(float a) {\n  float r, s, t, x;\n\n  if (a == 0.0) {\n    return 0.0;\n  }\n\n  x = -a * a;\n  s = a;\n  r = a;\n\n  r = r * x;\n  t = r * INVERSE_FACTORIAL_3;\n  s = s + t;\n\n  r = r * x;\n  t = r * INVERSE_FACTORIAL_5;\n  s = s + t;\n\n  r = r * x;\n  t = r * INVERSE_FACTORIAL_7;\n  s = s + t;\n\n  r = r * x;\n  t = r * INVERSE_FACTORIAL_9;\n  s = s + t;\n\n  return s;\n}\n\nvoid sincos_taylor_fp32(float a, out float sin_t, out float cos_t) {\n  if (a == 0.0) {\n    sin_t = 0.0;\n    cos_t = 1.0;\n  }\n  sin_t = sin_taylor_fp32(a);\n  cos_t = sqrt(1.0 - sin_t * sin_t);\n}\n\nfloat tan_taylor_fp32(float a) {\n    float sin_a;\n    float cos_a;\n\n    if (a == 0.0) {\n        return 0.0;\n    }\n    float z = floor(a / TWO_PI);\n    float r = a - TWO_PI * z;\n\n    float t;\n    float q = floor(r / PI_2 + 0.5);\n    int j = int(q);\n\n    if (j < -2 || j > 2) {\n        return 0.0 / 0.0;\n    }\n\n    t = r - PI_2 * q;\n\n    q = floor(t / PI_16 + 0.5);\n    int k = int(q);\n    int abs_k = int(abs(float(k)));\n\n    if (abs_k > 4) {\n        return 0.0 / 0.0;\n    } else {\n        t = t - PI_16 * q;\n    }\n\n    float u = 0.0;\n    float v = 0.0;\n\n    float sin_t, cos_t;\n    float s, c;\n    sincos_taylor_fp32(t, sin_t, cos_t);\n\n    if (k == 0) {\n        s = sin_t;\n        c = cos_t;\n    } else {\n        if (abs(float(abs_k) - 1.0) < 0.5) {\n            u = COS_TABLE_0;\n            v = SIN_TABLE_0;\n        } else if (abs(float(abs_k) - 2.0) < 0.5) {\n            u = COS_TABLE_1;\n            v = SIN_TABLE_1;\n        } else if (abs(float(abs_k) - 3.0) < 0.5) {\n            u = COS_TABLE_2;\n            v = SIN_TABLE_2;\n        } else if (abs(float(abs_k) - 4.0) < 0.5) {\n            u = COS_TABLE_3;\n            v = SIN_TABLE_3;\n        }\n        if (k > 0) {\n            s = u * sin_t + v * cos_t;\n            c = u * cos_t - v * sin_t;\n        } else {\n            s = u * sin_t - v * cos_t;\n            c = u * cos_t + v * sin_t;\n        }\n    }\n\n    if (j == 0) {\n        sin_a = s;\n        cos_a = c;\n    } else if (j == 1) {\n        sin_a = c;\n        cos_a = -s;\n    } else if (j == -1) {\n        sin_a = -c;\n        cos_a = s;\n    } else {\n        sin_a = -s;\n        cos_a = -c;\n    }\n    return sin_a / cos_a;\n}\n#endif\n\nfloat tan_fp32(float a) {\n#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND\n  return tan_taylor_fp32(a);\n#else\n  return tan(a);\n#endif\n}\n",fs:null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(3),i=n(7),a=n(4),o=n(6),s=n(311),u=n(121),A=[-1,-1,1,-1,-1,1,1,1],c=function(e){function t(e,n){var o;Object(r.a)(this,t);var s=A.map((function(e){return-1===e?0:e}));return(o=Object(i.a)(this,Object(a.a)(t).call(this,e,Object.assign({},n,{vs:"attribute vec2 aClipSpacePosition;\nattribute vec2 aTexCoord;\nattribute vec2 aCoordinate;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main(void) {\n  gl_Position = vec4(aClipSpacePosition, 0., 1.);\n  position = aClipSpacePosition;\n  coordinate = aCoordinate;\n  uv = aTexCoord;\n}\n",geometry:new u.a({drawMode:5,vertexCount:4,attributes:{aClipSpacePosition:{size:2,value:new Float32Array(A)},aTexCoord:{size:2,value:new Float32Array(s)},aCoordinate:{size:2,value:new Float32Array(s)}}})})))).setVertexCount(4),o}return Object(o.a)(t,e),t}(s.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(3),i=n(7),a=n(4),o=n(58),s=n(2),u=n(6),A=n(21),c=n(89),l=n(82),f=n(133),h=n(193),g=function(e){function t(e){var n,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r.a)(this,t),Object(f.a)(e),(n=Object(i.a)(this,Object(a.a)(t).call(this,e,s))).initialize(s),n.stubRemovedMethods("TransformFeedback","v6.0",["pause","resume"]),Object.seal(Object(o.a)(n)),n}return Object(u.a)(t,e),Object(s.a)(t,null,[{key:"isSupported",value:function(e){return Object(A.g)(e)}}]),Object(s.a)(t,[{key:"initialize",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.buffers={},this.unused={},this.configuration=null,this.bindOnUse=!0,Object(h.a)(this.buffers)||this.bind((function(){return e._unbindBuffers()})),this.setProps(t),this}},{key:"setProps",value:function(e){"program"in e&&(this.configuration=e.program&&e.program.configuration),"configuration"in e&&(this.configuration=e.configuration),"bindOnUse"in e&&(e=e.bindOnUse),"buffers"in e&&this.setBuffers(e.buffers)}},{key:"setBuffers",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.bind((function(){for(var n in t)e.setBuffer(n,t[n])})),this}},{key:"setBuffer",value:function(e,t){var n=this,r=this._getVaryingIndex(e),i=this._getBufferParams(t),a=i.buffer,o=i.byteSize,s=i.byteOffset;return r<0?(this.unused[e]=a,A.h.warn((function(){return"".concat(n.id," unused varying buffer ").concat(e)}))(),this):(this.buffers[r]=t,this.bindOnUse||this._bindBuffer(r,a,s,o),this)}},{key:"begin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.gl.bindTransformFeedback(36386,this.handle),this._bindBuffers(),this.gl.beginTransformFeedback(e),this}},{key:"end",value:function(){return this.gl.endTransformFeedback(),this._unbindBuffers(),this.gl.bindTransformFeedback(36386,null),this}},{key:"_getBufferParams",value:function(e){var t,n,r;return e instanceof l.a===!1?(r=e.buffer,n=e.byteSize,t=e.byteOffset):r=e,void 0===t&&void 0===n||(t=t||0,n=n||r.byteLength-t),{buffer:r,byteOffset:t,byteSize:n}}},{key:"_getVaryingInfo",value:function(e){return this.configuration&&this.configuration.getVaryingInfo(e)}},{key:"_getVaryingIndex",value:function(e){if(this.configuration)return this.configuration.getVaryingInfo(e).location;var t=Number(e);return Number.isFinite(t)?t:-1}},{key:"_bindBuffers",value:function(){if(this.bindOnUse)for(var e in this.buffers){var t=this._getBufferParams(this.buffers[e]),n=t.buffer,r=t.byteSize,i=t.byteOffset;this._bindBuffer(e,n,i,r)}}},{key:"_unbindBuffers",value:function(){if(this.bindOnUse)for(var e in this.buffers)this._bindBuffer(e,null)}},{key:"_bindBuffer",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0,i=t&&t.handle;return i&&void 0!==r?this.gl.bindBufferRange(35982,e,i,n,r):this.gl.bindBufferBase(35982,e,i),this}},{key:"_createHandle",value:function(){return this.gl.createTransformFeedback()}},{key:"_deleteHandle",value:function(){this.gl.deleteTransformFeedback(this.handle)}},{key:"_bindHandle",value:function(e){this.gl.bindTransformFeedback(36386,this.handle)}}]),t}(c.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(16),i=n(3),a=n(2),o=1,s=1,u=function(){function e(){Object(i.a)(this,e),this.time=0,this.channels=new Map,this.animations=new Map,this.playing=!1,this.lastEngineTime=-1}return Object(a.a)(e,[{key:"addChannel",value:function(e){var t=e.delay,n=void 0===t?0:t,r=e.duration,i=void 0===r?Number.POSITIVE_INFINITY:r,a=e.rate,s=void 0===a?1:a,u=e.repeat,A=o++,c={time:0,delay:n,duration:i,rate:s,repeat:void 0===u?1:u};return this._setChannelTime(c,this.time),this.channels.set(A,c),A}},{key:"removeChannel",value:function(e){this.channels.delete(e);var t=!0,n=!1,i=void 0;try{for(var a,o=this.animations[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var s=Object(r.a)(a.value,2),u=s[0];s[1].channel===e&&this.detachAnimation(u)}}catch(A){n=!0,i=A}finally{try{t||null==o.return||o.return()}finally{if(n)throw i}}}},{key:"isFinished",value:function(e){var t=this.channels.get(e);return void 0!==t&&this.time>=t.delay+t.duration*t.repeat}},{key:"getTime",value:function(e){if(void 0===e)return this.time;var t=this.channels.get(e);return void 0===t?-1:t.time}},{key:"setTime",value:function(e){this.time=Math.max(0,e);var t=this.channels.values(),n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;this._setChannelTime(s,this.time)}}catch(v){r=!0,i=v}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}var u=this.animations.values(),A=!0,c=!1,l=void 0;try{for(var f,h=u[Symbol.iterator]();!(A=(f=h.next()).done);A=!0){var g=f.value,d=g.animation,p=g.channel;d.setTime(this.getTime(p))}}catch(v){c=!0,l=v}finally{try{A||null==h.return||h.return()}finally{if(c)throw l}}}},{key:"play",value:function(){this.playing=!0}},{key:"pause",value:function(){this.playing=!1,this.lastEngineTime=-1}},{key:"reset",value:function(){this.setTime(0)}},{key:"attachAnimation",value:function(e,t){var n=s++;return this.animations.set(n,{animation:e,channel:t}),e.setTime(this.getTime(t)),n}},{key:"detachAnimation",value:function(e){this.animations.delete(e)}},{key:"update",value:function(e){this.playing&&(-1===this.lastEngineTime&&(this.lastEngineTime=e),this.setTime(this.time+(e-this.lastEngineTime)),this.lastEngineTime=e)}},{key:"_setChannelTime",value:function(e,t){var n=t-e.delay;n>=e.duration*e.repeat?e.time=e.duration*e.rate:(e.time=Math.max(0,n)%e.duration,e.time*=e.rate)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(78),i=n(3),a=n(7),o=n(4),s=n(6),u=n(121),A=n(193),c=new Uint16Array([0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]),l=new Float32Array([-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1]),f=new Float32Array([0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0]),h=new Float32Array([0,0,1,0,1,1,0,1,1,0,1,1,0,1,0,0,0,1,0,0,1,0,1,1,1,1,0,1,0,0,1,0,1,0,1,1,0,1,0,0,0,0,1,0,1,1,0,1]),g={POSITION:{size:3,value:new Float32Array(l)},NORMAL:{size:3,value:new Float32Array(f)},TEXCOORD_0:{size:2,value:new Float32Array(h)}},d=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(i.a)(this,t);var n=e.id,s=void 0===n?Object(A.c)("cube-geometry"):n;return Object(a.a)(this,Object(o.a)(t).call(this,Object(r.a)({},e,{id:s,indices:{size:1,value:new Uint16Array(c)},attributes:Object(r.a)({},g,e.attributes)})))}return Object(s.a)(t,e),t}(u.a)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bottom=A,t.cloneLayout=function(e){for(var t=Array(e.length),n=0,r=e.length;n<r;n++)t[n]=c(e[n]);return t},t.cloneLayoutItem=c,t.childrenEqual=function(e,t){return(0,r.default)(i.default.Children.map(e,(function(e){return e.key})),i.default.Children.map(t,(function(e){return e.key})))},t.fastPositionEqual=function(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height},t.collides=f,t.compact=h,t.compactItem=p,t.correctBounds=v,t.getLayoutItem=y,t.getFirstCollision=m,t.getAllCollisions=I,t.getStatics=b,t.moveElement=E,t.moveElementAwayFromCollision=C,t.perc=function(e){return 100*e+"%"},t.setTransform=function(e){var t=e.top,n=e.left,r=e.width,i=e.height,a="translate(".concat(n,"px,").concat(t,"px)");return{transform:a,WebkitTransform:a,MozTransform:a,msTransform:a,OTransform:a,width:"".concat(r,"px"),height:"".concat(i,"px"),position:"absolute"}},t.setTopLeft=function(e){var t=e.top,n=e.left,r=e.width,i=e.height;return{top:"".concat(t,"px"),left:"".concat(n,"px"),width:"".concat(r,"px"),height:"".concat(i,"px"),position:"absolute"}},t.sortLayoutItems=B,t.sortLayoutItemsByRowCol=w,t.sortLayoutItemsByColRow=Q,t.synchronizeLayoutWithChildren=function(e,t,n,r){e=e||[];var a=[];return i.default.Children.forEach(t,(function(t,n){var r=y(e,String(t.key));if(r)a[n]=c(r);else{0;var i=t.props["data-grid"]||t.props._grid;a[n]=c(i?s(s({},i),{},{i:t.key}):{w:1,h:1,x:0,y:A(a),i:String(t.key)})}})),h(v(a,{cols:n}),r,n)},t.validateLayout=k,t.compactType=function(e){var t=e||{},n=t.verticalCompact,r=t.compactType;return!1===n?null:r},t.autoBindHandlers=function(e,t){t.forEach((function(t){return e[t]=e[t].bind(e)}))},t.noop=t.fastRGLPropsEqual=void 0;var r=a(n(1094)),i=a(n(0));function a(e){return e&&e.__esModule?e:{default:e}}function o(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(e){for(var t,n=0,r=0,i=e.length;r<i;r++)(t=e[r].y+e[r].h)>n&&(n=t);return n}function c(e){return{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:Boolean(e.moved),static:Boolean(e.static),isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}}var l=n(1359);function f(e,t){return e.i!==t.i&&(!(e.x+e.w<=t.x)&&(!(e.x>=t.x+t.w)&&(!(e.y+e.h<=t.y)&&!(e.y>=t.y+t.h))))}function h(e,t,n){for(var r=b(e),i=B(e,t),a=Array(e.length),o=0,s=i.length;o<s;o++){var u=c(i[o]);u.static||(u=p(r,u,t,n,i),r.push(u)),a[e.indexOf(i[o])]=u,u.moved=!1}return a}t.fastRGLPropsEqual=l;var g={x:"w",y:"h"};function d(e,t,n,r){var i=g[r];t[r]+=1;for(var a=e.map((function(e){return e.i})).indexOf(t.i)+1;a<e.length;a++){var o=e[a];if(!o.static){if(o.y>t.y+t.h)break;f(t,o)&&d(e,o,n+t[i],r)}}t[r]=n}function p(e,t,n,r,i){var a,o="horizontal"===n;if("vertical"===n)for(t.y=Math.min(A(e),t.y);t.y>0&&!m(e,t);)t.y--;else if(o)for(t.y=Math.min(A(e),t.y);t.x>0&&!m(e,t);)t.x--;for(;a=m(e,t);)o?d(i,t,a.x+a.w,"x"):d(i,t,a.y+a.h,"y"),o&&t.x+t.w>r&&(t.x=r-t.w,t.y++);return t}function v(e,t){for(var n=b(e),r=0,i=e.length;r<i;r++){var a=e[r];if(a.x+a.w>t.cols&&(a.x=t.cols-a.w),a.x<0&&(a.x=0,a.w=t.cols),a.static)for(;m(n,a);)a.y++;else n.push(a)}return e}function y(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function m(e,t){for(var n=0,r=e.length;n<r;n++)if(f(e[n],t))return e[n]}function I(e,t){return e.filter((function(e){return f(e,t)}))}function b(e){return e.filter((function(e){return e.static}))}function E(e,t,n,r,i,a,o,s){if(t.static&&!0!==t.isDraggable)return e;if(t.y===r&&t.x===n)return e;_("Moving element ".concat(t.i," to [").concat(String(n),",").concat(String(r),"] from [").concat(t.x,",").concat(t.y,"]"));var u=t.x,A=t.y;"number"===typeof n&&(t.x=n),"number"===typeof r&&(t.y=r),t.moved=!0;var c=B(e,o);("vertical"===o&&"number"===typeof r?A>=r:"horizontal"===o&&"number"===typeof n&&u>=n)&&(c=c.reverse());var l=I(c,t);if(a&&l.length)return _("Collision prevented on ".concat(t.i,", reverting.")),t.x=u,t.y=A,t.moved=!1,e;for(var f=0,h=l.length;f<h;f++){var g=l[f];_("Resolving collision between ".concat(t.i," at [").concat(t.x,",").concat(t.y,"] and ").concat(g.i," at [").concat(g.x,",").concat(g.y,"]")),g.moved||(e=g.static?C(e,g,t,i,o,s):C(e,t,g,i,o,s))}return e}function C(e,t,n,r,i,a){var o="horizontal"===i,s="horizontal"!==i,u=t.static;if(r){r=!1;var A={x:o?Math.max(t.x-n.w,0):n.x,y:s?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"};if(!m(e,A))return _("Doing reverse collision on ".concat(n.i," up to [").concat(A.x,",").concat(A.y,"].")),E(e,n,o?A.x:void 0,s?A.y:void 0,r,u,i,a)}return E(e,n,o?n.x+1:void 0,s?n.y+1:void 0,r,u,i,a)}function B(e,t){return"horizontal"===t?Q(e):w(e)}function w(e){return e.slice(0).sort((function(e,t){return e.y>t.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1}))}function Q(e){return e.slice(0).sort((function(e,t){return e.x>t.x||e.x===t.x&&e.y>t.y?1:-1}))}function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Layout",n=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(var r=0,i=e.length;r<i;r++){for(var a=e[r],o=0;o<n.length;o++)if("number"!==typeof a[n[o]])throw new Error("ReactGridLayout: "+t+"["+r+"]."+n[o]+" must be a number!");if(a.i&&"string"!==typeof a.i)throw new Error("ReactGridLayout: "+t+"["+r+"].i must be a string!");if(void 0!==a.static&&"boolean"!==typeof a.static)throw new Error("ReactGridLayout: "+t+"["+r+"].static must be a boolean!")}}function _(){}t.noop=function(){}},function(e,t,n){"use strict";var r=n(12),i=n.n(r),a=n(26),o=n(55),s=n(157),u=n(158),A=n(98),c=n(409),l=n(344),f=i.a.mark(h);function h(e){var t,n,r,a,o,s,u,A=arguments;return i.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:t=A.length>1&&void 0!==A[1]?A[1]:{},n=t.chunkSize,r=void 0===n?262144:n,a=0,o=new TextEncoder;case 4:if(!(a<e.length)){i.next=12;break}return s=Math.min(e.length-a,r),u=e.slice(a,a+s),a+=s,i.next=10,o.encode(u);case 10:i.next=4;break;case 12:case"end":return i.stop()}}),f)}var g=i.a.mark(d);function d(e){var t,n,r,a,o,s,u,A=arguments;return i.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:t=A.length>1&&void 0!==A[1]?A[1]:{},n=t.chunkSize,r=void 0===n?262144:n,a=0;case 3:if(!(a<e.byteLength)){i.next=14;break}return o=Math.min(e.byteLength-a,r),s=new ArrayBuffer(o),u=new Uint8Array(e,a,o),new Uint8Array(s).set(u),a+=o,i.next=12,s;case 12:i.next=3;break;case 14:case"end":return i.stop()}}),g)}function p(e){this.wrapped=e}function v(e){return new p(e)}function y(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof p;Promise.resolve(s?o.wrapped:o).then((function(e){s?r("return"===t?"return":"next",e):i(a.done?"return":"normal",e)}),(function(e){r("throw",e)}))}catch(u){i("throw",u)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise((function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))}))},"function"!==typeof e.return&&(this.return=void 0)}function m(e){return function(){return new y(e.apply(this,arguments))}}"function"===typeof Symbol&&Symbol.asyncIterator&&(y.prototype[Symbol.asyncIterator]=function(){return this}),y.prototype.next=function(e){return this._invoke("next",e)},y.prototype.throw=function(e){return this._invoke("throw",e)},y.prototype.return=function(e){return this._invoke("return",e)};function I(e){return b.apply(this,arguments)}function b(){return(b=m(i.a.mark((function e(t){var n,r,a,o,s,u=arguments;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=u.length>1&&void 0!==u[1]?u[1]:{},r=n.chunkSize||1048576,a=0;case 3:if(!(a<t.size)){e.next=13;break}return o=a+r,e.next=7,v(E(t,a,o));case 7:return s=e.sent,a=o,e.next=11,s;case 11:e.next=3;break;case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e,t,n){return C.apply(this,arguments)}function C(){return(C=Object(a.a)(i.a.mark((function e(t,n,r){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e,i){var a=t.slice(n,r),o=new FileReader;o.onload=function(t){return e(t.target&&t.target.result)},o.onerror=function(e){return i(e)},o.readAsArrayBuffer(a)}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var B=n(224),w=n(94),Q=n(154);function k(e){if(w.b||w.d>=10){if("function"===typeof e[Symbol.asyncIterator])return function(e){return _.apply(this,arguments)}(e);if("function"===typeof e.getIterator)return e.getIterator()}return w.b?function(e){return x.apply(this,arguments)}(e):function(e){return S.apply(this,arguments)}(e)}function _(){return(_=m(i.a.mark((function e(t){var n,r,a,o,s,u,A;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=!0,r=!1,e.prev=2,o=Object(B.a)(t);case 4:return e.next=6,v(o.next());case 6:return s=e.sent,n=s.done,e.next=10,v(s.value);case 10:if(u=e.sent,n){e.next=18;break}return A=u,e.next=15,Object(Q.d)(A);case 15:n=!0,e.next=4;break;case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(2),r=!0,a=e.t0;case 24:if(e.prev=24,e.prev=25,n||null==o.return){e.next=29;break}return e.next=29,v(o.return());case 29:if(e.prev=29,!r){e.next=32;break}throw a;case 32:return e.finish(29);case 33:return e.finish(24);case 34:case"end":return e.stop()}}),e,null,[[2,20,24,34],[25,,29,33]])})))).apply(this,arguments)}function x(){return(x=m(i.a.mark((function e(t){var n,r,a,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.getReader(),e.prev=1;case 2:return e.next=5,v(n.read());case 5:if(r=e.sent,a=r.done,o=r.value,!a){e.next=10;break}return e.abrupt("return");case 10:return e.next=12,Object(Q.d)(o);case 12:e.next=2;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),n.releaseLock();case 19:case"end":return e.stop()}}),e,null,[[1,16]])})))).apply(this,arguments)}function S(){return(S=m(i.a.mark((function e(t){var n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v(t);case 2:t=e.sent;case 3:if(null===(n=t.read())){e.next=9;break}return e.next=8,Object(Q.d)(n);case 8:return e.abrupt("continue",3);case 9:if(!t._readableState.ended){e.next=11;break}return e.abrupt("return");case 11:return e.next=13,v(O(t));case 13:e.next=3;break;case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function O(e){return D.apply(this,arguments)}function D(){return(D=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){t.once("readable",e)})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"===typeof e?h(e,t):e instanceof ArrayBuffer?d(e,t):Object(o.b)(e)?I(e,t):Object(o.h)(e)?k(e):Object(o.i)(e)?k(e.body):Object(A.a)(!1)}var j=n(190),M="Cannot convert supplied data type";function N(e,t){if(t.text&&"string"===typeof e)return e;if(e instanceof ArrayBuffer){var n=e;return t.text&&!t.binary?new TextDecoder("utf8").decode(n):n}if(ArrayBuffer.isView(e)||Object(o.c)(e)){if(t.text&&!t.binary)return new TextDecoder("utf8").decode(e);var r=e.buffer,i=e.byteLength||e.length;return 0===e.byteOffset&&i===r.byteLength||(r=r.slice(e.byteOffset,e.byteOffset+i)),r}throw new Error(M)}function F(e,t){return T.apply(this,arguments)}function T(){return(T=Object(a.a)(i.a.mark((function e(t,n){var r,a;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t instanceof ArrayBuffer||ArrayBuffer.isView(t),"string"!==typeof t&&!r){e.next=3;break}return e.abrupt("return",N(t,n));case 3:if(!Object(o.b)(t)){e.next=7;break}return e.next=6,Object(j.b)(t);case 6:t=e.sent;case 7:if(!Object(o.i)(t)){e.next=21;break}return a=t,e.next=11,Object(j.a)(a);case 11:if(!n.binary){e.next=17;break}return e.next=14,a.arrayBuffer();case 14:e.t0=e.sent,e.next=20;break;case 17:return e.next=19,a.text();case 19:e.t0=e.sent;case 20:return e.abrupt("return",e.t0);case 21:if(Object(o.h)(t)&&(t=R(t)),!Object(o.d)(t)&&!Object(o.a)(t)){e.next=24;break}return e.abrupt("return",Object(l.a)(t));case 24:throw new Error(M);case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var L=n(23),P=n(1);function U(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 G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach((function(t){Object(P.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function q(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return n||(e=G({fetch:Object(u.a)(t||{},e)},e),Array.isArray(e.loaders)||(e.loaders=null),e)}function H(e,t){if(!t&&e&&!Array.isArray(e))return e;var n;if(e&&(n=Array.isArray(e)?e:[e]),t&&t.loaders){var r=Array.isArray(t.loaders)?t.loaders:[t.loaders];n=n?[].concat(Object(L.a)(n),Object(L.a)(r)):r}return n&&n.length?n:null}var Y=n(410),J=n(289);function z(e,t,n,r){if(!Y.a.isSupported())return!1;var i=n&&n[e.id];return!!("local"===n.worker&&i&&i.localWorkerUrl||n.worker&&i&&i.workerUrl)&&(!e.useWorker||e.useWorker(n))}function K(e,t,n,r){var i=(n||{}).worker,a=n&&n[e.id]||{},o="local"===i?a.localWorkerUrl:a.workerUrl,s="url(".concat(o,")"),u=e.name,A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};e.maxConcurrency&&(t.maxConcurrency=e.maxConcurrency);e.onDebug&&(t.onDebug=e.onDebug);W||(W=new Y.a({onMessage:V}));return W.setProps(t),W}(n);n=JSON.parse(JSON.stringify(n));var c="2.3.0"!==e.version?"(core version ".concat("2.3.0",")"):"";return A.process(s,"".concat(u,"-worker@").concat(e.version).concat(c),{arraybuffer:Object(Q.d)(t),options:n,source:"loaders.gl@".concat("2.3.0"),type:"parse"})}var W=null;function V(e){return X.apply(this,arguments)}function X(){return(X=Object(a.a)(i.a.mark((function e(t){var n,r,a,o,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.worker,r=t.data,a=t.resolve,o=t.reject,e.t0=r.type,e.next="done"===e.t0?4:"parse"===e.t0?6:"error"===e.t0?17:19;break;case 4:return a(r.result),e.abrupt("break",19);case 6:return e.prev=6,e.next=9,ve(r.arraybuffer,r.options,r.url);case 9:s=e.sent,n.postMessage({type:"parse-done",id:r.id,result:s},Object(J.a)(s)),e.next=16;break;case 13:e.prev=13,e.t1=e.catch(6),n.postMessage({type:"parse-error",id:r.id,message:e.t1.message});case 16:return e.abrupt("break",19);case 17:return o(r.message),e.abrupt("break",19);case 19:case"end":return e.stop()}}),e,null,[[6,13]])})))).apply(this,arguments)}var Z=n(172),$=n(25),ee=n(465);function te(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 ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){Object(P.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ie(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ae=/\.([^.]+)$/;function oe(e){return se.apply(this,arguments)}function se(){return(se=Object(a.a)(i.a.mark((function e(t){var n,r,a,s,u=arguments;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=u.length>1&&void 0!==u[1]?u[1]:[],r=u.length>2&&void 0!==u[2]?u[2]:{},a=u.length>3&&void 0!==u[3]?u[3]:{},!(s=ue(t,n,ne(ne({},r),{},{nothrow:!0}),a))){e.next=6;break}return e.abrupt("return",s);case 6:if(!Object(o.b)(t)){e.next=11;break}return e.next=9,E(t,0,10);case 9:t=e.sent,s=ue(t,n,r,a);case 11:if(s||r.nothrow){e.next=13;break}throw new Error(Ae(t));case 13:return e.abrupt("return",s);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t&&!Array.isArray(t))return Object(s.b)(t);ce(t=[].concat(Object(L.a)(t||[]),Object(L.a)(Object(ee.a)())));var i=Object(Z.b)(e),a=i.url,o=i.type,u=le(t,a||r.url);if(!(u=(u=u||fe(t,o))||he(t,e))&&!n.nothrow)throw new Error(Ae(e));return u}function Ae(e){var t=Object(Z.b)(e),n=t.url,r=t.type,i="No valid loader found";return e&&(i+=' data: "'.concat(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"===typeof e)return e.slice(0,t);if(ArrayBuffer.isView(e))return pe(e.buffer,e.byteOffset,t);if(e instanceof ArrayBuffer){var n=0;return pe(e,n,t)}return""}(e),'", contentType: "').concat(r,'"')),n&&(i+=" url: ".concat(n)),i}function ce(e){var t,n=re(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;Object(s.b)(r)}}catch(i){n.e(i)}finally{n.f()}}function le(e,t){var n=t&&t.match(ae),r=n&&n[1];return r&&function(e,t){t=t.toLowerCase();var n,r=re(e);try{for(r.s();!(n=r.n()).done;){var i,a=n.value,o=re(a.extensions);try{for(o.s();!(i=o.n()).done;){if(i.value.toLowerCase()===t)return a}}catch(s){o.e(s)}finally{o.f()}}}catch(s){r.e(s)}finally{r.f()}return null}(e,r)}function fe(e,t){var n,r=re(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.mimeTypes&&i.mimeTypes.includes(t))return i;if(t==="application/x.".concat(i.id))return i}}catch(a){r.e(a)}finally{r.f()}return null}function he(e,t){if(!t)return null;var n,r=re(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if("string"===typeof t){if(ge(t,i))return i}else if(ArrayBuffer.isView(t)){if(de(t.buffer,t.byteOffset,i))return i}else if(t instanceof ArrayBuffer){if(de(t,0,i))return i}}}catch(a){r.e(a)}finally{r.f()}return null}function ge(e,t){return t.testText&&t.testText(e)}function de(e,t,n){return(Array.isArray(n.tests)?n.tests:[n.tests]).some((function(r){return function(e,t,n,r){if(r instanceof ArrayBuffer)return Object(Q.a)(r,e,r.byteLength);switch(Object($.a)(r)){case"function":return r(e,n);case"string":var i=pe(e,t,r.length);return r===i;default:return!1}}(e,t,n,r)}))}function pe(e,t,n){if(e.byteLength<t+n)return"";for(var r=new DataView(e),i="",a=0;a<n;a++)i+=String.fromCharCode(r.getUint8(t+a));return i}function ve(e,t,n,r){return ye.apply(this,arguments)}function ye(){return(ye=Object(a.a)(i.a.mark((function e(t,n,r,a){var o,c,l,f;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Object(A.a)(!a||"string"!==typeof a,"parse no longer accepts final url"),!n||Array.isArray(n)||Object(s.a)(n)||(a=r,r=n,n=null),e.next=4,t;case 4:return t=e.sent,r=r||{},o=Object(Z.b)(t),c=o.url,l=H(n,a),e.next=10,oe(t,l,r);case 10:if(f=e.sent){e.next=13;break}return e.abrupt("return",null);case 13:return r=Object(u.c)(r,f,l,c),a=q({url:c,parse:ve,loaders:l},r,a),e.next=17,me(f,t,r,a);case 17:return e.abrupt("return",e.sent);case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function me(e,t,n,r){return Ie.apply(this,arguments)}function Ie(){return(Ie=Object(a.a)(i.a.mark((function e(t,n,r,a){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Object(c.a)(t),e.next=3,F(n,t);case 3:if(n=e.sent,!t.parseTextSync||"string"!==typeof n){e.next=7;break}return r.dataType="text",e.abrupt("return",t.parseTextSync(n,r,a,t));case 7:if(!z(t,0,r)){e.next=11;break}return e.next=10,K(t,n,r);case 10:return e.abrupt("return",e.sent);case 11:if(!t.parseText||"string"!==typeof n){e.next=15;break}return e.next=14,t.parseText(n,r,a,t);case 14:return e.abrupt("return",e.sent);case 15:if(!t.parse){e.next=19;break}return e.next=18,t.parse(n,r,a,t);case 18:return e.abrupt("return",e.sent);case 19:return Object(A.a)(!t.parseSync),e.abrupt("return",Object(A.a)(!1));case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function be(e,t,n){return Ee.apply(this,arguments)}function Ee(){return(Ee=Object(a.a)(i.a.mark((function e(t,n,r){var a,A;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Array.isArray(n)||Object(s.a)(n)||(r=n,n=null),a=Object(u.a)(r||{}),A=t,"string"!==typeof t){e.next=9;break}return e.next=6,a(t);case 6:A=e.sent,e.next=10;break;case 9:t=null;case 10:if(!Object(o.b)(t)){e.next=15;break}return e.next=13,a(t);case 13:A=e.sent,t=null;case 15:return e.next=17,ve(A,n,r);case 17:return e.abrupt("return",e.sent);case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}n.d(t,"a",(function(){return be}))},function(e,t,n){"use strict";var r=n(12),i=n.n(r),a=n(26);function o(e,t){if(!e)throw new Error(t)}var s=n(251),u=s.a._parseImageNode,A="undefined"!==typeof Image,c="undefined"!==typeof ImageBitmap,l=Boolean(u),f=!!s.b||l;var h=n(25);function g(e){var t=p(e);if(!t)throw new Error("Not an image");return t}function d(e){switch(g(e)){case"data":return e;case"image":case"imagebitmap":var t=document.createElement("canvas"),n=t.getContext("2d");if(n)return t.width=e.width,t.height=e.height,n.drawImage(e,0,0),n.getImageData(0,0,e.width,e.height);default:return o(!1)}}function p(e){return"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap?"imagebitmap":"undefined"!==typeof Image&&e instanceof Image?"image":e&&"object"===Object(h.a)(e)&&e.data&&e.width&&e.height?"data":null}var v=/^data:image\/svg\+xml/,y=/\.svg((\?|#).*)?$/;function m(e){return e&&(v.test(e)||y.test(e))}function I(e,t){if(m(t)){var n=(new TextDecoder).decode(e);return"data:image/svg+xml;base64,".concat(btoa(n))}return b(e,t)}function b(e,t){if(m(t))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(e)])}function E(e,t,n){return C.apply(this,arguments)}function C(){return(C=Object(a.a)(i.a.mark((function e(t,n,r){var a,o,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=I(t,r),o=self.URL||self.webkitURL,s="string"!==typeof a&&o.createObjectURL(a),e.prev=3,e.next=6,B(s||a,n);case 6:return e.abrupt("return",e.sent);case 7:return e.prev=7,s&&o.revokeObjectURL(s),e.finish(7);case 10:case"end":return e.stop()}}),e,null,[[3,,7,10]])})))).apply(this,arguments)}function B(e,t){return w.apply(this,arguments)}function w(){return(w=Object(a.a)(i.a.mark((function e(t,n){var r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=new Image).src=t,!(n.image&&n.image.decode&&r.decode)){e.next=6;break}return e.next=5,r.decode();case 5:return e.abrupt("return",r);case 6:return e.next=8,new Promise((function(e,n){try{r.onload=function(){return e(r)},r.onerror=function(e){return n(new Error("Could not load image ".concat(t,": ").concat(e)))}}catch(i){n(i)}}));case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Q={},k=!0;function _(e,t,n){return x.apply(this,arguments)}function x(){return(x=Object(a.a)(i.a.mark((function e(t,n,r){var a,o,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!m(r)){e.next=7;break}return e.next=3,E(t,n,r);case 3:o=e.sent,a=o,e.next=8;break;case 7:a=b(t,r);case 8:return s=n&&n.imagebitmap,e.next=11,S(a,s);case 11:return e.abrupt("return",e.sent);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(e){return O.apply(this,arguments)}function O(){return(O=Object(a.a)(i.a.mark((function e(t){var n,r=arguments;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!D(n=r.length>1&&void 0!==r[1]?r[1]:null)&&k||(n=null),!n){e.next=13;break}return e.prev=3,e.next=6,createImageBitmap(t,n);case 6:return e.abrupt("return",e.sent);case 9:e.prev=9,e.t0=e.catch(3),console.warn(e.t0),k=!1;case 13:return e.next=15,createImageBitmap(t);case 15:return e.abrupt("return",e.sent);case 16:case"end":return e.stop()}}),e,null,[[3,9]])})))).apply(this,arguments)}function D(e){for(var t in e||Q)return!1;return!0}var R=n(170);function j(e,t){var n=(Object(R.a)(e)||{}).mimeType,r=s.a._parseImageNode;return o(r),r(e,n,t)}function M(){return(M=Object(a.a)(i.a.mark((function e(t,n,r){var a,s,u,A,c;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=(n=n||{}).image||{},s=a.type||"auto",u=(r||{}).url,A=N(s),e.t0=A,e.next="imagebitmap"===e.t0?8:"image"===e.t0?12:"data"===e.t0?16:20;break;case 8:return e.next=10,_(t,n,u);case 10:return c=e.sent,e.abrupt("break",21);case 12:return e.next=14,E(t,n,u);case 14:return c=e.sent,e.abrupt("break",21);case 16:return e.next=18,j(t,n);case 18:return c=e.sent,e.abrupt("break",21);case 20:o(!1);case 21:return"data"===s&&(c=d(c)),e.abrupt("return",c);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function N(e){switch(e){case"auto":case"data":return function(){if(c)return"imagebitmap";if(A)return"image";if(f)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(e){switch(e){case"auto":return c||A||f;case"imagebitmap":return c;case"image":return A;case"data":return f;case"html":return A;case"ndarray":return f;default:throw new Error("@loaders.gl/images: image ".concat(e," not supported in this environment"))}}(e),e}}var F={id:"image",name:"Images",version:"2.3.0",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg"],parse:function(e,t,n){return M.apply(this,arguments)},tests:[function(e){return Boolean(Object(R.a)(new DataView(e)))}],options:{image:{type:"auto",decode:!0}}};t.a=F},function(e,t,n){"use strict";var r,i=n(3),a=n(2),o=n(7),s=n(58),u=n(4),A=n(29),c=n(6),l=n(89),f=n(111),h=n(140),g=n(1),d=n(21),p=n(191),v=n(51),y=(r={},Object(g.a)(r,5126,R.bind(null,"uniform1fv",B,1,j)),Object(g.a)(r,35664,R.bind(null,"uniform2fv",B,2,j)),Object(g.a)(r,35665,R.bind(null,"uniform3fv",B,3,j)),Object(g.a)(r,35666,R.bind(null,"uniform4fv",B,4,j)),Object(g.a)(r,5124,R.bind(null,"uniform1iv",w,1,j)),Object(g.a)(r,35667,R.bind(null,"uniform2iv",w,2,j)),Object(g.a)(r,35668,R.bind(null,"uniform3iv",w,3,j)),Object(g.a)(r,35669,R.bind(null,"uniform4iv",w,4,j)),Object(g.a)(r,35670,R.bind(null,"uniform1iv",w,1,j)),Object(g.a)(r,35671,R.bind(null,"uniform2iv",w,2,j)),Object(g.a)(r,35672,R.bind(null,"uniform3iv",w,3,j)),Object(g.a)(r,35673,R.bind(null,"uniform4iv",w,4,j)),Object(g.a)(r,35674,R.bind(null,"uniformMatrix2fv",B,4,M)),Object(g.a)(r,35675,R.bind(null,"uniformMatrix3fv",B,9,M)),Object(g.a)(r,35676,R.bind(null,"uniformMatrix4fv",B,16,M)),Object(g.a)(r,35678,D),Object(g.a)(r,35680,D),Object(g.a)(r,5125,R.bind(null,"uniform1uiv",Q,1,j)),Object(g.a)(r,36294,R.bind(null,"uniform2uiv",Q,2,j)),Object(g.a)(r,36295,R.bind(null,"uniform3uiv",Q,3,j)),Object(g.a)(r,36296,R.bind(null,"uniform4uiv",Q,4,j)),Object(g.a)(r,35685,R.bind(null,"uniformMatrix2x3fv",B,6,M)),Object(g.a)(r,35686,R.bind(null,"uniformMatrix2x4fv",B,8,M)),Object(g.a)(r,35687,R.bind(null,"uniformMatrix3x2fv",B,6,M)),Object(g.a)(r,35688,R.bind(null,"uniformMatrix3x4fv",B,12,M)),Object(g.a)(r,35689,R.bind(null,"uniformMatrix4x2fv",B,8,M)),Object(g.a)(r,35690,R.bind(null,"uniformMatrix4x3fv",B,12,M)),Object(g.a)(r,35679,D),Object(g.a)(r,35682,D),Object(g.a)(r,36289,D),Object(g.a)(r,36292,D),Object(g.a)(r,36293,D),Object(g.a)(r,36298,D),Object(g.a)(r,36299,D),Object(g.a)(r,36300,D),Object(g.a)(r,36303,D),Object(g.a)(r,36306,D),Object(g.a)(r,36307,D),Object(g.a)(r,36308,D),Object(g.a)(r,36311,D),r),m={},I={},b={},E=[0];function C(e,t,n,r){1===t&&"boolean"===typeof e&&(e=e?1:0),Number.isFinite(e)&&(E[0]=e,e=E);var i=e.length;if(i%t&&d.h.warn("Uniform size should be multiples of ".concat(t),e)(),e instanceof n)return e;var a=r[i];a||(a=new n(i),r[i]=a);for(var o=0;o<i;o++)a[o]=e[o];return a}function B(e,t){return C(e,t,Float32Array,m)}function w(e,t){return C(e,t,Int32Array,I)}function Q(e,t){return C(e,t,Uint32Array,b)}function k(e){if("]"!==e[e.length-1])return{name:e,length:1,isArray:!1};var t=e.match(/([^[]*)(\[[0-9]+\])?/);if(!t||t.length<2)throw new Error("Failed to parse GLSL uniform name ".concat(e));return{name:t[1],length:t[2]||1,isArray:Boolean(t[2])}}function _(e,t,n){var r=y[n.type];if(!r)throw new Error("Unknown GLSL uniform type ".concat(n.type));return r().bind(null,e,t)}function x(e,t,n){for(var r in e){var i=e[r];if((!n||Boolean(n[r]))&&!S(i))throw t=t?"".concat(t," "):"",console.error("".concat(t," Bad uniform ").concat(r),i),new Error("".concat(t," Bad uniform ").concat(r))}return!0}function S(e){return Array.isArray(e)||ArrayBuffer.isView(e)?function(e){if(0===e.length)return!1;for(var t=Math.min(e.length,16),n=0;n<t;++n)if(!Number.isFinite(e[n]))return!1;return!0}(e):!!isFinite(e)||(!0===e||!1===e||(e instanceof f.a||(e instanceof p.a||e instanceof h.a&&Boolean(e.texture))))}function O(e,t,n){if(Array.isArray(n)||ArrayBuffer.isView(n))if(e[t])for(var r=e[t],i=0,a=n.length;i<a;++i)r[i]=n[i];else e[t]=n.slice();else e[t]=n}function D(){var e=null;return function(t,n,r){var i=e!==r;return i&&(t.uniform1i(n,r),e=r),i}}function R(e,t,n,r){var i=null,a=null;return function(o,s,u){var A=t(u,n),c=A.length,l=!1;if(null===i)i=new Float32Array(c),a=c,l=!0;else{Object(v.a)(a===c,"Uniform length cannot change.");for(var f=0;f<c;++f)if(A[f]!==i[f]){l=!0;break}}return l&&(r(o,e,s,A),i.set(A)),l}}function j(e,t,n,r){e[t](n,r)}function M(e,t,n,r){e[t](n,!1,r)}function N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unnamed",n=/#define[\s*]SHADER_NAME[\s*]([A-Za-z0-9_-]+)[\s*]/,r=e.match(n);return r?r[1]:t}function F(e,t,n,r){for(var i=e.split(/\r?\n/),a={},o={},s=r||N(t)||"(unnamed)",u="".concat(function(e){switch(e){case 35632:return"fragment";case 35633:return"vertex";default:return"unknown type"}}(n)," shader ").concat(s),A=0;A<i.length;A++){var c=i[A];if(!(c.length<=1)){var l=c.split(":"),f=l[0],h=parseInt(l[2],10);if(isNaN(h))throw new Error("GLSL compilation error in ".concat(u,": ").concat(e));"WARNING"!==f?a[h]=c:o[h]=c}}var g=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:": ",r=e.split(/\r?\n/),i=String(r.length+t-1).length;return r.map((function(e,r){var a=r+t,o=String(a).length;return L(a,i-o)+n+e}))}(t);return{shaderName:u,errors:T(a,g),warnings:T(o,g)}}function T(e,t){for(var n="",r=0;r<t.length;r++){var i=t[r];if((e[r+3]||e[r+2]||e[r+1])&&(n+="".concat(i,"\n"),e[r+1])){var a=e[r+1],o=a.split(":",3),s=o[0],u=parseInt(o[1],10)||0,A=a.substring(o.join(":").length+1).trim();n+=L("^^^ ".concat(s,": ").concat(A,"\n\n"),u)}}return n}function L(e,t){for(var n="",r=0;r<t;++r)n+=" ";return"".concat(n).concat(e)}var P=n(133),U=n(193),G=function(e){function t(e,n){var r;Object(i.a)(this,t),Object(P.b)(e),Object(v.a)("string"===typeof n.source,"Shader: GLSL source code must be a JavaScript string");var a=N(n.source,null)||n.id||Object(U.c)("unnamed ".concat(t.getTypeName(n.shaderType)));return(r=Object(o.a)(this,Object(u.a)(t).call(this,e,{id:a}))).shaderType=n.shaderType,r.source=n.source,r.initialize(n),r}return Object(c.a)(t,e),Object(a.a)(t,null,[{key:"getTypeName",value:function(e){switch(e){case 35633:return"vertex-shader";case 35632:return"fragment-shader";default:return Object(v.a)(!1),"unknown"}}}]),Object(a.a)(t,[{key:"initialize",value:function(e){var t=e.source,n=N(t,null);n&&(this.id=Object(U.c)(n)),this._compile(t)}},{key:"getParameter",value:function(e){return this.gl.getShaderParameter(this.handle,e)}},{key:"toString",value:function(){return"".concat(t.getTypeName(this.shaderType),":").concat(this.id)}},{key:"getName",value:function(){return N(this.source)||"unnamed-shader"}},{key:"getSource",value:function(){return this.gl.getShaderSource(this.handle)}},{key:"getTranslatedSource",value:function(){var e=this.gl.getExtension("WEBGL.debug_shaders");return e?e.getTranslatedShaderSource(this.handle):"No translated source available. WEBGL.debug_shaders not implemented"}},{key:"_compile",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.source;e.startsWith("#version ")||(e="#version 100\n".concat(e)),this.source=e,this.gl.shaderSource(this.handle,this.source),this.gl.compileShader(this.handle);var t=this.getParameter(35713);if(!t){var n=this.gl.getShaderInfoLog(this.handle),r=F(n,this.source,this.shaderType,this.id),i=r.shaderName,a=r.errors,o=r.warnings;throw d.h.error("GLSL compilation errors in ".concat(i,"\n").concat(a))(),d.h.warn("GLSL compilation warnings in ".concat(i,"\n").concat(o))(),new Error("GLSL compilation errors in ".concat(i))}}},{key:"_deleteHandle",value:function(){this.gl.deleteShader(this.handle)}},{key:"_getOptsFromHandle",value:function(){return{type:this.getParameter(35663),source:this.getSource()}}}]),t}(l.a),q=function(e){function t(e,n){return Object(i.a)(this,t),"string"===typeof n&&(n={source:n}),Object(o.a)(this,Object(u.a)(t).call(this,e,Object.assign({},n,{shaderType:35633})))}return Object(c.a)(t,e),Object(a.a)(t,[{key:"_createHandle",value:function(){return this.gl.createShader(35633)}}]),t}(G),H=function(e){function t(e,n){return Object(i.a)(this,t),"string"===typeof n&&(n={source:n}),Object(o.a)(this,Object(u.a)(t).call(this,e,Object.assign({},n,{shaderType:35632})))}return Object(c.a)(t,e),Object(a.a)(t,[{key:"_createHandle",value:function(){return this.gl.createShader(35632)}}]),t}(G),Y=n(122),J=n(156),z=function(){function e(t){Object(i.a)(this,e),this.id=t.id,this.attributeInfos=[],this.attributeInfosByName={},this.attributeInfosByLocation=[],this.varyingInfos=[],this.varyingInfosByName={},Object.seal(this),this._readAttributesFromProgram(t),this._readVaryingsFromProgram(t)}return Object(a.a)(e,[{key:"getAttributeInfo",value:function(e){var t=Number(e);return Number.isFinite(t)?this.attributeInfosByLocation[t]:this.attributeInfosByName[e]||null}},{key:"getAttributeLocation",value:function(e){var t=this.getAttributeInfo(e);return t?t.location:-1}},{key:"getAttributeAccessor",value:function(e){var t=this.getAttributeInfo(e);return t?t.accessor:null}},{key:"getVaryingInfo",value:function(e){var t=Number(e);return Number.isFinite(t)?this.varyingInfos[t]:this.varyingInfosByName[e]||null}},{key:"getVaryingIndex",value:function(e){var t=this.getVaryingInfo();return t?t.location:-1}},{key:"getVaryingAccessor",value:function(e){var t=this.getVaryingInfo();return t?t.accessor:null}},{key:"_readAttributesFromProgram",value:function(e){for(var t=e.gl,n=t.getProgramParameter(e.handle,35721),r=0;r<n;r++){var i=t.getActiveAttrib(e.handle,r),a=i.name,o=i.type,s=i.size,u=t.getAttribLocation(e.handle,a);u>=0&&this._addAttribute(u,a,o,s)}this.attributeInfos.sort((function(e,t){return e.location-t.location}))}},{key:"_readVaryingsFromProgram",value:function(e){var t=e.gl;if(Object(d.g)(t)){for(var n=t.getProgramParameter(e.handle,35971),r=0;r<n;r++){var i=t.getTransformFeedbackVarying(e.handle,r),a=i.name,o=i.type,s=i.size;this._addVarying(r,a,o,s)}this.varyingInfos.sort((function(e,t){return e.location-t.location}))}}},{key:"_addAttribute",value:function(e,t,n,r){var i=Object(J.a)(n),a={type:i.type,size:r*i.components};this._inferProperties(e,t,a);var o={location:e,name:t,accessor:new Y.a(a)};this.attributeInfos.push(o),this.attributeInfosByLocation[e]=o,this.attributeInfosByName[o.name]=o}},{key:"_inferProperties",value:function(e,t,n){/instance/i.test(t)&&(n.divisor=1)}},{key:"_addVarying",value:function(e,t,n,r){var i=Object(J.a)(n),a=i.type,o=i.components,s={location:e,name:t,accessor:new Y.a({type:a,size:r*o})};this.varyingInfos.push(s),this.varyingInfosByName[s.name]=s}}]),e}(),K=n(174);n.d(t,"a",(function(){return V}));var W=["setVertexArray","setAttributes","setBuffers","unsetBuffers","use","getUniformCount","getUniformInfo","getUniformLocation","getUniformValue","getVarying","getFragDataLocation","getAttachedShaders","getAttributeCount","getAttributeLocation","getAttributeInfo"],V=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(i.a)(this,t),(n=Object(o.a)(this,Object(u.a)(t).call(this,e,r))).stubRemovedMethods("Program","v6.0",W),n._isCached=!1,n.initialize(r),Object.seal(Object(s.a)(n)),n._setId(r.id),n}return Object(c.a)(t,e),Object(a.a)(t,[{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hash,n=e.vs,r=e.fs,i=e.varyings,a=e.bufferMode,o=void 0===a?35981:a;return this.hash=t||"",this.vs="string"===typeof n?new q(this.gl,{id:"".concat(e.id,"-vs"),source:n}):n,this.fs="string"===typeof r?new H(this.gl,{id:"".concat(e.id,"-fs"),source:r}):r,Object(v.a)(this.vs instanceof q),Object(v.a)(this.fs instanceof H),this.uniforms={},this._textureUniforms={},this._texturesRenderable=!0,i&&i.length>0&&(Object(P.a)(this.gl),this.varyings=i,this.gl.transformFeedbackVaryings(this.handle,i,o)),this._compileAndLink(),this._readUniformLocationsFromLinkedProgram(),this.configuration=new z(this),this.setProps(e)}},{key:"delete",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._isCached?this:Object(A.a)(Object(u.a)(t.prototype),"delete",this).call(this,e)}},{key:"setProps",value:function(e){return"uniforms"in e&&this.setUniforms(e.uniforms),this}},{key:"draw",value:function(e){var t=this,n=e.logPriority,r=e.drawMode,i=void 0===r?4:r,a=e.vertexCount,o=e.offset,s=void 0===o?0:o,u=e.start,A=e.end,c=e.isIndexed,l=void 0!==c&&c,f=e.indexType,h=void 0===f?5123:f,g=e.instanceCount,p=void 0===g?0:g,y=e.isInstanced,m=void 0===y?p>0:y,I=e.vertexArray,b=void 0===I?null:I,E=e.transformFeedback,C=e.framebuffer,B=e.parameters,w=void 0===B?{}:B,Q=e.uniforms,k=e.samplers;if((Q||k)&&(d.h.deprecated("Program.draw({uniforms})","Program.setUniforms(uniforms)")(),this.setUniforms(Q||{})),d.h.priority>=n){var _=C?C.id:"default",x="mode=".concat(Object(K.a)(this.gl,i)," verts=").concat(a," ")+"instances=".concat(p," indexType=").concat(Object(K.a)(this.gl,h)," ")+"isInstanced=".concat(m," isIndexed=").concat(l," ")+"Framebuffer=".concat(_);d.h.log(n,x)()}return Object(v.a)(b),this.gl.useProgram(this.handle),!(!this._areTexturesRenderable()||0===a||m&&0===p)&&(b.bindForDraw(a,p,(function(){if(void 0!==C&&(w=Object.assign({},w,{framebuffer:C})),E){var e=Object(J.c)(i);E.begin(e)}t._bindTextures(),Object(d.l)(t.gl,w,(function(){l&&m?t.gl.drawElementsInstanced(i,a,h,s,p):l&&Object(d.g)(t.gl)&&!isNaN(u)&&!isNaN(A)?t.gl.drawRangeElements(i,u,A,a,h,s):l?t.gl.drawElements(i,a,h,s):m?t.gl.drawArraysInstanced(i,s,a,p):t.gl.drawArrays(i,s,a)})),E&&E.end()})),!0)}},{key:"setUniforms",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in d.h.priority>=2&&x(e,this.id,this._uniformSetters),this.gl.useProgram(this.handle),e){var n=e[t],r=this._uniformSetters[t];if(r){var i=n,a=!1;if(i instanceof h.a&&(i=i.texture),i instanceof f.a)if(a=this.uniforms[t]!==n){void 0===r.textureIndex&&(r.textureIndex=this._textureIndexCounter++);var o=i,s=r.textureIndex;o.bind(s),i=s,o.loaded||(this._texturesRenderable=!1),this._textureUniforms[t]=o}else i=r.textureIndex;else this._textureUniforms[t]&&delete this._textureUniforms[t];(r(i)||a)&&O(this.uniforms,t,n)}}return this}},{key:"_areTexturesRenderable",value:function(){if(this._texturesRenderable)return!0;for(var e in this._texturesRenderable=!0,this._textureUniforms){var t=this._textureUniforms[e];this._texturesRenderable=this._texturesRenderable&&t.loaded}return this._texturesRenderable}},{key:"_bindTextures",value:function(){for(var e in this._textureUniforms){var t=this._uniformSetters[e].textureIndex;this._textureUniforms[e].bind(t)}}},{key:"_createHandle",value:function(){return this.gl.createProgram()}},{key:"_deleteHandle",value:function(){this.gl.deleteProgram(this.handle)}},{key:"_getOptionsFromHandle",value:function(e){var t=this.gl.getAttachedShaders(e),n={},r=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var u=o.value;switch(this.gl.getShaderParameter(this.handle,35663)){case 35633:n.vs=new q({handle:u});break;case 35632:n.fs=new H({handle:u})}}}catch(A){i=!0,a=A}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}},{key:"_getParameter",value:function(e){return this.gl.getProgramParameter(this.handle,e)}},{key:"_setId",value:function(e){if(!e){var t=this._getName();this.id=Object(U.c)(t)}}},{key:"_getName",value:function(){var e=this.vs.getName()||this.fs.getName();return e=(e=e.replace(/shader/i,""))?"".concat(e,"-program"):"program"}},{key:"_compileAndLink",value:function(){var e=this.gl;if(e.attachShader(this.handle,this.vs.handle),e.attachShader(this.handle,this.fs.handle),d.h.time(4,"linkProgram for ".concat(this._getName()))(),e.linkProgram(this.handle),d.h.timeEnd(4,"linkProgram for ".concat(this._getName()))(),e.debug||d.h.level>0){if(!e.getProgramParameter(this.handle,35714))throw new Error("Error linking: ".concat(e.getProgramInfoLog(this.handle)));if(e.validateProgram(this.handle),!e.getProgramParameter(this.handle,35715))throw new Error("Error validating: ".concat(e.getProgramInfoLog(this.handle)))}}},{key:"_readUniformLocationsFromLinkedProgram",value:function(){var e=this.gl;this._uniformSetters={},this._uniformCount=this._getParameter(35718);for(var t=0;t<this._uniformCount;t++){var n=this.gl.getActiveUniform(this.handle,t),r=k(n.name),i=r.name,a=(r.isArray,e.getUniformLocation(this.handle,i));if(this._uniformSetters[i]=_(e,a,n),n.size>1)for(var o=0;o<n.size;o++)a=e.getUniformLocation(this.handle,"".concat(i,"[").concat(o,"]")),this._uniformSetters["".concat(i,"[").concat(o,"]")]=_(e,a,n)}this._textureIndexCounter=0}},{key:"getActiveUniforms",value:function(e,t){return this.gl.getActiveUniforms(this.handle,e,t)}},{key:"getUniformBlockIndex",value:function(e){return this.gl.getUniformBlockIndex(this.handle,e)}},{key:"getActiveUniformBlockParameter",value:function(e,t){return this.gl.getActiveUniformBlockParameter(this.handle,e,t)}},{key:"uniformBlockBinding",value:function(e,t){this.gl.uniformBlockBinding(this.handle,e,t)}}]),t}(l.a)},function(e,t,n){"use strict";var r=n(3),i=n(2),a=n(16),o=n(313),s="void main() {gl_FragColor = vec4(0);}",u="out vec4 transform_output;\nvoid main() {\n  transform_output = vec4(0);\n}",A="#version 300 es\n".concat(u);function c(e,t){t=Array.isArray(t)?t:[t];var n=e.replace(/^\s+/,"").split(/\s+/),r=Object(a.a)(n,3),i=r[0],o=r[1],s=r[2];return t.includes(i)&&o&&s?{qualifier:i,type:o,name:s.split(";")[0]}:null}function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.version,n=void 0===t?100:t,r=e.input,i=e.inputType,a=e.output;if(!r)return 300===n?A:n>300?"#version ".concat(n,"\n").concat(u):s;var o=h(r,i);return n>=300?"#version ".concat(n," ").concat(300===n?"es":"","\nin ").concat(i," ").concat(r,";\nout vec4 ").concat(a,";\nvoid main() {\n  ").concat(a," = ").concat(o,";\n}"):"varying ".concat(i," ").concat(r,";\nvoid main() {\n  gl_FragColor = ").concat(o,";\n}")}function f(e){switch(e){case"float":return 1;case"vec2":return 2;case"vec3":return 3;case"vec4":return 4;default:return Object(o.a)(!1),null}}function h(e,t){switch(t){case"float":return"vec4(".concat(e,", 0.0, 0.0, 1.0)");case"vec2":return"vec4(".concat(e,", 0.0, 1.0)");case"vec3":return"vec4(".concat(e,", 1.0)");case"vec4":return e;default:return Object(o.a)(!1),null}}var g=n(21),d=n(82),p=n(921),v=n(51),y=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,e),this.gl=t,this.currentIndex=0,this.feedbackMap={},this.varyings=null,this.bindings=[],this.resources={},this._initialize(n),Object.seal(this)}return Object(i.a)(e,[{key:"setupResources",value:function(e){var t=!0,n=!1,r=void 0;try{for(var i,a=this.bindings[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var o=i.value;this._setupTransformFeedback(o,e)}}catch(s){n=!0,r=s}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}}},{key:"updateModelProps",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.varyings;return t.length>0&&(e=Object.assign({},e,{varyings:t})),e}},{key:"getDrawOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.bindings[this.currentIndex],n=t.sourceBuffers,r=t.transformFeedback,i=Object.assign({},n,e.attributes);return{attributes:i,transformFeedback:r}}},{key:"swap",value:function(){return!!this.feedbackMap&&(this.currentIndex=this._getNextIndex(),!0)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupBuffers(e)}},{key:"getBuffer",value:function(e){var t=this.bindings[this.currentIndex].feedbackBuffers,n=e?t[e]:null;return n?n instanceof d.a?n:n.buffer:null}},{key:"getData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.varyingName,n=this.getBuffer(t);return n?n.getData():null}},{key:"delete",value:function(){for(var e in this.resources)this.resources[e].delete()}},{key:"_initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupBuffers(e),this.varyings=e.varyings||Object.keys(this.bindings[this.currentIndex].feedbackBuffers),this.varyings.length>0&&Object(v.a)(Object(g.g)(this.gl))}},{key:"_getFeedbackBuffers",value:function(e){var t=e.sourceBuffers,n=void 0===t?{}:t,r={};if(this.bindings[this.currentIndex]&&Object.assign(r,this.bindings[this.currentIndex].feedbackBuffers),this.feedbackMap)for(var i in this.feedbackMap){var a=this.feedbackMap[i];i in n&&(r[a]=i)}for(var o in Object.assign(r,e.feedbackBuffers),r){var s=r[o];if("string"===typeof s){var u=n[s],A=u.byteLength,c=u.usage,l=u.accessor;r[o]=this._createNewBuffer(o,{byteLength:A,usage:c,accessor:l})}}return r}},{key:"_setupBuffers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.sourceBuffers,n=void 0===t?null:t;Object.assign(this.feedbackMap,e.feedbackMap);var r=this._getFeedbackBuffers(e);this._updateBindings({sourceBuffers:n,feedbackBuffers:r})}},{key:"_setupTransformFeedback",value:function(e,t){var n=t.model.program;e.transformFeedback=new p.a(this.gl,{program:n,buffers:e.feedbackBuffers})}},{key:"_updateBindings",value:function(e){if(this.bindings[this.currentIndex]=this._updateBinding(this.bindings[this.currentIndex],e),this.feedbackMap){var t=this._swapBuffers(this.bindings[this.currentIndex]),n=t.sourceBuffers,r=t.feedbackBuffers,i=this._getNextIndex();this.bindings[i]=this._updateBinding(this.bindings[i],{sourceBuffers:n,feedbackBuffers:r})}}},{key:"_updateBinding",value:function(e,t){return e?(Object.assign(e.sourceBuffers,t.sourceBuffers),Object.assign(e.feedbackBuffers,t.feedbackBuffers),e.transformFeedback&&e.transformFeedback.setBuffers(e.feedbackBuffers),e):{sourceBuffers:Object.assign({},t.sourceBuffers),feedbackBuffers:Object.assign({},t.feedbackBuffers)}}},{key:"_swapBuffers",value:function(e){if(!this.feedbackMap)return null;var t=Object.assign({},e.sourceBuffers),n=Object.assign({},e.feedbackBuffers);for(var r in this.feedbackMap){var i=this.feedbackMap[r];t[r]=e.feedbackBuffers[i],n[i]=e.sourceBuffers[r],Object(v.a)(n[i]instanceof d.a)}return{sourceBuffers:t,feedbackBuffers:n}}},{key:"_createNewBuffer",value:function(e,t){var n=new d.a(this.gl,t);return this.resources[e]&&this.resources[e].delete(),this.resources[e]=n,n}},{key:"_getNextIndex",value:function(){return(this.currentIndex+1)%2}}]),e}(),m=n(1),I=n(362),b=n(179),E=n(140),C=n(462);function B(e){var t=100,n=e.match(/[^\s]+/g);if(n.length>=2&&"#version"===n[0]){var r=parseInt(n[1],10);Number.isFinite(r)&&(t=r)}return t}var w,Q=n(315),k={name:"transform",vs:"attribute float transform_elementID;\nvec2 transform_getPixelSizeHalf(vec2 size) {\n  return vec2(1.) / (2. * size);\n}\n\nvec2 transform_getPixelIndices(vec2 texSize, vec2 pixelSizeHalf) {\n  float yIndex = floor((transform_elementID / texSize[0]) + pixelSizeHalf[1]);\n  float xIndex = transform_elementID - (yIndex * texSize[0]);\n  return vec2(xIndex, yIndex);\n}\nvec2 transform_getTexCoord(vec2 size) {\n  vec2 pixelSizeHalf = transform_getPixelSizeHalf(size);\n  vec2 indices = transform_getPixelIndices(size, pixelSizeHalf);\n  vec2 coord = indices / size + pixelSizeHalf;\n  return coord;\n}\nvec2 transform_getPos(vec2 size) {\n  vec2 texCoord = transform_getTexCoord(size);\n  vec2 pos = (texCoord * (2.0, 2.0)) - (1., 1.);\n  return pos;\n}\nvec4 transform_getInput(sampler2D texSampler, vec2 size) {\n  vec2 texCoord = transform_getTexCoord(size);\n  vec4 textureColor = texture2D(texSampler, texCoord);\n  return textureColor;\n}\n",fs:null};function _(e){var t=e.vs,n=e.sourceTextureMap,r=e.targetTextureVarying,i=e.targetTexture,a=Object.keys(n).length,s=null,u={},A=t,l={};if(a>0||r){var f=A.split("\n"),h=f.slice();if(f.forEach((function(e,t,i){if(a>0){var A=function(e,t){var n={},r=function(e){return c(e,["attribute","in"])}(e);if(!r)return null;var i=r.type,a=r.name;if(a&&t[a]){var s="// ".concat(e," => Replaced by Transform with a sampler"),u=function(e){var t="".concat("transform_uSampler_").concat(e),n="".concat("transform_uSize_").concat(e),r="  uniform sampler2D ".concat(t,";\n  uniform vec2 ").concat(n,";");return{samplerName:t,sizeName:n,uniformDeclerations:r}}(a),A=u.samplerName,l=u.sizeName,f=u.uniformDeclerations,h=function(e){switch(e){case"float":return"x";case"vec2":return"xy";case"vec3":return"xyz";case"vec4":return"xyzw";default:return Object(o.a)(!1),null}}(i),g="  ".concat(i," ").concat(a," = transform_getInput(").concat(A,", ").concat(l,").").concat(h,";\n");return n[A]=a,{updatedLine:s,inject:{"vs:#decl":f,"vs:#main-start":g},samplerTextureMap:n}}return null}(e,n);if(A){var f=A.updatedLine,g=A.inject;h[t]=f,l=Object(Q.b)([l,g]),Object.assign(u,A.samplerTextureMap),a--}}r&&!s&&(s=function(e,t){var n=c(e,["varying","out"]);if(!n)return null;return n.name===t?n.type:null}(e,r))})),r){Object(v.a)(i);var g="".concat("transform_uSize_").concat(r),d={"vs:#decl":"uniform vec2 ".concat(g,";\n"),"vs:#main-start":"     vec2 ".concat("transform_position"," = transform_getPos(").concat(g,");\n     gl_Position = vec4(").concat("transform_position",", 0, 1.);\n")};l=Object(Q.b)([l,d])}A=h.join("\n")}return{vs:A,targetTextureType:s,inject:l,samplerTextureMap:u}}function x(e){var t,n,r=e.sourceTextureMap,i=e.targetTextureVarying,a=e.targetTexture,o={};for(var s in i&&(t=a.width,n=a.height,o["".concat("transform_uSize_").concat(i)]=[t,n]),r){var u=r[s];t=u.width,n=u.height,o["".concat("transform_uSize_").concat(s)]=[t,n]}return o}var S=(w={},Object(m.a)(w,10241,9728),Object(m.a)(w,10240,9728),Object(m.a)(w,10242,33071),Object(m.a)(w,10243,33071),w),O=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,e),this.gl=t,this.currentIndex=0,this._swapTexture=null,this.targetTextureVarying=null,this.targetTextureType=null,this.samplerTextureMap=null,this.bindings=[],this.resources={},this._initialize(n),Object.seal(this)}return Object(i.a)(e,[{key:"updateModelProps",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this._processVertexShader(e);return Object.assign({},e,t)}},{key:"getDrawOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.bindings[this.currentIndex],n=t.sourceBuffers,r=t.sourceTextures,i=t.framebuffer,a=t.targetTexture,o=Object.assign({},n,e.attributes),s=Object.assign({},e.uniforms),u=Object.assign({},e.parameters),A=e.discard;if(this.hasSourceTextures||this.hasTargetTexture){for(var c in o.transform_elementID=this.elementIDBuffer,this.samplerTextureMap){var l=this.samplerTextureMap[c];s[c]=r[l]}this._setSourceTextureParameters();var f=x({sourceTextureMap:r,targetTextureVarying:this.targetTextureVarying,targetTexture:a});Object.assign(s,f)}return this.hasTargetTexture&&(A=!1,u.viewport=[0,0,i.width,i.height]),{attributes:o,framebuffer:i,uniforms:s,discard:A,parameters:u}}},{key:"swap",value:function(){return!!this._swapTexture&&(this.currentIndex=this._getNextIndex(),!0)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupTextures(e)}},{key:"getTargetTexture",value:function(){return this.bindings[this.currentIndex].targetTexture}},{key:"getData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.packed,n=void 0!==t&&t,r=this.bindings[this.currentIndex].framebuffer,i=Object(I.c)(r);if(!n)return i;for(var a=i.constructor,o=f(this.targetTextureType),s=new a(i.length*o/4),u=0,A=0;A<i.length;A+=4)for(var c=0;c<o;c++)s[u++]=i[A+c];return s}},{key:"getFramebuffer",value:function(){return this.bindings[this.currentIndex].framebuffer}},{key:"delete",value:function(){this.ownTexture&&this.ownTexture.delete(),this.elementIDBuffer&&this.elementIDBuffer.delete()}},{key:"_initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e._targetTextureVarying,n=e._swapTexture;this._swapTexture=n,this.targetTextureVarying=t,this.hasTargetTexture=t,this._setupTextures(e)}},{key:"_createTargetTexture",value:function(e){var t=e.sourceTextures,n=e.textureOrReference;if(n instanceof b.a)return n;var r=t[n];return r?(this._targetRefTexName=n,this._createNewTexture(r)):null}},{key:"_setupTextures",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.sourceBuffers,n=e._sourceTextures,r=void 0===n?{}:n,i=e._targetTexture,a=this._createTargetTexture({sourceTextures:r,textureOrReference:i});this.hasSourceTextures=this.hasSourceTextures||r&&Object.keys(r).length>0,this._updateBindings({sourceBuffers:t,sourceTextures:r,targetTexture:a}),"elementCount"in e&&this._updateElementIDBuffer(e.elementCount)}},{key:"_updateElementIDBuffer",value:function(e){if(!("number"!==typeof e||this.elementCount>=e)){var t=new Float32Array(e);t.forEach((function(e,t,n){n[t]=t})),this.elementIDBuffer?this.elementIDBuffer.setData({data:t}):this.elementIDBuffer=new d.a(this.gl,{data:t,accessor:{size:1}}),this.elementCount=e}}},{key:"_updateBindings",value:function(e){if(this.bindings[this.currentIndex]=this._updateBinding(this.bindings[this.currentIndex],e),this._swapTexture){var t=this._swapTextures(this.bindings[this.currentIndex]),n=t.sourceTextures,r=t.targetTexture,i=this._getNextIndex();this.bindings[i]=this._updateBinding(this.bindings[i],{sourceTextures:n,targetTexture:r})}}},{key:"_updateBinding",value:function(e,t){var n=t.sourceBuffers,r=t.sourceTextures,i=t.targetTexture;if(e||(e={sourceBuffers:{},sourceTextures:{},targetTexture:null}),Object.assign(e.sourceTextures,r),Object.assign(e.sourceBuffers,n),i){e.targetTexture=i;var a=i.width,o=i.height,s=e.framebuffer;s?(s.update({attachments:Object(m.a)({},36064,i),resizeAttachments:!1}),s.resize({width:a,height:o})):e.framebuffer=new E.a(this.gl,{id:"".concat(this.id||"transform","-framebuffer"),width:a,height:o,attachments:Object(m.a)({},36064,i)})}return e}},{key:"_setSourceTextureParameters",value:function(){var e=this.currentIndex,t=this.bindings[e].sourceTextures;for(var n in t)t[n].setParameters(S)}},{key:"_swapTextures",value:function(e){if(!this._swapTexture)return null;var t=Object.assign({},e.sourceTextures);return t[this._swapTexture]=e.targetTexture,{sourceTextures:t,targetTexture:e.sourceTextures[this._swapTexture]}}},{key:"_createNewTexture",value:function(e){var t,n=Object(C.a)(e,{parameters:(t={},Object(m.a)(t,10241,9728),Object(m.a)(t,10240,9728),Object(m.a)(t,10242,33071),Object(m.a)(t,10243,33071),t),pixelStore:Object(m.a)({},37440,!1)});return this.ownTexture&&this.ownTexture.delete(),this.ownTexture=n,n}},{key:"_getNextIndex",value:function(){return(this.currentIndex+1)%2}},{key:"_processVertexShader",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.bindings[this.currentIndex],n=t.sourceTextures,r=t.targetTexture,i=_({vs:e.vs,sourceTextureMap:n,targetTextureVarying:this.targetTextureVarying,targetTexture:r}),a=i.vs,o=i.uniforms,s=i.targetTextureType,u=i.inject,A=i.samplerTextureMap,c=Object(Q.b)([e.inject||{},u]);this.targetTextureType=s,this.samplerTextureMap=A;var f=e._fs||l({version:B(a),input:this.targetTextureVarying,inputType:s,output:"transform_output"}),h=this.hasSourceTextures||this.targetTextureVarying?[k].concat(e.modules||[]):e.modules;return{vs:a,fs:f,modules:h,uniforms:o,inject:c}}}]),e}(),D=n(193),R=n(311);n.d(t,"a",(function(){return j}));var j=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,e),this.gl=t,this.model=null,this.elementCount=0,this.bufferTransform=null,this.textureTransform=null,this.elementIDBuffer=null,this._initialize(n),Object.seal(this)}return Object(i.a)(e,null,[{key:"isSupported",value:function(e){return Object(g.g)(e)}}]),Object(i.a)(e,[{key:"delete",value:function(){var e=this.model,t=this.bufferTransform,n=this.textureTransform;e&&e.delete(),t&&t.delete(),n&&n.delete()}},{key:"run",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.clearRenderTarget,n=void 0===t||t,r=this._updateDrawOptions(e);n&&r.framebuffer&&r.framebuffer.clear({color:!0}),this.model.transform(r)}},{key:"swap",value:function(){var e=!1,t=[this.bufferTransform,this.textureTransform].filter(Boolean),n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;e=e||s.swap()}}catch(u){r=!0,i=u}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}Object(v.a)(e,"Nothing to swap")}},{key:"getBuffer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.bufferTransform&&this.bufferTransform.getBuffer(e)}},{key:"getData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[this.bufferTransform,this.textureTransform].filter(Boolean),n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value,u=s.getData(e);if(u)return u}}catch(A){r=!0,i=A}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}return null}},{key:"getFramebuffer",value:function(){return this.textureTransform&&this.textureTransform.getFramebuffer()}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"elementCount"in e&&this.model.setVertexCount(e.elementCount);var t=[this.bufferTransform,this.textureTransform].filter(Boolean),n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;s.update(e)}}catch(u){r=!0,i=u}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}},{key:"_initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.gl;this._buildResourceTransforms(t,e),e=this._updateModelProps(e),this.model=new R.a(t,Object.assign({},e,{fs:e.fs||l({version:B(e.vs)}),id:e.id||"transform-model",drawMode:e.drawMode||0,vertexCount:e.elementCount})),this.bufferTransform&&this.bufferTransform.setupResources({model:this.model})}},{key:"_updateModelProps",value:function(e){var t=Object.assign({},e),n=[this.bufferTransform,this.textureTransform].filter(Boolean),r=!0,i=!1,a=void 0;try{for(var o,s=n[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){t=o.value.updateModelProps(t)}}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return t}},{key:"_buildResourceTransforms",value:function(e,t){(function(e){if(!Object(D.a)(e.feedbackBuffers)||!Object(D.a)(e.feedbackMap)||e.varyings&&e.varyings.length>0)return!0;return!1})(t)&&(this.bufferTransform=new y(e,t)),function(e){if(!Object(D.a)(e._sourceTextures)||e._targetTexture||e._targetTextureVarying)return!0;return!1}(t)&&(this.textureTransform=new O(e,t)),Object(v.a)(this.bufferTransform||this.textureTransform,"must provide source/feedback buffers or source/target textures")}},{key:"_updateDrawOptions",value:function(e){var t=Object.assign({},e),n=[this.bufferTransform,this.textureTransform].filter(Boolean),r=!0,i=!1,a=void 0;try{for(var o,s=n[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var u=o.value;t=Object.assign(t,u.getDrawOptions(t))}}catch(A){i=!0,a=A}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return t}}]),e}()},function(e,t,n){"use strict";var r=n(25),i=n(12),a=n.n(i),o=n(26),s=n(3),u=n(2),A=n(21),c=n(257),l=n(51),f=n(7),h=n(4),g=n(58),d=n(6),p=n(89),v=n(734),y=n(359),m=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(s.a)(this,t),(n=Object(f.a)(this,Object(h.a)(t).call(this,e,r))).target=null,n._queryPending=!1,n._pollingPromise=null,Object.seal(Object(g.a)(n)),n}return Object(d.a)(t,e),Object(u.a)(t,null,[{key:"isSupported",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object(A.g)(e),r=Object(v.c)(e,y.a.TIMER_QUERY),i=n||r,a=!0,o=!1,s=void 0;try{for(var u,c=t[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var f=u.value;switch(f){case"queries":i=i&&n;break;case"timers":i=i&&r;break;default:Object(l.a)(!1)}}}catch(h){o=!0,s=h}finally{try{a||null==c.return||c.return()}finally{if(o)throw s}}return i}}]),Object(u.a)(t,[{key:"beginTimeElapsedQuery",value:function(){return this.begin(35007)}},{key:"beginOcclusionQuery",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.conservative,n=void 0!==t&&t;return this.begin(n?36202:35887)}},{key:"beginTransformFeedbackQuery",value:function(){return this.begin(35976)}},{key:"begin",value:function(e){return this._queryPending||(this.target=e,this.gl.beginQuery(this.target,this.handle)),this}},{key:"end",value:function(){return this._queryPending||this.target&&(this.gl.endQuery(this.target),this.target=null,this._queryPending=!0),this}},{key:"isResultAvailable",value:function(){if(!this._queryPending)return!1;var e=this.gl.getQueryParameter(this.handle,34919);return e&&(this._queryPending=!1),e}},{key:"isTimerDisjoint",value:function(){return this.gl.getParameter(36795)}},{key:"getResult",value:function(){return this.gl.getQueryParameter(this.handle,34918)}},{key:"getTimerMilliseconds",value:function(){return this.getResult()/1e6}},{key:"createPoll",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;if(this._pollingPromise)return this._pollingPromise;var n=0;return this._pollingPromise=new Promise((function(r,i){requestAnimationFrame((function a(){e.isResultAvailable()?(r(e.getResult()),e._pollingPromise=null):n++>t?(i("Timed out"),e._pollingPromise=null):requestAnimationFrame(a)}))})),this._pollingPromise}},{key:"_createHandle",value:function(){return t.isSupported(this.gl)?this.gl.createQuery():null}},{key:"_deleteHandle",value:function(){this.gl.deleteQuery(this.handle)}}]),t}(p.a);function I(e){return"undefined"!==typeof window&&window.cancelAnimationFrame?window.cancelAnimationFrame(e):clearTimeout(e)}var b=n(140),E=n(61);n.d(t,"a",(function(){return w}));var C=Object(E.isBrowser)()&&"undefined"!==typeof document,B=0,w=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(s.a)(this,e);var n=t.onCreateContext,r=void 0===n?function(e){return Object(A.a)(e)}:n,i=t.onAddHTML,a=void 0===i?null:i,o=t.onInitialize,u=void 0===o?function(){}:o,l=t.onRender,f=void 0===l?function(){}:l,h=t.onFinalize,g=void 0===h?function(){}:h,d=t.onError,p=t.gl,v=void 0===p?null:p,y=t.glOptions,m=void 0===y?{}:y,I=t.debug,b=void 0!==I&&I,E=t.createFramebuffer,C=void 0!==E&&E,w=t.autoResizeViewport,Q=void 0===w||w,k=t.autoResizeDrawingBuffer,_=void 0===k||k,x=t.stats,S=void 0===x?c.a.get("animation-loop-".concat(B++)):x,O=t.useDevicePixels,D=void 0===O||O;"useDevicePixelRatio"in t&&(A.h.deprecated("useDevicePixelRatio","useDevicePixels")(),D=t.useDevicePixelRatio),this.props={onCreateContext:r,onAddHTML:a,onInitialize:u,onRender:f,onFinalize:g,onError:d,gl:v,glOptions:m,debug:b,createFramebuffer:C},this.gl=v,this.needsRedraw=null,this.timeline=null,this.stats=S,this.cpuTime=this.stats.get("CPU Time"),this.gpuTime=this.stats.get("GPU Time"),this.frameRate=this.stats.get("Frame Rate"),this._initialized=!1,this._running=!1,this._animationFrameId=null,this._nextFramePromise=null,this._resolveNextFrame=null,this._cpuStartTime=0,this.setProps({autoResizeViewport:Q,autoResizeDrawingBuffer:_,useDevicePixels:D}),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this._pageLoadPromise=null,this._onMousemove=this._onMousemove.bind(this),this._onMouseleave=this._onMouseleave.bind(this)}return Object(u.a)(e,[{key:"delete",value:function(){this.stop(),this._setDisplay(null)}},{key:"setNeedsRedraw",value:function(e){return Object(l.a)("string"===typeof e),this.needsRedraw=this.needsRedraw||e,this}},{key:"setProps",value:function(e){return"autoResizeViewport"in e&&(this.autoResizeViewport=e.autoResizeViewport),"autoResizeDrawingBuffer"in e&&(this.autoResizeDrawingBuffer=e.autoResizeDrawingBuffer),"useDevicePixels"in e&&(this.useDevicePixels=e.useDevicePixels),this}},{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._running)return this;this._running=!0;var n=this._getPageLoadPromise().then((function(){return!e._running||e._initialized?null:(e._createWebGLContext(t),e._createFramebuffer(),e._startEventHandling(),e._initializeCallbackData(),e._updateCallbackData(),e._resizeCanvasDrawingBuffer(),e._resizeViewport(),e._gpuTimeQuery=m.isSupported(e.gl,["timers"])?new m(e.gl):null,e._initialized=!0,e.onInitialize(e.animationProps))})).then((function(t){e._running&&(e._addCallbackData(t||{}),!1!==t&&e._startLoop())}));return this.props.onError&&n.catch(this.props.onError),this}},{key:"redraw",value:function(){return this._beginTimers(),this._setupFrame(),this._updateCallbackData(),this._renderFrame(this.animationProps),this._clearNeedsRedraw(),this.offScreen&&this.gl.commit&&this.gl.commit(),this._resolveNextFrame&&(this._resolveNextFrame(this),this._nextFramePromise=null,this._resolveNextFrame=null),this._endTimers(),this}},{key:"stop",value:function(){return this._running&&(this._finalizeCallbackData(),I(this._animationFrameId),this._nextFramePromise=null,this._resolveNextFrame=null,this._animationFrameId=null,this._running=!1),this}},{key:"attachTimeline",value:function(e){return this.timeline=e,this.timeline}},{key:"detachTimeline",value:function(){this.timeline=null}},{key:"waitForRender",value:function(){var e=this;return this.setNeedsRedraw("waitForRender"),this._nextFramePromise||(this._nextFramePromise=new Promise((function(t){e._resolveNextFrame=t}))),this._nextFramePromise}},{key:"toDataURL",value:function(){var e=Object(o.a)(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setNeedsRedraw("toDataURL"),e.next=3,this.waitForRender();case 3:return e.abrupt("return",this.gl.canvas.toDataURL());case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"onCreateContext",value:function(){var e;return(e=this.props).onCreateContext.apply(e,arguments)}},{key:"onInitialize",value:function(){var e;return(e=this.props).onInitialize.apply(e,arguments)}},{key:"onRender",value:function(){var e;return(e=this.props).onRender.apply(e,arguments)}},{key:"onFinalize",value:function(){var e;return(e=this.props).onFinalize.apply(e,arguments)}},{key:"getHTMLControlValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=document.getElementById(e);return n?Number(n.value):t}},{key:"setViewParameters",value:function(){return A.h.removed("AnimationLoop.setViewParameters","AnimationLoop.setProps")(),this}},{key:"_startLoop",value:function(){var e=this;I(this._animationFrameId),this._animationFrameId=this._requestAnimationFrame((function t(){e._running&&(e.redraw(),e._animationFrameId=e._requestAnimationFrame(t))}))}},{key:"_getPageLoadPromise",value:function(){return this._pageLoadPromise||(this._pageLoadPromise=C?new Promise((function(e,t){C&&"complete"===document.readyState?e(document):window.addEventListener("load",(function(){e(document)}))})):Promise.resolve({})),this._pageLoadPromise}},{key:"_setDisplay",value:function(e){this.display&&(this.display.delete(),this.display.animationLoop=null),e&&(e.animationLoop=this),this.display=e}},{key:"_requestAnimationFrame",value:function(e){var t;this.display&&this.display.requestAnimationFrame(e)||(t=e,"undefined"!==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame(t):setTimeout(t,1e3/60))}},{key:"_renderFrame",value:function(){var e;this.display?(e=this.display)._renderFrame.apply(e,arguments):this.onRender.apply(this,arguments)}},{key:"_clearNeedsRedraw",value:function(){this.needsRedraw=null}},{key:"_setupFrame",value:function(){this._onSetupFrame?this._onSetupFrame(this.animationProps):(this._resizeCanvasDrawingBuffer(),this._resizeViewport(),this._resizeFramebuffer())}},{key:"_initializeCallbackData",value:function(){this.animationProps={gl:this.gl,stop:this.stop,canvas:this.gl.canvas,framebuffer:this.framebuffer,useDevicePixels:this.useDevicePixels,needsRedraw:null,startTime:Date.now(),engineTime:0,tick:0,tock:0,time:0,_timeline:this.timeline,_loop:this,_animationLoop:this,_mousePosition:null}}},{key:"_updateCallbackData",value:function(){var e=this._getSizeAndAspect(),t=e.width,n=e.height,r=e.aspect;t===this.animationProps.width&&n===this.animationProps.height||this.setNeedsRedraw("drawing buffer resized"),r!==this.animationProps.aspect&&this.setNeedsRedraw("drawing buffer aspect changed"),this.animationProps.width=t,this.animationProps.height=n,this.animationProps.aspect=r,this.animationProps.needsRedraw=this.needsRedraw,this.animationProps.engineTime=Date.now()-this.animationProps.startTime,this.timeline&&this.timeline.update(this.animationProps.engineTime),this.animationProps.tick=Math.floor(this.animationProps.time/1e3*60),this.animationProps.tock++,this.animationProps.time=this.timeline?this.timeline.getTime():this.animationProps.engineTime,this.animationProps._offScreen=this.offScreen}},{key:"_finalizeCallbackData",value:function(){this.onFinalize(this.animationProps)}},{key:"_addCallbackData",value:function(e){"object"===Object(r.a)(e)&&null!==e&&(this.animationProps=Object.assign({},this.animationProps,e))}},{key:"_createWebGLContext",value:function(e){if(this.offScreen=e.canvas&&"undefined"!==typeof OffscreenCanvas&&e.canvas instanceof OffscreenCanvas,e=Object.assign({},e,this.props.glOptions),this.gl=this.props.gl?Object(A.e)(this.props.gl,e):this.onCreateContext(e),!Object(A.f)(this.gl))throw new Error("AnimationLoop.onCreateContext - illegal context returned");Object(A.i)(this.gl),this._createInfoDiv()}},{key:"_createInfoDiv",value:function(){if(this.gl.canvas&&this.props.onAddHTML){var e=document.createElement("div");document.body.appendChild(e),e.style.position="relative";var t=document.createElement("div");t.style.position="absolute",t.style.left="10px",t.style.bottom="10px",t.style.width="300px",t.style.background="white",e.appendChild(this.gl.canvas),e.appendChild(t);var n=this.props.onAddHTML(t);n&&(t.innerHTML=n)}}},{key:"_getSizeAndAspect",value:function(){var e=this.gl.drawingBufferWidth,t=this.gl.drawingBufferHeight,n=1,r=this.gl.canvas;return r&&r.clientHeight?n=r.clientWidth/r.clientHeight:e>0&&t>0&&(n=e/t),{width:e,height:t,aspect:n}}},{key:"_resizeViewport",value:function(){this.autoResizeViewport&&this.gl.viewport(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight)}},{key:"_resizeCanvasDrawingBuffer",value:function(){this.autoResizeDrawingBuffer&&Object(A.j)(this.gl,{useDevicePixels:this.useDevicePixels})}},{key:"_createFramebuffer",value:function(){this.props.createFramebuffer&&(this.framebuffer=new b.a(this.gl))}},{key:"_resizeFramebuffer",value:function(){this.framebuffer&&this.framebuffer.resize({width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight})}},{key:"_beginTimers",value:function(){this.frameRate.timeEnd(),this.frameRate.timeStart(),this._gpuTimeQuery&&this._gpuTimeQuery.isResultAvailable()&&!this._gpuTimeQuery.isTimerDisjoint()&&this.stats.get("GPU Time").addTime(this._gpuTimeQuery.getTimerMilliseconds()),this._gpuTimeQuery&&this._gpuTimeQuery.beginTimeElapsedQuery(),this.cpuTime.timeStart()}},{key:"_endTimers",value:function(){this.cpuTime.timeEnd(),this._gpuTimeQuery&&this._gpuTimeQuery.end()}},{key:"_startEventHandling",value:function(){var e=this.gl.canvas;e&&(e.addEventListener("mousemove",this._onMousemove),e.addEventListener("mouseleave",this._onMouseleave))}},{key:"_onMousemove",value:function(e){this.animationProps._mousePosition=[e.offsetX,e.offsetY]}},{key:"_onMouseleave",value:function(e){this.animationProps._mousePosition=null}}]),e}()},function(e,t,n){"use strict";var r=n(254);t.a={name:"pbr",vs:"uniform mat4 u_MVPMatrix;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_NormalMatrix;\n\nvarying vec3 pbr_vPosition;\nvarying vec2 pbr_vUV;\n\n#ifdef HAS_NORMALS\n# ifdef HAS_TANGENTS\nvarying mat3 pbr_vTBN;\n# else\nvarying vec3 pbr_vNormal;\n# endif\n#endif\n\nvoid pbr_setPositionNormalTangentUV(vec4 position, vec4 normal, vec4 tangent, vec2 uv)\n{\n  vec4 pos = u_ModelMatrix * position;\n  pbr_vPosition = vec3(pos.xyz) / pos.w;\n\n#ifdef HAS_NORMALS\n#ifdef HAS_TANGENTS\n  vec3 normalW = normalize(vec3(u_NormalMatrix * vec4(normal.xyz, 0.0)));\n  vec3 tangentW = normalize(vec3(u_ModelMatrix * vec4(tangent.xyz, 0.0)));\n  vec3 bitangentW = cross(normalW, tangentW) * tangent.w;\n  pbr_vTBN = mat3(tangentW, bitangentW, normalW);\n#else\n  pbr_vNormal = normalize(vec3(u_ModelMatrix * vec4(normal.xyz, 0.0)));\n#endif\n#endif\n\n#ifdef HAS_UV\n  pbr_vUV = uv;\n#else\n  pbr_vUV = vec2(0.,0.);\n#endif\n}\n",fs:"#if (__VERSION__ < 300)\n#extension GL_EXT_shader_texture_lod: enable\n#extension GL_OES_standard_derivatives : enable\n#endif\n\n\n#if (__VERSION__ < 300)\n  #define SMART_FOR(INIT, WEBGL1COND, WEBGL2COND, INCR) for (INIT; WEBGL1COND; INCR)\n#else\n  #define SMART_FOR(INIT, WEBGL1COND, WEBGL2COND, INCR) for (INIT; WEBGL2COND; INCR)\n#endif\n\nprecision highp float;\n\nuniform bool pbr_uUnlit;\n\n#ifdef USE_IBL\nuniform samplerCube u_DiffuseEnvSampler;\nuniform samplerCube u_SpecularEnvSampler;\nuniform sampler2D u_brdfLUT;\nuniform vec2 u_ScaleIBLAmbient;\n#endif\n\n#ifdef HAS_BASECOLORMAP\nuniform sampler2D u_BaseColorSampler;\n#endif\n#ifdef HAS_NORMALMAP\nuniform sampler2D u_NormalSampler;\nuniform float u_NormalScale;\n#endif\n#ifdef HAS_EMISSIVEMAP\nuniform sampler2D u_EmissiveSampler;\nuniform vec3 u_EmissiveFactor;\n#endif\n#ifdef HAS_METALROUGHNESSMAP\nuniform sampler2D u_MetallicRoughnessSampler;\n#endif\n#ifdef HAS_OCCLUSIONMAP\nuniform sampler2D u_OcclusionSampler;\nuniform float u_OcclusionStrength;\n#endif\n\n#ifdef ALPHA_CUTOFF\nuniform float u_AlphaCutoff;\n#endif\n\nuniform vec2 u_MetallicRoughnessValues;\nuniform vec4 u_BaseColorFactor;\n\nuniform vec3 u_Camera;\n#ifdef PBR_DEBUG\nuniform vec4 u_ScaleDiffBaseMR;\nuniform vec4 u_ScaleFGDSpec;\n#endif\n\nvarying vec3 pbr_vPosition;\n\nvarying vec2 pbr_vUV;\n\n#ifdef HAS_NORMALS\n#ifdef HAS_TANGENTS\nvarying mat3 pbr_vTBN;\n#else\nvarying vec3 pbr_vNormal;\n#endif\n#endif\n\n\nstruct PBRInfo\n{\n  float NdotL;\n  float NdotV;\n  float NdotH;\n  float LdotH;\n  float VdotH;\n  float perceptualRoughness;\n  float metalness;\n  vec3 reflectance0;\n  vec3 reflectance90;\n  float alphaRoughness;\n  vec3 diffuseColor;\n  vec3 specularColor;\n  vec3 n;\n  vec3 v;\n};\n\nconst float M_PI = 3.141592653589793;\nconst float c_MinRoughness = 0.04;\n\nvec4 SRGBtoLINEAR(vec4 srgbIn)\n{\n#ifdef MANUAL_SRGB\n#ifdef SRGB_FAST_APPROXIMATION\n  vec3 linOut = pow(srgbIn.xyz,vec3(2.2));\n#else\n  vec3 bLess = step(vec3(0.04045),srgbIn.xyz);\n  vec3 linOut = mix( srgbIn.xyz/vec3(12.92), pow((srgbIn.xyz+vec3(0.055))/vec3(1.055),vec3(2.4)), bLess );\n#endif\n  return vec4(linOut,srgbIn.w);;\n#else\n  return srgbIn;\n#endif\n}\n\nvec3 getNormal()\n{\n#ifndef HAS_TANGENTS\n  vec3 pos_dx = dFdx(pbr_vPosition);\n  vec3 pos_dy = dFdy(pbr_vPosition);\n  vec3 tex_dx = dFdx(vec3(pbr_vUV, 0.0));\n  vec3 tex_dy = dFdy(vec3(pbr_vUV, 0.0));\n  vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n\n#ifdef HAS_NORMALS\n  vec3 ng = normalize(pbr_vNormal);\n#else\n  vec3 ng = cross(pos_dx, pos_dy);\n#endif\n\n  t = normalize(t - ng * dot(ng, t));\n  vec3 b = normalize(cross(ng, t));\n  mat3 tbn = mat3(t, b, ng);\n#else\n  mat3 tbn = pbr_vTBN;\n#endif\n\n#ifdef HAS_NORMALMAP\n  vec3 n = texture2D(u_NormalSampler, pbr_vUV).rgb;\n  n = normalize(tbn * ((2.0 * n - 1.0) * vec3(u_NormalScale, u_NormalScale, 1.0)));\n#else\n  vec3 n = normalize(tbn[2].xyz);\n#endif\n\n  return n;\n}\n\n\n#ifdef USE_IBL\nvec3 getIBLContribution(PBRInfo pbrInputs, vec3 n, vec3 reflection)\n{\n  float mipCount = 9.0;\n  float lod = (pbrInputs.perceptualRoughness * mipCount);\n  vec3 brdf = SRGBtoLINEAR(texture2D(u_brdfLUT,\n    vec2(pbrInputs.NdotV, 1.0 - pbrInputs.perceptualRoughness))).rgb;\n  vec3 diffuseLight = SRGBtoLINEAR(textureCube(u_DiffuseEnvSampler, n)).rgb;\n\n#ifdef USE_TEX_LOD\n  vec3 specularLight = SRGBtoLINEAR(textureCubeLodEXT(u_SpecularEnvSampler, reflection, lod)).rgb;\n#else\n  vec3 specularLight = SRGBtoLINEAR(textureCube(u_SpecularEnvSampler, reflection)).rgb;\n#endif\n\n  vec3 diffuse = diffuseLight * pbrInputs.diffuseColor;\n  vec3 specular = specularLight * (pbrInputs.specularColor * brdf.x + brdf.y);\n  diffuse *= u_ScaleIBLAmbient.x;\n  specular *= u_ScaleIBLAmbient.y;\n\n  return diffuse + specular;\n}\n#endif\n\n\nvec3 diffuse(PBRInfo pbrInputs)\n{\n  return pbrInputs.diffuseColor / M_PI;\n}\n\nvec3 specularReflection(PBRInfo pbrInputs)\n{\n  return pbrInputs.reflectance0 +\n    (pbrInputs.reflectance90 - pbrInputs.reflectance0) *\n    pow(clamp(1.0 - pbrInputs.VdotH, 0.0, 1.0), 5.0);\n}\n\n\n\nfloat geometricOcclusion(PBRInfo pbrInputs)\n{\n  float NdotL = pbrInputs.NdotL;\n  float NdotV = pbrInputs.NdotV;\n  float r = pbrInputs.alphaRoughness;\n\n  float attenuationL = 2.0 * NdotL / (NdotL + sqrt(r * r + (1.0 - r * r) * (NdotL * NdotL)));\n  float attenuationV = 2.0 * NdotV / (NdotV + sqrt(r * r + (1.0 - r * r) * (NdotV * NdotV)));\n  return attenuationL * attenuationV;\n}\n\n\n\n\n\nfloat microfacetDistribution(PBRInfo pbrInputs)\n{\n  float roughnessSq = pbrInputs.alphaRoughness * pbrInputs.alphaRoughness;\n  float f = (pbrInputs.NdotH * roughnessSq - pbrInputs.NdotH) * pbrInputs.NdotH + 1.0;\n  return roughnessSq / (M_PI * f * f);\n}\n\nvoid PBRInfo_setAmbientLight(inout PBRInfo pbrInputs) {\n  pbrInputs.NdotL = 1.0;\n  pbrInputs.NdotH = 0.0;\n  pbrInputs.LdotH = 0.0;\n  pbrInputs.VdotH = 1.0;\n}\n\nvoid PBRInfo_setDirectionalLight(inout PBRInfo pbrInputs, vec3 lightDirection) {\n  vec3 n = pbrInputs.n;\n  vec3 v = pbrInputs.v;\n  vec3 l = normalize(lightDirection);\n  vec3 h = normalize(l+v);\n\n  pbrInputs.NdotL = clamp(dot(n, l), 0.001, 1.0);\n  pbrInputs.NdotH = clamp(dot(n, h), 0.0, 1.0);\n  pbrInputs.LdotH = clamp(dot(l, h), 0.0, 1.0);\n  pbrInputs.VdotH = clamp(dot(v, h), 0.0, 1.0);\n}\n\nvoid PBRInfo_setPointLight(inout PBRInfo pbrInputs, PointLight pointLight) {\n  vec3 light_direction = normalize(pointLight.position - pbr_vPosition);\n  PBRInfo_setDirectionalLight(pbrInputs, light_direction);\n}\n\nvec3 calculateFinalColor(PBRInfo pbrInputs, vec3 lightColor) {\n  vec3 F = specularReflection(pbrInputs);\n  float G = geometricOcclusion(pbrInputs);\n  float D = microfacetDistribution(pbrInputs);\n  vec3 diffuseContrib = (1.0 - F) * diffuse(pbrInputs);\n  vec3 specContrib = F * G * D / (4.0 * pbrInputs.NdotL * pbrInputs.NdotV);\n  return pbrInputs.NdotL * lightColor * (diffuseContrib + specContrib);\n}\n\nvec4 pbr_filterColor(vec4 colorUnused)\n{\n#ifdef HAS_BASECOLORMAP\n  vec4 baseColor = SRGBtoLINEAR(texture2D(u_BaseColorSampler, pbr_vUV)) * u_BaseColorFactor;\n#else\n  vec4 baseColor = u_BaseColorFactor;\n#endif\n\n#ifdef ALPHA_CUTOFF\n  if (baseColor.a < u_AlphaCutoff) {\n    discard;\n  }\n#endif\n\n  vec3 color = vec3(0, 0, 0);\n\n  if(pbr_uUnlit){\n    color.rgb = baseColor.rgb;\n  }\n  else{\n\n\n    float perceptualRoughness = u_MetallicRoughnessValues.y;\n    float metallic = u_MetallicRoughnessValues.x;\n#ifdef HAS_METALROUGHNESSMAP\n\n    vec4 mrSample = texture2D(u_MetallicRoughnessSampler, pbr_vUV);\n    perceptualRoughness = mrSample.g * perceptualRoughness;\n    metallic = mrSample.b * metallic;\n#endif\n    perceptualRoughness = clamp(perceptualRoughness, c_MinRoughness, 1.0);\n    metallic = clamp(metallic, 0.0, 1.0);\n\n    float alphaRoughness = perceptualRoughness * perceptualRoughness;\n\n    vec3 f0 = vec3(0.04);\n    vec3 diffuseColor = baseColor.rgb * (vec3(1.0) - f0);\n    diffuseColor *= 1.0 - metallic;\n    vec3 specularColor = mix(f0, baseColor.rgb, metallic);\n    float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n\n\n\n    float reflectance90 = clamp(reflectance * 25.0, 0.0, 1.0);\n    vec3 specularEnvironmentR0 = specularColor.rgb;\n    vec3 specularEnvironmentR90 = vec3(1.0, 1.0, 1.0) * reflectance90;\n\n    vec3 n = getNormal();\n    vec3 v = normalize(u_Camera - pbr_vPosition);\n\n    float NdotV = clamp(abs(dot(n, v)), 0.001, 1.0);\n    vec3 reflection = -normalize(reflect(v, n));\n\n    PBRInfo pbrInputs = PBRInfo(\n      0.0,\n      NdotV,\n      0.0,\n      0.0,\n      0.0,\n      perceptualRoughness,\n      metallic,\n      specularEnvironmentR0,\n      specularEnvironmentR90,\n      alphaRoughness,\n      diffuseColor,\n      specularColor,\n      n,\n      v\n    );\n\n#ifdef USE_LIGHTS\n    PBRInfo_setAmbientLight(pbrInputs);\n    color += calculateFinalColor(pbrInputs, lighting_uAmbientLight.color);\n    SMART_FOR(int i = 0, i < MAX_LIGHTS, i < lighting_uDirectionalLightCount, i++) {\n      if (i < lighting_uDirectionalLightCount) {\n        PBRInfo_setDirectionalLight(pbrInputs, lighting_uDirectionalLight[i].direction);\n        color += calculateFinalColor(pbrInputs, lighting_uDirectionalLight[i].color);\n      }\n    }\n    SMART_FOR(int i = 0, i < MAX_LIGHTS, i < lighting_uPointLightCount, i++) {\n      if (i < lighting_uPointLightCount) {\n        PBRInfo_setPointLight(pbrInputs, lighting_uPointLight[i]);\n        float attenuation = getPointLightAttenuation(lighting_uPointLight[i], distance(lighting_uPointLight[i].position, pbr_vPosition));\n        color += calculateFinalColor(pbrInputs, lighting_uPointLight[i].color / attenuation);\n      }\n    }\n#endif\n#ifdef USE_IBL\n    color += getIBLContribution(pbrInputs, n, reflection);\n#endif\n#ifdef HAS_OCCLUSIONMAP\n    float ao = texture2D(u_OcclusionSampler, pbr_vUV).r;\n    color = mix(color, color * ao, u_OcclusionStrength);\n#endif\n\n#ifdef HAS_EMISSIVEMAP\n    vec3 emissive = SRGBtoLINEAR(texture2D(u_EmissiveSampler, pbr_vUV)).rgb * u_EmissiveFactor;\n    color += emissive;\n#endif\n\n#ifdef PBR_DEBUG\n\n\n\n\n\n    color = mix(color, baseColor.rgb, u_ScaleDiffBaseMR.y);\n    color = mix(color, vec3(metallic), u_ScaleDiffBaseMR.z);\n    color = mix(color, vec3(perceptualRoughness), u_ScaleDiffBaseMR.w);\n#endif\n\n  }\n\n  return vec4(pow(color,vec3(1.0/2.2)), baseColor.a);\n}\n",defines:{LIGHTING_FRAGMENT:1},dependencies:[r.a]}},function(e,t,n){"use strict";var r=n(254),i="\nuniform float lighting_uAmbient;\nuniform float lighting_uDiffuse;\nuniform float lighting_uShininess;\nuniform vec3  lighting_uSpecularColor;\n\nvec3 lighting_getLightColor(vec3 surfaceColor, vec3 light_direction, vec3 view_direction, vec3 normal_worldspace, vec3 color) {\n    vec3 halfway_direction = normalize(light_direction + view_direction);\n    float lambertian = dot(light_direction, normal_worldspace);\n    float specular = 0.0;\n    if (lambertian > 0.0) {\n      float specular_angle = max(dot(normal_worldspace, halfway_direction), 0.0);\n      specular = pow(specular_angle, lighting_uShininess);\n    }\n    lambertian = max(lambertian, 0.0);\n    return (lambertian * lighting_uDiffuse * surfaceColor + specular * lighting_uSpecularColor) * color;\n}\n\nvec3 lighting_getLightColor(vec3 surfaceColor, vec3 cameraPosition, vec3 position_worldspace, vec3 normal_worldspace) {\n  vec3 lightColor = surfaceColor;\n\n  if (lighting_uEnabled) {\n    vec3 view_direction = normalize(cameraPosition - position_worldspace);\n    lightColor = lighting_uAmbient * surfaceColor * lighting_uAmbientLight.color;\n\n    for (int i = 0; i < MAX_LIGHTS; i++) {\n      if (i >= lighting_uPointLightCount) {\n        break;\n      }\n      PointLight pointLight = lighting_uPointLight[i];\n      vec3 light_position_worldspace = pointLight.position;\n      vec3 light_direction = normalize(light_position_worldspace - position_worldspace);\n      lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);\n    }\n\n    for (int i = 0; i < MAX_LIGHTS; i++) {\n      if (i >= lighting_uDirectionalLightCount) {\n        break;\n      }\n      DirectionalLight directionalLight = lighting_uDirectionalLight[i];\n      lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);\n    }\n  }\n  return lightColor;\n}\n\nvec3 lighting_getSpecularLightColor(vec3 cameraPosition, vec3 position_worldspace, vec3 normal_worldspace) {\n  vec3 lightColor = vec3(0, 0, 0);\n  vec3 surfaceColor = vec3(0, 0, 0);\n\n  if (lighting_uEnabled) {\n    vec3 view_direction = normalize(cameraPosition - position_worldspace);\n\n    for (int i = 0; i < MAX_LIGHTS; i++) {\n      if (i >= lighting_uPointLightCount) {\n        break;\n      }\n      PointLight pointLight = lighting_uPointLight[i];\n      vec3 light_position_worldspace = pointLight.position;\n      vec3 light_direction = normalize(light_position_worldspace - position_worldspace);\n      lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);\n    }\n\n    for (int i = 0; i < MAX_LIGHTS; i++) {\n      if (i >= lighting_uDirectionalLightCount) {\n        break;\n      }\n      DirectionalLight directionalLight = lighting_uDirectionalLight[i];\n      lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);\n    }\n  }\n  return lightColor;\n}\n";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o}));var a={name:"gouraud-lighting",dependencies:[r.a],vs:i,defines:{LIGHTING_VERTEX:1},getUniforms:A},o={name:"phong-lighting",dependencies:[r.a],fs:i,defines:{LIGHTING_FRAGMENT:1},getUniforms:A},s={};function u(e){var t=e.ambient,n=void 0===t?.35:t,r=e.diffuse,i=void 0===r?.6:r,a=e.shininess,o=void 0===a?32:a,s=e.specularColor;return{lighting_uAmbient:n,lighting_uDiffuse:i,lighting_uShininess:o,lighting_uSpecularColor:(void 0===s?[30,30,30]:s).map((function(e){return e/255}))}}function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;if(!("material"in e))return{};var t=e.material;return t?u(t):{lighting_uEnabled:!1}}},function(e,t,n){"use strict";var r=n(255),i=n(468);var a=function(e){"function"===typeof e?e():e&&"function"===typeof e.unsubscribe&&e.unsubscribe()};t.a=function(e){var t,n=new i.a,o=0;return new r.a((function(r){t||(t=e.subscribe(n));var i=n.subscribe(r);return o++,function(){o--,i.unsubscribe(),0===o&&(a(t),t=void 0)}}))}},function(e,t,n){"use strict";function r(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a,o,s,u,A,c,l,f,h=e._root,g={data:r},d=e._x0,p=e._y0,v=e._x1,y=e._y1;if(!h)return e._root=g,e;for(;h.length;)if((A=t>=(a=(d+v)/2))?d=a:v=a,(c=n>=(o=(p+y)/2))?p=o:y=o,i=h,!(h=h[l=c<<1|A]))return i[l]=g,e;if(s=+e._x.call(null,h.data),u=+e._y.call(null,h.data),t===s&&n===u)return g.next=h,i?i[l]=g:e._root=g,e;do{i=i?i[l]=new Array(4):e._root=new Array(4),(A=t>=(a=(d+v)/2))?d=a:v=a,(c=n>=(o=(p+y)/2))?p=o:y=o}while((l=c<<1|A)===(f=(u>=o)<<1|s>=a));return i[f]=h,i[l]=g,e}var i=function(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i};function a(e){return e[0]}function o(e){return e[1]}function s(e,t,n){var r=new u(null==t?a:t,null==n?o:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function u(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function A(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}n.d(t,"a",(function(){return s}));var c=s.prototype=u.prototype;c.copy=function(){var e,t,n=new u(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=A(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=A(t));return n},c.add=function(e){var t=+this._x.call(null,e),n=+this._y.call(null,e);return r(this.cover(t,n),t,n,e)},c.addAll=function(e){var t,n,i,a,o=e.length,s=new Array(o),u=new Array(o),A=1/0,c=1/0,l=-1/0,f=-1/0;for(n=0;n<o;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(a=+this._y.call(null,t))||(s[n]=i,u[n]=a,i<A&&(A=i),i>l&&(l=i),a<c&&(c=a),a>f&&(f=a));if(A>l||c>f)return this;for(this.cover(A,c).cover(l,f),n=0;n<o;++n)r(this,s[n],u[n],e[n]);return this},c.cover=function(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var o,s,u=i-n,A=this._root;n>e||e>=i||r>t||t>=a;)switch(s=(t<r)<<1|e<n,(o=new Array(4))[s]=A,A=o,u*=2,s){case 0:i=n+u,a=r+u;break;case 1:n=i-u,a=r+u;break;case 2:i=n+u,r=a-u;break;case 3:n=i-u,r=a-u}this._root&&this._root.length&&(this._root=A)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},c.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},c.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},c.find=function(e,t,n){var r,a,o,s,u,A,c,l=this._x0,f=this._y0,h=this._x1,g=this._y1,d=[],p=this._root;for(p&&d.push(new i(p,l,f,h,g)),null==n?n=1/0:(l=e-n,f=t-n,h=e+n,g=t+n,n*=n);A=d.pop();)if(!(!(p=A.node)||(a=A.x0)>h||(o=A.y0)>g||(s=A.x1)<l||(u=A.y1)<f))if(p.length){var v=(a+s)/2,y=(o+u)/2;d.push(new i(p[3],v,y,s,u),new i(p[2],a,y,v,u),new i(p[1],v,o,s,y),new i(p[0],a,o,v,y)),(c=(t>=y)<<1|e>=v)&&(A=d[d.length-1],d[d.length-1]=d[d.length-1-c],d[d.length-1-c]=A)}else{var m=e-+this._x.call(null,p.data),I=t-+this._y.call(null,p.data),b=m*m+I*I;if(b<n){var E=Math.sqrt(n=b);l=e-E,f=t-E,h=e+E,g=t+E,r=p.data}}return r},c.remove=function(e){if(isNaN(a=+this._x.call(null,e))||isNaN(o=+this._y.call(null,e)))return this;var t,n,r,i,a,o,s,u,A,c,l,f,h=this._root,g=this._x0,d=this._y0,p=this._x1,v=this._y1;if(!h)return this;if(h.length)for(;;){if((A=a>=(s=(g+p)/2))?g=s:p=s,(c=o>=(u=(d+v)/2))?d=u:v=u,t=h,!(h=h[l=c<<1|A]))return this;if(!h.length)break;(t[l+1&3]||t[l+2&3]||t[l+3&3])&&(n=t,f=l)}for(;h.data!==e;)if(r=h,!(h=h.next))return this;return(i=h.next)&&delete h.next,r?(i?r.next=i:delete r.next,this):t?(i?t[l]=i:delete t[l],(h=t[0]||t[1]||t[2]||t[3])&&h===(t[3]||t[2]||t[1]||t[0])&&!h.length&&(n?n[f]=h:this._root=h),this):(this._root=i,this)},c.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},c.root=function(){return this._root},c.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},c.visit=function(e){var t,n,r,a,o,s,u=[],A=this._root;for(A&&u.push(new i(A,this._x0,this._y0,this._x1,this._y1));t=u.pop();)if(!e(A=t.node,r=t.x0,a=t.y0,o=t.x1,s=t.y1)&&A.length){var c=(r+o)/2,l=(a+s)/2;(n=A[3])&&u.push(new i(n,c,l,o,s)),(n=A[2])&&u.push(new i(n,r,l,c,s)),(n=A[1])&&u.push(new i(n,c,a,o,l)),(n=A[0])&&u.push(new i(n,r,a,c,l))}return this},c.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new i(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var a=t.node;if(a.length){var o,s=t.x0,u=t.y0,A=t.x1,c=t.y1,l=(s+A)/2,f=(u+c)/2;(o=a[0])&&n.push(new i(o,s,u,l,f)),(o=a[1])&&n.push(new i(o,l,u,A,f)),(o=a[2])&&n.push(new i(o,s,f,l,c)),(o=a[3])&&n.push(new i(o,l,f,A,c))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},c.x=function(e){return arguments.length?(this._x=e,this):this._x},c.y=function(e){return arguments.length?(this._y=e,this):this._y}},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(811),i=n(812),a=n(749),o=n(748),s=n(114),u=n(145),A=n(72),c=n(813);function l(e,t){var n=s.getCoords(t),r=s.getCoords(e),i=r[0],a=r[r.length-1],o=e.geometry.coordinates;return c(n[0],i)?o.unshift(n[1]):c(n[0],a)?o.push(n[1]):c(n[1],i)?o.unshift(n[0]):c(n[1],a)&&o.push(n[0]),e}t.default=function(e,t,n){if(void 0===n&&(n={}),n=n||{},!A.isObject(n))throw new Error("options is invalid");var f,h=n.tolerance||0,g=[],d=r.default(),p=i.default(e);return d.load(p),u.segmentEach(t,(function(e){var t=!1;u.featureEach(d.search(e),(function(n){if(!1===t){var r=s.getCoords(e).sort(),i=s.getCoords(n).sort();c(r,i)||(0===h?o.default(r[0],n)&&o.default(r[1],n):a.default(n,r[0]).properties.dist<=h&&a.default(n,r[1]).properties.dist<=h)?(t=!0,f=f?l(f,e):e):(0===h?o.default(i[0],e)&&o.default(i[1],e):a.default(e,i[0]).properties.dist<=h&&a.default(e,i[1]).properties.dist<=h)&&(f=f?l(f,n):n)}})),!1===t&&f&&(g.push(f),f=void 0)})),f&&g.push(f),A.featureCollection(g)}},function(e,t,n){"use strict";e.exports=i,e.exports.default=i;var r=n(940);function i(e,t){if(!(this instanceof i))return new i(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function a(e,t,n){if(!n)return t.indexOf(e);for(var r=0;r<t.length;r++)if(n(e,t[r]))return r;return-1}function o(e,t){s(e,0,e.children.length,t,e)}function s(e,t,n,r,i){i||(i=p(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a,o=t;o<n;o++)a=e.children[o],u(i,e.leaf?r(a):a);return i}function u(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function A(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function l(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function h(e,t){var n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),a=Math.min(e.maxY,t.maxY);return Math.max(0,i-n)*Math.max(0,a-r)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function d(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function p(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(e,t,n,i,a){for(var o,s=[t,n];s.length;)(n=s.pop())-(t=s.pop())<=i||(o=t+Math.ceil((n-t)/i/2)*i,r(e,o,t,n,a),s.push(t,o,o,n))}i.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,n=[],r=this.toBBox;if(!d(e,t))return n;for(var i,a,o,s,u=[];t;){for(i=0,a=t.children.length;i<a;i++)o=t.children[i],d(e,s=t.leaf?r(o):o)&&(t.leaf?n.push(o):g(e,s)?this._all(o,n):u.push(o));t=u.pop()}return n},collides:function(e){var t=this.data,n=this.toBBox;if(!d(e,t))return!1;for(var r,i,a,o,s=[];t;){for(r=0,i=t.children.length;r<i;r++)if(a=t.children[r],d(e,o=t.leaf?n(a):a)){if(t.leaf||g(e,o))return!0;s.push(a)}t=s.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}var r=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var i=this.data;this.data=r,r=i}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=p([]),this},remove:function(e,t){if(!e)return this;for(var n,r,i,o,s=this.data,u=this.toBBox(e),A=[],c=[];s||A.length;){if(s||(s=A.pop(),r=A[A.length-1],n=c.pop(),o=!0),s.leaf&&-1!==(i=a(e,s.children,t)))return s.children.splice(i,1),A.push(s),this._condense(A),this;o||s.leaf||!g(s,u)?r?(n++,s=r.children[n],o=!1):s=null:(A.push(s),c.push(n),n=0,r=s,s=s.children[0])}return this},toBBox:function(e){return e},compareMinX:A,compareMinY:c,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var n=[];e;)e.leaf?t.push.apply(t,e.children):n.push.apply(n,e.children),e=n.pop();return t},_build:function(e,t,n,r){var i,a=n-t+1,s=this._maxEntries;if(a<=s)return o(i=p(e.slice(t,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(a)/Math.log(s)),s=Math.ceil(a/Math.pow(s,r-1))),(i=p([])).leaf=!1,i.height=r;var u,A,c,l,f=Math.ceil(a/s),h=f*Math.ceil(Math.sqrt(s));for(v(e,t,n,h,this.compareMinX),u=t;u<=n;u+=h)for(v(e,u,c=Math.min(u+h-1,n),f,this.compareMinY),A=u;A<=c;A+=f)l=Math.min(A+f-1,c),i.children.push(this._build(e,A,l,r-1));return o(i,this.toBBox),i},_chooseSubtree:function(e,t,n,r){for(var i,a,o,s,u,A,c,f,h,g;r.push(t),!t.leaf&&r.length-1!==n;){for(c=f=1/0,i=0,a=t.children.length;i<a;i++)u=l(o=t.children[i]),h=e,g=o,(A=(Math.max(g.maxX,h.maxX)-Math.min(g.minX,h.minX))*(Math.max(g.maxY,h.maxY)-Math.min(g.minY,h.minY))-u)<f?(f=A,c=u<c?u:c,s=o):A===f&&u<c&&(c=u,s=o);t=s||t.children[0]}return t},_insert:function(e,t,n){var r=this.toBBox,i=n?e:r(e),a=[],o=this._chooseSubtree(i,this.data,t,a);for(o.children.push(e),u(o,i);t>=0&&a[t].children.length>this._maxEntries;)this._split(a,t),t--;this._adjustParentBBoxes(i,a,t)},_split:function(e,t){var n=e[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var a=this._chooseSplitIndex(n,i,r),s=p(n.children.splice(a,n.children.length-a));s.height=n.height,s.leaf=n.leaf,o(n,this.toBBox),o(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)},_splitRoot:function(e,t){this.data=p([e,t]),this.data.height=e.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,n){var r,i,a,o,u,A,c,f;for(A=c=1/0,r=t;r<=n-t;r++)o=h(i=s(e,0,r,this.toBBox),a=s(e,r,n,this.toBBox)),u=l(i)+l(a),o<A?(A=o,f=r,c=u<c?u:c):o===A&&u<c&&(c=u,f=r);return f},_chooseSplitAxis:function(e,t,n){var r=e.leaf?this.compareMinX:A,i=e.leaf?this.compareMinY:c;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)},_allDistMargin:function(e,t,n,r){e.children.sort(r);var i,a,o=this.toBBox,A=s(e,0,t,o),c=s(e,n-t,n,o),l=f(A)+f(c);for(i=t;i<n-t;i++)a=e.children[i],u(A,e.leaf?o(a):a),l+=f(A);for(i=n-t-1;i>=t;i--)a=e.children[i],u(c,e.leaf?o(a):a),l+=f(c);return l},_adjustParentBBoxes:function(e,t,n){for(var r=n;r>=0;r--)u(t[r],e)},_condense:function(e){for(var t,n=e.length-1;n>=0;n--)0===e[n].children.length?n>0?(t=e[n-1].children).splice(t.indexOf(e[n]),1):this.clear():o(e[n],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}},function(e,t,n){e.exports=function(){"use strict";function e(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function t(e,t){return e<t?-1:e>t?1:0}return function(n,r,i,a,o){!function t(n,r,i,a,o){for(;a>i;){if(a-i>600){var s=a-i+1,u=r-i+1,A=Math.log(s),c=.5*Math.exp(2*A/3),l=.5*Math.sqrt(A*c*(s-c)/s)*(u-s/2<0?-1:1),f=Math.max(i,Math.floor(r-u*c/s+l)),h=Math.min(a,Math.floor(r+(s-u)*c/s+l));t(n,r,f,h,o)}var g=n[r],d=i,p=a;for(e(n,i,r),o(n[a],g)>0&&e(n,i,a);d<p;){for(e(n,d,p),d++,p--;o(n[d],g)<0;)d++;for(;o(n[p],g)>0;)p--}0===o(n[i],g)?e(n,i,p):(p++,e(n,p,a)),p<=r&&(i=p+1),r<=p&&(a=p-1)}}(n,r,i||0,a||n.length-1,o||t)}}()},function(e,t,n){"use strict";var r;if(!Object.keys){var i=Object.prototype.hasOwnProperty,a=Object.prototype.toString,o=n(815),s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),A=s.call((function(){}),"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(e){var t=e.constructor;return t&&t.prototype===e},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"===typeof window)return!1;for(var e in window)try{if(!f["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"===typeof window[e])try{l(window[e])}catch(t){return!0}}catch(t){return!0}return!1}();r=function(e){var t=null!==e&&"object"===typeof e,n="[object Function]"===a.call(e),r=o(e),s=t&&"[object String]"===a.call(e),f=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var g=A&&n;if(s&&e.length>0&&!i.call(e,0))for(var d=0;d<e.length;++d)f.push(String(d));if(r&&e.length>0)for(var p=0;p<e.length;++p)f.push(String(p));else for(var v in e)g&&"prototype"===v||!i.call(e,v)||f.push(String(v));if(u)for(var y=function(e){if("undefined"===typeof window||!h)return l(e);try{return l(e)}catch(t){return!1}}(e),m=0;m<c.length;++m)y&&"constructor"===c[m]||!i.call(e,c[m])||f.push(c[m]);return f}}e.exports=r},function(e,t,n){"use strict";var r="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag,i=Object.prototype.toString,a=function(e){return!(r&&e&&"object"===typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i.call(e)},o=function(e){return!!a(e)||null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Array]"!==i.call(e)&&"[object Function]"===i.call(e.callee)},s=function(){return a(arguments)}();a.isLegacyArguments=o,e.exports=s?a:o},function(e,t,n){"use strict";var r=function(e){return e!==e};e.exports=function(e,t){return 0===e&&0===t?1/e===1/t:e===t||!(!r(e)||!r(t))}},function(e,t,n){"use strict";var r=n(945),i=RegExp.prototype.exec,a=Object.getOwnPropertyDescriptor,o=Object.prototype.toString,s="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag;e.exports=function(e){if(!e||"object"!==typeof e)return!1;if(!s)return"[object RegExp]"===o.call(e);var t=a(e,"lastIndex");return!(!t||!r(t,"value"))&&function(e){try{var t=e.lastIndex;return e.lastIndex=0,i.call(e),!0}catch(n){return!1}finally{e.lastIndex=t}}(e)}},function(e,t,n){"use strict";var r=n(750);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(e,t,n){"use strict";var r="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,a=Object.prototype.toString;e.exports=function(e){var t=this;if("function"!==typeof t||"[object Function]"!==a.call(t))throw new TypeError(r+t);for(var n,o=i.call(arguments,1),s=function(){if(this instanceof n){var r=t.apply(this,o.concat(i.call(arguments)));return Object(r)===r?r:this}return t.apply(e,o.concat(i.call(arguments)))},u=Math.max(0,t.length-o.length),A=[],c=0;c<u;c++)A.push("$"+c);if(n=Function("binder","return function ("+A.join(",")+"){ return binder.apply(this,arguments); }")(s),t.prototype){var l=function(){};l.prototype=t.prototype,n.prototype=new l,l.prototype=null}return n}},function(e,t,n){"use strict";var r=n(751),i=n(948),a=n(816),o=n(817),s=n(952),u=i(a);r(u,{getPolyfill:o,implementation:a,shim:s}),e.exports=u},function(e,t,n){"use strict";var r=n(750),i=n(949)("%Function%"),a=i.apply,o=i.call;e.exports=function(){return r.apply(o,arguments)},e.exports.apply=function(){return r.apply(a,arguments)}},function(e,t,n){"use strict";var r=TypeError,i=Object.getOwnPropertyDescriptor;if(i)try{i({},"")}catch(v){i=null}var a=function(){throw new r},o=i?function(){try{return arguments.callee,a}catch(e){try{return i(arguments,"callee").get}catch(t){return a}}}():a,s=n(950)(),u=Object.getPrototypeOf||function(e){return e.__proto__},A=void 0,c="undefined"===typeof Uint8Array?void 0:u(Uint8Array),l={"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayBufferPrototype%":"undefined"===typeof ArrayBuffer?void 0:ArrayBuffer.prototype,"%ArrayIteratorPrototype%":s?u([][Symbol.iterator]()):void 0,"%ArrayPrototype%":Array.prototype,"%ArrayProto_entries%":Array.prototype.entries,"%ArrayProto_forEach%":Array.prototype.forEach,"%ArrayProto_keys%":Array.prototype.keys,"%ArrayProto_values%":Array.prototype.values,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":void 0,"%AsyncFunctionPrototype%":void 0,"%AsyncGenerator%":void 0,"%AsyncGeneratorFunction%":void 0,"%AsyncGeneratorPrototype%":void 0,"%AsyncIteratorPrototype%":A&&s&&Symbol.asyncIterator?A[Symbol.asyncIterator]():void 0,"%Atomics%":"undefined"===typeof Atomics?void 0:Atomics,"%Boolean%":Boolean,"%BooleanPrototype%":Boolean.prototype,"%DataView%":"undefined"===typeof DataView?void 0:DataView,"%DataViewPrototype%":"undefined"===typeof DataView?void 0:DataView.prototype,"%Date%":Date,"%DatePrototype%":Date.prototype,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%ErrorPrototype%":Error.prototype,"%eval%":eval,"%EvalError%":EvalError,"%EvalErrorPrototype%":EvalError.prototype,"%Float32Array%":"undefined"===typeof Float32Array?void 0:Float32Array,"%Float32ArrayPrototype%":"undefined"===typeof Float32Array?void 0:Float32Array.prototype,"%Float64Array%":"undefined"===typeof Float64Array?void 0:Float64Array,"%Float64ArrayPrototype%":"undefined"===typeof Float64Array?void 0:Float64Array.prototype,"%Function%":Function,"%FunctionPrototype%":Function.prototype,"%Generator%":void 0,"%GeneratorFunction%":void 0,"%GeneratorPrototype%":void 0,"%Int8Array%":"undefined"===typeof Int8Array?void 0:Int8Array,"%Int8ArrayPrototype%":"undefined"===typeof Int8Array?void 0:Int8Array.prototype,"%Int16Array%":"undefined"===typeof Int16Array?void 0:Int16Array,"%Int16ArrayPrototype%":"undefined"===typeof Int16Array?void 0:Int8Array.prototype,"%Int32Array%":"undefined"===typeof Int32Array?void 0:Int32Array,"%Int32ArrayPrototype%":"undefined"===typeof Int32Array?void 0:Int32Array.prototype,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":s?u(u([][Symbol.iterator]())):void 0,"%JSON%":"object"===typeof JSON?JSON:void 0,"%JSONParse%":"object"===typeof JSON?JSON.parse:void 0,"%Map%":"undefined"===typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&s?u((new Map)[Symbol.iterator]()):void 0,"%MapPrototype%":"undefined"===typeof Map?void 0:Map.prototype,"%Math%":Math,"%Number%":Number,"%NumberPrototype%":Number.prototype,"%Object%":Object,"%ObjectPrototype%":Object.prototype,"%ObjProto_toString%":Object.prototype.toString,"%ObjProto_valueOf%":Object.prototype.valueOf,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?void 0:Promise,"%PromisePrototype%":"undefined"===typeof Promise?void 0:Promise.prototype,"%PromiseProto_then%":"undefined"===typeof Promise?void 0:Promise.prototype.then,"%Promise_all%":"undefined"===typeof Promise?void 0:Promise.all,"%Promise_reject%":"undefined"===typeof Promise?void 0:Promise.reject,"%Promise_resolve%":"undefined"===typeof Promise?void 0:Promise.resolve,"%Proxy%":"undefined"===typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%RangeErrorPrototype%":RangeError.prototype,"%ReferenceError%":ReferenceError,"%ReferenceErrorPrototype%":ReferenceError.prototype,"%Reflect%":"undefined"===typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%RegExpPrototype%":RegExp.prototype,"%Set%":"undefined"===typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&s?u((new Set)[Symbol.iterator]()):void 0,"%SetPrototype%":"undefined"===typeof Set?void 0:Set.prototype,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%SharedArrayBufferPrototype%":"undefined"===typeof SharedArrayBuffer?void 0:SharedArrayBuffer.prototype,"%String%":String,"%StringIteratorPrototype%":s?u(""[Symbol.iterator]()):void 0,"%StringPrototype%":String.prototype,"%Symbol%":s?Symbol:void 0,"%SymbolPrototype%":s?Symbol.prototype:void 0,"%SyntaxError%":SyntaxError,"%SyntaxErrorPrototype%":SyntaxError.prototype,"%ThrowTypeError%":o,"%TypedArray%":c,"%TypedArrayPrototype%":c?c.prototype:void 0,"%TypeError%":r,"%TypeErrorPrototype%":r.prototype,"%Uint8Array%":"undefined"===typeof Uint8Array?void 0:Uint8Array,"%Uint8ArrayPrototype%":"undefined"===typeof Uint8Array?void 0:Uint8Array.prototype,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint8ClampedArrayPrototype%":"undefined"===typeof Uint8ClampedArray?void 0:Uint8ClampedArray.prototype,"%Uint16Array%":"undefined"===typeof Uint16Array?void 0:Uint16Array,"%Uint16ArrayPrototype%":"undefined"===typeof Uint16Array?void 0:Uint16Array.prototype,"%Uint32Array%":"undefined"===typeof Uint32Array?void 0:Uint32Array,"%Uint32ArrayPrototype%":"undefined"===typeof Uint32Array?void 0:Uint32Array.prototype,"%URIError%":URIError,"%URIErrorPrototype%":URIError.prototype,"%WeakMap%":"undefined"===typeof WeakMap?void 0:WeakMap,"%WeakMapPrototype%":"undefined"===typeof WeakMap?void 0:WeakMap.prototype,"%WeakSet%":"undefined"===typeof WeakSet?void 0:WeakSet,"%WeakSetPrototype%":"undefined"===typeof WeakSet?void 0:WeakSet.prototype},f=n(750).call(Function.call,String.prototype.replace),h=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,g=/\\(\\)?/g,d=function(e){var t=[];return f(e,h,(function(e,n,r,i){t[t.length]=r?f(i,g,"$1"):n||e})),t},p=function(e,t){if(!(e in l))throw new SyntaxError("intrinsic "+e+" does not exist!");if("undefined"===typeof l[e]&&!t)throw new r("intrinsic "+e+" exists, but is not available. Please file an issue!");return l[e]};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new TypeError('"allowMissing" argument must be a boolean');for(var n=d(e),a=p("%"+(n.length>0?n[0]:"")+"%",t),o=1;o<n.length;o+=1)if(null!=a)if(i&&o+1>=n.length){var s=i(a,n[o]);if(!t&&!(n[o]in a))throw new r("base intrinsic for "+e+" exists, but the property is not available.");a=s?s.get||s.value:a[n[o]]}else a=a[n[o]];return a}},function(e,t,n){"use strict";(function(t){var r=t.Symbol,i=n(951);e.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&i())))}}).call(this,n(70))},function(e,t,n){"use strict";e.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"===typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"===typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},function(e,t,n){"use strict";var r=n(751).supportsDescriptors,i=n(817),a=Object.getOwnPropertyDescriptor,o=Object.defineProperty,s=TypeError,u=Object.getPrototypeOf,A=/a/;e.exports=function(){if(!r||!u)throw new s("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=i(),t=u(A),n=a(t,"flags");return n&&n.get===e||o(t,"flags",{configurable:!0,enumerable:!1,get:e}),e}},function(e,t,n){"use strict";var r=Date.prototype.getDay,i=Object.prototype.toString,a="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag;e.exports=function(e){return"object"===typeof e&&null!==e&&(a?function(e){try{return r.call(e),!0}catch(t){return!1}}(e):"[object Date]"===i.call(e))}},function(e,t,n){var r=n(813),i=function(e){this.precision=e&&e.precision?e.precision:17,this.direction=!(!e||!e.direction)&&e.direction,this.pseudoNode=!(!e||!e.pseudoNode)&&e.pseudoNode,this.objectComparator=e&&e.objectComparator?e.objectComparator:s};function a(e){return e.coordinates.map((function(t){return{type:e.type.replace("Multi",""),coordinates:t}}))}function o(e,t){return e.hasOwnProperty("coordinates")?e.coordinates.length===t.coordinates.length:e.length===t.length}function s(e,t){return r(e,t,{strict:!0})}i.prototype.compare=function(e,t){if(e.type!==t.type||!o(e,t))return!1;switch(e.type){case"Point":return this.compareCoord(e.coordinates,t.coordinates);case"LineString":return this.compareLine(e.coordinates,t.coordinates,0,!1);case"Polygon":return this.comparePolygon(e,t);case"Feature":return this.compareFeature(e,t);default:if(0===e.type.indexOf("Multi")){var n=this,r=a(e),i=a(t);return r.every((function(e){return this.some((function(t){return n.compare(e,t)}))}),i)}}return!1},i.prototype.compareCoord=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n].toFixed(this.precision)!==t[n].toFixed(this.precision))return!1;return!0},i.prototype.compareLine=function(e,t,n,r){if(!o(e,t))return!1;var i=this.pseudoNode?e:this.removePseudo(e),a=this.pseudoNode?t:this.removePseudo(t);if(!r||this.compareCoord(i[0],a[0])||(a=this.fixStartIndex(a,i))){var s=this.compareCoord(i[n],a[n]);return this.direction||s?this.comparePath(i,a):!!this.compareCoord(i[n],a[a.length-(1+n)])&&this.comparePath(i.slice().reverse(),a)}},i.prototype.fixStartIndex=function(e,t){for(var n,r=-1,i=0;i<e.length;i++)if(this.compareCoord(e[i],t[0])){r=i;break}return r>=0&&(n=[].concat(e.slice(r,e.length),e.slice(1,r+1))),n},i.prototype.comparePath=function(e,t){var n=this;return e.every((function(e,t){return n.compareCoord(e,this[t])}),t)},i.prototype.comparePolygon=function(e,t){if(this.compareLine(e.coordinates[0],t.coordinates[0],1,!0)){var n=e.coordinates.slice(1,e.coordinates.length),r=t.coordinates.slice(1,t.coordinates.length),i=this;return n.every((function(e){return this.some((function(t){return i.compareLine(e,t,1,!0)}))}),r)}return!1},i.prototype.compareFeature=function(e,t){return!(e.id!==t.id||!this.objectComparator(e.properties,t.properties)||!this.compareBBox(e,t))&&this.compare(e.geometry,t.geometry)},i.prototype.compareBBox=function(e,t){return!!(!e.bbox&&!t.bbox||e.bbox&&t.bbox&&this.compareCoord(e.bbox,t.bbox))},i.prototype.removePseudo=function(e){return e},e.exports=i},function(e,t,n){"use strict";n.r(t);var r=n(456),i=n(457),a=n.n(i),o=n(72),s=n(114),u=n(145);function A(e){switch(e.type){case"Polygon":return a()(e)>1?e:null;case"MultiPolygon":var t=[];if(Object(u.flattenEach)(e,(function(e){a()(e)>1&&t.push(e.geometry.coordinates)})),t.length)return{type:"MultiPolygon",coordinates:t}}}t.default=function(e,t){var n=Object(s.getGeom)(e),i=Object(s.getGeom)(t),a=e.properties||{};if(n=A(n),i=A(i),!n)return null;if(!i)return Object(o.feature)(n,a);var u=r.diff(n.coordinates,i.coordinates);return 0===u.length?null:1===u.length?Object(o.polygon)(u[0],a):Object(o.multiPolygon)(u,a)}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};r(this,e),a(this,"geoJson",void 0),a(this,"style",void 0),a(this,"original",void 0),a(this,"metadata",void 0),this.geoJson=t,this.style=n,this.original=i,this.metadata=o}var t,n,o;return t=e,(n=[{key:"getCoords",value:function(){return this.geoJson.geometry.coordinates}}])&&i(t.prototype,n),o&&i(t,o),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(752),i=s(n(503)),a=n(536),o=s(n(759));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(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 c(e,t){return!t||"object"!==u(t)&&"function"!==typeof t?l(e):t}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(d,e);var t,n,i,s,u=(t=d,function(){var e,n=h(t);if(f()){var r=h(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return c(this,e)});function d(e){var t,n,r,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),t=u.call(this,e),n=l(t),i=void 0,(r="deckCache")in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,t.deckCache=new o.default(e.getData,(function(t){return e.toNebulaFeature(t)})),t.enablePicking=!0,t}return n=d,(i=[{key:"render",value:function(e){e.nebula;var t=[0,0,0,255],n=this.deckCache,i=n.objects,o=n.updateTrigger;return new r.JunctionScatterplotLayer({id:"junctions-".concat(this.id),data:i,opacity:1,fp64:!1,pickable:!0,getPosition:function(e){return e.geoJson.geometry.coordinates},getFillColor:function(e){return(0,a.toDeckColor)(e.style.fillColor)||t},getStrokeColor:function(e){return(0,a.toDeckColor)(e.style.outlineColor)||(0,a.toDeckColor)(e.style.fillColor)||t},getRadius:function(e){return e.style.pointRadiusMeters+e.style.outlineRadiusMeters||1},getInnerRadius:function(e){return e.style.pointRadiusMeters||.5},parameters:{depthTest:!1,blend:!1},updateTriggers:{all:o},nebulaLayer:this})}}])&&A(n.prototype,i),s&&A(n,s),d}(i.default);t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_ARROWS=t.DEFAULT_ARROWS=t.ArrowStyles=void 0;t.ArrowStyles={NONE:0,FORWARD:1,BACKWARD:2,BOTH:3};t.DEFAULT_ARROWS=1;t.MAX_ARROWS=3},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(456),i=n(114),a=n(72);t.default=function(e,t,n){void 0===n&&(n={});var o=i.getGeom(e).coordinates,s=i.getGeom(t).coordinates,u=r.union(o,s);return 0===u.length?null:1===u.length?a.polygon(u[0],n.properties):a.multiPolygon(u,n.properties)}},function(e,t,n){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=n(72),a=n(114),o=r(n(456));t.default=function e(t,n,r){void 0===r&&(r={});var s=a.getGeom(t),u=a.getGeom(n);if("Polygon"===s.type&&"Polygon"===u.type){var A=o.intersection(s.coordinates,u.coordinates);if(null===A||0===A.length)return null;if(1===A.length){var c=A[0][0][0],l=A[0][0][A[0][0].length-1];return c[0]===l[0]&&c[1]===l[1]?i.polygon(A[0],r.properties):null}return i.multiPolygon(A,r.properties)}if("MultiPolygon"===s.type){for(var f=[],h=0,g=s.coordinates;h<g.length;h++){var d=g[h],p=e(a.getGeom(i.polygon(d)),u);if(p){var v=a.getGeom(p);if("Polygon"===v.type)f.push(v.coordinates);else{if("MultiPolygon"!==v.type)throw new Error("intersection is invalid");f=f.concat(v.coordinates)}}}return 0===f.length?null:1===f.length?i.polygon(f[0],r.properties):i.multiPolygon(f,r.properties)}if("MultiPolygon"===u.type)return e(u,s);throw new Error("poly1 and poly2 must be either polygons or multiPolygons")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72),i=n(114);t.default=function(e,t,n){void 0===n&&(n={});var a=i.getCoord(e),o=i.getCoord(t);o[0]+=o[0]-a[0]>180?-360:a[0]-o[0]>180?360:0;var s=function(e,t,n){var i=n=void 0===n?r.earthRadius:Number(n),a=e[1]*Math.PI/180,o=t[1]*Math.PI/180,s=o-a,u=Math.abs(t[0]-e[0])*Math.PI/180;u>Math.PI&&(u-=2*Math.PI);var A=Math.log(Math.tan(o/2+Math.PI/4)/Math.tan(a/2+Math.PI/4)),c=Math.abs(A)>1e-11?s/A:Math.cos(a);return Math.sqrt(s*s+c*c*u*u)*i}(a,o);return r.convertLength(s,"meters",n.units)}},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 o(e,t,n){return(o="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=A(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function s(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.DuplicateMode=void 0;var l=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(h,e);var t,n,r,l,f=(t=h,function(){var e,n=A(t);if(u()){var r=A(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return s(this,e)});function h(){return i(this,h),f.apply(this,arguments)}return n=h,(r=[{key:"handleStartDragging",value:function(e,t){o(A(h.prototype),"handleStartDragging",this).call(this,e,t),this._geometryBeforeTranslate&&t.onEdit(this.getAddManyFeaturesAction(this._geometryBeforeTranslate,t.data))}},{key:"updateCursor",value:function(e){this._isTranslatable?e.onUpdateCursor("copy"):e.onUpdateCursor(null)}}])&&a(n.prototype,r),l&&a(n,l),h}(n(755).TranslateMode);t.DuplicateMode=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendLineStringMode=void 0;var r=n(162),i=n(326);function a(e){return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 u(e,t){return!t||"object"!==a(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function A(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(h,e);var t,n,r,a,f=(t=h,function(){var e,n=c(t);if(A()){var r=c(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return u(this,e)});function h(){return o(this,h),f.apply(this,arguments)}return n=h,(r=[{key:"getSingleSelectedLineString",value:function(e){var t=this.getSelectedGeometry(e);return t&&"LineString"===t.type?t:null}},{key:"handleClick",value:function(e,t){var n=t.selectedIndexes,r=this.getSingleSelectedLineString(t);if(r){var a=[r.coordinates.length],o=t.modeConfig;o&&o.drawAtFront&&(a=[0]);var s=n[0],u=new i.ImmutableFeatureCollection(t.data).addPosition(s,a,e.mapCoords).getObject();t.onEdit({updatedData:u,editType:"addPosition",editContext:{featureIndexes:[s],positionIndexes:a,position:e.mapCoords}})}else console.warn("ExtendLineStringMode only supported for single LineString selection")}},{key:"getGuides",value:function(e){var t={type:"FeatureCollection",features:[]},n=this.getSingleSelectedLineString(e);if(!n)return t;var r=e.lastPointerMoveEvent&&e.lastPointerMoveEvent.mapCoords,i=null,a=e.modeConfig;return i=a&&a.drawAtFront?n.coordinates[0]:n.coordinates[n.coordinates.length-1],t.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[i,r]}}),t}},{key:"handlePointerMove",value:function(e,t){t.onUpdateCursor("cell")}}])&&s(n.prototype,r),a&&s(n,a),h}(r.GeoJsonEditMode);t.ExtendLineStringMode=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplitPolygonMode=void 0;var r=p(n(510)),i=p(n(821)),a=p(n(763)),o=p(n(534)),s=n(72),u=p(n(272)),A=p(n(212)),c=p(n(444)),l=p(n(756)),f=p(n(749)),h=n(241),g=n(162),d=n(326);function p(e){return e&&e.__esModule?e:{default:e}}function v(e){return(v="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||I(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||I(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t){if(e){if("string"===typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(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 B(e,t){return!t||"object"!==v(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function w(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(I,e);var t,n,g,p,v=(t=I,function(){var e,n=Q(t);if(w()){var r=Q(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return B(this,e)});function I(){return E(this,I),v.apply(this,arguments)}return n=I,(g=[{key:"calculateMapCoords",value:function(e,t,n){var r=n.modeConfig;if(!r||!r.lock90Degree||!e.length)return t;if(1===e.length){var i=e[0],a=this.getSelectedGeometry(n),o=(0,l.default)(a),g="FeatureCollection"===o.type?o.features:[o],d=Number.MAX_SAFE_INTEGER,p=null;if(g.forEach((function(e){var t=(0,f.default)(e,i),n=(0,A.default)(t,i);d>n&&(d=n,p=t)})),p){var v=(0,u.default)(i,p),y=(0,A.default)(i,t,{units:"meters"});return(0,c.default)(i,y,v,{units:"meters"}).geometry.coordinates}return t}var I=e[e.length-1],b=m((0,h.generatePointsParallelToLinePoints)(e[e.length-2],I,t),1)[0];return(0,f.default)((0,s.lineString)([I,b]),t).geometry.coordinates}},{key:"getGuides",value:function(e){var t=this.getClickSequence(),n={type:"FeatureCollection",features:[]};if(0===t.length||!e.lastPointerMoveEvent)return n;var r=e.lastPointerMoveEvent.mapCoords;return n.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(y(t),[this.calculateMapCoords(t,r,e)])}}),n}},{key:"handleClick",value:function(e,t){var n=this.getTentativeGuide(t),i=this.getSelectedGeometry(t);if(i){var a=this.getClickSequence();n&&"LineString"===n.geometry.type?a.push(n.geometry.coordinates[n.geometry.coordinates.length-1]):this.addClickSequence(e);var s={type:"Point",coordinates:a[a.length-1]},u=(0,r.default)(s,i);if(a.length>1&&n&&!u){if(this.resetClickSequence(),0===(0,o.default)(n,i).features.length)return;var A=this.splitPolygon(n,t);A&&t.onEdit(A)}}else console.warn("A polygon must be selected for splitting")}},{key:"handlePointerMove",value:function(e,t){t.onUpdateCursor("cell")}},{key:"splitPolygon",value:function(e,t){var n=this.getSelectedGeometry(t),r=t.selectedIndexes[0],o=t.modeConfig||{},s=o.gap,u=void 0===s?.1:s,A=o.units,c=void 0===A?"centimeters":A;0===u&&(u=.1,c="centimeters");var l=(0,a.default)(e,u,{units:c}),f=(0,i.default)(n,l);if(!f)return console.warn("Canceling edit. Split Polygon erased"),null;var h=f.geometry,g=h.type,p=h.coordinates,v=[];return v="Polygon"===g?p.map((function(e){return[e]})):p.reduce((function(e,t){return t.forEach((function(t){e.push([t])})),e}),[]),{updatedData:new d.ImmutableFeatureCollection(t.data).replaceGeometry(r,{type:"MultiPolygon",coordinates:v}).getObject(),editType:"split",editContext:{featureIndexes:[r]}}}}])&&C(n.prototype,g),p&&C(n,p),I}(g.GeoJsonEditMode);t.SplitPolygonMode=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtrudeMode=void 0;var r,i=(r=n(272))&&r.__esModule?r:{default:r},a=n(241),o=n(754),s=n(326);function u(e){return(u="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"===typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(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 d(e,t){return!t||"object"!==u(t)&&"function"!==typeof t?p(e):t}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(l,e);var t,n,r,o,u=(t=l,function(){var e,n=y(t);if(v()){var r=y(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return d(this,e)});function l(){var e;h(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return I(p(e=u.call.apply(u,[this].concat(n))),"isPointAdded",!1),e}return n=l,(r=[{key:"handleDragging",value:function(e,t){var n=(0,a.getPickedEditHandle)(e.pointerDownPicks);if(n){var r=n.properties.featureIndex,i=n.properties.positionIndexes,o=this.coordinatesSize(i,r,t.data);i=this.isPointAdded?this.nextPositionIndexes(i,o):i;var u=this.getPointForPositionIndexes(this.prevPositionIndexes(i,o),r,t.data),A=this.getPointForPositionIndexes(i,r,t.data);if(u&&A){var l=c((0,a.generatePointsParallelToLinePoints)(u,A,e.mapCoords),2),f=l[0],h=l[1],g=new s.ImmutableFeatureCollection(t.data).replacePosition(r,this.prevPositionIndexes(i,o),h).replacePosition(r,i,f).getObject();t.onEdit({updatedData:g,editType:"extruding",editContext:{featureIndexes:[r],positionIndexes:this.nextPositionIndexes(i,o),position:f}}),e.cancelPan()}}}},{key:"handleStartDragging",value:function(e,t){var n=t.selectedIndexes,r=(0,a.getPickedIntermediateEditHandle)(e.picks);if(n.length&&r){var i=r.properties,o=i.positionIndexes,u=i.featureIndex,A=this.coordinatesSize(o,u,t.data),c=this.getPointForPositionIndexes(this.prevPositionIndexes(o,A),u,t.data),l=this.getPointForPositionIndexes(o,u,t.data);if(c&&l){var f=new s.ImmutableFeatureCollection(t.data);this.isOrthogonal(o,u,A,t.data)||(f=f.addPosition(u,o,l)),this.isOrthogonal(this.prevPositionIndexes(o,A),u,A,t.data)||(f=f.addPosition(u,o,c),this.isPointAdded=!0),t.onEdit({updatedData:f.getObject(),editType:"startExtruding",editContext:{featureIndexes:[u],positionIndexes:o,position:c}})}}}},{key:"handleStopDragging",value:function(e,t){var n=t.selectedIndexes,r=(0,a.getPickedEditHandle)(e.pointerDownPicks);if(n.length&&r){var i=r.properties.featureIndex,o=r.properties.positionIndexes,u=this.coordinatesSize(o,i,t.data);o=this.isPointAdded?this.nextPositionIndexes(o,u):o;var A=this.getPointForPositionIndexes(this.prevPositionIndexes(o,u),i,t.data),l=this.getPointForPositionIndexes(o,i,t.data);if(A&&l){var f=c((0,a.generatePointsParallelToLinePoints)(A,l,e.mapCoords),2),h=f[0],g=f[1],d=new s.ImmutableFeatureCollection(t.data).replacePosition(i,this.prevPositionIndexes(o,u),g).replacePosition(i,o,h).getObject();t.onEdit({updatedData:d,editType:"extruded",editContext:{featureIndexes:[i],positionIndexes:o,position:h}})}}this.isPointAdded=!1}},{key:"coordinatesSize",value:function(e,t,n){var r=n.features,i=0;if(Array.isArray(e)){var a=r[t].geometry.coordinates;if(3===e.length){var o=c(e,2),s=o[0],u=o[1];a.length&&a[s].length&&(i=a[s][u].length)}else{var A=c(e,1)[0];a.length&&a[A].length&&(i=a[A].length)}}return i}},{key:"getBearing",value:function(e,t){var n=(0,i.default)(e,t);return n<0?Math.floor(360+n):Math.floor(n)}},{key:"isOrthogonal",value:function(e,t,n,r){if(!Array.isArray(e))return!1;e[e.length-1]===n-1&&(e[e.length-1]=0);var i=this.getPointForPositionIndexes(this.prevPositionIndexes(e,n),t,r),a=this.getPointForPositionIndexes(this.nextPositionIndexes(e,n),t,r),o=this.getPointForPositionIndexes(e,t,r),s=this.getBearing(o,i),u=this.getBearing(o,a);return[89,90,91,269,270,271].includes(Math.abs(s-u))}},{key:"nextPositionIndexes",value:function(e,t){if(!Array.isArray(e))return[];var n=A(e);return n.length&&(n[n.length-1]=n[n.length-1]===t-1?0:n[n.length-1]+1),n}},{key:"prevPositionIndexes",value:function(e,t){if(!Array.isArray(e))return[];var n=A(e);return n.length&&(n[n.length-1]=0===n[n.length-1]?t-2:n[n.length-1]-1),n}},{key:"getPointForPositionIndexes",value:function(e,t,n){var r,i=n.features;if(Array.isArray(e)){var a=i[t].geometry.coordinates;if(3===e.length){var o=c(e,3),s=o[0],u=o[1],A=o[2];a.length&&a[s].length&&(r=a[s][u][A])}else{var l=c(e,2),f=l[0],h=l[1];a.length&&a[f].length&&(r=a[f][h])}}return r}}])&&g(n.prototype,r),o&&g(n,o),l}(o.ModifyMode);t.ExtrudeMode=b},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ElevationMode=void 0;var r=n(241);function i(e){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 s(e,t,n){return(s="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function u(e,t){return!t||"object"!==i(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function A(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=e.pointerDownScreenCoords,n=e.screenCoords;return 10*(t[1]-n[1])}var h=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(d,e);var t,n,i,h,g=(t=d,function(){var e,n=c(t);if(A()){var r=c(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return u(this,e)});function d(){return a(this,d),g.apply(this,arguments)}return n=d,h=[{key:"calculateElevationChangeWithViewport",value:function(e,t){var n=t.pointerDownScreenCoords,r=t.screenCoords;return 156543.03392*Math.cos(e.latitude*Math.PI/180)/Math.pow(2,e.zoom)*(n[1]-r[1])/2}}],(i=[{key:"makeElevatedEvent",value:function(e,t,n){var r=n.modeConfig||{},i=r.minElevation,a=void 0===i?0:i,o=r.maxElevation,s=void 0===o?2e4:o,u=r.calculateElevationChange,A=void 0===u?f:u;if(!e.pointerDownScreenCoords)return e;var c=3===t.length?t[2]:0;return c+=A({pointerDownScreenCoords:e.pointerDownScreenCoords,screenCoords:e.screenCoords}),c=Math.min(c,s),c=Math.max(c,a),Object.assign({},e,{mapCoords:[t[0],t[1],c]})}},{key:"handlePointerMove",value:function(e,t){var n=(0,r.getPickedEditHandle)(e.pointerDownPicks),i=n?n.geometry.coordinates:e.mapCoords;s(c(d.prototype),"handlePointerMove",this).call(this,this.makeElevatedEvent(e,i,t),t)}},{key:"handleStopDragging",value:function(e,t){var n=(0,r.getPickedEditHandle)(e.picks),i=n?n.geometry.coordinates:e.mapCoords;s(c(d.prototype),"handleStopDragging",this).call(this,this.makeElevatedEvent(e,i,t),t)}},{key:"getCursor",value:function(e){var t=s(c(d.prototype),"getCursor",this).call(this,e);return"cell"===t&&(t="ns-resize"),t}}])&&o(n.prototype,i),h&&o(n,h),d}(n(754).ModifyMode);t.ElevationMode=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransformMode=void 0;var r=n(72),i=n(755),a=n(823),o=n(824);function s(e){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(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 A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(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 l(e,t,n){return(l="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function f(e,t){return!t||"object"!==s(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(y,e);var t,n,s,p,v=(t=y,function(){var e,n=g(t);if(h()){var r=g(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return f(this,e)});function y(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),v.call(this,[new i.TranslateMode,new a.ScaleMode,new o.RotateMode])}return n=y,(s=[{key:"handlePointerMove",value:function(e,t){var n=null;l(g(y.prototype),"handlePointerMove",this).call(this,e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{onUpdateCursor:function(e){n=e||n}})),t.onUpdateCursor(n)}},{key:"handleStartDragging",value:function(e,t){var n=null,r=null,o=[];this._modes.forEach((function(e){e instanceof i.TranslateMode?r=e:(e instanceof a.ScaleMode&&(n=e),o.push(e))})),n instanceof a.ScaleMode&&!n.isEditHandleSelected()&&o.push(r),o.filter(Boolean).forEach((function(n){return n.handleStartDragging(e,t)}))}},{key:"getGuides",value:function(e){var t=l(g(y.prototype),"getGuides",this).call(this,e),n=(this._modes||[]).find((function(e){return e instanceof o.RotateMode}));if(n instanceof o.RotateMode){var i=t.features.filter((function(e){var t=e.properties||{},r=t.editHandleType,i=[t.mode];return n.getIsRotating()&&i.push(r),!i.includes("scale")}));t=(0,r.featureCollection)(i)}return t}}])&&c(n.prototype,s),p&&c(n,p),y}(n(825).CompositeMode);t.TransformMode=p},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 o(e,t,n){return(o="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=A(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function s(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.DrawPointMode=void 0;var l=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(h,e);var t,n,r,l,f=(t=h,function(){var e,n=A(t);if(u()){var r=A(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return s(this,e)});function h(){return i(this,h),f.apply(this,arguments)}return n=h,(r=[{key:"createTentativeFeature",value:function(e){var t=e.lastPointerMoveEvent;return{type:"Feature",properties:{guideType:"tentative"},geometry:{type:"Point",coordinates:(t?[t.mapCoords]:[])[0]}}}},{key:"handleClick",value:function(e,t){var n={type:"Point",coordinates:e.mapCoords};t.onEdit(this.getAddFeatureAction(n,t.data))}},{key:"handlePointerMove",value:function(e,t){t.onUpdateCursor("cell"),o(A(h.prototype),"handlePointerMove",this).call(this,e,t)}}])&&a(n.prototype,r),l&&a(n,l),h}(n(162).GeoJsonEditMode);t.DrawPointMode=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawLineStringMode=void 0;var r=n(241);function i(e){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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 A(e,t){return!t||"object"!==i(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(g,e);var t,n,i,o,h=(t=g,function(){var e,n=l(t);if(c()){var r=l(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return A(this,e)});function g(){return s(this,g),h.apply(this,arguments)}return n=g,(i=[{key:"handleClick",value:function(e,t){var n=e.picks,i=(0,r.getPickedEditHandle)(n),o=!1;i||(this.addClickSequence(e),o=!0);var s=this.getClickSequence();if(s.length>1&&i&&Array.isArray(i.properties.positionIndexes)&&i.properties.positionIndexes[0]===s.length-1){var u={type:"LineString",coordinates:a(s)};this.resetClickSequence();var A=this.getAddFeatureAction(u,t.data);A&&t.onEdit(A)}else o&&t.onEdit({updatedData:t.data,editType:"addTentativePosition",editContext:{position:e.mapCoords}})}},{key:"handleKeyUp",value:function(e,t){if("Enter"===e.key){var n=this.getClickSequence();if(n.length>1){var r={type:"LineString",coordinates:a(n)};this.resetClickSequence();var i=this.getAddFeatureAction(r,t.data);i&&t.onEdit(i)}}}},{key:"getGuides",value:function(e){var t,n,r=e.lastPointerMoveEvent,i=this.getClickSequence(),o=r?[r.mapCoords]:[],s={type:"FeatureCollection",features:[]};i.length>0&&(n={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(a(i),o)}}),n&&s.features.push(n);var u=i.map((function(e,t){return{type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[t]},geometry:{type:"Point",coordinates:e}}}));return(t=s.features).push.apply(t,a(u)),s}},{key:"handlePointerMove",value:function(e,t){t.onUpdateCursor("cell")}}])&&u(n.prototype,i),o&&u(n,o),g}(n(162).GeoJsonEditMode);t.DrawLineStringMode=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawRectangleMode=void 0;var r,i=(r=n(502))&&r.__esModule?r:{default:r};function a(e){return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 u(e,t){return!t||"object"!==a(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function A(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(h,e);var t,n,r,a,f=(t=h,function(){var e,n=c(t);if(A()){var r=c(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return u(this,e)});function h(){return o(this,h),f.apply(this,arguments)}return n=h,(r=[{key:"getTwoClickPolygon",value:function(e,t,n){var r=(0,i.default)([e[0],e[1],t[0],t[1]]);return r.properties=r.properties||{},r.properties.shape="Rectangle",r}}])&&s(n.prototype,r),a&&s(n,a),h}(n(535).TwoClickPolygonMode);t.DrawRectangleMode=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawCircleByDiameterMode=void 0;var r=o(n(826)),i=o(n(212)),a=n(162);function o(e){return e&&e.__esModule?e:{default:e}}function s(e){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(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 c(e,t){return!t||"object"!==s(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(d,e);var t,n,o,s,g=(t=d,function(){var e,n=f(t);if(l()){var r=f(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return c(this,e)});function d(){return u(this,d),g.apply(this,arguments)}return n=d,(o=[{key:"getTwoClickPolygon",value:function(e,t,n){var o=(n||{}).steps,s=void 0===o?64:o,u={steps:s};s<4&&(console.warn("Minimum steps to draw a circle is 4 "),u.steps=4);var A=(0,a.getIntermediatePosition)(e,t),c=Math.max((0,i.default)(e,A),.001),l=(0,r.default)(A,c,u);return l.properties=l.properties||{},l.properties.shape="Circle",l}}])&&A(n.prototype,o),s&&A(n,s),d}(n(535).TwoClickPolygonMode);t.DrawCircleByDiameterMode=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawCircleFromCenterMode=void 0;var r=a(n(826)),i=a(n(212));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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 A(e,t){return!t||"object"!==o(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(g,e);var t,n,a,o,h=(t=g,function(){var e,n=l(t);if(c()){var r=l(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return A(this,e)});function g(){return s(this,g),h.apply(this,arguments)}return n=g,(a=[{key:"getTwoClickPolygon",value:function(e,t,n){var a=(n||{}).steps,o=void 0===a?64:a,s={steps:o};o<4&&(console.warn("Minimum steps to draw a circle is 4 "),s.steps=4);var u=Math.max((0,i.default)(e,t),.001),A=(0,r.default)(e,u,s);return A.properties=A.properties||{},A.properties.shape="Circle",A}}])&&u(n.prototype,a),o&&u(n,o),g}(n(535).TwoClickPolygonMode);t.DrawCircleFromCenterMode=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawEllipseByBoundingBoxMode=void 0;var r=u(n(502)),i=u(n(212)),a=u(n(834)),o=n(72),s=n(162);function u(e){return e&&e.__esModule?e:{default:e}}function A(e){return(A="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(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 f(e,t){return!t||"object"!==A(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(v,e);var t,n,u,A,p=(t=v,function(){var e,n=g(t);if(h()){var r=g(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return f(this,e)});function v(){return c(this,v),p.apply(this,arguments)}return n=v,(u=[{key:"getTwoClickPolygon",value:function(e,t,n){var u=Math.min(e[0],t[0]),A=Math.min(e[1],t[1]),c=Math.max(e[0],t[0]),l=Math.max(e[1],t[1]),f=(0,r.default)([u,A,c,l]).geometry.coordinates[0],h=(0,s.getIntermediatePosition)(e,t),g=Math.max((0,i.default)((0,o.point)(f[0]),(0,o.point)(f[1])),.001),d=Math.max((0,i.default)((0,o.point)(f[0]),(0,o.point)(f[3])),.001);return(0,a.default)(h,g,d)}}])&&l(n.prototype,u),A&&l(n,A),v}(n(535).TwoClickPolygonMode);t.DrawEllipseByBoundingBoxMode=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawEllipseUsingThreePointsMode=void 0;var r=u(n(212)),i=u(n(834)),a=u(n(272)),o=n(72),s=n(162);function u(e){return e&&e.__esModule?e:{default:e}}function A(e){return(A="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(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 f(e,t){return!t||"object"!==A(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var p=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(v,e);var t,n,u,A,p=(t=v,function(){var e,n=g(t);if(h()){var r=g(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return f(this,e)});function v(){return c(this,v),p.apply(this,arguments)}return n=v,(u=[{key:"getThreeClickPolygon",value:function(e,t,n,u){var A=(0,s.getIntermediatePosition)(e,t),c=Math.max((0,r.default)(A,(0,o.point)(n)),.001),l=Math.max((0,r.default)(e,t),.001)/2,f={angle:(0,a.default)(e,t)};return(0,i.default)(A,c,l,f)}}])&&l(n.prototype,u),A&&l(n,A),v}(n(827).ThreeClickPolygonMode);t.DrawEllipseUsingThreePointsMode=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawRectangleUsingThreePointsMode=void 0;var r=n(241);function i(e){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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 A(e,t){return!t||"object"!==i(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(g,e);var t,n,i,o,h=(t=g,function(){var e,n=l(t);if(c()){var r=l(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return A(this,e)});function g(){return s(this,g),h.apply(this,arguments)}return n=g,(i=[{key:"getThreeClickPolygon",value:function(e,t,n,i){var o=a((0,r.generatePointsParallelToLinePoints)(e,t,n),2);return{type:"Feature",properties:{shape:"Rectangle"},geometry:{type:"Polygon",coordinates:[[e,t,o[0],o[1],e]]}}}}])&&u(n.prototype,i),o&&u(n,o),g}(n(827).ThreeClickPolygonMode);t.DrawRectangleUsingThreePointsMode=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Draw90DegreePolygonMode=void 0;var r=A(n(444)),i=A(n(272)),a=A(n(534)),o=A(n(212)),s=n(72),u=n(241);function A(e){return e&&e.__esModule?e:{default:e}}function c(e){return(c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){if(e){if("string"===typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(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 v(e,t,n){return(v="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=I(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function y(e,t){return!t||"object"!==c(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(g,e);var t,n,A,c,h=(t=g,function(){var e,n=I(t);if(m()){var r=I(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return y(this,e)});function g(){return d(this,g),h.apply(this,arguments)}return n=g,(A=[{key:"createTentativeFeature",value:function(e){var t,n=this.getClickSequence(),r=e.lastPointerMoveEvent.mapCoords;if(1===n.length)t=r;else{var i=n[n.length-2],a=n[n.length-1];t=f((0,u.generatePointsParallelToLinePoints)(i,a,r),1)[0]}return n.length<3?{type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(l(n),[t])}}:{type:"Feature",properties:{guideType:"tentative"},geometry:{type:"Polygon",coordinates:[[].concat(l(n),[t,n[0]])]}}}},{key:"getGuides",value:function(e){var t={type:"FeatureCollection",features:[]};if(0===this.getClickSequence().length||!e.lastPointerMoveEvent)return t;var n=this.createTentativeFeature(e);return t.features.push(n),t.features=t.features.concat((0,u.getEditHandlesForGeometry)(n.geometry,-1)),t.features=t.features.slice(0,-1),t}},{key:"handlePointerMove",value:function(e,t){t.onUpdateCursor("cell"),v(I(g.prototype),"handlePointerMove",this).call(this,e,t)}},{key:"handleClick",value:function(e,t){var n=e.picks,r=this.getTentativeGuide(t);this.addClickSequence(e);var i=this.getClickSequence();if(r){if(3===i.length&&"LineString"===r.geometry.type){var a=r.geometry;i[i.length-1]=a.coordinates[a.coordinates.length-1]}else if(i.length>3&&"Polygon"===r.geometry.type){var o=r.geometry;i[i.length-1]=o.coordinates[0][o.coordinates[0].length-2];var s=(0,u.getPickedEditHandle)(n);if(s&&Array.isArray(s.properties.positionIndexes)&&(0===s.properties.positionIndexes[1]||s.properties.positionIndexes[1]===o.coordinates[0].length-3)){var A={type:"Polygon",coordinates:this.finalizedCoordinates(l(o.coordinates[0]))};this.resetClickSequence();var c=this.getAddFeatureOrBooleanPolygonAction(A,t);c&&t.onEdit(c)}}var f={screenCoords:[-1,-1],mapCoords:e.mapCoords,picks:[],pointerDownPicks:null,pointerDownScreenCoords:null,pointerDownMapCoords:null,cancelPan:function(){},sourceEvent:null};this.handlePointerMove(f,t)}}},{key:"finalizedCoordinates",value:function(e){var t=[[].concat(l(e.slice(0,-2)),[e[0]])],n=this.getIntermediatePoint(l(e));if(n)t=[[].concat(l(e.slice(0,-2)),[n,e[0]])];else{var r=l(e);r.splice(-3,1),(n=this.getIntermediatePoint(l(r)))&&(t=[[].concat(l(e.slice(0,-3)),[n,e[0]])])}return t}},{key:"getIntermediatePoint",value:function(e){var t;if(e.length>4){var n=l(e),u=n[0],A=n[1],c=(0,i.default)(u,A),f=e[e.length-3],h=e[e.length-4],g=(0,i.default)(f,h),d={first:[],second:[]};[1,2,3].forEach((function(e){var t=c+90*e;d.first.push(t>180?t-360:t);var n=g+90*e;d.second.push(n>180?n-360:n)}));var p=(0,o.default)((0,s.point)(u),(0,s.point)(f));[0,1,2].forEach((function(e){var n=(0,s.lineString)([u,(0,r.default)(u,p,d.first[e]).geometry.coordinates]);[0,1,2].forEach((function(e){var i=(0,s.lineString)([f,(0,r.default)(f,p,d.second[e]).geometry.coordinates]),o=(0,a.default)(n,i);o&&o.features.length&&(t=o.features[0].geometry.coordinates)}))}))}return t}}])&&p(n.prototype,A),c&&p(n,c),g}(n(162).GeoJsonEditMode);t.Draw90DegreePolygonMode=E},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DrawPolygonByDraggingMode=void 0;var r,i=(r=n(978))&&r.__esModule?r:{default:r},a=n(241);function o(e){return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(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 l(e,t){return!t||"object"!==o(t)&&"function"!==typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(v,e);var t,n,r,o,u=(t=v,function(){var e,n=g(t);if(h()){var r=g(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return l(this,e)});function v(){var e;A(this,v);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return p(f(e=u.call.apply(u,[this].concat(n))),"handleDraggingThrottled",null),e}return n=v,(r=[{key:"handleClick",value:function(e,t){}},{key:"handleStartDragging",value:function(e,t){e.cancelPan(),t.modeConfig&&t.modeConfig.throttleMs?this.handleDraggingThrottled=(0,i.default)(this.handleDraggingAux,t.modeConfig.throttleMs):this.handleDraggingThrottled=this.handleDraggingAux}},{key:"handleStopDragging",value:function(e,t){this.addClickSequence(e);var n=this.getClickSequence();if(this.handleDraggingThrottled&&this.handleDraggingThrottled.cancel&&this.handleDraggingThrottled.cancel(),n.length>2){var r={type:"Polygon",coordinates:[[].concat(s(n),[n[0]])]};this.resetClickSequence();var i=this.getAddFeatureOrBooleanPolygonAction(r,t);i&&t.onEdit(i)}}},{key:"handleDraggingAux",value:function(e,t){var n=e.picks;(0,a.getPickedEditHandle)(n)||this.addClickSequence(e)}},{key:"handleDragging",value:function(e,t){this.handleDraggingThrottled&&this.handleDraggingThrottled(e,t)}}])&&c(n.prototype,r),o&&c(n,o),v}(n(757).DrawPolygonMode);t.DrawPolygonByDraggingMode=v},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,A=s||u||Function("return this")(),c=Object.prototype.toString,l=Math.max,f=Math.min,h=function(){return A.Date.now()};function g(e,t,n){var r,i,a,o,s,u,A=0,c=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,a=i;return r=i=void 0,A=t,o=e.apply(a,n)}function m(e){return A=e,s=setTimeout(b,t),c?y(e):o}function I(e){var n=e-u;return void 0===u||n>=t||n<0||g&&e-A>=a}function b(){var e=h();if(I(e))return E(e);s=setTimeout(b,function(e){var n=t-(e-u);return g?f(n,a-(e-A)):n}(e))}function E(e){return s=void 0,v&&r?y(e):(r=i=void 0,o)}function C(){var e=h(),n=I(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return m(u);if(g)return s=setTimeout(b,t),y(u)}return void 0===s&&(s=setTimeout(b,t)),o}return t=p(t)||0,d(n)&&(c=!!n.leading,a=(g="maxWait"in n)?l(p(n.maxWait)||0,t):a,v="trailing"in n?!!n.trailing:v),C.cancel=function(){void 0!==s&&clearTimeout(s),A=0,r=u=i=s=void 0},C.flush=function(){return void 0===s?o:E(h())},C}function d(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function p(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return NaN;if(d(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=d(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=i.test(e);return s||a.test(e)?o(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return d(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),g(e,t,{leading:r,maxWait:t,trailing:i})}}).call(this,n(70))},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ViewMode=void 0;var A=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(r,e);var t,n=(t=r,function(){var e,n=s(t);if(o()){var r=s(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return a(this,e)});function r(){return i(this,r),n.apply(this,arguments)}return r}(n(162).GeoJsonEditMode);t.ViewMode=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MeasureDistanceMode=void 0;var r=o(n(212)),i=o(n(758)),a=n(162);function o(e){return e&&e.__esModule?e:{default:e}}function s(e){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(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 c(e,t){return!t||"object"!==s(t)&&"function"!==typeof t?l(e):t}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=[],v=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(v,e);var t,n,a,o,s=(t=v,function(){var e,n=h(t);if(f()){var r=h(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return c(this,e)});function v(){var e;u(this,v);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return d(l(e=s.call.apply(s,[this].concat(n))),"startingPoint",null),d(l(e),"endingPoint",null),d(l(e),"endingPointLocked",!1),d(l(e),"_getTooltips",(0,i.default)((function(e){var t=e.modeConfig,n=e.startingPoint,i=e.endingPoint,a=p;if(n&&i){var o,s=t||{},u=s.formatTooltip,A=s.turfOptions,c=s.measurementCallback,l=A&&A.units||"kilometers",f=(0,r.default)(n,i,A);o=u?u(f):"".concat(parseFloat(f).toFixed(2)," ").concat(l),c&&c(f),a=[{position:i.geometry.coordinates,text:o}]}return a}))),e}return n=v,(a=[{key:"_setEndingPoint",value:function(e){this.endingPoint={type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[]},geometry:{type:"Point",coordinates:e}}}},{key:"handleClick",value:function(e,t){!this.startingPoint||this.endingPointLocked?(this.startingPoint={type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[]},geometry:{type:"Point",coordinates:e.mapCoords}},this.endingPoint=null,this.endingPointLocked=!1):this.startingPoint&&(this._setEndingPoint(e.mapCoords),this.endingPointLocked=!0)}},{key:"handlePointerMove",value:function(e,t){this.startingPoint&&!this.endingPointLocked&&this._setEndingPoint(e.mapCoords),t.onUpdateCursor("cell")}},{key:"getGuides",value:function(e){var t={type:"FeatureCollection",features:[]},n=t.features;return this.startingPoint&&n.push(this.startingPoint),this.endingPoint&&n.push(this.endingPoint),this.startingPoint&&this.endingPoint&&n.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[this.startingPoint.geometry.coordinates,this.endingPoint.geometry.coordinates]}}),t}},{key:"getTooltips",value:function(e){return this._getTooltips({modeConfig:e.modeConfig,startingPoint:this.startingPoint,endingPoint:this.endingPoint})}}])&&A(n.prototype,a),o&&A(n,o),v}(a.GeoJsonEditMode);t.MeasureDistanceMode=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MeasureAreaMode=void 0;var r=o(n(457)),i=o(n(380)),a=n(757);function o(e){return e&&e.__esModule?e:{default:e}}function s(e){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(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 A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(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 f(e,t,n){return(f="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function h(e,t){return!t||"object"!==s(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var v=[],y=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(y,e);var t,n,a,o,s=(t=y,function(){var e,n=d(t);if(g()){var r=d(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return h(this,e)});function y(){return c(this,y),s.apply(this,arguments)}return n=y,(a=[{key:"handleClick",value:function(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{onEdit:function(){}});f(d(y.prototype),"handleClick",this).call(this,e,n)}},{key:"getTooltips",value:function(e){var t=this.getTentativeGuide(e);if(t&&"Polygon"===t.geometry.type){var n,a=e.modeConfig||{},o=a.formatTooltip,s=a.measurementCallback,u=(0,i.default)(t),A=(0,r.default)(t);return n=o?o(A):"".concat(parseFloat(A).toFixed(2)," ").concat("sq. m"),s&&s(A),[{position:u.geometry.coordinates,text:n}]}return v}}])&&l(n.prototype,a),o&&l(n,o),y}(a.DrawPolygonMode);t.MeasureAreaMode=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MeasureAngleMode=void 0;var r=s(n(272)),i=s(n(983)),a=s(n(758)),o=n(162);function s(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(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 h(e,t){return!t||"object"!==u(t)&&"function"!==typeof t?g(e):t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=[],I=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(c,e);var t,n,o,s,u=(t=c,function(){var e,n=p(t);if(d()){var r=p(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return h(this,e)});function c(){var e;l(this,c);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return y(g(e=u.call.apply(u,[this].concat(n))),"_getTooltips",(0,a.default)((function(e){var t=e.modeConfig,n=e.vertex,a=e.point1,o=e.point2,s=m;if(n&&a&&o){var u,A=t||{},c=A.formatTooltip,l=A.measurementCallback,f=(0,r.default)(n,a),h=(0,r.default)(n,o),g=Math.abs(f-h);g>180&&(g=360-g),u=c?c(g):"".concat(parseFloat(g).toFixed(2)," ").concat("deg"),l&&l(g),s=[{position:(0,i.default)({type:"FeatureCollection",features:[a,o].map((function(e){return{type:"Feature",geometry:{type:"Point",coordinates:e}}}))}).geometry.coordinates,text:u}]}return s}))),e}return n=c,(o=[{key:"handleClick",value:function(e,t){this.getClickSequence().length>=3&&this.resetClickSequence(),this.addClickSequence(e)}},{key:"handlePointerMove",value:function(e,t){t.onUpdateCursor("cell")}},{key:"getPoints",value:function(e){var t=this.getClickSequence(),n=A(t);return t.length<3&&e.lastPointerMoveEvent&&n.push(e.lastPointerMoveEvent.mapCoords),n}},{key:"getGuides",value:function(e){var t={type:"FeatureCollection",features:[]},n=t.features,r=this.getPoints(e);return r.length>2?n.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[r[1],r[0],r[2]]}}):r.length>1&&n.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[r[1],r[0]]}}),t}},{key:"getTooltips",value:function(e){var t=this.getPoints(e);return this._getTooltips({modeConfig:e.modeConfig,vertex:t[0],point1:t[1],point2:t[2]})}}])&&f(n.prototype,o),s&&f(n,s),c}(o.GeoJsonEditMode);t.MeasureAngleMode=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(376),i=n(72);t.default=function(e,t){void 0===t&&(t={});var n=r.default(e),a=(n[0]+n[2])/2,o=(n[1]+n[3])/2;return i.point([a,o],t.properties,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SnappableMode=void 0;var r=n(241);function i(e){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"===typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(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 A(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 c(e,t){return!t||"object"!==i(t)&&"function"!==typeof t?l(e):t}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(v,e);var t,n,i,s,p=(t=v,function(){var e,n=h(t);if(f()){var r=h(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return c(this,e)});function v(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),d(l(t=p.call(this)),"_handler",void 0),t._handler=e,t}return n=v,(i=[{key:"_getSnappedMouseEvent",value:function(e,t,n){return Object.assign(e,{mapCoords:n.geometry.coordinates,pointerDownMapCoords:t&&t.geometry.coordinates})}},{key:"_getPickedSnapTarget",value:function(e){return(0,r.getPickedEditHandles)(e).find((function(e){return"snap-target"===e.properties.editHandleType}))}},{key:"_getPickedSnapSource",value:function(e){return(0,r.getPickedSnapSourceEditHandle)(e)}},{key:"_getUpdatedSnapSourceHandle",value:function(e,t){var n=e.properties,r=n.featureIndex,i=n.positionIndexes;if(!Array.isArray(i))return e;var a=t.features[r];return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{geometry:{type:"Point",coordinates:i.reduce((function(e,t){return e[t]}),a.geometry.coordinates)}})}},{key:"_getSnapTargets",value:function(e){var t=(e.modeConfig||{}).additionalSnapTargets;return t=t||[],[].concat(a(e.data.features),a(t))}},{key:"_getSnapTargetHandles",value:function(e){for(var t=[],n=this._getSnapTargets(e),i=0;i<n.length;i++)if(!e.selectedIndexes.includes(i)){var o=n[i].geometry;t.push.apply(t,a((0,r.getEditHandlesForGeometry)(o,i,"snap-target")))}return t}},{key:"getGuides",value:function(e){var t=e.modeConfig,n=e.lastPointerMoveEvent,i=(t||{}).enableSnapping,s={type:"FeatureCollection",features:a(this._handler.getGuides(e).features)};if(!i)return s;var u,A=n&&this._getPickedSnapSource(n.pointerDownPicks);if(A)return(u=s.features).push.apply(u,a(this._getSnapTargetHandles(e)).concat([this._getUpdatedSnapSourceHandle(A,e.data)])),s;var c,l=e.data.features,f=function(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=o(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,i,a=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(e.selectedIndexes);try{for(f.s();!(c=f.n()).done;){var h=c.value;if(h<l.length){var g,d=l[h].geometry;(g=s.features).push.apply(g,a((0,r.getEditHandlesForGeometry)(d,h,"snap-source")))}}}catch(p){f.e(p)}finally{f.f()}return s}},{key:"_getSnapAwareEvent",value:function(e,t){var n=this._getPickedSnapSource(t.lastPointerMoveEvent.pointerDownPicks),r=this._getPickedSnapTarget(e.picks);return n&&r?this._getSnappedMouseEvent(e,n,r):e}},{key:"handleStartDragging",value:function(e,t){this._handler.handleStartDragging(e,t)}},{key:"handleStopDragging",value:function(e,t){this._handler.handleStopDragging(this._getSnapAwareEvent(e,t),t)}},{key:"handleDragging",value:function(e,t){this._handler.handleDragging(this._getSnapAwareEvent(e,t),t)}},{key:"handlePointerMove",value:function(e,t){this._handler.handlePointerMove(this._getSnapAwareEvent(e,t),t)}}])&&A(n.prototype,i),s&&A(n,s),v}(n(162).GeoJsonEditMode);t.SnappableMode=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(512),i=n(366),a=n(106),o=u(n(753)),s=u(n(828));function u(e){return e&&e.__esModule?e:{default:e}}function A(e){return(A="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(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 g(e,t,n){return(g="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function d(e,t){return!t||"object"!==A(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(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 I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=i.ViewMode,C={type:"FeatureCollection",features:[]},B=I({mode:E},o.default.defaultProps,{data:[],selectedIndexes:[],filled:!1,stroked:!0,lineWidthScale:1,lineWidthMinPixels:1,lineWidthMaxPixels:Number.MAX_SAFE_INTEGER,lineWidthUnits:"pixels",getHexagons:function(e){return e.hexIds},getEditedCluster:function(e,t){return t?I({},t,{hexIds:e}):{hexIds:e}},resolution:9}),w=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(A,e);var t,n,i,s,u=(t=A,function(){var e,n=v(t);if(p()){var r=v(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return d(this,e)});function A(){return f(this,A),u.apply(this,arguments)}return n=A,(i=[{key:"initializeState",value:function(){g(v(A.prototype),"initializeState",this).call(this),this.setState({tentativeHexagonIDs:[]})}},{key:"getDerivedHexagonIDs",value:function(e){return(0,a.polyfill)(e,this.props.resolution,!0)}},{key:"getDerivedHexagonID",value:function(e){return(0,a.geoToH3)(e[1],e[0],this.props.resolution)}},{key:"renderLayers",value:function(){var e=this;return[new o.default(this.getSubLayerProps({id:"editable-geojson",mode:this.props.mode,data:C,selectedFeatureIndexes:[],onEdit:function(t){var n=t.editType,r=t.editContext;switch(n){case"updateTentativeFeature":if("Polygon"===r.feature.geometry.type){var i=r.feature.geometry.coordinates,a=e.getDerivedHexagonIDs(i);e.setState({tentativeHexagonIDs:a})}else if("Point"===r.feature.geometry.type){var o=r.feature.geometry.coordinates,s=e.getDerivedHexagonID(o);e.setState({tentativeHexagonIDs:[s]})}break;case"addFeature":var u=c(e.props.data),A=e.props.modeConfig;if(A&&A.booleanOperation)if(1!==e.props.selectedIndexes.length)console.warn("booleanOperation only supported for single cluster selection");else{var l,f=new Set(e.getSelectedHexIDs()),h=new Set(e.state.tentativeHexagonIDs);switch(A.booleanOperation){case"union":default:l=c(new Set([].concat(c(f),c(h))));break;case"intersection":l=c(f).filter((function(e){return h.has(e)}));break;case"difference":l=c(f).filter((function(e){return!h.has(e)}))}var g=e.props.selectedIndexes[0],d=e.props.data[g];u[g]=e.props.getEditedCluster(l,d)}else u.push(e.props.getEditedCluster(e.state.tentativeHexagonIDs,null));e.setState({tentativeHexagonIDs:[]}),e.props.onEdit({updatedData:u})}}})),new r.H3ClusterLayer(this.getSubLayerProps({id:"hexagons",data:this.props.data,getHexagons:this.props.getHexagons})),new r.H3ClusterLayer(this.getSubLayerProps({id:"tentative-hexagons",data:[{hexIds:this.state.tentativeHexagonIDs}],getHexagons:function(e){return e.hexIds}}))]}},{key:"getSelectedHexIDs",value:function(){var e=this,t=[];return this.props.selectedIndexes.forEach((function(n){var r=e.props.data[n],i=e.props.getHexagons(r);t=t.concat(i)})),t}},{key:"getCursor",value:function(e){var t=e.isDragging,n=this.state.cursor;return n||(n=t?"grabbing":"grab"),n}}])&&h(n.prototype,i),s&&h(n,s),A}(s.default);t.default=w,b(w,"layerName","EditableH3ClusterLayer"),b(w,"defaultProps",B)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.SELECTION_TYPE=void 0;var r,i=n(49),a=n(105),o=n(72),s=l(n(763)),u=l(n(987)),A=n(366),c=l(n(753));function l(e){return e&&e.__esModule?e:{default:e}}function f(e){return(f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(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 g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||v(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){if(e){if("string"===typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I(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 b(e,t){return!t||"object"!==f(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function E(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Q={NONE:null,RECTANGLE:"rectangle",POLYGON:"polygon"};t.SELECTION_TYPE=Q;var k=(w(r={},Q.RECTANGLE,A.DrawRectangleMode),w(r,Q.POLYGON,A.DrawPolygonMode),r),_=w({},Q.RECTANGLE,{dragToDraw:!0}),x={selectionType:Q.RECTANGLE,layerIds:[],onSelect:function(){}},S={type:"FeatureCollection",features:[]},O=["lineWidthScale","lineWidthMinPixels","lineWidthMaxPixels","lineWidthUnits","lineJointRounded","lineMiterLimit","pointRadiusScale","pointRadiusMinPixels","pointRadiusMaxPixels","lineDashJustified","getLineColor","getFillColor","getRadius","getLineWidth","getLineDashArray","getTentativeLineDashArray","getTentativeLineColor","getTentativeFillColor","getTentativeLineWidth"],D=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&B(e,t)}(f,e);var t,n,r,i,l=(t=f,function(){var e,n=C(t);if(E()){var r=C(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return b(this,e)});function f(){return m(this,f),l.apply(this,arguments)}return n=f,(r=[{key:"_selectRectangleObjects",value:function(e){var t=this.props,n=t.layerIds,r=t.onSelect,i=p(this.context.viewport.project(e[0][0]),2),a=i[0],o=i[1],s=p(this.context.viewport.project(e[0][2]),2),u=s[0],A=s[1];r({pickingInfos:this.context.deck.pickObjects({x:Math.min(a,u),y:Math.min(o,A),width:Math.abs(u-a),height:Math.abs(A-o),layerIds:n})})}},{key:"_selectPolygonObjects",value:function(e){var t,n=this,r=this.props,i=r.layerIds,a=r.onSelect,A=e[0].map((function(e){return n.context.viewport.project(e)})),c=A.map((function(e){return e[0]})),l=A.map((function(e){return e[1]})),f=Math.min.apply(Math,d(c)),h=Math.min.apply(Math,d(l)),g=Math.max.apply(Math,d(c)),p=Math.max.apply(Math,d(l)),v=(0,o.polygon)(e),y=(0,s.default)(v,50);try{t=(0,u.default)(y,v)}catch(I){return void console.log("turfDifference() error",I)}this.setState({pendingPolygonSelection:{bigPolygon:t}});var m="".concat(this.props.id,"-").concat("selection-blocker");setTimeout((function(){var e=n.context.deck.pickObjects({x:f,y:h,width:g-f,height:p-h,layerIds:[m].concat(d(i))});a({pickingInfos:e.filter((function(e){return e.layer.id!==n.props.id}))})}),250)}},{key:"renderLayers",value:function(){var e=this,t=this.state.pendingPolygonSelection,n=k[this.props.selectionType]||A.ViewMode,r=_[this.props.selectionType],i={};O.forEach((function(t){void 0!==e.props[t]&&(i[t]=e.props[t])}));var o=[new c.default(this.getSubLayerProps(g({id:"selection-geojson",pickable:!0,mode:n,modeConfig:r,selectedFeatureIndexes:[],data:S,onEdit:function(t){var n=t.updatedData;if("addFeature"===t.editType){var r=n.features[0].geometry.coordinates;e.props.selectionType===Q.RECTANGLE?e._selectRectangleObjects(r):e.props.selectionType===Q.POLYGON&&e._selectPolygonObjects(r)}}},i)))];if(t){var s=t.bigPolygon;o.push(new a.PolygonLayer(this.getSubLayerProps({id:"selection-blocker",pickable:!0,stroked:!1,opacity:1,data:[s],getLineColor:function(e){return[0,0,0,1]},getFillColor:function(e){return[0,0,0,1]},getPolygon:function(e){return e.geometry.coordinates}})))}return o}},{key:"shouldUpdateState",value:function(e){var t=e.changeFlags,n=t.stateChanged,r=t.propsOrDataChanged;return n||r}}])&&I(n.prototype,r),i&&I(n,i),f}(i.CompositeLayer);t.default=D,w(D,"layerName","SelectionLayer"),w(D,"defaultProps",x)},function(e,t,n){"use strict";function r(e){return e&&"object"===typeof e&&"default"in e?e.default:e}var i=r(n(456)),a=r(n(457)),o=n(72),s=n(114),u=n(145);function A(e){switch(e.type){case"Polygon":return a(e)>1?e:null;case"MultiPolygon":var t=[];if(u.flattenEach(e,(function(e){a(e)>1&&t.push(e.geometry.coordinates)})),t.length)return{type:"MultiPolygon",coordinates:t}}}e.exports=function(e,t){var n=s.getGeom(e),r=s.getGeom(t),a=e.properties||{};if(n=A(n),r=A(r),!n)return null;if(!r)return o.feature(n,a);var u=i.diff(n.coordinates,r.coordinates);return 0===u.length?null:1===u.length?o.polygon(u[0],a):o.multiPolygon(u,a)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(49),i=n(105);function a(e){return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 u(e,t){return!t||"object"!==a(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function A(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(h,e);var t,n,r,a,f=(t=h,function(){var e,n=c(t);if(A()){var r=c(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return u(this,e)});function h(){return o(this,h),f.apply(this,arguments)}return n=h,(r=[{key:"renderLayers",value:function(){return[new i.ScatterplotLayer(Object.assign({},this.props,{id:"".concat(this.props.id,"-ScatterplotLayer"),data:this.props.data})),new i.LineLayer(Object.assign({},this.props,{id:"".concat(this.props.id,"-LineLayer"),data:this.props.data,pickable:!1,getSourcePosition:function(e){var t=e.position;return[t[0],t[1],0]},getTargetPosition:function(e){var t=e.position;return[t[0],t[1],t[2]||0]},getColor:[150,150,150,200],getStrokeWidth:3}))]}}])&&s(n.prototype,r),a&&s(n,a),h}(r.CompositeLayer);t.default=h,f(h,"layerName","ElevatedEditHandleLayer"),f(h,"defaultProps",{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={outlineEnabled:!1,outlineRenderShadowmap:!1,outlineShadowmap:null};var i={name:"outline",vs:"attribute float instanceZLevel;\nvarying float outline_vzLevel;\nvarying vec4 outline_vPosition;\n\n// Set the z level for the outline shadowmap rendering\nvoid outline_setZLevel(float zLevel) {\n  outline_vzLevel = zLevel;\n}\n\n// Store an adjusted position for texture2DProj\nvoid outline_setUV(vec4 position) {\n  // mat4(\n  //   0.5, 0.0, 0.0, 0.0,\n  //   0.0, 0.5, 0.0, 0.0,\n  //   0.0, 0.0, 0.5, 0.0,\n  //   0.5, 0.5, 0.5, 1.0\n  // ) * position;\n  outline_vPosition = vec4(position.xyz * 0.5 + position.w * 0.5, position.w);\n}\n",fs:"uniform bool outline_uEnabled;\nuniform bool outline_uRenderOutlines;\nuniform sampler2D outline_uShadowmap;\n\nvarying float outline_vzLevel;\n// varying vec2 outline_vUV;\nvarying vec4 outline_vPosition;\n\nconst float OUTLINE_Z_LEVEL_ERROR = 0.01;\n\n// Return a darker color in shadowmap\nvec4 outline_filterShadowColor(vec4 color) {\n  return vec4(outline_vzLevel / 255., outline_vzLevel / 255., outline_vzLevel / 255., 1.);\n}\n\n// Return a darker color if in shadowmap\nvec4 outline_filterDarkenColor(vec4 color) {\n  if (outline_uEnabled) {\n    float maxZLevel;\n    if (outline_vPosition.q > 0.0) {\n      maxZLevel = texture2DProj(outline_uShadowmap, outline_vPosition).r * 255.;\n    } else {\n      discard;\n    }\n    if (maxZLevel < outline_vzLevel + OUTLINE_Z_LEVEL_ERROR) {\n      vec4(color.rgb * 0.5, color.a);\n    } else {\n      discard;\n    }\n  }\n  return color;\n}\n\n// if enabled and rendering outlines - Render depth to shadowmap\n// if enabled and rendering colors - Return a darker color if in shadowmap\n// if disabled, just return color\nvec4 outline_filterColor(vec4 color) {\n  if (outline_uEnabled) {\n    return outline_uRenderOutlines ?\n      outline_filterShadowColor(color) :\n      outline_filterDarkenColor(color);\n  }\n  return color;\n}\n",getUniforms:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,t=e.outlineEnabled,n=e.outlineRenderShadowmap,i=e.outlineShadowmap,a={};return void 0!==t&&(a.outline_uEnabled=t),void 0!==n&&(a.outline_uRenderOutlines=n),void 0!==i&&(a.outline_uShadowmap=i),a}};t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(49),i=n(105),a=n(486),o=c(n(829)),s=c(n(991)),u=c(n(992)),A=n(993);function c(e){return e&&e.__esModule?e:{default:e}}function l(e){return(l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(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 p(e,t){return!t||"object"!==l(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=a.SimpleMeshLayer,E={mesh:new s.default({headSize:.2,tailWidth:.05})},C=Object.assign({},o.default.defaultProps,{MarkerLayer:b,markerLayerProps:E,sizeScale:100,fp64:!1,hightlightIndex:-1,highlightPoint:null,getPath:function(e){return e.path},getColor:function(e){return e.color},getMarkerColor:function(e){return[0,0,0,255]},getDirection:function(e){return e.direction},getMarkerPercentages:function(e,t){return t.lineLength>.1?[.25,.5,.75]:[.5]}}),B=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(h,e);var t,n,a,c,l=(t=h,function(){var e,n=y(t);if(v()){var r=y(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return p(this,e)});function h(){return g(this,h),l.apply(this,arguments)}return n=h,(a=[{key:"initializeState",value:function(){this.state={markers:[],mesh:new s.default({headSize:.2,tailWidth:.05}),closestPoint:null}}},{key:"projectFlat",value:function(e,t,n,i){if(n===r.COORDINATE_SYSTEM.METER_OFFSETS){var a=f(t.metersToLngLatDelta(e),2),o=a[0],s=a[1],u=f(i,2),A=u[0],c=u[1];return t.projectFlat([A+o,s+c])}if(n===r.COORDINATE_SYSTEM.LNGLAT_OFFSETS){var l=f(e,2),h=l[0],g=l[1],d=f(i,2),p=d[0],v=d[1];return t.projectFlat([p+h,g+v])}return t.projectFlat(e)}},{key:"updateState",value:function(e){var t=this,n=e.props,r=e.oldProps,i=e.changeFlags;if(i.dataChanged||i.updateTriggersChanged){var a=this.props,o=a.data,s=a.getPath,A=a.getDirection,c=a.getMarkerColor,l=a.getMarkerPercentages,f=a.coordinateSystem,h=a.coordinateOrigin,g=this.context.viewport;this.state.markers=(0,u.default)({data:o,getPath:s,getDirection:A,getColor:c,getMarkerPercentages:l,projectFlat:function(e){return t.projectFlat(e,g,f,h)}}),this._recalculateClosestPoint()}i.propsChanged&&n.point!==r.point&&this._recalculateClosestPoint()}},{key:"_recalculateClosestPoint",value:function(){var e=this.props,t=e.highlightPoint,n=e.highlightIndex;if(t&&n>=0){var r=this.props.data[n],i=this.props.getPath(r),a=(0,A.getClosestPointOnPolyline)({points:i,p:t}).point;this.state.closestPoints=[{position:a}]}else this.state.closestPoints=[]}},{key:"getPickingInfo",value:function(e){var t=e.info;return Object.assign(t,{object:t.object&&t.object.path||t.object})}},{key:"renderLayers",value:function(){return[new o.default(this.props,this.getSubLayerProps({id:"paths",data:this.props.data})),new this.props.MarkerLayer(this.getSubLayerProps(Object.assign({},this.props.markerLayerProps,{id:"markers",data:this.state.markers,getOrientation:function(e){return[0,-e.angle,0]},getColor:function(e){return e.color},sizeScale:this.props.sizeScale,fp64:this.props.fp64,pickable:!1,parameters:{blend:!1,depthTest:!1}}))),this.state.closestPoints&&new i.ScatterplotLayer({id:"".concat(this.props.id,"-highlight"),data:this.state.closestPoints,fp64:this.props.fp64})]}}])&&d(n.prototype,a),c&&d(n,c),h}(r.CompositeLayer);t.default=B,I(B,"layerName","PathMarkerLayer"),I(B,"defaultProps",C)},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function o(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var A=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(r,e);var t,n=(t=r,function(){var e,n=s(t);if(o()){var r=s(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return a(this,e)});function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,r),n.call(this,Object.assign({},e,{attributes:c(e)}))}return r}(n(50).Geometry);function c(e){for(var t=e.length,n=void 0===t?1:t,r=e.headSize,i=void 0===r?.2:r,a=e.tailWidth,o=void 0===a?.05:a,s=e.tailStart,u=void 0===s?.05:s,A=[.5,1,0,.5-i/2,1-i,0,.5+i/2,1-i,0,.5-o/2,u,0,.5+o/2,1-i,0,.5+o/2,u,0,.5-o/2,u,0,.5-o/2,1-i,0,.5+o/2,1-i,0],c=new Array(A.length),l=0;l<A.length/3;l++){var f=3*l;c[f+0]=(A[f+0]-.5)*n,c[f+1]=(A[f+1]-.5)*n,c[f+2]=0}return{positions:new Float32Array(c),normals:new Float32Array([0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1]),texCoords:new Float32Array(A)}}t.default=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.data,a=e.getPath,c=void 0===a?function(e){return e.path}:a,l=e.getDirection,f=void 0===l?function(e){return e.direction}:l,h=e.getColor,g=void 0===h?function(e){return s}:h,d=e.getMarkerPercentages,p=void 0===d?function(e){return[.5]}:d,v=e.projectFlat,y=[],m=i(n);try{for(m.s();!(t=m.n()).done;){var I,b=t.value,E=c(b),C=f(b)||u,B=g(b),w=E.map((function(e){return new r.Vector2(e)})),Q=w.slice(0).reverse(),k=o(w),_=i(p(b,{lineLength:k}));try{for(_.s();!(I=_.n()).done;){var x=I.value;if(C.forward){var S=A({path:w,percentage:x,lineLength:k,color:B,object:b,projectFlat:v});y.push(S)}if(C.backward){var O=A({path:Q,percentage:x,lineLength:k,color:B,object:b,projectFlat:v});y.push(O)}}}catch(D){_.e(D)}finally{_.f()}}}catch(D){m.e(D)}finally{m.f()}return y};var r=n(194);function i(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"===typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,i,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e){for(var t=0,n=0;n<e.length-1;n++)t+=e[n].distance(e[n+1]);return t}var s=[0,0,0,255],u={forward:!0,backward:!1};function A(e){var t=e.path,n=e.percentage,i=e.lineLength,a=e.color,o=e.object,s=e.projectFlat,u=i*n,A=0,c=0,l=0;for(l=0;l<t.length-1&&!((A+=t[l].distance(t[l+1]))>u);l++)c=A;var f=u-c,h=t[l+1].clone().subtract(t[l]).normalize().clone().multiply(new r.Vector2(f,f)).add(t[l]),g=180*-new r.Vector2(s(t[l+1])).subtract(s(t[l])).verticalAngle()/Math.PI;return{position:[h.x,h.y,0],angle:g,color:a,object:o}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getClosestPointOnLine=i,t.getClosestPointOnPolyline=function(e){var t=e.p,n=e.points;t=new r.Vector3(t);for(var a=null,o=1/0,s=-1,u=0;u<n.length-1;++u){var A=n[u],c=n[u+1],l=i({p:t,p1:A,p2:c}),f=t.distanceSquared(l);f<o&&(o=f,a=l,s=u)}return{point:a,index:s,p1:n[s],p2:n[s+1],distanceSquared:o,distance:Math.sqrt(o)}};var r=n(194);function i(e){var t=e.p,n=e.p1,i=e.p2,a=e.clampToLine,o=void 0===a||a,s=new r.Vector3(i).subtract(n),u=new r.Vector3(t).subtract(n),A=s.dot(u);return o&&(A=(0,r.clamp)(A,0,1)),s.lerp(A)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(49),i=n(105);function a(e){return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(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 c(e,t){return!t||"object"!==a(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(g,e);var t,n,r,a,o=(t=g,function(){var e,n=f(t);if(l()){var r=f(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return c(this,e)});function g(){return u(this,g),o.apply(this,arguments)}return n=g,(r=[{key:"renderLayers",value:function(){var e=this.props,t=e.id,n=e.getFillColor,r=e.getStrokeColor,a=e.getInnerRadius,o=e.updateTriggers;return[new i.ScatterplotLayer(s({},this.props,{id:"".concat(t,"-full"),data:this.props.data,getLineColor:r,updateTriggers:s({},o,{getStrokeColor:o.getStrokeColor})})),new i.ScatterplotLayer(s({},this.props,{id:"".concat(t,"-inner"),data:this.props.data,getFillColor:n,getRadius:a,pickable:!1,updateTriggers:s({},o,{getFillColor:o.getFillColor,getRadius:o.getInnerRadius})}))]}}])&&A(n.prototype,r),a&&A(n,a),g}(r.CompositeLayer);t.default=d,g(d,"layerName","JunctionScatterplotLayer"),g(d,"defaultProps",s({},i.ScatterplotLayer.defaultProps,{getFillColor:function(e){return[0,0,0,255]},getStrokeColor:function(e){return[255,255,255,255]},getInnerRadius:function(e){return 1}}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toDeckColor=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[255,0,0,255];if(!Array.isArray(e))return t;return[255*e[0],255*e[1],255*e[2],255*e[3]]},t.recursivelyTraverseNestedArrays=function e(t,n,r){if(!Array.isArray(t[0]))return!0;for(var i=0;i<t.length;i++)if(e(t[i],[].concat(function(e){if(Array.isArray(e))return l(e)}(a=n)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(a)||c(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[i]),r)){r(t,n);break}var a;return!1},t.generatePointsParallelToLinePoints=function(e,t,n){var s={type:"LineString",coordinates:[e,t]},u=(0,o.point)(n),A=(0,a.default)(u,s),c=(0,i.default)(e,t),l=(n[0]-e[0])*(t[1]-e[1])-(n[1]-e[1])*(t[0]-e[0])<0?c-90:c-270,f=(0,r.default)(t,A,l),h=(0,r.default)(e,A,l);return[f.geometry.coordinates,h.geometry.coordinates]},t.distance2d=f,t.mix=h,t.nearestPointOnProjectedLine=function(e,t,n){var r=new s.default(n),i=e.geometry.coordinates.map((function(e){var t=A(e,3),n=t[0],i=t[1],a=t[2],o=void 0===a?0:a;return r.project([n,i,o])})),a=A(r.project(t.geometry.coordinates),2),o=a[0],u=a[1],c=1/0,l={};i.forEach((function(e,t){var n=A(e,2),r=n[0],a=n[1];if(0!==t){var s=A(i[t-1],2),f=s[0],h=s[1],g=h-a,d=r-f,p=f*a-r*h,v=g*g+d*d,y=Math.abs(g*o+d*u+p)/Math.sqrt(v);y<c&&(c=y,l={index:t,x0:(d*(d*o-g*u)-g*p)/v,y0:(g*(-d*o+g*u)-d*p)/v})}}));var g=l,d=g.index,p=g.x0,v=g.y0,y=A(i[d-1],3),m=y[0],I=y[1],b=y[2],E=void 0===b?0:b,C=A(i[d],3),B=C[0],w=C[1],Q=C[2],k=void 0===Q?0:Q,_=f(m,I,B,w),x=f(m,I,p,v),S=h(E,k,x/_);return{type:"Feature",geometry:{type:"Point",coordinates:r.unproject([p,v,S])},properties:{dist:c,index:d-1}}};var r=u(n(444)),i=u(n(272)),a=u(n(822)),o=n(72),s=u(n(833));function u(e){return e&&e.__esModule?e:{default:e}}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if(e){if("string"===typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t,n,r){var i=e-n,a=t-r;return Math.sqrt(i*i+a*a)}function h(e,t,n){return t*n+e*(1-n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(105),i=s(n(503)),a=n(536),o=s(n(759));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){return(u="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(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 c(e,t){return!t||"object"!==u(t)&&"function"!==typeof t?l(e):t}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(d,e);var t,n,i,s,u=(t=d,function(){var e,n=h(t);if(f()){var r=h(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return c(this,e)});function d(e){var t,n,r,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),t=u.call(this,e),n=l(t),i=void 0,(r="deckCache")in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,t.deckCache=new o.default(e.getData,(function(t){return e.toNebulaFeature(t)})),t}return n=d,(i=[{key:"render",value:function(e){var t=e.nebula,n=[0,0,0,255],i=this.deckCache,o=i.objects,s=i.updateTrigger,u=t.props.viewport.zoom;return new r.TextLayer({id:"texts-".concat(this.id),data:o,opacity:1,fp64:!1,pickable:!1,getText:function(e){return e.style.text},getPosition:function(e){return e.geoJson.geometry.coordinates},getColor:function(e){return(0,a.toDeckColor)(e.style.fillColor)||n},sizeScale:1/Math.pow(2,20-u),updateTriggers:{all:s},nebulaLayer:this})}}])&&A(n.prototype,i),s&&A(n,s),d}(i.default);t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=n(752),a=n(148),o=n(818),s=c(n(503)),u=n(536),A=c(n(759));function c(e){return e&&e.__esModule?e:{default:e}}function l(e){return(l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(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 h(e,t){return!t||"object"!==l(t)&&"function"!==typeof t?g(e):t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=(y(r={},o.ArrowStyles.NONE,{forward:!1,backward:!1}),y(r,o.ArrowStyles.FORWARD,{forward:!0,backward:!1}),y(r,o.ArrowStyles.BACKWARD,{forward:!1,backward:!0}),y(r,o.ArrowStyles.BOTH,{forward:!0,backward:!0}),r),I=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(l,e);var t,n,r,s,c=(t=l,function(){var e,n=p(t);if(d()){var r=p(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return h(this,e)});function l(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),y(g(t=c.call(this,e)),"deckCache",void 0),y(g(t),"noBlend",void 0),y(g(t),"highlightColor",void 0),y(g(t),"arrowSize",void 0),y(g(t),"rounded",void 0),y(g(t),"dashed",void 0),y(g(t),"markerLayerProps",void 0),t.deckCache=new A.default(e.getData,(function(t){return e.toNebulaFeature(t)})),t.enableSelection=!0;var n=e.enablePicking,r=void 0===n||n,i=e.noBlend,a=void 0!==i&&i,o=e.rounded,s=void 0===o||o,u=e.dashed,f=void 0!==u&&u,h=e.markerLayerProps,d=void 0===h?null:h;return Object.assign(g(t),{enablePicking:r,noBlend:a,rounded:s,dashed:f,markerLayerProps:d}),t}return n=l,(r=[{key:"getMouseOverSegment",value:function(){return null}},{key:"_calcMarkerPercentages",value:function(e){var t=e.style.arrowPercentages;return t||((e.style.arrowStyle||o.DEFAULT_STYLE.arrowStyle)===o.ArrowStyles.NONE?[]:[[.5],[.33,.66],[.25,.5,.75]][Math.min(e.style.arrowCount||o.DEFAULT_STYLE.arrowCount,o.MAX_ARROWS)-1])}},{key:"_getHighlightedObjectIndex",value:function(e){var t=e.nebula.deckglMouseOverInfo;if(t){var n=t.originalLayer,r=t.index;if(n===this)return r}return-1}},{key:"render",value:function(e){var t=e.nebula,n=[0,0,0,255],r=this.deckCache,o=r.objects,s=r.updateTrigger;return new i.PathMarkerLayer({id:"segments-".concat(this.id),data:o,opacity:1,fp64:!1,rounded:this.rounded,pickable:!0,sizeScale:this.arrowSize||6,parameters:{depthTest:!1,blend:!this.noBlend,blendEquation:a.MAX},getPath:function(e){return e.geoJson.geometry.coordinates},getColor:function(e){return(0,u.toDeckColor)(e.style.lineColor,n)},getWidth:function(e){return e.style.lineWidthMeters||1},getZLevel:function(e){return 255*e.style.zLevel},getDirection:function(e){return m[e.style.arrowStyle]},getMarkerColor:function(e){return(0,u.toDeckColor)(e.style.arrowColor,n)},getMarkerPercentages:this._calcMarkerPercentages,updateTriggers:{all:s},highlightedObjectIndex:this._getHighlightedObjectIndex({nebula:t}),highlightColor:(0,u.toDeckColor)(this.highlightColor),dashJustified:this.dashed,getDashArray:this.dashed?function(e){return e.style.dashArray}:null,markerLayerProps:this.markerLayerProps||i.PathMarkerLayer.defaultProps.markerLayerProps,nebulaLayer:this})}}])&&f(n.prototype,r),s&&f(n,s),l}(s.default);t.default=I},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(365),i=A(n(999)),a=n(49),o=A(n(819)),s=A(n(820)),u=A(n(503));function A(e){return e&&e.__esModule?e:{default:e}}function c(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(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 h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),h(this,"props",void 0),h(this,"deckgl",void 0),h(this,"mainContainer",void 0),h(this,"deckglMouseOverInfo",void 0),h(this,"_deckDrawer",void 0),h(this,"_mouseWasDown",void 0),h(this,"wmViewport",void 0),h(this,"queryObjectEvents",new r.EventEmitter),h(this,"forceUpdate",void 0),h(this,"inited",void 0),h(this,"_onMouseEvent",(function(e){if(t._isNebulaEvent(e)){"mousedown"===e.type&&(t._mouseWasDown=!0);var n=t.mainContainer?t.mainContainer.getBoundingClientRect():{},r=n.top,i=void 0===r?0:r,a=n.left,o=void 0===a?0:a,s=new Proxy(e,{get:function(e,t){if("offsetX"===t)return e.pageX-o;if("offsetY"===t)return e.pageY-i;if("type"===t)return e.type.replace("pointer","mouse");var n=e[t];return"function"===typeof n?n.bind(e):n}});t._handleDeckGLEvent(s)}}))}var t,n,A;return t=e,(n=[{key:"init",value:function(e){var t=this;this.props=e,this.wmViewport=new a.WebMercatorViewport(this.props.viewport),["click","mousemove","mouseup","mousedown"].forEach((function(e){return i.default.addEventListener(e,t._onMouseEvent,!0)}))}},{key:"detach",value:function(){var e=this;["click","mousemove","mouseup","mousedown"].forEach((function(t){return i.default.removeEventListener(t,e._onMouseEvent,!0)}))}},{key:"updateProps",value:function(e){this.props=e;var t=this.props.viewport;this.wmViewport=new a.WebMercatorViewport(t)}},{key:"log",value:function(e){var t=this.props.logger;t&&t.info&&t.info("Nebula: "+e)}},{key:"updateAllDeckObjects",value:function(){this.getAllLayers().forEach((function(e){e&&e.deckCache&&e.deckCache.updateAllDeckObjects()})),this.forceUpdate()}},{key:"updateDeckObjectsByIds",value:function(e){this.getAllLayers().forEach((function(t){t&&t.deckCache&&t.deckCache.updateDeckObjectsByIds(e)})),this.forceUpdate()}},{key:"rerenderLayers",value:function(){this.updateAllDeckObjects()}},{key:"_isNebulaEvent",value:function(e){var t=e.buttons,n=e.target,r=e.type,i=this.props.viewport;if(this._mouseWasDown&&"mouseup"===r)return this._mouseWasDown=!1,!0;if("mousemove"===r&&t>0)return!0;if(!n.getBoundingClientRect)return!1;var a=n.getBoundingClientRect();return Math.round(a.width)===Math.round(i.width)&&Math.round(a.height)===Math.round(i.height)}},{key:"getMouseGroundPosition",value:function(e){return this.wmViewport.unproject([e.offsetX,e.offsetY])}},{key:"unprojectMousePosition",value:function(e){return this.wmViewport.unproject(e)}},{key:"_handleDeckGLEvent",value:function(e){var t=this.deckgl,n=this.props,r=n.onMapMouseEvent,a=n.selectionType,u=n.eventFilter,A=!0,c="auto";if(e&&t&&a){this._deckDrawer||(this._deckDrawer=new o.default(this));var l=this.getMouseGroundPosition(e);if(u&&!u(l,e))return;this._deckDrawer.handleEvent(e,l,a).redraw&&this.forceUpdate()}else{if(e&&t&&(!e.buttons||"mousemove"!==e.type)){var f=t.props.layers.filter((function(e){return e&&e.props&&e.props.nebulaLayer&&e.props.nebulaLayer.enablePicking})).map((function(e){return e.id})),h=t.pickObject({x:e.offsetX,y:e.offsetY,radius:5,layerIds:f});if(this.queryObjectEvents.emit("pick",{event:e,pickingInfo:h}),h){A=!1;var g=h.index,d=h.lngLat;if(u&&!u(d,e))return;var p=h.layer,v=h.object;p&&p.props&&p.props.nebulaLayer&&p.props.nebulaLayer.eventHandler&&p.props.nebulaLayer.eventHandler(e,h);var y=v.original||p.props.nebulaLayer&&p.props.nebulaLayer.deckCache&&p.props.nebulaLayer.deckCache.originals[g];if(y){this.deckglMouseOverInfo={originalLayer:p.props.nebulaLayer,index:g};var m=new s.default(e,{data:y,metadata:v.metadata,groundPoint:d,nebula:this});p.props.nebulaLayer.emit(e.type,m),this.forceUpdate()}c="pointer"}}if(i.default.documentElement&&(i.default.documentElement.style.cursor=c),A){this.deckglMouseOverInfo=null;var I=this.getMouseGroundPosition(e);if(u&&!u(I,e))return;var b=new s.default(e,{groundPoint:I,nebula:this});this.getAllLayers().filter((function(e){return e&&e.usesMapEvents})).forEach((function(e){return e.emit("mapMouseEvent",b)})),this.getAllLayers().filter((function(e){return e&&e.props&&e.props.nebulaLayer&&e.props.nebulaLayer.mapMouseEvent})).forEach((function(e){return e.props.nebulaLayer.mapMouseEvent(b,e)})),r&&r(e,I)}}}},{key:"getExtraDeckLayers",value:function(){var e=[];return this._deckDrawer&&e.push.apply(e,c(this._deckDrawer.render())),e}},{key:"renderDeckLayers",value:function(){var e=this;return this.getAllLayers().map((function(t){return t instanceof u.default?t.render({nebula:e}):t})).filter(Boolean)}},{key:"getAllLayers",value:function(){var e=[];return this.props.layers.filter(Boolean).forEach((function(t){e.push(t),t instanceof u.default&&e.push.apply(e,c(t.helperLayers))})),e.filter(Boolean)}},{key:"getRenderedLayers",value:function(){return[].concat(c(this.renderDeckLayers()),c(this.getExtraDeckLayers()))}},{key:"updateAndGetRenderedLayers",value:function(e,t,n){return this.inited?(this.updateProps({layers:e,viewport:t}),this.forceUpdate=function(){return n.forceUpdate()}):(this.inited=!0,this.init({layers:e,viewport:t}),this.forceUpdate=function(){return n.forceUpdate()},this.updateAllDeckObjects()),this.getRenderedLayers()}},{key:"setDeck",value:function(e){e&&(this.deckgl=e)}},{key:"setMainContainer",value:function(e){e&&(this.mainContainer=e)}}])&&f(t.prototype,n),A&&f(t,A),e}();t.default=g},function(e,t,n){(function(t){var r,i="undefined"!==typeof t?t:"undefined"!==typeof window?window:{},a=n(1e3);"undefined"!==typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=a),e.exports=r}).call(this,n(70))},function(e,t){},function(e,t,n){"use strict";var r=n(716);e.exports=function(e){r.copy(e,this)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r="",i=!0===e.schema.$async,a=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),o=e.self._getId(e.schema);if(e.opts.strictKeywords){var s=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(s){var u="unknown keyword: "+s;if("log"!==e.opts.strictKeywords)throw new Error(u);e.logger.warn(u)}}if(e.isTop&&(r+=" var validate = ",i&&(e.async=!0,r+="async "),r+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",o&&(e.opts.sourceCode||e.opts.processCode)&&(r+=" /*# sourceURL="+o+" */ ")),"boolean"==typeof e.schema||!a&&!e.schema.$ref){var A=e.level,c=e.dataLevel,l=e.schema["false schema"],f=e.schemaPath+e.util.getProperty("false schema"),h=e.errSchemaPath+"/false schema",g=!e.opts.allErrors,d="data"+(c||""),p="valid"+A;if(!1===e.schema){e.isTop?g=!0:r+=" var "+p+" = false; ",(X=X||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'boolean schema is false' "),e.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),r+=" } "):r+=" {} ";var v=r;r=X.pop(),!e.compositeRule&&g?e.async?r+=" throw new ValidationError(["+v+"]); ":r+=" validate.errors = ["+v+"]; return false; ":r+=" var err = "+v+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?r+=i?" return data; ":" validate.errors = null; return true; ":r+=" var "+p+" = true; ";return e.isTop&&(r+=" }; return validate; "),r}if(e.isTop){var y=e.isTop;A=e.level=0,c=e.dataLevel=0,d="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[void 0],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var m="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(m);e.logger.warn(m)}r+=" var vErrors = null; ",r+=" var errors = 0;     ",r+=" if (rootData === undefined) rootData = data; "}else{A=e.level,d="data"+((c=e.dataLevel)||"");if(o&&(e.baseId=e.resolve.url(e.baseId,o)),i&&!e.async)throw new Error("async schema in sync schema");r+=" var errs_"+A+" = errors;"}p="valid"+A,g=!e.opts.allErrors;var I="",b="",E=e.schema.type,C=Array.isArray(E);if(E&&e.opts.nullable&&!0===e.schema.nullable&&(C?-1==E.indexOf("null")&&(E=E.concat("null")):"null"!=E&&(E=[E,"null"],C=!0)),C&&1==E.length&&(E=E[0],C=!1),e.schema.$ref&&a){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(a=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(r+=" "+e.RULES.all.$comment.code(e,"$comment")),E){if(e.opts.coerceTypes)var B=e.util.coerceToTypes(e.opts.coerceTypes,E);var w=e.RULES.types[E];if(B||C||!0===w||w&&!Z(w)){f=e.schemaPath+".type",h=e.errSchemaPath+"/type",f=e.schemaPath+".type",h=e.errSchemaPath+"/type";var Q=C?"checkDataTypes":"checkDataType";if(r+=" if ("+e.util[Q](E,d,!0)+") { ",B){var k="dataType"+A,_="coerced"+A;r+=" var "+k+" = typeof "+d+"; ","array"==e.opts.coerceTypes&&(r+=" if ("+k+" == 'object' && Array.isArray("+d+")) "+k+" = 'array'; "),r+=" var "+_+" = undefined; ";var x="",S=B;if(S)for(var O,D=-1,R=S.length-1;D<R;)O=S[D+=1],D&&(r+=" if ("+_+" === undefined) { ",x+="}"),"array"==e.opts.coerceTypes&&"array"!=O&&(r+=" if ("+k+" == 'array' && "+d+".length == 1) { "+_+" = "+d+" = "+d+"[0]; "+k+" = typeof "+d+";  } "),"string"==O?r+=" if ("+k+" == 'number' || "+k+" == 'boolean') "+_+" = '' + "+d+"; else if ("+d+" === null) "+_+" = ''; ":"number"==O||"integer"==O?(r+=" if ("+k+" == 'boolean' || "+d+" === null || ("+k+" == 'string' && "+d+" && "+d+" == +"+d+" ","integer"==O&&(r+=" && !("+d+" % 1)"),r+=")) "+_+" = +"+d+"; "):"boolean"==O?r+=" if ("+d+" === 'false' || "+d+" === 0 || "+d+" === null) "+_+" = false; else if ("+d+" === 'true' || "+d+" === 1) "+_+" = true; ":"null"==O?r+=" if ("+d+" === '' || "+d+" === 0 || "+d+" === false) "+_+" = null; ":"array"==e.opts.coerceTypes&&"array"==O&&(r+=" if ("+k+" == 'string' || "+k+" == 'number' || "+k+" == 'boolean' || "+d+" == null) "+_+" = ["+d+"]; ");r+=" "+x+" if ("+_+" === undefined) {   ",(X=X||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",r+=C?""+E.join(","):""+E,r+="' } ",!1!==e.opts.messages&&(r+=" , message: 'should be ",r+=C?""+E.join(","):""+E,r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),r+=" } "):r+=" {} ";v=r;r=X.pop(),!e.compositeRule&&g?e.async?r+=" throw new ValidationError(["+v+"]); ":r+=" validate.errors = ["+v+"]; return false; ":r+=" var err = "+v+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else {  ";var j=c?"data"+(c-1||""):"parentData";r+=" "+d+" = "+_+"; ",c||(r+="if ("+j+" !== undefined)"),r+=" "+j+"["+(c?e.dataPathArr[c]:"parentDataProperty")+"] = "+_+"; } "}else{(X=X||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",r+=C?""+E.join(","):""+E,r+="' } ",!1!==e.opts.messages&&(r+=" , message: 'should be ",r+=C?""+E.join(","):""+E,r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),r+=" } "):r+=" {} ";v=r;r=X.pop(),!e.compositeRule&&g?e.async?r+=" throw new ValidationError(["+v+"]); ":r+=" validate.errors = ["+v+"]; return false; ":r+=" var err = "+v+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}r+=" } "}}if(e.schema.$ref&&!a)r+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",g&&(r+=" } if (errors === ",r+=y?"0":"errs_"+A,r+=") { ",b+="}");else{var M=e.RULES;if(M)for(var N=-1,F=M.length-1;N<F;)if(Z(w=M[N+=1])){if(w.type&&(r+=" if ("+e.util.checkDataType(w.type,d)+") { "),e.opts.useDefaults)if("object"==w.type&&e.schema.properties){l=e.schema.properties;var T=Object.keys(l);if(T)for(var L,P=-1,U=T.length-1;P<U;){if(void 0!==(H=l[L=T[P+=1]]).default){var G=d+e.util.getProperty(L);if(e.compositeRule){if(e.opts.strictDefaults){m="default is ignored for: "+G;if("log"!==e.opts.strictDefaults)throw new Error(m);e.logger.warn(m)}}else r+=" if ("+G+" === undefined ","empty"==e.opts.useDefaults&&(r+=" || "+G+" === null || "+G+" === '' "),r+=" ) "+G+" = ","shared"==e.opts.useDefaults?r+=" "+e.useDefault(H.default)+" ":r+=" "+JSON.stringify(H.default)+" ",r+="; "}}}else if("array"==w.type&&Array.isArray(e.schema.items)){var q=e.schema.items;if(q){D=-1;for(var H,Y=q.length-1;D<Y;)if(void 0!==(H=q[D+=1]).default){G=d+"["+D+"]";if(e.compositeRule){if(e.opts.strictDefaults){m="default is ignored for: "+G;if("log"!==e.opts.strictDefaults)throw new Error(m);e.logger.warn(m)}}else r+=" if ("+G+" === undefined ","empty"==e.opts.useDefaults&&(r+=" || "+G+" === null || "+G+" === '' "),r+=" ) "+G+" = ","shared"==e.opts.useDefaults?r+=" "+e.useDefault(H.default)+" ":r+=" "+JSON.stringify(H.default)+" ",r+="; "}}}var J=w.rules;if(J)for(var z,K=-1,W=J.length-1;K<W;)if($(z=J[K+=1])){var V=z.code(e,z.keyword,w.type);V&&(r+=" "+V+" ",g&&(I+="}"))}if(g&&(r+=" "+I+" ",I=""),w.type&&(r+=" } ",E&&E===w.type&&!B)){r+=" else { ";var X;f=e.schemaPath+".type",h=e.errSchemaPath+"/type";(X=X||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { type: '",r+=C?""+E.join(","):""+E,r+="' } ",!1!==e.opts.messages&&(r+=" , message: 'should be ",r+=C?""+E.join(","):""+E,r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),r+=" } "):r+=" {} ";v=r;r=X.pop(),!e.compositeRule&&g?e.async?r+=" throw new ValidationError(["+v+"]); ":r+=" validate.errors = ["+v+"]; return false; ":r+=" var err = "+v+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } "}g&&(r+=" if (errors === ",r+=y?"0":"errs_"+A,r+=") { ",b+="}")}}function Z(e){for(var t=e.rules,n=0;n<t.length;n++)if($(t[n]))return!0}function $(t){return void 0!==e.schema[t.keyword]||t.implements&&function(t){for(var n=t.implements,r=0;r<n.length;r++)if(void 0!==e.schema[n[r]])return!0}(t)}return g&&(r+=" "+b+" "),y?(i?(r+=" if (errors === 0) return data;           ",r+=" else throw new ValidationError(vErrors); "):(r+=" validate.errors = vErrors; ",r+=" return errors === 0;       "),r+=" }; return validate;"):r+=" var "+p+" = errors === errs_"+A+";",r=e.util.cleanUpCode(r),y&&(r=e.util.finalCleanUpCode(r,i)),r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),A=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),f=e.opts.$data&&s&&s.$data;f?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",r="schema"+a):r=s;var h="maximum"==t,g=h?"exclusiveMaximum":"exclusiveMinimum",d=e.schema[g],p=e.opts.$data&&d&&d.$data,v=h?"<":">",y=h?">":"<",m=void 0;if(p){var I=e.util.getData(d.$data,o,e.dataPathArr),b="exclusive"+a,E="exclType"+a,C="exclIsNumber"+a,B="' + "+(k="op"+a)+" + '";i+=" var schemaExcl"+a+" = "+I+"; ",i+=" var "+b+"; var "+E+" = typeof "+(I="schemaExcl"+a)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var w;m=g;(w=w||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(m||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(A)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+g+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var Q=i;i=w.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+Q+"]); ":i+=" validate.errors = ["+Q+"]; return false; ":i+=" var err = "+Q+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+E+" == 'number' ? ( ("+b+" = "+r+" === undefined || "+I+" "+v+"= "+r+") ? "+l+" "+y+"= "+I+" : "+l+" "+y+" "+r+" ) : ( ("+b+" = "+I+" === true) ? "+l+" "+y+"= "+r+" : "+l+" "+y+" "+r+" ) || "+l+" !== "+l+") { var op"+a+" = "+b+" ? '"+v+"' : '"+v+"='; ",void 0===s&&(m=g,A=e.errSchemaPath+"/"+g,r=I,f=p)}else{B=v;if((C="number"==typeof d)&&f){var k="'"+B+"'";i+=" if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" ( "+r+" === undefined || "+d+" "+v+"= "+r+" ? "+l+" "+y+"= "+d+" : "+l+" "+y+" "+r+" ) || "+l+" !== "+l+") { "}else{C&&void 0===s?(b=!0,m=g,A=e.errSchemaPath+"/"+g,r=d,y+="="):(C&&(r=Math[h?"min":"max"](d,s)),d===(!C||r)?(b=!0,m=g,A=e.errSchemaPath+"/"+g,y+="="):(b=!1,B+="="));k="'"+B+"'";i+=" if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+l+" "+y+" "+r+" || "+l+" !== "+l+") { "}}m=m||t,(w=w||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(m||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(A)+" , params: { comparison: "+k+", limit: "+r+", exclusive: "+b+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+B+" ",i+=f?"' + "+r:r+"'"),e.opts.verbose&&(i+=" , schema:  ",i+=f?"validate.schema"+u:""+s,i+="         , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";Q=i;return i=w.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+Q+"]); ":i+=" validate.errors = ["+Q+"]; return false; ":i+=" var err = "+Q+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),A=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),f=e.opts.$data&&s&&s.$data;f?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",r="schema"+a):r=s,i+="if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+l+".length "+("maxItems"==t?">":"<")+" "+r+") { ";var h=t,g=g||[];g.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(h||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(A)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"fewer",i+=" than ",i+=f?"' + "+r+" + '":""+s,i+=" items' "),e.opts.verbose&&(i+=" , schema:  ",i+=f?"validate.schema"+u:""+s,i+="         , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var d=i;return i=g.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),A=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),f=e.opts.$data&&s&&s.$data;f?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",r="schema"+a):r=s;var h="maxLength"==t?">":"<";i+="if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),!1===e.opts.unicode?i+=" "+l+".length ":i+=" ucs2length("+l+") ",i+=" "+h+" "+r+") { ";var g=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(g||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(A)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=f?"' + "+r+" + '":""+s,i+=" characters' "),e.opts.verbose&&(i+=" , schema:  ",i+=f?"validate.schema"+u:""+s,i+="         , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var p=i;return i=d.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+p+"]); ":i+=" validate.errors = ["+p+"]; return false; ":i+=" var err = "+p+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),A=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),f=e.opts.$data&&s&&s.$data;f?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",r="schema"+a):r=s,i+="if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" Object.keys("+l+").length "+("maxProperties"==t?">":"<")+" "+r+") { ";var h=t,g=g||[];g.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(h||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(A)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"fewer",i+=" than ",i+=f?"' + "+r+" + '":""+s,i+=" properties' "),e.opts.verbose&&(i+=" , schema:  ",i+=f?"validate.schema"+u:""+s,i+="         , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var d=i;return i=g.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},function(e,t,n){var r=n(498),i=n(1130);e.exports=function e(t,n,a,o,s){var u=-1,A=t.length;for(a||(a=i),s||(s=[]);++u<A;){var c=t[u];n>0&&a(c)?n>1?e(c,n-1,a,o,s):r(s,c):o||(s[s.length]=c)}return s}},function(e,t,n){var r=n(1010),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=i(a.length-t,0),u=Array(s);++o<s;)u[o]=a[t+o];o=-1;for(var A=Array(t+1);++o<t;)A[o]=a[o];return A[t]=n(u),r(e,this,A)}}},function(e,t){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},function(e,t,n){var r=n(1012),i=n(1014)(r);e.exports=i},function(e,t,n){var r=n(1013),i=n(866),a=n(737),o=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:a;e.exports=o},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t){var n=Date.now;e.exports=function(e){var t=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){var r=n(1132);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},function(e,t){e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}},function(e,t,n){var r=n(1142);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){e.exports=!n(506)&&!n(761)((function(){return 7!=Object.defineProperty(n(1019)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(719),i=n(504).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){var r=n(526),i=n(720),a=n(1144)(!1),o=n(870)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),u=0,A=[];for(n in s)n!=o&&r(s,n)&&A.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~a(A,n)||A.push(n));return A}},function(e,t,n){var r=n(1022);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){e.exports={default:n(1147),__esModule:!0}},function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(1149)),i=o(n(1161)),a="function"===typeof i.default&&"symbol"===typeof r.default?function(e){return typeof e}:function(e){return e&&"function"===typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":typeof e};function o(e){return e&&e.__esModule?e:{default:e}}t.default="function"===typeof i.default&&"symbol"===a(r.default)?function(e){return"undefined"===typeof e?"undefined":a(e)}:function(e){return e&&"function"===typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":"undefined"===typeof e?"undefined":a(e)}},function(e,t,n){"use strict";var r=n(787),i=n(717),a=n(1026),o=n(718),s=n(875),u=n(1153),A=n(877),c=n(1156),l=n(721)("iterator"),f=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,n,g,d,p,v){u(n,t,g);var y,m,I,b=function(e){if(!f&&e in w)return w[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},E=t+" Iterator",C="values"==d,B=!1,w=e.prototype,Q=w[l]||w["@@iterator"]||d&&w[d],k=Q||b(d),_=d?C?b("entries"):k:void 0,x="Array"==t&&w.entries||Q;if(x&&(I=c(x.call(new e)))!==Object.prototype&&I.next&&(A(I,E,!0),r||"function"==typeof I[l]||o(I,l,h)),C&&Q&&"values"!==Q.name&&(B=!0,k=function(){return Q.call(this)}),r&&!v||!f&&!B&&w[l]||o(w,l,k),s[t]=k,s[E]=h,d)if(y={values:C?k:b("values"),keys:p?k:b("keys"),entries:_},v)for(m in y)m in w||a(w,m,y[m]);else i(i.P+i.F*(f||B),t,y);return y}},function(e,t,n){e.exports=n(718)},function(e,t,n){var r=n(1020),i=n(872).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(789),i=n(785),a=n(720),o=n(867),s=n(526),u=n(1018),A=Object.getOwnPropertyDescriptor;t.f=n(506)?A:function(e,t){if(e=a(e),t=o(t,!0),u)try{return A(e,t)}catch(n){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(1030),i=n(394);e.exports=function(e,t){return e&&r(e,t,i)}},function(e,t,n){var r=n(1182)();e.exports=r},function(e,t,n){var r=n(737);e.exports=function(e){return"function"==typeof e?e:r}},function(e,t,n){var r=n(239),i=n(881),a=n(197),o=Function.prototype,s=Object.prototype,u=o.toString,A=s.hasOwnProperty,c=u.call(Object);e.exports=function(e){if(!a(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=A.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==c}},function(e,t,n){var r=n(195);e.exports=function(e){return e===e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(1036),i=n(790);e.exports=function(e,t){for(var n=0,a=(t=r(t,e)).length;null!=e&&n<a;)e=e[i(t[n++])];return n&&n==a?e:void 0}},function(e,t,n){var r=n(203),i=n(882),a=n(1189),o=n(1192);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:a(o(e))}},function(e,t,n){var r=n(1029),i=n(1201)(r);e.exports=i},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t,n){var r=n(883),i=n(325),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var o=e[t];a.call(e,t)&&i(o,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){(function(e){var r=n(138),i=t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(264)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(498),i=n(881),a=n(499),o=n(521),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,a(e)),e=i(e);return t}:o;e.exports=s},function(e,t,n){var r=n(884);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(1217),i=n(881),a=n(501);e.exports=function(e){return"function"!=typeof e.constructor||a(e)?{}:r(i(e))}},function(e,t,n){var r=n(883),i=n(325);e.exports=function(e,t,n){(void 0!==n&&!i(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},function(e,t){e.exports=function(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=A(a),s=A(n(273)),u=A(n(377));function A(e){return e&&e.__esModule?e:{default:e}}var c=t.ColorWrap=function(e){var t=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.handleChange=function(e,n){if(u.default.simpleCheckForValidColor(e)){var r=u.default.toState(e,e.h||t.state.oldHue);t.setState(r),t.props.onChangeComplete&&t.debounce(t.props.onChangeComplete,r,n),t.props.onChange&&t.props.onChange(r,n)}},t.handleSwatchHover=function(e,n){if(u.default.simpleCheckForValidColor(e)){var r=u.default.toState(e,e.h||t.state.oldHue);t.props.onSwatchHover&&t.props.onSwatchHover(r,n)}},t.state=r({},u.default.toState(e.color,0)),t.debounce=(0,s.default)((function(e,t,n){e(t,n)}),100),t}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),i(n,[{key:"render",value:function(){var t={};return this.props.onSwatchHover&&(t.onSwatchHover=this.handleSwatchHover),o.default.createElement(e,r({},this.props,this.state,{onChange:this.handleChange},t))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return r({},u.default.toState(e.color,t.oldHue))}}]),n}(a.PureComponent||a.Component);return t.propTypes=r({},e.propTypes),t.defaultProps=r({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t};t.default=c},function(e,t,n){"use strict";n.r(t),n.d(t,"red",(function(){return r})),n.d(t,"pink",(function(){return i})),n.d(t,"purple",(function(){return a})),n.d(t,"deepPurple",(function(){return o})),n.d(t,"indigo",(function(){return s})),n.d(t,"blue",(function(){return u})),n.d(t,"lightBlue",(function(){return A})),n.d(t,"cyan",(function(){return c})),n.d(t,"teal",(function(){return l})),n.d(t,"green",(function(){return f})),n.d(t,"lightGreen",(function(){return h})),n.d(t,"lime",(function(){return g})),n.d(t,"yellow",(function(){return d})),n.d(t,"amber",(function(){return p})),n.d(t,"orange",(function(){return v})),n.d(t,"deepOrange",(function(){return y})),n.d(t,"brown",(function(){return m})),n.d(t,"grey",(function(){return I})),n.d(t,"blueGrey",(function(){return b})),n.d(t,"darkText",(function(){return E})),n.d(t,"lightText",(function(){return C})),n.d(t,"darkIcons",(function(){return B})),n.d(t,"lightIcons",(function(){return w})),n.d(t,"white",(function(){return Q})),n.d(t,"black",(function(){return k}));var r={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},i={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},a={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},o={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},s={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},u={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},A={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},c={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},l={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},f={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},h={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},g={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},d={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},p={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},v={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},y={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"},m={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},I={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121"},b={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},E={primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",dividers:"rgba(0, 0, 0, 0.12)"},C={primary:"rgba(255, 255, 255, 1)",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",dividers:"rgba(255, 255, 255, 0.12)"},B={active:"rgba(0, 0, 0, 0.54)",inactive:"rgba(0, 0, 0, 0.38)"},w={active:"rgba(255, 255, 255, 1)",inactive:"rgba(255, 255, 255, 0.5)"},Q="#ffffff",k="#000000";t.default={red:r,pink:i,purple:a,deepPurple:o,indigo:s,blue:u,lightBlue:A,cyan:c,teal:l,green:f,lightGreen:h,lime:g,yellow:d,amber:p,orange:v,deepOrange:y,brown:m,grey:I,blueGrey:b,darkText:E,lightText:C,darkIcons:B,lightIcons:w,white:Q,black:k}},function(e,t,n){var r=n(378);e.exports=function(e,t,n){return 0!==r(e,t,n)}},function(e,t,n){var r=n(887),i=n(1049),a=n(794),o=n(890),s=n(889),u=n(891);e.exports=function(e,t,n,A){switch(t){case"===":return"object"===typeof e&&(e=e.version),"object"===typeof n&&(n=n.version),e===n;case"!==":return"object"===typeof e&&(e=e.version),"object"===typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,A);case"!=":return i(e,n,A);case">":return a(e,n,A);case">=":return o(e,n,A);case"<":return s(e,n,A);case"<=":return u(e,n,A);default:throw new TypeError("Invalid operator: ".concat(t))}}},function(e){e.exports=JSON.parse('{"a":"5.13.0"}')},function(e,t,n){"use strict";n.r(t);var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16);function a(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}for(var o=[],s=0;s<256;++s)o[s]=(s+256).toString(16).substr(1);var u,A,c=function(e,t){var n=t||0,r=o;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")},l=0,f=0;var h=function(e,t,n){var r=t&&n||0,i=t||[],o=(e=e||{}).node||u,s=void 0!==e.clockseq?e.clockseq:A;if(null==o||null==s){var h=e.random||(e.rng||a)();null==o&&(o=u=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==s&&(s=A=16383&(h[6]<<8|h[7]))}var g=void 0!==e.msecs?e.msecs:(new Date).getTime(),d=void 0!==e.nsecs?e.nsecs:f+1,p=g-l+(d-f)/1e4;if(p<0&&void 0===e.clockseq&&(s=s+1&16383),(p<0||g>l)&&void 0===e.nsecs&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=g,f=d,A=s;var v=(1e4*(268435455&(g+=122192928e5))+d)%4294967296;i[r++]=v>>>24&255,i[r++]=v>>>16&255,i[r++]=v>>>8&255,i[r++]=255&v;var y=g/4294967296*1e4&268435455;i[r++]=y>>>8&255,i[r++]=255&y,i[r++]=y>>>24&15|16,i[r++]=y>>>16&255,i[r++]=s>>>8|128,i[r++]=255&s;for(var m=0;m<6;++m)i[r+m]=o[m];return t||c(i)};var g=function(e,t,n){var r=function(e,r,i,a){var o=i&&a||0;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(e)),"string"==typeof r&&(r=function(e){var t=[];return e.replace(/[a-fA-F0-9]{2}/g,(function(e){t.push(parseInt(e,16))})),t}(r)),!Array.isArray(e))throw TypeError("value must be an array of bytes");if(!Array.isArray(r)||16!==r.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var s=n(r.concat(e));if(s[6]=15&s[6]|t,s[8]=63&s[8]|128,i)for(var u=0;u<16;++u)i[o+u]=s[u];return i||c(s)};try{r.name=e}catch(i){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r};function d(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function p(e,t,n,r,i,a){return d((o=d(d(t,e),d(r,a)))<<(s=i)|o>>>32-s,n);var o,s}function v(e,t,n,r,i,a,o){return p(t&n|~t&r,e,t,i,a,o)}function y(e,t,n,r,i,a,o){return p(t&r|n&~r,e,t,i,a,o)}function m(e,t,n,r,i,a,o){return p(t^n^r,e,t,i,a,o)}function I(e,t,n,r,i,a,o){return p(n^(t|~r),e,t,i,a,o)}var b=g("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Array(t.length);for(var n=0;n<t.length;n++)e[n]=t.charCodeAt(n)}return function(e){var t,n,r,i=[],a=32*e.length;for(t=0;t<a;t+=8)n=e[t>>5]>>>t%32&255,r=parseInt("0123456789abcdef".charAt(n>>>4&15)+"0123456789abcdef".charAt(15&n),16),i.push(r);return i}(function(e,t){var n,r,i,a,o;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var s=1732584193,u=-271733879,A=-1732584194,c=271733878;for(n=0;n<e.length;n+=16)r=s,i=u,a=A,o=c,s=v(s,u,A,c,e[n],7,-680876936),c=v(c,s,u,A,e[n+1],12,-389564586),A=v(A,c,s,u,e[n+2],17,606105819),u=v(u,A,c,s,e[n+3],22,-1044525330),s=v(s,u,A,c,e[n+4],7,-176418897),c=v(c,s,u,A,e[n+5],12,1200080426),A=v(A,c,s,u,e[n+6],17,-1473231341),u=v(u,A,c,s,e[n+7],22,-45705983),s=v(s,u,A,c,e[n+8],7,1770035416),c=v(c,s,u,A,e[n+9],12,-1958414417),A=v(A,c,s,u,e[n+10],17,-42063),u=v(u,A,c,s,e[n+11],22,-1990404162),s=v(s,u,A,c,e[n+12],7,1804603682),c=v(c,s,u,A,e[n+13],12,-40341101),A=v(A,c,s,u,e[n+14],17,-1502002290),u=v(u,A,c,s,e[n+15],22,1236535329),s=y(s,u,A,c,e[n+1],5,-165796510),c=y(c,s,u,A,e[n+6],9,-1069501632),A=y(A,c,s,u,e[n+11],14,643717713),u=y(u,A,c,s,e[n],20,-373897302),s=y(s,u,A,c,e[n+5],5,-701558691),c=y(c,s,u,A,e[n+10],9,38016083),A=y(A,c,s,u,e[n+15],14,-660478335),u=y(u,A,c,s,e[n+4],20,-405537848),s=y(s,u,A,c,e[n+9],5,568446438),c=y(c,s,u,A,e[n+14],9,-1019803690),A=y(A,c,s,u,e[n+3],14,-187363961),u=y(u,A,c,s,e[n+8],20,1163531501),s=y(s,u,A,c,e[n+13],5,-1444681467),c=y(c,s,u,A,e[n+2],9,-51403784),A=y(A,c,s,u,e[n+7],14,1735328473),u=y(u,A,c,s,e[n+12],20,-1926607734),s=m(s,u,A,c,e[n+5],4,-378558),c=m(c,s,u,A,e[n+8],11,-2022574463),A=m(A,c,s,u,e[n+11],16,1839030562),u=m(u,A,c,s,e[n+14],23,-35309556),s=m(s,u,A,c,e[n+1],4,-1530992060),c=m(c,s,u,A,e[n+4],11,1272893353),A=m(A,c,s,u,e[n+7],16,-155497632),u=m(u,A,c,s,e[n+10],23,-1094730640),s=m(s,u,A,c,e[n+13],4,681279174),c=m(c,s,u,A,e[n],11,-358537222),A=m(A,c,s,u,e[n+3],16,-722521979),u=m(u,A,c,s,e[n+6],23,76029189),s=m(s,u,A,c,e[n+9],4,-640364487),c=m(c,s,u,A,e[n+12],11,-421815835),A=m(A,c,s,u,e[n+15],16,530742520),u=m(u,A,c,s,e[n+2],23,-995338651),s=I(s,u,A,c,e[n],6,-198630844),c=I(c,s,u,A,e[n+7],10,1126891415),A=I(A,c,s,u,e[n+14],15,-1416354905),u=I(u,A,c,s,e[n+5],21,-57434055),s=I(s,u,A,c,e[n+12],6,1700485571),c=I(c,s,u,A,e[n+3],10,-1894986606),A=I(A,c,s,u,e[n+10],15,-1051523),u=I(u,A,c,s,e[n+1],21,-2054922799),s=I(s,u,A,c,e[n+8],6,1873313359),c=I(c,s,u,A,e[n+15],10,-30611744),A=I(A,c,s,u,e[n+6],15,-1560198380),u=I(u,A,c,s,e[n+13],21,1309151649),s=I(s,u,A,c,e[n+4],6,-145523070),c=I(c,s,u,A,e[n+11],10,-1120210379),A=I(A,c,s,u,e[n+2],15,718787259),u=I(u,A,c,s,e[n+9],21,-343485551),s=d(s,r),u=d(u,i),A=d(A,a),c=d(c,o);return[s,u,A,c]}(function(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var r=8*e.length;for(t=0;t<r;t+=8)n[t>>5]|=(255&e[t/8])<<t%32;return n}(e),8*e.length))}));var E=function(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||a)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var o=0;o<16;++o)t[r+o]=i[o];return t||c(i)};function C(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function B(e,t){return e<<t|e>>>32-t}var w=g("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=new Array(r.length);for(var i=0;i<r.length;i++)e[i]=r.charCodeAt(i)}e.push(128);var a=e.length/4+2,o=Math.ceil(a/16),s=new Array(o);for(i=0;i<o;i++){s[i]=new Array(16);for(var u=0;u<16;u++)s[i][u]=e[64*i+4*u]<<24|e[64*i+4*u+1]<<16|e[64*i+4*u+2]<<8|e[64*i+4*u+3]}for(s[o-1][14]=8*(e.length-1)/Math.pow(2,32),s[o-1][14]=Math.floor(s[o-1][14]),s[o-1][15]=8*(e.length-1)&4294967295,i=0;i<o;i++){for(var A=new Array(80),c=0;c<16;c++)A[c]=s[i][c];for(c=16;c<80;c++)A[c]=B(A[c-3]^A[c-8]^A[c-14]^A[c-16],1);var l=n[0],f=n[1],h=n[2],g=n[3],d=n[4];for(c=0;c<80;c++){var p=Math.floor(c/20),v=B(l,5)+C(p,f,h,g)+d+t[p]+A[c]>>>0;d=g,g=h,h=B(f,30)>>>0,f=l,l=v}n[0]=n[0]+l>>>0,n[1]=n[1]+f>>>0,n[2]=n[2]+h>>>0,n[3]=n[3]+g>>>0,n[4]=n[4]+d>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));n.d(t,"v1",(function(){return h})),n.d(t,"v3",(function(){return b})),n.d(t,"v4",(function(){return E})),n.d(t,"v5",(function(){return w}))},function(e,t,n){"use strict";n.r(t);var r=n(319);var i=function(e){if(!e)throw new Error("line is required");var t=e.geometry?e.geometry.type:e.type;if(!Array.isArray(e)&&"LineString"!==t)throw new Error("geometry must be a LineString");for(var n,r,i=function(e){if(!e)throw new Error("coords is required");if("Feature"===e.type&&null!==e.geometry)return e.geometry.coordinates;if(e.coordinates)return e.coordinates;if(Array.isArray(e))return e;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(e),a=0,o=1;o<i.length;)n=r||i[0],a+=((r=i[o])[0]-n[0])*(r[1]+n[1]),o++;return a>0};function a(e,t){if(!s(t=t||{}))throw new Error("options is invalid");var n=t.bbox,r=t.id;if(!e)throw new Error("No features passed");if(!Array.isArray(e))throw new Error("features must be an Array");n&&u(n),r&&A(r);var i={type:"FeatureCollection"};return r&&(i.id=r),n&&(i.bbox=n),i.features=e,i}function o(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function s(e){return!!e&&e.constructor===Object}function u(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!o(e))throw new Error("bbox must only contain numbers")}))}function A(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}function c(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function l(e,t){var n,r,i,a,o,s,u,A,c,l,f=0,h="FeatureCollection"===e.type,g="Feature"===e.type,d=h?e.features.length:1;for(n=0;n<d;n++){for(s=h?e.features[n].geometry:g?e.geometry:e,A=h?e.features[n].properties:g?e.properties:{},c=h?e.features[n].bbox:g?e.bbox:void 0,l=h?e.features[n].id:g?e.id:void 0,o=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<o;i++)if(null!==(a=u?s.geometries[i]:s))switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(a,f,A,c,l))return!1;break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===t(a.geometries[r],f,A,c,l))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,f,A,c,l))return!1;f++}}function f(e){if(!e)throw new Error("coords is required");if("Feature"===e.type&&null!==e.geometry)return e.geometry.coordinates;if(e.coordinates)return e.coordinates;if(Array.isArray(e))return e;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function h(e,t){switch("Feature"===e.type?e.geometry.type:e.type){case"GeometryCollection":return l(e,(function(e){h(e,t)})),e;case"LineString":return g(f(e),t),e;case"Polygon":return d(f(e),t),e;case"MultiLineString":return f(e).forEach((function(e){g(e,t)})),e;case"MultiPolygon":return f(e).forEach((function(e){d(e,t)})),e;case"Point":case"MultiPoint":return e}}function g(e,t){i(e)===t&&e.reverse()}function d(e,t){i(e[0])!==t&&e[0].reverse();for(var n=1;n<e.length;n++)i(e[n])===t&&e[n].reverse()}t.default=function(e,t){if(!s(t=t||{}))throw new Error("options is invalid");var n=t.reverse||!1,i=t.mutate||!1;if(!e)throw new Error("<geojson> is required");if("boolean"!==typeof n)throw new Error("<reverse> must be a boolean");if("boolean"!==typeof i)throw new Error("<mutate> must be a boolean");!1===i&&(e=Object(r.a)(e));var o=[];switch(e.type){case"GeometryCollection":return l(e,(function(e){h(e,n)})),e;case"FeatureCollection":return c(e,(function(e){c(h(e,n),(function(e){o.push(e)}))})),a(o)}return h(e,n)}},function(e,t,n){"use strict";n.r(t);var r=n(319);function i(e,t,n){if(!s(n=n||{}))throw new Error("options is invalid");var r=n.bbox,i=n.id;if(void 0===e)throw new Error("geometry is required");if(t&&t.constructor!==Object)throw new Error("properties must be an Object");r&&u(r),i&&A(i);var a={type:"Feature"};return i&&(a.id=i),r&&(a.bbox=r),a.properties=t||{},a.geometry=e,a}function a(e,t,n){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!o(e[0])||!o(e[1]))throw new Error("coordinates must contain numbers");return i({type:"Point",coordinates:e},t,n)}function o(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function s(e){return!!e&&e.constructor===Object}function u(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!o(e))throw new Error("bbox must only contain numbers")}))}function A(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}function c(e,t,n){if(null!==e)for(var r,i,a,o,s,u,A,l,f=0,h=0,g=e.type,d="FeatureCollection"===g,p="Feature"===g,v=d?e.features.length:1,y=0;y<v;y++){s=(l=!!(A=d?e.features[y].geometry:p?e.geometry:e)&&"GeometryCollection"===A.type)?A.geometries.length:1;for(var m=0;m<s;m++){var I=0,b=0;if(null!==(o=l?A.geometries[m]:A)){u=o.coordinates;var E=o.type;switch(f=!n||"Polygon"!==E&&"MultiPolygon"!==E?0:1,E){case null:break;case"Point":if(!1===t(u,h,y,I,b))return!1;h++,I++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(!1===t(u[r],h,y,I,b))return!1;h++,"MultiPoint"===E&&I++}"LineString"===E&&I++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-f;i++){if(!1===t(u[r][i],h,y,I,b))return!1;h++}"MultiLineString"===E&&I++,"Polygon"===E&&b++}"Polygon"===E&&I++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for("MultiPolygon"===E&&(b=0),i=0;i<u[r].length;i++){for(a=0;a<u[r][i].length-f;a++){if(!1===t(u[r][i][a],h,y,I,b))return!1;h++}b++}I++}break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===c(o.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function l(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}var f=function(e){var t=[1/0,1/0,-1/0,-1/0];return c(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t};var h=function(e,t){if(!s(t=t||{}))throw new Error("options is invalid");var n=t.properties;if(!e)throw new Error("geojson is required");var r=f(e);return a([(r[0]+r[2])/2,(r[1]+r[3])/2],n)};var g=function(e,t){var n=0,r=0,i=0;return c(e,(function(e){n+=e[0],r+=e[1],i++}),!0),a([n/i,r/i],t)},d=n(538),p=n(539),v=n(331);function y(e,t,n){var r="Point"===function(e,t){if(!e)throw new Error((t||"geojson")+" is required");if(e.geometry&&e.geometry.type)return e.geometry.type;if(e.type)return e.type;throw new Error((t||"geojson")+" is invalid")}(e);return n=function(e,t){void 0!==t&&null!==t||(t="centroid");if(Array.isArray(t)||"object"===typeof t)return function(e){if(!e)throw new Error("coord is required");if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return e.geometry.coordinates;if("Point"===e.type)return e.coordinates;if(Array.isArray(e)&&e.length>=2&&void 0===e[0].length&&void 0===e[1].length)return e;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(t);var n=e.bbox?e.bbox:f(e),r=n[0],i=n[1],o=n[2],s=n[3];switch(t){case"sw":case"southwest":case"westsouth":case"bottomleft":return a([r,i]);case"se":case"southeast":case"eastsouth":case"bottomright":return a([o,i]);case"nw":case"northwest":case"westnorth":case"topleft":return a([r,s]);case"ne":case"northeast":case"eastnorth":case"topright":return a([o,s]);case"center":return h(e);case void 0:case null:case"centroid":return g(e);default:throw new Error("invalid origin")}}(e,n),1===t||r||c(e,(function(e){var r=Object(p.a)(n,e),i=Object(d.a)(n,e),a=r*t,o=function(e){if(!e)throw new Error("coords is required");if("Feature"===e.type&&null!==e.geometry)return e.geometry.coordinates;if(e.coordinates)return e.coordinates;if(Array.isArray(e))return e;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(Object(v.a)(n,a,i));e[0]=o[0],e[1]=o[1],3===e.length&&(e[2]*=t)})),e}t.default=function(e,t,n){if(!s(n=n||{}))throw new Error("options is invalid");var i=n.origin,a=n.mutate;if(!e)throw new Error("geojson required");if("number"!==typeof t||0===t)throw new Error("invalid factor");var o=Array.isArray(i)||"object"===typeof i;return!0!==a&&(e=Object(r.a)(e)),"FeatureCollection"!==e.type||o?y(e,t,i):(l(e,(function(n,r){e.features[r]=y(n,t,i)})),e)}},function(e,t,n){"use strict";n.r(t);function r(e){return!!e&&e.constructor===Object}function i(e,t,n){if(null!==e)for(var r,a,o,s,u,A,c,l,f=0,h=0,g=e.type,d="FeatureCollection"===g,p="Feature"===g,v=d?e.features.length:1,y=0;y<v;y++){u=(l=!!(c=d?e.features[y].geometry:p?e.geometry:e)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var m=0;m<u;m++){var I=0,b=0;if(null!==(s=l?c.geometries[m]:c)){A=s.coordinates;var E=s.type;switch(f=!n||"Polygon"!==E&&"MultiPolygon"!==E?0:1,E){case null:break;case"Point":if(!1===t(A,h,y,I,b))return!1;h++,I++;break;case"LineString":case"MultiPoint":for(r=0;r<A.length;r++){if(!1===t(A[r],h,y,I,b))return!1;h++,"MultiPoint"===E&&I++}"LineString"===E&&I++;break;case"Polygon":case"MultiLineString":for(r=0;r<A.length;r++){for(a=0;a<A[r].length-f;a++){if(!1===t(A[r][a],h,y,I,b))return!1;h++}"MultiLineString"===E&&I++,"Polygon"===E&&b++}"Polygon"===E&&I++;break;case"MultiPolygon":for(r=0;r<A.length;r++){for("MultiPolygon"===E&&(b=0),a=0;a<A[r].length;a++){for(o=0;o<A[r][a].length-f;o++){if(!1===t(A[r][a][o],h,y,I,b))return!1;h++}b++}I++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===i(s.geometries[r],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}var a=n(319),o=n(331);t.default=function(e,t,n,s){if(!r(s=s||{}))throw new Error("options is invalid");var u=s.units,A=s.zTranslation,c=s.mutate;if(!e)throw new Error("geojson is required");if(void 0===t||null===t||isNaN(t))throw new Error("distance is required");if(A&&"number"!==typeof A&&isNaN(A))throw new Error("zTranslation is not a number");if(A=void 0!==A?A:0,0===t&&0===A)return e;if(void 0===n||null===n||isNaN(n))throw new Error("direction is required");return t<0&&(t=-t,n=-n),!1!==c&&void 0!==c||(e=Object(a.a)(e)),i(e,(function(e){var r=function(e){if(!e)throw new Error("coords is required");if("Feature"===e.type&&null!==e.geometry)return e.geometry.coordinates;if(e.coordinates)return e.coordinates;if(Array.isArray(e))return e;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(Object(o.a)(e,t,n,{units:u}));e[0]=r[0],e[1]=r[1],A&&3===e.length&&(e[2]+=A)})),e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(22),i=n(24),a=n(0),o=n.n(a),s=n(67),u=n(176),A=n(240),c=n(900);function l(e){var t=e.coordinationScopes,n=e.removeGridComponent,a=e.theme,l=Object(s.d)(u.b.status,t),f=Object(i.a)(l,1)[0],h=f.cellHighlight,g=f.geneHighlight,d=f.moleculeHighlight,p=Object(s.p)(),v=[].concat(Object(r.a)(h?["Hovered cell ".concat(h)]:[]),Object(r.a)(g?["Hovered gene ".concat(g)]:[]),Object(r.a)(d?["Hovered gene ".concat(d)]:[])).join("; ");return o.a.createElement(A.a,{title:"Status",theme:a,removeGridComponent:n,isScroll:!0,isReady:!0},o.a.createElement(c.a,{warn:p,info:v}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(24),i=n(0),a=n.n(i),o=n(100),s=n(161),u=n(178),A=n(67),c=n(176),l=n(240),f=n(902),h=["expression-matrix"];function g(e){var t=e.coordinationScopes,n=e.removeGridComponent,g=e.variablesLabelOverride,d=void 0===g?"gene":g,p=e.variablesPluralLabelOverride,v=void 0===p?"".concat(d,"s"):p,y=e.theme,m=Object(A.h)(),I=Object(A.d)(c.b.genes,t),b=Object(r.a)(I,2),E=b[0],C=E.dataset,B=E.geneSelection,w=E.geneFilter,Q=b[1],k=Q.setGeneSelection,_=Q.setGeneFilter,x=Q.setGeneHighlight,S=Q.setCellColorEncoding,O=Q.setCellSetSelection,D=Object(s.d)(),R=Object(r.a)(D,3),j=R[0],M=R[1],N=R[2],F=Object(s.c)(h),T=Object(r.a)(F,3),L=T[0],P=T[1],U=T[2];Object(i.useEffect)((function(){N(),U()}),[m,C]);var G=Object(u.c)(m,C,P,M,!0),q=Object(r.a)(G,1)[0],H=q?q.cols:[],Y=H.length;return a.a.createElement(l.a,{title:"Expression Levels",info:"".concat(Y," ").concat(Object(o.d)(d,v,Y)),theme:y,isScroll:!0,removeGridComponent:n,isReady:L,urls:j},a.a.createElement(f.a,{geneList:H,geneSelection:B,geneFilter:w,setGeneSelection:function(e){O([]),k(e),S("geneSelection")},setGeneFilter:_,setGeneHighlight:x}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return B}));var r=n(47),i=n(20),a=n(22),o=n(24),s=n(0),u=n.n(s),A=n(97),c=n.n(A),l=n(544),f=n(67),h=n(176),g=n(903),d=n(240),p=n(134),v=n(123),y=n(371),m=n(91),I=n(161),b=n(85),E=n(178),C=["cells","cell-sets"];function B(e){var t=e.coordinationScopes,n=e.removeGridComponent,A=e.initializeSelection,B=void 0===A||A,w=e.initializeColor,Q=void 0===w||w,k=e.theme,_=Object(f.h)(),x=Object(f.n)(),S=Object(f.d)(h.b.cellSets,t),O=Object(o.a)(S,2),D=O[0],R=D.dataset,j=D.cellSetSelection,M=D.cellSetColor,N=D.additionalCellSets,F=O[1],T=F.setCellSetSelection,L=F.setCellColorEncoding,P=F.setCellSetColor,U=F.setAdditionalCellSets,G=F.setGeneSelection,q=Object(I.d)(),H=Object(o.a)(q,3),Y=H[0],J=H[1],z=H[2],K=Object(I.c)(C),W=Object(o.a)(K,3),V=W[0],X=W[1],Z=W[2],$=Object(s.useState)({}),ee=Object(o.a)($,2),te=ee[0],ne=ee[1],re=Object(s.useState)({}),ie=Object(o.a)(re,2),ae=ie[0],oe=ie[1],se=Object(s.useState)([]),ue=Object(o.a)(se,2),Ae=ue[0],ce=ue[1];Object(s.useEffect)((function(){z(),Z(),ne({}),oe({}),ce([])}),[_,R]);var le=Object(E.b)(_,R,X,J,!0),fe=Object(o.a)(le,1)[0],he=Object(E.a)(_,R,X,J,!0,(function(e){if(e&&e.tree.length>=1){var t=e.tree[0].name,n=e.tree[0].children.map((function(e){return[t,e.name]}));ne((function(e){return Object(i.a)({},R,[].concat(Object(a.a)(e[R]||[]),Object(a.a)(n)))}));var r=Object(p.c)(e,M);oe((function(e){return Object(i.a)({},R,[].concat(Object(a.a)(e[R]||[]),Object(a.a)(r)))}))}else ne((function(e){return Object(i.a)({},R,e[R]||[])})),oe((function(e){return Object(i.a)({},R,e[R]||[])}))})),ge=Object(o.a)(he,1)[0];Object(s.useEffect)((function(){V&&B&&te[R]&&!j&&T(te[R])}),[R,te,V,j,T,B]),Object(s.useEffect)((function(){V&&Q&&ae[R]&&!M&&P(ae[R])}),[R,ae,V,P,Q,M]),Object(s.useEffect)((function(){if(N){var e;try{e=Object(y.f)(N,m.h)}catch(t){return void x(t.message)}U(e)}}),[N,U,x]);var de=Object(s.useMemo)((function(){return fe?Object.keys(fe):[]}),[fe]);function pe(){G([]),L("cellSetSelection")}var ve=Object(s.useMemo)((function(){return Object(b.n)(ge,N)}),[ge,N]),ye=Object(s.useMemo)((function(){return j&&j.length>0&&ve&&ve.tree.length>0?Object(p.p)(ve,j):null}),[j,ve]);return u.a.createElement(d.a,{title:"Cell Sets",isScroll:!0,removeGridComponent:n,urls:Y,theme:k,isReady:V},u.a.createElement(g.a,{setColor:M,sets:ge,additionalSets:N,levelSelection:ye,setSelection:j,setExpansion:Ae,draggable:!0,datatype:m.h,onError:x,onCheckNode:function(e,t){var n=Array.isArray(e)?e:e.split(v.a);e&&(T(t?[].concat(Object(a.a)(j),[n]):j.filter((function(e){return!c()(e,n)}))),pe())},onExpandNode:function(e,t,n){ce(n?function(e){return[].concat(Object(a.a)(e),[t.split(v.a)])}:function(e){return e.filter((function(e){return!c()(e,t.split(v.a))}))})},onDropNode:function(e,t,n,i){var o=e.split(v.a),s=Object(p.l)(N,o);if(s.children||i){var u=0===o.length-1,A=t.split(v.a),l=Object(p.l)(N,A);if(!u||!i||l.children){var f,h,g;u?g=N.tree.findIndex((function(e){return e.name===s.name})):(h=o.slice(0,-1),g=(f=Object(p.l)(N,h)).children.findIndex((function(e){return e.name===s.name})));var d=l.name;if(!(!u&&i?f.children.find((function(e){return e!==l&&e.name===d})):i?N.tree.find((function(e){return e!==l&&e.name===d})):s.children.find((function(e){return e!==l&&e.name===d})))){var y=Object(r.a)({},N,{tree:N.tree.map((function(e){return Object(p.a)(e,[],A)})).filter(Boolean)});g=u?y.tree.findIndex((function(e){return e.name===s.name})):f.children.findIndex((function(e){return e.name===s.name}));var m=[];if(i&&u)if(-1===n)y.tree.unshift(l),U(y),m=[l.name],T([m]);else{var I=g+(n>g?1:0),b=Array.from(y.tree);b.splice(I,0,l),y.tree=b,U(y),m=[l.name],T([m])}else{var E,C,B=[];if(i){if(!u)if(C=function(e){return c()(e,h)},-1===n)E=function(e){return Object(p.f)(e,l)};else{var w=g+(n>g?1:0);E=function(e){return Object(p.e)(e,l,w)}}}else E=function(e){return Object(p.d)(e,l)},C=function(e){return c()(e,o)};y.tree=y.tree.map((function(e){return Object(p.i)(e,(function(e,t){return C(t)}),(function(e){return E(e)}),B)})),U(y),m=[].concat(Object(a.a)(B[0]),[l.name]),T([m])}var Q=M.filter((function(e){return Object(v.f)(A,e.path)})).map((function(e){return Object(r.a)({},e,{path:c()(e.path,A)?m:m.concat(e.path.slice(A.length))})})),k=M.filter((function(e){return!Object(v.f)(A,e.path)}));k.push.apply(k,Object(a.a)(Q)),P(k)}}}},onCheckLevel:function(e,t){var n=ve.tree.find((function(t){return t.name===e}));if(n){var r=Object(p.g)(n,t,[],!0);T(r),pe()}},onNodeSetColor:function(e,t){var n=null===M||void 0===M?void 0:M.find((function(t){return c()(t.path,e)}));P([].concat(n?Object(a.a)(M.filter((function(t){return!c()(t.path,e)}))):Object(a.a)(M||[]),[{path:e,color:t}]))},onNodeSetName:function(e,t){var n=Object(a.a)(e);n.pop(),n.push(t);var i=Object(r.a)({},N,{tree:N.tree.map((function(n){return function n(i,o){return c()([].concat(Object(a.a)(o),[i.name]),e)?Object(r.a)({},i,{name:t}):i.children?Object(r.a)({},i,{children:i.children.map((function(e){return n(e,[].concat(Object(a.a)(o),[i.name]))}))}):i}(n,[])}))}),o=M.map((function(t){return{path:Object(v.h)(e,t.path,n),color:t.color}})),s=j.map((function(t){return Object(v.h)(e,t,n)})),u=Ae.map((function(t){return Object(v.h)(e,t,n)}));U(i),P(o),T(s),ce(u)},onNodeCheckNewName:function(e,t){var n=Object(a.a)(e);return n.pop(),n.push(t),!c()(e,n)&&Object(p.l)(N,n)},onNodeRemove:function(e){var t=Object(r.a)({},N,{tree:N.tree.map((function(t){return Object(p.a)(t,[],e)})).filter(Boolean)}),n=M.filter((function(t){return!Object(v.f)(e,t.path)})),i=j.filter((function(t){return!Object(v.f)(e,t)})),a=Ae.filter((function(t){return!Object(v.f)(e,t)}));U(t),P(n),T(i),ce(a)},onNodeView:function(e){var t=[];!function e(n,r){Ae.find((function(e){return c()(r,e)}))&&n.children?n.children.forEach((function(t){e(t,[].concat(Object(a.a)(r),[t.name]))})):t.push(r)}(Object(p.l)(ve,e),e),T(t),pe()},onImportTree:function(e){if(!Object(p.t)(ve,e)){U(Object(r.a)({},N||Object(p.m)(m.h),{tree:[].concat(Object(a.a)(N?N.tree:[]),Object(a.a)(e.tree))}));var t=Object(p.c)(e,M);P([].concat(Object(a.a)(M),Object(a.a)(t)))}},onCreateLevelZeroNode:function(){var e=Object(b.m)(null===N||void 0===N?void 0:N.tree,"My hierarchy ");U(Object(r.a)({},N||Object(p.m)(m.h),{tree:[].concat(Object(a.a)(N?N.tree:[]),[{name:e,children:[]}])}))},onExportLevelZeroNodeJSON:function(e){var t=Object(p.j)(ve,e,m.h),n=t.treeToExport,r=t.nodeName;Object(y.a)(Object(y.b)(n),"".concat(r,"_").concat(l.name,"-").concat(m.h,"-hierarchy.").concat(m.a))},onExportLevelZeroNodeTabular:function(e){var t=Object(p.j)(ve,e,m.h),n=t.treeToExport,r=t.nodeName;Object(y.a)(Object(y.c)(n),"".concat(r,"_").concat(l.name,"-").concat(m.h,"-hierarchy.").concat(m.b))},onExportSetJSON:function(e){var t=Object(p.k)(ve,e),n=t.setToExport,r=t.nodeName;Object(y.a)(Object(y.b)(n),"".concat(r,"_").concat(l.name,"-").concat(m.h,"-set.").concat(m.a),m.a)},onUnion:function(){var e=Object(p.s)(ve,j);Object(b.o)(e,N,M,T,U,P,L,"Union ")},onIntersection:function(){var e=Object(p.q)(ve,j);Object(b.o)(e,N,M,T,U,P,L,"Intersection ")},onComplement:function(){var e=Object(p.o)(ve,j,de);Object(b.o)(e,N,M,T,U,P,L,"Complement ")},hasCheckedSetsToUnion:(null===j||void 0===j?void 0:j.length)>1,hasCheckedSetsToIntersect:(null===j||void 0===j?void 0:j.length)>1,hasCheckedSetsToComplement:(null===j||void 0===j?void 0:j.length)>0}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(24),i=n(0),a=n.n(i),o=n(240),s=n(67),u=n(176),A=n(161),c=n(85),l=n(178),f=n(134),h=n(901),g=["cell-sets"];function d(e){var t=e.coordinationScopes,n=e.removeGridComponent,d=e.theme,p=Object(s.h)(),v=Object(s.d)(u.b.cellSetSizes,t),y=Object(r.a)(v,1)[0],m=y.dataset,I=y.cellSetSelection,b=y.cellSetColor,E=y.additionalCellSets,C=Object(A.b)(),B=Object(r.a)(C,3),w=B[0],Q=B[1],k=B[2],_=Object(A.d)(),x=Object(r.a)(_,3),S=x[0],O=x[1],D=x[2],R=Object(A.c)(g),j=Object(r.a)(R,3),M=j[0],N=j[1],F=j[2];Object(i.useEffect)((function(){D(),F()}),[p,m]);var T=Object(l.a)(p,m,N,O,!0),L=Object(r.a)(T,1)[0],P=Object(i.useMemo)((function(){return Object(c.n)(L,E)}),[L,E]),U=Object(i.useMemo)((function(){return P&&I?Object(f.r)(P,I,b):[]}),[P,I,b]);return a.a.createElement(o.a,{title:"Cell Set Sizes",removeGridComponent:n,urls:S,theme:d,isReady:M},a.a.createElement("div",{ref:k,className:"vega-container"},a.a.createElement(h.a,{data:U,theme:d,width:w,height:Q})))}},function(e,t,n){"use strict";var r=n(9),i=n.n(r),a=n(22),o=n(47),s=n(60),u=n(24),A=n(0),c=n.n(A),l=n(809),f=n(240),h=n(904),g=n(806),d=n(396),p=n(805),v=n.n(p),y=n(894),m=n(242),I=Object(d.a)((function(){return{addButton:{marginTop:"10px",marginBottom:"10px",fontWeight:400}}}));function b(){return c.a.createElement(c.a.Fragment,null,c.a.createElement(v.a,null),"Add Image Layer")}var E=function(e){var t=e.imageOptions,n=e.handleImageAdd,r=Object(A.useReducer)((function(e){return!e}),!1),i=Object(u.a)(r,2),a=i[0],o=i[1],s=I();return t?c.a.createElement(m.b,{open:a,toggle:o,buttonIcon:c.a.createElement(b,null),buttonClassName:s.addButton},t.map((function(e,t){return c.a.createElement(y.a,{dense:!0,key:e.name,onClick:function(){return function(e){o(),n(e)}(t)}},c.a.createElement("span",null,e.name))}))):null},C=n(161),B=n(178),w=n(67),Q=n(176),k=n(271),_=n(125),x=["raster"];t.a=function(e){var t=e.coordinationScopes,n=e.removeGridComponent,r=e.theme,d=Object(w.h)(),p=Object(w.d)(Q.b.layerController,t),v=Object(u.a)(p,2),y=v[0],m=y.dataset,I=y.spatialLayers,b=v[1].setSpatialLayers,S=Object(C.c)(x),O=Object(u.a)(S,3),D=O[0],R=O[1],j=O[2];Object(A.useEffect)((function(){j()}),[d,m]);var M=Object(B.g)(d,m,R,(function(){}),!1),N=Object(u.a)(M,3),F=(N[0],N[1]),T=N[2],L=function(){var e=Object(s.a)(i.a.mark((function e(t){var n,r,s,u;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=F[t],e.next=3,Object(k.a)(n);case 3:r=e.sent,s=Object(o.a)({type:"raster",index:t},_.f,{channels:r}),u=[].concat(Object(a.a)(I),[s]),b(u);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function P(e,t){var n=Object(a.a)(I);n[t]=e,b(n)}return c.a.createElement(f.a,{title:"Spatial Layers",isScroll:!0,removeGridComponent:n,theme:r,isReady:D},c.a.createElement("div",{className:"layer-controller-container"},I&&I.map((function(e,t){if("cells"===e.type)return c.a.createElement(g.a,{key:"".concat(m,"-cells"),label:"Cell Segmentations",layer:e,handleLayerChange:function(e){return P(e,t)}});if("molecules"===e.type)return c.a.createElement(g.a,{key:"".concat(m,"-molecules"),label:"Molecules",layer:e,handleLayerChange:function(e){return P(e,t)}});if("raster"===e.type){var n=e.index,i=F[n],o=T[n];return i&&o?c.a.createElement(l.a,{key:"".concat(m,"-raster-").concat(n,"-").concat(t),item:!0,style:{marginTop:"10px"}},c.a.createElement(h.a,{name:o.name,layer:e,loader:i,theme:r,handleLayerChange:function(e){return P(e,t)},handleLayerRemove:function(){return function(e){var t=Object(a.a)(I);t.splice(e,1),b(t)}(t)}})):null}return null})),c.a.createElement(l.a,{item:!0},c.a.createElement(E,{imageOptions:T,handleImageAdd:L}))))}},function(e,t,n){e.exports=function(){return n(1093)('!function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="./",e(e.s=23)}([function(t,n,e){var r=e(6)();t.exports=r},function(t,n){t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}},function(t,n,e){var r=e(22),o=e(5);t.exports=function(t,n,e){return void 0===e&&(e=n,n=void 0),void 0!==e&&(e=(e=o(e))===e?e:0),void 0!==n&&(n=(n=o(n))===n?n:0),r(o(t),n,e)}},function(t,n,e){var r=e(4),o=e(15),i=e(16),u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?o(t):i(t)}},function(t,n,e){var r=e(12).Symbol;t.exports=r},function(t,n,e){var r=e(1),o=e(20),i=/^\\s+|\\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,f=/^0o[0-7]+$/i,l=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return NaN;if(r(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=r(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var e=c.test(t);return e||f.test(t)?l(t.slice(2),e?2:8):u.test(t)?NaN:+t}},function(t,n,e){var r=e(7),o=e(8),i=e(19);t.exports=function(t){return function(n,e,u){return u&&"number"!=typeof u&&o(n,e,u)&&(e=u=void 0),n=i(n),void 0===e?(e=n,n=0):e=i(e),u=void 0===u?n<e?1:-1:i(u),r(n,e,u,t)}}},function(t,n){var e=Math.ceil,r=Math.max;t.exports=function(t,n,o,i){for(var u=-1,c=r(e((n-t)/(o||1)),0),f=Array(c);c--;)f[i?c:++u]=t,t+=o;return f}},function(t,n,e){var r=e(9),o=e(10),i=e(18),u=e(1);t.exports=function(t,n,e){if(!u(e))return!1;var c=typeof n;return!!("number"==c?o(e)&&i(n,e.length):"string"==c&&n in e)&&r(e[n],t)}},function(t,n){t.exports=function(t,n){return t===n||t!==t&&n!==n}},function(t,n,e){var r=e(11),o=e(17);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,n,e){var r=e(3),o=e(1);t.exports=function(t){if(!o(t))return!1;var n=r(t);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}},function(t,n,e){var r=e(13),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,n,e){(function(n){var e="object"==typeof n&&n&&n.Object===Object&&n;t.exports=e}).call(this,e(14))},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(r){"object"===typeof window&&(e=window)}t.exports=e},function(t,n,e){var r=e(4),o=Object.prototype,i=o.hasOwnProperty,u=o.toString,c=r?r.toStringTag:void 0;t.exports=function(t){var n=i.call(t,c),e=t[c];try{t[c]=void 0;var r=!0}catch(f){}var o=u.call(t);return r&&(n?t[c]=e:delete t[c]),o}},function(t,n){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},function(t,n){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,n){var e=/^(?:0|[1-9]\\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}},function(t,n,e){var r=e(5);t.exports=function(t){return t?(t=r(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t===t?t:0:0===t?t:0}},function(t,n,e){var r=e(3),o=e(21);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},function(t,n){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,n){t.exports=function(t,n,e){return t===t&&(void 0!==e&&(t=t<=e?t:e),void 0!==n&&(t=t>=n?t:n)),t}},function(t,n,e){"use strict";e.r(n);var r=e(0),o=e.n(r);e(2);function i(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var u,c=9728,f=10240,l=10241,a=10242,s=10243,p=33071;i(u={},l,c),i(u,f,c),i(u,a,p),i(u,s,p);function v(t,n){var e,r,i,u=n.tileSize,c=n.tileI,f=n.tileJ,l=n.numCells,a=n.numGenes,s=n.cellOrdering,p=n.cells,v=new Uint8Array(u*u),d=o()(u);return d.forEach((function(n){(r=f*u+n)<l&&(i=p.indexOf(s[r]))>=-1&&d.forEach((function(r){e=t[i*a+(c*u+r)],v[(u-r-1)*u+n]=e}))})),v}function d(t,n){var e,r,i,u,c=n.tileSize,f=n.tileI,l=n.tileJ,a=n.numCells,s=n.numGenes,p=n.cellOrdering,v=n.cells,d=new Uint8Array(c*c),b=o()(c);return b.forEach((function(n){(r=f*c+n)<a&&(u=v.indexOf(p[r]))>=-1&&b.forEach((function(r){e=(i=l*c+r)<s?t[u*s+i]:0,d[(c-n-1)*c+r]=e}))})),d}if("undefined"!==typeof self){const t={getTiles:function({curr:t,xTiles:n,yTiles:e,tileSize:r,cellOrdering:i,rows:u,cols:c,data:f,transpose:l}){const a=new Uint8Array(f),s=c.length,p=i.length,b=l?v:d;return[{tiles:o()(e).map(t=>o()(n).map(n=>b(a,{tileSize:r,tileI:t,tileJ:n,numCells:p,numGenes:s,cellOrdering:i,cells:u}))),buffer:f,curr:t},[f]]}};self.addEventListener("message",n=>{try{const[e,r]=n.data,[o,i]=t[e](r);self.postMessage(o,i)}catch(e){console.warn(e)}})}}]);\n//# sourceMappingURL=8b8b00e723ab0fcc7e0d.worker.js.map',null)}},function(e,t,n){(function(e){(function(t){"use strict";function n(){}function r(){r.init.call(this)}function i(e){return void 0===e._maxListeners?r.defaultMaxListeners:e._maxListeners}function a(e,t,n){if(t)e.call(n);else for(var r=e.length,i=h(e,r),a=0;a<r;++a)i[a].call(n)}function o(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,a=h(e,i),o=0;o<i;++o)a[o].call(n,r)}function s(e,t,n,r,i){if(t)e.call(n,r,i);else for(var a=e.length,o=h(e,a),s=0;s<a;++s)o[s].call(n,r,i)}function u(e,t,n,r,i,a){if(t)e.call(n,r,i,a);else for(var o=e.length,s=h(e,o),u=0;u<o;++u)s[u].call(n,r,i,a)}function A(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,a=h(e,i),o=0;o<i;++o)a[o].apply(n,r)}function c(e,t,r,a){var o,s,u,A;if("function"!==typeof r)throw new TypeError('"listener" argument must be a function');if((s=e._events)?(s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),u=s[t]):(s=e._events=new n,e._eventsCount=0),u){if("function"===typeof u?u=s[t]=a?[r,u]:[u,r]:a?u.unshift(r):u.push(r),!u.warned&&(o=i(e))&&o>0&&u.length>o){u.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=u.length,A=c,"function"===typeof console.warn?console.warn(A):console.log(A)}}else u=s[t]=r,++e._eventsCount;return e}function l(e,t,n){var r=!1;function i(){e.removeListener(t,i),r||(r=!0,n.apply(e,arguments))}return i.listener=n,i}function f(e){var t=this._events;if(t){var n=t[e];if("function"===typeof n)return 1;if(n)return n.length}return 0}function h(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}n.prototype=Object.create(null),r.EventEmitter=r,r.usingDomains=!1,r.prototype.domain=void 0,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.init=function(){this.domain=null,r.usingDomains&&(void 0).active&&(void 0).Domain,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new n,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(e){if("number"!==typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},r.prototype.getMaxListeners=function(){return i(this)},r.prototype.emit=function(e){var t,n,r,i,c,l,f,h="error"===e;if(l=this._events)h=h&&null==l.error;else if(!h)return!1;if(f=this.domain,h){if(t=arguments[1],!f){if(t instanceof Error)throw t;var g=new Error('Uncaught, unspecified "error" event. ('+t+")");throw g.context=t,g}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=f,t.domainThrown=!1,f.emit("error",t),!1}if(!(n=l[e]))return!1;var d="function"===typeof n;switch(r=arguments.length){case 1:a(n,d,this);break;case 2:o(n,d,this,arguments[1]);break;case 3:s(n,d,this,arguments[1],arguments[2]);break;case 4:u(n,d,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),c=1;c<r;c++)i[c-1]=arguments[c];A(n,d,this,i)}return!0},r.prototype.addListener=function(e,t){return c(this,e,t,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(e,t){return c(this,e,t,!0)},r.prototype.once=function(e,t){if("function"!==typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,l(this,e,t)),this},r.prototype.prependOnceListener=function(e,t){if("function"!==typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,l(this,e,t)),this},r.prototype.removeListener=function(e,t){var r,i,a,o,s;if("function"!==typeof t)throw new TypeError('"listener" argument must be a function');if(!(i=this._events))return this;if(!(r=i[e]))return this;if(r===t||r.listener&&r.listener===t)0===--this._eventsCount?this._events=new n:(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!==typeof r){for(a=-1,o=r.length;o-- >0;)if(r[o]===t||r[o].listener&&r[o].listener===t){s=r[o].listener,a=o;break}if(a<0)return this;if(1===r.length){if(r[0]=void 0,0===--this._eventsCount)return this._events=new n,this;delete i[e]}else!function(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}(r,a);i.removeListener&&this.emit("removeListener",e,s||t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new n,this._eventsCount=0):r[e]&&(0===--this._eventsCount?this._events=new n:delete r[e]),this;if(0===arguments.length){for(var i,a=Object.keys(r),o=0;o<a.length;++o)"removeListener"!==(i=a[o])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=new n,this._eventsCount=0,this}if("function"===typeof(t=r[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},r.prototype.listeners=function(e){var t,n=this._events;return n&&(t=n[e])?"function"===typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(t):[]},r.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},r.prototype.listenerCount=f,r.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var g="undefined"!==typeof e?e:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{},d=[],p=[],v="undefined"!==typeof Uint8Array?Uint8Array:Array,y=!1;function m(){y=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t<n;++t)d[t]=e[t],p[e.charCodeAt(t)]=t;p["-".charCodeAt(0)]=62,p["_".charCodeAt(0)]=63}function I(e,t,n){for(var r,i,a=[],o=t;o<n;o+=3)r=(e[o]<<16)+(e[o+1]<<8)+e[o+2],a.push(d[(i=r)>>18&63]+d[i>>12&63]+d[i>>6&63]+d[63&i]);return a.join("")}function b(e){var t;y||m();for(var n=e.length,r=n%3,i="",a=[],o=0,s=n-r;o<s;o+=16383)a.push(I(e,o,o+16383>s?s:o+16383));return 1===r?(t=e[n-1],i+=d[t>>2],i+=d[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=d[t>>10],i+=d[t>>4&63],i+=d[t<<2&63],i+="="),a.push(i),a.join("")}function E(e,t,n,r,i){var a,o,s=8*i-r-1,u=(1<<s)-1,A=u>>1,c=-7,l=n?i-1:0,f=n?-1:1,h=e[t+l];for(l+=f,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=256*a+e[t+l],l+=f,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+l],l+=f,c-=8);if(0===a)a=1-A;else{if(a===u)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),a-=A}return(h?-1:1)*o*Math.pow(2,a-r)}function C(e,t,n,r,i,a){var o,s,u,A=8*a-i-1,c=(1<<A)-1,l=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,g=r?1:-1,d=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=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+l>=1?f/u:f*Math.pow(2,1-l))*u>=2&&(o++,u/=2),o+l>=c?(s=0,o=c):o+l>=1?(s=(t*u-1)*Math.pow(2,i),o+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=255&s,h+=g,s/=256,i-=8);for(o=o<<i|s,A+=i;A>0;e[n+h]=255&o,h+=g,o/=256,A-=8);e[n+h-g]|=128*d}var B={}.toString,w=Array.isArray||function(e){return"[object Array]"==B.call(e)};function Q(){return _.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function k(e,t){if(Q()<t)throw new RangeError("Invalid typed array length");return _.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=_.prototype:(null===e&&(e=new _(t)),e.length=t),e}function _(e,t,n){if(!_.TYPED_ARRAY_SUPPORT&&!(this instanceof _))return new _(e,t,n);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return O(this,e)}return x(this,e,t,n)}function x(e,t,n,r){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),_.TYPED_ARRAY_SUPPORT?(e=t).__proto__=_.prototype:e=D(e,t),e}(e,t,n,r):"string"===typeof t?function(e,t,n){if("string"===typeof n&&""!==n||(n="utf8"),!_.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|M(t,n),i=(e=k(e,r)).write(t,n);return i!==r&&(e=e.slice(0,i)),e}(e,t,n):function(e,t){if(j(t)){var n=0|R(t.length);return 0===(e=k(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||(r=t.length)!==r?k(e,0):D(e,t);if("Buffer"===t.type&&w(t.data))return D(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function S(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 O(e,t){if(S(t),e=k(e,t<0?0:0|R(t)),!_.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function D(e,t){var n=t.length<0?0:0|R(t.length);e=k(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function R(e){if(e>=Q())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Q().toString(16)+" bytes");return 0|e}function j(e){return!(null==e||!e._isBuffer)}function M(e,t){if(j(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 n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return oe(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return se(e).length;default:if(r)return oe(e).length;t=(""+t).toLowerCase(),r=!0}}function N(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return V(this,t,n);case"utf8":case"utf-8":return z(this,t,n);case"ascii":return K(this,t,n);case"latin1":case"binary":return W(this,t,n);case"base64":return J(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function F(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function T(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=_.from(t,r)),j(t))return 0===t.length?-1:L(e,t,n,r,i);if("number"===typeof t)return t&=255,_.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):L(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function L(e,t,n,r,i){var a,o=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,n/=2}function A(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=n;a<s;a++)if(A(e,a)===A(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===u)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(n+u>s&&(n=s-u),a=n;a>=0;a--){for(var l=!0,f=0;f<u;f++)if(A(e,a+f)!==A(t,f)){l=!1;break}if(l)return a}return-1}function P(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function U(e,t,n,r){return ue(oe(t,e.length-n),e,n,r)}function G(e,t,n,r){return ue(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function q(e,t,n,r){return G(e,t,n,r)}function H(e,t,n,r){return ue(se(t),e,n,r)}function Y(e,t,n,r){return ue(function(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function J(e,t,n){return 0===t&&n===e.length?b(e):b(e.slice(t,n))}function z(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,o,s,u,A=e[i],c=null,l=A>239?4:A>223?3:A>191?2:1;if(i+l<=n)switch(l){case 1:A<128&&(c=A);break;case 2:128===(192&(a=e[i+1]))&&(u=(31&A)<<6|63&a)>127&&(c=u);break;case 3:a=e[i+1],o=e[i+2],128===(192&a)&&128===(192&o)&&(u=(15&A)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(c=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&A)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,l=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=l}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}function K(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function W(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function V(e,t,n){var r,i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var a="",o=t;o<n;++o)a+=(r=e[o])<16?"0"+r.toString(16):r.toString(16);return a}function X(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function Z(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function $(e,t,n,r,i,a){if(!j(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(n+r>e.length)throw new RangeError("Index out of range")}function ee(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function te(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function ne(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function re(e,t,n,r,i){return i||ne(e,0,n,4),C(e,t,n,r,23,4),n+4}function ie(e,t,n,r,i){return i||ne(e,0,n,8),C(e,t,n,r,52,8),n+8}_.TYPED_ARRAY_SUPPORT=void 0===g.TYPED_ARRAY_SUPPORT||g.TYPED_ARRAY_SUPPORT,_.poolSize=8192,_._augment=function(e){return e.__proto__=_.prototype,e},_.from=function(e,t,n){return x(null,e,t,n)},_.TYPED_ARRAY_SUPPORT&&(_.prototype.__proto__=Uint8Array.prototype,_.__proto__=Uint8Array),_.alloc=function(e,t,n){return function(e,t,n,r){return S(t),t<=0?k(e,t):void 0!==n?"string"===typeof r?k(e,t).fill(n,r):k(e,t).fill(n):k(e,t)}(null,e,t,n)},_.allocUnsafe=function(e){return O(null,e)},_.allocUnsafeSlow=function(e){return O(null,e)},_.isBuffer=Ae,_.compare=function(e,t){if(!j(e)||!j(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},_.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}},_.concat=function(e,t){if(!w(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return _.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=_.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!j(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},_.byteLength=M,_.prototype._isBuffer=!0,_.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)F(this,t,t+1);return this},_.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)F(this,t,t+3),F(this,t+1,t+2);return this},_.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)F(this,t,t+7),F(this,t+1,t+6),F(this,t+2,t+5),F(this,t+3,t+4);return this},_.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?z(this,0,e):N.apply(this,arguments)},_.prototype.equals=function(e){if(!j(e))throw new TypeError("Argument must be a Buffer");return this===e||0===_.compare(this,e)},_.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},_.prototype.compare=function(e,t,n,r,i){if(!j(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),u=this.slice(r,i),A=e.slice(t,n),c=0;c<s;++c)if(u[c]!==A[c]){a=u[c],o=A[c];break}return a<o?-1:o<a?1:0},_.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},_.prototype.indexOf=function(e,t,n){return T(this,e,t,n,!0)},_.prototype.lastIndexOf=function(e,t,n){return T(this,e,t,n,!1)},_.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"===typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return P(this,e,t,n);case"utf8":case"utf-8":return U(this,e,t,n);case"ascii":return G(this,e,t,n);case"latin1":case"binary":return q(this,e,t,n);case"base64":return H(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},_.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},_.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),_.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=_.prototype;else{var i=t-e;n=new _(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+e]}return n},_.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||Z(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},_.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||Z(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},_.prototype.readUInt8=function(e,t){return t||Z(e,1,this.length),this[e]},_.prototype.readUInt16LE=function(e,t){return t||Z(e,2,this.length),this[e]|this[e+1]<<8},_.prototype.readUInt16BE=function(e,t){return t||Z(e,2,this.length),this[e]<<8|this[e+1]},_.prototype.readUInt32LE=function(e,t){return t||Z(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},_.prototype.readUInt32BE=function(e,t){return t||Z(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},_.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||Z(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},_.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||Z(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},_.prototype.readInt8=function(e,t){return t||Z(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},_.prototype.readInt16LE=function(e,t){t||Z(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},_.prototype.readInt16BE=function(e,t){t||Z(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},_.prototype.readInt32LE=function(e,t){return t||Z(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},_.prototype.readInt32BE=function(e,t){return t||Z(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},_.prototype.readFloatLE=function(e,t){return t||Z(e,4,this.length),E(this,e,!0,23,4)},_.prototype.readFloatBE=function(e,t){return t||Z(e,4,this.length),E(this,e,!1,23,4)},_.prototype.readDoubleLE=function(e,t){return t||Z(e,8,this.length),E(this,e,!0,52,8)},_.prototype.readDoubleBE=function(e,t){return t||Z(e,8,this.length),E(this,e,!1,52,8)},_.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||$(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},_.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||$(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},_.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,1,255,0),_.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},_.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,2,65535,0),_.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):ee(this,e,t,!0),t+2},_.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,2,65535,0),_.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):ee(this,e,t,!1),t+2},_.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,4,4294967295,0),_.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):te(this,e,t,!0),t+4},_.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,4,4294967295,0),_.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):te(this,e,t,!1),t+4},_.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);$(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},_.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);$(this,e,t,n,i-1,-i)}var a=n-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+n},_.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,1,127,-128),_.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},_.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,2,32767,-32768),_.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):ee(this,e,t,!0),t+2},_.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,2,32767,-32768),_.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):ee(this,e,t,!1),t+2},_.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,4,2147483647,-2147483648),_.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):te(this,e,t,!0),t+4},_.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),_.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):te(this,e,t,!1),t+4},_.prototype.writeFloatLE=function(e,t,n){return re(this,e,t,!0,n)},_.prototype.writeFloatBE=function(e,t,n){return re(this,e,t,!1,n)},_.prototype.writeDoubleLE=function(e,t,n){return ie(this,e,t,!0,n)},_.prototype.writeDoubleBE=function(e,t,n){return ie(this,e,t,!1,n)},_.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&n<t&&t<r)for(i=a-1;i>=0;--i)e[i+t]=this[i+n];else if(a<1e3||!_.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},_.prototype.fill=function(e,t,n,r){if("string"===typeof e){if("string"===typeof t?(r=t,t=0,n=this.length):"string"===typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!==typeof r)throw new TypeError("encoding must be a string");if("string"===typeof r&&!_.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(a=t;a<n;++a)this[a]=e;else{var o=j(e)?e:oe(new _(e,r).toString()),s=o.length;for(a=0;a<n-t;++a)this[a+t]=o[a%s]}return this};var ae=/[^+\/0-9A-Za-z-_]/g;function oe(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function se(e){return function(e){var t,n,r,i,a,o;y||m();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new v(3*s/4-a),r=a>0?s-4:s;var u=0;for(t=0,n=0;t<r;t+=4,n+=3)i=p[e.charCodeAt(t)]<<18|p[e.charCodeAt(t+1)]<<12|p[e.charCodeAt(t+2)]<<6|p[e.charCodeAt(t+3)],o[u++]=i>>16&255,o[u++]=i>>8&255,o[u++]=255&i;return 2===a?(i=p[e.charCodeAt(t)]<<2|p[e.charCodeAt(t+1)]>>4,o[u++]=255&i):1===a&&(i=p[e.charCodeAt(t)]<<10|p[e.charCodeAt(t+1)]<<4|p[e.charCodeAt(t+2)]>>2,o[u++]=i>>8&255,o[u++]=255&i),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(ae,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function ue(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Ae(e){return null!=e&&(!!e._isBuffer||ce(e)||function(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&ce(e.slice(0,0))}(e))}function ce(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function le(){throw new Error("setTimeout has not been defined")}function fe(){throw new Error("clearTimeout has not been defined")}var he=le,ge=fe;function de(e){if(he===setTimeout)return setTimeout(e,0);if((he===le||!he)&&setTimeout)return he=setTimeout,setTimeout(e,0);try{return he(e,0)}catch(t){try{return he.call(null,e,0)}catch(t){return he.call(this,e,0)}}}"function"===typeof g.setTimeout&&(he=setTimeout),"function"===typeof g.clearTimeout&&(ge=clearTimeout);var pe,ve=[],ye=!1,me=-1;function Ie(){ye&&pe&&(ye=!1,pe.length?ve=pe.concat(ve):me=-1,ve.length&&be())}function be(){if(!ye){var e=de(Ie);ye=!0;for(var t=ve.length;t;){for(pe=ve,ve=[];++me<t;)pe&&pe[me].run();me=-1,t=ve.length}pe=null,ye=!1,function(e){if(ge===clearTimeout)return clearTimeout(e);if((ge===fe||!ge)&&clearTimeout)return ge=clearTimeout,clearTimeout(e);try{ge(e)}catch(t){try{return ge.call(null,e)}catch(t){return ge.call(this,e)}}}(e)}}function Ee(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];ve.push(new Ce(e,t)),1!==ve.length||ye||de(be)}function Ce(e,t){this.fun=e,this.array=t}function Be(){}Ce.prototype.run=function(){this.fun.apply(null,this.array)};var we=Be,Qe=Be,ke=Be,_e=Be,xe=Be,Se=Be,Oe=Be,De=g.performance||{},Re=De.now||De.mozNow||De.msNow||De.oNow||De.webkitNow||function(){return(new Date).getTime()},je=new Date,Me={nextTick:Ee,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:we,addListener:Qe,once:ke,off:_e,removeListener:xe,removeAllListeners:Se,emit:Oe,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Re.call(De),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-je)/1e3}},Ne="function"===typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},Fe=/%[sdj%]/g;function Te(e){if(!Ve(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(Ge(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,a=String(e).replace(Fe,(function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}})),o=r[n];n<i;o=r[++n])We(o)||!$e(o)?a+=" "+o:a+=" "+Ge(o);return a}function Le(e,t){if(Xe(g.process))return function(){return Le(e,t).apply(this,arguments)};var n=!1;return function(){return n||(console.error(t),n=!0),e.apply(this,arguments)}}var Pe,Ue={};function Ge(e,t){var n={seen:[],stylize:He};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),Ke(t)?n.showHidden=t:t&&it(n,t),Xe(n.showHidden)&&(n.showHidden=!1),Xe(n.depth)&&(n.depth=2),Xe(n.colors)&&(n.colors=!1),Xe(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=qe),Ye(n,e,n.depth)}function qe(e,t){var n=Ge.styles[t];return n?"\x1b["+Ge.colors[n][0]+"m"+e+"\x1b["+Ge.colors[n][1]+"m":e}function He(e,t){return e}function Ye(e,t,n){if(e.customInspect&&t&&nt(t.inspect)&&t.inspect!==Ge&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(n,e);return Ve(r)||(r=Ye(e,r,n)),r}var i=function(e,t){if(Xe(t))return e.stylize("undefined","undefined");if(Ve(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return"number"===typeof t?e.stylize(""+t,"number"):Ke(t)?e.stylize(""+t,"boolean"):We(t)?e.stylize("null","null"):void 0}(e,t);if(i)return i;var a=Object.keys(t),o=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),tt(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return Je(t);if(0===a.length){if(nt(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(Ze(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(et(t))return e.stylize(Date.prototype.toString.call(t),"date");if(tt(t))return Je(t)}var u,A,c="",l=!1,f=["{","}"];return u=t,Array.isArray(u)&&(l=!0,f=["[","]"]),nt(t)&&(c=" [Function"+(t.name?": "+t.name:"")+"]"),Ze(t)&&(c=" "+RegExp.prototype.toString.call(t)),et(t)&&(c=" "+Date.prototype.toUTCString.call(t)),tt(t)&&(c=" "+Je(t)),0!==a.length||l&&0!=t.length?n<0?Ze(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),A=l?function(e,t,n,r,i){for(var a=[],o=0,s=t.length;o<s;++o)at(t,String(o))?a.push(ze(e,t,n,r,String(o),!0)):a.push("");return i.forEach((function(i){i.match(/^\d+$/)||a.push(ze(e,t,n,r,i,!0))})),a}(e,t,n,o,a):a.map((function(r){return ze(e,t,n,o,r,l)})),e.seen.pop(),function(e,t,n){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(A,c,f)):f[0]+c+f[1]}function Je(e){return"["+Error.prototype.toString.call(e)+"]"}function ze(e,t,n,r,i,a){var o,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),at(r,i)||(o="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=We(n)?Ye(e,u.value,null):Ye(e,u.value,n-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(e){return"  "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return"   "+e})).join("\n")):s=e.stylize("[Circular]","special")),Xe(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function Ke(e){return"boolean"===typeof e}function We(e){return null===e}function Ve(e){return"string"===typeof e}function Xe(e){return void 0===e}function Ze(e){return $e(e)&&"[object RegExp]"===rt(e)}function $e(e){return"object"===typeof e&&null!==e}function et(e){return $e(e)&&"[object Date]"===rt(e)}function tt(e){return $e(e)&&("[object Error]"===rt(e)||e instanceof Error)}function nt(e){return"function"===typeof e}function rt(e){return Object.prototype.toString.call(e)}function it(e,t){if(!t||!$e(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}function at(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ot(){this.head=null,this.tail=null,this.length=0}Ge.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Ge.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},ot.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},ot.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},ot.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},ot.prototype.clear=function(){this.head=this.tail=null,this.length=0},ot.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},ot.prototype.concat=function(e){if(0===this.length)return _.alloc(0);if(1===this.length)return this.head.data;for(var t=_.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t};var st=_.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function ut(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!st(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=ct;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=lt;break;default:return void(this.write=At)}this.charBuffer=new _(6),this.charReceived=0,this.charLength=0}function At(e){return e.toString(this.encoding)}function ct(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function lt(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}ut.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(e=e.slice(n,e.length),!((r=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r,i=e.length;if(this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),i=(t+=e.toString(this.encoding,0,i)).length-1,(r=t.charCodeAt(i))>=55296&&r<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),e.copy(this.charBuffer,0,0,a),t.substring(0,i)}return t},ut.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},ut.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t},dt.ReadableState=gt;var ft,ht=(ft="stream",Xe(Pe)&&(Pe=Me.env.NODE_DEBUG||""),ft=ft.toUpperCase(),Ue[ft]||(new RegExp("\\b"+ft+"\\b","i").test(Pe)?Ue[ft]=function(){var e=Te.apply(null,arguments);console.error("%s %d: %s",ft,0,e)}:Ue[ft]=function(){}),Ue[ft]);function gt(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof Gt&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new ot,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new ut(e.encoding),this.encoding=e.encoding)}function dt(e){if(!(this instanceof dt))return new dt(e);this._readableState=new gt(e,this),this.readable=!0,e&&"function"===typeof e.read&&(this._read=e.read),r.call(this)}function pt(e,t,n,r,i){var a=function(e,t){var n=null;return Ae(t)||"string"===typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}(t,n);if(a)e.emit("error",a);else if(null===n)t.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,yt(e)}}(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var o=new Error("stream.push() after EOF");e.emit("error",o)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var u;!t.decoder||i||r||(n=t.decoder.write(n),u=!t.objectMode&&0===n.length),i||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&yt(e))),function(e,t){t.readingMore||(t.readingMore=!0,Ee(It,e,t))}(e,t)}else i||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}function vt(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function yt(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(ht("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?Ee(mt,e):mt(e))}function mt(e){ht("emit readable"),e.emit("readable"),Ct(e)}function It(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(ht("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function bt(e){ht("readable nexttick read 0"),e.read(0)}function Et(e,t){t.reading||(ht("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),Ct(e),t.flowing&&!t.reading&&e.read(0)}function Ct(e){var t=e._readableState;for(ht("flow",t.flowing);t.flowing&&null!==e.read(););}function Bt(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),0===(e-=o)){o===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=_.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),0===(e-=o)){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}(e,t),r}(e,t.buffer,t.decoder),n);var n}function wt(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,Ee(Qt,t,e))}function Qt(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function kt(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function _t(){}function xt(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function St(e,t){Object.defineProperty(this,"buffer",{get:Le((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof Gt&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?Ee(i,r):i(r),e._writableState.errorEmitted=!0,e.emit("error",r)}(e,n,r,t,i);else{var a=Mt(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||jt(e,n),r?Ee(Rt,e,n,a,i):Rt(e,n,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Tt(this)}function Ot(e){if(!(this instanceof Ot)&&!(this instanceof Gt))return new Ot(e);this._writableState=new St(e,this),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev)),r.call(this)}function Dt(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function Rt(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),Ft(e,t)}function jt(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var o=0;n;)i[o]=n,n=n.next,o+=1;Dt(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new Tt(t)}else{for(;n;){var s=n.chunk,u=n.encoding,A=n.callback;if(Dt(e,t,!1,t.objectMode?1:s.length,s,u,A),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function Mt(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function Nt(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function Ft(e,t){var n=Mt(t);return n&&(0===t.pendingcb?(Nt(e,t),t.finished=!0,e.emit("finish")):Nt(e,t)),n}function Tt(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}Ne(dt,r),dt.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!==typeof e||(t=t||n.defaultEncoding)!==n.encoding&&(e=_.from(e,t),t=""),pt(this,n,e,t,!1)},dt.prototype.unshift=function(e){return pt(this,this._readableState,e,"",!0)},dt.prototype.isPaused=function(){return!1===this._readableState.flowing},dt.prototype.setEncoding=function(e){return this._readableState.decoder=new ut(e),this._readableState.encoding=e,this},dt.prototype.read=function(e){ht("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return ht("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?wt(this):yt(this),null;if(0===(e=vt(e,t))&&t.ended)return 0===t.length&&wt(this),null;var r,i=t.needReadable;return ht("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&ht("length less than watermark",i=!0),t.ended||t.reading?ht("reading or ended",i=!1):i&&(ht("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=vt(n,t))),null===(r=e>0?Bt(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&wt(this)),null!==r&&this.emit("data",r),r},dt.prototype._read=function(e){this.emit("error",new Error("not implemented"))},dt.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,ht("pipe count=%d opts=%j",r.pipesCount,t);var i=t&&!1===t.end?A:o;function a(e){ht("onunpipe"),e===n&&A()}function o(){ht("onend"),e.end()}r.endEmitted?Ee(i):n.once("end",i),e.on("unpipe",a);var s=function(e){return function(){var t=e._readableState;ht("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,Ct(e))}}(n);e.on("drain",s);var u=!1;function A(){ht("cleanup"),e.removeListener("close",h),e.removeListener("finish",g),e.removeListener("drain",s),e.removeListener("error",f),e.removeListener("unpipe",a),n.removeListener("end",o),n.removeListener("end",A),n.removeListener("data",l),u=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||s()}var c=!1;function l(t){ht("ondata"),c=!1,!1!==e.write(t)||c||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==kt(r.pipes,e))&&!u&&(ht("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,c=!0),n.pause())}function f(t){ht("onerror",t),d(),e.removeListener("error",f),0===function(e,t){return e.listeners(t).length}(e,"error")&&e.emit("error",t)}function h(){e.removeListener("finish",g),d()}function g(){ht("onfinish"),e.removeListener("close",h),d()}function d(){ht("unpipe"),n.unpipe(e)}return n.on("data",l),function(e,t,n){if("function"===typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",f),e.once("close",h),e.once("finish",g),e.emit("pipe",n),r.flowing||(ht("pipe resume"),n.resume()),e},dt.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var a=kt(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},dt.prototype.on=function(e,t){var n=r.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&yt(this):Ee(bt,this))}return n},dt.prototype.addListener=dt.prototype.on,dt.prototype.resume=function(){var e=this._readableState;return e.flowing||(ht("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,Ee(Et,e,t))}(this,e)),this},dt.prototype.pause=function(){return ht("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(ht("pause"),this._readableState.flowing=!1,this.emit("pause")),this},dt.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;for(var i in e.on("end",(function(){if(ht("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)})),e.on("data",(function(i){ht("wrapped data"),t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)&&(r.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}(["error","close","destroy","pause","resume"],(function(t){e.on(t,r.emit.bind(r,t))})),r._read=function(t){ht("wrapped _read",t),n&&(n=!1,e.resume())},r},dt._fromList=Bt,Ot.WritableState=St,Ne(Ot,r),St.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},Ot.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Ot.prototype.write=function(e,t,n){var r=this._writableState,i=!1;return"function"===typeof t&&(n=t,t=null),_.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!==typeof n&&(n=_t),r.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),Ee(t,n)}(this,n):function(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):_.isBuffer(n)||"string"===typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),Ee(r,a),i=!1),i}(this,r,e,n)&&(r.pendingcb++,i=function(e,t,n,r,i){n=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=_.from(t,n)),t}(t,n,r),_.isBuffer(n)&&(r="buffer");var a=t.objectMode?1:n.length;t.length+=a;var o=t.length<t.highWaterMark;if(o||(t.needDrain=!0),t.writing||t.corked){var s=t.lastBufferedRequest;t.lastBufferedRequest=new xt(n,r,i),s?s.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Dt(e,t,!1,a,n,r,i);return o}(this,r,e,t,n)),i},Ot.prototype.cork=function(){this._writableState.corked++},Ot.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||jt(this,e))},Ot.prototype.setDefaultEncoding=function(e){if("string"===typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Ot.prototype._write=function(e,t,n){n(new Error("not implemented"))},Ot.prototype._writev=null,Ot.prototype.end=function(e,t,n){var r=this._writableState;"function"===typeof e?(n=e,e=null,t=null):"function"===typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,Ft(e,t),n&&(t.finished?Ee(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n)},Ne(Gt,dt);for(var Lt=Object.keys(Ot.prototype),Pt=0;Pt<Lt.length;Pt++){var Ut=Lt[Pt];Gt.prototype[Ut]||(Gt.prototype[Ut]=Ot.prototype[Ut])}function Gt(e){if(!(this instanceof Gt))return new Gt(e);dt.call(this,e),Ot.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",qt)}function qt(){this.allowHalfOpen||this._writableState.ended||Ee(Ht,this)}function Ht(e){e.end()}function Yt(e){this.afterTransform=function(t,n){return function(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&e.push(n),i(t);var a=e._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&e._read(a.highWaterMark)}(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function Jt(e){if(!(this instanceof Jt))return new Jt(e);Gt.call(this,e),this._transformState=new Yt(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"===typeof e.transform&&(this._transform=e.transform),"function"===typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",(function(){"function"===typeof this._flush?this._flush((function(e){zt(t,e)})):zt(t)}))}function zt(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=e._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(r.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}function Kt(e){if(!(this instanceof Kt))return new Kt(e);Jt.call(this,e)}function Wt(){r.call(this)}function Vt(e){return(Vt="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zt(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&&Zt(e.prototype,t),n&&Zt(e,n),e}function en(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nn(e,t)}function tn(e){return(tn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nn(e,t){return(nn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rn(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function an(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}Ne(Jt,Gt),Jt.prototype.push=function(e,t){return this._transformState.needTransform=!1,Gt.prototype.push.call(this,e,t)},Jt.prototype._transform=function(e,t,n){throw new Error("Not implemented")},Jt.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},Jt.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},Ne(Kt,Jt),Kt.prototype._transform=function(e,t,n){n(null,e)},Ne(Wt,r),Wt.Readable=dt,Wt.Writable=Ot,Wt.Duplex=Gt,Wt.Transform=Jt,Wt.PassThrough=Kt,Wt.Stream=Wt,Wt.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",u));var o=!1;function s(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"===typeof e.destroy&&e.destroy())}function A(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",a),n.removeListener("end",s),n.removeListener("close",u),n.removeListener("error",A),e.removeListener("error",A),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",A),e.on("error",A),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e};var on="\n",sn="undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},un=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,An=/^\w*$/,cn=/^\./,ln=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fn=/\\(\\)?/g,hn=/^\[object .+?Constructor\]$/,gn="object"==typeof sn&&sn&&sn.Object===Object&&sn,dn="object"==typeof self&&self&&self.Object===Object&&self,pn=gn||dn||Function("return this")(),vn=Array.prototype,yn=Function.prototype,mn=Object.prototype,In=pn["__core-js_shared__"],bn=function(){var e=/[^.]+$/.exec(In&&In.keys&&In.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),En=yn.toString,Cn=mn.hasOwnProperty,Bn=mn.toString,wn=RegExp("^"+En.call(Cn).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qn=pn.Symbol,kn=vn.splice,_n=Ln(pn,"Map"),xn=Ln(Object,"create"),Sn=Qn?Qn.prototype:void 0,On=Sn?Sn.toString:void 0;function Dn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Rn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function jn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Mn(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!==n&&r!==r)return i;return-1}function Nn(e,t){for(var n,r=0,i=(t=function(e,t){if(qn(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Yn(e))||(An.test(e)||!un.test(e)||null!=t&&e in Object(t))}(t,e)?[t]:qn(n=t)?n:Pn(n)).length;null!=e&&r<i;)e=e[Un(t[r++])];return r&&r==i?e:void 0}function Fn(e){return!(!Hn(e)||(t=e,bn&&bn in t))&&(function(e){var t=Hn(e)?Bn.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e)?wn:hn).test(function(e){if(null!=e){try{return En.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e));var t}function Tn(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function Ln(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Fn(n)?n:void 0}Dn.prototype.clear=function(){this.__data__=xn?xn(null):{}},Dn.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Dn.prototype.get=function(e){var t=this.__data__;if(xn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Cn.call(t,e)?t[e]:void 0},Dn.prototype.has=function(e){var t=this.__data__;return xn?void 0!==t[e]:Cn.call(t,e)},Dn.prototype.set=function(e,t){return this.__data__[e]=xn&&void 0===t?"__lodash_hash_undefined__":t,this},Rn.prototype.clear=function(){this.__data__=[]},Rn.prototype.delete=function(e){var t=this.__data__,n=Mn(t,e);return!(n<0)&&(n==t.length-1?t.pop():kn.call(t,n,1),!0)},Rn.prototype.get=function(e){var t=this.__data__,n=Mn(t,e);return n<0?void 0:t[n][1]},Rn.prototype.has=function(e){return Mn(this.__data__,e)>-1},Rn.prototype.set=function(e,t){var n=this.__data__,r=Mn(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},jn.prototype.clear=function(){this.__data__={hash:new Dn,map:new(_n||Rn),string:new Dn}},jn.prototype.delete=function(e){return Tn(this,e).delete(e)},jn.prototype.get=function(e){return Tn(this,e).get(e)},jn.prototype.has=function(e){return Tn(this,e).has(e)},jn.prototype.set=function(e,t){return Tn(this,e).set(e,t),this};var Pn=Gn((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Yn(e))return On?On.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return cn.test(e)&&n.push(""),e.replace(ln,(function(e,t,r,i){n.push(r?i.replace(fn,"$1"):t||e)})),n}));function Un(e){if("string"==typeof e||Yn(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Gn(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o),o};return n.cache=new(Gn.Cache||jn),n}Gn.Cache=jn;var qn=Array.isArray;function Hn(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Yn(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==Bn.call(e)}var Jn=function(e,t,n){var r=null==e?void 0:Nn(e,t);return void 0===r?n:r},zn=function(e,t){var n=!0;return e.reduce((function(e,r){return null!==r&&void 0!==r||(r=""),n?(n=!1,"".concat(r)):"".concat(e).concat(t).concat(r)}),"")},Kn=function(e,t){try{return e.push.apply(e,an(t)),e}catch(n){return e.concat(t)}},Wn=function(e,t,n){return void 0===e[t]||null===e[t]?n:e[t]},Vn=function e(t,n,r){var i=Array.isArray(n)?n:n.split("."),a=i[0],o=i.length>1?e(t[a]||{},i.slice(1),r):r;return Object.assign({},t,function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},a,o))},Xn=zn,Zn=Kn,$n=function(){function e(t){Xt(this,e),this.opts=this.preprocessOpts(t),this.preprocessRow=this.memoizePreprocessRow()}return $t(e,[{key:"preprocessOpts",value:function(e){var t=Object.assign({},e);return t.unwind=Array.isArray(t.unwind)?t.unwind:t.unwind?[t.unwind]:[],t.delimiter=t.delimiter||",",t.flattenSeparator=t.flattenSeparator||".",t.eol=t.eol||on,t.quote="string"===typeof t.quote?e.quote:'"',t.doubleQuote="string"===typeof t.doubleQuote?t.doubleQuote:t.quote+t.quote,t.header=!1!==t.header,t.includeEmptyRows=t.includeEmptyRows||!1,t.withBOM=t.withBOM||!1,t}},{key:"preprocessFieldsInfo",value:function(e){var t=this;return e.map((function(e){if("string"===typeof e)return{label:e,value:e.includes(".")||e.includes("[")?function(n){return Jn(n,e,t.opts.defaultValue)}:function(n){return Wn(n,e,t.opts.defaultValue)},stringify:!0};if("object"===Vt(e)){var n="default"in e?e.default:t.opts.defaultValue;if("string"===typeof e.value)return{label:e.label||e.value,value:e.value.includes(".")||e.value.includes("[")?function(t){return Jn(t,e.value,n)}:function(t){return Wn(t,e.value,n)},stringify:void 0===e.stringify||e.stringify};if("function"===typeof e.value){var r=e.label||e.value.name||"",i={label:r,default:n};return{label:r,value:function(t){var r=e.value(t,i);return null===r||void 0===r?n:r},stringify:void 0===e.stringify||e.stringify}}}throw new Error("Invalid field info option. "+JSON.stringify(e))}))}},{key:"getHeader",value:function(){var e=this;return Xn(this.opts.fields.map((function(t){return e.processValue(t.label,!0)})),this.opts.delimiter)}},{key:"memoizePreprocessRow",value:function(){return this.opts.unwind&&this.opts.unwind.length?this.opts.flatten?function(e){var t=this;return this.unwindData(e,this.opts.unwind).map((function(e){return t.flatten(e,t.opts.flattenSeparator)}))}:function(e){return this.unwindData(e,this.opts.unwind)}:this.opts.flatten?function(e){return[this.flatten(e,this.opts.flattenSeparator)]}:function(e){return[e]}}},{key:"preprocessRow",value:function(){}},{key:"processRow",value:function(e){var t=this;if(e){var n=this.opts.fields.map((function(n){return t.processCell(e,n)}));if(this.opts.includeEmptyRows||!n.every((function(e){return void 0===e})))return Xn(n,this.opts.delimiter)}}},{key:"processCell",value:function(e,t){return this.processValue(t.value(e),t.stringify)}},{key:"processValue",value:function(e,t){if(null!==e&&void 0!==e){var n=Vt(e);if("boolean"!==n&&"number"!==n&&"string"!==n){if(void 0===(e=JSON.stringify(e)))return;'"'===e[0]&&(e=e.replace(/^"(.+)"$/,"$1"))}return"string"===typeof e&&(e.includes(this.opts.quote)&&(e=e.replace(new RegExp(this.opts.quote,"g"),this.opts.doubleQuote)),e=t?"".concat(this.opts.quote).concat(e).concat(this.opts.quote):e.replace(new RegExp("^".concat(this.opts.doubleQuote)),this.opts.quote).replace(new RegExp("".concat(this.opts.doubleQuote,"$")),this.opts.quote),this.opts.excelStrings&&(e='"="'.concat(e,'""'))),e}}},{key:"flatten",value:function(e,t){return function e(n,r,i){return Object.keys(n).forEach((function(a){var o=n[a],s=i?"".concat(i).concat(t).concat(a):a;"object"===Vt(o)&&null!==o&&!Array.isArray(o)&&"[object Function]"!==Object.prototype.toString.call(o.toJSON)&&Object.keys(o).length?e(o,r,s):r[s]=o})),r}(e,{})}},{key:"unwindData",value:function(e,t){var n=this;return t.reduce((function(e,t){return e.map((function(e){var r=Jn(e,t);return Array.isArray(r)?r.length?r.map((function(r,i){var a=n.opts.unwindBlank&&i>0?{}:e;return Vn(a,t,r)})):Vn(e,t,void 0):e})).reduce(Zn,[])}),[e])}}]),e}(),er=zn,tr=Kn,nr=function(e){function t(e){var n;return Xt(this,t),(n=rn(this,tn(t).call(this,e))).opts.fields&&(n.opts.fields=n.preprocessFieldsInfo(n.opts.fields)),n}return en(t,e),$t(t,[{key:"parse",value:function(e){var t=this.preprocessData(e);this.opts.fields||(this.opts.fields=t.reduce((function(e,t){return Object.keys(t).forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),this.opts.fields=this.preprocessFieldsInfo(this.opts.fields));var n=this.opts.header?this.getHeader():"",r=this.processData(t);return(this.opts.withBOM?"\ufeff":"")+n+(n&&r?this.opts.eol:"")+r}},{key:"preprocessData",value:function(e){var t=this,n=Array.isArray(e)?e:[e];if(!this.opts.fields&&(0===n.length||"object"!==Vt(n[0])))throw new Error('Data should not be empty or the "fields" option should be included');return this.opts.unwind&&this.opts.unwind.length||this.opts.flatten?n.map((function(e){return t.preprocessRow(e)})).reduce(tr,[]):n}},{key:"processData",value:function(e){var t=this;return er(e.map((function(e){return t.processRow(e)})).filter((function(e){return e})),this.opts.eol)}}]),t}($n),rr={},ir=rr.LEFT_BRACE=1,ar=rr.RIGHT_BRACE=2,or=rr.LEFT_BRACKET=3,sr=rr.RIGHT_BRACKET=4,ur=rr.COLON=5,Ar=rr.COMMA=6,cr=rr.TRUE=7,lr=rr.FALSE=8,fr=rr.NULL=9,hr=rr.STRING=10,gr=rr.NUMBER=11,dr=rr.START=17,pr=rr.STOP=18,vr=rr.TRUE1=33,yr=rr.TRUE2=34,mr=rr.TRUE3=35,Ir=rr.FALSE1=49,br=rr.FALSE2=50,Er=rr.FALSE3=51,Cr=rr.FALSE4=52,Br=rr.NULL1=65,wr=rr.NULL2=66,Qr=rr.NULL3=67,kr=rr.NUMBER1=81,_r=rr.NUMBER3=83,xr=rr.STRING1=97,Sr=rr.STRING2=98,Or=rr.STRING3=99,Dr=rr.STRING4=100,Rr=rr.STRING5=101,jr=rr.STRING6=102,Mr=rr.VALUE=113,Nr=rr.KEY=114,Fr=rr.OBJECT=129,Tr=rr.ARRAY=130,Lr="\\".charCodeAt(0),Pr="/".charCodeAt(0),Ur="\b".charCodeAt(0),Gr="\f".charCodeAt(0),qr="\n".charCodeAt(0),Hr="\r".charCodeAt(0),Yr="\t".charCodeAt(0);function Jr(){this.tState=dr,this.value=void 0,this.string=void 0,this.stringBuffer=_.alloc?_.alloc(65536):new _(65536),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=Mr,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new _(2),3:new _(3),4:new _(4)},this.offset=-1}Jr.toknam=function(e){for(var t=Object.keys(rr),n=0,r=t.length;n<r;n++){var i=t[n];if(rr[i]===e)return i}return e&&"0x"+e.toString(16)};var zr=Jr.prototype;zr.onError=function(e){throw e},zr.charError=function(e,t){this.tState=pr,this.onError(new Error("Unexpected "+JSON.stringify(String.fromCharCode(e[t]))+" at position "+t+" in state "+Jr.toknam(this.tState)))},zr.appendStringChar=function(e){this.stringBufferOffset>=65536&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=e},zr.appendStringBuf=function(e,t,n){var r=e.length;"number"===typeof t&&(r="number"===typeof n?n<0?e.length-t+n:n-t:e.length-t),r<0&&(r=0),this.stringBufferOffset+r>65536&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),e.copy(this.stringBuffer,this.stringBufferOffset,t,n),this.stringBufferOffset+=r},zr.write=function(e){var t;"string"===typeof e&&(e=new _(e));for(var n=0,r=e.length;n<r;n++)if(this.tState===dr){if(t=e[n],this.offset++,123===t)this.onToken(ir,"{");else if(125===t)this.onToken(ar,"}");else if(91===t)this.onToken(or,"[");else if(93===t)this.onToken(sr,"]");else if(58===t)this.onToken(ur,":");else if(44===t)this.onToken(Ar,",");else if(116===t)this.tState=vr;else if(102===t)this.tState=Ir;else if(110===t)this.tState=Br;else if(34===t)this.string="",this.stringBufferOffset=0,this.tState=xr;else if(45===t)this.string="-",this.tState=kr;else if(t>=48&&t<64)this.string=String.fromCharCode(t),this.tState=_r;else if(32!==t&&9!==t&&10!==t&&13!==t)return this.charError(e,n)}else if(this.tState===xr)if(t=e[n],this.bytes_remaining>0){for(var i=0;i<this.bytes_remaining;i++)this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence-this.bytes_remaining+i]=e[i];this.appendStringBuf(this.temp_buffs[this.bytes_in_sequence]),this.bytes_in_sequence=this.bytes_remaining=0,n=n+i-1}else if(0===this.bytes_remaining&&t>=128){if(t<=193||t>244)return this.onError(new Error("Invalid UTF-8 character at position "+n+" in state "+Jr.toknam(this.tState)));if(t>=194&&t<=223&&(this.bytes_in_sequence=2),t>=224&&t<=239&&(this.bytes_in_sequence=3),t>=240&&t<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+n>e.length){for(var a=0;a<=e.length-1-n;a++)this.temp_buffs[this.bytes_in_sequence][a]=e[n+a];this.bytes_remaining=n+this.bytes_in_sequence-e.length,n=e.length-1}else this.appendStringBuf(e,n,n+this.bytes_in_sequence),n=n+this.bytes_in_sequence-1}else if(34===t)this.tState=dr,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(hr,this.string),this.offset+=_.byteLength(this.string,"utf8")+1,this.string=void 0;else if(92===t)this.tState=Sr;else{if(!(t>=32))return this.charError(e,n);this.appendStringChar(t)}else if(this.tState===Sr)if(34===(t=e[n]))this.appendStringChar(t),this.tState=xr;else if(92===t)this.appendStringChar(Lr),this.tState=xr;else if(47===t)this.appendStringChar(Pr),this.tState=xr;else if(98===t)this.appendStringChar(Ur),this.tState=xr;else if(102===t)this.appendStringChar(Gr),this.tState=xr;else if(110===t)this.appendStringChar(qr),this.tState=xr;else if(114===t)this.appendStringChar(Hr),this.tState=xr;else if(116===t)this.appendStringChar(Yr),this.tState=xr;else{if(117!==t)return this.charError(e,n);this.unicode="",this.tState=Or}else if(this.tState===Or||this.tState===Dr||this.tState===Rr||this.tState===jr){if(!((t=e[n])>=48&&t<64||t>64&&t<=70||t>96&&t<=102))return this.charError(e,n);if(this.unicode+=String.fromCharCode(t),this.tState++===jr){var o=parseInt(this.unicode,16);this.unicode=void 0,void 0!==this.highSurrogate&&o>=56320&&o<57344?(this.appendStringBuf(new _(String.fromCharCode(this.highSurrogate,o))),this.highSurrogate=void 0):void 0===this.highSurrogate&&o>=55296&&o<56320?this.highSurrogate=o:(void 0!==this.highSurrogate&&(this.appendStringBuf(new _(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new _(String.fromCharCode(o)))),this.tState=xr}}else if(this.tState===kr||this.tState===_r)switch(t=e[n]){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 46:case 101:case 69:case 43:case 45:this.string+=String.fromCharCode(t),this.tState=_r;break;default:this.tState=dr;var s=Number(this.string);if(isNaN(s))return this.charError(e,n);this.string.match(/[0-9]+/)==this.string&&s.toString()!=this.string?this.onToken(hr,this.string):this.onToken(gr,s),this.offset+=this.string.length-1,this.string=void 0,n--}else if(this.tState===vr){if(114!==e[n])return this.charError(e,n);this.tState=yr}else if(this.tState===yr){if(117!==e[n])return this.charError(e,n);this.tState=mr}else if(this.tState===mr){if(101!==e[n])return this.charError(e,n);this.tState=dr,this.onToken(cr,!0),this.offset+=3}else if(this.tState===Ir){if(97!==e[n])return this.charError(e,n);this.tState=br}else if(this.tState===br){if(108!==e[n])return this.charError(e,n);this.tState=Er}else if(this.tState===Er){if(115!==e[n])return this.charError(e,n);this.tState=Cr}else if(this.tState===Cr){if(101!==e[n])return this.charError(e,n);this.tState=dr,this.onToken(lr,!1),this.offset+=4}else if(this.tState===Br){if(117!==e[n])return this.charError(e,n);this.tState=wr}else if(this.tState===wr){if(108!==e[n])return this.charError(e,n);this.tState=Qr}else if(this.tState===Qr){if(108!==e[n])return this.charError(e,n);this.tState=dr,this.onToken(fr,null),this.offset+=3}},zr.onToken=function(e,t){},zr.parseError=function(e,t){this.tState=pr,this.onError(new Error("Unexpected "+Jr.toknam(e)+(t?"("+JSON.stringify(t)+")":"")+" in state "+Jr.toknam(this.state)))},zr.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},zr.pop=function(){var e=this.value,t=this.stack.pop();this.value=t.value,this.key=t.key,this.mode=t.mode,this.emit(e),this.mode||(this.state=Mr)},zr.emit=function(e){this.mode&&(this.state=Ar),this.onValue(e)},zr.onValue=function(e){},zr.onToken=function(e,t){if(this.state===Mr)if(e===hr||e===gr||e===cr||e===lr||e===fr)this.value&&(this.value[this.key]=t),this.emit(t);else if(e===ir)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=Nr,this.mode=Fr;else if(e===or)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=Tr,this.state=Mr;else if(e===ar){if(this.mode!==Fr)return this.parseError(e,t);this.pop()}else{if(e!==sr)return this.parseError(e,t);if(this.mode!==Tr)return this.parseError(e,t);this.pop()}else if(this.state===Nr)if(e===hr)this.key=t,this.state=ur;else{if(e!==ar)return this.parseError(e,t);this.pop()}else if(this.state===ur){if(e!==ur)return this.parseError(e,t);this.state=Mr}else{if(this.state!==Ar)return this.parseError(e,t);if(e===Ar)this.mode===Tr?(this.key++,this.state=Mr):this.mode===Fr&&(this.state=Nr);else{if(!(e===sr&&this.mode===Tr||e===ar&&this.mode===Fr))return this.parseError(e,t);this.pop()}}},Jr.C=rr;var Kr=Jr,Wr=function(e){function t(e,n){var r;return Xt(this,t),r=rn(this,tn(t).call(this,n)),Object.getOwnPropertyNames($n.prototype).forEach((function(e){return r[e]=$n.prototype[e]})),r.opts=r.preprocessOpts(e),r.preprocessRow=r.memoizePreprocessRow(),r._data="",r._hasWritten=!1,r._readableState.objectMode?r.initObjectModeParse():r.opts.ndjson?r.initNDJSONParse():r.initJSONParser(),r.opts.withBOM&&r.push("\ufeff"),r.opts.fields&&(r.opts.fields=r.preprocessFieldsInfo(r.opts.fields),r.pushHeader()),r}return en(t,e),$t(t,[{key:"initObjectModeParse",value:function(){var e=this;this.parser={write:function(t){e.pushLine(t)},getPendingData:function(){}}}},{key:"initNDJSONParse",value:function(){var e=this;this.parser={_data:"",write:function(t){this._data+=t.toString();var n=this._data.split("\n").map((function(e){return e.trim()})).filter((function(e){return""!==e})),r=!1;n.forEach((function(t,i){try{e.pushLine(JSON.parse(t))}catch(a){i===n.length-1?r=!0:(a.message="Invalid JSON ("+t+")",e.emit("error",a))}})),this._data=r?this._data.slice(this._data.lastIndexOf("\n")):""},getPendingData:function(){return this._data}}}},{key:"initJSONParser",value:function(){var e=this;this.parser=new Kr,this.parser.onValue=function(t){this.stack.length===this.depthToEmit&&e.pushLine(t)},this.parser._onToken=this.parser.onToken,this.parser.onToken=function(t,n){e.parser._onToken(t,n),0!==this.stack.length||e.opts.fields||this.mode===Kr.C.ARRAY||this.mode===Kr.C.OBJECT||this.onError(new Error('Data should not be empty or the "fields" option should be included')),1===this.stack.length&&(void 0===this.depthToEmit&&(this.depthToEmit=this.mode===Kr.C.ARRAY?1:0),0!==this.depthToEmit&&1===this.stack.length&&(this.value=void 0))},this.parser.getPendingData=function(){return this.value},this.parser.onError=function(t){t.message.includes("Unexpected")&&(t.message="Invalid JSON ("+t.message+")"),e.emit("error",t)}}},{key:"_transform",value:function(e,t,n){this.parser.write(e),n()}},{key:"_flush",value:function(e){this.parser.getPendingData()&&e(new Error("Invalid data received from stdin",this.parser.getPendingData())),e()}},{key:"pushHeader",value:function(){if(this.opts.header){var e=this.getHeader();this.emit("header",e),this.push(e),this._hasWritten=!0}}},{key:"pushLine",value:function(e){var t=this,n=this.preprocessRow(e);this._hasWritten||(this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(Object.keys(n[0])),this.pushHeader()),n.forEach((function(e){var n=t.processRow(e,t.opts);void 0!==n&&(t.emit("line",n),t.push(t._hasWritten?t.opts.eol+n:n),t._hasWritten=!0)}))}}]),t}(Wt.Transform),Vr=Wt.Transform,Xr=zn,Zr=function(){function e(t,n){Xt(this,e),this.input=new Vr(n),this.input._read=function(){},this.transform=new Wr(t,n),this.processor=this.input.pipe(this.transform)}return $t(e,[{key:"fromInput",value:function(e){if(this._input)throw new Error("Async parser already has an input.");return this._input=e,this.input=this._input.pipe(this.processor),this}},{key:"throughTransform",value:function(e){if(this._output)throw new Error("Can't add transforms once an output has been added.");return this.processor=this.processor.pipe(e),this}},{key:"toOutput",value:function(e){if(this._output)throw new Error("Async parser already has an output.");return this._output=e,this.processor=this.processor.pipe(e),this}},{key:"promise",value:function(){var e=this;return new Promise((function(t,n){var r=[];e.processor.on("data",(function(e){return r.push(e.toString())})).on("finish",(function(){return t(Xr(r,""))})).on("error",(function(e){return n(e)}))}))}}]),e}(),$r=Wt.Readable,ei=nr,ti=Zr,ni=Wr,ri=function(e,t){return new nr(t).parse(e)},ii=function(e,t,n){try{e instanceof $r||(n=Object.assign({},n,{objectMode:!0}));var r=new Zr(t,n),i=r.promise();return Array.isArray(e)?(e.forEach((function(e){return r.input.push(e)})),r.input.push(null)):e instanceof $r?r.fromInput(e):(r.input.push(e),r.input.push(null)),i}catch(a){return Promise.reject(a)}},ai={Parser:ei,AsyncParser:ti,Transform:ni,parse:ri,parseAsync:ii};t.default=ai,t.Parser=ei,t.AsyncParser=ti,t.Transform=ni,t.parse=ri,t.parseAsync=ii,Object.defineProperty(t,"__esModule",{value:!0})})(t)}).call(this,n(70))},function(e,t,n){var r=n(1008),i=n(830),a=n(1131),o=n(831),s=i((function(e){return a(r(e,1,o,!0))}));e.exports=s},function(e,t,n){var r=n(1138),i=n(1008),a=n(830),o=n(831),s=a((function(e,t){return o(e)?r(e,i(t,1,o,!0)):[]}));e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomPicker=t.TwitterPicker=t.SwatchesPicker=t.SliderPicker=t.SketchPicker=t.PhotoshopPicker=t.MaterialPicker=t.HuePicker=t.GithubPicker=t.CompactPicker=t.ChromePicker=t.default=t.CirclePicker=t.BlockPicker=t.AlphaPicker=void 0;var r=n(1179);Object.defineProperty(t,"AlphaPicker",{enumerable:!0,get:function(){return y(r).default}});var i=n(1245);Object.defineProperty(t,"BlockPicker",{enumerable:!0,get:function(){return y(i).default}});var a=n(1247);Object.defineProperty(t,"CirclePicker",{enumerable:!0,get:function(){return y(a).default}});var o=n(1249);Object.defineProperty(t,"ChromePicker",{enumerable:!0,get:function(){return y(o).default}});var s=n(1254);Object.defineProperty(t,"CompactPicker",{enumerable:!0,get:function(){return y(s).default}});var u=n(1257);Object.defineProperty(t,"GithubPicker",{enumerable:!0,get:function(){return y(u).default}});var A=n(1259);Object.defineProperty(t,"HuePicker",{enumerable:!0,get:function(){return y(A).default}});var c=n(1261);Object.defineProperty(t,"MaterialPicker",{enumerable:!0,get:function(){return y(c).default}});var l=n(1262);Object.defineProperty(t,"PhotoshopPicker",{enumerable:!0,get:function(){return y(l).default}});var f=n(1268);Object.defineProperty(t,"SketchPicker",{enumerable:!0,get:function(){return y(f).default}});var h=n(1271);Object.defineProperty(t,"SliderPicker",{enumerable:!0,get:function(){return y(h).default}});var g=n(1275);Object.defineProperty(t,"SwatchesPicker",{enumerable:!0,get:function(){return y(g).default}});var d=n(1279);Object.defineProperty(t,"TwitterPicker",{enumerable:!0,get:function(){return y(d).default}});var p=n(1047);Object.defineProperty(t,"CustomPicker",{enumerable:!0,get:function(){return y(p).default}});var v=y(o);function y(e){return e&&e.__esModule?e:{default:e}}t.default=v.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r){function i(t){var r=new a.default(t);n.call(e,r)}if(e.addEventListener){var o=function(){var n=!1;return"object"===typeof r?n=r.capture||!1:"boolean"===typeof r&&(n=r),e.addEventListener(t,i,r||!1),{v:{remove:function(){e.removeEventListener(t,i,n)}}}}();if("object"===typeof o)return o.v}else if(e.attachEvent)return e.attachEvent("on"+t,i),{remove:function(){e.detachEvent("on"+t,i)}}};var r,i=n(1280),a=(r=i)&&r.__esModule?r:{default:r};e.exports=t.default},function(e,t,n){"use strict";(function(e){var n=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),r="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,i="undefined"!==typeof e&&e.Math===Math?e:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")(),a="function"===typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var o=["top","right","bottom","left","width","height","size","weight"],s="undefined"!==typeof MutationObserver,u=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function o(){n&&(n=!1,e()),r&&u()}function s(){a(o)}function u(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);i=e}return u}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;o.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),A=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},c=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},l=v(0,0,0,0);function f(e){return parseFloat(e)||0}function h(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+f(e["border-"+n+"-width"])}),0)}function g(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return l;var r=c(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],a=e["padding-"+i];t[i]=f(a)}return t}(r),a=i.left+i.right,o=i.top+i.bottom,s=f(r.width),u=f(r.height);if("border-box"===r.boxSizing&&(Math.round(s+a)!==t&&(s-=h(r,"left","right")+a),Math.round(u+o)!==n&&(u-=h(r,"top","bottom")+o)),!function(e){return e===c(e).document.documentElement}(e)){var A=Math.round(s+a)-t,g=Math.round(u+o)-n;1!==Math.abs(A)&&(s-=A),1!==Math.abs(g)&&(u-=g)}return v(i.left,i.top,s,u)}var d="undefined"!==typeof SVGGraphicsElement?function(e){return e instanceof c(e).SVGGraphicsElement}:function(e){return e instanceof c(e).SVGElement&&"function"===typeof e.getBBox};function p(e){return r?d(e)?function(e){var t=e.getBBox();return v(0,0,t.width,t.height)}(e):g(e):l}function v(e,t,n,r){return{x:e,y:t,width:n,height:r}}var y=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=p(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),m=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,a="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,o=Object.create(a.prototype);return A(o,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),o}(t);A(this,{target:e,contentRect:n})},I=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!==typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new y(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new m(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),b="undefined"!==typeof WeakMap?new WeakMap:new n,E=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new I(t,n,this);b.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){E.prototype[e]=function(){var t;return(t=b.get(this))[e].apply(t,arguments)}}));var C="undefined"!==typeof i.ResizeObserver?i.ResizeObserver:E;t.a=C}).call(this,n(70))},function(e,t,n){"use strict";var r=n(108);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),a=(0,r(n(182)).default)(i.default.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"}),"Lens");t.default=a},function(e,t,n){"use strict";var r=n(108);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),a=(0,r(n(182)).default)(i.default.createElement("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert");t.default=a},function(e,t,n){"use strict";var r=n(108);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(0)),a=(0,r(n(182)).default)(i.default.createElement("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");t.default=a},function(e){e.exports=JSON.parse('{"name":"vega-tooltip","version":"0.23.0","description":"A tooltip plugin for Vega-Lite and Vega visualizations.","main":"build/vega-tooltip.js","module":"build/src/index.js","unpkg":"build/vega-tooltip.min.js","jsdelivr":"build/vega-tooltip.min.js","typings":"build/src/index.d.ts","repository":{"type":"git","url":"https://github.com/vega/vega-tooltip.git"},"keywords":["vega-lite","vega","tooltip"],"author":{"name":"UW Interactive Data Lab","url":"https://idl.cs.washington.edu"},"collaborators":["Dominik Moritz","Sira Horradarn","Zening Qu","Kanit Wongsuphasawat","Yuri Astrakhan","Jeffrey Heer"],"license":"BSD-3-Clause","bugs":{"url":"https://github.com/vega/vega-tooltip/issues"},"homepage":"https://github.com/vega/vega-tooltip#readme","scripts":{"prepare":"beemo create-config --silent","tsc:src":"tsc -b tsconfig.src.json","build":"yarn tsc:src && rollup -c","clean":"rm -rf build examples/data && rm -f src/style.ts","copy:data":"rsync -r node_modules/vega-datasets/data/* examples/data","copy:build":"rsync -r build/* examples/build","deploy:gh":"yarn build && yarn copy:build && gh-pages -d examples && yarn clean","prettierbase":"beemo prettier \'examples/*.{html,scss,css}\'","eslintbase":"beemo eslint .","format":"yarn eslintbase --fix && yarn prettierbase --write","lint":"yarn eslintbase && yarn prettierbase --check","postbuild":"terser build/vega-tooltip.js -c -m -o build/vega-tooltip.min.js","prebuild":"mkdir -p build && yarn copy:data && ./build-style.sh","prepublishOnly":"yarn clean && yarn build","preversion":"yarn lint","start":"yarn build && concurrently --kill-others -n Server,Typescript,Rollup \'browser-sync start -s -f build examples --serveStatic examples\' \'yarn tsc:src -w\' \'rollup -c -w\'","pretest":"./build-style.sh","test":"jest"},"devDependencies":{"@rollup/plugin-commonjs":"11.1.0","@rollup/plugin-json":"^4.0.3","@rollup/plugin-node-resolve":"^7.1.3","@types/jest":"^25.2.1","browser-sync":"^2.26.7","concurrently":"^5.2.0","gh-pages":"^2.2.0","jest":"^26.0.1","node-sass":"^4.14.1","path":"^0.12.7","rollup":"^2.8.2","terser":"^4.6.13","ts-jest":"^25.5.0","typescript":"^3.8.3","vega-datasets":"^1.30.2","vega-lite-dev-config":"^0.10.0","vega-typings":"^0.16.0"},"dependencies":{"vega-util":"^1.13.2"},"beemo":{"module":"vega-lite-dev-config","drivers":["prettier","eslint"]},"jest":{"testURL":"http://localhost/","transform":{"^.+\\\\.tsx?$":"ts-jest"},"testRegex":"(/__tests__/.*|(\\\\.|/)(test|spec))\\\\.(jsx?|tsx?)$","moduleFileExtensions":["ts","tsx","js","jsx","json","node"],"testPathIgnorePatterns":["node_modules","<rootDir>/build","src"]}}')},function(e){e.exports=JSON.parse('{"name":"vega-lite","author":"Dominik Moritz, Kanit \\"Ham\\" Wongsuphasawat, Arvind Satyanarayan, Jeffrey Heer","version":"4.13.0","collaborators":["Kanit Wongsuphasawat (http://kanitw.yellowpigz.com)","Dominik Moritz (https://www.domoritz.de)","Arvind Satyanarayan (https://arvindsatya.com)","Jeffrey Heer (https://jheer.org)"],"homepage":"https://vega.github.io/vega-lite/","description":"Vega-Lite is a concise high-level language for interactive visualization.","main":"build/vega-lite.js","unpkg":"build/vega-lite.min.js","jsdelivr":"build/vega-lite.min.js","module":"build/src/index","types":"build/src/index.d.ts","bin":{"vl2png":"./bin/vl2png","vl2svg":"./bin/vl2svg","vl2pdf":"./bin/vl2pdf","vl2vg":"./bin/vl2vg"},"directories":{"test":"test"},"scripts":{"changelog":"conventional-changelog -p angular -r 2","build":"yarn build:only","build:only":"yarn tsc:src && rollup -c","postbuild":"terser build/vega-lite.js -cm --source-map content=build/vega-lite.js.map,filename=build/vega-lite.min.js.map -o build/vega-lite.min.js && yarn schema && babel build/vega-lite.js --out-dir build-es5 --config-file ./babel.config.js","prebuild:examples":"yarn build:only","build:examples":"yarn data && TZ=America/Los_Angeles scripts/build-examples.sh","prebuild:examples-full":"yarn build:only","build:examples-full":"TZ=America/Los_Angeles scripts/build-examples.sh 1","build:example":"TZ=America/Los_Angeles scripts/build-example.sh","build:toc":"yarn build:jekyll && scripts/generate-toc","build:site":"yarn tsc:site && rollup -c site/rollup.config.js","build:jekyll":"pushd site && bundle exec jekyll build -q && popd","build:versions":"scripts/update-version.sh","clean":"find build ! -name \'vega-lite-schema.json\' -type f -delete && rm -rf site/data/* && rm -f examples/compiled/*.png && find site/examples ! -name \'index.md\' ! -name \'data\' -type f -delete","predeploy:site":"yarn presite","deploy:site":"gh-pages -d site","data":"rsync -r node_modules/vega-datasets/data/* site/data","schema":"mkdir -p build && ts-json-schema-generator -f tsconfig.json -p src/index.ts -t TopLevelSpec --no-type-check --no-ref-encode > build/vega-lite-schema.json && yarn renameschema && cp build/vega-lite-schema.json site/_data/","renameschema":"scripts/rename-schema.sh","presite":"yarn data && yarn schema && yarn build:site && yarn build:versions && scripts/create-example-pages.sh","site":"pushd site && bundle exec jekyll serve -I -l && popd","tsc:src":"tsc -b src/tsconfig.src.json","tsc:site":"tsc -b site/tsconfig.site.json","prettierbase":"prettier \'**/*.{md,css,yml}\'","eslintbase":"eslint .","format":"yarn eslintbase --fix && yarn prettierbase --write","lint":"yarn eslintbase && yarn prettierbase --check","test":"jest test/ && yarn lint && yarn schema && jest examples/ && yarn test:runtime","test:inspect":"node --inspect-brk ./node_modules/.bin/jest --runInBand test","test:runtime":"TZ=America/Los_Angeles jest test-runtime/","test:runtime:generate":"yarn build:only && rm -Rf test-runtime/resources && VL_GENERATE_TESTS=true yarn test:runtime","watch:build":"yarn build:only && concurrently --kill-others -n Typescript,Rollup \'yarn tsc:src -w\' \'rollup -c -w\'","watch:site":"concurrently --kill-others -n Typescript,Rollup \'yarn tsc:site -w\' \'rollup -c site/rollup.config.js -w\'","watch:test":"jest --watch"},"repository":{"type":"git","url":"https://github.com/vega/vega-lite.git"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/vega/vega-lite/issues"},"devDependencies":{"@babel/cli":"^7.10.1","@babel/core":"^7.10.1","@babel/preset-env":"^7.10.1","@rollup/plugin-commonjs":"12.0.0","@rollup/plugin-json":"^4.0.3","@rollup/plugin-node-resolve":"^8.0.0","@types/chai":"^4.2.11","@types/d3":"^5.7.2","@types/jest":"^25.2.3","@types/mkdirp":"^1.0.0","@types/puppeteer":"^3.0.0","@typescript-eslint/eslint-plugin":"^3.0.2","@typescript-eslint/parser":"^3.0.2","ajv":"^6.12.2","chai":"^4.2.0","cheerio":"^1.0.0-rc.3","codecov":"^3.7.0","concurrently":"^5.2.0","conventional-changelog-cli":"^2.0.34","d3":"^5.16.0","eslint":"^7.1.0","eslint-config-prettier":"^6.11.0","eslint-plugin-jest":"^23.13.2","eslint-plugin-prettier":"^3.1.3","gh-pages":"^2.2.0","highlight.js":"^10.0.3","http-server":"^0.12.3","jest":"^26.0.1","jest-puppeteer":"^4.4.0","mkdirp":"^1.0.4","prettier":"^2.0.5","puppeteer":"^3.1.0","rollup":"^2.11.0","rollup-plugin-sourcemaps":"^0.6.2","rollup-plugin-terser":"^6.1.0","svg2png-many":"^0.0.7","terser":"^4.7.0","ts-jest":"^26.0.0","ts-json-schema-generator":"^0.68.1","typescript":"~3.9.3","vega-cli":"^5.12.1","vega-datasets":"^1.30.2","vega-embed":"^6.8.0","vega-tooltip":"^0.23.0","vega-typings":"^0.17.0","yaml-front-matter":"^4.1.0"},"dependencies":{"@types/clone":"~0.1.30","@types/fast-json-stable-stringify":"^2.0.0","array-flat-polyfill":"^1.0.1","clone":"~2.1.2","fast-deep-equal":"~3.1.1","fast-json-stable-stringify":"~2.1.0","json-stringify-pretty-compact":"~2.0.0","tslib":"~2.0.0","vega-event-selector":"~2.0.3","vega-expression":"~2.6.5","vega-util":"~1.14.0","yargs":"~15.3.1"},"peerDependencies":{"vega":"^5.12.1"},"jest":{"preset":"jest-puppeteer","transform":{"^.+\\\\.tsx?$":"ts-jest"},"testRegex":"(/__tests__/.*|(\\\\.|/)(test|spec))\\\\.(jsx?|tsx?)$","moduleFileExtensions":["ts","tsx","js","jsx","json","node"],"testPathIgnorePatterns":["<rootDir>/node_modules","<rootDir>/build","<rootDir>/_site","<rootDir>/src"],"coverageDirectory":"./coverage/","collectCoverage":false}}')},function(e,t,n){(function(t){var n=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var n,r,i;try{n=Map}catch(u){n=function(){}}try{r=Set}catch(u){r=function(){}}try{i=Promise}catch(u){i=function(){}}function a(o,u,A,c,l){"object"===typeof u&&(A=u.depth,c=u.prototype,l=u.includeNonEnumerable,u=u.circular);var f=[],h=[],g="undefined"!=typeof t;return"undefined"==typeof u&&(u=!0),"undefined"==typeof A&&(A=1/0),function o(A,d){if(null===A)return null;if(0===d)return A;var p,v;if("object"!=typeof A)return A;if(e(A,n))p=new n;else if(e(A,r))p=new r;else if(e(A,i))p=new i((function(e,t){A.then((function(t){e(o(t,d-1))}),(function(e){t(o(e,d-1))}))}));else if(a.__isArray(A))p=[];else if(a.__isRegExp(A))p=new RegExp(A.source,s(A)),A.lastIndex&&(p.lastIndex=A.lastIndex);else if(a.__isDate(A))p=new Date(A.getTime());else{if(g&&t.isBuffer(A))return p=t.allocUnsafe?t.allocUnsafe(A.length):new t(A.length),A.copy(p),p;e(A,Error)?p=Object.create(A):"undefined"==typeof c?(v=Object.getPrototypeOf(A),p=Object.create(v)):(p=Object.create(c),v=c)}if(u){var y=f.indexOf(A);if(-1!=y)return h[y];f.push(A),h.push(p)}for(var m in e(A,n)&&A.forEach((function(e,t){var n=o(t,d-1),r=o(e,d-1);p.set(n,r)})),e(A,r)&&A.forEach((function(e){var t=o(e,d-1);p.add(t)})),A){var I;v&&(I=Object.getOwnPropertyDescriptor(v,m)),I&&null==I.set||(p[m]=o(A[m],d-1))}if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(A);for(m=0;m<b.length;m++){var E=b[m];(!(B=Object.getOwnPropertyDescriptor(A,E))||B.enumerable||l)&&(p[E]=o(A[E],d-1),B.enumerable||Object.defineProperty(p,E,{enumerable:!1}))}}if(l){var C=Object.getOwnPropertyNames(A);for(m=0;m<C.length;m++){var B,w=C[m];(B=Object.getOwnPropertyDescriptor(A,w))&&B.enumerable||(p[w]=o(A[w],d-1),Object.defineProperty(p,w,{enumerable:!1}))}}return p}(o,A)}function o(e){return Object.prototype.toString.call(e)}function s(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return a.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},a.__objToStr=o,a.__isDate=function(e){return"object"===typeof e&&"[object Date]"===o(e)},a.__isArray=function(e){return"object"===typeof e&&"[object Array]"===o(e)},a.__isRegExp=function(e){return"object"===typeof e&&"[object RegExp]"===o(e)},a.__getRegExpFlags=s,a}();e.exports&&(e.exports=n)}).call(this,n(198).Buffer)},function(e){e.exports=JSON.parse('{"name":"vega-themes","version":"2.8.3","description":"Themes for stylized Vega and Vega-Lite visualizations.","keywords":["vega","vega-lite","themes","style"],"license":"BSD-3-Clause","author":{"name":"UW Interactive Data Lab","url":"https://idl.cs.washington.edu"},"contributors":[{"name":"Emily Gu","url":"https://github.com/emilygu"},{"name":"Arvind Satyanarayan","url":"http://arvindsatya.com"},{"name":"Jeffrey Heer","url":"https://idl.cs.washington.edu"},{"name":"Dominik Moritz","url":"https://www.domoritz.de"}],"main":"build/vega-themes.js","module":"build/src/index.js","unpkg":"build/vega-themes.min.js","jsdelivr":"build/vega-themes.min.js","typings":"build/src/index.d.ts","repository":{"type":"git","url":"https://github.com/vega/vega-themes.git"},"scripts":{"prepare":"beemo create-config --silent","clean":"rm -rf build examples/build","prettierbase":"beemo prettier \'examples/*.{html,scss,css}\'","eslintbase":"beemo eslint \'src/**/*.ts\'","format":"yarn eslintbase --fix && yarn prettierbase --write","lint":"yarn eslintbase && yarn prettierbase --check","prebuild":"mkdir -p build","build":"tsc && rollup -c","postbuild":"terser build/vega-themes.js -cm > build/vega-themes.min.js","deploy:gh":"yarn build && mkdir -p examples/build && rsync -r build/* examples/build && gh-pages -d examples","prepublishOnly":"yarn clean && yarn build","preversion":"yarn lint","serve":"browser-sync start -s -f build examples --serveStatic examples","start":"yarn build && concurrently --kill-others -n Server,Typescript,Rollup \'yarn serve\' \'tsc -w\' \'rollup -c -w\'"},"devDependencies":{"@rollup/plugin-json":"^4.0.2","browser-sync":"^2.26.7","concurrently":"^5.1.0","gh-pages":"^2.2.0","rollup":"^2.1.0","terser":"^4.6.7","typescript":"^3.8.3","vega":"^5.10.0","vega-lite":"^4.8.1","vega-lite-dev-config":"^0.5.0"},"peerDependencies":{"vega":"*","vega-lite":"*"},"beemo":{"module":"vega-lite-dev-config","drivers":["prettier","eslint"]}}')},function(e,t,n){"use strict";var r=n(16),i=n(33),a=n(18),o=n(23),s=n(0),u=(n(28),n(37)),A=n(48),c=n(358),l=n(87),f=n(237),h=n(107),g=n(92),d=n(68),p=n(73),v=n(370);var y=Object(A.a)((function(e){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:Object(a.a)({zIndex:1},e.typography.body2,{fontSize:e.typography.pxToRem(12),lineHeight:1.2,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),top:-34,transformOrigin:"bottom center",transform:"scale(0)",position:"absolute"}),circle:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:"currentColor",transform:"rotate(-45deg)"},label:{color:e.palette.primary.contrastText,transform:"rotate(45deg)"}}}),{name:"PrivateValueLabel"})((function(e){var t=e.children,n=e.classes,r=e.className,i=e.open,a=e.value,o=e.valueLabelDisplay;return"off"===o?t:s.cloneElement(t,{className:Object(u.a)(t.props.className,(i||"on"===o)&&n.open,n.thumb)},s.createElement("span",{className:Object(u.a)(n.offset,r)},s.createElement("span",{className:n.circle},s.createElement("span",{className:n.label},a))))}));function m(e,t){return e-t}function I(e,t,n){return Math.min(Math.max(t,e),n)}function b(e,t){return e.reduce((function(e,n,r){var i=Math.abs(t-n);return null===e||i<e.distance||i===e.distance?{distance:i,index:r}:e}),null).index}function E(e,t){if(void 0!==t.current&&e.changedTouches){for(var n=0;n<e.changedTouches.length;n+=1){var r=e.changedTouches[n];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function C(e,t,n){return 100*(e-t)/(n-t)}function B(e,t,n){var r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(function(e){if(Math.abs(e)<1){var t=e.toExponential().split("e-"),n=t[0].split(".")[1];return(n?n.length:0)+parseInt(t[1],10)}var r=e.toString().split(".")[1];return r?r.length:0}(t)))}function w(e){var t=e.values,n=e.source,r=e.newValue,i=e.index;if(t[i]===r)return n;var a=Object(o.a)(t);return a[i]=r,a}function Q(e){var t=e.sliderRef,n=e.activeIndex,r=e.setActive;t.current.contains(document.activeElement)&&Number(document.activeElement.getAttribute("data-index"))===n||t.current.querySelector('[data-index="'.concat(n,'"]')).focus(),r&&r(n)}var k={horizontal:{offset:function(e){return{left:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},"horizontal-reverse":{offset:function(e){return{right:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},vertical:{offset:function(e){return{bottom:"".concat(e,"%")}},leap:function(e){return{height:"".concat(e,"%")}}}},_=function(e){return e},x=s.forwardRef((function(e,t){var n=e["aria-label"],A=e["aria-labelledby"],l=e["aria-valuetext"],x=e.classes,S=e.className,O=e.color,D=void 0===O?"primary":O,R=e.component,j=void 0===R?"span":R,M=e.defaultValue,N=e.disabled,F=void 0!==N&&N,T=e.getAriaLabel,L=e.getAriaValueText,P=e.marks,U=void 0!==P&&P,G=e.max,q=void 0===G?100:G,H=e.min,Y=void 0===H?0:H,J=e.name,z=e.onChange,K=e.onChangeCommitted,W=e.onMouseDown,V=e.orientation,X=void 0===V?"horizontal":V,Z=e.scale,$=void 0===Z?_:Z,ee=e.step,te=void 0===ee?1:ee,ne=e.ThumbComponent,re=void 0===ne?"span":ne,ie=e.track,ae=void 0===ie?"normal":ie,oe=e.value,se=e.ValueLabelComponent,ue=void 0===se?y:se,Ae=e.valueLabelDisplay,ce=void 0===Ae?"off":Ae,le=e.valueLabelFormat,fe=void 0===le?_:le,he=Object(i.a)(e,["aria-label","aria-labelledby","aria-valuetext","classes","className","color","component","defaultValue","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","onMouseDown","orientation","scale","step","ThumbComponent","track","value","ValueLabelComponent","valueLabelDisplay","valueLabelFormat"]),ge=Object(c.a)(),de=s.useRef(),pe=s.useState(-1),ve=pe[0],ye=pe[1],me=s.useState(-1),Ie=me[0],be=me[1],Ee=Object(v.a)({controlled:oe,default:M,name:"Slider"}),Ce=Object(r.a)(Ee,2),Be=Ce[0],we=Ce[1],Qe=Array.isArray(Be),ke=s.useRef(),_e=Qe?Object(o.a)(Be).sort(m):[Be];_e=_e.map((function(e){return I(e,Y,q)}));var xe=!0===U&&null!==te?Object(o.a)(Array(Math.floor((q-Y)/te)+1)).map((function(e,t){return{value:Y+te*t}})):U||[];ke.current={source:Be};var Se=Object(f.a)(),Oe=Se.isFocusVisible,De=Se.onBlurVisible,Re=Se.ref,je=s.useState(-1),Me=je[0],Ne=je[1],Fe=s.useRef(),Te=Object(d.a)(Re,Fe),Le=Object(d.a)(t,Te),Pe=Object(g.a)((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));Oe(e)&&Ne(t),be(t)})),Ue=Object(g.a)((function(){-1!==Me&&(Ne(-1),De()),be(-1)})),Ge=Object(g.a)((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));be(t)})),qe=Object(g.a)((function(){be(-1)})),He=Object(g.a)((function(e){var t,n=Number(e.currentTarget.getAttribute("data-index")),r=_e[n],i=(q-Y)/10,a=xe.map((function(e){return e.value})),o=a.indexOf(r);switch(e.key){case"Home":t=Y;break;case"End":t=q;break;case"PageUp":te&&(t=r+i);break;case"PageDown":te&&(t=r-i);break;case"ArrowRight":case"ArrowUp":t=te?r+te:a[o+1]||a[a.length-1];break;case"ArrowLeft":case"ArrowDown":t=te?r-te:a[o-1]||a[0];break;default:return}if(e.preventDefault(),te&&(t=B(t,te,Y)),t=I(t,Y,q),Qe){var s=t;t=w({values:_e,source:Be,newValue:t,index:n}).sort(m),Q({sliderRef:Fe,activeIndex:t.indexOf(s)})}we(t),Ne(n),z&&z(e,t),K&&K(e,t)})),Ye=s.useRef(),Je=X;"rtl"===ge.direction&&"vertical"!==X&&(Je+="-reverse");var ze=function(e){var t,n,r=e.finger,i=e.move,a=void 0!==i&&i,o=e.values,s=e.source,u=Fe.current.getBoundingClientRect(),A=u.width,c=u.height,l=u.bottom,f=u.left;if(t=0===Je.indexOf("vertical")?(l-r.y)/c:(r.x-f)/A,-1!==Je.indexOf("-reverse")&&(t=1-t),n=function(e,t,n){return(n-t)*e+t}(t,Y,q),te)n=B(n,te,Y);else{var h=xe.map((function(e){return e.value}));n=h[b(h,n)]}n=I(n,Y,q);var g=0;if(Qe){var d=n;g=(n=w({values:o,source:s,newValue:n,index:g=a?Ye.current:b(o,n)}).sort(m)).indexOf(d),Ye.current=g}return{newValue:n,activeIndex:g}},Ke=Object(g.a)((function(e){var t=E(e,de);if(t){var n=ze({finger:t,move:!0,values:_e,source:Be}),r=n.newValue,i=n.activeIndex;Q({sliderRef:Fe,activeIndex:i,setActive:ye}),we(r),z&&z(e,r)}})),We=Object(g.a)((function(e){var t=E(e,de);if(t){var n=ze({finger:t,values:_e,source:Be}).newValue;ye(-1),"touchend"===e.type&&be(-1),K&&K(e,n),de.current=void 0;var r=Object(h.a)(Fe.current);r.removeEventListener("mousemove",Ke),r.removeEventListener("mouseup",We),r.removeEventListener("touchmove",Ke),r.removeEventListener("touchend",We)}})),Ve=Object(g.a)((function(e){e.preventDefault();var t=e.changedTouches[0];null!=t&&(de.current=t.identifier);var n=E(e,de),r=ze({finger:n,values:_e,source:Be}),i=r.newValue,a=r.activeIndex;Q({sliderRef:Fe,activeIndex:a,setActive:ye}),we(i),z&&z(e,i);var o=Object(h.a)(Fe.current);o.addEventListener("touchmove",Ke),o.addEventListener("touchend",We)}));s.useEffect((function(){var e=Fe.current;e.addEventListener("touchstart",Ve);var t=Object(h.a)(e);return function(){e.removeEventListener("touchstart",Ve),t.removeEventListener("mousemove",Ke),t.removeEventListener("mouseup",We),t.removeEventListener("touchmove",Ke),t.removeEventListener("touchend",We)}}),[We,Ke,Ve]);var Xe=Object(g.a)((function(e){W&&W(e),e.preventDefault();var t=E(e,de),n=ze({finger:t,values:_e,source:Be}),r=n.newValue,i=n.activeIndex;Q({sliderRef:Fe,activeIndex:i,setActive:ye}),we(r),z&&z(e,r);var a=Object(h.a)(Fe.current);a.addEventListener("mousemove",Ke),a.addEventListener("mouseup",We)})),Ze=C(Qe?_e[0]:Y,Y,q),$e=C(_e[_e.length-1],Y,q)-Ze,et=Object(a.a)({},k[Je].offset(Ze),{},k[Je].leap($e));return s.createElement(j,Object(a.a)({ref:Le,className:Object(u.a)(x.root,x["color".concat(Object(p.a)(D))],S,F&&x.disabled,xe.length>0&&xe.some((function(e){return e.label}))&&x.marked,!1===ae&&x.trackFalse,"vertical"===X&&x.vertical,"inverted"===ae&&x.trackInverted),onMouseDown:Xe},he),s.createElement("span",{className:x.rail}),s.createElement("span",{className:x.track,style:et}),s.createElement("input",{value:_e.join(","),name:J,type:"hidden"}),xe.map((function(e){var t,n=C(e.value,Y,q),r=k[Je].offset(n);return t=!1===ae?-1!==_e.indexOf(e.value):"normal"===ae&&(Qe?e.value>=_e[0]&&e.value<=_e[_e.length-1]:e.value<=_e[0])||"inverted"===ae&&(Qe?e.value<=_e[0]||e.value>=_e[_e.length-1]:e.value>=_e[0]),s.createElement(s.Fragment,{key:e.value},s.createElement("span",{style:r,className:Object(u.a)(x.mark,t&&x.markActive)}),s.createElement("span",{"aria-hidden":!0,style:r,className:Object(u.a)(x.markLabel,t&&x.markLabelActive)},e.label))})),_e.map((function(e,t){var r=C(e,Y,q),i=k[Je].offset(r);return s.createElement(ue,{key:t,valueLabelFormat:fe,valueLabelDisplay:ce,className:x.valueLabel,value:"function"===typeof fe?fe($(e),t):fe,index:t,open:Ie===t||ve===t||"on"===ce,disabled:F},s.createElement(re,{className:Object(u.a)(x.thumb,x["thumbColor".concat(Object(p.a)(D))],ve===t&&x.active,F&&x.disabled,Me===t&&x.focusVisible),tabIndex:F?null:0,role:"slider",style:i,"data-index":t,"aria-label":T?T(t):n,"aria-labelledby":A,"aria-orientation":X,"aria-valuemax":$(q),"aria-valuemin":$(Y),"aria-valuenow":$(e),"aria-valuetext":L?L($(e),t):l,onKeyDown:He,onFocus:Pe,onBlur:Ue,onMouseOver:Ge,onMouseLeave:qe}))})))}));t.a=Object(A.a)((function(e){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"13px 0",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:e.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{pointerEvents:"none",cursor:"default",color:e.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 13px"},"@media (pointer: coarse)":{padding:"20px 0","&$vertical":{padding:"0 20px"}}},colorPrimary:{},colorSecondary:{color:e.palette.secondary.main},marked:{marginBottom:20,"&$vertical":{marginBottom:"auto",marginRight:20}},vertical:{},disabled:{},rail:{display:"block",position:"absolute",width:"100%",height:2,borderRadius:1,backgroundColor:"currentColor",opacity:.38,"$vertical &":{height:"100%",width:2}},track:{display:"block",position:"absolute",height:2,borderRadius:1,backgroundColor:"currentColor","$vertical &":{width:2}},trackFalse:{"& $track":{display:"none"}},trackInverted:{"& $track":{backgroundColor:"light"===e.palette.type?Object(l.d)(e.palette.primary.main,.62):Object(l.a)(e.palette.primary.main,.5)},"& $rail":{opacity:1}},thumb:{position:"absolute",width:12,height:12,marginLeft:-6,marginTop:-5,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow"],{duration:e.transitions.duration.shortest}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",left:-15,top:-15,right:-15,bottom:-15},"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(Object(l.b)(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Object(l.b)(e.palette.primary.main,.16))},"&$disabled":{width:8,height:8,marginLeft:-4,marginTop:-3,"&:hover":{boxShadow:"none"}},"$vertical &":{marginLeft:-5,marginBottom:-6},"$vertical &$disabled":{marginLeft:-3,marginBottom:-4}},thumbColorPrimary:{},thumbColorSecondary:{"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(Object(l.b)(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Object(l.b)(e.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:e.palette.background.paper,opacity:.8},markLabel:Object(a.a)({},e.typography.body2,{color:e.palette.text.secondary,position:"absolute",top:26,transform:"translateX(-50%)",whiteSpace:"nowrap","$vertical &":{top:"auto",left:26,transform:"translateY(50%)"},"@media (pointer: coarse)":{top:40,"$vertical &":{left:31}}}),markLabelActive:{color:e.palette.text.primary}}}),{name:"MuiSlider"})(x)},,function(e,t,n){"use strict";n.r(t);var r=n(898);n.d(t,"HeatmapSubscriber",(function(){return r.a}));var i=n(801);n.d(t,"Heatmap",(function(){return i.a}))},function(e,t,n){"use strict";n.r(t);var r=n(899);n.d(t,"SpatialSubscriber",(function(){return r.a}));var i=n(800);n.d(t,"Spatial",(function(){return i.a}))},function(e,t,n){"use strict";n.r(t);var r=n(897);n.d(t,"ScatterplotSubscriber",(function(){return r.a}));var i=n(802);n.d(t,"Scatterplot",(function(){return i.a}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findInArray=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},t.isFunction=function(e){return"function"===typeof e||"[object Function]"===Object.prototype.toString.call(e)},t.isNum=function(e){return"number"===typeof e&&!isNaN(e)},t.int=function(e){return parseInt(e,10)},t.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))}},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/hubmapconsortium/vitessce/#raster","title":"Vitessce image data","type":"object","definitions":{"transform":{"type":"object","additionalProperties":false,"required":["scale","translate"],"properties":{"scale":{"type":"number"},"translate":{"type":"object","additionalProperties":false,"required":["y","x"],"properties":{"y":{"type":"number"},"x":{"type":"number"}}}}},"dimensions":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["field","type","values"],"properties":{"field":{"type":"string"},"type":{"type":"string","enum":["quantitative","nominal","ordinal","temporal"]},"values":{"type":["array","null"],"items":{"type":"string"}}}}},"metadata":{"type":"object","additionalProperties":false,"oneOf":[{"required":["dimensions","isPyramid","transform"]},{"required":["omeTiffOffsetsUrl"]}],"properties":{"dimensions":{"$ref":"#/definitions/dimensions"},"isPyramid":{"type":"boolean"},"transform":{"$ref":"#/definitions/transform"},"omeTiffOffsetsUrl":{"type":"string","format":"uri"}}},"requestInit":{"type":"object","additionalProperties":false,"required":[],"properties":{"method":{"type":"string"},"headers":{"type":"object"},"body":{"type":"string"},"mode":{"type":"string"},"credentials":{"type":"string"},"cache":{"type":"string"},"redirect":{"type":"string"},"referrer":{"type":"string"},"integrity":{"type":"string"}}},"image":{"type":"object","additionalProperties":false,"required":["name","url","type"],"properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"},"type":{"type":"string"},"metadata":{"$ref":"#/definitions/metadata"},"requestInit":{"$ref":"#/definitions/requestInit"}}}},"additionalProperties":false,"required":["schemaVersion","images"],"properties":{"schemaVersion":{"type":"string"},"renderLayers":{"type":"array","items":{"type":"string"}},"images":{"type":"array","items":{"$ref":"#/definitions/image"}}}}')},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/hubmapconsortium/vitessce/#dataset","title":"Vitessce data set","type":"object","definitions":{"components":{"description":"The layout array defines the views, or components, rendered in the grid.","type":"array","items":{"type":"object","additionalProperties":false,"required":["component","x","y"],"properties":{"component":{"type":"string","description":"Specify a component using a name defined in the component registry."},"props":{"type":"object","description":"Extra prop values for the component."},"x":{"type":"integer"},"y":{"type":"integer"},"w":{"type":"integer"},"h":{"type":"integer"},"coordinationScopes":{"type":"object","description":"Component-level coordination scope mappings define which coordination object values a particular component can read and write, for each coordination type.","additionalProperties":false,"required":[],"properties":{"dataset":{"type":"string"},"embeddingType":{"type":"string"},"embeddingZoom":{"type":"string"},"embeddingRotation":{"type":"string"},"embeddingTargetX":{"type":"string"},"embeddingTargetY":{"type":"string"},"embeddingTargetZ":{"type":"string"},"embeddingCellSetPolygonsVisible":{"type":"string"},"embeddingCellSetLabelsVisible":{"type":"string"},"embeddingCellSetLabelSize":{"type":"string"},"embeddingCellRadius":{"type":"string"},"spatialZoom":{"type":"string"},"spatialRotation":{"type":"string"},"spatialTargetX":{"type":"string"},"spatialTargetY":{"type":"string"},"spatialTargetZ":{"type":"string"},"heatmapZoomX":{"type":"string"},"heatmapZoomY":{"type":"string"},"heatmapTargetX":{"type":"string"},"heatmapTargetY":{"type":"string"},"cellFilter":{"type":"string"},"cellHighlight":{"type":"string"},"cellSetSelection":{"type":"string"},"cellSetHighlight":{"type":"string"},"cellSetColor":{"type":"string"},"geneFilter":{"type":"string"},"geneHighlight":{"type":"string"},"geneSelection":{"type":"string"},"geneExpressionColormap":{"type":"string"},"geneExpressionColormapRange":{"type":"string"},"cellColorEncoding":{"type":"string"},"spatialLayers":{"type":"string"},"genomicZoomX":{"type":"string"},"genomicZoomY":{"type":"string"},"genomicTargetX":{"type":"string"},"genomicTargetY":{"type":"string"},"additionalCellSets":{"type":"string"},"moleculeHighlight":{"type":"string"}}}}}},"annDataCellSets":{"type":"array","description":"Array of cell set configuration, following closely the conventions of the tabular schema","items":{"type":"object","additionalProperties":false,"required":["group_name","set_name"],"properties":{"group_name":{"type":"string","description":"The display name for the set, like \'Cell Type\' or \'Louvain.\'"},"set_name":{"type":"string","description":"The location in the AnnData store for the set, like \'obs/louvain\' or \'obs/celltype.\'"}}}},"annDataCells":{"type":"object","description":"The properties of this object are the configuration for how to layout scatterplots and spatial information","minProperties":1,"additionalProperties":false,"required":[],"properties":{"xy":{"type":"string","description":"The location in the AnnData store of cell centroids, like \'obsm/X_centroids.\'"},"poly":{"type":"string","description":"The location in the AnnData store of cell polygon outlines, like \'obsm/X_polygons.\'"},"factors":{"type":"array","description":"List of locations in the AnnData store of cell sets, like \'obs/louvain\'","items":{"type":"string"}},"mappings":{"patternProperties":{".":{"type":"object","description":"An object containing key-values for mappings like { UMAP: { key: \'obsm/X_umap\', dims: [0, 1] } }.","additionalProperties":false,"required":["key"],"properties":{"key":{"type":"string","description":"Where to look in the AnnData store for this mapping, like \'obsm/X_umap.\'"},"dims":{"type":"array","description":"Which indices of the obsm object to take for a scatterplot, allowing for, for example, different PCs from obsm/X_pca","minItems":2,"maxItems":2,"items":{"type":"number"}}}}}}}},"annDataExpressionMatrix":{"type":"object","description":"The properties of this object are the configuration for how to fetch the cell x genes matrix","additionalProperties":false,"required":["matrix"],"properties":{"matrix":{"type":"string","description":"The location in the AnnData store of the cell x gene matrix, like \'obsm/hvg_subset.\' or \'X\'"},"geneFilter":{"type":"string","description":"The location in the AnnData store of a filter for the genes if using a subset of the data, like \'vae.highly_variable.\' if the matrix comes from \'obsm/hvg_subset.\'"}}},"requestInit":{"type":"object","description":"The properties of this object correspond to the parameters of the JavaScript fetch() function.","additionalProperties":false,"required":[],"properties":{"method":{"type":"string"},"headers":{"type":"object"},"body":{"type":"string"},"mode":{"type":"string"},"credentials":{"type":"string"},"cache":{"type":"string"},"redirect":{"type":"string"},"referrer":{"type":"string"},"integrity":{"type":"string"}}},"rasterLayer":{"description":"The properties of this object are the rendering settings for the raster layer.","additionalProperties":false,"required":["channels","colormap","index","opacity","type"],"properties":{"channels":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["selection"],"properties":{"color":{"type":"array","items":{"type":"number"},"description":"The color to use when rendering this channel under the null colormap."},"selection":{"type":"object","description":"Determines the channel selection, e.g. some Z and time slice."},"slider":{"type":"array","items":{"type":"number"},"description":"Determines the range for color mapping."},"visible":{"type":"boolean","description":"Determines whether this channel of the layer will be rendered in the spatial component."}}}},"colormap":{"oneOf":[{"type":"string","description":"The name of the colormap to use for this layer."},{"type":"null","description":"Use the solid color definitions."}]},"index":{"type":"number","description":"The index of the layer among the array of layers available in the image file."},"opacity":{"type":"number"},"domainType":{"type":"string","enum":["Full","Min/Max"],"description":"Determines the extent of the channel slider input element in the layer controller."},"type":{"type":"string","enum":["raster"]}}},"moleculesLayer":{"description":"The properties of this object are the rendering settings for the molecules layer.","additionalProperties":false,"required":["visible","radius","opacity","type"],"properties":{"visible":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"},"type":{"type":"string","enum":["molecules"]}}},"cellsLayer":{"description":"The properties of this object are the rendering settings for the cells layer.","additionalProperties":false,"required":["visible","stroked","radius","opacity","type"],"properties":{"visible":{"type":"boolean"},"stroked":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"},"type":{"type":"string","enum":["cells"]}}},"neighborhoodsLayer":{"description":"The properties of this object are the rendering settings for the neighborhoods layer.","additionalProperties":false,"required":["visible","type"],"properties":{"visible":{"type":"boolean"},"type":{"type":"string","enum":["neighborhoods"]}}},"spatialLayers":{"type":"array","description":"Array of Spatial Layers","items":{"oneOf":[{"$ref":"#/definitions/rasterLayer"},{"$ref":"#/definitions/cellsLayer"},{"$ref":"#/definitions/moleculesLayer"},{"$ref":"#/definitions/neighborhoodsLayer"}]}}},"additionalProperties":false,"required":["version","name","datasets","layout","initStrategy"],"properties":{"name":{"type":"string"},"public":{"type":"boolean"},"description":{"type":"string"},"datasets":{"type":"array","description":"The datasets array defines groups of files, where the files within each dataset reference the same entities (cells, genes, cell sets, etc).","items":{"type":"object","additionalProperties":false,"required":["uid","files"],"properties":{"uid":{"type":"string"},"name":{"type":"string"},"files":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["type","fileType","url"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"fileType":{"type":"string"},"url":{"type":"string"},"options":{"oneOf":[{"$ref":"#/definitions/annDataCellSets"},{"$ref":"#/definitions/annDataCells"},{"$ref":"#/definitions/annDataExpressionMatrix"}]},"requestInit":{"$ref":"#/definitions/requestInit"}}}}}}},"coordinationSpace":{"type":"object","description":"The coordination space stores the values for each scope of each coordination object.","additionalProperties":false,"required":[],"properties":{"dataset":{"type":"object","patternProperties":{".":{"type":"string"}}},"embeddingZoom":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingTargetX":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingTargetY":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingTargetZ":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingType":{"type":"object","patternProperties":{".":{"type":"string"}}},"embeddingCellSetPolygonsVisible":{"type":"object","patternProperties":{".":{"type":"boolean"}}},"embeddingCellSetLabelsVisible":{"type":"object","patternProperties":{".":{"type":"boolean"}}},"embeddingCellSetLabelSize":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingCellRadius":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialZoom":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialTargetX":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialTargetY":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialTargetZ":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialLayers":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/spatialLayers"}]}}},"heatmapZoomX":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapZoomY":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapTargetX":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapTargetY":{"type":"object","patternProperties":{".":{"type":"number"}}},"cellFilter":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cells will be filtered out initially."},{"type":"array","items":{"type":"string"}}]}}},"cellHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell will be highlighted initially."},{"type":"string"}]}}},"cellSetSelection":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto cell set initialization is enabled, cell set selections will be automatically initialized."},{"type":"array"}]}}},"cellSetHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell sets will be highlighted initially."},{"type":"string"}]}}},"cellSetColor":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, cell set colors will be automatically initialized."},{"type":"array","items":{"type":"object","additionalProperties":false,"required":["path","color"],"properties":{"path":{"type":"array","items":{"type":"string"}},"color":{"type":"array","items":{"type":"number"}}}}}]}}},"cellColorEncoding":{"type":"object","patternProperties":{".":{"type":"string"}}},"geneFilter":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no genes will be filtered out initially."},{"type":"array","items":{"type":"string"}}]}}},"geneHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no genes will be highlighted initially."},{"type":"string"}]}}},"geneSelection":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null"},{"type":"array","items":{"type":"string"}}]}}},"geneExpressionColormap":{"type":"object","patternProperties":{".":{"type":"string"}}},"geneExpressionColormapRange":{"type":"object","patternProperties":{".":{"type":"array","items":{"type":"number"}}}},"genomicZoomX":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicZoomY":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicTargetX":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicTargetY":{"type":"object","patternProperties":{".":{"type":"number"}}},"additionalCellSets":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell will be highlighted initially."},{"$ref":"https://github.com/hubmapconsortium/vitessce/#cell-sets"}]}}},"moleculeHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no molecule will be highlighted initially."},{"type":"string"}]}}}}},"layout":{"$ref":"#/definitions/components"},"initStrategy":{"type":"string","enum":["none","auto"],"description":"The initialization strategy determines how missing coordination objects and coordination scope mappings are initially filled in."},"version":{"type":"string","enum":["1.0.0"],"description":"The schema version for the view config."}}}')},function(e,t,n){"use strict";var r=n(18),i=n(33),a=n(0),o=(n(28),n(37)),s=n(16),u=n(370),A=n(375),c=n(48),l=n(862),f=a.forwardRef((function(e,t){var n=e.autoFocus,c=e.checked,f=e.checkedIcon,h=e.classes,g=e.className,d=e.defaultChecked,p=e.disabled,v=e.icon,y=e.id,m=e.inputProps,I=e.inputRef,b=e.name,E=e.onBlur,C=e.onChange,B=e.onFocus,w=e.readOnly,Q=e.required,k=e.tabIndex,_=e.type,x=e.value,S=Object(i.a)(e,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),O=Object(u.a)({controlled:c,default:Boolean(d),name:"SwitchBase"}),D=Object(s.a)(O,2),R=D[0],j=D[1],M=Object(A.a)(),N=p;M&&"undefined"===typeof N&&(N=M.disabled);var F="checkbox"===_||"radio"===_;return a.createElement(l.a,Object(r.a)({component:"span",className:Object(o.a)(h.root,g,R&&h.checked,N&&h.disabled),disabled:N,tabIndex:null,role:void 0,onFocus:function(e){B&&B(e),M&&M.onFocus&&M.onFocus(e)},onBlur:function(e){E&&E(e),M&&M.onBlur&&M.onBlur(e)},ref:t},S),a.createElement("input",Object(r.a)({autoFocus:n,checked:c,defaultChecked:d,className:h.input,disabled:N,id:F&&y,name:b,onChange:function(e){var t=e.target.checked;j(t),C&&C(e,t)},readOnly:w,ref:I,required:Q,tabIndex:k,type:_,value:x},m)),R?f:v)})),h=Object(c.a)({root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},{name:"PrivateSwitchBase"})(f),g=n(374),d=Object(g.a)(a.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),p=Object(g.a)(a.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),v=n(87),y=Object(g.a)(a.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox"),m=n(73),I=a.createElement(p,null),b=a.createElement(d,null),E=a.createElement(y,null),C=a.forwardRef((function(e,t){var n=e.checkedIcon,s=void 0===n?I:n,u=e.classes,A=e.color,c=void 0===A?"secondary":A,l=e.icon,f=void 0===l?b:l,g=e.indeterminate,d=void 0!==g&&g,p=e.indeterminateIcon,v=void 0===p?E:p,y=e.inputProps,C=e.size,B=void 0===C?"medium":C,w=Object(i.a)(e,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]);return a.createElement(h,Object(r.a)({type:"checkbox",classes:{root:Object(o.a)(u.root,u["color".concat(Object(m.a)(c))],d&&u.indeterminate),checked:u.checked,disabled:u.disabled},color:c,inputProps:Object(r.a)({"data-indeterminate":d},y),icon:a.cloneElement(d?v:f,{fontSize:"small"===B?"small":"default"}),checkedIcon:a.cloneElement(d?v:s,{fontSize:"small"===B?"small":"default"}),ref:t},w))}));t.a=Object(c.a)((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(v.b)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(v.b)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiCheckbox"})(C)},function(e){e.exports=JSON.parse('{"note":"This file is regenerated by push-demo.sh.","branch":"ilan-gold/v1.1.1","date":"2020-12-27","hash":"8d167fc"}')},,,,,,,,,function(e,t,n){"use strict";var r=window.URL||window.webkitURL;e.exports=function(e,t){try{try{var n;try{(n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(e),n=n.getBlob()}catch(i){n=new Blob([e])}return new Worker(r.createObjectURL(n))}catch(i){return new Worker("data:application/javascript,"+encodeURIComponent(e))}}catch(i){if(!t)throw Error("Inline worker is not supported");return new Worker(t)}}},function(e,t,n){(function(e,n){var r="[object Arguments]",i="[object Map]",a="[object Object]",o="[object Set]",s=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,A={};A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A[r]=A["[object Array]"]=A["[object ArrayBuffer]"]=A["[object Boolean]"]=A["[object DataView]"]=A["[object Date]"]=A["[object Error]"]=A["[object Function]"]=A[i]=A["[object Number]"]=A[a]=A["[object RegExp]"]=A[o]=A["[object String]"]=A["[object WeakMap]"]=!1;var c="object"==typeof e&&e&&e.Object===Object&&e,l="object"==typeof self&&self&&self.Object===Object&&self,f=c||l||Function("return this")(),h=t&&!t.nodeType&&t,g=h&&"object"==typeof n&&n&&!n.nodeType&&n,d=g&&g.exports===h,p=d&&c.process,v=function(){try{return p&&p.binding&&p.binding("util")}catch(e){}}(),y=v&&v.isTypedArray;function m(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function I(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function b(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var E,C,B=Array.prototype,w=Function.prototype,Q=Object.prototype,k=f["__core-js_shared__"],_=w.toString,x=Q.hasOwnProperty,S=function(){var e=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),O=Q.toString,D=RegExp("^"+_.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=d?f.Buffer:void 0,j=f.Symbol,M=f.Uint8Array,N=Q.propertyIsEnumerable,F=B.splice,T=j?j.toStringTag:void 0,L=Object.getOwnPropertySymbols,P=R?R.isBuffer:void 0,U=(E=Object.keys,C=Object,function(e){return E(C(e))}),G=pe(f,"DataView"),q=pe(f,"Map"),H=pe(f,"Promise"),Y=pe(f,"Set"),J=pe(f,"WeakMap"),z=pe(Object,"create"),K=Ie(G),W=Ie(q),V=Ie(H),X=Ie(Y),Z=Ie(J),$=j?j.prototype:void 0,ee=$?$.valueOf:void 0;function te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function re(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ie(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new re;++t<n;)this.add(e[t])}function ae(e){var t=this.__data__=new ne(e);this.size=t.size}function oe(e,t){var n=Ce(e),r=!n&&Ee(e),i=!n&&!r&&Be(e),a=!n&&!r&&!i&&xe(e),o=n||r||i||a,s=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=s.length;for(var A in e)!t&&!x.call(e,A)||o&&("length"==A||i&&("offset"==A||"parent"==A)||a&&("buffer"==A||"byteLength"==A||"byteOffset"==A)||me(A,u))||s.push(A);return s}function se(e,t){for(var n=e.length;n--;)if(be(e[n][0],t))return n;return-1}function ue(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":T&&T in Object(e)?function(e){var t=x.call(e,T),n=e[T];try{e[T]=void 0;var r=!0}catch(a){}var i=O.call(e);r&&(t?e[T]=n:delete e[T]);return i}(e):function(e){return O.call(e)}(e)}function Ae(e){return _e(e)&&ue(e)==r}function ce(e,t,n,s,u){return e===t||(null==e||null==t||!_e(e)&&!_e(t)?e!==e&&t!==t:function(e,t,n,s,u,A){var c=Ce(e),l=Ce(t),f=c?"[object Array]":ye(e),h=l?"[object Array]":ye(t),g=(f=f==r?a:f)==a,d=(h=h==r?a:h)==a,p=f==h;if(p&&Be(e)){if(!Be(t))return!1;c=!0,g=!1}if(p&&!g)return A||(A=new ae),c||xe(e)?he(e,t,n,s,u,A):function(e,t,n,r,a,s,u){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!s(new M(e),new M(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return be(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case i:var A=I;case o:var c=1&r;if(A||(A=b),e.size!=t.size&&!c)return!1;var l=u.get(e);if(l)return l==t;r|=2,u.set(e,t);var f=he(A(e),A(t),r,a,s,u);return u.delete(e),f;case"[object Symbol]":if(ee)return ee.call(e)==ee.call(t)}return!1}(e,t,f,n,s,u,A);if(!(1&n)){var v=g&&x.call(e,"__wrapped__"),y=d&&x.call(t,"__wrapped__");if(v||y){var m=v?e.value():e,E=y?t.value():t;return A||(A=new ae),u(m,E,n,s,A)}}if(!p)return!1;return A||(A=new ae),function(e,t,n,r,i,a){var o=1&n,s=ge(e),u=s.length,A=ge(t).length;if(u!=A&&!o)return!1;var c=u;for(;c--;){var l=s[c];if(!(o?l in t:x.call(t,l)))return!1}var f=a.get(e);if(f&&a.get(t))return f==t;var h=!0;a.set(e,t),a.set(t,e);var g=o;for(;++c<u;){l=s[c];var d=e[l],p=t[l];if(r)var v=o?r(p,d,l,t,e,a):r(d,p,l,e,t,a);if(!(void 0===v?d===p||i(d,p,n,r,a):v)){h=!1;break}g||(g="constructor"==l)}if(h&&!g){var y=e.constructor,m=t.constructor;y==m||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof m&&m instanceof m||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,s,u,A)}(e,t,n,s,ce,u))}function le(e){return!(!ke(e)||function(e){return!!S&&S in e}(e))&&(we(e)?D:s).test(Ie(e))}function fe(e){if(!function(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||Q;return e===n}(e))return U(e);var t=[];for(var n in Object(e))x.call(e,n)&&"constructor"!=n&&t.push(n);return t}function he(e,t,n,r,i,a){var o=1&n,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var A=a.get(e);if(A&&a.get(t))return A==t;var c=-1,l=!0,f=2&n?new ie:void 0;for(a.set(e,t),a.set(t,e);++c<s;){var h=e[c],g=t[c];if(r)var d=o?r(g,h,c,t,e,a):r(h,g,c,e,t,a);if(void 0!==d){if(d)continue;l=!1;break}if(f){if(!m(t,(function(e,t){if(o=t,!f.has(o)&&(h===e||i(h,e,n,r,a)))return f.push(t);var o}))){l=!1;break}}else if(h!==g&&!i(h,g,n,r,a)){l=!1;break}}return a.delete(e),a.delete(t),l}function ge(e){return function(e,t,n){var r=t(e);return Ce(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Se,ve)}function de(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function pe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return le(n)?n:void 0}te.prototype.clear=function(){this.__data__=z?z(null):{},this.size=0},te.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},te.prototype.get=function(e){var t=this.__data__;if(z){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return x.call(t,e)?t[e]:void 0},te.prototype.has=function(e){var t=this.__data__;return z?void 0!==t[e]:x.call(t,e)},te.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=z&&void 0===t?"__lodash_hash_undefined__":t,this},ne.prototype.clear=function(){this.__data__=[],this.size=0},ne.prototype.delete=function(e){var t=this.__data__,n=se(t,e);return!(n<0)&&(n==t.length-1?t.pop():F.call(t,n,1),--this.size,!0)},ne.prototype.get=function(e){var t=this.__data__,n=se(t,e);return n<0?void 0:t[n][1]},ne.prototype.has=function(e){return se(this.__data__,e)>-1},ne.prototype.set=function(e,t){var n=this.__data__,r=se(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},re.prototype.clear=function(){this.size=0,this.__data__={hash:new te,map:new(q||ne),string:new te}},re.prototype.delete=function(e){var t=de(this,e).delete(e);return this.size-=t?1:0,t},re.prototype.get=function(e){return de(this,e).get(e)},re.prototype.has=function(e){return de(this,e).has(e)},re.prototype.set=function(e,t){var n=de(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ie.prototype.add=ie.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ie.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.clear=function(){this.__data__=new ne,this.size=0},ae.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ae.prototype.get=function(e){return this.__data__.get(e)},ae.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ne){var r=n.__data__;if(!q||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new re(r)}return n.set(e,t),this.size=n.size,this};var ve=L?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}(L(e),(function(t){return N.call(e,t)})))}:function(){return[]},ye=ue;function me(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||u.test(e))&&e>-1&&e%1==0&&e<t}function Ie(e){if(null!=e){try{return _.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function be(e,t){return e===t||e!==e&&t!==t}(G&&"[object DataView]"!=ye(new G(new ArrayBuffer(1)))||q&&ye(new q)!=i||H&&"[object Promise]"!=ye(H.resolve())||Y&&ye(new Y)!=o||J&&"[object WeakMap]"!=ye(new J))&&(ye=function(e){var t=ue(e),n=t==a?e.constructor:void 0,r=n?Ie(n):"";if(r)switch(r){case K:return"[object DataView]";case W:return i;case V:return"[object Promise]";case X:return o;case Z:return"[object WeakMap]"}return t});var Ee=Ae(function(){return arguments}())?Ae:function(e){return _e(e)&&x.call(e,"callee")&&!N.call(e,"callee")},Ce=Array.isArray;var Be=P||function(){return!1};function we(e){if(!ke(e))return!1;var t=ue(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function ke(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function _e(e){return null!=e&&"object"==typeof e}var xe=y?function(e){return function(t){return e(t)}}(y):function(e){return _e(e)&&Qe(e.length)&&!!A[ue(e)]};function Se(e){return null!=(t=e)&&Qe(t.length)&&!we(t)?oe(e):fe(e);var t}n.exports=function(e,t){return ce(e,t)}}).call(this,n(70),n(264)(e))},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.matchesSelector=l,t.matchesSelectorAndParentsTo=function(e,t,n){var r=e;do{if(l(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},t.addEvent=function(e,t,n,r){if(!e)return;var i=u({capture:!0},r);e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},t.removeEvent=function(e,t,n,r){if(!e)return;var i=u({capture:!0},r);e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},t.outerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,i.int)(n.borderTopWidth),t+=(0,i.int)(n.borderBottomWidth)},t.outerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,i.int)(n.borderLeftWidth),t+=(0,i.int)(n.borderRightWidth)},t.innerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,i.int)(n.paddingTop),t-=(0,i.int)(n.paddingBottom)},t.innerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,i.int)(n.paddingLeft),t-=(0,i.int)(n.paddingRight)},t.offsetXYFromParent=function(e,t,n){var r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),i=(e.clientX+t.scrollLeft-r.left)/n,a=(e.clientY+t.scrollTop-r.top)/n;return{x:i,y:a}},t.createCSSTransform=function(e,t){var n=f(e,t,"px");return A({},(0,a.browserPrefixToKey)("transform",a.default),n)},t.createSVGTransform=function(e,t){return f(e,t,"")},t.getTranslation=f,t.getTouch=function(e,t){return e.targetTouches&&(0,i.findInArray)(e.targetTouches,(function(e){return t===e.identifier}))||e.changedTouches&&(0,i.findInArray)(e.changedTouches,(function(e){return t===e.identifier}))},t.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},t.addUserSelectStyles=function(e){if(!e)return;var t=e.getElementById("react-draggable-style-el");t||((t=e.createElement("style")).type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&h(e.body,"react-draggable-transparent-selection")},t.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&g(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{var t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(n){}},t.addClassName=h,t.removeClassName=g;var i=n(1080),a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(1363));function o(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function s(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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c="";function l(e,t){return c||(c=(0,i.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(t){return(0,i.isFunction)(e[t])}))),!!(0,i.isFunction)(e[c])&&e[c](t)}function f(e,t,n){var r=e.x,i=e.y,a="translate(".concat(r).concat(n,",").concat(i).concat(n,")");if(t){var o="".concat("string"===typeof t.x?t.x:t.x+n),s="".concat("string"===typeof t.y?t.y:t.y+n);a="translate(".concat(o,", ").concat(s,")")+a}return a}function h(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function g(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}},function(e,t,n){"use strict";var r=n(864),i=n(716),a=n(865),o=n(488),s=n(1002),u=i.ucs2length,A=n(527),c=a.Validation;function l(e,t,n){var r=h.call(this,e,t,n);return r>=0?{index:r,compiling:!0}:(r=this._compilations.length,this._compilations[r]={schema:e,root:t,baseId:n},{index:r,compiling:!1})}function f(e,t,n){var r=h.call(this,e,t,n);r>=0&&this._compilations.splice(r,1)}function h(e,t,n){for(var r=0;r<this._compilations.length;r++){var i=this._compilations[r];if(i.schema==e&&i.root==t&&i.baseId==n)return r}return-1}function g(e,t){return"var pattern"+e+" = new RegExp("+i.toQuotedString(t[e])+");"}function d(e){return"var default"+e+" = defaults["+e+"];"}function p(e,t){return void 0===t[e]?"":"var refVal"+e+" = refVal["+e+"];"}function v(e){return"var customRule"+e+" = customRules["+e+"];"}function y(e,t){if(!e.length)return"";for(var n="",r=0;r<e.length;r++)n+=t(r,e);return n}e.exports=function e(t,n,h,m){var I=this,b=this._opts,E=[void 0],C={},B=[],w={},Q=[],k={},_=[];n=n||{schema:t,refVal:E,refs:C};var x=l.call(this,t,n,m),S=this._compilations[x.index];if(x.compiling)return S.callValidate=function e(){var t=S.validate,n=t.apply(this,arguments);return e.errors=t.errors,n};var O=this._formats,D=this.RULES;try{var R=M(t,n,h,m);S.validate=R;var j=S.callValidate;return j&&(j.schema=R.schema,j.errors=null,j.refs=R.refs,j.refVal=R.refVal,j.root=R.root,j.$async=R.$async,b.sourceCode&&(j.source=R.source)),R}finally{f.call(this,t,n,m)}function M(t,o,l,f){var h=!o||o&&o.schema==t;if(o.schema!=n.schema)return e.call(I,t,o,l,f);var m,w=!0===t.$async,k=s({isTop:!0,schema:t,isRoot:h,baseId:f,root:o,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:a.MissingRef,RULES:D,validate:s,util:i,resolve:r,resolveRef:N,usePattern:L,useDefault:P,useCustomRule:U,opts:b,formats:O,logger:I.logger,self:I});k=y(E,p)+y(B,g)+y(Q,d)+y(_,v)+k,b.processCode&&(k=b.processCode(k));try{m=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",k)(I,D,O,n,E,Q,_,A,u,c),E[0]=m}catch(x){throw I.logger.error("Error compiling schema, function code:",k),x}return m.schema=t,m.errors=null,m.refs=C,m.refVal=E,m.root=h?m:o,w&&(m.$async=!0),!0===b.sourceCode&&(m.source={code:k,patterns:B,defaults:Q}),m}function N(t,i,a){i=r.url(t,i);var o,s,u=C[i];if(void 0!==u)return T(o=E[u],s="refVal["+u+"]");if(!a&&n.refs){var A=n.refs[i];if(void 0!==A)return T(o=n.refVal[A],s=F(i,o))}s=F(i);var c=r.call(I,M,n,i);if(void 0===c){var l=h&&h[i];l&&(c=r.inlineRef(l,b.inlineRefs)?l:e.call(I,l,n,h,t))}if(void 0!==c)return function(e,t){var n=C[e];E[n]=t}(i,c),T(c,s);!function(e){delete C[e]}(i)}function F(e,t){var n=E.length;return E[n]=t,C[e]=n,"refVal"+n}function T(e,t){return"object"==typeof e||"boolean"==typeof e?{code:t,schema:e,inline:!0}:{code:t,$async:e&&!!e.$async}}function L(e){var t=w[e];return void 0===t&&(t=w[e]=B.length,B[t]=e),"pattern"+t}function P(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return i.toQuotedString(e);case"object":if(null===e)return"null";var t=o(e),n=k[t];return void 0===n&&(n=k[t]=Q.length,Q[n]=e),"default"+n}}function U(e,t,n,r){if(!1!==I._opts.validateSchema){var i=e.definition.dependencies;if(i&&!i.every((function(e){return Object.prototype.hasOwnProperty.call(n,e)})))throw new Error("parent schema must have all required keywords: "+i.join(","));var a=e.definition.validateSchema;if(a)if(!a(t)){var o="keyword schema is invalid: "+I.errorsText(a.errors);if("log"!=I._opts.validateSchema)throw new Error(o);I.logger.error(o)}}var s,u=e.definition.compile,A=e.definition.inline,c=e.definition.macro;if(u)s=u.call(I,t,n,r);else if(c)s=c.call(I,t,n,r),!1!==b.validateSchema&&I.validateSchema(s,!0);else if(A)s=A.call(I,r,e.keyword,t,n);else if(!(s=e.definition.validate))return;if(void 0===s)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var l=_.length;return _[l]=s,{code:"customRule"+l,validate:s}}}},function(e,t,n){!function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length>1){t[0]=t[0].slice(0,-1);for(var r=t.length-1,i=1;i<r;++i)t[i]=t[i].slice(1,-1);return t[r]=t[r].slice(1),t.join("")}return t[0]}function n(e){return"(?:"+e+")"}function r(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function a(e){var r=t("[0-9]","[A-Fa-f]"),i=n(n("%[EFef]"+r+"%"+r+r+"%"+r+r)+"|"+n("%[89A-Fa-f]"+r+"%"+r+r)+"|"+n("%"+r+r)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",o=t("[\\:\\/\\?\\#\\[\\]\\@]",a),s=e?"[\\uE000-\\uF8FF]":"[]",u=t("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),A=n("[A-Za-z]"+t("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),c=n(n(i+"|"+t(u,a,"[\\:]"))+"*"),l=(n(n("25[0-5]")+"|"+n("2[0-4][0-9]")+"|"+n("1[0-9][0-9]")+"|"+n("[1-9][0-9]")+"|[0-9]"),n(n("25[0-5]")+"|"+n("2[0-4][0-9]")+"|"+n("1[0-9][0-9]")+"|"+n("0?[1-9][0-9]")+"|0?0?[0-9]")),f=n(l+"\\."+l+"\\."+l+"\\."+l),h=n(r+"{1,4}"),g=n(n(h+"\\:"+h)+"|"+f),d=n(n(h+"\\:")+"{6}"+g),p=n("\\:\\:"+n(h+"\\:")+"{5}"+g),v=n(n(h)+"?\\:\\:"+n(h+"\\:")+"{4}"+g),y=n(n(n(h+"\\:")+"{0,1}"+h)+"?\\:\\:"+n(h+"\\:")+"{3}"+g),m=n(n(n(h+"\\:")+"{0,2}"+h)+"?\\:\\:"+n(h+"\\:")+"{2}"+g),I=n(n(n(h+"\\:")+"{0,3}"+h)+"?\\:\\:"+h+"\\:"+g),b=n(n(n(h+"\\:")+"{0,4}"+h)+"?\\:\\:"+g),E=n(n(n(h+"\\:")+"{0,5}"+h)+"?\\:\\:"+h),C=n(n(n(h+"\\:")+"{0,6}"+h)+"?\\:\\:"),B=n([d,p,v,y,m,I,b,E,C].join("|")),w=n(n(u+"|"+i)+"+"),Q=(n(B+"\\%25"+w),n(B+n("\\%25|\\%(?!"+r+"{2})")+w)),k=n("[vV]"+r+"+\\."+t(u,a,"[\\:]")+"+"),_=n("\\["+n(Q+"|"+B+"|"+k)+"\\]"),x=n(n(i+"|"+t(u,a))+"*"),S=n(_+"|"+f+"(?!"+x+")|"+x),O=n("[0-9]*"),D=n(n(c+"@")+"?"+S+n("\\:"+O)+"?"),R=n(i+"|"+t(u,a,"[\\:\\@]")),j=n(R+"*"),M=n(R+"+"),N=n(n(i+"|"+t(u,a,"[\\@]"))+"+"),F=n(n("\\/"+j)+"*"),T=n("\\/"+n(M+F)+"?"),L=n(N+F),P=n(M+F),U="(?!"+R+")",G=(n(F+"|"+T+"|"+L+"|"+P+"|"+U),n(n(R+"|"+t("[\\/\\?]",s))+"*")),q=n(n(R+"|[\\/\\?]")+"*"),H=n(n("\\/\\/"+D+F)+"|"+T+"|"+P+"|"+U),Y=n(A+"\\:"+H+n("\\?"+G)+"?"+n("\\#"+q)+"?"),J=n(n("\\/\\/"+D+F)+"|"+T+"|"+L+"|"+U),z=n(J+n("\\?"+G)+"?"+n("\\#"+q)+"?");return n(Y+"|"+z),n(A+"\\:"+H+n("\\?"+G)+"?"),n(n("\\/\\/("+n("("+c+")@")+"?("+S+")"+n("\\:("+O+")")+"?)")+"?("+F+"|"+T+"|"+P+"|"+U+")"),n("\\?("+G+")"),n("\\#("+q+")"),n(n("\\/\\/("+n("("+c+")@")+"?("+S+")"+n("\\:("+O+")")+"?)")+"?("+F+"|"+T+"|"+L+"|"+U+")"),n("\\?("+G+")"),n("\\#("+q+")"),n(n("\\/\\/("+n("("+c+")@")+"?("+S+")"+n("\\:("+O+")")+"?)")+"?("+F+"|"+T+"|"+P+"|"+U+")"),n("\\?("+G+")"),n("\\#("+q+")"),n("("+c+")@"),n("\\:("+O+")"),{NOT_SCHEME:new RegExp(t("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",u,a),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",u,a),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",u,a),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",u,a),"g"),NOT_QUERY:new RegExp(t("[^\\%]",u,a,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",u,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",u,a),"g"),UNRESERVED:new RegExp(u,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",u,o),"g"),PCT_ENCODED:new RegExp(i,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+B+")"+n(n("\\%25|\\%(?!"+r+"{2})")+"("+w+")")+"?\\]?$")}}var o=a(!1),s=a(!0),u=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},A=2147483647,c=/^xn--/,l=/[^\0-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,d=String.fromCharCode;function p(e){throw new RangeError(h[e])}function v(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]);var i=function(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n}((e=e.replace(f,".")).split("."),t).join(".");return r+i}function y(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);56320==(64512&a)?t.push(((1023&i)<<10)+(1023&a)+65536):(t.push(i),n--)}else t.push(i)}return t}var m=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},I=function(e,t,n){var r=0;for(e=n?g(e/700):e>>1,e+=g(e/t);e>455;r+=36)e=g(e/35);return g(r+36*e/(e+38))},b=function(e){var t,n=[],r=e.length,i=0,a=128,o=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var u=0;u<s;++u)e.charCodeAt(u)>=128&&p("not-basic"),n.push(e.charCodeAt(u));for(var c=s>0?s+1:0;c<r;){for(var l=i,f=1,h=36;;h+=36){c>=r&&p("invalid-input");var d=(t=e.charCodeAt(c++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:36;(d>=36||d>g((A-i)/f))&&p("overflow"),i+=d*f;var v=h<=o?1:h>=o+26?26:h-o;if(d<v)break;var y=36-v;f>g(A/y)&&p("overflow"),f*=y}var m=n.length+1;o=I(i-l,m,0==l),g(i/m)>A-a&&p("overflow"),a+=g(i/m),i%=m,n.splice(i++,0,a)}return String.fromCodePoint.apply(String,n)},E=function(e){var t=[],n=(e=y(e)).length,r=128,i=0,a=72,o=!0,s=!1,u=void 0;try{for(var c,l=e[Symbol.iterator]();!(o=(c=l.next()).done);o=!0){var f=c.value;f<128&&t.push(d(f))}}catch(P){s=!0,u=P}finally{try{!o&&l.return&&l.return()}finally{if(s)throw u}}var h=t.length,v=h;for(h&&t.push("-");v<n;){var b=A,E=!0,C=!1,B=void 0;try{for(var w,Q=e[Symbol.iterator]();!(E=(w=Q.next()).done);E=!0){var k=w.value;k>=r&&k<b&&(b=k)}}catch(P){C=!0,B=P}finally{try{!E&&Q.return&&Q.return()}finally{if(C)throw B}}var _=v+1;b-r>g((A-i)/_)&&p("overflow"),i+=(b-r)*_,r=b;var x=!0,S=!1,O=void 0;try{for(var D,R=e[Symbol.iterator]();!(x=(D=R.next()).done);x=!0){var j=D.value;if(j<r&&++i>A&&p("overflow"),j==r){for(var M=i,N=36;;N+=36){var F=N<=a?1:N>=a+26?26:N-a;if(M<F)break;var T=M-F,L=36-F;t.push(d(m(F+T%L,0))),M=g(T/L)}t.push(d(m(M,0))),a=I(i,_,v==h),i=0,++v}}}catch(P){S=!0,O=P}finally{try{!x&&R.return&&R.return()}finally{if(S)throw O}}++i,++r}return t.join("")},C=function(e){return v(e,(function(e){return l.test(e)?"xn--"+E(e):e}))},B=function(e){return v(e,(function(e){return c.test(e)?b(e.slice(4).toLowerCase()):e}))},w={};function Q(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function k(e){for(var t="",n=0,r=e.length;n<r;){var i=parseInt(e.substr(n+1,2),16);if(i<128)t+=String.fromCharCode(i),n+=3;else if(i>=194&&i<224){if(r-n>=6){var a=parseInt(e.substr(n+4,2),16);t+=String.fromCharCode((31&i)<<6|63&a)}else t+=e.substr(n,6);n+=6}else if(i>=224){if(r-n>=9){var o=parseInt(e.substr(n+4,2),16),s=parseInt(e.substr(n+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&o)<<6|63&s)}else t+=e.substr(n,9);n+=9}else t+=e.substr(n,3),n+=3}return t}function _(e,t){function n(e){var n=k(e);return n.match(t.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,n).replace(t.NOT_USERINFO,Q).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_HOST,Q).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,n).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,Q).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,n).replace(t.NOT_QUERY,Q).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,n).replace(t.NOT_FRAGMENT,Q).replace(t.PCT_ENCODED,i)),e}function x(e){return e.replace(/^0*(.*)/,"$1")||"0"}function S(e,t){var n=e.match(t.IPV4ADDRESS)||[],r=u(n,2)[1];return r?r.split(".").map(x).join("."):e}function O(e,t){var n=e.match(t.IPV6ADDRESS)||[],r=u(n,3),i=r[1],a=r[2];if(i){for(var o=i.toLowerCase().split("::").reverse(),s=u(o,2),A=s[0],c=s[1],l=c?c.split(":").map(x):[],f=A.split(":").map(x),h=t.IPV4ADDRESS.test(f[f.length-1]),g=h?7:8,d=f.length-g,p=Array(g),v=0;v<g;++v)p[v]=l[v]||f[d+v]||"";h&&(p[g-1]=S(p[g-1],t));var y=p.reduce((function(e,t,n){if(!t||"0"===t){var r=e[e.length-1];r&&r.index+r.length===n?r.length++:e.push({index:n,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],m=void 0;if(y&&y.length>1){var I=p.slice(0,y.index),b=p.slice(y.index+y.length);m=I.join(":")+"::"+b.join(":")}else m=p.join(":");return a&&(m+="%"+a),m}return e}var D=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,R=void 0==="".match(/(){0}/)[1];function j(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=!1!==t.iri?s:o;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(D);if(i){R?(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5])):(n.scheme=i[1]||void 0,n.userinfo=-1!==e.indexOf("@")?i[3]:void 0,n.host=-1!==e.indexOf("//")?i[4]:void 0,n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=-1!==e.indexOf("?")?i[7]:void 0,n.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),n.host&&(n.host=O(S(n.host,r),r)),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==n.reference&&(n.error=n.error||"URI is not a "+t.reference+" reference.");var a=w[(t.scheme||n.scheme||"").toLowerCase()];if(t.unicodeSupport||a&&a.unicodeSupport)_(n,r);else{if(n.host&&(t.domainHost||a&&a.domainHost))try{n.host=C(n.host.replace(r.PCT_ENCODED,k).toLowerCase())}catch(u){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+u}_(n,o)}a&&a.parse&&a.parse(n,t)}else n.error=n.error||"URI can not be parsed.";return n}function M(e,t){var n=!1!==t.iri?s:o,r=[];return void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host&&r.push(O(S(String(e.host),n),n).replace(n.IPV6ADDRESS,(function(e,t,n){return"["+t+(n?"%25"+n:"")+"]"}))),"number"===typeof e.port&&(r.push(":"),r.push(e.port.toString(10))),r.length?r.join(""):void 0}var N=/^\.\.?\//,F=/^\/\.(\/|$)/,T=/^\/\.\.(\/|$)/,L=/^\/?(?:.|\n)*?(?=\/|$)/;function P(e){for(var t=[];e.length;)if(e.match(N))e=e.replace(N,"");else if(e.match(F))e=e.replace(F,"/");else if(e.match(T))e=e.replace(T,"/"),t.pop();else if("."===e||".."===e)e="";else{var n=e.match(L);if(!n)throw new Error("Unexpected dot segment condition");var r=n[0];e=e.slice(r.length),t.push(r)}return t.join("")}function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.iri?s:o,r=[],i=w[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(n.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?B(e.host):C(e.host.replace(n.PCT_ENCODED,k).toLowerCase())}catch(A){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+A}_(e,n),"suffix"!==t.reference&&e.scheme&&(r.push(e.scheme),r.push(":"));var a=M(e,t);if(void 0!==a&&("suffix"!==t.reference&&r.push("//"),r.push(a),e.path&&"/"!==e.path.charAt(0)&&r.push("/")),void 0!==e.path){var u=e.path;t.absolutePath||i&&i.absolutePath||(u=P(u)),void 0===a&&(u=u.replace(/^\/\//,"/%2F")),r.push(u)}return void 0!==e.query&&(r.push("?"),r.push(e.query)),void 0!==e.fragment&&(r.push("#"),r.push(e.fragment)),r.join("")}function G(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],i={};return r||(e=j(U(e,n),n),t=j(U(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=P(t.path||""),i.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=P(t.path||""),i.query=t.query):(t.path?("/"===t.path.charAt(0)?i.path=P(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path:i.path="/"+t.path,i.path=P(i.path)),i.query=t.query):(i.path=e.path,void 0!==t.query?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function q(e,t){return e&&e.toString().replace(t&&t.iri?s.PCT_ENCODED:o.PCT_ENCODED,k)}var H={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},Y={scheme:"https",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},J={},z="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",K="[0-9A-Fa-f]",W=n(n("%[EFef]"+K+"%"+K+K+"%"+K+K)+"|"+n("%[89A-Fa-f]"+K+"%"+K+K)+"|"+n("%"+K+K)),V=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),X=new RegExp(z,"g"),Z=new RegExp(W,"g"),$=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',V),"g"),ee=new RegExp(t("[^]",z,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),te=ee;function ne(e){var t=k(e);return t.match(X)?t:e}var re={scheme:"mailto",parse:function(e,t){var n=e,r=n.to=n.path?n.path.split(","):[];if(n.path=void 0,n.query){for(var i=!1,a={},o=n.query.split("&"),s=0,u=o.length;s<u;++s){var A=o[s].split("=");switch(A[0]){case"to":for(var c=A[1].split(","),l=0,f=c.length;l<f;++l)r.push(c[l]);break;case"subject":n.subject=q(A[1],t);break;case"body":n.body=q(A[1],t);break;default:i=!0,a[q(A[0],t)]=q(A[1],t)}}i&&(n.headers=a)}n.query=void 0;for(var h=0,g=r.length;h<g;++h){var d=r[h].split("@");if(d[0]=q(d[0]),t.unicodeSupport)d[1]=q(d[1],t).toLowerCase();else try{d[1]=C(q(d[1],t).toLowerCase())}catch(p){n.error=n.error||"Email address's domain name can not be converted to ASCII via punycode: "+p}r[h]=d.join("@")}return n},serialize:function(e,t){var n,r=e,a=void 0!==(n=e.to)&&null!==n?n instanceof Array?n:"number"!==typeof n.length||n.split||n.setInterval||n.call?[n]:Array.prototype.slice.call(n):[];if(a){for(var o=0,s=a.length;o<s;++o){var u=String(a[o]),A=u.lastIndexOf("@"),c=u.slice(0,A).replace(Z,ne).replace(Z,i).replace($,Q),l=u.slice(A+1);try{l=t.iri?B(l):C(q(l,t).toLowerCase())}catch(d){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+d}a[o]=c+"@"+l}r.path=a.join(",")}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var h=[];for(var g in f)f[g]!==J[g]&&h.push(g.replace(Z,ne).replace(Z,i).replace(ee,Q)+"="+f[g].replace(Z,ne).replace(Z,i).replace(te,Q));return h.length&&(r.query=h.join("&")),r}},ie=/^([^\:]+)\:(.*)/,ae={scheme:"urn",parse:function(e,t){var n=e.path&&e.path.match(ie),r=e;if(n){var i=t.scheme||r.scheme||"urn",a=n[1].toLowerCase(),o=n[2],s=i+":"+(t.nid||a),u=w[s];r.nid=a,r.nss=o,r.path=void 0,u&&(r=u.parse(r,t))}else r.error=r.error||"URN can not be parsed.";return r},serialize:function(e,t){var n=t.scheme||e.scheme||"urn",r=e.nid,i=n+":"+(t.nid||r),a=w[i];a&&(e=a.serialize(e,t));var o=e,s=e.nss;return o.path=(r||t.nid)+":"+s,o}},oe=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,se={scheme:"urn:uuid",parse:function(e,t){var n=e;return n.uuid=n.nss,n.nss=void 0,t.tolerant||n.uuid&&n.uuid.match(oe)||(n.error=n.error||"UUID is not valid."),n},serialize:function(e,t){var n=e;return n.nss=(e.uuid||"").toLowerCase(),n}};w[H.scheme]=H,w[Y.scheme]=Y,w[re.scheme]=re,w[ae.scheme]=ae,w[se.scheme]=se,e.SCHEMES=w,e.pctEncChar=Q,e.pctDecChars=k,e.parse=j,e.removeDotSegments=P,e.serialize=U,e.resolveComponents=G,e.resolve=function(e,t,n){var r=function(e,t){var n=e;if(t)for(var r in t)n[r]=t[r];return n}({scheme:"null"},n);return U(G(j(e,r),j(t,r),r,!0),r)},e.normalize=function(e,t){return"string"===typeof e?e=U(j(e,t),t):"object"===r(e)&&(e=j(U(e,t),t)),e},e.equal=function(e,t,n){return"string"===typeof e?e=U(j(e,n),n):"object"===r(e)&&(e=U(e,n)),"string"===typeof t?t=U(j(t,n),n):"object"===r(t)&&(t=U(t,n)),e===t},e.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?s.ESCAPE:o.ESCAPE,Q)},e.unescapeComponent=q,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){"use strict";e.exports=function(e){for(var t,n=0,r=e.length,i=0;i<r;)n++,(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<r&&56320==(64512&(t=e.charCodeAt(i)))&&i++;return n}},function(e,t,n){"use strict";var r=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),function e(t,n,i,a,o,s,u,A,c,l){if(a&&"object"==typeof a&&!Array.isArray(a)){for(var f in n(a,o,s,u,A,c,l),a){var h=a[f];if(Array.isArray(h)){if(f in r.arrayKeywords)for(var g=0;g<h.length;g++)e(t,n,i,h[g],o+"/"+f+"/"+g,s,o,f,a,g)}else if(f in r.propsKeywords){if(h&&"object"==typeof h)for(var d in h)e(t,n,i,h[d],o+"/"+f+"/"+d.replace(/~/g,"~0").replace(/\//g,"~1"),s,o,f,a,d)}else(f in r.keywords||t.allKeys&&!(f in r.skipKeywords))&&e(t,n,i,h,o+"/"+f,s,o,f,a)}i(a,o,s,u,A,c,l)}}(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},function(e,t,n){"use strict";var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,t){this._cache[e]=t},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]},r.prototype.clear=function(){this._cache={}}},function(e,t,n){"use strict";var r=n(716),i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,a=[0,31,28,31,30,31,30,31,31,30,31,30,31],o=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,s=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,u=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,A=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,c=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,l=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,f=/^(?:\/(?:[^~/]|~0|~1)*)*$/,h=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,g=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function d(e){return e="full"==e?"full":"fast",r.copy(d[e])}function p(e){var t=e.match(i);if(!t)return!1;var n=+t[1],r=+t[2],o=+t[3];return r>=1&&r<=12&&o>=1&&o<=(2==r&&function(e){return e%4===0&&(e%100!==0||e%400===0)}(n)?29:a[r])}function v(e,t){var n=e.match(o);if(!n)return!1;var r=n[1],i=n[2],a=n[3],s=n[5];return(r<=23&&i<=59&&a<=59||23==r&&59==i&&60==a)&&(!t||s)}e.exports=d,d.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":A,url:c,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:b,uuid:l,"json-pointer":f,"json-pointer-uri-fragment":h,"relative-json-pointer":g},d.full={date:p,time:v,"date-time":function(e){var t=e.split(y);return 2==t.length&&p(t[0])&&v(t[1],!0)},uri:function(e){return m.test(e)&&u.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":A,url:c,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:b,uuid:l,"json-pointer":f,"json-pointer-uri-fragment":h,"relative-json-pointer":g};var y=/t|\s/i;var m=/\/|:/;var I=/[^\\]\\Z/;function b(e){if(I.test(e))return!1;try{return new RegExp(e),!0}catch(t){return!1}}},function(e,t,n){"use strict";var r=n(1103),i=n(716).toHash;e.exports=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],t=["type","$comment"];return e.all=i(t),e.types=i(["number","integer","string","array","object","boolean","null"]),e.forEach((function(n){n.rules=n.rules.map((function(n){var i;if("object"==typeof n){var a=Object.keys(n)[0];i=n[a],n=a,i.forEach((function(n){t.push(n),e.all[n]=!0}))}return t.push(n),e.all[n]={keyword:n,code:r[n],implements:i}})),e.all.$comment={keyword:"$comment",code:r.$comment},n.type&&(e.types[n.type]=n)})),e.keywords=i(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),e.custom={},e}},function(e,t,n){"use strict";e.exports={$ref:n(1104),allOf:n(1105),anyOf:n(1106),$comment:n(1107),const:n(1108),contains:n(1109),dependencies:n(1110),enum:n(1111),format:n(1112),if:n(1113),items:n(1114),maximum:n(1003),minimum:n(1003),maxItems:n(1004),minItems:n(1004),maxLength:n(1005),minLength:n(1005),maxProperties:n(1006),minProperties:n(1006),multipleOf:n(1115),not:n(1116),oneOf:n(1117),pattern:n(1118),properties:n(1119),propertyNames:n(1120),required:n(1121),uniqueItems:n(1122),validate:n(1002)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i,a=" ",o=e.level,s=e.dataLevel,u=e.schema[t],A=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(s||""),f="valid"+o;if("#"==u||"#/"==u)e.isRoot?(r=e.async,i="validate"):(r=!0===e.root.schema.$async,i="root.refVal[0]");else{var h=e.resolveRef(e.baseId,u,e.isRoot);if(void 0===h){var g=e.MissingRefError.message(e.baseId,u);if("fail"==e.opts.missingRefs){e.logger.error(g),(y=y||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(A)+" , params: { ref: '"+e.util.escapeQuotes(u)+"' } ",!1!==e.opts.messages&&(a+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(u)+"' "),e.opts.verbose&&(a+=" , schema: "+e.util.toQuotedString(u)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),a+=" } "):a+=" {} ";var d=a;a=y.pop(),!e.compositeRule&&c?e.async?a+=" throw new ValidationError(["+d+"]); ":a+=" validate.errors = ["+d+"]; return false; ":a+=" var err = "+d+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(a+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,u,g);e.logger.warn(g),c&&(a+=" if (true) { ")}}else if(h.inline){var p=e.util.copy(e);p.level++;var v="valid"+p.level;p.schema=h.schema,p.schemaPath="",p.errSchemaPath=u,a+=" "+e.validate(p).replace(/validate\.schema/g,h.code)+" ",c&&(a+=" if ("+v+") { ")}else r=!0===h.$async||e.async&&!1!==h.$async,i=h.code}if(i){var y;(y=y||[]).push(a),a="",e.opts.passContext?a+=" "+i+".call(this, ":a+=" "+i+"( ",a+=" "+l+", (dataPath || '')",'""'!=e.errorPath&&(a+=" + "+e.errorPath);var m=a+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData)  ";if(a=y.pop(),r){if(!e.async)throw new Error("async schema referenced by sync schema");c&&(a+=" var "+f+"; "),a+=" try { await "+m+"; ",c&&(a+=" "+f+" = true; "),a+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",c&&(a+=" "+f+" = false; "),a+=" } ",c&&(a+=" if ("+f+") { ")}else a+=" if (!"+m+") { if (vErrors === null) vErrors = "+i+".errors; else vErrors = vErrors.concat("+i+".errors); errors = vErrors.length; } ",c&&(a+=" else { ")}return a}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.schema[t],a=e.schemaPath+e.util.getProperty(t),o=e.errSchemaPath+"/"+t,s=!e.opts.allErrors,u=e.util.copy(e),A="";u.level++;var c="valid"+u.level,l=u.baseId,f=!0,h=i;if(h)for(var g,d=-1,p=h.length-1;d<p;)g=h[d+=1],(e.opts.strictKeywords?"object"==typeof g&&Object.keys(g).length>0:e.util.schemaHasRules(g,e.RULES.all))&&(f=!1,u.schema=g,u.schemaPath=a+"["+d+"]",u.errSchemaPath=o+"/"+d,r+="  "+e.validate(u)+" ",u.baseId=l,s&&(r+=" if ("+c+") { ",A+="}"));return s&&(r+=f?" if (true) { ":" "+A.slice(0,-1)+" "),r=e.util.cleanUpCode(r)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,A=!e.opts.allErrors,c="data"+(a||""),l="valid"+i,f="errs__"+i,h=e.util.copy(e),g="";h.level++;var d="valid"+h.level;if(o.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0:e.util.schemaHasRules(t,e.RULES.all)}))){var p=h.baseId;r+=" var "+f+" = errors; var "+l+" = false;  ";var v=e.compositeRule;e.compositeRule=h.compositeRule=!0;var y=o;if(y)for(var m,I=-1,b=y.length-1;I<b;)m=y[I+=1],h.schema=m,h.schemaPath=s+"["+I+"]",h.errSchemaPath=u+"/"+I,r+="  "+e.validate(h)+" ",h.baseId=p,r+=" "+l+" = "+l+" || "+d+"; if (!"+l+") { ",g+="}";e.compositeRule=h.compositeRule=v,r+=" "+g+" if (!"+l+") {   var err =   ",!1!==e.createErrors?(r+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ",r+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&A&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),r+=" } else {  errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",e.opts.allErrors&&(r+=" } "),r=e.util.cleanUpCode(r)}else A&&(r+=" if (true) { ");return r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.schema[t],a=e.errSchemaPath+"/"+t,o=(e.opts.allErrors,e.util.toQuotedString(i));return!0===e.opts.$comment?r+=" console.log("+o+");":"function"==typeof e.opts.$comment&&(r+=" self._opts.$comment("+o+", "+e.util.toQuotedString(a)+", validate.root.schema);"),r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,A=!e.opts.allErrors,c="data"+(a||""),l="valid"+i,f=e.opts.$data&&o&&o.$data;f&&(r+=" var schema"+i+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; "),f||(r+=" var schema"+i+" = validate.schema"+s+";"),r+="var "+l+" = equal("+c+", schema"+i+"); if (!"+l+") {   ";var h=h||[];h.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValue: schema"+i+" } ",!1!==e.opts.messages&&(r+=" , message: 'should be equal to constant' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var g=r;return r=h.pop(),!e.compositeRule&&A?e.async?r+=" throw new ValidationError(["+g+"]); ":r+=" validate.errors = ["+g+"]; return false; ":r+=" var err = "+g+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" }",A&&(r+=" else { "),r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,A=!e.opts.allErrors,c="data"+(a||""),l="valid"+i,f="errs__"+i,h=e.util.copy(e);h.level++;var g="valid"+h.level,d="i"+i,p=h.dataLevel=e.dataLevel+1,v="data"+p,y=e.baseId,m=e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0:e.util.schemaHasRules(o,e.RULES.all);if(r+="var "+f+" = errors;var "+l+";",m){var I=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.schema=o,h.schemaPath=s,h.errSchemaPath=u,r+=" var "+g+" = false; for (var "+d+" = 0; "+d+" < "+c+".length; "+d+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,d,e.opts.jsonPointers,!0);var b=c+"["+d+"]";h.dataPathArr[p]=d;var E=e.validate(h);h.baseId=y,e.util.varOccurences(E,v)<2?r+=" "+e.util.varReplace(E,v,b)+" ":r+=" var "+v+" = "+b+"; "+E+" ",r+=" if ("+g+") break; }  ",e.compositeRule=h.compositeRule=I,r+="  if (!"+g+") {"}else r+=" if ("+c+".length == 0) {";var C=C||[];C.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should contain a valid item' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var B=r;return r=C.pop(),!e.compositeRule&&A?e.async?r+=" throw new ValidationError(["+B+"]); ":r+=" validate.errors = ["+B+"]; return false; ":r+=" var err = "+B+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { ",m&&(r+="  errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } "),e.opts.allErrors&&(r+=" } "),r=e.util.cleanUpCode(r)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,A=!e.opts.allErrors,c="data"+(a||""),l="errs__"+i,f=e.util.copy(e),h="";f.level++;var g="valid"+f.level,d={},p={},v=e.opts.ownProperties;for(b in o){var y=o[b],m=Array.isArray(y)?p:d;m[b]=y}r+="var "+l+" = errors;";var I=e.errorPath;for(var b in r+="var missing"+i+";",p)if((m=p[b]).length){if(r+=" if ( "+c+e.util.getProperty(b)+" !== undefined ",v&&(r+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(b)+"') "),A){r+=" && ( ";var E=m;if(E)for(var C=-1,B=E.length-1;C<B;){S=E[C+=1],C&&(r+=" || "),r+=" ( ( "+(j=c+(R=e.util.getProperty(S)))+" === undefined ",v&&(r+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(S)+"') "),r+=") && (missing"+i+" = "+e.util.toQuotedString(e.opts.jsonPointers?S:R)+") ) "}r+=")) {  ";var w="missing"+i,Q="' + "+w+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(I,w,!0):I+" + "+w);var k=k||[];k.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { property: '"+e.util.escapeQuotes(b)+"', missingProperty: '"+Q+"', depsCount: "+m.length+", deps: '"+e.util.escapeQuotes(1==m.length?m[0]:m.join(", "))+"' } ",!1!==e.opts.messages&&(r+=" , message: 'should have ",1==m.length?r+="property "+e.util.escapeQuotes(m[0]):r+="properties "+e.util.escapeQuotes(m.join(", ")),r+=" when property "+e.util.escapeQuotes(b)+" is present' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var _=r;r=k.pop(),!e.compositeRule&&A?e.async?r+=" throw new ValidationError(["+_+"]); ":r+=" validate.errors = ["+_+"]; return false; ":r+=" var err = "+_+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{r+=" ) { ";var x=m;if(x)for(var S,O=-1,D=x.length-1;O<D;){S=x[O+=1];var R=e.util.getProperty(S),j=(Q=e.util.escapeQuotes(S),c+R);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(I,S,e.opts.jsonPointers)),r+=" if ( "+j+" === undefined ",v&&(r+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(S)+"') "),r+=") {  var err =   ",!1!==e.createErrors?(r+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { property: '"+e.util.escapeQuotes(b)+"', missingProperty: '"+Q+"', depsCount: "+m.length+", deps: '"+e.util.escapeQuotes(1==m.length?m[0]:m.join(", "))+"' } ",!1!==e.opts.messages&&(r+=" , message: 'should have ",1==m.length?r+="property "+e.util.escapeQuotes(m[0]):r+="properties "+e.util.escapeQuotes(m.join(", ")),r+=" when property "+e.util.escapeQuotes(b)+" is present' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ",r+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}r+=" }   ",A&&(h+="}",r+=" else { ")}e.errorPath=I;var M=f.baseId;for(var b in d){y=d[b];(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0:e.util.schemaHasRules(y,e.RULES.all))&&(r+=" "+g+" = true; if ( "+c+e.util.getProperty(b)+" !== undefined ",v&&(r+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(b)+"') "),r+=") { ",f.schema=y,f.schemaPath=s+e.util.getProperty(b),f.errSchemaPath=u+"/"+e.util.escapeFragment(b),r+="  "+e.validate(f)+" ",f.baseId=M,r+=" }  ",A&&(r+=" if ("+g+") { ",h+="}"))}return A&&(r+="   "+h+" if ("+l+" == errors) {"),r=e.util.cleanUpCode(r)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,A=!e.opts.allErrors,c="data"+(a||""),l="valid"+i,f=e.opts.$data&&o&&o.$data;f&&(r+=" var schema"+i+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; ");var h="i"+i,g="schema"+i;f||(r+=" var "+g+" = validate.schema"+s+";"),r+="var "+l+";",f&&(r+=" if (schema"+i+" === undefined) "+l+" = true; else if (!Array.isArray(schema"+i+")) "+l+" = false; else {"),r+=l+" = false;for (var "+h+"=0; "+h+"<"+g+".length; "+h+"++) if (equal("+c+", "+g+"["+h+"])) { "+l+" = true; break; }",f&&(r+="  }  "),r+=" if (!"+l+") {   ";var d=d||[];d.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValues: schema"+i+" } ",!1!==e.opts.messages&&(r+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var p=r;return r=d.pop(),!e.compositeRule&&A?e.async?r+=" throw new ValidationError(["+p+"]); ":r+=" validate.errors = ["+p+"]; return false; ":r+=" var err = "+p+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" }",A&&(r+=" else { "),r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,A=!e.opts.allErrors,c="data"+(a||"");if(!1===e.opts.format)return A&&(r+=" if (true) { "),r;var l,f=e.opts.$data&&o&&o.$data;f?(r+=" var schema"+i+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; ",l="schema"+i):l=o;var h=e.opts.unknownFormats,g=Array.isArray(h);if(f){r+=" var "+(d="format"+i)+" = formats["+l+"]; var "+(p="isObject"+i)+" = typeof "+d+" == 'object' && !("+d+" instanceof RegExp) && "+d+".validate; var "+(v="formatType"+i)+" = "+p+" && "+d+".type || 'string'; if ("+p+") { ",e.async&&(r+=" var async"+i+" = "+d+".async; "),r+=" "+d+" = "+d+".validate; } if (  ",f&&(r+=" ("+l+" !== undefined && typeof "+l+" != 'string') || "),r+=" (","ignore"!=h&&(r+=" ("+l+" && !"+d+" ",g&&(r+=" && self._opts.unknownFormats.indexOf("+l+") == -1 "),r+=") || "),r+=" ("+d+" && "+v+" == '"+n+"' && !(typeof "+d+" == 'function' ? ",e.async?r+=" (async"+i+" ? await "+d+"("+c+") : "+d+"("+c+")) ":r+=" "+d+"("+c+") ",r+=" : "+d+".test("+c+"))))) {"}else{var d;if(!(d=e.formats[o])){if("ignore"==h)return e.logger.warn('unknown format "'+o+'" ignored in schema at path "'+e.errSchemaPath+'"'),A&&(r+=" if (true) { "),r;if(g&&h.indexOf(o)>=0)return A&&(r+=" if (true) { "),r;throw new Error('unknown format "'+o+'" is used in schema at path "'+e.errSchemaPath+'"')}var p,v=(p="object"==typeof d&&!(d instanceof RegExp)&&d.validate)&&d.type||"string";if(p){var y=!0===d.async;d=d.validate}if(v!=n)return A&&(r+=" if (true) { "),r;if(y){if(!e.async)throw new Error("async format in sync schema");r+=" if (!(await "+(m="formats"+e.util.getProperty(o)+".validate")+"("+c+"))) { "}else{r+=" if (! ";var m="formats"+e.util.getProperty(o);p&&(m+=".validate"),r+="function"==typeof d?" "+m+"("+c+") ":" "+m+".test("+c+") ",r+=") { "}}var I=I||[];I.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { format:  ",r+=f?""+l:""+e.util.toQuotedString(o),r+="  } ",!1!==e.opts.messages&&(r+=" , message: 'should match format \"",r+=f?"' + "+l+" + '":""+e.util.escapeQuotes(o),r+="\"' "),e.opts.verbose&&(r+=" , schema:  ",r+=f?"validate.schema"+s:""+e.util.toQuotedString(o),r+="         , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var b=r;return r=I.pop(),!e.compositeRule&&A?e.async?r+=" throw new ValidationError(["+b+"]); ":r+=" validate.errors = ["+b+"]; return false; ":r+=" var err = "+b+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",A&&(r+=" else { "),r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,A=!e.opts.allErrors,c="data"+(a||""),l="valid"+i,f="errs__"+i,h=e.util.copy(e);h.level++;var g="valid"+h.level,d=e.schema.then,p=e.schema.else,v=void 0!==d&&(e.opts.strictKeywords?"object"==typeof d&&Object.keys(d).length>0:e.util.schemaHasRules(d,e.RULES.all)),y=void 0!==p&&(e.opts.strictKeywords?"object"==typeof p&&Object.keys(p).length>0:e.util.schemaHasRules(p,e.RULES.all)),m=h.baseId;if(v||y){var I;h.createErrors=!1,h.schema=o,h.schemaPath=s,h.errSchemaPath=u,r+=" var "+f+" = errors; var "+l+" = true;  ";var b=e.compositeRule;e.compositeRule=h.compositeRule=!0,r+="  "+e.validate(h)+" ",h.baseId=m,h.createErrors=!0,r+="  errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; }  ",e.compositeRule=h.compositeRule=b,v?(r+=" if ("+g+") {  ",h.schema=e.schema.then,h.schemaPath=e.schemaPath+".then",h.errSchemaPath=e.errSchemaPath+"/then",r+="  "+e.validate(h)+" ",h.baseId=m,r+=" "+l+" = "+g+"; ",v&&y?r+=" var "+(I="ifClause"+i)+" = 'then'; ":I="'then'",r+=" } ",y&&(r+=" else { ")):r+=" if (!"+g+") { ",y&&(h.schema=e.schema.else,h.schemaPath=e.schemaPath+".else",h.errSchemaPath=e.errSchemaPath+"/else",r+="  "+e.validate(h)+" ",h.baseId=m,r+=" "+l+" = "+g+"; ",v&&y?r+=" var "+(I="ifClause"+i)+" = 'else'; ":I="'else'",r+=" } "),r+=" if (!"+l+") {   var err =   ",!1!==e.createErrors?(r+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { failingKeyword: "+I+" } ",!1!==e.opts.messages&&(r+=" , message: 'should match \"' + "+I+" + '\" schema' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ",r+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&A&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),r+=" }   ",A&&(r+=" else { "),r=e.util.cleanUpCode(r)}else A&&(r+=" if (true) { ");return r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,A=!e.opts.allErrors,c="data"+(a||""),l="valid"+i,f="errs__"+i,h=e.util.copy(e),g="";h.level++;var d="valid"+h.level,p="i"+i,v=h.dataLevel=e.dataLevel+1,y="data"+v,m=e.baseId;if(r+="var "+f+" = errors;var "+l+";",Array.isArray(o)){var I=e.schema.additionalItems;if(!1===I){r+=" "+l+" = "+c+".length <= "+o.length+"; ";var b=u;u=e.errSchemaPath+"/additionalItems",r+="  if (!"+l+") {   ";var E=E||[];E.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+o.length+" } ",!1!==e.opts.messages&&(r+=" , message: 'should NOT have more than "+o.length+" items' "),e.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var C=r;r=E.pop(),!e.compositeRule&&A?e.async?r+=" throw new ValidationError(["+C+"]); ":r+=" validate.errors = ["+C+"]; return false; ":r+=" var err = "+C+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",u=b,A&&(g+="}",r+=" else { ")}var B=o;if(B)for(var w,Q=-1,k=B.length-1;Q<k;)if(w=B[Q+=1],e.opts.strictKeywords?"object"==typeof w&&Object.keys(w).length>0:e.util.schemaHasRules(w,e.RULES.all)){r+=" "+d+" = true; if ("+c+".length > "+Q+") { ";var _=c+"["+Q+"]";h.schema=w,h.schemaPath=s+"["+Q+"]",h.errSchemaPath=u+"/"+Q,h.errorPath=e.util.getPathExpr(e.errorPath,Q,e.opts.jsonPointers,!0),h.dataPathArr[v]=Q;var x=e.validate(h);h.baseId=m,e.util.varOccurences(x,y)<2?r+=" "+e.util.varReplace(x,y,_)+" ":r+=" var "+y+" = "+_+"; "+x+" ",r+=" }  ",A&&(r+=" if ("+d+") { ",g+="}")}if("object"==typeof I&&(e.opts.strictKeywords?"object"==typeof I&&Object.keys(I).length>0:e.util.schemaHasRules(I,e.RULES.all))){h.schema=I,h.schemaPath=e.schemaPath+".additionalItems",h.errSchemaPath=e.errSchemaPath+"/additionalItems",r+=" "+d+" = true; if ("+c+".length > "+o.length+") {  for (var "+p+" = "+o.length+"; "+p+" < "+c+".length; "+p+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,p,e.opts.jsonPointers,!0);_=c+"["+p+"]";h.dataPathArr[v]=p;x=e.validate(h);h.baseId=m,e.util.varOccurences(x,y)<2?r+=" "+e.util.varReplace(x,y,_)+" ":r+=" var "+y+" = "+_+"; "+x+" ",A&&(r+=" if (!"+d+") break; "),r+=" } }  ",A&&(r+=" if ("+d+") { ",g+="}")}}else if(e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0:e.util.schemaHasRules(o,e.RULES.all)){h.schema=o,h.schemaPath=s,h.errSchemaPath=u,r+="  for (var "+p+" = 0; "+p+" < "+c+".length; "+p+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,p,e.opts.jsonPointers,!0);_=c+"["+p+"]";h.dataPathArr[v]=p;x=e.validate(h);h.baseId=m,e.util.varOccurences(x,y)<2?r+=" "+e.util.varReplace(x,y,_)+" ":r+=" var "+y+" = "+_+"; "+x+" ",A&&(r+=" if (!"+d+") break; "),r+=" }"}return A&&(r+=" "+g+" if ("+f+" == errors) {"),r=e.util.cleanUpCode(r)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),A=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),f=e.opts.$data&&s&&s.$data;f?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",r="schema"+a):r=s,i+="var division"+a+";if (",f&&(i+=" "+r+" !== undefined && ( typeof "+r+" != 'number' || "),i+=" (division"+a+" = "+l+" / "+r+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+a+") - division"+a+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+a+" !== parseInt(division"+a+") ",i+=" ) ",f&&(i+="  )  "),i+=" ) {   ";var h=h||[];h.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(A)+" , params: { multipleOf: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be multiple of ",i+=f?"' + "+r:r+"'"),e.opts.verbose&&(i+=" , schema:  ",i+=f?"validate.schema"+u:""+s,i+="         , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var g=i;return i=h.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,A=!e.opts.allErrors,c="data"+(a||""),l="errs__"+i,f=e.util.copy(e);f.level++;var h="valid"+f.level;if(e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0:e.util.schemaHasRules(o,e.RULES.all)){f.schema=o,f.schemaPath=s,f.errSchemaPath=u,r+=" var "+l+" = errors;  ";var g,d=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.createErrors=!1,f.opts.allErrors&&(g=f.opts.allErrors,f.opts.allErrors=!1),r+=" "+e.validate(f)+" ",f.createErrors=!0,g&&(f.opts.allErrors=g),e.compositeRule=f.compositeRule=d,r+=" if ("+h+") {   ";var p=p||[];p.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var v=r;r=p.pop(),!e.compositeRule&&A?e.async?r+=" throw new ValidationError(["+v+"]); ":r+=" validate.errors = ["+v+"]; return false; ":r+=" var err = "+v+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else {  errors = "+l+"; if (vErrors !== null) { if ("+l+") vErrors.length = "+l+"; else vErrors = null; } ",e.opts.allErrors&&(r+=" } ")}else r+="  var err =   ",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ",r+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",A&&(r+=" if (false) { ");return r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,A=!e.opts.allErrors,c="data"+(a||""),l="valid"+i,f="errs__"+i,h=e.util.copy(e),g="";h.level++;var d="valid"+h.level,p=h.baseId,v="prevValid"+i,y="passingSchemas"+i;r+="var "+f+" = errors , "+v+" = false , "+l+" = false , "+y+" = null; ";var m=e.compositeRule;e.compositeRule=h.compositeRule=!0;var I=o;if(I)for(var b,E=-1,C=I.length-1;E<C;)b=I[E+=1],(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0:e.util.schemaHasRules(b,e.RULES.all))?(h.schema=b,h.schemaPath=s+"["+E+"]",h.errSchemaPath=u+"/"+E,r+="  "+e.validate(h)+" ",h.baseId=p):r+=" var "+d+" = true; ",E&&(r+=" if ("+d+" && "+v+") { "+l+" = false; "+y+" = ["+y+", "+E+"]; } else { ",g+="}"),r+=" if ("+d+") { "+l+" = "+v+" = true; "+y+" = "+E+"; }";return e.compositeRule=h.compositeRule=m,r+=g+"if (!"+l+") {   var err =   ",!1!==e.createErrors?(r+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(r+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ",r+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&A&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),r+="} else {  errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; }",e.opts.allErrors&&(r+=" } "),r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),A=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),f=e.opts.$data&&s&&s.$data;f?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",r="schema"+a):r=s,i+="if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'string') || "),i+=" !"+(f?"(new RegExp("+r+"))":e.usePattern(s))+".test("+l+") ) {   ";var h=h||[];h.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(A)+" , params: { pattern:  ",i+=f?""+r:""+e.util.toQuotedString(s),i+="  } ",!1!==e.opts.messages&&(i+=" , message: 'should match pattern \"",i+=f?"' + "+r+" + '":""+e.util.escapeQuotes(s),i+="\"' "),e.opts.verbose&&(i+=" , schema:  ",i+=f?"validate.schema"+u:""+e.util.toQuotedString(s),i+="         , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var g=i;return i=h.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,A=!e.opts.allErrors,c="data"+(a||""),l="errs__"+i,f=e.util.copy(e),h="";f.level++;var g="valid"+f.level,d="key"+i,p="idx"+i,v=f.dataLevel=e.dataLevel+1,y="data"+v,m="dataProperties"+i,I=Object.keys(o||{}),b=e.schema.patternProperties||{},E=Object.keys(b),C=e.schema.additionalProperties,B=I.length||E.length,w=!1===C,Q="object"==typeof C&&Object.keys(C).length,k=e.opts.removeAdditional,_=w||Q||k,x=e.opts.ownProperties,S=e.baseId,O=e.schema.required;if(O&&(!e.opts.$data||!O.$data)&&O.length<e.opts.loopRequired)var D=e.util.toHash(O);if(r+="var "+l+" = errors;var "+g+" = true;",x&&(r+=" var "+m+" = undefined;"),_){if(r+=x?" "+m+" = "+m+" || Object.keys("+c+"); for (var "+p+"=0; "+p+"<"+m+".length; "+p+"++) { var "+d+" = "+m+"["+p+"]; ":" for (var "+d+" in "+c+") { ",B){if(r+=" var isAdditional"+i+" = !(false ",I.length)if(I.length>8)r+=" || validate.schema"+s+".hasOwnProperty("+d+") ";else{var R=I;if(R)for(var j=-1,M=R.length-1;j<M;)K=R[j+=1],r+=" || "+d+" == "+e.util.toQuotedString(K)+" "}if(E.length){var N=E;if(N)for(var F=-1,T=N.length-1;F<T;)ie=N[F+=1],r+=" || "+e.usePattern(ie)+".test("+d+") "}r+=" ); if (isAdditional"+i+") { "}if("all"==k)r+=" delete "+c+"["+d+"]; ";else{var L=e.errorPath,P="' + "+d+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,d,e.opts.jsonPointers)),w)if(k)r+=" delete "+c+"["+d+"]; ";else{r+=" "+g+" = false; ";var U=u;u=e.errSchemaPath+"/additionalProperties",(te=te||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { additionalProperty: '"+P+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is an invalid additional property":r+="should NOT have additional properties",r+="' "),e.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var G=r;r=te.pop(),!e.compositeRule&&A?e.async?r+=" throw new ValidationError(["+G+"]); ":r+=" validate.errors = ["+G+"]; return false; ":r+=" var err = "+G+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u=U,A&&(r+=" break; ")}else if(Q)if("failing"==k){r+=" var "+l+" = errors;  ";var q=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.schema=C,f.schemaPath=e.schemaPath+".additionalProperties",f.errSchemaPath=e.errSchemaPath+"/additionalProperties",f.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,d,e.opts.jsonPointers);var H=c+"["+d+"]";f.dataPathArr[v]=d;var Y=e.validate(f);f.baseId=S,e.util.varOccurences(Y,y)<2?r+=" "+e.util.varReplace(Y,y,H)+" ":r+=" var "+y+" = "+H+"; "+Y+" ",r+=" if (!"+g+") { errors = "+l+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+c+"["+d+"]; }  ",e.compositeRule=f.compositeRule=q}else{f.schema=C,f.schemaPath=e.schemaPath+".additionalProperties",f.errSchemaPath=e.errSchemaPath+"/additionalProperties",f.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,d,e.opts.jsonPointers);H=c+"["+d+"]";f.dataPathArr[v]=d;Y=e.validate(f);f.baseId=S,e.util.varOccurences(Y,y)<2?r+=" "+e.util.varReplace(Y,y,H)+" ":r+=" var "+y+" = "+H+"; "+Y+" ",A&&(r+=" if (!"+g+") break; ")}e.errorPath=L}B&&(r+=" } "),r+=" }  ",A&&(r+=" if ("+g+") { ",h+="}")}var J=e.opts.useDefaults&&!e.compositeRule;if(I.length){var z=I;if(z)for(var K,W=-1,V=z.length-1;W<V;){var X=o[K=z[W+=1]];if(e.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0:e.util.schemaHasRules(X,e.RULES.all)){var Z=e.util.getProperty(K),$=(H=c+Z,J&&void 0!==X.default);f.schema=X,f.schemaPath=s+Z,f.errSchemaPath=u+"/"+e.util.escapeFragment(K),f.errorPath=e.util.getPath(e.errorPath,K,e.opts.jsonPointers),f.dataPathArr[v]=e.util.toQuotedString(K);Y=e.validate(f);if(f.baseId=S,e.util.varOccurences(Y,y)<2){Y=e.util.varReplace(Y,y,H);var ee=H}else{ee=y;r+=" var "+y+" = "+H+"; "}if($)r+=" "+Y+" ";else{if(D&&D[K]){r+=" if ( "+ee+" === undefined ",x&&(r+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(K)+"') "),r+=") { "+g+" = false; ";L=e.errorPath,U=u;var te,ne=e.util.escapeQuotes(K);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(L,K,e.opts.jsonPointers)),u=e.errSchemaPath+"/required",(te=te||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+ne+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+ne+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";G=r;r=te.pop(),!e.compositeRule&&A?e.async?r+=" throw new ValidationError(["+G+"]); ":r+=" validate.errors = ["+G+"]; return false; ":r+=" var err = "+G+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u=U,e.errorPath=L,r+=" } else { "}else A?(r+=" if ( "+ee+" === undefined ",x&&(r+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(K)+"') "),r+=") { "+g+" = true; } else { "):(r+=" if ("+ee+" !== undefined ",x&&(r+=" &&   Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(K)+"') "),r+=" ) { ");r+=" "+Y+" } "}}A&&(r+=" if ("+g+") { ",h+="}")}}if(E.length){var re=E;if(re)for(var ie,ae=-1,oe=re.length-1;ae<oe;){X=b[ie=re[ae+=1]];if(e.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0:e.util.schemaHasRules(X,e.RULES.all)){f.schema=X,f.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ie),f.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ie),r+=x?" "+m+" = "+m+" || Object.keys("+c+"); for (var "+p+"=0; "+p+"<"+m+".length; "+p+"++) { var "+d+" = "+m+"["+p+"]; ":" for (var "+d+" in "+c+") { ",r+=" if ("+e.usePattern(ie)+".test("+d+")) { ",f.errorPath=e.util.getPathExpr(e.errorPath,d,e.opts.jsonPointers);H=c+"["+d+"]";f.dataPathArr[v]=d;Y=e.validate(f);f.baseId=S,e.util.varOccurences(Y,y)<2?r+=" "+e.util.varReplace(Y,y,H)+" ":r+=" var "+y+" = "+H+"; "+Y+" ",A&&(r+=" if (!"+g+") break; "),r+=" } ",A&&(r+=" else "+g+" = true; "),r+=" }  ",A&&(r+=" if ("+g+") { ",h+="}")}}}return A&&(r+=" "+h+" if ("+l+" == errors) {"),r=e.util.cleanUpCode(r)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,A=!e.opts.allErrors,c="data"+(a||""),l="errs__"+i,f=e.util.copy(e);f.level++;var h="valid"+f.level;if(r+="var "+l+" = errors;",e.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0:e.util.schemaHasRules(o,e.RULES.all)){f.schema=o,f.schemaPath=s,f.errSchemaPath=u;var g="key"+i,d="idx"+i,p="i"+i,v="' + "+g+" + '",y="data"+(f.dataLevel=e.dataLevel+1),m="dataProperties"+i,I=e.opts.ownProperties,b=e.baseId;I&&(r+=" var "+m+" = undefined; "),r+=I?" "+m+" = "+m+" || Object.keys("+c+"); for (var "+d+"=0; "+d+"<"+m+".length; "+d+"++) { var "+g+" = "+m+"["+d+"]; ":" for (var "+g+" in "+c+") { ",r+=" var startErrs"+i+" = errors; ";var E=g,C=e.compositeRule;e.compositeRule=f.compositeRule=!0;var B=e.validate(f);f.baseId=b,e.util.varOccurences(B,y)<2?r+=" "+e.util.varReplace(B,y,E)+" ":r+=" var "+y+" = "+E+"; "+B+" ",e.compositeRule=f.compositeRule=C,r+=" if (!"+h+") { for (var "+p+"=startErrs"+i+"; "+p+"<errors; "+p+"++) { vErrors["+p+"].propertyName = "+g+"; }   var err =   ",!1!==e.createErrors?(r+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { propertyName: '"+v+"' } ",!1!==e.opts.messages&&(r+=" , message: 'property name \\'"+v+"\\' is invalid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ",r+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&A&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),A&&(r+=" break; "),r+=" } }"}return A&&(r+="  if ("+l+" == errors) {"),r=e.util.cleanUpCode(r)}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,A=!e.opts.allErrors,c="data"+(a||""),l="valid"+i,f=e.opts.$data&&o&&o.$data;f&&(r+=" var schema"+i+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; ");var h="schema"+i;if(!f)if(o.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var g=[],d=o;if(d)for(var p,v=-1,y=d.length-1;v<y;){p=d[v+=1];var m=e.schema.properties[p];m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0:e.util.schemaHasRules(m,e.RULES.all))||(g[g.length]=p)}}else g=o;if(f||g.length){var I=e.errorPath,b=f||g.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(A)if(r+=" var missing"+i+"; ",b){f||(r+=" var "+h+" = validate.schema"+s+"; ");var C="' + "+(x="schema"+i+"["+(Q="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(I,x,e.opts.jsonPointers)),r+=" var "+l+" = true; ",f&&(r+=" if (schema"+i+" === undefined) "+l+" = true; else if (!Array.isArray(schema"+i+")) "+l+" = false; else {"),r+=" for (var "+Q+" = 0; "+Q+" < "+h+".length; "+Q+"++) { "+l+" = "+c+"["+h+"["+Q+"]] !== undefined ",E&&(r+=" &&   Object.prototype.hasOwnProperty.call("+c+", "+h+"["+Q+"]) "),r+="; if (!"+l+") break; } ",f&&(r+="  }  "),r+="  if (!"+l+") {   ",(_=_||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+C+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+C+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";var B=r;r=_.pop(),!e.compositeRule&&A?e.async?r+=" throw new ValidationError(["+B+"]); ":r+=" validate.errors = ["+B+"]; return false; ":r+=" var err = "+B+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { "}else{r+=" if ( ";var w=g;if(w)for(var Q=-1,k=w.length-1;Q<k;){O=w[Q+=1],Q&&(r+=" || "),r+=" ( ( "+(M=c+(j=e.util.getProperty(O)))+" === undefined ",E&&(r+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(O)+"') "),r+=") && (missing"+i+" = "+e.util.toQuotedString(e.opts.jsonPointers?O:j)+") ) "}r+=") {  ";var _;C="' + "+(x="missing"+i)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(I,x,!0):I+" + "+x),(_=_||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+C+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+C+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ";B=r;r=_.pop(),!e.compositeRule&&A?e.async?r+=" throw new ValidationError(["+B+"]); ":r+=" validate.errors = ["+B+"]; return false; ":r+=" var err = "+B+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { "}else if(b){f||(r+=" var "+h+" = validate.schema"+s+"; ");var x;C="' + "+(x="schema"+i+"["+(Q="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(I,x,e.opts.jsonPointers)),f&&(r+=" if ("+h+" && !Array.isArray("+h+")) {  var err =   ",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+C+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+C+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ",r+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+h+" !== undefined) { "),r+=" for (var "+Q+" = 0; "+Q+" < "+h+".length; "+Q+"++) { if ("+c+"["+h+"["+Q+"]] === undefined ",E&&(r+=" || ! Object.prototype.hasOwnProperty.call("+c+", "+h+"["+Q+"]) "),r+=") {  var err =   ",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+C+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+C+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ",r+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",f&&(r+="  }  ")}else{var S=g;if(S)for(var O,D=-1,R=S.length-1;D<R;){O=S[D+=1];var j=e.util.getProperty(O),M=(C=e.util.escapeQuotes(O),c+j);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(I,O,e.opts.jsonPointers)),r+=" if ( "+M+" === undefined ",E&&(r+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(O)+"') "),r+=") {  var err =   ",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+C+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+C+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),r+=" } "):r+=" {} ",r+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=I}else A&&(r+=" if (true) {");return r}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],u=e.schemaPath+e.util.getProperty(t),A=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),f="valid"+a,h=e.opts.$data&&s&&s.$data;if(h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",r="schema"+a):r=s,(s||h)&&!1!==e.opts.uniqueItems){h&&(i+=" var "+f+"; if ("+r+" === false || "+r+" === undefined) "+f+" = true; else if (typeof "+r+" != 'boolean') "+f+" = false; else { "),i+=" var i = "+l+".length , "+f+" = true , j; if (i > 1) { ";var g=e.schema.items&&e.schema.items.type,d=Array.isArray(g);if(!g||"object"==g||"array"==g||d&&(g.indexOf("object")>=0||g.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+l+"[i], "+l+"[j])) { "+f+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+l+"[i]; ";var p="checkDataType"+(d?"s":"");i+=" if ("+e.util[p](g,"item",!0)+") continue; ",d&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+f+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",h&&(i+="  }  "),i+=" if (!"+f+") {   ";var v=v||[];v.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(A)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema:  ",i+=h?"validate.schema"+u:""+s,i+="         , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),i+=" } "):i+=" {} ";var y=i;i=v.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { ")}else c&&(i+=" if (true) { ");return i}},function(e,t,n){"use strict";var r=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,t){for(var n=0;n<t.length;n++){e=JSON.parse(JSON.stringify(e));var i,a=t[n].split("/"),o=e;for(i=1;i<a.length;i++)o=o[a[i]];for(i=0;i<r.length;i++){var s=r[i],u=o[s];u&&(o[s]={anyOf:[u,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#"}]})}}return e}},function(e,t,n){"use strict";var r=n(865).MissingRef;e.exports=function e(t,n,i){var a=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof n&&(i=n,n=void 0);var o=s(t).then((function(){var e=a._addSchema(t,void 0,n);return e.validate||function e(t){try{return a._compile(t)}catch(o){if(o instanceof r)return i(o);throw o}function i(r){var i=r.missingSchema;if(A(i))throw new Error("Schema "+i+" is loaded but "+r.missingRef+" cannot be resolved");var o=a._loadingSchemas[i];return o||(o=a._loadingSchemas[i]=a._opts.loadSchema(i)).then(u,u),o.then((function(e){if(!A(i))return s(e).then((function(){A(i)||a.addSchema(e,i,void 0,n)}))})).then((function(){return e(t)}));function u(){delete a._loadingSchemas[i]}function A(e){return a._refs[e]||a._schemas[e]}}}(e)}));i&&o.then((function(e){i(null,e)}),i);return o;function s(t){var n=t.$schema;return n&&!a.getSchema(n)?e.call(a,{$ref:n},!0):Promise.resolve()}}},function(e,t,n){"use strict";var r=/^[a-z_$][a-z0-9_$-]*$/i,i=n(1126),a=n(1127);e.exports={add:function(e,t){var n=this.RULES;if(n.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!r.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(t){this.validateKeyword(t,!0);var a=t.type;if(Array.isArray(a))for(var o=0;o<a.length;o++)u(e,a[o],t);else u(e,a,t);var s=t.metaSchema;s&&(t.$data&&this._opts.$data&&(s={anyOf:[s,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#"}]}),t.validateSchema=this.compile(s,!0))}function u(e,t,r){for(var a,o=0;o<n.length;o++){var s=n[o];if(s.type==t){a=s;break}}a||(a={type:t,rules:[]},n.push(a));var u={keyword:e,definition:r,custom:!0,code:i,implements:r.implements};a.rules.push(u),n.custom[e]=u}return n.keywords[e]=n.all[e]=!0,this},get:function(e){var t=this.RULES.custom[e];return t?t.definition:this.RULES.keywords[e]||!1},remove:function(e){var t=this.RULES;delete t.keywords[e],delete t.all[e],delete t.custom[e];for(var n=0;n<t.length;n++)for(var r=t[n].rules,i=0;i<r.length;i++)if(r[i].keyword==e){r.splice(i,1);break}return this},validate:function e(t,n){e.errors=null;var r=this._validateKeyword=this._validateKeyword||this.compile(a,!0);if(r(t))return!0;if(e.errors=r.errors,n)throw new Error("custom keyword definition is invalid: "+this.errorsText(r.errors));return!1}}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,i,a=" ",o=e.level,s=e.dataLevel,u=e.schema[t],A=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,f="data"+(s||""),h="valid"+o,g="errs__"+o,d=e.opts.$data&&u&&u.$data;d?(a+=" var schema"+o+" = "+e.util.getData(u.$data,s,e.dataPathArr)+"; ",i="schema"+o):i=u;var p,v,y,m,I,b="definition"+o,E=this.definition,C="";if(d&&E.$data){I="keywordValidate"+o;var B=E.validateSchema;a+=" var "+b+" = RULES.custom['"+t+"'].definition; var "+I+" = "+b+".validate;"}else{if(!(m=e.useCustomRule(this,u,e.schema,e)))return;i="validate.schema"+A,I=m.code,p=E.compile,v=E.inline,y=E.macro}var w=I+".errors",Q="i"+o,k="ruleErr"+o,_=E.async;if(_&&!e.async)throw new Error("async keyword in sync schema");if(v||y||(a+=w+" = null;"),a+="var "+g+" = errors;var "+h+";",d&&E.$data&&(C+="}",a+=" if ("+i+" === undefined) { "+h+" = true; } else { ",B&&(C+="}",a+=" "+h+" = "+b+".validateSchema("+i+"); if ("+h+") { ")),v)E.statements?a+=" "+m.validate+" ":a+=" "+h+" = "+m.validate+"; ";else if(y){var x=e.util.copy(e);C="";x.level++;var S="valid"+x.level;x.schema=m.validate,x.schemaPath="";var O=e.compositeRule;e.compositeRule=x.compositeRule=!0;var D=e.validate(x).replace(/validate\.schema/g,I);e.compositeRule=x.compositeRule=O,a+=" "+D}else{(N=N||[]).push(a),a="",a+="  "+I+".call( ",e.opts.passContext?a+="this":a+="self",p||!1===E.schema?a+=" , "+f+" ":a+=" , "+i+" , "+f+" , validate.schema"+e.schemaPath+" ",a+=" , (dataPath || '')",'""'!=e.errorPath&&(a+=" + "+e.errorPath);var R=s?"data"+(s-1||""):"parentData",j=s?e.dataPathArr[s]:"parentDataProperty",M=a+=" , "+R+" , "+j+" , rootData )  ";a=N.pop(),!1===E.errors?(a+=" "+h+" = ",_&&(a+="await "),a+=M+"; "):a+=_?" var "+(w="customErrors"+o)+" = null; try { "+h+" = await "+M+"; } catch (e) { "+h+" = false; if (e instanceof ValidationError) "+w+" = e.errors; else throw e; } ":" "+w+" = null; "+h+" = "+M+"; "}if(E.modifying&&(a+=" if ("+R+") "+f+" = "+R+"["+j+"];"),a+=""+C,E.valid)l&&(a+=" if (true) { ");else{var N;a+=" if ( ",void 0===E.valid?(a+=" !",a+=y?""+S:""+h):a+=" "+!E.valid+" ",a+=") { ",r=this.keyword,(N=N||[]).push(a),a="",(N=N||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(r||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(a+=" , schema: validate.schema"+A+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ";var F=a;a=N.pop(),!e.compositeRule&&l?e.async?a+=" throw new ValidationError(["+F+"]); ":a+=" validate.errors = ["+F+"]; return false; ":a+=" var err = "+F+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var T=a;a=N.pop(),v?E.errors?"full"!=E.errors&&(a+="  for (var "+Q+"="+g+"; "+Q+"<errors; "+Q+"++) { var "+k+" = vErrors["+Q+"]; if ("+k+".dataPath === undefined) "+k+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+k+".schemaPath === undefined) { "+k+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(a+=" "+k+".schema = "+i+"; "+k+".data = "+f+"; "),a+=" } "):!1===E.errors?a+=" "+T+" ":(a+=" if ("+g+" == errors) { "+T+" } else {  for (var "+Q+"="+g+"; "+Q+"<errors; "+Q+"++) { var "+k+" = vErrors["+Q+"]; if ("+k+".dataPath === undefined) "+k+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+k+".schemaPath === undefined) { "+k+'.schemaPath = "'+c+'"; } ',e.opts.verbose&&(a+=" "+k+".schema = "+i+"; "+k+".data = "+f+"; "),a+=" } } "):y?(a+="   var err =   ",!1!==e.createErrors?(a+=" { keyword: '"+(r||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(a+=" , schema: validate.schema"+A+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),a+=" } "):a+=" {} ",a+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&l&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; ")):!1===E.errors?a+=" "+T+" ":(a+=" if (Array.isArray("+w+")) { if (vErrors === null) vErrors = "+w+"; else vErrors = vErrors.concat("+w+"); errors = vErrors.length;  for (var "+Q+"="+g+"; "+Q+"<errors; "+Q+"++) { var "+k+" = vErrors["+Q+"]; if ("+k+".dataPath === undefined) "+k+".dataPath = (dataPath || '') + "+e.errorPath+";  "+k+'.schemaPath = "'+c+'";  ',e.opts.verbose&&(a+=" "+k+".schema = "+i+"; "+k+".data = "+f+"; "),a+=" } } else { "+T+" } "),a+=" } ",l&&(a+=" else { ")}return a}},function(e,t,n){"use strict";var r=n(1007);e.exports={$id:"https://github.com/epoberezkin/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:r.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:r.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}},function(e,t,n){var r=n(316),i=n(482),a=n(203),o=r?r.isConcatSpreadable:void 0;e.exports=function(e){return a(e)||i(e)||!!(o&&e&&e[o])}},function(e,t,n){var r=n(495),i=n(1015),a=n(1016),o=n(496),s=n(1136),u=n(497);e.exports=function(e,t,n){var A=-1,c=i,l=e.length,f=!0,h=[],g=h;if(n)f=!1,c=a;else if(l>=200){var d=t?null:s(e);if(d)return u(d);f=!1,c=o,g=new r}else g=t?[]:h;e:for(;++A<l;){var p=e[A],v=t?t(p):p;if(p=n||0!==p?p:0,f&&v===v){for(var y=g.length;y--;)if(g[y]===v)continue e;t&&g.push(v),h.push(p)}else c(g,v,n)||(g!==h&&g.push(v),h.push(p))}return h}},function(e,t,n){var r=n(1133),i=n(1134),a=n(1135);e.exports=function(e,t,n){return t===t?a(e,t,n):r(e,i,n)}},function(e,t){e.exports=function(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}},function(e,t){e.exports=function(e){return e!==e}},function(e,t){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}},function(e,t,n){var r=n(524),i=n(1137),a=n(497),o=r&&1/a(new r([,-0]))[1]==1/0?function(e){return new r(e)}:i;e.exports=o},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(495),i=n(1015),a=n(1016),o=n(832),s=n(483),u=n(496);e.exports=function(e,t,n,A){var c=-1,l=i,f=!0,h=e.length,g=[],d=t.length;if(!h)return g;n&&(t=o(t,s(n))),A?(l=a,f=!1):t.length>=200&&(l=u,f=!1,t=new r(t));e:for(;++c<h;){var p=e[c],v=null==n?p:n(p);if(p=A||0!==p?p:0,f&&v===v){for(var y=d;y--;)if(t[y]===v)continue e;g.push(p)}else l(t,v,A)||g.push(p)}return g}},function(e,t,n){e.exports={default:n(1140),__esModule:!0}},function(e,t,n){n(1141),e.exports=n(505).Object.assign},function(e,t,n){var r=n(717);r(r.S+r.F,"Object",{assign:n(1143)})},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){"use strict";var r=n(506),i=n(786),a=n(873),o=n(789),s=n(874),u=n(1021),A=Object.assign;e.exports=!A||n(761)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=A({},e)[n]||Object.keys(A({},t)).join("")!=r}))?function(e,t){for(var n=s(e),A=arguments.length,c=1,l=a.f,f=o.f;A>c;)for(var h,g=u(arguments[c++]),d=l?i(g).concat(l(g)):i(g),p=d.length,v=0;p>v;)h=d[v++],r&&!f.call(g,h)||(n[h]=g[h]);return n}:A},function(e,t,n){var r=n(720),i=n(1145),a=n(1146);e.exports=function(e){return function(t,n,o){var s,u=r(t),A=i(u.length),c=a(o,A);if(e&&n!=n){for(;A>c;)if((s=u[c++])!=s)return!0}else for(;A>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var r=n(869),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(869),i=Math.max,a=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):a(e,t)}},function(e,t,n){n(1148);var r=n(505).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},function(e,t,n){var r=n(717);r(r.S+r.F*!n(506),"Object",{defineProperty:n(525).f})},function(e,t,n){e.exports={default:n(1150),__esModule:!0}},function(e,t,n){n(1151),n(1157),e.exports=n(878).f("iterator")},function(e,t,n){"use strict";var r=n(1152)(!0);n(1025)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){var r=n(869),i=n(868);e.exports=function(e){return function(t,n){var a,o,s=String(i(t)),u=r(n),A=s.length;return u<0||u>=A?e?"":void 0:(a=s.charCodeAt(u))<55296||a>56319||u+1===A||(o=s.charCodeAt(u+1))<56320||o>57343?e?s.charAt(u):a:e?s.slice(u,u+2):o-56320+(a-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(876),i=n(785),a=n(877),o={};n(718)(o,n(721)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(o,{next:i(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var r=n(525),i=n(760),a=n(786);e.exports=n(506)?Object.defineProperties:function(e,t){i(e);for(var n,o=a(t),s=o.length,u=0;s>u;)r.f(e,n=o[u++],t[n]);return e}},function(e,t,n){var r=n(504).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(526),i=n(874),a=n(870)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t,n){n(1158);for(var r=n(504),i=n(718),a=n(875),o=n(721)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<s.length;u++){var A=s[u],c=r[A],l=c&&c.prototype;l&&!l[o]&&i(l,o,A),a[A]=a.Array}},function(e,t,n){"use strict";var r=n(1159),i=n(1160),a=n(875),o=n(720);e.exports=n(1025)(Array,"Array",(function(e,t){this._t=o(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){e.exports={default:n(1162),__esModule:!0}},function(e,t,n){n(1163),n(1168),n(1169),n(1170),e.exports=n(505).Symbol},function(e,t,n){"use strict";var r=n(504),i=n(526),a=n(506),o=n(717),s=n(1026),u=n(1164).KEY,A=n(761),c=n(871),l=n(877),f=n(788),h=n(721),g=n(878),d=n(879),p=n(1165),v=n(1166),y=n(760),m=n(719),I=n(874),b=n(720),E=n(867),C=n(785),B=n(876),w=n(1167),Q=n(1028),k=n(873),_=n(525),x=n(786),S=Q.f,O=_.f,D=w.f,R=r.Symbol,j=r.JSON,M=j&&j.stringify,N=h("_hidden"),F=h("toPrimitive"),T={}.propertyIsEnumerable,L=c("symbol-registry"),P=c("symbols"),U=c("op-symbols"),G=Object.prototype,q="function"==typeof R&&!!k.f,H=r.QObject,Y=!H||!H.prototype||!H.prototype.findChild,J=a&&A((function(){return 7!=B(O({},"a",{get:function(){return O(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=S(G,t);r&&delete G[t],O(e,t,n),r&&e!==G&&O(G,t,r)}:O,z=function(e){var t=P[e]=B(R.prototype);return t._k=e,t},K=q&&"symbol"==typeof R.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof R},W=function(e,t,n){return e===G&&W(U,t,n),y(e),t=E(t,!0),y(n),i(P,t)?(n.enumerable?(i(e,N)&&e[N][t]&&(e[N][t]=!1),n=B(n,{enumerable:C(0,!1)})):(i(e,N)||O(e,N,C(1,{})),e[N][t]=!0),J(e,t,n)):O(e,t,n)},V=function(e,t){y(e);for(var n,r=p(t=b(t)),i=0,a=r.length;a>i;)W(e,n=r[i++],t[n]);return e},X=function(e){var t=T.call(this,e=E(e,!0));return!(this===G&&i(P,e)&&!i(U,e))&&(!(t||!i(this,e)||!i(P,e)||i(this,N)&&this[N][e])||t)},Z=function(e,t){if(e=b(e),t=E(t,!0),e!==G||!i(P,t)||i(U,t)){var n=S(e,t);return!n||!i(P,t)||i(e,N)&&e[N][t]||(n.enumerable=!0),n}},$=function(e){for(var t,n=D(b(e)),r=[],a=0;n.length>a;)i(P,t=n[a++])||t==N||t==u||r.push(t);return r},ee=function(e){for(var t,n=e===G,r=D(n?U:b(e)),a=[],o=0;r.length>o;)!i(P,t=r[o++])||n&&!i(G,t)||a.push(P[t]);return a};q||(s((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function t(n){this===G&&t.call(U,n),i(this,N)&&i(this[N],e)&&(this[N][e]=!1),J(this,e,C(1,n))};return a&&Y&&J(G,e,{configurable:!0,set:t}),z(e)}).prototype,"toString",(function(){return this._k})),Q.f=Z,_.f=W,n(1027).f=w.f=$,n(789).f=X,k.f=ee,a&&!n(787)&&s(G,"propertyIsEnumerable",X,!0),g.f=function(e){return z(h(e))}),o(o.G+o.W+o.F*!q,{Symbol:R});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)h(te[ne++]);for(var re=x(h.store),ie=0;re.length>ie;)d(re[ie++]);o(o.S+o.F*!q,"Symbol",{for:function(e){return i(L,e+="")?L[e]:L[e]=R(e)},keyFor:function(e){if(!K(e))throw TypeError(e+" is not a symbol!");for(var t in L)if(L[t]===e)return t},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),o(o.S+o.F*!q,"Object",{create:function(e,t){return void 0===t?B(e):V(B(e),t)},defineProperty:W,defineProperties:V,getOwnPropertyDescriptor:Z,getOwnPropertyNames:$,getOwnPropertySymbols:ee});var ae=A((function(){k.f(1)}));o(o.S+o.F*ae,"Object",{getOwnPropertySymbols:function(e){return k.f(I(e))}}),j&&o(o.S+o.F*(!q||A((function(){var e=R();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(m(t)||void 0!==e)&&!K(e))return v(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!K(t))return t}),r[1]=t,M.apply(j,r)}}),R.prototype[F]||n(718)(R.prototype,F,R.prototype.valueOf),l(R,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(e,t,n){var r=n(788)("meta"),i=n(719),a=n(526),o=n(525).f,s=0,u=Object.isExtensible||function(){return!0},A=!n(761)((function(){return u(Object.preventExtensions({}))})),c=function(e){o(e,r,{value:{i:"O"+ ++s,w:{}}})},l=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!u(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!a(e,r)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return A&&l.NEED&&u(e)&&!a(e,r)&&c(e),e}}},function(e,t,n){var r=n(786),i=n(873),a=n(789);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var o,s=n(e),u=a.f,A=0;s.length>A;)u.call(e,o=s[A++])&&t.push(o);return t}},function(e,t,n){var r=n(1022);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(720),i=n(1027).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?function(e){try{return i(e)}catch(t){return o.slice()}}(e):i(r(e))}},function(e,t){},function(e,t,n){n(879)("asyncIterator")},function(e,t,n){n(879)("observable")},function(e,t,n){e.exports={default:n(1172),__esModule:!0}},function(e,t,n){n(1173),e.exports=n(505).Object.setPrototypeOf},function(e,t,n){var r=n(717);r(r.S,"Object",{setPrototypeOf:n(1174).set})},function(e,t,n){var r=n(719),i=n(760),a=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(1017)(Function.call,n(1028).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(i){t=!0}return function(e,n){return a(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:a}},function(e,t,n){e.exports={default:n(1176),__esModule:!0}},function(e,t,n){n(1177);var r=n(505).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(717);r(r.S,"Object",{create:n(876)})},function(e,t,n){(function(t){(function(){var n,r,i,a,o,s;"undefined"!==typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!==typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-o)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),s=1e9*t.uptime(),o=a-s):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(this,n(86))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlphaPicker=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=u(n(0)),a=u(n(124)),o=n(235),s=u(n(1244));function u(e){return e&&e.__esModule?e:{default:e}}var A=t.AlphaPicker=function(e){var t=e.rgb,n=e.hsl,s=e.width,u=e.height,A=e.onChange,c=e.direction,l=e.style,f=e.renderers,h=e.pointer,g=e.className,d=void 0===g?"":g,p=(0,a.default)({default:{picker:{position:"relative",width:s,height:u},alpha:{radius:"2px",style:l}}});return i.default.createElement("div",{style:p.picker,className:"alpha-picker "+d},i.default.createElement(o.Alpha,r({},p.alpha,{rgb:t,hsl:n,pointer:h,renderers:f,onChange:A,direction:c})))};A.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:s.default},t.default=(0,o.ColorWrap)(A)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=s(n(1181)),i=s(n(880)),a=s(n(1032)),o=s(n(507));function s(e){return e&&e.__esModule?e:{default:e}}var u=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,o.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return n.push(e)})):(0,a.default)(t)?(0,i.default)(t,(function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)})):(0,r.default)(t)&&n.push(t)})),n};t.default=u},function(e,t,n){var r=n(239),i=n(203),a=n(197);e.exports=function(e){return"string"==typeof e||!i(e)&&a(e)&&"[object String]"==r(e)}},function(e,t){e.exports=function(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var u=o[e?s:++i];if(!1===n(a[u],u,a))break}return t}}},function(e,t,n){var r=n(1184),i=n(1187),a=n(737),o=n(203),s=n(1197);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?o(e)?i(e[0],e[1]):r(e):s(e)}},function(e,t,n){var r=n(1185),i=n(1186),a=n(1034);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(481),i=n(494);e.exports=function(e,t,n,a){var o=n.length,s=o,u=!a;if(null==e)return!s;for(e=Object(e);o--;){var A=n[o];if(u&&A[2]?A[1]!==e[A[0]]:!(A[0]in e))return!1}for(;++o<s;){var c=(A=n[o])[0],l=e[c],f=A[1];if(u&&A[2]){if(void 0===l&&!(c in e))return!1}else{var h=new r;if(a)var g=a(l,f,c,e,t,h);if(!(void 0===g?i(f,l,3,a,h):g))return!1}}return!0}},function(e,t,n){var r=n(1033),i=n(394);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var a=t[n],o=e[a];t[n]=[a,o,r(o)]}return t}},function(e,t,n){var r=n(494),i=n(1188),a=n(1194),o=n(882),s=n(1033),u=n(1034),A=n(790);e.exports=function(e,t){return o(e)&&s(t)?u(A(e),t):function(n){var o=i(n,e);return void 0===o&&o===t?a(n,e):r(t,o,3)}}},function(e,t,n){var r=n(1035);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},function(e,t,n){var r=n(1190),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(a,"$1"):n||e)})),t}));e.exports=o},function(e,t,n){var r=n(1191);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(390);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},function(e,t,n){var r=n(1193);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(316),i=n(832),a=n(203),o=n(478),s=r?r.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return i(t,e)+"";if(o(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){var r=n(1195),i=n(1196);e.exports=function(e,t){return null!=e&&i(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(1036),i=n(482),a=n(203),o=n(443),s=n(392),u=n(790);e.exports=function(e,t,n){for(var A=-1,c=(t=r(t,e)).length,l=!1;++A<c;){var f=u(t[A]);if(!(l=null!=e&&n(e,f)))break;e=e[f]}return l||++A!=c?l:!!(c=null==e?0:e.length)&&s(c)&&o(f,c)&&(a(e)||i(e))}},function(e,t,n){var r=n(1198),i=n(1199),a=n(882),o=n(790);e.exports=function(e){return a(e)?r(o(e)):i(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(1035);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(1037),i=n(349);e.exports=function(e,t){var n=-1,a=i(e)?Array(e.length):[];return r(e,(function(e,r,i){a[++n]=t(e,r,i)})),a}},function(e,t,n){var r=n(349);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var a=n.length,o=t?a:-1,s=Object(n);(t?o--:++o<a)&&!1!==i(s[o],o,s););return n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeClasses=void 0;var r=o(n(880)),i=o(n(1203)),a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function o(e){return e&&e.__esModule?e:{default:e}}var s=t.mergeClasses=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,i.default)(e.default)||{};return t.map((function(t){var i=e[t];return i&&(0,r.default)(i,(function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],i[t])})),t})),n};t.default=s},function(e,t,n){var r=n(1204);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(481),i=n(1038),a=n(1039),o=n(1205),s=n(1206),u=n(1040),A=n(1041),c=n(1209),l=n(1210),f=n(519),h=n(1211),g=n(484),d=n(1212),p=n(1213),v=n(1044),y=n(203),m=n(372),I=n(1218),b=n(195),E=n(1220),C=n(394),B={};B["[object Arguments]"]=B["[object Array]"]=B["[object ArrayBuffer]"]=B["[object DataView]"]=B["[object Boolean]"]=B["[object Date]"]=B["[object Float32Array]"]=B["[object Float64Array]"]=B["[object Int8Array]"]=B["[object Int16Array]"]=B["[object Int32Array]"]=B["[object Map]"]=B["[object Number]"]=B["[object Object]"]=B["[object RegExp]"]=B["[object Set]"]=B["[object String]"]=B["[object Symbol]"]=B["[object Uint8Array]"]=B["[object Uint8ClampedArray]"]=B["[object Uint16Array]"]=B["[object Uint32Array]"]=!0,B["[object Error]"]=B["[object Function]"]=B["[object WeakMap]"]=!1,e.exports=function e(t,n,w,Q,k,_){var x,S=1&n,O=2&n,D=4&n;if(w&&(x=k?w(t,Q,k,_):w(t)),void 0!==x)return x;if(!b(t))return t;var R=y(t);if(R){if(x=d(t),!S)return A(t,x)}else{var j=g(t),M="[object Function]"==j||"[object GeneratorFunction]"==j;if(m(t))return u(t,S);if("[object Object]"==j||"[object Arguments]"==j||M&&!k){if(x=O||M?{}:v(t),!S)return O?l(t,s(x,t)):c(t,o(x,t))}else{if(!B[j])return k?t:{};x=p(t,j,S)}}_||(_=new r);var N=_.get(t);if(N)return N;_.set(t,x),E(t)?t.forEach((function(r){x.add(e(r,n,w,r,t,_))})):I(t)&&t.forEach((function(r,i){x.set(i,e(r,n,w,i,t,_))}));var F=D?O?h:f:O?keysIn:C,T=R?void 0:F(t);return i(T||t,(function(r,i){T&&(r=t[i=r]),a(x,i,e(r,n,w,i,t,_))})),x}},function(e,t,n){var r=n(762),i=n(394);e.exports=function(e,t){return e&&r(t,i(t),e)}},function(e,t,n){var r=n(762),i=n(791);e.exports=function(e,t){return e&&r(t,i(t),e)}},function(e,t,n){var r=n(195),i=n(501),a=n(1208),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=i(e),n=[];for(var s in e)("constructor"!=s||!t&&o.call(e,s))&&n.push(s);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){var r=n(762),i=n(499);e.exports=function(e,t){return r(e,i(e),t)}},function(e,t,n){var r=n(762),i=n(1042);e.exports=function(e,t){return r(e,i(e),t)}},function(e,t,n){var r=n(520),i=n(1042),a=n(791);e.exports=function(e){return r(e,a,i)}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(884),i=n(1214),a=n(1215),o=n(1216),s=n(1043);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return i(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return a(e);case"[object Set]":return new u;case"[object Symbol]":return o(e)}}},function(e,t,n){var r=n(884);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(316),i=r?r.prototype:void 0,a=i?i.valueOf:void 0;e.exports=function(e){return a?Object(a.call(e)):{}}},function(e,t,n){var r=n(195),i=Object.create,a=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=a},function(e,t,n){var r=n(1219),i=n(483),a=n(500),o=a&&a.isMap,s=o?i(o):r;e.exports=s},function(e,t,n){var r=n(484),i=n(197);e.exports=function(e){return i(e)&&"[object Map]"==r(e)}},function(e,t,n){var r=n(1221),i=n(483),a=n(500),o=a&&a.isSet,s=o?i(o):r;e.exports=s},function(e,t,n){var r=n(484),i=n(197);e.exports=function(e){return i(e)&&"[object Set]"==r(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.autoprefix=void 0;var r,i=n(880),a=(r=i)&&r.__esModule?r:{default:r},o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};var s={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var t=e&&e.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(e,t){var n=t[e];return n||{extend:e}}},u=t.autoprefix=function(e){var t={};return(0,a.default)(e,(function(e,n){var r={};(0,a.default)(e,(function(e,t){var n=s[t];n?r=o({},r,n(e)):r[t]=e})),t[n]=r})),t};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hover=void 0;var r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(0),o=(r=a)&&r.__esModule?r:{default:r};function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function A(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=t.hover=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,a,A;s(this,r);for(var c=arguments.length,l=Array(c),f=0;f<c;f++)l[f]=arguments[f];return a=A=u(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(l))),A.state={hover:!1},A.handleMouseOver=function(){return A.setState({hover:!0})},A.handleMouseOut=function(){return A.setState({hover:!1})},A.render=function(){return o.default.createElement(t,{onMouseOver:A.handleMouseOver,onMouseOut:A.handleMouseOut},o.default.createElement(e,i({},A.props,A.state)))},u(A,a)}return A(r,n),r}(o.default.Component)};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.active=void 0;var r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(0),o=(r=a)&&r.__esModule?r:{default:r};function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function A(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=t.active=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,a,A;s(this,r);for(var c=arguments.length,l=Array(c),f=0;f<c;f++)l[f]=arguments[f];return a=A=u(this,(n=r.__proto__||Object.getPrototypeOf(r)).call.apply(n,[this].concat(l))),A.state={active:!1},A.handleMouseDown=function(){return A.setState({active:!0})},A.handleMouseUp=function(){return A.setState({active:!1})},A.render=function(){return o.default.createElement(t,{onMouseDown:A.handleMouseDown,onMouseUp:A.handleMouseUp},o.default.createElement(e,i({},A.props,A.state)))},u(A,a)}return A(r,n),r}(o.default.Component)};t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){var n={},r=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2===0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=c(a),s=c(n(124)),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1227)),A=c(n(885));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var h=t.Alpha=function(e){function t(){var e,n,r;l(this,t);for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=r=f(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.handleChange=function(e){var t=u.calculateChange(e,r.props.hsl,r.props.direction,r.props.a,r.container);t&&"function"===typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleChange),window.removeEventListener("mouseup",r.handleMouseUp)},f(r,n)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,n=(0,s.default)({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n           rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n           rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:r({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return o.default.createElement("div",{style:n.alpha},o.default.createElement("div",{style:n.checkboard},o.default.createElement(A.default,{renderers:this.props.renderers})),o.default.createElement("div",{style:n.gradient}),o.default.createElement("div",{style:n.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},o.default.createElement("div",{style:n.pointer},this.props.pointer?o.default.createElement(this.props.pointer,this.props):o.default.createElement("div",{style:n.slider}))))}}]),t}(a.PureComponent||a.Component);t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.calculateChange=function(e,t,n,r,i){var a=i.clientWidth,o=i.clientHeight,s="number"===typeof e.pageX?e.pageX:e.touches[0].pageX,u="number"===typeof e.pageY?e.pageY:e.touches[0].pageY,A=s-(i.getBoundingClientRect().left+window.pageXOffset),c=u-(i.getBoundingClientRect().top+window.pageYOffset);if("vertical"===n){var l=void 0;if(l=c<0?0:c>o?1:Math.round(100*c/o)/100,t.a!==l)return{h:t.h,s:t.s,l:t.l,a:l,source:"rgb"}}else{var f=void 0;if(r!==(f=A<0?0:A>a?1:Math.round(100*A/a)/100))return{h:t.h,s:t.s,l:t.l,a:f,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},i=t.render=function(e,t,n,r){if("undefined"===typeof document&&!r)return null;var i=r?new r:document.createElement("canvas");i.width=2*n,i.height=2*n;var a=i.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,i.width,i.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),i.toDataURL()):null};t.get=function(e,t,n,a){var o=e+"-"+t+"-"+n+(a?"-server":"");if(r[o])return r[o];var s=i(e,t,n,a);return r[o]=s,s}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=s(i),o=s(n(124));function s(e){return e&&e.__esModule?e:{default:e}}var u=[38,40],A=t.EditableInput=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(e){n.setUpdatedValue(e.target.value,e)},n.handleKeyDown=function(e){var t,r=function(e){return Number(String(e).replace(/%/g,""))}(e.target.value);if(!isNaN(r)&&(t=e.keyCode,u.indexOf(t)>-1)){var i=n.getArrowOffset(),a=38===e.keyCode?r+i:r-i;n.setUpdatedValue(a,e)}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t);var r,i=function(e){return String(e).indexOf("%")>-1}(t.target.value);this.setState({value:i?(r=e,r+"%"):e})}},{key:"render",value:function(){var e=this,t=(0,o.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(i.PureComponent||i.Component);t.default=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=u(i),o=u(n(124)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1231));function u(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var l=t.Hue=function(e){function t(){var e,n,r;A(this,t);for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=r=c(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.handleChange=function(e){var t=s.calculateChange(e,r.props.direction,r.props.hsl,r.container);t&&"function"===typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},c(r,n)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,n=void 0===t?"horizontal":t,r=(0,o.default)({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===n});return a.default.createElement("div",{style:r.hue},a.default.createElement("div",{className:"hue-"+n,style:r.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},a.default.createElement("style",null,"\n            .hue-horizontal {\n              background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n                33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n              background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n                17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n            }\n\n            .hue-vertical {\n              background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n                #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n              background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n                #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n            }\n          "),a.default.createElement("div",{style:r.pointer},this.props.pointer?a.default.createElement(this.props.pointer,this.props):a.default.createElement("div",{style:r.slider}))))}}]),t}(i.PureComponent||i.Component);t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.calculateChange=function(e,t,n,r){var i=r.clientWidth,a=r.clientHeight,o="number"===typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"===typeof e.pageY?e.pageY:e.touches[0].pageY,u=o-(r.getBoundingClientRect().left+window.pageXOffset),A=s-(r.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var c=void 0;if(A<0)c=359;else if(A>a)c=0;else{c=360*(-100*A/a+100)/100}if(n.h!==c)return{h:c,s:n.s,l:n.l,a:n.a,source:"rgb"}}else{var l=void 0;if(u<0)l=0;else if(u>i)l=359;else{l=360*(100*u/i)/100}if(n.h!==l)return{h:l,s:n.s,l:n.l,a:n.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=s(n(0)),i=s(n(28)),a=s(n(124)),o=s(n(350));function s(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,i=e.background,s=e.children,u=e.styles,A=void 0===u?{}:u,c=(0,a.default)((0,o.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:i}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},A),{"zDepth-1":1===t});return r.default.createElement("div",{style:c.wrap},r.default.createElement("div",{style:c.bg}),r.default.createElement("div",{style:c.content},s))};u.propTypes={background:i.default.string,zDepth:i.default.oneOf([0,1,2,3,4,5]),radius:i.default.number,styles:i.default.object},u.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}},t.default=u},function(e,t,n){var r=n(481),i=n(1045),a=n(1030),o=n(1234),s=n(195),u=n(791),A=n(1046);e.exports=function e(t,n,c,l,f){t!==n&&a(n,(function(a,u){if(f||(f=new r),s(a))o(t,n,u,c,e,l,f);else{var h=l?l(A(t,u),a,u+"",t,n,f):void 0;void 0===h&&(h=a),i(t,u,h)}}),u)}},function(e,t,n){var r=n(1045),i=n(1040),a=n(1043),o=n(1041),s=n(1044),u=n(482),A=n(203),c=n(831),l=n(372),f=n(389),h=n(195),g=n(1032),d=n(391),p=n(1046),v=n(1235);e.exports=function(e,t,n,y,m,I,b){var E=p(e,n),C=p(t,n),B=b.get(C);if(B)r(e,n,B);else{var w=I?I(E,C,n+"",e,t,b):void 0,Q=void 0===w;if(Q){var k=A(C),_=!k&&l(C),x=!k&&!_&&d(C);w=C,k||_||x?A(E)?w=E:c(E)?w=o(E):_?(Q=!1,w=i(C,!0)):x?(Q=!1,w=a(C,!0)):w=[]:g(C)||u(C)?(w=E,u(E)?w=v(E):h(E)&&!f(E)||(w=s(C))):Q=!1}Q&&(b.set(C,w),m(w,C,y,I,b),b.delete(C)),r(e,n,w)}}},function(e,t,n){var r=n(762),i=n(791);e.exports=function(e){return r(e,i(e))}},function(e,t,n){var r=n(830),i=n(747);e.exports=function(e){return r((function(t,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(a--,o):void 0,s&&i(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),t=Object(t);++r<a;){var u=n[r];u&&e(t,u,r,o)}return t}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=A(i),o=A(n(124)),s=A(n(1238)),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1239));function A(e){return e&&e.__esModule?e:{default:e}}var c=t.Saturation=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleChange=function(e){"function"===typeof n.props.onChange&&n.throttle(n.props.onChange,u.calculateChange(e,n.props.hsl,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e),window.addEventListener("mousemove",n.handleChange),window.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=(0,s.default)((function(e,t,n){e(t,n)}),50),n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},n=t.color,r=t.white,i=t.black,s=t.pointer,u=t.circle,A=(0,o.default)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n            0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:r,black:i,pointer:s,circle:u}},{custom:!!this.props.style});return a.default.createElement("div",{style:A.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},a.default.createElement("style",null,"\n          .saturation-white {\n            background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n            background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n          }\n          .saturation-black {\n            background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n            background: linear-gradient(to top, #000, rgba(0,0,0,0));\n          }\n        "),a.default.createElement("div",{style:A.white,className:"saturation-white"},a.default.createElement("div",{style:A.black,className:"saturation-black"}),a.default.createElement("div",{style:A.pointer},this.props.pointer?a.default.createElement(this.props.pointer,this.props):a.default.createElement("div",{style:A.circle}))))}}]),t}(i.PureComponent||i.Component);t.default=c},function(e,t,n){var r=n(273),i=n(195);e.exports=function(e,t,n){var a=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(n)&&(a="leading"in n?!!n.leading:a,o="trailing"in n?!!n.trailing:o),r(e,t,{leading:a,maxWait:t,trailing:o})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.calculateChange=function(e,t,n){var r=n.getBoundingClientRect(),i=r.width,a=r.height,o="number"===typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"===typeof e.pageY?e.pageY:e.touches[0].pageY,u=o-(n.getBoundingClientRect().left+window.pageXOffset),A=s-(n.getBoundingClientRect().top+window.pageYOffset);u<0?u=0:u>i&&(u=i),A<0?A=0:A>a&&(A=a);var c=u/i,l=1-A/a;return{h:t.h,s:c,v:l,a:t.a,source:"rgb"}}},function(e,t,n){e.exports=n(1241)},function(e,t,n){var r=n(1038),i=n(1037),a=n(1031),o=n(203);e.exports=function(e,t){return(o(e)?r:i)(e,a(t))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=u(n(0)),a=u(n(124)),o=n(1243),s=u(n(885));function u(e){return e&&e.__esModule?e:{default:e}}var A=t.Swatch=function(e){var t=e.color,n=e.style,o=e.onClick,u=void 0===o?function(){}:o,A=e.onHover,c=e.title,l=void 0===c?t:c,f=e.children,h=e.focus,g=e.focusStyle,d=void 0===g?{}:g,p="transparent"===t,v=(0,a.default)({default:{swatch:r({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,h?d:{})}}),y={};return A&&(y.onMouseOver=function(e){return A(t,e)}),i.default.createElement("div",r({style:v.swatch,onClick:function(e){return u(t,e)},title:l,tabIndex:0,onKeyDown:function(e){return 13===e.keyCode&&u(t,e)}},y),f,p&&i.default.createElement(s.default,{borderRadius:v.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};t.default=(0,o.handleFocus)(A)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleFocus=void 0;var r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(){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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),s=(r=o)&&r.__esModule?r:{default:r};function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function c(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.handleFocus=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;u(this,r);for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];return t=n=A(this,(e=r.__proto__||Object.getPrototypeOf(r)).call.apply(e,[this].concat(a))),n.state={focus:!1},n.handleFocus=function(){return n.setState({focus:!0})},n.handleBlur=function(){return n.setState({focus:!1})},A(n,t)}return c(r,n),a(r,[{key:"render",value:function(){return s.default.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},s.default.createElement(e,i({},this.props,this.state)))}}]),r}(s.default.Component)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlphaPointer=void 0;var r=a(n(0)),i=a(n(124));function a(e){return e&&e.__esModule?e:{default:e}}var o=t.AlphaPointer=function(e){var t=e.direction,n=(0,i.default)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return r.default.createElement("div",{style:n.picker})};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Block=void 0;var r=c(n(0)),i=c(n(28)),a=c(n(124)),o=c(n(350)),s=c(n(377)),u=n(235),A=c(n(1246));function c(e){return e&&e.__esModule?e:{default:e}}var l=t.Block=function(e){var t=e.onChange,n=e.onSwatchHover,i=e.hex,c=e.colors,l=e.width,f=e.triangle,h=e.styles,g=void 0===h?{}:h,d=e.className,p=void 0===d?"":d,v="transparent"===i,y=function(e,n){s.default.isValidHex(e)&&t({hex:e,source:"hex"},n)},m=(0,a.default)((0,o.default)({default:{card:{width:l,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:i,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:s.default.getContrastingColor(i),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+i+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},g),{"hide-triangle":"hide"===f});return r.default.createElement("div",{style:m.card,className:"block-picker "+p},r.default.createElement("div",{style:m.triangle}),r.default.createElement("div",{style:m.head},v&&r.default.createElement(u.Checkboard,{borderRadius:"6px 6px 0 0"}),r.default.createElement("div",{style:m.label},i)),r.default.createElement("div",{style:m.body},r.default.createElement(A.default,{colors:c,onClick:y,onSwatchHover:n}),r.default.createElement(u.EditableInput,{style:{input:m.input},value:i,onChange:y})))};l.propTypes={width:i.default.oneOfType([i.default.string,i.default.number]),colors:i.default.arrayOf(i.default.string),triangle:i.default.oneOf(["top","hide"]),styles:i.default.object},l.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}},t.default=(0,u.ColorWrap)(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockSwatches=void 0;var r=s(n(0)),i=s(n(124)),a=s(n(507)),o=n(235);function s(e){return e&&e.__esModule?e:{default:e}}var u=t.BlockSwatches=function(e){var t=e.colors,n=e.onClick,s=e.onSwatchHover,u=(0,i.default)({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return r.default.createElement("div",{style:u.swatches},(0,a.default)(t,(function(e){return r.default.createElement(o.Swatch,{key:e,color:e,style:u.swatch,onClick:n,onHover:s,focusStyle:{boxShadow:"0 0 4px "+e}})})),r.default.createElement("div",{style:u.clear}))};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Circle=void 0;var r=l(n(0)),i=l(n(28)),a=l(n(124)),o=l(n(507)),s=l(n(350)),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1048)),A=n(235),c=l(n(1248));function l(e){return e&&e.__esModule?e:{default:e}}var f=t.Circle=function(e){var t=e.width,n=e.onChange,i=e.onSwatchHover,u=e.colors,A=e.hex,l=e.circleSize,f=e.styles,h=void 0===f?{}:f,g=e.circleSpacing,d=e.className,p=void 0===d?"":d,v=(0,a.default)((0,s.default)({default:{card:{width:t,display:"flex",flexWrap:"wrap",marginRight:-g,marginBottom:-g}}},h)),y=function(e,t){return n({hex:e,source:"hex"},t)};return r.default.createElement("div",{style:v.card,className:"circle-picker "+p},(0,o.default)(u,(function(e){return r.default.createElement(c.default,{key:e,color:e,onClick:y,onSwatchHover:i,active:A===e.toLowerCase(),circleSize:l,circleSpacing:g})})))};f.propTypes={width:i.default.oneOfType([i.default.string,i.default.number]),circleSize:i.default.number,circleSpacing:i.default.number,styles:i.default.object},f.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[u.red[500],u.pink[500],u.purple[500],u.deepPurple[500],u.indigo[500],u.blue[500],u.lightBlue[500],u.cyan[500],u.teal[500],u.green[500],u.lightGreen[500],u.lime[500],u.yellow[500],u.amber[500],u.orange[500],u.deepOrange[500],u.brown[500],u.blueGrey[500]],styles:{}},t.default=(0,A.ColorWrap)(f)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CircleSwatch=void 0;var r=s(n(0)),i=n(124),a=s(i),o=n(235);function s(e){return e&&e.__esModule?e:{default:e}}var u=t.CircleSwatch=function(e){var t=e.color,n=e.onClick,i=e.onSwatchHover,s=e.hover,u=e.active,A=e.circleSize,c=e.circleSpacing,l=(0,a.default)({default:{swatch:{width:A,height:A,marginRight:c,marginBottom:c,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+A/2+"px "+t,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+t}}},{hover:s,active:u});return r.default.createElement("div",{style:l.swatch},r.default.createElement(o.Swatch,{style:l.Swatch,color:t,onClick:n,onHover:i,focusStyle:{boxShadow:l.Swatch.boxShadow+", 0 0 5px "+t}}))};u.defaultProps={circleSize:28,circleSpacing:14},t.default=(0,i.handleHover)(u)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Chrome=void 0;var r=l(n(0)),i=l(n(28)),a=l(n(124)),o=l(n(350)),s=n(235),u=l(n(1250)),A=l(n(1252)),c=l(n(1253));function l(e){return e&&e.__esModule?e:{default:e}}var f=t.Chrome=function(e){var t=e.width,n=e.onChange,i=e.disableAlpha,l=e.rgb,f=e.hsl,h=e.hsv,g=e.hex,d=e.renderers,p=e.styles,v=void 0===p?{}:p,y=e.className,m=void 0===y?"":y,I=e.defaultView,b=(0,a.default)((0,o.default)({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+l.r+", "+l.g+", "+l.b+", "+l.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},v),{disableAlpha:i});return r.default.createElement("div",{style:b.picker,className:"chrome-picker "+m},r.default.createElement("div",{style:b.saturation},r.default.createElement(s.Saturation,{style:b.Saturation,hsl:f,hsv:h,pointer:c.default,onChange:n})),r.default.createElement("div",{style:b.body},r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.color},r.default.createElement("div",{style:b.swatch},r.default.createElement("div",{style:b.active}),r.default.createElement(s.Checkboard,{renderers:d}))),r.default.createElement("div",{style:b.toggles},r.default.createElement("div",{style:b.hue},r.default.createElement(s.Hue,{style:b.Hue,hsl:f,pointer:A.default,onChange:n})),r.default.createElement("div",{style:b.alpha},r.default.createElement(s.Alpha,{style:b.Alpha,rgb:l,hsl:f,pointer:A.default,renderers:d,onChange:n})))),r.default.createElement(u.default,{rgb:l,hsl:f,hex:g,view:I,onChange:n,disableAlpha:i})))};f.propTypes={width:i.default.oneOfType([i.default.string,i.default.number]),disableAlpha:i.default.bool,styles:i.default.object,defaultView:i.default.oneOf(["hex","rgb","hsl"])},f.defaultProps={width:225,disableAlpha:!1,styles:{}},t.default=(0,s.ColorWrap)(f)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChromeFields=void 0;var r=function(){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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=A(n(0)),a=A(n(124)),o=A(n(377)),s=n(235),u=A(n(1251));function A(e){return e&&e.__esModule?e:{default:e}}var c=t.ChromeFields=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.toggleViews=function(){"hex"===n.state.view?n.setState({view:"rgb"}):"rgb"===n.state.view?n.setState({view:"hsl"}):"hsl"===n.state.view&&(1===n.props.hsl.a?n.setState({view:"hex"}):n.setState({view:"rgb"}))},n.handleChange=function(e,t){e.hex?o.default.isValidHex(e.hex)&&n.props.onChange({hex:e.hex,source:"hex"},t):e.r||e.g||e.b?n.props.onChange({r:e.r||n.props.rgb.r,g:e.g||n.props.rgb.g,b:e.b||n.props.rgb.b,source:"rgb"},t):e.a?(e.a<0?e.a=0:e.a>1&&(e.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"===typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"===typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),n.props.onChange({h:e.h||n.props.hsl.h,s:Number(e.s&&e.s||n.props.hsl.s),l:Number(e.l&&e.l||n.props.hsl.l),source:"hsl"},t))},n.showHighlight=function(e){e.currentTarget.style.background="#eee"},n.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?n.state={view:"rgb"}:n.state={view:e.view},n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"render",value:function(){var e=this,t=(0,a.default)({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),n=void 0;return"hex"===this.state.view?n=i.default.createElement("div",{style:t.fields,className:"flexbox-fix"},i.default.createElement("div",{style:t.field},i.default.createElement(s.EditableInput,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?n=i.default.createElement("div",{style:t.fields,className:"flexbox-fix"},i.default.createElement("div",{style:t.field},i.default.createElement(s.EditableInput,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),i.default.createElement("div",{style:t.field},i.default.createElement(s.EditableInput,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),i.default.createElement("div",{style:t.field},i.default.createElement(s.EditableInput,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),i.default.createElement("div",{style:t.alpha},i.default.createElement(s.EditableInput,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(n=i.default.createElement("div",{style:t.fields,className:"flexbox-fix"},i.default.createElement("div",{style:t.field},i.default.createElement(s.EditableInput,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),i.default.createElement("div",{style:t.field},i.default.createElement(s.EditableInput,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),i.default.createElement("div",{style:t.field},i.default.createElement(s.EditableInput,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),i.default.createElement("div",{style:t.alpha},i.default.createElement(s.EditableInput,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),i.default.createElement("div",{style:t.wrap,className:"flexbox-fix"},n,i.default.createElement("div",{style:t.toggle},i.default.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},i.default.createElement(u.default,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(i.default.Component);c.defaultProps={view:"hex"},t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(0),o=(r=a)&&r.__esModule?r:{default:r};t.default=function(e){var t=e.fill,n=void 0===t?"currentColor":t,r=e.width,a=void 0===r?24:r,s=e.height,u=void 0===s?24:s,A=e.style,c=void 0===A?{}:A,l=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return o.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:n,width:a,height:u},c)},l),o.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChromePointer=void 0;var r=a(n(0)),i=a(n(124));function a(e){return e&&e.__esModule?e:{default:e}}var o=t.ChromePointer=function(){var e=(0,i.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return r.default.createElement("div",{style:e.picker})};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChromePointerCircle=void 0;var r=a(n(0)),i=a(n(124));function a(e){return e&&e.__esModule?e:{default:e}}var o=t.ChromePointerCircle=function(){var e=(0,i.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return r.default.createElement("div",{style:e.picker})};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Compact=void 0;var r=f(n(0)),i=f(n(28)),a=f(n(124)),o=f(n(507)),s=f(n(350)),u=f(n(377)),A=n(235),c=f(n(1255)),l=f(n(1256));function f(e){return e&&e.__esModule?e:{default:e}}var h=t.Compact=function(e){var t=e.onChange,n=e.onSwatchHover,i=e.colors,f=e.hex,h=e.rgb,g=e.styles,d=void 0===g?{}:g,p=e.className,v=void 0===p?"":p,y=(0,a.default)((0,s.default)({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},d)),m=function(e,n){e.hex?u.default.isValidHex(e.hex)&&t({hex:e.hex,source:"hex"},n):t(e,n)};return r.default.createElement(A.Raised,{style:y.Compact,styles:d},r.default.createElement("div",{style:y.compact,className:"compact-picker "+v},r.default.createElement("div",null,(0,o.default)(i,(function(e){return r.default.createElement(c.default,{key:e,color:e,active:e.toLowerCase()===f,onClick:m,onSwatchHover:n})})),r.default.createElement("div",{style:y.clear})),r.default.createElement(l.default,{hex:f,rgb:h,onChange:m})))};h.propTypes={colors:i.default.arrayOf(i.default.string),styles:i.default.object},h.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}},t.default=(0,A.ColorWrap)(h)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompactColor=void 0;var r=s(n(0)),i=s(n(124)),a=s(n(377)),o=n(235);function s(e){return e&&e.__esModule?e:{default:e}}var u=t.CompactColor=function(e){var t=e.color,n=e.onClick,s=void 0===n?function(){}:n,u=e.onSwatchHover,A=e.active,c=(0,i.default)({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:a.default.getContrastingColor(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:A,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return r.default.createElement(o.Swatch,{style:c.color,color:t,onClick:s,onHover:u,focusStyle:{boxShadow:"0 0 4px "+t}},r.default.createElement("div",{style:c.dot}))};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompactFields=void 0;var r=o(n(0)),i=o(n(124)),a=n(235);function o(e){return e&&e.__esModule?e:{default:e}}var s=t.CompactFields=function(e){var t=e.hex,n=e.rgb,o=e.onChange,s=(0,i.default)({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),u=function(e,t){e.r||e.g||e.b?o({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},t):o({hex:e.hex,source:"hex"},t)};return r.default.createElement("div",{style:s.fields,className:"flexbox-fix"},r.default.createElement("div",{style:s.active}),r.default.createElement(a.EditableInput,{style:{wrap:s.HEXwrap,input:s.HEXinput,label:s.HEXlabel},label:"hex",value:t,onChange:u}),r.default.createElement(a.EditableInput,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"r",value:n.r,onChange:u}),r.default.createElement(a.EditableInput,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"g",value:n.g,onChange:u}),r.default.createElement(a.EditableInput,{style:{wrap:s.RGBwrap,input:s.RGBinput,label:s.RGBlabel},label:"b",value:n.b,onChange:u}))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Github=void 0;var r=c(n(0)),i=c(n(28)),a=c(n(124)),o=c(n(507)),s=c(n(350)),u=n(235),A=c(n(1258));function c(e){return e&&e.__esModule?e:{default:e}}var l=t.Github=function(e){var t=e.width,n=e.colors,i=e.onChange,u=e.onSwatchHover,c=e.triangle,l=e.styles,f=void 0===l?{}:l,h=e.className,g=void 0===h?"":h,d=(0,a.default)((0,s.default)({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},f),{"hide-triangle":"hide"===c,"top-left-triangle":"top-left"===c,"top-right-triangle":"top-right"===c,"bottom-left-triangle":"bottom-left"===c,"bottom-right-triangle":"bottom-right"===c}),p=function(e,t){return i({hex:e,source:"hex"},t)};return r.default.createElement("div",{style:d.card,className:"github-picker "+g},r.default.createElement("div",{style:d.triangleShadow}),r.default.createElement("div",{style:d.triangle}),(0,o.default)(n,(function(e){return r.default.createElement(A.default,{color:e,key:e,onClick:p,onSwatchHover:u})})))};l.propTypes={width:i.default.oneOfType([i.default.string,i.default.number]),colors:i.default.arrayOf(i.default.string),triangle:i.default.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:i.default.object},l.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}},t.default=(0,u.ColorWrap)(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GithubSwatch=void 0;var r=s(n(0)),i=n(124),a=s(i),o=n(235);function s(e){return e&&e.__esModule?e:{default:e}}var u=t.GithubSwatch=function(e){var t=e.hover,n=e.color,i=e.onClick,s=e.onSwatchHover,u={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},A=(0,a.default)({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:u}},{hover:t});return r.default.createElement("div",{style:A.swatch},r.default.createElement(o.Swatch,{color:n,onClick:i,onHover:s,focusStyle:u}))};t.default=(0,i.handleHover)(u)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HuePicker=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=c(n(0)),a=c(n(28)),o=c(n(124)),s=c(n(350)),u=n(235),A=c(n(1260));function c(e){return e&&e.__esModule?e:{default:e}}var l=t.HuePicker=function(e){var t=e.width,n=e.height,a=e.onChange,A=e.hsl,c=e.direction,l=e.pointer,f=e.styles,h=void 0===f?{}:f,g=e.className,d=void 0===g?"":g,p=(0,o.default)((0,s.default)({default:{picker:{position:"relative",width:t,height:n},hue:{radius:"2px"}}},h));return i.default.createElement("div",{style:p.picker,className:"hue-picker "+d},i.default.createElement(u.Hue,r({},p.hue,{hsl:A,pointer:l,onChange:function(e){return a({a:1,h:e.h,l:.5,s:1})},direction:c})))};l.propTypes={styles:a.default.object},l.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:A.default,styles:{}},t.default=(0,u.ColorWrap)(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SliderPointer=void 0;var r=a(n(0)),i=a(n(124));function a(e){return e&&e.__esModule?e:{default:e}}var o=t.SliderPointer=function(e){var t=e.direction,n=(0,i.default)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return r.default.createElement("div",{style:n.picker})};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Material=void 0;var r=u(n(0)),i=u(n(124)),a=u(n(350)),o=u(n(377)),s=n(235);function u(e){return e&&e.__esModule?e:{default:e}}var A=t.Material=function(e){var t=e.onChange,n=e.hex,u=e.rgb,A=e.styles,c=void 0===A?{}:A,l=e.className,f=void 0===l?"":l,h=(0,i.default)((0,a.default)({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+n,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},c)),g=function(e,n){e.hex?o.default.isValidHex(e.hex)&&t({hex:e.hex,source:"hex"},n):(e.r||e.g||e.b)&&t({r:e.r||u.r,g:e.g||u.g,b:e.b||u.b,source:"rgb"},n)};return r.default.createElement(s.Raised,{styles:c},r.default.createElement("div",{style:h.material,className:"material-picker "+f},r.default.createElement(s.EditableInput,{style:{wrap:h.HEXwrap,input:h.HEXinput,label:h.HEXlabel},label:"hex",value:n,onChange:g}),r.default.createElement("div",{style:h.split,className:"flexbox-fix"},r.default.createElement("div",{style:h.third},r.default.createElement(s.EditableInput,{style:{wrap:h.RGBwrap,input:h.RGBinput,label:h.RGBlabel},label:"r",value:u.r,onChange:g})),r.default.createElement("div",{style:h.third},r.default.createElement(s.EditableInput,{style:{wrap:h.RGBwrap,input:h.RGBinput,label:h.RGBlabel},label:"g",value:u.g,onChange:g})),r.default.createElement("div",{style:h.third},r.default.createElement(s.EditableInput,{style:{wrap:h.RGBwrap,input:h.RGBinput,label:h.RGBlabel},label:"b",value:u.b,onChange:g})))))};t.default=(0,s.ColorWrap)(A)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Photoshop=void 0;var r=function(){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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=g(n(0)),a=g(n(28)),o=g(n(124)),s=g(n(350)),u=n(235),A=g(n(1263)),c=g(n(1264)),l=g(n(1265)),f=g(n(1266)),h=g(n(1267));function g(e){return e&&e.__esModule?e:{default:e}}var d=t.Photoshop=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.state={currentColor:e.hex},n}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"render",value:function(){var e=this.props,t=e.styles,n=void 0===t?{}:t,r=e.className,a=void 0===r?"":r,g=(0,o.default)((0,s.default)({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},n));return i.default.createElement("div",{style:g.picker,className:"photoshop-picker "+a},i.default.createElement("div",{style:g.head},this.props.header),i.default.createElement("div",{style:g.body,className:"flexbox-fix"},i.default.createElement("div",{style:g.saturation},i.default.createElement(u.Saturation,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:c.default,onChange:this.props.onChange})),i.default.createElement("div",{style:g.hue},i.default.createElement(u.Hue,{direction:"vertical",hsl:this.props.hsl,pointer:l.default,onChange:this.props.onChange})),i.default.createElement("div",{style:g.controls},i.default.createElement("div",{style:g.top,className:"flexbox-fix"},i.default.createElement("div",{style:g.previews},i.default.createElement(h.default,{rgb:this.props.rgb,currentColor:this.state.currentColor})),i.default.createElement("div",{style:g.actions},i.default.createElement(f.default,{label:"OK",onClick:this.props.onAccept,active:!0}),i.default.createElement(f.default,{label:"Cancel",onClick:this.props.onCancel}),i.default.createElement(A.default,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}(i.default.Component);d.propTypes={header:a.default.string,styles:a.default.object},d.defaultProps={header:"Color Picker",styles:{}},t.default=(0,u.ColorWrap)(d)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhotoshopPicker=void 0;var r=s(n(0)),i=s(n(124)),a=s(n(377)),o=n(235);function s(e){return e&&e.__esModule?e:{default:e}}var u=t.PhotoshopPicker=function(e){var t=e.onChange,n=e.rgb,s=e.hsv,u=e.hex,A=(0,i.default)({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),c=function(e,r){e["#"]?a.default.isValidHex(e["#"])&&t({hex:e["#"],source:"hex"},r):e.r||e.g||e.b?t({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},r):(e.h||e.s||e.v)&&t({h:e.h||s.h,s:e.s||s.s,v:e.v||s.v,source:"hsv"},r)};return r.default.createElement("div",{style:A.fields},r.default.createElement(o.EditableInput,{style:{wrap:A.RGBwrap,input:A.RGBinput,label:A.RGBlabel},label:"h",value:Math.round(s.h),onChange:c}),r.default.createElement(o.EditableInput,{style:{wrap:A.RGBwrap,input:A.RGBinput,label:A.RGBlabel},label:"s",value:Math.round(100*s.s),onChange:c}),r.default.createElement(o.EditableInput,{style:{wrap:A.RGBwrap,input:A.RGBinput,label:A.RGBlabel},label:"v",value:Math.round(100*s.v),onChange:c}),r.default.createElement("div",{style:A.divider}),r.default.createElement(o.EditableInput,{style:{wrap:A.RGBwrap,input:A.RGBinput,label:A.RGBlabel},label:"r",value:n.r,onChange:c}),r.default.createElement(o.EditableInput,{style:{wrap:A.RGBwrap,input:A.RGBinput,label:A.RGBlabel},label:"g",value:n.g,onChange:c}),r.default.createElement(o.EditableInput,{style:{wrap:A.RGBwrap,input:A.RGBinput,label:A.RGBlabel},label:"b",value:n.b,onChange:c}),r.default.createElement("div",{style:A.divider}),r.default.createElement(o.EditableInput,{style:{wrap:A.HEXwrap,input:A.HEXinput,label:A.HEXlabel},label:"#",value:u.replace("#",""),onChange:c}),r.default.createElement("div",{style:A.fieldSymbols},r.default.createElement("div",{style:A.symbol},"\xb0"),r.default.createElement("div",{style:A.symbol},"%"),r.default.createElement("div",{style:A.symbol},"%")))};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhotoshopPointerCircle=void 0;var r=a(n(0)),i=a(n(124));function a(e){return e&&e.__esModule?e:{default:e}}var o=t.PhotoshopPointerCircle=function(e){var t=e.hsl,n=(0,i.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":t.l>.5});return r.default.createElement("div",{style:n.picker})};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhotoshopPointerCircle=void 0;var r=a(n(0)),i=a(n(124));function a(e){return e&&e.__esModule?e:{default:e}}var o=t.PhotoshopPointerCircle=function(){var e=(0,i.default)({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return r.default.createElement("div",{style:e.pointer},r.default.createElement("div",{style:e.left},r.default.createElement("div",{style:e.leftInside})),r.default.createElement("div",{style:e.right},r.default.createElement("div",{style:e.rightInside})))};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhotoshopButton=void 0;var r=a(n(0)),i=a(n(124));function a(e){return e&&e.__esModule?e:{default:e}}var o=t.PhotoshopButton=function(e){var t=e.onClick,n=e.label,a=e.children,o=e.active,s=(0,i.default)({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return r.default.createElement("div",{style:s.button,onClick:t},n||a)};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhotoshopPreviews=void 0;var r=a(n(0)),i=a(n(124));function a(e){return e&&e.__esModule?e:{default:e}}var o=t.PhotoshopPreviews=function(e){var t=e.rgb,n=e.currentColor,a=(0,i.default)({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return r.default.createElement("div",null,r.default.createElement("div",{style:a.label},"new"),r.default.createElement("div",{style:a.swatches},r.default.createElement("div",{style:a.new}),r.default.createElement("div",{style:a.current})),r.default.createElement("div",{style:a.label},"current"))};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=l(n(0)),a=l(n(28)),o=l(n(124)),s=l(n(350)),u=n(235),A=l(n(1269)),c=l(n(1270));function l(e){return e&&e.__esModule?e:{default:e}}var f=t.Sketch=function(e){var t=e.width,n=e.rgb,a=e.hex,l=e.hsv,f=e.hsl,h=e.onChange,g=e.onSwatchHover,d=e.disableAlpha,p=e.presetColors,v=e.renderers,y=e.styles,m=void 0===y?{}:y,I=e.className,b=void 0===I?"":I,E=(0,o.default)((0,s.default)({default:r({picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},m),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},m),{disableAlpha:d});return i.default.createElement("div",{style:E.picker,className:"sketch-picker "+b},i.default.createElement("div",{style:E.saturation},i.default.createElement(u.Saturation,{style:E.Saturation,hsl:f,hsv:l,onChange:h})),i.default.createElement("div",{style:E.controls,className:"flexbox-fix"},i.default.createElement("div",{style:E.sliders},i.default.createElement("div",{style:E.hue},i.default.createElement(u.Hue,{style:E.Hue,hsl:f,onChange:h})),i.default.createElement("div",{style:E.alpha},i.default.createElement(u.Alpha,{style:E.Alpha,rgb:n,hsl:f,renderers:v,onChange:h}))),i.default.createElement("div",{style:E.color},i.default.createElement(u.Checkboard,null),i.default.createElement("div",{style:E.activeColor}))),i.default.createElement(A.default,{rgb:n,hsl:f,hex:a,onChange:h,disableAlpha:d}),i.default.createElement(c.default,{colors:p,onClick:h,onSwatchHover:g}))};f.propTypes={disableAlpha:a.default.bool,width:a.default.oneOfType([a.default.string,a.default.number]),styles:a.default.object},f.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,u.ColorWrap)(f)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchFields=void 0;var r=s(n(0)),i=s(n(124)),a=s(n(377)),o=n(235);function s(e){return e&&e.__esModule?e:{default:e}}var u=t.SketchFields=function(e){var t=e.onChange,n=e.rgb,s=e.hsl,u=e.hex,A=e.disableAlpha,c=(0,i.default)({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:A}),l=function(e,r){e.hex?a.default.isValidHex(e.hex)&&t({hex:e.hex,source:"hex"},r):e.r||e.g||e.b?t({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,a:n.a,source:"rgb"},r):e.a&&(e.a<0?e.a=0:e.a>100&&(e.a=100),e.a/=100,t({h:s.h,s:s.s,l:s.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:c.fields,className:"flexbox-fix"},r.default.createElement("div",{style:c.double},r.default.createElement(o.EditableInput,{style:{input:c.input,label:c.label},label:"hex",value:u.replace("#",""),onChange:l})),r.default.createElement("div",{style:c.single},r.default.createElement(o.EditableInput,{style:{input:c.input,label:c.label},label:"r",value:n.r,onChange:l,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(o.EditableInput,{style:{input:c.input,label:c.label},label:"g",value:n.g,onChange:l,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(o.EditableInput,{style:{input:c.input,label:c.label},label:"b",value:n.b,onChange:l,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.alpha},r.default.createElement(o.EditableInput,{style:{input:c.input,label:c.label},label:"a",value:Math.round(100*n.a),onChange:l,dragLabel:"true",dragMax:"100"})))};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=u(n(0)),a=u(n(28)),o=u(n(124)),s=n(235);function u(e){return e&&e.__esModule?e:{default:e}}var A=t.SketchPresetColors=function(e){var t=e.colors,n=e.onClick,a=void 0===n?function(){}:n,u=e.onSwatchHover,A=(0,o.default)({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!t||!t.length}),c=function(e,t){a({hex:e,source:"hex"},t)};return i.default.createElement("div",{style:A.colors,className:"flexbox-fix"},t.map((function(e){var t="string"===typeof e?{color:e}:e,n=""+t.color+(t.title||"");return i.default.createElement("div",{key:n,style:A.swatchWrap},i.default.createElement(s.Swatch,r({},t,{style:A.swatch,onClick:c,onHover:u,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+t.color}})))})))};A.propTypes={colors:a.default.arrayOf(a.default.oneOfType([a.default.string,a.default.shape({color:a.default.string,title:a.default.string})])).isRequired},t.default=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Slider=void 0;var r=c(n(0)),i=c(n(28)),a=c(n(124)),o=c(n(350)),s=n(235),u=c(n(1272)),A=c(n(1274));function c(e){return e&&e.__esModule?e:{default:e}}var l=t.Slider=function(e){var t=e.hsl,n=e.onChange,i=e.pointer,A=e.styles,c=void 0===A?{}:A,l=e.className,f=void 0===l?"":l,h=(0,a.default)((0,o.default)({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},c));return r.default.createElement("div",{style:h.wrap||{},className:"slider-picker "+f},r.default.createElement("div",{style:h.hue},r.default.createElement(s.Hue,{style:h.Hue,hsl:t,pointer:i,onChange:n})),r.default.createElement("div",{style:h.swatches},r.default.createElement(u.default,{hsl:t,onClick:n})))};l.propTypes={styles:i.default.object},l.defaultProps={pointer:A.default,styles:{}},t.default=(0,s.ColorWrap)(l)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SliderSwatches=void 0;var r=o(n(0)),i=o(n(124)),a=o(n(1273));function o(e){return e&&e.__esModule?e:{default:e}}var s=t.SliderSwatches=function(e){var t=e.onClick,n=e.hsl,o=(0,i.default)({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}});return r.default.createElement("div",{style:o.swatches},r.default.createElement("div",{style:o.swatch},r.default.createElement(a.default,{hsl:n,offset:".80",active:Math.abs(n.l-.8)<.1&&Math.abs(n.s-.5)<.1,onClick:t,first:!0})),r.default.createElement("div",{style:o.swatch},r.default.createElement(a.default,{hsl:n,offset:".65",active:Math.abs(n.l-.65)<.1&&Math.abs(n.s-.5)<.1,onClick:t})),r.default.createElement("div",{style:o.swatch},r.default.createElement(a.default,{hsl:n,offset:".50",active:Math.abs(n.l-.5)<.1&&Math.abs(n.s-.5)<.1,onClick:t})),r.default.createElement("div",{style:o.swatch},r.default.createElement(a.default,{hsl:n,offset:".35",active:Math.abs(n.l-.35)<.1&&Math.abs(n.s-.5)<.1,onClick:t})),r.default.createElement("div",{style:o.swatch},r.default.createElement(a.default,{hsl:n,offset:".20",active:Math.abs(n.l-.2)<.1&&Math.abs(n.s-.5)<.1,onClick:t,last:!0})),r.default.createElement("div",{style:o.clear}))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SliderSwatch=void 0;var r=a(n(0)),i=a(n(124));function a(e){return e&&e.__esModule?e:{default:e}}var o=t.SliderSwatch=function(e){var t=e.hsl,n=e.offset,a=e.onClick,o=void 0===a?function(){}:a,s=e.active,u=e.first,A=e.last,c=(0,i.default)({default:{swatch:{height:"12px",background:"hsl("+t.h+", 50%, "+100*n+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:s,first:u,last:A});return r.default.createElement("div",{style:c.swatch,onClick:function(e){return o({h:t.h,s:.5,l:n,source:"hsl"},e)}})};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SliderPointer=void 0;var r=a(n(0)),i=a(n(124));function a(e){return e&&e.__esModule?e:{default:e}}var o=t.SliderPointer=function(){var e=(0,i.default)({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return r.default.createElement("div",{style:e.picker})};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatches=void 0;var r=f(n(0)),i=f(n(28)),a=f(n(124)),o=f(n(507)),s=f(n(350)),u=f(n(377)),A=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1048)),c=n(235),l=f(n(1276));function f(e){return e&&e.__esModule?e:{default:e}}var h=t.Swatches=function(e){var t=e.width,n=e.height,i=e.onChange,A=e.onSwatchHover,f=e.colors,h=e.hex,g=e.styles,d=void 0===g?{}:g,p=e.className,v=void 0===p?"":p,y=(0,a.default)((0,s.default)({default:{picker:{width:t,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},d)),m=function(e,t){u.default.isValidHex(e)&&i({hex:e,source:"hex"},t)};return r.default.createElement("div",{style:y.picker,className:"swatches-picker "+v},r.default.createElement(c.Raised,null,r.default.createElement("div",{style:y.overflow},r.default.createElement("div",{style:y.body},(0,o.default)(f,(function(e){return r.default.createElement(l.default,{key:e.toString(),group:e,active:h,onClick:m,onSwatchHover:A})})),r.default.createElement("div",{style:y.clear})))))};h.propTypes={width:i.default.oneOfType([i.default.string,i.default.number]),height:i.default.oneOfType([i.default.string,i.default.number]),colors:i.default.arrayOf(i.default.arrayOf(i.default.string)),styles:i.default.object},h.defaultProps={width:320,height:240,colors:[[A.red[900],A.red[700],A.red[500],A.red[300],A.red[100]],[A.pink[900],A.pink[700],A.pink[500],A.pink[300],A.pink[100]],[A.purple[900],A.purple[700],A.purple[500],A.purple[300],A.purple[100]],[A.deepPurple[900],A.deepPurple[700],A.deepPurple[500],A.deepPurple[300],A.deepPurple[100]],[A.indigo[900],A.indigo[700],A.indigo[500],A.indigo[300],A.indigo[100]],[A.blue[900],A.blue[700],A.blue[500],A.blue[300],A.blue[100]],[A.lightBlue[900],A.lightBlue[700],A.lightBlue[500],A.lightBlue[300],A.lightBlue[100]],[A.cyan[900],A.cyan[700],A.cyan[500],A.cyan[300],A.cyan[100]],[A.teal[900],A.teal[700],A.teal[500],A.teal[300],A.teal[100]],["#194D33",A.green[700],A.green[500],A.green[300],A.green[100]],[A.lightGreen[900],A.lightGreen[700],A.lightGreen[500],A.lightGreen[300],A.lightGreen[100]],[A.lime[900],A.lime[700],A.lime[500],A.lime[300],A.lime[100]],[A.yellow[900],A.yellow[700],A.yellow[500],A.yellow[300],A.yellow[100]],[A.amber[900],A.amber[700],A.amber[500],A.amber[300],A.amber[100]],[A.orange[900],A.orange[700],A.orange[500],A.orange[300],A.orange[100]],[A.deepOrange[900],A.deepOrange[700],A.deepOrange[500],A.deepOrange[300],A.deepOrange[100]],[A.brown[900],A.brown[700],A.brown[500],A.brown[300],A.brown[100]],[A.blueGrey[900],A.blueGrey[700],A.blueGrey[500],A.blueGrey[300],A.blueGrey[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}},t.default=(0,c.ColorWrap)(h)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SwatchesGroup=void 0;var r=s(n(0)),i=s(n(124)),a=s(n(507)),o=s(n(1277));function s(e){return e&&e.__esModule?e:{default:e}}var u=t.SwatchesGroup=function(e){var t=e.onClick,n=e.onSwatchHover,s=e.group,u=e.active,A=(0,i.default)({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return r.default.createElement("div",{style:A.group},(0,a.default)(s,(function(e,i){return r.default.createElement(o.default,{key:e,color:e,active:e.toLowerCase()===u,first:0===i,last:i===s.length-1,onClick:t,onSwatchHover:n})})))};t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SwatchesColor=void 0;var r=u(n(0)),i=u(n(124)),a=u(n(377)),o=n(235),s=u(n(1278));function u(e){return e&&e.__esModule?e:{default:e}}var A=t.SwatchesColor=function(e){var t=e.color,n=e.onClick,u=void 0===n?function(){}:n,A=e.onSwatchHover,c=e.first,l=e.last,f=e.active,h=(0,i.default)({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:a.default.getContrastingColor(t),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:c,last:l,active:f,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return r.default.createElement(o.Swatch,{color:t,style:h.color,onClick:u,onHover:A,focusStyle:{boxShadow:"0 0 4px "+t}},r.default.createElement("div",{style:h.check},r.default.createElement(s.default,null)))};t.default=A},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(0),o=(r=a)&&r.__esModule?r:{default:r};t.default=function(e){var t=e.fill,n=void 0===t?"currentColor":t,r=e.width,a=void 0===r?24:r,s=e.height,u=void 0===s?24:s,A=e.style,c=void 0===A?{}:A,l=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return o.default.createElement("svg",i({viewBox:"0 0 24 24",style:i({fill:n,width:a,height:u},c)},l),o.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Twitter=void 0;var r=c(n(0)),i=c(n(28)),a=c(n(124)),o=c(n(507)),s=c(n(350)),u=c(n(377)),A=n(235);function c(e){return e&&e.__esModule?e:{default:e}}var l=t.Twitter=function(e){var t=e.onChange,n=e.onSwatchHover,i=e.hex,c=e.colors,l=e.width,f=e.triangle,h=e.styles,g=void 0===h?{}:h,d=e.className,p=void 0===d?"":d,v=(0,a.default)((0,s.default)({default:{card:{width:l,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},g),{"hide-triangle":"hide"===f,"top-left-triangle":"top-left"===f,"top-right-triangle":"top-right"===f}),y=function(e,n){u.default.isValidHex(e)&&t({hex:e,source:"hex"},n)};return r.default.createElement("div",{style:v.card,className:"twitter-picker "+p},r.default.createElement("div",{style:v.triangleShadow}),r.default.createElement("div",{style:v.triangle}),r.default.createElement("div",{style:v.body},(0,o.default)(c,(function(e,t){return r.default.createElement(A.Swatch,{key:t,color:e,hex:e,style:v.swatch,onClick:y,onHover:n,focusStyle:{boxShadow:"0 0 4px "+e}})})),r.default.createElement("div",{style:v.hash},"#"),r.default.createElement(A.EditableInput,{label:null,style:{input:v.input},value:i.replace("#",""),onChange:y}),r.default.createElement("div",{style:v.clear})))};l.propTypes={width:i.default.oneOfType([i.default.string,i.default.number]),triangle:i.default.oneOf(["hide","top-left","top-right"]),colors:i.default.arrayOf(i.default.string),styles:i.default.object},l.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}},t.default=(0,A.ColorWrap)(l)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(1281)),a=r(n(1282)),o=["altKey","bubbles","cancelable","ctrlKey","currentTarget","eventPhase","metaKey","shiftKey","target","timeStamp","view","type"];function s(e){return null===e||void 0===e}var u=[{reg:/^key/,props:["char","charCode","key","keyCode","which"],fix:function(e,t){s(e.which)&&(e.which=s(t.charCode)?t.keyCode:t.charCode),void 0===e.metaKey&&(e.metaKey=e.ctrlKey)}},{reg:/^touch/,props:["touches","changedTouches","targetTouches"]},{reg:/^hashchange$/,props:["newURL","oldURL"]},{reg:/^gesturechange$/i,props:["rotation","scale"]},{reg:/^(mousewheel|DOMMouseScroll)$/,props:[],fix:function(e,t){var n=void 0,r=void 0,i=void 0,a=t.wheelDelta,o=t.axis,s=t.wheelDeltaY,u=t.wheelDeltaX,A=t.detail;a&&(i=a/120),A&&(i=0-(A%3===0?A/3:A)),void 0!==o&&(o===e.HORIZONTAL_AXIS?(r=0,n=0-i):o===e.VERTICAL_AXIS&&(n=0,r=i)),void 0!==s&&(r=s/120),void 0!==u&&(n=-1*u/120),n||r||(r=i),void 0!==n&&(e.deltaX=n),void 0!==r&&(e.deltaY=r),void 0!==i&&(e.delta=i)}},{reg:/^mouse|contextmenu|click|mspointer|(^DOMMouseScroll$)/i,props:["buttons","clientX","clientY","button","offsetX","relatedTarget","which","fromElement","toElement","offsetY","pageX","pageY","screenX","screenY"],fix:function(e,t){var n=void 0,r=void 0,i=void 0,a=e.target,o=t.button;return a&&s(e.pageX)&&!s(t.clientX)&&(r=(n=a.ownerDocument||document).documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),!e.relatedTarget&&e.fromElement&&(e.relatedTarget=e.fromElement===a?e.toElement:e.fromElement),e}}];function A(){return!0}function c(){return!1}function l(e){var t=e.type,n="function"===typeof e.stopPropagation||"boolean"===typeof e.cancelBubble;i.default.call(this),this.nativeEvent=e;var r=c;"defaultPrevented"in e?r=e.defaultPrevented?A:c:"getPreventDefault"in e?r=e.getPreventDefault()?A:c:"returnValue"in e&&(r=!1===e.returnValue?A:c),this.isDefaultPrevented=r;var a=[],s=void 0,l=void 0,f=o.concat();for(u.forEach((function(e){t.match(e.reg)&&(f=f.concat(e.props),e.fix&&a.push(e.fix))})),s=f.length;s;)this[l=f[--s]]=e[l];for(!this.target&&n&&(this.target=e.srcElement||document),this.target&&3===this.target.nodeType&&(this.target=this.target.parentNode),s=a.length;s;)(0,a[--s])(this,e);this.timeStamp=e.timeStamp||Date.now()}var f=i.default.prototype;(0,a.default)(l.prototype,f,{constructor:l,preventDefault:function(){var e=this.nativeEvent;e.preventDefault?e.preventDefault():e.returnValue=!1,f.preventDefault.call(this)},stopPropagation:function(){var e=this.nativeEvent;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,f.stopPropagation.call(this)}}),t.default=l,e.exports=t.default},function(e,t,n){"use strict";function r(){return!1}function i(){return!0}function a(){this.timeStamp=Date.now(),this.target=void 0,this.currentTarget=void 0}Object.defineProperty(t,"__esModule",{value:!0}),a.prototype={isEventObject:1,constructor:a,isDefaultPrevented:r,isPropagationStopped:r,isImmediatePropagationStopped:r,preventDefault:function(){this.isDefaultPrevented=i},stopPropagation:function(){this.isPropagationStopped=i},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=i,this.stopPropagation()},halt:function(e){e?this.stopImmediatePropagation():this.stopPropagation(),this.preventDefault()}},t.default=a,e.exports=t.default},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(e){if(null===e||void 0===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={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,s,u=o(e),A=1;A<arguments.length;A++){for(var c in n=Object(arguments[A]))i.call(n,c)&&(u[c]=n[c]);if(r){s=r(n);for(var l=0;l<s.length;l++)a.call(n,s[l])&&(u[s[l]]=n[s[l]])}}return u}},function(e,t,n){var r=n(723);e.exports=function(e,t){var n=r(e,t);return n?n.version:null}},function(e,t,n){var r=n(723);e.exports=function(e,t){var n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},function(e,t,n){var r=n(321);e.exports=function(e,t,n,i){"string"===typeof n&&(i=n,n=void 0);try{return new r(e,n).inc(t,i).version}catch(a){return null}}},function(e,t,n){var r=n(723),i=n(887);e.exports=function(e,t){if(i(e,t))return null;var n=r(e),a=r(t),o=n.prerelease.length||a.prerelease.length,s=o?"pre":"",u=o?"prerelease":"";for(var A in n)if(("major"===A||"minor"===A||"patch"===A)&&n[A]!==a[A])return s+A;return u}},function(e,t,n){var r=n(321);e.exports=function(e,t){return new r(e,t).major}},function(e,t,n){var r=n(321);e.exports=function(e,t){return new r(e,t).minor}},function(e,t,n){var r=n(321);e.exports=function(e,t){return new r(e,t).patch}},function(e,t,n){var r=n(723);e.exports=function(e,t){var n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},function(e,t,n){var r=n(378);e.exports=function(e,t,n){return r(t,e,n)}},function(e,t,n){var r=n(378);e.exports=function(e,t){return r(e,t,!0)}},function(e,t,n){var r=n(888);e.exports=function(e,t){return e.sort((function(e,n){return r(e,n,t)}))}},function(e,t,n){var r=n(888);e.exports=function(e,t){return e.sort((function(e,n){return r(n,e,t)}))}},function(e,t,n){var r=n(321),i=n(723),a=n(722),o=a.re,s=a.t;e.exports=function(e,t){if(e instanceof r)return e;if("number"===typeof e&&(e=String(e)),"string"!==typeof e)return null;var n=null;if((t=t||{}).rtl){for(var a;(a=o[s.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&a.index+a[0].length===n.index+n[0].length||(n=a),o[s.COERCERTL].lastIndex=a.index+a[1].length+a[2].length;o[s.COERCERTL].lastIndex=-1}else n=e.match(o[s.COERCE]);return null===n?null:i("".concat(n[2],".").concat(n[3]||"0",".").concat(n[4]||"0"),t)}},function(e,t,n){var r=n(379);e.exports=function(e,t){return new r(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))}},function(e,t,n){var r=n(321),i=n(379);e.exports=function(e,t,n){var a=null,o=null,s=null;try{s=new i(t,n)}catch(u){return null}return e.forEach((function(e){s.test(e)&&(a&&-1!==o.compare(e)||(o=new r(a=e,n)))})),a}},function(e,t,n){var r=n(321),i=n(379);e.exports=function(e,t,n){var a=null,o=null,s=null;try{s=new i(t,n)}catch(u){return null}return e.forEach((function(e){s.test(e)&&(a&&1!==o.compare(e)||(o=new r(a=e,n)))})),a}},function(e,t,n){var r=n(321),i=n(379),a=n(794);e.exports=function(e,t){e=new i(e,t);var n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(var o=0;o<e.set.length;++o){e.set[o].forEach((function(e){var t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!a(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: ".concat(e.operator))}}))}return n&&e.test(n)?n:null}},function(e,t,n){var r=n(379);e.exports=function(e,t){try{return new r(e,t).range||"*"}catch(n){return null}}},function(e,t,n){var r=n(892);e.exports=function(e,t,n){return r(e,t,">",n)}},function(e,t,n){var r=n(892);e.exports=function(e,t,n){return r(e,t,"<",n)}},function(e,t,n){var r=n(379);e.exports=function(e,t,n){return e=new r(e,n),t=new r(t,n),e.intersects(t)}},function(e,t,n){var r=n(517),i=n(493),a=n(796),o=n(378);e.exports=function(e,t,n){var s,u=[],A=null,c=null,l=e.sort((function(e,t){return o(e,t,n)})),f=i(l);try{for(f.s();!(s=f.n()).done;){var h=s.value;a(h,t,n)?(c=h,A||(A=h)):(c&&u.push([A,c]),c=null,A=null)}}catch(E){f.e(E)}finally{f.f()}A&&u.push([A,null]);for(var g=[],d=0,p=u;d<p.length;d++){var v=r(p[d],2),y=v[0],m=v[1];y===m?g.push(y):m||y!==l[0]?m?y===l[0]?g.push("<=".concat(m)):g.push("".concat(y," - ").concat(m)):g.push(">=".concat(y)):g.push("*")}var I=g.join(" || "),b="string"===typeof t.raw?t.raw:String(t);return I.length<b.length?I:t}},function(e,t,n){var r=n(493),i=n(379),a=n(795).ANY,o=n(796),s=n(378),u=function(e,t,n){if(1===e.length&&e[0].semver===a)return 1===t.length&&t[0].semver===a;var i,u,l,f,h=new Set,g=r(e);try{for(g.s();!(l=g.n()).done;){var d=l.value;">"===d.operator||">="===d.operator?i=A(i,d,n):"<"===d.operator||"<="===d.operator?u=c(u,d,n):h.add(d.semver)}}catch(k){g.e(k)}finally{g.f()}if(h.size>1)return null;if(i&&u){if((f=s(i.semver,u.semver,n))>0)return null;if(0===f&&(">="!==i.operator||"<="!==u.operator))return null}var p,v,y,m=r(h);try{for(m.s();!(p=m.n()).done;){var I=p.value;if(i&&!o(I,String(i),n))return null;if(u&&!o(I,String(u),n))return null;var b,E=r(t);try{for(E.s();!(b=E.n()).done;){var C=b.value;if(!o(I,String(C),n))return!1}}catch(k){E.e(k)}finally{E.f()}return!0}}catch(k){m.e(k)}finally{m.f()}var B,w=r(t);try{for(w.s();!(B=w.n()).done;){var Q=B.value;if(y=y||">"===Q.operator||">="===Q.operator,v=v||"<"===Q.operator||"<="===Q.operator,i)if(">"===Q.operator||">="===Q.operator){if(A(i,Q,n)===Q)return!1}else if(">="===i.operator&&!o(i.semver,String(Q),n))return!1;if(u)if("<"===Q.operator||"<="===Q.operator){if(c(u,Q,n)===Q)return!1}else if("<="===u.operator&&!o(u.semver,String(Q),n))return!1;if(!Q.operator&&(u||i)&&0!==f)return!1}}catch(k){w.e(k)}finally{w.f()}return!(i&&v&&!u&&0!==f)&&!(u&&y&&!i&&0!==f)},A=function(e,t,n){if(!e)return t;var r=s(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},c=function(e,t,n){if(!e)return t;var r=s(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=function(e,t,n){e=new i(e,n),t=new i(t,n);var a,o=!1,s=r(e.set);try{e:for(s.s();!(a=s.n()).done;){var A,c=a.value,l=r(t.set);try{for(l.s();!(A=l.n()).done;){var f=A.value,h=u(c,f,n);if(o=o||null!==h,h)continue e}}catch(g){l.e(g)}finally{l.f()}if(o)return!1}}catch(g){s.e(g)}finally{s.f()}return!0}},function(e,t){Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,value:function e(){var t=isNaN(arguments[0])?1:Number(arguments[0]);return t?Array.prototype.reduce.call(this,(function(n,r){return Array.isArray(r)?n.push.apply(n,e.call(r,t-1)):n.push(r),n}),[]):Array.prototype.slice.call(this)},writable:!0}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,"flatMap",{configurable:!0,value:function(e){return Array.prototype.map.apply(this,arguments).flat()},writable:!0})},function(e,t,n){e.exports=n(1311).default,e.exports.utils=n(924),e.exports.Responsive=n(1370).default,e.exports.Responsive.utils=n(1316),e.exports.WidthProvider=n(1371).default},function(e,t,n){"use strict";var r={},i={};function a(e){return new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'})).join(",")+"}")}function o(e){var t=Object.create(null),n=[];return e.forEach((function(e){for(var r in e)r in t||n.push(t[r]=r)})),n}function s(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function u(e){var t,n=e.getUTCHours(),r=e.getUTCMinutes(),i=e.getUTCSeconds(),a=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":((t=e.getUTCFullYear())<0?"-"+s(-t,6):t>9999?"+"+s(t,6):s(t,4))+"-"+s(e.getUTCMonth()+1,2)+"-"+s(e.getUTCDate(),2)+(a?"T"+s(n,2)+":"+s(r,2)+":"+s(i,2)+"."+s(a,3)+"Z":i?"T"+s(n,2)+":"+s(r,2)+":"+s(i,2)+"Z":r||n?"T"+s(n,2)+":"+s(r,2)+"Z":"")}t.a=function(e){var t=new RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function s(e,t){var a,o=[],s=e.length,u=0,A=0,c=s<=0,l=!1;function f(){if(c)return i;if(l)return l=!1,r;var t,a,o=u;if(34===e.charCodeAt(o)){for(;u++<s&&34!==e.charCodeAt(u)||34===e.charCodeAt(++u););return(t=u)>=s?c=!0:10===(a=e.charCodeAt(u++))?l=!0:13===a&&(l=!0,10===e.charCodeAt(u)&&++u),e.slice(o+1,t-1).replace(/""/g,'"')}for(;u<s;){if(10===(a=e.charCodeAt(t=u++)))l=!0;else if(13===a)l=!0,10===e.charCodeAt(u)&&++u;else if(a!==n)continue;return e.slice(o,t)}return c=!0,e.slice(o,s)}for(10===e.charCodeAt(s-1)&&--s,13===e.charCodeAt(s-1)&&--s;(a=f())!==i;){for(var h=[];a!==r&&a!==i;)h.push(a),a=f();t&&null==(h=t(h,A++))||o.push(h)}return o}function A(t,n){return t.map((function(t){return n.map((function(e){return l(t[e])})).join(e)}))}function c(t){return t.map(l).join(e)}function l(e){return null==e?"":e instanceof Date?u(e):t.test(e+="")?'"'+e.replace(/"/g,'""')+'"':e}return{parse:function(e,t){var n,r,i=s(e,(function(e,i){if(n)return n(e,i-1);r=e,n=t?function(e,t){var n=a(e);return function(r,i){return t(n(r),i,e)}}(e,t):a(e)}));return i.columns=r||[],i},parseRows:s,format:function(t,n){return null==n&&(n=o(t)),[n.map(l).join(e)].concat(A(t,n)).join("\n")},formatBody:function(e,t){return null==t&&(t=o(e)),A(e,t).join("\n")},formatRows:function(e){return e.map(c).join("\n")},formatRow:c,formatValue:l}}},function(e,t,n){var r,i=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",r={};function i(e,t){if(!r[e]){r[e]={};for(var n=0;n<e.length;n++)r[e][e.charAt(n)]=n}return r[e][t]}var a={compressToBase64:function(e){if(null==e)return"";var n=a._compress(e,6,(function(e){return t.charAt(e)}));switch(n.length%4){default:case 0:return n;case 1:return n+"===";case 2:return n+"==";case 3:return n+"="}},decompressFromBase64:function(e){return null==e?"":""==e?null:a._decompress(e.length,32,(function(n){return i(t,e.charAt(n))}))},compressToUTF16:function(t){return null==t?"":a._compress(t,15,(function(t){return e(t+32)}))+" "},decompressFromUTF16:function(e){return null==e?"":""==e?null:a._decompress(e.length,16384,(function(t){return e.charCodeAt(t)-32}))},compressToUint8Array:function(e){for(var t=a.compress(e),n=new Uint8Array(2*t.length),r=0,i=t.length;r<i;r++){var o=t.charCodeAt(r);n[2*r]=o>>>8,n[2*r+1]=o%256}return n},decompressFromUint8Array:function(t){if(null===t||void 0===t)return a.decompress(t);for(var n=new Array(t.length/2),r=0,i=n.length;r<i;r++)n[r]=256*t[2*r]+t[2*r+1];var o=[];return n.forEach((function(t){o.push(e(t))})),a.decompress(o.join(""))},compressToEncodedURIComponent:function(e){return null==e?"":a._compress(e,6,(function(e){return n.charAt(e)}))},decompressFromEncodedURIComponent:function(e){return null==e?"":""==e?null:(e=e.replace(/ /g,"+"),a._decompress(e.length,32,(function(t){return i(n,e.charAt(t))})))},compress:function(t){return a._compress(t,16,(function(t){return e(t)}))},_compress:function(e,t,n){if(null==e)return"";var r,i,a,o={},s={},u="",A="",c="",l=2,f=3,h=2,g=[],d=0,p=0;for(a=0;a<e.length;a+=1)if(u=e.charAt(a),Object.prototype.hasOwnProperty.call(o,u)||(o[u]=f++,s[u]=!0),A=c+u,Object.prototype.hasOwnProperty.call(o,A))c=A;else{if(Object.prototype.hasOwnProperty.call(s,c)){if(c.charCodeAt(0)<256){for(r=0;r<h;r++)d<<=1,p==t-1?(p=0,g.push(n(d)),d=0):p++;for(i=c.charCodeAt(0),r=0;r<8;r++)d=d<<1|1&i,p==t-1?(p=0,g.push(n(d)),d=0):p++,i>>=1}else{for(i=1,r=0;r<h;r++)d=d<<1|i,p==t-1?(p=0,g.push(n(d)),d=0):p++,i=0;for(i=c.charCodeAt(0),r=0;r<16;r++)d=d<<1|1&i,p==t-1?(p=0,g.push(n(d)),d=0):p++,i>>=1}0==--l&&(l=Math.pow(2,h),h++),delete s[c]}else for(i=o[c],r=0;r<h;r++)d=d<<1|1&i,p==t-1?(p=0,g.push(n(d)),d=0):p++,i>>=1;0==--l&&(l=Math.pow(2,h),h++),o[A]=f++,c=String(u)}if(""!==c){if(Object.prototype.hasOwnProperty.call(s,c)){if(c.charCodeAt(0)<256){for(r=0;r<h;r++)d<<=1,p==t-1?(p=0,g.push(n(d)),d=0):p++;for(i=c.charCodeAt(0),r=0;r<8;r++)d=d<<1|1&i,p==t-1?(p=0,g.push(n(d)),d=0):p++,i>>=1}else{for(i=1,r=0;r<h;r++)d=d<<1|i,p==t-1?(p=0,g.push(n(d)),d=0):p++,i=0;for(i=c.charCodeAt(0),r=0;r<16;r++)d=d<<1|1&i,p==t-1?(p=0,g.push(n(d)),d=0):p++,i>>=1}0==--l&&(l=Math.pow(2,h),h++),delete s[c]}else for(i=o[c],r=0;r<h;r++)d=d<<1|1&i,p==t-1?(p=0,g.push(n(d)),d=0):p++,i>>=1;0==--l&&(l=Math.pow(2,h),h++)}for(i=2,r=0;r<h;r++)d=d<<1|1&i,p==t-1?(p=0,g.push(n(d)),d=0):p++,i>>=1;for(;;){if(d<<=1,p==t-1){g.push(n(d));break}p++}return g.join("")},decompress:function(e){return null==e?"":""==e?null:a._decompress(e.length,32768,(function(t){return e.charCodeAt(t)}))},_decompress:function(t,n,r){var i,a,o,s,u,A,c,l=[],f=4,h=4,g=3,d="",p=[],v={val:r(0),position:n,index:1};for(i=0;i<3;i+=1)l[i]=i;for(o=0,u=Math.pow(2,2),A=1;A!=u;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),o|=(s>0?1:0)*A,A<<=1;switch(o){case 0:for(o=0,u=Math.pow(2,8),A=1;A!=u;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),o|=(s>0?1:0)*A,A<<=1;c=e(o);break;case 1:for(o=0,u=Math.pow(2,16),A=1;A!=u;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),o|=(s>0?1:0)*A,A<<=1;c=e(o);break;case 2:return""}for(l[3]=c,a=c,p.push(c);;){if(v.index>t)return"";for(o=0,u=Math.pow(2,g),A=1;A!=u;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),o|=(s>0?1:0)*A,A<<=1;switch(c=o){case 0:for(o=0,u=Math.pow(2,8),A=1;A!=u;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),o|=(s>0?1:0)*A,A<<=1;l[h++]=e(o),c=h-1,f--;break;case 1:for(o=0,u=Math.pow(2,16),A=1;A!=u;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),o|=(s>0?1:0)*A,A<<=1;l[h++]=e(o),c=h-1,f--;break;case 2:return p.join("")}if(0==f&&(f=Math.pow(2,g),g++),l[c])d=l[c];else{if(c!==h)return null;d=a+a.charAt(0)}p.push(d),l[h++]=a+d.charAt(0),a=d,0==--f&&(f=Math.pow(2,g),g++)}}};return a}();void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(0)),i=c(n(1094)),a=c(n(173)),o=n(924),s=n(1312),u=c(n(1360)),A=c(n(1369));function c(e){return e&&e.__esModule?e:{default:e}}function l(e){return(l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(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 h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(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 v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==l(t)&&"function"!==typeof t?I(e):t}function I(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C=!1;try{C=/firefox/i.test(navigator.userAgent)}catch(w){}var B=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(l,e);var t,n,A,c=y(l);function l(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),E(I(n=c.call(this,e,t)),"state",{activeDrag:null,layout:(0,o.synchronizeLayoutWithChildren)(n.props.layout,n.props.children,n.props.cols,(0,o.compactType)(n.props)),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,droppingDOMNode:null,children:[]}),E(I(n),"dragEnterCounter",0),E(I(n),"onDragOver",(function(e){if(C&&-1===e.nativeEvent.target.className.indexOf("react-grid-layout"))return!1;var t=n.props,i=t.droppingItem,a=t.margin,o=t.cols,u=t.rowHeight,A=t.maxRows,c=t.width,l=t.containerPadding,f=n.state.layout,d=e.nativeEvent,p=d.layerX,v=d.layerY,y={left:p,top:v,e:e};if(n.state.droppingDOMNode){if(n.state.droppingPosition){var m=n.state.droppingPosition,I=m.left,b=m.top;(I!=p||b!=v)&&n.setState({droppingPosition:y})}}else{var E={cols:o,margin:a,maxRows:A,rowHeight:u,containerWidth:c,containerPadding:l||a},B=(0,s.calcXY)(E,v,p,i.w,i.h);n.setState({droppingDOMNode:r.default.createElement("div",{key:i.i}),droppingPosition:y,layout:[].concat(g(f),[h(h({},i),{},{x:B.x,y:B.y,static:!1,isDraggable:!0})])})}e.stopPropagation(),e.preventDefault()})),E(I(n),"removeDroppingPlaceholder",(function(){var e=n.props,t=e.droppingItem,r=e.cols,i=n.state.layout,a=(0,o.compact)(i.filter((function(e){return e.i!==t.i})),(0,o.compactType)(n.props),r);n.setState({layout:a,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})})),E(I(n),"onDragLeave",(function(){n.dragEnterCounter--,0===n.dragEnterCounter&&n.removeDroppingPlaceholder()})),E(I(n),"onDragEnter",(function(){n.dragEnterCounter++})),E(I(n),"onDrop",(function(e){var t=n.props.droppingItem,r=n.state.layout,i=r.find((function(e){return e.i===t.i}));n.dragEnterCounter=0,n.removeDroppingPlaceholder(),n.props.onDrop(r,i,e)})),(0,o.autoBindHandlers)(I(n),["onDragStart","onDrag","onDragStop","onResizeStart","onResize","onResizeStop"]),n}return t=l,A=[{key:"getDerivedStateFromProps",value:function(e,t){var n;return t.activeDrag?null:((0,i.default)(e.layout,t.propsLayout)&&e.compactType===t.compactType?(0,o.childrenEqual)(e.children,t.children)||(n=t.layout):n=e.layout,n?{layout:(0,o.synchronizeLayoutWithChildren)(n,e.children,e.cols,(0,o.compactType)(e)),compactType:e.compactType,children:e.children,propsLayout:e.layout}:null)}}],(n=[{key:"componentDidMount",value:function(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}},{key:"shouldComponentUpdate",value:function(e,t){return this.props.children!==e.children||!(0,o.fastRGLPropsEqual)(this.props,e,i.default)||this.state.activeDrag!==t.activeDrag||this.state.mounted!==t.mounted||this.state.droppingPosition!==t.droppingPosition}},{key:"componentDidUpdate",value:function(e,t){if(!this.state.activeDrag){var n=this.state.layout,r=t.layout;this.onLayoutMaybeChanged(n,r)}}},{key:"containerHeight",value:function(){if(this.props.autoSize){var e=(0,o.bottom)(this.state.layout),t=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return e*this.props.rowHeight+(e-1)*this.props.margin[1]+2*t+"px"}}},{key:"onDragStart",value:function(e,t,n,r){var i=r.e,a=r.node,s=this.state.layout,u=(0,o.getLayoutItem)(s,e);if(u)return this.setState({oldDragItem:(0,o.cloneLayoutItem)(u),oldLayout:this.state.layout}),this.props.onDragStart(s,u,u,null,i,a)}},{key:"onDrag",value:function(e,t,n,r){var i=r.e,a=r.node,s=this.state.oldDragItem,u=this.state.layout,A=this.props.cols,c=(0,o.getLayoutItem)(u,e);if(c){var l={w:c.w,h:c.h,x:c.x,y:c.y,placeholder:!0,i:e};u=(0,o.moveElement)(u,c,t,n,!0,this.props.preventCollision,(0,o.compactType)(this.props),A),this.props.onDrag(u,s,c,l,i,a),this.setState({layout:(0,o.compact)(u,(0,o.compactType)(this.props),A),activeDrag:l})}}},{key:"onDragStop",value:function(e,t,n,r){var i=r.e,a=r.node;if(this.state.activeDrag){var s=this.state.oldDragItem,u=this.state.layout,A=this.props,c=A.cols,l=A.preventCollision,f=(0,o.getLayoutItem)(u,e);if(f){u=(0,o.moveElement)(u,f,t,n,!0,l,(0,o.compactType)(this.props),c),this.props.onDragStop(u,s,f,null,i,a);var h=(0,o.compact)(u,(0,o.compactType)(this.props),c),g=this.state.oldLayout;this.setState({activeDrag:null,layout:h,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(h,g)}}}},{key:"onLayoutMaybeChanged",value:function(e,t){t||(t=this.state.layout),(0,i.default)(t,e)||this.props.onLayoutChange(e)}},{key:"onResizeStart",value:function(e,t,n,r){var i=r.e,a=r.node,s=this.state.layout,u=(0,o.getLayoutItem)(s,e);u&&(this.setState({oldResizeItem:(0,o.cloneLayoutItem)(u),oldLayout:this.state.layout}),this.props.onResizeStart(s,u,u,null,i,a))}},{key:"onResize",value:function(e,t,n,r){var i=r.e,a=r.node,s=this.state,u=s.layout,A=s.oldResizeItem,c=this.props,l=c.cols,f=c.preventCollision,g=(0,o.getLayoutItem)(u,e);if(g){var d;if(f){var p=(0,o.getAllCollisions)(u,h(h({},g),{},{w:t,h:n})).filter((function(e){return e.i!==g.i}));if(d=p.length>0){var v=1/0,y=1/0;p.forEach((function(e){e.x>g.x&&(v=Math.min(v,e.x)),e.y>g.y&&(y=Math.min(y,e.y))})),Number.isFinite(v)&&(g.w=v-g.x),Number.isFinite(y)&&(g.h=y-g.y)}}d||(g.w=t,g.h=n);var m={w:g.w,h:g.h,x:g.x,y:g.y,static:!0,i:e};this.props.onResize(u,A,g,m,i,a),this.setState({layout:(0,o.compact)(u,(0,o.compactType)(this.props),l),activeDrag:m})}}},{key:"onResizeStop",value:function(e,t,n,r){var i=r.e,a=r.node,s=this.state,u=s.layout,A=s.oldResizeItem,c=this.props.cols,l=(0,o.getLayoutItem)(u,e);this.props.onResizeStop(u,A,l,null,i,a);var f=(0,o.compact)(u,(0,o.compactType)(this.props),c),h=this.state.oldLayout;this.setState({activeDrag:null,layout:f,oldResizeItem:null,oldLayout:null}),this.onLayoutMaybeChanged(f,h)}},{key:"placeholder",value:function(){var e=this.state.activeDrag;if(!e)return null;var t=this.props,n=t.width,i=t.cols,a=t.margin,o=t.containerPadding,s=t.rowHeight,A=t.maxRows,c=t.useCSSTransforms,l=t.transformScale;return r.default.createElement(u.default,{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,className:"react-grid-placeholder",containerWidth:n,cols:i,margin:a,containerPadding:o||a,maxRows:A,rowHeight:s,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:c,transformScale:l},r.default.createElement("div",null))}},{key:"processGridItem",value:function(e,t){if(e&&e.key){var n=(0,o.getLayoutItem)(this.state.layout,String(e.key));if(!n)return null;var i=this.props,a=i.width,s=i.cols,A=i.margin,c=i.containerPadding,l=i.rowHeight,f=i.maxRows,h=i.isDraggable,g=i.isResizable,d=i.isBounded,p=i.useCSSTransforms,v=i.transformScale,y=i.draggableCancel,m=i.draggableHandle,I=i.resizeHandles,b=this.state,E=b.mounted,C=b.droppingPosition,B="boolean"===typeof n.isDraggable?n.isDraggable:!n.static&&h,w="boolean"===typeof n.isResizable?n.isResizable:!n.static&&g,Q=n.resizeHandles||I,k=B&&d&&!1!==n.isBounded;return r.default.createElement(u.default,{containerWidth:a,cols:s,margin:A,containerPadding:c||A,maxRows:f,rowHeight:l,cancel:y,handle:m,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:B,isResizable:w,isBounded:k,useCSSTransforms:p&&E,usePercentages:!E,transformScale:v,w:n.w,h:n.h,x:n.x,y:n.y,i:n.i,minH:n.minH,minW:n.minW,maxH:n.maxH,maxW:n.maxW,static:n.static,droppingPosition:t?C:void 0,resizeHandles:Q},e)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,i=t.style,s=t.isDroppable,u=t.innerRef,A=(0,a.default)("react-grid-layout",n),c=h({height:this.containerHeight()},i);return r.default.createElement("div",{ref:u,className:A,style:c,onDrop:s?this.onDrop:o.noop,onDragLeave:s?this.onDragLeave:o.noop,onDragEnter:s?this.onDragEnter:o.noop,onDragOver:s?this.onDragOver:o.noop},r.default.Children.map(this.props.children,(function(t){return e.processGridItem(t)})),s&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}])&&p(t.prototype,n),A&&p(t,A),l}(r.default.Component);t.default=B,E(B,"displayName","ReactGridLayout"),E(B,"propTypes",A.default),E(B,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:o.noop,onDragStart:o.noop,onDrag:o.noop,onDragStop:o.noop,onResizeStart:o.noop,onResize:o.noop,onResizeStop:o.noop,onDrop:o.noop})},function(e,t,n){"use strict";function r(e){var t=e.margin,n=e.containerPadding,r=e.containerWidth,i=e.cols;return(r-t[0]*(i-1)-2*n[0])/i}function i(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function a(e,t,n){return Math.max(Math.min(e,n),t)}Object.defineProperty(t,"__esModule",{value:!0}),t.calcGridColWidth=r,t.calcGridItemWHPx=i,t.calcGridItemPosition=function(e,t,n,a,o,s){var u=e.margin,A=e.containerPadding,c=e.rowHeight,l=r(e),f={};s&&s.resizing?(f.width=Math.round(s.resizing.width),f.height=Math.round(s.resizing.height)):(f.width=i(a,l,u[0]),f.height=i(o,c,u[1]));s&&s.dragging?(f.top=Math.round(s.dragging.top),f.left=Math.round(s.dragging.left)):(f.top=Math.round((c+u[1])*n+A[1]),f.left=Math.round((l+u[0])*t+A[0]));return f},t.calcXY=function(e,t,n,i,o){var s=e.margin,u=e.cols,A=e.rowHeight,c=e.maxRows,l=r(e),f=Math.round((n-s[0])/(l+s[0])),h=Math.round((t-s[1])/(A+s[1]));return f=a(f,0,u-i),h=a(h,0,c-o),{x:f,y:h}},t.calcWH=function(e,t,n,i,o){var s=e.margin,u=e.maxRows,A=e.cols,c=e.rowHeight,l=r(e),f=Math.round((t+s[0])/(l+s[0])),h=Math.round((n+s[1])/(c+s[1]));return f=a(f,0,A-i),h=a(h,0,u-o),{w:f,h:h}},t.clamp=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBoundPosition=function(e,t,n){if(!e.props.bounds)return[t,n];var o=e.props.bounds;o="string"===typeof o?o:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(o);var s=a(e);if("string"===typeof o){var u,A=s.ownerDocument,c=A.defaultView;if(!((u="parent"===o?s.parentNode:A.querySelector(o))instanceof c.HTMLElement))throw new Error('Bounds selector "'+o+'" could not find an element.');var l=c.getComputedStyle(s),f=c.getComputedStyle(u);o={left:-s.offsetLeft+(0,r.int)(f.paddingLeft)+(0,r.int)(l.marginLeft),top:-s.offsetTop+(0,r.int)(f.paddingTop)+(0,r.int)(l.marginTop),right:(0,i.innerWidth)(u)-(0,i.outerWidth)(s)-s.offsetLeft+(0,r.int)(f.paddingRight)-(0,r.int)(l.marginRight),bottom:(0,i.innerHeight)(u)-(0,i.outerHeight)(s)-s.offsetTop+(0,r.int)(f.paddingBottom)-(0,r.int)(l.marginBottom)}}(0,r.isNum)(o.right)&&(t=Math.min(t,o.right));(0,r.isNum)(o.bottom)&&(n=Math.min(n,o.bottom));(0,r.isNum)(o.left)&&(t=Math.max(t,o.left));(0,r.isNum)(o.top)&&(n=Math.max(n,o.top));return[t,n]},t.snapToGrid=function(e,t,n){var r=Math.round(t/e[0])*e[0],i=Math.round(n/e[1])*e[1];return[r,i]},t.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},t.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},t.getControlPosition=function(e,t,n){var r="number"===typeof t?(0,i.getTouch)(e,t):null;if("number"===typeof t&&!r)return null;var o=a(n),s=n.props.offsetParent||o.offsetParent||o.ownerDocument.body;return(0,i.offsetXYFromParent)(r||e,s,n.props.scale)},t.createCoreData=function(e,t,n){var i=e.state,o=!(0,r.isNum)(i.lastX),s=a(e);return o?{node:s,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:s,deltaX:t-i.lastX,deltaY:n-i.lastY,lastX:i.lastX,lastY:i.lastY,x:t,y:n}},t.createDraggableData=function(e,t){var n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}};var r=n(1080),i=n(1095);function a(e){var t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){void 0}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(0)),i=s(n(28)),a=n(1366),o=n(1367);function s(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function A(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 c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=function(e){var t,n;function i(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return l(c(t=e.call.apply(e,[this].concat(r))||this),"state",{slackW:0,slackH:0}),t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=i.prototype;return s.lockAspectRatio=function(e,t,n){return[e=(t=e/n)*n,t]},s.runConstraints=function(e,t){var n=[this.props.minConstraints,this.props.maxConstraints],r=n[0],i=n[1];if(!r&&!i)return[e,t];if(this.props.lockAspectRatio)if(t===this.props.height){var a=this.props.width/this.props.height;e=(t=e/a)*a}else{var o=this.props.height/this.props.width;t=(e=t/o)*o}var s=e,u=t,A=this.state,c=A.slackW,l=A.slackH;return e+=c,t+=l,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),i&&(e=Math.min(i[0],e),t=Math.min(i[1],t)),l+=u-t,(c+=s-e)===this.state.slackW&&l===this.state.slackH||this.setState({slackW:c,slackH:l}),[e,t]},s.resizeHandler=function(e,t){var n=this;return function(r,i){var a=i.node,o=i.deltaX,s=i.deltaY;o/=n.props.transformScale,s/=n.props.transformScale;var u=("both"===n.props.axis||"x"===n.props.axis)&&-1===["n","s"].indexOf(t),A=("both"===n.props.axis||"y"===n.props.axis)&&-1===["e","w"].indexOf(t);u&&"w"===t[t.length-1]&&(o=-o),A&&"n"===t[0]&&(s=-s);var c=n.props.width+(u?o:0),l=n.props.height+(A?s:0),f=c!==n.props.width,h=l!==n.props.height;if("onResize"!==e||f||h){var g=n.runConstraints(c,l);c=g[0],l=g[1];var d={};if("onResizeStart"===e);else if("onResizeStop"===e)d.slackW=d.slackH=0;else if(c===n.props.width&&l===n.props.height)return;"function"===typeof n.props[e]?("function"===typeof r.persist&&r.persist(),n.setState(d,(function(){return n.props[e](r,{node:a,size:{width:c,height:l},handle:t})}))):n.setState(d)}}},s.renderResizeHandle=function(e){var t=this.props.handle;return t?"function"===typeof t?t(e):t:r.default.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+e})},s.render=function(){var e=this,t=this.props,n=t.children,i=t.draggableOpts,s=(t.width,t.height,t.handleSize,t.lockAspectRatio,t.axis,t.minConstraints,t.maxConstraints,t.onResize,t.onResizeStop,t.onResizeStart,t.resizeHandles),c=(t.transformScale,function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["children","draggableOpts","width","height","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"])),f=c.className?c.className+" react-resizable":"react-resizable";return(0,o.cloneElement)(n,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(n,!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},c,{className:f,children:[n.props.children,s.map((function(t){return r.default.createElement(a.DraggableCore,u({},i,{key:"resizableHandle-"+t,onStop:e.resizeHandler("onResizeStop",t),onStart:e.resizeHandler("onResizeStart",t),onDrag:e.resizeHandler("onResize",t)}),e.renderResizeHandle(t))}))]}))},i}(r.default.Component);t.default=f,l(f,"propTypes",{children:i.default.element.isRequired,width:i.default.number.isRequired,height:i.default.number.isRequired,handle:i.default.element,handleSize:i.default.array,resizeHandles:i.default.arrayOf(i.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:i.default.number,lockAspectRatio:i.default.bool,axis:i.default.oneOf(["both","x","y","none"]),minConstraints:i.default.arrayOf(i.default.number),maxConstraints:i.default.arrayOf(i.default.number),onResizeStop:i.default.func,onResizeStart:i.default.func,onResize:i.default.func,draggableOpts:i.default.object}),l(f,"defaultProps",{handleSize:[20,20],lockAspectRatio:!1,axis:"both",minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBreakpointFromWidth=function(e,t){for(var n=i(e),r=n[0],a=1,o=n.length;a<o;a++){var s=n[a];t>e[s]&&(r=s)}return r},t.getColsFromBreakpoint=function(e,t){if(!t[e])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+" is missing!");return t[e]},t.findOrGenerateResponsiveLayout=function(e,t,n,a,o,s){if(e[n])return(0,r.cloneLayout)(e[n]);for(var u=e[a],A=i(t),c=A.slice(A.indexOf(n)),l=0,f=c.length;l<f;l++){var h=c[l];if(e[h]){u=e[h];break}}return u=(0,r.cloneLayout)(u||[]),(0,r.compact)((0,r.correctBounds)(u,{cols:o}),s,o)},t.sortBreakpoints=i;var r=n(924);function i(e){return Object.keys(e).sort((function(t,n){return e[t]-e[n]}))}},function(e,t,n){"use strict";var r=n(23),i=n(18),a=(n(28),n(200));var o=function(e){var t=function(t){var n=e(t);return t.css?Object(i.a)({},Object(a.a)(n,e(Object(i.a)({theme:t.theme},t.css))),{},function(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}(t.css,[e.filterProps])):n};return t.propTypes={},t.filterProps=["css"].concat(Object(r.a)(e.filterProps)),t};var s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=function(e){return t.reduce((function(t,n){var r=n(e);return r?Object(a.a)(t,r):t}),{})};return r.propTypes={},r.filterProps=t.reduce((function(e,t){return e.concat(t.filterProps)}),[]),r},u=n(1),A=n(329);function c(e,t){return t&&"string"===typeof t?t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:null}),e):null}var l=function(e){var t=e.prop,n=e.cssProperty,r=void 0===n?e.prop:n,i=e.themeKey,a=e.transform,o=function(e){if(null==e[t])return null;var n=e[t],o=c(e.theme,i)||{};return Object(A.a)(e,n,(function(e){var t;return"function"===typeof o?t=o(e):Array.isArray(o)?t=o[e]||e:(t=c(o,e)||e,a&&(t=a(t))),!1===r?t:Object(u.a)({},r,t)}))};return o.propTypes={},o.filterProps=[t],o};function f(e){return"number"!==typeof e?e:"".concat(e,"px solid")}var h=s(l({prop:"border",themeKey:"borders",transform:f}),l({prop:"borderTop",themeKey:"borders",transform:f}),l({prop:"borderRight",themeKey:"borders",transform:f}),l({prop:"borderBottom",themeKey:"borders",transform:f}),l({prop:"borderLeft",themeKey:"borders",transform:f}),l({prop:"borderColor",themeKey:"palette"}),l({prop:"borderRadius",themeKey:"shape"})),g=s(l({prop:"displayPrint",cssProperty:!1,transform:function(e){return{"@media print":{display:e}}}}),l({prop:"display"}),l({prop:"overflow"}),l({prop:"textOverflow"}),l({prop:"visibility"}),l({prop:"whiteSpace"})),d=s(l({prop:"flexBasis"}),l({prop:"flexDirection"}),l({prop:"flexWrap"}),l({prop:"justifyContent"}),l({prop:"alignItems"}),l({prop:"alignContent"}),l({prop:"order"}),l({prop:"flex"}),l({prop:"flexGrow"}),l({prop:"flexShrink"}),l({prop:"alignSelf"}),l({prop:"justifyItems"}),l({prop:"justifySelf"})),p=s(l({prop:"gridGap"}),l({prop:"gridColumnGap"}),l({prop:"gridRowGap"}),l({prop:"gridColumn"}),l({prop:"gridRow"}),l({prop:"gridAutoFlow"}),l({prop:"gridAutoColumns"}),l({prop:"gridAutoRows"}),l({prop:"gridTemplateColumns"}),l({prop:"gridTemplateRows"}),l({prop:"gridTemplateAreas"}),l({prop:"gridArea"})),v=s(l({prop:"position"}),l({prop:"zIndex",themeKey:"zIndex"}),l({prop:"top"}),l({prop:"right"}),l({prop:"bottom"}),l({prop:"left"})),y=s(l({prop:"color",themeKey:"palette"}),l({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"})),m=l({prop:"boxShadow",themeKey:"shadows"});function I(e){return e<=1?"".concat(100*e,"%"):e}var b=l({prop:"width",transform:I}),E=l({prop:"maxWidth",transform:I}),C=l({prop:"minWidth",transform:I}),B=l({prop:"height",transform:I}),w=l({prop:"maxHeight",transform:I}),Q=l({prop:"minHeight",transform:I}),k=(l({prop:"size",cssProperty:"width",transform:I}),l({prop:"size",cssProperty:"height",transform:I}),s(b,E,C,B,w,Q,l({prop:"boxSizing"}))),_=n(896),x=s(l({prop:"fontFamily",themeKey:"typography"}),l({prop:"fontSize",themeKey:"typography"}),l({prop:"fontStyle",themeKey:"typography"}),l({prop:"fontWeight",themeKey:"typography"}),l({prop:"letterSpacing"}),l({prop:"lineHeight"}),l({prop:"textAlign"})),S=n(33),O=n(0),D=n.n(O),R=n(37),j=n(328),M=n.n(j),N=n(531);function F(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}var T=n(196),L=function(e){var t=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.name,a=Object(S.a)(n,["name"]);var o,s=r,u="function"===typeof t?function(e){return{root:function(n){return t(Object(i.a)({theme:e},n))}}}:{root:t},A=Object(N.a)(u,Object(i.a)({Component:e,name:r||e.displayName,classNamePrefix:s},a));t.filterProps&&(o=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var c=D.a.forwardRef((function(t,n){var r=t.children,a=t.className,s=t.clone,u=t.component,c=Object(S.a)(t,["children","className","clone","component"]),l=A(t),f=Object(R.a)(l.root,a),h=c;if(o&&(h=F(h,o)),s)return D.a.cloneElement(r,Object(i.a)({className:Object(R.a)(r.props.className,f)},h));if("function"===typeof r)return r(Object(i.a)({className:f},h));var g=u||e;return D.a.createElement(g,Object(i.a)({ref:n,className:f},h),r)}));return M()(c,e),c}}(e);return function(e,n){return t(e,Object(i.a)({defaultTheme:T.a},n))}},P=o(s(h,g,d,p,v,y,m,k,_.b,x)),U=L("div")(P,{name:"MuiBox"});t.a=U},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/hubmapconsortium/vitessce/#cells","title":"Vitessce cell data","type":"object","definitions":{"coord":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number"}},"positiveFloatValues":{"type":"object","patternProperties":{".":{"type":"number","minimum":0}}},"stringValues":{"type":"object","patternProperties":{".":{"type":"string"}}}},"patternProperties":{".":{"additionalProperties":false,"required":[],"properties":{"mappings":{"type":"object","patternProperties":{".":{"$ref":"#/definitions/coord"}}},"xy":{"$ref":"#/definitions/coord"},"genes":{"$ref":"#/definitions/positiveFloatValues"},"factors":{"$ref":"#/definitions/stringValues"},"poly":{"type":"array","items":{"$ref":"#/definitions/coord"}}}}}}')},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/hubmapconsortium/vitessce/#molecules","title":"Vitessce molecule data","type":"object","definitions":{"coord":{"type":"array","maxItems":2,"minItems":2,"items":{"type":"number"}}},"patternProperties":{".":{"type":"array","items":{"$ref":"#/definitions/coord"}}}}')},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/hubmapconsortium/vitessce/#neighborhoods","title":"Vitessce neighborhood data","type":"object","definitions":{"coord":{"type":"array","maxItems":2,"minItems":2,"items":{"type":"number"}}},"patternProperties":{".":{"additionalProperties":false,"required":["poly"],"properties":{"poly":{"type":"array","maxItems":3,"minItems":3,"items":{"$ref":"#/definitions/coord"}}}}}}')},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/hubmapconsortium/vitessce/#genes","title":"Vitessce gene data","type":"object","definitions":{"positiveFloatValues":{"type":"object","patternProperties":{".":{"type":"number","minimum":0}}}},"patternProperties":{".":{"additionalProperties":false,"required":["max","cells"],"properties":{"max":{"type":"number"},"cells":{"$ref":"#/definitions/positiveFloatValues"}}}}}')},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/hubmapconsortium/vitessce/#clusters","title":"Vitessce cluster data","type":"object","definitions":{"stringArray":{"type":"array","items":{"type":"string"}},"matrix":{"type":"array","items":{"type":"array","items":{"type":"number","minimum":0,"maximum":1}}}},"additionalProperties":false,"required":["rows","cols","matrix"],"properties":{"rows":{"$ref":"#/definitions/stringArray"},"cols":{"$ref":"#/definitions/stringArray"},"matrix":{"$ref":"#/definitions/matrix"}}}')},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/hubmapconsortium/vitessce/#dataset","title":"Vitessce data set","type":"object","definitions":{"components":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["component","x","y"],"properties":{"component":{"type":"string"},"props":{"type":"object"},"x":{"type":"integer"},"y":{"type":"integer"},"w":{"type":"integer"},"h":{"type":"integer"}}}},"requestInit":{"type":"object","additionalProperties":false,"required":[],"properties":{"method":{"type":"string"},"headers":{"type":"object"},"body":{"type":"string"},"mode":{"type":"string"},"credentials":{"type":"string"},"cache":{"type":"string"},"redirect":{"type":"string"},"referrer":{"type":"string"},"integrity":{"type":"string"}}}},"additionalProperties":false,"required":["version","name","layers"],"properties":{"name":{"type":"string"},"public":{"type":"boolean"},"description":{"type":"string"},"layers":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","type","fileType","url"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"fileType":{"type":"string"},"url":{"type":"string"},"requestInit":{"$ref":"#/definitions/requestInit"}}}},"staticLayout":{"$ref":"#/definitions/components"},"version":{"type":"string","enum":["0.1.0"]}}}')},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},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,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),a=e.getVersionPrecision(n),o=Math.max(i,a),s=0,u=e.map([t,n],(function(t){var n=o-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(s=o-Math.min(i,a)),o-=1;o>=s;){if(u[0][o]>u[1][o])return 1;if(u[0][o]===u[1][o]){if(o===s)return 0;o-=1}else if(u[0][o]<u[1][o])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(a));var s=function(){var e=a[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=a.length;t<n;t+=1)s();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){"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,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},a=n(18);function o(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)}}var s=function(){function e(){}var t,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 a.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return a.ENGINE_MAP}},{key:"OS_MAP",get:function(){return a.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return a.PLATFORMS_MAP}}])&&o(t,n),e}();t.default=s,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(92)),i=u(n(93)),a=u(n(94)),o=u(n(95)),s=u(n(17));function u(e){return e&&e.__esModule?e:{default:e}}var A=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=s.default.find(r.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=s.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=s.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.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=s.default.find(o.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 s.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},a=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(i[t]=o,a+=1):"object"==typeof o&&(n[t]=o,r+=1)})),r>0){var o=Object.keys(n),u=s.default.find(o,(function(e){return t.isOS(e)}));if(u){var A=this.satisfies(n[u]);if(void 0!==A)return A}var c=s.default.find(o,(function(e){return t.isPlatform(e)}));if(c){var l=this.satisfies(n[c]);if(void 0!==l)return l}}if(a>0){var f=Object.keys(i),h=s.default.find(f,(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 n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(i,n,r))>-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=A,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),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=o,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:a.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:a.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:a.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:a.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:a.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{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:a.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:a.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:a.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{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:a.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18),o=[{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",n={type:a.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:a.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:a.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:a.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:a.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:a.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:a.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:a.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:a.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:a.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(19);t.a=function(e,t){var n,i;if(void 0===t){var a,o=Object(r.a)(e);try{for(o.s();!(a=o.n()).done;){var s=a.value;null!=s&&(void 0===n?s>=s&&(n=i=s):(n>s&&(n=s),i<s&&(i=s)))}}catch(f){o.e(f)}finally{o.f()}}else{var u,A=-1,c=Object(r.a)(e);try{for(c.s();!(u=c.n()).done;){var l=u.value;null!=(l=t(l,++A,e))&&(void 0===n?l>=l&&(n=i=l):(n>l&&(n=l),i<l&&(i=l)))}}catch(f){c.e(f)}finally{c.f()}}return[n,i]}},function(e,t){e.exports=function(e,t,n){return e===t||e.className===t.className&&n(e.style,t.style)&&e.width===t.width&&e.autoSize===t.autoSize&&e.cols===t.cols&&e.draggableCancel===t.draggableCancel&&e.draggableHandle===t.draggableHandle&&n(e.verticalCompact,t.verticalCompact)&&n(e.compactType,t.compactType)&&n(e.layout,t.layout)&&n(e.margin,t.margin)&&n(e.containerPadding,t.containerPadding)&&e.rowHeight===t.rowHeight&&e.maxRows===t.maxRows&&e.isBounded===t.isBounded&&e.isDraggable===t.isDraggable&&e.isResizable===t.isResizable&&e.preventCollision===t.preventCollision&&e.useCSSTransforms===t.useCSSTransforms&&e.transformScale===t.transformScale&&e.isDroppable===t.isDroppable&&n(e.resizeHandles,t.resizeHandles)&&e.onLayoutChange===t.onLayoutChange&&e.onDragStart===t.onDragStart&&e.onDrag===t.onDrag&&e.onDragStop===t.onDragStop&&e.onResizeStart===t.onResizeStart&&e.onResize===t.onResize&&e.onResizeStop===t.onResizeStop&&e.onDrop===t.onDrop&&n(e.droppingItem,t.droppingItem)&&n(e.innerRef,t.innerRef)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(0)),i=l(n(75)),a=l(n(28)),o=n(1361),s=n(1365),u=n(924),A=n(1312),c=l(n(173));function l(e){return e&&e.__esModule?e:{default:e}}function f(e){return(f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(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 g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(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 v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==f(t)&&"function"!==typeof t?I(e):t}function I(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(f,e);var t,n,a,l=y(f);function f(){var e;d(this,f);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return E(I(e=l.call.apply(l,[this].concat(n))),"state",{resizing:null,dragging:null,className:""}),E(I(e),"currentNode",void 0),E(I(e),"onDragStart",(function(t,n){var r=n.node,i=e.props.onDragStart;if(i){var a={top:0,left:0},o=r.offsetParent;if(o){var s=o.getBoundingClientRect(),u=r.getBoundingClientRect(),c=u.left/e.props.transformScale,l=s.left/e.props.transformScale,f=u.top/e.props.transformScale,h=s.top/e.props.transformScale;a.left=c-l+o.scrollLeft,a.top=f-h+o.scrollTop,e.setState({dragging:a});var g=(0,A.calcXY)(e.getPositionParams(),a.top,a.left,e.props.w,e.props.h),d=g.x,p=g.y;return i.call(I(e),e.props.i,d,p,{e:t,node:r,newPosition:a})}}})),E(I(e),"onDrag",(function(t,n){var r=n.node,i=n.deltaX,a=n.deltaY,o=e.props,s=o.onDrag,u=o.transformScale;if(s){if(i/=u,a/=u,!e.state.dragging)throw new Error("onDrag called before onDragStart.");var c=e.state.dragging.top+a,l=e.state.dragging.left+i,f=e.props,h=f.isBounded,g=f.i,d=f.w,p=f.h,v=f.containerWidth,y=e.getPositionParams();if(h){var m=r.offsetParent;if(m){var b=e.props,E=b.margin,C=b.rowHeight,B=m.clientHeight-(0,A.calcGridItemWHPx)(p,C,E[1]);c=(0,A.clamp)(c,0,B);var w=(0,A.calcGridColWidth)(y),Q=v-(0,A.calcGridItemWHPx)(d,w,E[0]);l=(0,A.clamp)(l,0,Q)}}var k={top:c,left:l};e.setState({dragging:k});var _=(0,A.calcXY)(y,c,l,d,p),x=_.x,S=_.y;return s.call(I(e),g,x,S,{e:t,node:r,newPosition:k})}})),E(I(e),"onDragStop",(function(t,n){var r=n.node,i=e.props.onDragStop;if(i){if(!e.state.dragging)throw new Error("onDragEnd called before onDragStart.");var a=e.props,o=a.w,s=a.h,u=a.i,c=e.state.dragging,l=c.left,f=c.top,h={top:f,left:l};e.setState({dragging:null});var g=(0,A.calcXY)(e.getPositionParams(),f,l,o,s),d=g.x,p=g.y;return i.call(I(e),u,d,p,{e:t,node:r,newPosition:h})}})),E(I(e),"onResizeStop",(function(t,n){e.onResizeHandler(t,n,"onResizeStop")})),E(I(e),"onResizeStart",(function(t,n){e.onResizeHandler(t,n,"onResizeStart")})),E(I(e),"onResize",(function(t,n){e.onResizeHandler(t,n,"onResize")})),e}return t=f,(n=[{key:"shouldComponentUpdate",value:function(e,t){if(this.props.children!==e.children)return!0;if(this.props.droppingPosition!==e.droppingPosition)return!0;var n=(0,A.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),r=(0,A.calcGridItemPosition)(this.getPositionParams(e),e.x,e.y,e.w,e.h,t);return!(0,u.fastPositionEqual)(n,r)||this.props.useCSSTransforms!==e.useCSSTransforms}},{key:"componentDidMount",value:function(){this.moveDroppingItem({})}},{key:"componentDidUpdate",value:function(e){this.moveDroppingItem(e)}},{key:"moveDroppingItem",value:function(e){var t=this.props.droppingPosition;if(t){var n=e.droppingPosition||{left:0,top:0},r=this.state.dragging;this.currentNode||(this.currentNode=i.default.findDOMNode(this));var a=r&&t.left!==n.left||t.top!==n.top;if(r){if(a){var o=t.left-r.left,s=t.top-r.top;this.onDrag(t.e,{node:this.currentNode,deltaX:o,deltaY:s})}}else this.onDragStart(t.e,{node:this.currentNode,deltaX:t.left,deltaY:t.top})}}},{key:"getPositionParams",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}},{key:"createStyle",value:function(e){var t,n=this.props,r=n.usePercentages,i=n.containerWidth;return n.useCSSTransforms?t=(0,u.setTransform)(e):(t=(0,u.setTopLeft)(e),r&&(t.left=(0,u.perc)(e.left/i),t.width=(0,u.perc)(e.width/i))),t}},{key:"mixinDraggable",value:function(e,t){return r.default.createElement(o.DraggableCore,{disabled:!t,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale},e)}},{key:"mixinResizable",value:function(e,t,n){var i=this.props,a=i.cols,o=i.x,u=i.minW,c=i.minH,l=i.maxW,f=i.maxH,h=i.transformScale,g=i.resizeHandles,d=this.getPositionParams(),p=(0,A.calcGridItemPosition)(d,0,0,a-o,0).width,v=(0,A.calcGridItemPosition)(d,0,0,u,c),y=(0,A.calcGridItemPosition)(d,0,0,l,f),m=[v.width,v.height],I=[Math.min(y.width,p),Math.min(y.height,1/0)];return r.default.createElement(s.Resizable,{draggableOpts:{disabled:!n},className:n?void 0:"react-resizable-hide",width:t.width,height:t.height,minConstraints:m,maxConstraints:I,onResizeStop:this.onResizeStop,onResizeStart:this.onResizeStart,onResize:this.onResize,transformScale:h,resizeHandles:g},e)}},{key:"onResizeHandler",value:function(e,t,n){var r=t.node,i=t.size,a=this.props[n];if(a){var o=this.props,s=o.cols,u=o.x,c=o.y,l=o.i,f=o.maxH,h=o.minH,g=this.props,d=g.minW,p=g.maxW,v=(0,A.calcWH)(this.getPositionParams(),i.width,i.height,u,c),y=v.w,m=v.h;d=Math.max(d,1),p=Math.min(p,s-u),y=(0,A.clamp)(y,d,p),m=(0,A.clamp)(m,h,f),this.setState({resizing:"onResizeStop"===n?null:i}),a.call(this,l,y,m,{e:e,node:r,size:i})}}},{key:"render",value:function(){var e=this.props,t=e.x,n=e.y,i=e.w,a=e.h,o=e.isDraggable,s=e.isResizable,u=e.droppingPosition,l=e.useCSSTransforms,f=(0,A.calcGridItemPosition)(this.getPositionParams(),t,n,i,a,this.state),h=r.default.Children.only(this.props.children),d=r.default.cloneElement(h,{className:(0,c.default)("react-grid-item",h.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":o,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(u),cssTransforms:l}),style:g(g(g({},this.props.style),h.props.style),this.createStyle(f))});return d=this.mixinResizable(d,f,s),d=this.mixinDraggable(d,o)}}])&&p(t.prototype,n),a&&p(t,a),f}(r.default.Component);t.default=C,E(C,"propTypes",{children:a.default.element,cols:a.default.number.isRequired,containerWidth:a.default.number.isRequired,rowHeight:a.default.number.isRequired,margin:a.default.array.isRequired,maxRows:a.default.number.isRequired,containerPadding:a.default.array.isRequired,x:a.default.number.isRequired,y:a.default.number.isRequired,w:a.default.number.isRequired,h:a.default.number.isRequired,minW:function(e,t){var n=e[t];return"number"!==typeof n?new Error("minWidth not Number"):n>e.w||n>e.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(e,t){var n=e[t];return"number"!==typeof n?new Error("maxWidth not Number"):n<e.w||n<e.minW?new Error("maxWidth smaller than item width/minWidth"):void 0},minH:function(e,t){var n=e[t];return"number"!==typeof n?new Error("minHeight not Number"):n>e.h||n>e.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(e,t){var n=e[t];return"number"!==typeof n?new Error("maxHeight not Number"):n<e.h||n<e.minH?new Error("maxHeight smaller than item height/minHeight"):void 0},i:a.default.string.isRequired,onDragStop:a.default.func,onDragStart:a.default.func,onDrag:a.default.func,onResizeStop:a.default.func,onResizeStart:a.default.func,onResize:a.default.func,isDraggable:a.default.bool.isRequired,isResizable:a.default.bool.isRequired,isBounded:a.default.bool.isRequired,static:a.default.bool,useCSSTransforms:a.default.bool.isRequired,transformScale:a.default.number,className:a.default.string,handle:a.default.string,cancel:a.default.string,droppingPosition:a.default.shape({e:a.default.object.isRequired,left:a.default.number.isRequired,top:a.default.number.isRequired})}),E(C,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1})},function(e,t,n){"use strict";var r=n(1362),i=r.default,a=r.DraggableCore;e.exports=i,e.exports.default=i,e.exports.DraggableCore=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==g(e)&&"function"!==typeof e)return{default:e};var t=h();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=f(n(28)),a=f(n(75)),o=f(n(173)),s=n(1095),u=n(1313),A=n(1080),c=f(n(1364)),l=f(n(1314));function f(e){return e&&e.__esModule?e:{default:e}}function h(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return h=function(){return e},e}function g(e){return(g="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function p(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(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 I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(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 E(e,t,n){return t&&b(e.prototype,t),n&&b(e,n),e}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function B(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=k(e);if(t){var i=k(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){return!t||"object"!==g(t)&&"function"!==typeof t?Q(e):t}function Q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&C(e,t)}(n,e);var t=B(n);function n(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),_(Q(r=t.call(this,e)),"onDragStart",(function(e,t){if((0,l.default)("Draggable: onDragStart: %j",t),!1===r.props.onStart(e,(0,u.createDraggableData)(Q(r),t)))return!1;r.setState({dragging:!0,dragged:!0})})),_(Q(r),"onDrag",(function(e,t){if(!r.state.dragging)return!1;(0,l.default)("Draggable: onDrag: %j",t);var n=(0,u.createDraggableData)(Q(r),t),i={x:n.x,y:n.y};if(r.props.bounds){var a=i.x,o=i.y;i.x+=r.state.slackX,i.y+=r.state.slackY;var s=v((0,u.getBoundPosition)(Q(r),i.x,i.y),2),A=s[0],c=s[1];i.x=A,i.y=c,i.slackX=r.state.slackX+(a-i.x),i.slackY=r.state.slackY+(o-i.y),n.x=i.x,n.y=i.y,n.deltaX=i.x-r.state.x,n.deltaY=i.y-r.state.y}if(!1===r.props.onDrag(e,n))return!1;r.setState(i)})),_(Q(r),"onDragStop",(function(e,t){if(!r.state.dragging)return!1;if(!1===r.props.onStop(e,(0,u.createDraggableData)(Q(r),t)))return!1;(0,l.default)("Draggable: onDragStop: %j",t);var n={dragging:!1,slackX:0,slackY:0};if(Boolean(r.props.position)){var i=r.props.position,a=i.x,o=i.y;n.x=a,n.y=o}r.setState(n)})),r.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:I({},e.position),slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),r}return E(n,null,[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.position,r=t.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,l.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:I({},n)})}}]),E(n,[{key:"componentDidMount",value:function(){"undefined"!==typeof window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){return this.props.nodeRef?this.props.nodeRef.current:a.default.findDOMNode(this)}},{key:"render",value:function(){var e,t=this.props,n=(t.axis,t.bounds,t.children),i=t.defaultPosition,a=t.defaultClassName,A=t.defaultClassNameDragging,l=t.defaultClassNameDragged,f=t.position,h=t.positionOffset,g=(t.scale,p(t,["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"])),v={},y=null,m=!Boolean(f)||this.state.dragging,b=f||i,E={x:(0,u.canDragX)(this)&&m?this.state.x:b.x,y:(0,u.canDragY)(this)&&m?this.state.y:b.y};this.state.isElementSVG?y=(0,s.createSVGTransform)(E,h):v=(0,s.createCSSTransform)(E,h);var C=(0,o.default)(n.props.className||"",a,(_(e={},A,this.state.dragging),_(e,l,this.state.dragged),e));return r.createElement(c.default,d({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),r.cloneElement(r.Children.only(n),{className:C,style:I(I({},n.props.style),v),transform:y}))}}]),n}(r.Component);t.default=x,_(x,"displayName","Draggable"),_(x,"propTypes",I(I({},c.default.propTypes),{},{axis:i.default.oneOf(["both","x","y","none"]),bounds:i.default.oneOfType([i.default.shape({left:i.default.number,right:i.default.number,top:i.default.number,bottom:i.default.number}),i.default.string,i.default.oneOf([!1])]),defaultClassName:i.default.string,defaultClassNameDragging:i.default.string,defaultClassNameDragged:i.default.string,defaultPosition:i.default.shape({x:i.default.number,y:i.default.number}),positionOffset:i.default.shape({x:i.default.oneOfType([i.default.number,i.default.string]),y:i.default.oneOfType([i.default.number,i.default.string])}),position:i.default.shape({x:i.default.number,y:i.default.number}),className:A.dontSetMe,style:A.dontSetMe,transform:A.dontSetMe})),_(x,"defaultProps",I(I({},c.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},position:null,scale:1}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPrefix=i,t.browserPrefixToKey=a,t.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},t.default=void 0;var r=["Moz","Webkit","O","ms"];function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"===typeof window||"undefined"===typeof window.document)return"";var t=window.document.documentElement.style;if(e in t)return"";for(var n=0;n<r.length;n++)if(a(e,r[n])in t)return r[n];return""}function a(e,t){return t?"".concat(t).concat(function(e){for(var t="",n=!0,r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)):e}var o=i();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==f(e)&&"function"!==typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=c(n(28)),a=c(n(75)),o=n(1095),s=n(1313),u=n(1080),A=c(n(1314));function c(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function f(e){return(f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(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 v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var i=b(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==f(t)&&"function"!==typeof t?I(e):t}function I(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C={start:"touchstart",move:"touchmove",stop:"touchend"},B={start:"mousedown",move:"mousemove",stop:"mouseup"},w=B,Q=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(c,e);var t,n,i,u=y(c);function c(){var e;d(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return E(I(e=u.call.apply(u,[this].concat(n))),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),E(I(e),"mounted",!1),E(I(e),"handleDragStart",(function(t){if(e.props.onMouseDown(t),!e.props.allowAnyClick&&"number"===typeof t.button&&0!==t.button)return!1;var n=e.findDOMNode();if(!n||!n.ownerDocument||!n.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var r=n.ownerDocument;if(!(e.props.disabled||!(t.target instanceof r.defaultView.Node)||e.props.handle&&!(0,o.matchesSelectorAndParentsTo)(t.target,e.props.handle,n)||e.props.cancel&&(0,o.matchesSelectorAndParentsTo)(t.target,e.props.cancel,n))){"touchstart"===t.type&&t.preventDefault();var i=(0,o.getTouchIdentifier)(t);e.setState({touchIdentifier:i});var a=(0,s.getControlPosition)(t,i,I(e));if(null!=a){var u=a.x,c=a.y,l=(0,s.createCoreData)(I(e),u,c);(0,A.default)("DraggableCore: handleDragStart: %j",l),(0,A.default)("calling",e.props.onStart),!1!==e.props.onStart(t,l)&&!1!==e.mounted&&(e.props.enableUserSelectHack&&(0,o.addUserSelectStyles)(r),e.setState({dragging:!0,lastX:u,lastY:c}),(0,o.addEvent)(r,w.move,e.handleDrag),(0,o.addEvent)(r,w.stop,e.handleDragStop))}}})),E(I(e),"handleDrag",(function(t){var n=(0,s.getControlPosition)(t,e.state.touchIdentifier,I(e));if(null!=n){var r=n.x,i=n.y;if(Array.isArray(e.props.grid)){var a=r-e.state.lastX,o=i-e.state.lastY,u=h((0,s.snapToGrid)(e.props.grid,a,o),2);if(a=u[0],o=u[1],!a&&!o)return;r=e.state.lastX+a,i=e.state.lastY+o}var c=(0,s.createCoreData)(I(e),r,i);if((0,A.default)("DraggableCore: handleDrag: %j",c),!1!==e.props.onDrag(t,c)&&!1!==e.mounted)e.setState({lastX:r,lastY:i});else try{e.handleDragStop(new MouseEvent("mouseup"))}catch(f){var l=document.createEvent("MouseEvents");l.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.handleDragStop(l)}}})),E(I(e),"handleDragStop",(function(t){if(e.state.dragging){var n=(0,s.getControlPosition)(t,e.state.touchIdentifier,I(e));if(null!=n){var r=n.x,i=n.y,a=(0,s.createCoreData)(I(e),r,i);if(!1===e.props.onStop(t,a)||!1===e.mounted)return!1;var u=e.findDOMNode();u&&e.props.enableUserSelectHack&&(0,o.removeUserSelectStyles)(u.ownerDocument),(0,A.default)("DraggableCore: handleDragStop: %j",a),e.setState({dragging:!1,lastX:NaN,lastY:NaN}),u&&((0,A.default)("DraggableCore: Removing handlers"),(0,o.removeEvent)(u.ownerDocument,w.move,e.handleDrag),(0,o.removeEvent)(u.ownerDocument,w.stop,e.handleDragStop))}}})),E(I(e),"onMouseDown",(function(t){return w=B,e.handleDragStart(t)})),E(I(e),"onMouseUp",(function(t){return w=B,e.handleDragStop(t)})),E(I(e),"onTouchStart",(function(t){return w=C,e.handleDragStart(t)})),E(I(e),"onTouchEnd",(function(t){return w=C,e.handleDragStop(t)})),e}return t=c,(n=[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.findDOMNode();e&&(0,o.addEvent)(e,C.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.findDOMNode();if(e){var t=e.ownerDocument;(0,o.removeEvent)(t,B.move,this.handleDrag),(0,o.removeEvent)(t,C.move,this.handleDrag),(0,o.removeEvent)(t,B.stop,this.handleDragStop),(0,o.removeEvent)(t,C.stop,this.handleDragStop),(0,o.removeEvent)(e,C.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,o.removeUserSelectStyles)(t)}}},{key:"findDOMNode",value:function(){return this.props.nodeRef?this.props.nodeRef.current:a.default.findDOMNode(this)}},{key:"render",value:function(){return r.cloneElement(r.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&p(t.prototype,n),i&&p(t,i),c}(r.Component);t.default=Q,E(Q,"displayName","DraggableCore"),E(Q,"propTypes",{allowAnyClick:i.default.bool,disabled:i.default.bool,enableUserSelectHack:i.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:i.default.arrayOf(i.default.number),handle:i.default.string,cancel:i.default.string,nodeRef:i.default.object,onStart:i.default.func,onDrag:i.default.func,onStop:i.default.func,onMouseDown:i.default.func,scale:i.default.number,className:u.dontSetMe,style:u.dontSetMe,transform:u.dontSetMe}),E(Q,"defaultProps",{allowAnyClick:!1,cancel:null,disabled:!1,enableUserSelectHack:!0,offsetParent:null,handle:null,grid:null,transform:null,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},function(e,t,n){"use strict";e.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},e.exports.Resizable=n(1315).default,e.exports.ResizableBox=n(1368).default},function(e,t,n){var r,i;window,e.exports=(r=n(0),i=n(75),function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){e.exports=n(5)()},function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var o=i.apply(null,r);o&&e.push(o)}else if("object"===a)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){var r=n(7),i=r.default,a=r.DraggableCore;e.exports=i,e.exports.default=i,e.exports.DraggableCore=a},function(e,t,n){"use strict";var r=n(6);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";n.r(t);var r=n(1),i=n.n(r),a=n(0),o=n.n(a),s=n(2),u=n.n(s),A=n(3),c=n.n(A);function l(e,t){for(var n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function f(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)}function h(e){return"number"==typeof e&&!isNaN(e)}function g(e){return parseInt(e,10)}function d(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))}var p=["Moz","Webkit","O","ms"];function v(e,t){return t?"".concat(t).concat(function(e){for(var t="",n=!0,r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)):e}var y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window||void 0===window.document)return"";var t=window.document.documentElement.style;if(e in t)return"";for(var n=0;n<p.length;n++)if(v(e,p[n])in t)return p[n];return""}();function m(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 I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b="";function E(e,t){return b||(b=l(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(t){return f(e[t])}))),!!f(e[b])&&e[b](t)}function C(e,t,n){var r=e;do{if(E(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function B(e,t,n){e&&(e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener?e.addEventListener(t,n,!0):e["on"+t]=n)}function w(e,t,n){e&&(e.detachEvent?e.detachEvent("on"+t,n):e.removeEventListener?e.removeEventListener(t,n,!0):e["on"+t]=null)}function Q(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t+=g(n.borderTopWidth))+g(n.borderBottomWidth)}function k(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t+=g(n.borderLeftWidth))+g(n.borderRightWidth)}function _(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t-=g(n.paddingTop))-g(n.paddingBottom)}function x(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return(t-=g(n.paddingLeft))-g(n.paddingRight)}function S(e,t,n){var r=e.x,i=e.y,a="translate(".concat(r).concat(n,",").concat(i).concat(n,")");if(t){var o="".concat("string"==typeof t.x?t.x:t.x+n),s="".concat("string"==typeof t.y?t.y:t.y+n);a="translate(".concat(o,", ").concat(s,")")+a}return a}function O(e){if(e){var t,n,r=e.getElementById("react-draggable-style-el");r||((r=e.createElement("style")).type="text/css",r.id="react-draggable-style-el",r.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",r.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(r)),e.body&&(n="react-draggable-transparent-selection",(t=e.body).classList?t.classList.add(n):t.className.match(new RegExp("(?:^|\\s)".concat(n,"(?!\\S)")))||(t.className+=" ".concat(n)))}}function D(e){try{e&&e.body&&(t=e.body,n="react-draggable-transparent-selection",t.classList?t.classList.remove(n):t.className=t.className.replace(new RegExp("(?:^|\\s)".concat(n,"(?!\\S)"),"g"),"")),e.selection?e.selection.empty():window.getSelection().removeAllRanges()}catch(e){}var t,n}function R(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(n,!0).forEach((function(t){I(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({touchAction:"none"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}function j(e){return"both"===e.props.axis||"x"===e.props.axis}function M(e){return"both"===e.props.axis||"y"===e.props.axis}function N(e,t,n){var r="number"==typeof t?function(e,t){return e.targetTouches&&l(e.targetTouches,(function(e){return t===e.identifier}))||e.changedTouches&&l(e.changedTouches,(function(e){return t===e.identifier}))}(e,t):null;if("number"==typeof t&&!r)return null;var i=L(n);return function(e,t,n){var r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect();return{x:(e.clientX+t.scrollLeft-r.left)/n,y:(e.clientY+t.scrollTop-r.top)/n}}(r||e,n.props.offsetParent||i.offsetParent||i.ownerDocument.body,n.props.scale)}function F(e,t,n){var r=e.state,i=!h(r.lastX),a=L(e);return i?{node:a,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:a,deltaX:t-r.lastX,deltaY:n-r.lastY,lastX:r.lastX,lastY:r.lastY,x:t,y:n}}function T(e,t){var n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function L(e){var t=u.a.findDOMNode(e);if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function G(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 q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function H(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Y(e,t){return(Y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var z={start:"touchstart",move:"touchmove",stop:"touchend"},K={start:"mousedown",move:"mousemove",stop:"mouseup"},W=K,V=function(e){function t(){var e,n,r,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return r=this,i=(e=q(t)).call.apply(e,[this].concat(o)),n=!i||"object"!==P(i)&&"function"!=typeof i?H(r):i,J(H(n),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),J(H(n),"handleDragStart",(function(e){if(n.props.onMouseDown(e),!n.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;var t=u.a.findDOMNode(H(n));if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var r=t.ownerDocument;if(!(n.props.disabled||!(e.target instanceof r.defaultView.Node)||n.props.handle&&!C(e.target,n.props.handle,t)||n.props.cancel&&C(e.target,n.props.cancel,t))){var i=function(e){return e.targetTouches&&e.targetTouches[0]?e.targetTouches[0].identifier:e.changedTouches&&e.changedTouches[0]?e.changedTouches[0].identifier:void 0}(e);n.setState({touchIdentifier:i});var a=N(e,i,H(n));if(null!=a){var o=a.x,s=a.y,A=F(H(n),o,s);n.props.onStart,!1!==n.props.onStart(e,A)&&(n.props.enableUserSelectHack&&O(r),n.setState({dragging:!0,lastX:o,lastY:s}),B(r,W.move,n.handleDrag),B(r,W.stop,n.handleDragStop))}}})),J(H(n),"handleDrag",(function(e){"touchmove"===e.type&&e.preventDefault();var t=N(e,n.state.touchIdentifier,H(n));if(null!=t){var r,i,a,o=t.x,s=t.y;if(Array.isArray(n.props.grid)){var u=o-n.state.lastX,A=s-n.state.lastY,c=U((r=n.props.grid,i=u,a=A,[Math.round(i/r[0])*r[0],Math.round(a/r[1])*r[1]]),2);if(u=c[0],A=c[1],!u&&!A)return;o=n.state.lastX+u,s=n.state.lastY+A}var l=F(H(n),o,s);if(!1!==n.props.onDrag(e,l))n.setState({lastX:o,lastY:s});else try{n.handleDragStop(new MouseEvent("mouseup"))}catch(e){var f=document.createEvent("MouseEvents");f.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.handleDragStop(f)}}})),J(H(n),"handleDragStop",(function(e){if(n.state.dragging){var t=N(e,n.state.touchIdentifier,H(n));if(null!=t){var r=t.x,i=t.y,a=F(H(n),r,i),o=u.a.findDOMNode(H(n));o&&n.props.enableUserSelectHack&&D(o.ownerDocument),n.setState({dragging:!1,lastX:NaN,lastY:NaN}),n.props.onStop(e,a),o&&(w(o.ownerDocument,W.move,n.handleDrag),w(o.ownerDocument,W.stop,n.handleDragStop))}}})),J(H(n),"onMouseDown",(function(e){return W=K,n.handleDragStart(e)})),J(H(n),"onMouseUp",(function(e){return W=K,n.handleDragStop(e)})),J(H(n),"onTouchStart",(function(e){return W=z,n.handleDragStart(e)})),J(H(n),"onTouchEnd",(function(e){return W=z,n.handleDragStop(e)})),n}var n,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Y(e,t)}(t,i.a.Component),n=t,(r=[{key:"componentWillUnmount",value:function(){var e=u.a.findDOMNode(this);if(e){var t=e.ownerDocument;w(t,K.move,this.handleDrag),w(t,z.move,this.handleDrag),w(t,K.stop,this.handleDragStop),w(t,z.stop,this.handleDragStop),this.props.enableUserSelectHack&&D(t)}}},{key:"render",value:function(){return i.a.cloneElement(i.a.Children.only(this.props.children),{style:R(this.props.children.props.style),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&G(n.prototype,r),t}();function X(e){return(X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(){return(Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function $(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 ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(n,!0).forEach((function(t){oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function te(e){return(te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ne(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function re(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 ie(e,t,n){return t&&re(e.prototype,t),n&&re(e,n),e}function ae(e,t){return(ae=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}J(V,"displayName","DraggableCore"),J(V,"propTypes",{allowAnyClick:o.a.bool,disabled:o.a.bool,enableUserSelectHack:o.a.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:o.a.arrayOf(o.a.number),handle:o.a.string,cancel:o.a.string,onStart:o.a.func,onDrag:o.a.func,onStop:o.a.func,onMouseDown:o.a.func,scale:o.a.number,className:d,style:d,transform:d}),J(V,"defaultProps",{allowAnyClick:!1,cancel:null,disabled:!1,enableUserSelectHack:!0,offsetParent:null,handle:null,grid:null,transform:null,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),n.d(t,"default",(function(){return se})),n.d(t,"DraggableCore",(function(){return V}));var se=function(e){function t(e){var n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=te(t).call(this,e),n=!r||"object"!==X(r)&&"function"!=typeof r?ne(this):r,oe(ne(n),"onDragStart",(function(e,t){if(!1===n.props.onStart(e,T(ne(n),t)))return!1;n.setState({dragging:!0,dragged:!0})})),oe(ne(n),"onDrag",(function(e,t){if(!n.state.dragging)return!1;var r=T(ne(n),t),i={x:r.x,y:r.y};if(n.props.bounds){var a=i.x,o=i.y;i.x+=n.state.slackX,i.y+=n.state.slackY;var s=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(function(e,t,n){if(!e.props.bounds)return[t,n];var r=e.props.bounds;r="string"==typeof r?r:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(r);var i=L(e);if("string"==typeof r){var a,o=i.ownerDocument,s=o.defaultView;if(!((a="parent"===r?i.parentNode:o.querySelector(r))instanceof s.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');var u=s.getComputedStyle(i),A=s.getComputedStyle(a);r={left:-i.offsetLeft+g(A.paddingLeft)+g(u.marginLeft),top:-i.offsetTop+g(A.paddingTop)+g(u.marginTop),right:x(a)-k(i)-i.offsetLeft+g(A.paddingRight)-g(u.marginRight),bottom:_(a)-Q(i)-i.offsetTop+g(A.paddingBottom)-g(u.marginBottom)}}return h(r.right)&&(t=Math.min(t,r.right)),h(r.bottom)&&(n=Math.min(n,r.bottom)),h(r.left)&&(t=Math.max(t,r.left)),h(r.top)&&(n=Math.max(n,r.top)),[t,n]}(ne(n),i.x,i.y),2),u=s[0],A=s[1];i.x=u,i.y=A,i.slackX=n.state.slackX+(a-i.x),i.slackY=n.state.slackY+(o-i.y),r.x=i.x,r.y=i.y,r.deltaX=i.x-n.state.x,r.deltaY=i.y-n.state.y}if(!1===n.props.onDrag(e,r))return!1;n.setState(i)})),oe(ne(n),"onDragStop",(function(e,t){if(!n.state.dragging)return!1;if(!1===n.props.onStop(e,T(ne(n),t)))return!1;var r={dragging:!1,slackX:0,slackY:0};if(Boolean(n.props.position)){var i=n.props.position,a=i.x,o=i.y;r.x=a,r.y=o}n.setState(r)})),n.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:ee({},e.position),slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ae(e,t)}(t,i.a.Component),ie(t,null,[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.position,r=t.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:{x:n.x,y:n.y,prevPropsPosition:ee({},n)}}}]),ie(t,[{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&u.a.findDOMNode(this)instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"render",value:function(){var e,t=this.props,n=(t.axis,t.bounds,t.children),r=t.defaultPosition,a=t.defaultClassName,o=t.defaultClassNameDragging,s=t.defaultClassNameDragged,u=t.position,A=t.positionOffset,l=(t.scale,function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"])),f={},h=null,g=!Boolean(u)||this.state.dragging,d=u||r,p={x:j(this)&&g?this.state.x:d.x,y:M(this)&&g?this.state.y:d.y};this.state.isElementSVG?h=function(e,t){return S(e,t,"")}(p,A):f=function(e,t){var n=S(e,t,"px");return I({},v("transform",y),n)}(p,A);var m=c()(n.props.className||"",a,(oe(e={},o,this.state.dragging),oe(e,s,this.state.dragged),e));return i.a.createElement(V,Z({},l,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),i.a.cloneElement(i.a.Children.only(n),{className:m,style:ee({},n.props.style,{},f),transform:h}))}}]),t}();oe(se,"displayName","Draggable"),oe(se,"propTypes",ee({},V.propTypes,{axis:o.a.oneOf(["both","x","y","none"]),bounds:o.a.oneOfType([o.a.shape({left:o.a.number,right:o.a.number,top:o.a.number,bottom:o.a.number}),o.a.string,o.a.oneOf([!1])]),defaultClassName:o.a.string,defaultClassNameDragging:o.a.string,defaultClassNameDragged:o.a.string,defaultPosition:o.a.shape({x:o.a.number,y:o.a.number}),positionOffset:o.a.shape({x:o.a.oneOfType([o.a.number,o.a.string]),y:o.a.oneOfType([o.a.number,o.a.string])}),position:o.a.shape({x:o.a.number,y:o.a.number}),className:d,style:d,transform:d})),oe(se,"defaultProps",ee({},V.defaultProps,{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},position:null,scale:1}))}]))},function(e,t,n){"use strict";t.__esModule=!0,t.cloneElement=function(e,t){t.style&&e.props.style&&(t.style=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(n,!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e.props.style,{},t.style));t.className&&e.props.className&&(t.className=e.props.className+" "+t.className);return i.default.cloneElement(e,t)};var r,i=(r=n(0))&&r.__esModule?r:{default:r};function a(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 o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=o(n(0)),i=o(n(28)),a=o(n(1315));function o(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=function(e){var t,n;function i(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return A(u(t=e.call.apply(e,[this].concat(r))||this),"state",{width:t.props.width,height:t.props.height,propsWidth:t.props.width,propsHeight:t.props.height}),A(u(t),"onResize",(function(e,n){var r=n.size;r.width,r.height;t.props.onResize?(e.persist&&e.persist(),t.setState(r,(function(){return t.props.onResize&&t.props.onResize(e,n)}))):t.setState(r)})),t}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.getDerivedStateFromProps=function(e,t){return t.propsWidth!==e.width||t.propsHeight!==e.height?{width:e.width,height:e.height,propsWidth:e.width,propsHeight:e.height}:null},i.prototype.render=function(){var e=this.props,t=e.handle,n=e.handleSize,i=(e.onResize,e.onResizeStart),o=e.onResizeStop,u=e.draggableOpts,A=e.minConstraints,c=e.maxConstraints,l=e.lockAspectRatio,f=e.axis,h=(e.width,e.height,e.resizeHandles),g=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles"]);return r.default.createElement(a.default,{handle:t,handleSize:n,width:this.state.width,height:this.state.height,onResizeStart:i,onResize:this.onResize,onResizeStop:o,draggableOpts:u,minConstraints:A,maxConstraints:c,lockAspectRatio:l,axis:f,resizeHandles:h},r.default.createElement("div",s({style:{width:this.state.width+"px",height:this.state.height+"px"}},g)))},i}(r.default.Component);t.default=c,A(c,"propTypes",{height:i.default.number,width:i.default.number}),A(c,"defaultProps",{handleSize:[20,20]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(28)),i=a(n(0));function a(e){return e&&e.__esModule?e:{default:e}}var o={className:r.default.string,style:r.default.object,width:r.default.number,autoSize:r.default.bool,cols:r.default.number,draggableCancel:r.default.string,draggableHandle:r.default.string,verticalCompact:function(e){e.verticalCompact,0},compactType:r.default.oneOf(["vertical","horizontal"]),layout:function(e){var t=e.layout;void 0!==t&&n(924).validateLayout(t,"layout")},margin:r.default.arrayOf(r.default.number),containerPadding:r.default.arrayOf(r.default.number),rowHeight:r.default.number,maxRows:r.default.number,isBounded:r.default.bool,isDraggable:r.default.bool,isResizable:r.default.bool,preventCollision:r.default.bool,useCSSTransforms:r.default.bool,transformScale:r.default.number,isDroppable:r.default.bool,resizeHandles:r.default.arrayOf(r.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),onLayoutChange:r.default.func,onDragStart:r.default.func,onDrag:r.default.func,onDragStop:r.default.func,onResizeStart:r.default.func,onResize:r.default.func,onResizeStop:r.default.func,onDrop:r.default.func,droppingItem:r.default.shape({i:r.default.string.isRequired,w:r.default.number.isRequired,h:r.default.number.isRequired}),children:function(e,t){var n=e[t],r={};i.default.Children.forEach(n,(function(e){if(r[e.key])throw new Error('Duplicate child key "'+e.key+'" found! This will cause problems in ReactGridLayout.');r[e.key]=!0}))},innerRef:r.default.any};t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==l(e)&&"function"!==typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=A(n(28)),a=A(n(1094)),o=n(924),s=n(1316),u=A(n(1311));function A(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function l(e){return(l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function h(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function g(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 d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(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 y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=E(e);if(t){var i=E(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return I(this,n)}}function I(e,t){return!t||"object"!==l(t)&&"function"!==typeof t?b(e):t}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var B=function(e){return Object.prototype.toString.call(e)};function w(e,t){return null==e?null:Array.isArray(e)?e:e[t]}var Q=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(c,e);var t,n,i,A=m(c);function c(){var e;p(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return C(b(e=A.call.apply(A,[this].concat(n))),"state",e.generateInitialState()),C(b(e),"onLayoutChange",(function(t){e.props.onLayoutChange(t,d(d({},e.props.layouts),{},C({},e.state.breakpoint,t)))})),e}return t=c,i=[{key:"getDerivedStateFromProps",value:function(e,t){if(!(0,a.default)(e.layouts,t.layouts)){var n=t.breakpoint,r=t.cols;return{layout:(0,s.findOrGenerateResponsiveLayout)(e.layouts,e.breakpoints,n,n,r,e.compactType),layouts:e.layouts}}return null}}],(n=[{key:"generateInitialState",value:function(){var e=this.props,t=e.width,n=e.breakpoints,r=e.layouts,i=e.cols,a=(0,s.getBreakpointFromWidth)(n,t),o=(0,s.getColsFromBreakpoint)(a,i),u=!1===this.props.verticalCompact?null:this.props.compactType;return{layout:(0,s.findOrGenerateResponsiveLayout)(r,n,a,a,o,u),breakpoint:a,cols:o}}},{key:"componentDidUpdate",value:function(e){this.props.width==e.width&&this.props.breakpoint===e.breakpoint&&(0,a.default)(this.props.breakpoints,e.breakpoints)&&(0,a.default)(this.props.cols,e.cols)||this.onWidthChange(e)}},{key:"onWidthChange",value:function(e){var t=this.props,n=t.breakpoints,r=t.cols,i=t.layouts,a=t.compactType,u=this.props.breakpoint||(0,s.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),A=this.state.breakpoint,c=(0,s.getColsFromBreakpoint)(u,r),l=d({},i);if(A!==u||e.breakpoints!==n||e.cols!==r){A in l||(l[A]=(0,o.cloneLayout)(this.state.layout));var f=(0,s.findOrGenerateResponsiveLayout)(l,n,u,A,c,a);f=(0,o.synchronizeLayoutWithChildren)(f,this.props.children,c,a),l[u]=f,this.props.onLayoutChange(f,l),this.props.onBreakpointChange(u,c),this.setState({breakpoint:u,layout:f,cols:c})}var h=w(this.props.margin,u),g=w(this.props.containerPadding,u);this.props.onWidthChange(this.props.width,h,c,g)}},{key:"render",value:function(){var e=this.props,t=(e.breakpoint,e.breakpoints,e.cols,e.layouts,e.margin),n=e.containerPadding,i=(e.onBreakpointChange,e.onLayoutChange,e.onWidthChange,h(e,["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"]));return r.createElement(u.default,f({},i,{margin:w(t,this.state.breakpoint),containerPadding:w(n,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}])&&v(t.prototype,n),i&&v(t,i),c}(r.Component);t.default=Q,C(Q,"propTypes",{breakpoint:i.default.string,breakpoints:i.default.object,cols:i.default.object,margin:i.default.oneOfType([i.default.array,i.default.object]),containerPadding:i.default.oneOfType([i.default.array,i.default.object]),layouts:function(e,t){if("[object Object]"!==B(e[t]))throw new Error("Layout property must be an object. Received: "+B(e[t]));Object.keys(e[t]).forEach((function(t){if(!(t in e.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,o.validateLayout)(e.layouts[t],"layouts."+t)}))},width:i.default.number.isRequired,onBreakpointChange:i.default.func,onLayoutChange:i.default.func,onWidthChange:i.default.func}),C(Q,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},layouts:{},margin:[10,10],containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},onBreakpointChange:o.noop,onLayoutChange:o.noop,onWidthChange:o.noop})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n;return n=t=function(t){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(i,t);var n=function(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}(i);function i(){var e;c(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return p(g(e=n.call.apply(n,[this].concat(r))),"state",{width:1280}),p(g(e),"mounted",!1),p(g(e),"onWindowResize",(function(){if(e.mounted){var t=a.default.findDOMNode(g(e));t instanceof HTMLElement&&e.setState({width:t.offsetWidth})}})),e}return function(e,t,n){t&&l(e.prototype,t);n&&l(e,n)}(i,[{key:"componentDidMount",value:function(){this.mounted=!0,window.addEventListener("resize",this.onWindowResize),this.onWindowResize()}},{key:"componentWillUnmount",value:function(){this.mounted=!1,window.removeEventListener("resize",this.onWindowResize)}},{key:"render",value:function(){var t=this.props,n=t.measureBeforeMount,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,["measureBeforeMount"]);return n&&!this.mounted?r.createElement("div",{className:this.props.className,style:this.props.style}):r.createElement(e,A({},i,this.state))}}]),i}(r.Component),p(t,"defaultProps",{measureBeforeMount:!1}),p(t,"propTypes",{measureBeforeMount:i.default.bool}),n};var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==u(e)&&"function"!==typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(0)),i=o(n(28)),a=o(n(75));function o(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e){return(u="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(){return(A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(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 f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t){return!t||"object"!==u(t)&&"function"!==typeof t?g(e):t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){},function(e,t,n){},function(e,t,n){},,,,,,function(e,t,n){"use strict";n.r(t);var r=n(1077),i=n(1078),a=n(1079),o=n(24),s=n(0),u=n.n(s),A=n(11),c=n(13),l=n(14),f=n(15),h=n(1307),g=n(97),d=n.n(g),p=n(22),v=n(100);function y(e,t){for(var n=[],r=0;r<e.length;r++)n.push(e[r+1]-e[r]);return Object.entries(t).map((function(t){var r,i=Object(o.a)(t,2),a=i[0],s=i[1];return{i:a,y:s.y,h:s.h||1,x:e[s.x],w:(r=n.slice(s.x,s.x+(s.w||1)),r.reduce((function(e,t){return e+t}),0))}}))}var m=function(e){Object(l.a)(n,e);var t=Object(f.a)(n);function n(){return Object(A.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"componentDidUpdate",value:function(e){this.props.height!==e.height&&this.onWindowResize()}}]),n}(Object(h.WidthProvider)(h.Responsive));function I(e){var t,n=e.layout,r=e.getComponent,i=e.padding,a=e.margin,s=e.draggableHandle,A=e.reactGridLayoutProps,c=e.rowHeight,l=e.theme,f=e.height,h=e.onRemoveComponent,g=e.onLayoutChange,I=function(e){var t={},n={},r={},i={},a={};if(("components"in e?e.components:e).forEach((function(e,t){var n="".concat("i").concat(t);i[n]={component:e.component,props:e.props||{},coordinationScopes:e.coordinationScopes||{}},a[n]={id:n,x:e.x,y:e.y,w:e.w,h:e.h}})),"components"in e)Object.entries(e.columns).forEach((function(e){var i=Object(o.a)(e,2),s=i[0],u=i[1];t[s]=u[u.length-1],n[s]=y(u,a),r[s]=s}));else{t.ID=12,n.ID=y(Object(v.e)(13),a),r.ID=1e3}return{cols:t,layouts:n,breakpoints:r,components:i}}(n),b=I.cols,E=I.layouts,C=I.breakpoints,B=I.components,w=(t=E,Math.max.apply(Math,Object(p.a)(Object.values(t).map((function(e){return Math.max.apply(Math,Object(p.a)(e.map((function(e){return e.y+e.h}))))}))))),Q=u.a.createElement("style",null,"\n        ".concat(s," {\n          cursor: grab;\n        }\n        ").concat(s,":active {\n          cursor: grabbing;\n        }\n     ")),k=Object.entries(B).map((function(e,t){var n=Object(o.a)(e,2),i=n[0],a=n[1],s=r(a.component);return u.a.createElement("div",{key:i},u.a.createElement(s,Object.assign({},a.props,{uuid:t,coordinationScopes:a.coordinationScopes,theme:l,removeGridComponent:function(){h(t)}})))}));return E&&B&&C&&b&&u.a.createElement(u.a.Fragment,null,Q,u.a.createElement(m,Object.assign({className:"layout",cols:b,layouts:E,breakpoints:C,height:f,rowHeight:c||(window.innerHeight-2*i-(w-1)*a)/w,containerPadding:[i,i],margin:[a,a],draggableHandle:s,onLayoutChange:function(e){if(e.length===Object.entries(B).length){var t=[];e.forEach((function(e){var n=e.i,r=B[n];if(r){var i=parseInt(n.substring(n.indexOf("i")+1),10),a={x:e.x,y:e.y,w:e.w,h:e.h},o={x:r.x,y:r.y,w:r.w,h:r.h};d()(a,o)||t.push([i,a])}})),t.length>0&&g(t)}}},A),k))}I.defaultProps={padding:10,margin:10};var b=n(20),E=n(541),C=n.n(E),B=n(330),w=n.n(B),Q=function(){function e(t){var n=t.type,r=t.url,i=t.requestInit,a=t.options;Object(A.a)(this,e),this.type=n,this.url=r,this.requestInit=i,this.options=a,this.subscriptions={}}return Object(c.a)(e,[{key:"load",value:function(){throw new Error("The load() method has not been implemented.")}},{key:"subscribe",value:function(e){var t=w()();return this.subscriptions[t]=e,t}},{key:"unsubscribe",value:function(e){delete this.subscriptions[e]}},{key:"publish",value:function(e){Object.values(this.subscriptions).forEach((function(t){t(e)}))}}]),e}(),k=n(135),_=n(1318),x=n(1319),S=n(1320),O=n(1081),D=n(334),R={cells:_,molecules:x,neighborhoods:S,raster:O,"cell-sets":D},j=function(e){Object(l.a)(n,e);var t=Object(f.a)(n);function n(e){var r;Object(A.a)(this,n),r=t.call(this,e);var i=e.type;return r.schema=R[i],r}return Object(c.a)(n,[{key:"load",value:function(){var e=this,t=this.url,n=this.requestInit,r=this.type,i=this.fileType;return this.data||(this.data=fetch(t,n).then((function(e){return e.ok?e.json():Promise.reject(new k.b(r,i,t,e.headers))})).catch((function(e){return Promise.resolve(e)})).then((function(n){if(n instanceof k.a)return Promise.reject(n);var a=e.validate(n),s=Object(o.a)(a,2),u=s[0],A=s[1];return u?Promise.resolve({data:n,url:t}):Promise.reject(new k.d(r,i,t,A))}))),this.data}},{key:"validate",value:function(e){var t=this.schema,n=this.type;if(!t)throw Error("No schema for ".concat(n));var r,i=(new C.a).compile(t),a=i(e);return a||(r=i.errors),[a,r]}}]),n}(Q),M=n(8),N=n(266),F=function(e){Object(l.a)(n,e);var t=Object(f.a)(n);function n(e){var r;Object(A.a)(this,n),r=t.call(this,e);var i=Object(M.a)(r),a=i.url;i.requestInit;return r.store=new N.HTTPStore(a),r}return Object(c.a)(n,[{key:"loadAttrs",value:function(){var e=this.store;return this.attrs||(this.attrs=e.getItem(".zattrs").then((function(e){var t=new TextDecoder("utf-8");return JSON.parse(t.decode(e))}))),this.attrs}},{key:"loadArr",value:function(){var e=this.store;return this.arr||(this.arr=Object(N.openArray)({store:e,path:"/",mode:"r"}).then((function(e){return new Promise((function(t){e.getRaw([null,null]).then(t)}))}))),this.arr}},{key:"load",value:function(){return Promise.all([this.loadAttrs(),this.loadArr()]).then((function(e){return Promise.resolve({data:e,url:null})}))}}]),n}(Q),T=n(9),L=n.n(T),P=n(60),U=n(42),G=n(46),q=n(1321),H=function(e){Object(l.a)(n,e);var t=Object(f.a)(n);function n(e){var r;return Object(A.a)(this,n),(r=t.call(this,e)).schema=q,r}return Object(c.a)(n,[{key:"load",value:function(){var e=Object(P.a)(L.a.mark((function e(){var t,r,i,a,o,s,u,A;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(G.a)(Object(U.a)(n.prototype),"load",this).call(this).catch((function(e){return Promise.resolve(e)}));case 2:if(!((t=e.sent)instanceof k.a)){e.next=5;break}return e.abrupt("return",Promise.reject(t));case 5:return r=t.data,i=t.url,a=Object.keys(r),o=a.length>0?Object.keys(r[a[0]].cells):[],s={rows:o,cols:a},u=o.flatMap((function(e){return a.map((function(t){return r[t].cells[e]/r[t].max*255}))})),A={data:Uint8Array.from(u)},e.abrupt("return",Promise.resolve({data:[s,A],url:i}));case 12:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(j),Y=n(1358),J=n(318),z=n.n(J),K=n(1322),W=function(e){Object(l.a)(n,e);var t=Object(f.a)(n);function n(e){var r;return Object(A.a)(this,n),(r=t.call(this,e)).schema=K,r}return Object(c.a)(n,[{key:"load",value:function(){var e=Object(P.a)(L.a.mark((function e(){var t,r,i,a,s,u,A,c,l,f,h,g;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(G.a)(Object(U.a)(n.prototype),"load",this).call(this).catch((function(e){return Promise.resolve(e)}));case 2:if(!((t=e.sent)instanceof k.a)){e.next=5;break}return e.abrupt("return",Promise.reject(t));case 5:return r=t.data,i=t.url,a=r.rows,s=r.cols,u=r.matrix,c=[(A={rows:s,cols:a}).rows.length,A.cols.length],l=u.map((function(e){var t=Object(Y.a)(e),n=Object(o.a)(t,2),r=n[0],i=n[1];return e.map((function(e){return Math.floor((e-r)/(i-r)*255)}))})),f=z()(c[0]).map((function(e){return z()(c[1]).map((function(t){return l[t][e]}))})),h=f.flat(),g={data:Uint8Array.from(h)},e.abrupt("return",Promise.resolve({data:[A,g],url:i}));case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(j),V=n(47),X=n(189);function Z(e){return $.apply(this,arguments)}function $(){return($=Object(P.a)(L.a.mark((function e(t){var n,r,i,a,o,s,u,A,c,l,f,h,g,d,p,v,y,m;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.type,r=t.url,i=t.metadata,a=t.requestInit,e.t0=n,e.next="zarr"===e.t0?4:"ome-tiff"===e.t0?10:26;break;case 4:return s=(o=i||{}).dimensions,u=o.isPyramid,A=o.transform,c=A.scale,l=void 0===c?0:c,f=A.translate,h=void 0===f?{x:0,y:0}:f,e.next=8,Object(X.createZarrLoader)({url:r,dimensions:s,isPyramid:u,scale:l,translate:h});case 8:return g=e.sent,e.abrupt("return",g);case 10:if(!i||!("omeTiffOffsetsUrl"in i)){e.next=24;break}return d=i.omeTiffOffsetsUrl,e.next=14,fetch(d,a);case 14:if(!(p=e.sent).ok){e.next=23;break}return e.next=18,p.json();case 18:return v=e.sent,e.next=21,Object(X.createOMETiffLoader)({urlOrFile:r,offsets:v,headers:a});case 21:return y=e.sent,e.abrupt("return",y);case 23:throw new Error("Offsets not found but provided.");case 24:return m=Object(X.createOMETiffLoader)({urlOrFile:r,headers:a}),e.abrupt("return",m);case 26:throw Error("Image type (".concat(n,") is not supported"));case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ee,te=function(e){Object(l.a)(n,e);var t=Object(f.a)(n);function n(e){var r;return Object(A.a)(this,n),(r=t.call(this,e)).schema=O,r}return Object(c.a)(n,[{key:"load",value:function(){var e=Object(P.a)(L.a.mark((function e(){var t,r,i,a,o,s;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(G.a)(Object(U.a)(n.prototype),"load",this).call(this).catch((function(e){return Promise.resolve(e)}));case 2:if(!((t=e.sent)instanceof k.a)){e.next=5;break}return e.abrupt("return",Promise.reject(t));case 5:return r=t.data,i=r.images,a=r.renderLayers,o=i.filter((function(e){return!e.url.includes("zarr")})).map((function(e){return[e.url,e.name]})),s=i.map((function(e){return Object(V.a)({},e,{loaderCreator:function(){var t=Object(P.a)(L.a.mark((function t(){var n;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Z(e);case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()})})),e.abrupt("return",Promise.resolve({data:{layers:s,renderLayers:a},urls:o}));case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(j),ne=n(371),re=function(e){Object(l.a)(n,e);var t=Object(f.a)(n);function n(e){var r;return Object(A.a)(this,n),(r=t.call(this,e)).schema=D,r}return Object(c.a)(n,[{key:"load",value:function(){var e=Object(P.a)(L.a.mark((function e(){var t,r,i,a;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(G.a)(Object(U.a)(n.prototype),"load",this).call(this).catch((function(e){return Promise.resolve(e)}));case 2:if(!((t=e.sent)instanceof k.a)){e.next=5;break}return e.abrupt("return",Promise.reject(t));case 5:return r=t.data,i=t.url,a=Object(ne.f)(r,"cell"),e.abrupt("return",Promise.resolve({data:a,url:i}));case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(j),ie=n(134),ae=n(91),oe=n(27),se=function(e){Object(l.a)(n,e);var t=Object(f.a)(n);function n(e){var r;Object(A.a)(this,n),r=t.call(this,e);var i=Object(M.a)(r),a=i.url;i.requestInit;return r.store=new N.HTTPStore(a),r}return Object(c.a)(n,[{key:"getJson",value:function(){var e=Object(P.a)(L.a.mark((function e(t){var n,r;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.store.getItem(t);case 3:return n=e.sent,r=(new TextDecoder).decode(n),e.abrupt("return",JSON.parse(r));case 8:if(e.prev=8,e.t0=e.catch(0),!(e.t0 instanceof N.KeyError)){e.next=12;break}return e.abrupt("return",{});case 12:throw e.t0;case 13:case"end":return e.stop()}}),e,this,[[0,8]])})));return function(t){return e.apply(this,arguments)}}()},{key:"decodeTextArray",value:function(e){return(new TextDecoder).decode(e).replace(/[\u0000-\u001c]|\ufffdc/g,",").split(",").filter(Boolean)}},{key:"loadCellSetIds",value:function(e){var t=this,n=this.store;return this.cellSets||(this.cellSets=Promise.all(e.map(function(){var e=Object(P.a)(L.a.mark((function e(r){var i,a,o,s,u,A,c,l,f;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getJson("".concat(r,"/.zattrs"));case 2:return i=e.sent,a=i.categories,e.next=6,Object(N.openArray)({store:n,path:"/obs/".concat(a),mode:"r"});case 6:return o=e.sent,e.t0=o.compressor,e.t1=Uint8Array,e.next=11,o.store.getItem("".concat(o.keyPrefix,"0"));case 11:return e.t2=e.sent,e.t3=new e.t1(e.t2),e.next=15,e.t0.decode.call(e.t0,e.t3);case 15:return s=e.sent,u=t.decodeTextArray(s),e.next=19,Object(N.openArray)({store:n,path:r,mode:"r"});case 19:return A=e.sent,e.next=22,A.get();case 22:return c=e.sent,l=c.data,f=Object(oe.a)(Array,Object(p.a)(l)).map((function(e){return u[e]})),e.abrupt("return",f);case 26:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()))),this.cellSets}},{key:"loadNumeric",value:function(e){var t=this.store;return Object(N.openArray)({store:t,path:e,mode:"r"}).then((function(e){return e.get()}))}},{key:"loadCellNames",value:function(){var e=this;if(this.cellNames)return this.cellNames;var t=this.store;return this.cellNames=this.getJson("obs/.zattrs").then((function(n){var r=n._index;return Object(N.openArray)({store:t,path:"/obs/".concat(r),mode:"r"}).then(function(){var n=Object(P.a)(L.a.mark((function n(r){var i,a,o,s,u,A;return L.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=new Uint8Array,a=0;case 2:return n.prev=3,n.next=6,t.getItem("".concat(r.keyPrefix).concat(String(a)));case 6:return o=n.sent,n.next=9,r.compressor.decode(o);case 9:s=n.sent,(u=new Uint8Array(s.buffer.byteLength+i.buffer.byteLength)).set(new Uint8Array(i.buffer),0),u.set(s,i.buffer.byteLength),i=u,a+=1,n.next=22;break;case 17:if(n.prev=17,n.t0=n.catch(3),!(n.t0 instanceof N.KeyError)){n.next=21;break}return n.abrupt("break",24);case 21:throw n.t0;case 22:n.next=2;break;case 24:return A=e.decodeTextArray(i).filter((function(e){return!Number(e)})).filter((function(e){return e.length>2})),n.abrupt("return",A);case 26:case"end":return n.stop()}}),n,null,[[3,17]])})));return function(e){return n.apply(this,arguments)}}())})),this.cellNames}}]),n}(Q),ue={CellSetsZarrLoader:function(e){Object(l.a)(n,e);var t=Object(f.a)(n);function n(){return Object(A.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"load",value:function(){var e=this.options,t=e.map((function(e){return e.set_name}));return Promise.all([this.loadCellNames(),this.loadCellSetIds(t)]).then((function(t){var n=Object(o.a)(t,2),r=n[0],i=n[1],a=Object(ie.m)(ae.h);return i.forEach((function(t,n){var i={name:e[n].group_name,children:[]},o=Array.apply(void 0,Object(p.a)(new Set(t))).sort(),s={};o.forEach((function(e){return s[e]={name:e,set:[]}})),t.forEach((function(e,t){return s[e].set.push([r[t],null])})),Object.values(s).forEach((function(e){return i=Object(ie.d)(i,e)})),a.tree.push(i)})),Promise.resolve({data:a,url:null})}))}}]),n}(se),CellsZarrLoader:function(e){Object(l.a)(n,e);var t=Object(f.a)(n);function n(){return Object(A.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"loadXy",value:function(){var e=this.options.xy;return this.xy?this.xy:!this.xy&&e?(this.xy=this.loadNumeric(e),this.xy):(this.xy=Promise.resolve(null),this.xy)}},{key:"loadPoly",value:function(){var e=this.options.poly;return this.poly?this.poly:!this.poly&&e?(this.poly=this.loadNumeric(e),this.poly):(this.poly=Promise.resolve(null),this.poly)}},{key:"loadMappings",value:function(){var e=this,t=this.options.mappings;return this.mappings?this.mappings:!this.mappings&&t?(this.mappings=Promise.all(Object.keys(t).map(function(){var n=Object(P.a)(L.a.mark((function n(r){var i;return L.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=t[r].key,n.t0=r,n.next=4,e.loadNumeric(i);case 4:return n.t1=n.sent,n.abrupt("return",{coordinationName:n.t0,arr:n.t1});case 6:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())),this.mappings):(this.mappings=Promise.resolve(null),this.mappings)}},{key:"loadFactors",value:function(){var e=this.options.factors;return this.loadCellSetIds(e)}},{key:"load",value:function(){var e=Object(P.a)(L.a.mark((function e(){var t,n,r,i,a,s,u,A,c=this;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([this.loadMappings(),this.loadXy(),this.loadPoly(),this.loadCellNames(),this.loadFactors()]);case 2:return t=e.sent,n=Object(o.a)(t,5),r=n[0],i=n[1],a=n[2],s=n[3],u=n[4],A={},s.forEach((function(e,t){if(A[e]={},r&&r.forEach((function(n){var r=n.coordinationName,i=n.arr;A[e].mappings||(A[e].mappings={});var a=c.options.mappings[r].dims;A[e].mappings[r]=a.map((function(e){return i.data[t][e]}))})),i&&(A[e].xy=i.data[t]),a&&(A[e].poly=a.data[t]),u){var n={};u.forEach((function(e,r){return n[c.options.factors[r].split(".").slice(-1)]=e[t]})),A[e].factors=n}})),e.abrupt("return",Promise.resolve({data:A,url:null}));case 12:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(se),MatrixZarrLoader:function(e){Object(l.a)(n,e);var t=Object(f.a)(n);function n(){return Object(A.a)(this,n),t.apply(this,arguments)}return Object(c.a)(n,[{key:"_loadCSRSparseCellXGene",value:function(){var e=Object(P.a)(L.a.mark((function e(t,n){var r,i,a,s,u,A,c,l;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.store,e.next=3,Promise.all(["indptr","indices","data"].map(function(){var e=Object(P.a)(L.a.mark((function e(n){var i,a,o;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(N.openArray)({store:r,path:"".concat(t,"/").concat(n),mode:"r"});case 2:return i=e.sent,e.next=5,i.getRaw(null);case 5:return a=e.sent,o=a.data,e.abrupt("return",o);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:return i=e.sent,a=Object(o.a)(i,3),s=a[0],u=a[1],A=a[2],c=new Float32Array(n[0]*n[1]).fill(0),l=0,s.forEach((function(e,t){for(var r=s[t],i=s[t+1],a=r;a<i;a+=1){var o=A[a],f=u[a];c[l*n[1]+f]=o}l+=1})),e.abrupt("return",{data:c});case 12:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_loadCSCSparseCellXGene",value:function(){var e=Object(P.a)(L.a.mark((function e(t,n){var r,i,a,s,u,A,c,l;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.store,e.next=3,Promise.all(["indptr","indices","data"].map(function(){var e=Object(P.a)(L.a.mark((function e(n){var i,a,o;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(N.openArray)({store:r,path:"".concat(t,"/").concat(n),mode:"r"});case 2:return i=e.sent,e.next=5,i.getRaw(null);case 5:return a=e.sent,o=a.data,e.abrupt("return",o);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 3:return i=e.sent,a=Object(o.a)(i,3),s=a[0],u=a[1],A=a[2],c=new Float32Array(n[0]*n[1]).fill(0),l=0,s.forEach((function(e,t){for(var r=s[t],i=s[t+1],a=r;a<i;a+=1){var o=A[a],f=u[a];c[f*n[1]+l]=o}l+=1})),e.abrupt("return",{data:c});case 12:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"loadCellXGene",value:function(){var e=Object(P.a)(L.a.mark((function e(){var t,n,r,i;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.store,!this.arr){e.next=3;break}return e.abrupt("return",this.arr);case 3:return n=this.options.matrix,e.next=6,this.getJson("".concat(n,"/.zattrs"));case 6:if(r=e.sent,!(i=r["encoding-type"])){e.next=15;break}if("csr_matrix"!==i){e.next=12;break}return this.arr=this._loadCSRSparseCellXGene(n,r.shape),e.abrupt("return",this.arr);case 12:if("csc_matrix"!==i){e.next=15;break}return this.arr=this._loadCSCSparseCellXGene(n,r.shape),e.abrupt("return",this.arr);case 15:return this.arr=Object(N.openArray)({store:t,path:n,mode:"r"}).then((function(e){return new Promise((function(t){e.getRaw(null).then(t)}))})),e.abrupt("return",this.arr);case 17:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"loadGeneNames",value:function(){var e=Object(P.a)(L.a.mark((function e(){var t,n,r,i,a,o,s,u=this;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.geneNames){e.next=2;break}return e.abrupt("return",this.geneNames);case 2:if(t=this.store,!(n=this.options.geneFilter)){e.next=14;break}return e.next=7,Object(N.openArray)({store:t,path:n,mode:"r"});case 7:return i=e.sent,e.next=10,t.getItem("".concat(i.keyPrefix,"0"));case 10:return a=e.sent,e.next=13,i.compressor.decode(a);case 13:r=e.sent;case 14:return e.next=16,this.getJson("var/.zattrs");case 16:if(o=e.sent,s=o._index,!this.geneNames){e.next=20;break}return e.abrupt("return",this.geneNames);case 20:return this.geneNames=Object(N.openArray)({store:t,path:"var/".concat(s),mode:"r"}).then((function(e){return e.store.getItem("".concat(e.keyPrefix,"0")).then((function(e){return new Uint8Array(e)})).then((function(t){return e.compressor.decode(t)})).then((function(e){return u.decodeTextArray(e).filter((function(e){return!Number(e)})).filter((function(e){return e.length>=2})).filter((function(e,t){return!r||r[t]}))}))})),e.abrupt("return",this.geneNames);case 22:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"load",value:function(){var e=this;return Promise.all([this.loadCellNames(),this.loadGeneNames(),this.loadCellXGene()]).then((function(t){var n=Object(o.a)(t,3),r=n[0],i=n[1],a=n[2].data,s={rows:r,cols:i};if(!e.min||!e.max){var u=Object(Y.a)(a),A=Object(o.a)(u,2);e.min=A[0],e.max=A[1]}var c=255/(e.max-e.min);return{data:[s,{data:new Uint8Array(a.map((function(t){return Math.floor((t-e.min)*c)})))}],url:null}}))}}]),n}(se)},Ae=function(e){Object(l.a)(n,e);var t=Object(f.a)(n);function n(e){var r;Object(A.a)(this,n),r=t.call(this,e);var i=Object(M.a)(r),a=i.url;i.requestInit;return r.store=new N.HTTPStore(a),r}return Object(c.a)(n,[{key:"loadAttrs",value:function(){var e=this.store;return this.attrs||(this.attrs=e.getItem(".zattrs").then((function(e){var t=new TextDecoder("utf-8");return JSON.parse(t.decode(e))}))),this.attrs}},{key:"load",value:function(){var e=this.url;return this.loadAttrs().then((function(t){return Promise.resolve({data:t,url:e})}))}}]),n}(Q),ce=(ee={"expression-matrix.zarr":F,"clusters.json":W,"genes.json":H,"cells.json":j,"molecules.json":j,"neighborhoods.json":j,"raster.json":te,"cell-sets.json":re},Object(b.a)(ee,"".concat("anndata","-cell-sets.zarr"),ue.CellSetsZarrLoader),Object(b.a)(ee,"".concat("anndata","-cells.zarr"),ue.CellsZarrLoader),Object(b.a)(ee,"".concat("anndata","-expression-matrix.zarr"),ue.MatrixZarrLoader),Object(b.a)(ee,"genomic-profiles.zarr",Ae),ee);var le=n(67);function fe(e){var t=e.rowHeight,n=e.config,r=e.getComponent,i=e.theme,a=e.height,A=function(e,t,n,r,i){var a=Object(s.useState)(n),u=Object(o.a)(a,2),A=u[0],c=u[1],l=Object(s.useState)(t),f=Object(o.a)(l,2),h=f[0],g=f[1],d=Object(s.useRef)();return Object(s.useEffect)((function(){var t=function(e){for(var t,n=0,r=0,i=e.length;r<i;r++)(t=e[r].y+e[r].h)>n&&(n=t);return n}(e.layout),n=function(e,t,n,r){return(e-2*r-(t-1)*n)/t}(A,t,r,i);g(n)}),[A,e,r,i]),Object(s.useEffect)((function(){null!==n&&void 0!==n&&c(n)}),[n]),Object(s.useEffect)((function(){if(null!==n&&void 0!==n)return function(){};function e(){if(d.current){var e=d.current.getBoundingClientRect();c(e.height)}}return window.addEventListener("resize",e),e(),function(){window.removeEventListener("resize",e)}}),[d,n]),[h,d]}(n,t,a,5,10),c=Object(o.a)(A,2),l=c[0],f=c[1],h=Object(le.e)();Object(s.useEffect)((function(){h()}),[l,h]);var g=Object(le.m)(),d=Object(le.l)(),p=Object(le.i)(),v=Object(le.a)(),y=Object(le.g)();return Object(s.useEffect)((function(){if(n){g(n);var e=function(e){var t={};return e.forEach((function(e){var n={name:e.name,loaders:{}};e.files.forEach((function(e){var t=ce[e.fileType]||j;n.loaders[e.type]=new t(e)})),t[e.uid]=n})),t}(n.datasets);d(e)}else d({})}),[n,g,d]),u.a.createElement("div",{ref:f,className:"vitessce-container vitessce-theme-".concat(i)},y&&u.a.createElement(I,{layout:y,height:a,rowHeight:l,theme:i,getComponent:r,draggableHandle:".title",margin:5,padding:10,onRemoveComponent:p,onLayoutChange:v,reactGridLayoutProps:{onResize:h,onResizeStop:h}}))}var he="https://s3.amazonaws.com/vitessce-data/0.0.31/master_release";function ge(e){return function(t){return{name:t,type:t.toUpperCase(),fileType:"".concat(t,".json"),url:"".concat(he,"/").concat(e,"/").concat(e,".").concat(t,".json")}}}var de=["cells","cell-sets","raster","molecules","neighborhoods"],pe="Spatial organization of the somatosensory cortex revealed by cyclic smFISH",ve={description:pe,layers:[].concat(Object(p.a)(de.map(ge("linnarsson"))),[Object(V.a)({},ge("linnarsson")("clusters"),{type:"EXPRESSION-MATRIX"})])},ye={description:pe,layers:de.filter((function(e){return"clusters"!==e})).map(ge("linnarsson"))},me="Giotto, a pipeline for integrative analysis and visualization of single-cell spatial transcriptomic data",Ie={description:me,layers:["cells","cell-sets"].map(ge("dries"))},be="Multiplexed imaging of high-density libraries of RNAs with MERFISH and expansion microscopy",Ee={description:be,layers:[].concat(Object(p.a)(["cells","molecules"].map(ge("wang"))),[Object(V.a)({},ge("wang")("genes"),{name:"expression-matrix",type:"EXPRESSION-MATRIX"})])},Ce={description:"High Bit Depth (uint16) Multiplex Immunofluorescence Imaging",layers:["raster"].map(ge("spraggins"))},Be={"just-scatter":{version:"0.1.0",public:!1,layers:[{name:"cells",type:"CELLS",fileType:"cells.json",url:"".concat(he,"/linnarsson/linnarsson.cells.json"),requestInit:{method:"GET",headers:{"x-foo":"FAKE"},mode:"cors",credentials:"omit",cache:"no-store",redirect:"error",referrer:"FAKE",integrity:"FAKE"}}],name:"Linnarsson, just scatterplot",staticLayout:[{component:"scatterplot",props:{mapping:"t-SNE",view:{zoom:.75,target:[0,0,0]}},x:0,y:0,w:12,h:2}]},"just-scatter-expression":{version:"0.1.0",public:!1,layers:[{name:"cells",type:"CELLS",url:"https://s3.amazonaws.com/vitessce-data/0.0.20/master_release/linnarsson/linnarsson.cells.json"},{name:"genes",type:"GENES",url:"https://s3.amazonaws.com/vitessce-data/0.0.20/master_release/linnarsson/linnarsson.genes.json"}],name:"Linnarsson, just scatterplot and expression",staticLayout:[{component:"scatterplot",props:{mapping:"t-SNE",view:{zoom:.75,target:[0,0,0]}},x:0,y:0,w:8,h:2},{component:"genes",x:8,y:2,w:4,h:2}]},"linnarsson-2018":{name:"Linnarsson",version:"1.0.0",description:pe,public:!0,datasets:[{uid:"linnarsson-2018",name:"Linnarsson 2018",files:ve.layers.map((function(e){return{type:e.type.toLowerCase(),fileType:e.fileType,url:e.url}}))}],initStrategy:"auto",coordinationSpace:{embeddingZoom:{PCA:0,TSNE:.75},embeddingType:{PCA:"PCA",TSNE:"t-SNE"},spatialZoom:{A:-5.5},spatialTargetX:{A:16e3},spatialTargetY:{A:2e4}},layout:[{component:"description",props:{description:"Linnarsson: ".concat(pe)},x:0,y:0,w:2,h:1},{component:"layerController",x:0,y:1,w:2,h:4},{component:"status",x:0,y:5,w:2,h:1},{component:"spatial",coordinationScopes:{spatialZoom:"A",spatialTargetX:"A",spatialTargetY:"A"},x:2,y:0,w:4,h:4},{component:"genes",x:9,y:0,w:3,h:2},{component:"cellSets",x:9,y:3,w:3,h:2},{component:"heatmap",props:{transpose:!0},x:2,y:4,w:10,h:2},{component:"scatterplot",coordinationScopes:{embeddingType:"PCA",embeddingZoom:"PCA"},x:6,y:0,w:3,h:2},{component:"scatterplot",coordinationScopes:{embeddingType:"TSNE",embeddingZoom:"TSNE"},x:6,y:2,w:3,h:2}]},"linnarsson-2018-two-spatial":Object(V.a)({},ve,{version:"0.1.0",name:"Linnarsson (two spatial)",staticLayout:[{component:"spatial",props:{view:{zoom:-8,target:[18e3,18e3,0]}},x:0,y:0,w:5,h:2},{component:"scatterplot",props:{mapping:"t-SNE"},x:0,y:2,w:5,h:2},{component:"spatial",props:{view:{zoom:-6,target:[18e3,18e3,0]}},x:5,y:0,w:5,h:2},{component:"scatterplot",props:{mapping:"PCA"},x:5,y:2,w:5,h:2},{component:"genes",x:10,y:2,w:2,h:2},{component:"heatmap",x:0,y:4,w:12}]}),"linnarsson-2018-just-spatial":Object(V.a)({},ye,{version:"0.1.0",name:"Linnarsson (just spatial)",staticLayout:[{component:"spatial",props:{view:{zoom:-6.5,target:[18e3,18e3,0]}},x:0,y:0,w:10,h:2},{component:"genes",x:10,y:1,w:2,h:1}]}),"linnarsson-2018-static":Object(V.a)({},ve,{version:"0.1.0",name:"Linnarsson (static layout)",staticLayout:[{component:"description",props:{description:"Linnarsson (static layout): ".concat(pe)},x:0,y:0,w:3,h:1},{component:"scatterplot",props:{mapping:"t-SNE"},x:0,y:2,w:3,h:2},{component:"spatial",props:{view:{zoom:-6.5,target:[18e3,18e3,0]}},x:3,y:0,w:6,h:4},{component:"genes",x:9,y:2,w:3,h:2},{component:"heatmap",x:0,y:4,w:12,h:1}]}),"linnarsson-2018-dozen":Object(V.a)({},ve,{version:"0.1.0",name:"Linnarsson (static layout, redundant components for performance testing)",staticLayout:[{component:"spatial",props:{view:{zoom:-6.5,target:[18e3,18e3,0]}},x:0,y:0,w:4,h:1},{component:"spatial",props:{view:{zoom:-6.5,target:[18e3,18e3,0]}},x:0,y:1,w:4,h:1},{component:"spatial",props:{view:{zoom:-6.5,target:[18e3,18e3,0]}},x:4,y:0,w:4,h:1},{component:"spatial",props:{view:{zoom:-6.5,target:[18e3,18e3,0]}},x:4,y:1,w:4,h:1},{component:"scatterplot",props:{mapping:"t-SNE"},x:0,y:2,w:4,h:1},{component:"scatterplot",props:{mapping:"t-SNE"},x:0,y:3,w:4,h:1},{component:"scatterplot",props:{mapping:"t-SNE"},x:0,y:4,w:4,h:1},{component:"scatterplot",props:{mapping:"t-SNE"},x:0,y:5,w:4,h:1},{component:"scatterplot",props:{mapping:"PCA"},x:4,y:2,w:4,h:1},{component:"scatterplot",props:{mapping:"PCA"},x:4,y:3,w:4,h:1},{component:"scatterplot",props:{mapping:"PCA"},x:4,y:4,w:4,h:1},{component:"scatterplot",props:{mapping:"PCA"},x:4,y:5,w:4,h:1},{component:"genes",x:8,y:2,w:4,h:2},{component:"heatmap",x:8,y:4,w:4,h:2}]}),"dries-2019":{name:"Dries",version:"1.0.0",description:me,public:!0,datasets:[{uid:"dries-2019",name:"Dries 2019",files:Ie.layers.map((function(e){return{type:e.type.toLowerCase(),fileType:e.fileType,url:e.url}}))}],initStrategy:"auto",coordinationSpace:{embeddingType:{TSNE:"t-SNE",UMAP:"UMAP"},embeddingCellSetPolygonsVisible:{A:!1},embeddingCellSetLabelsVisible:{A:!0},embeddingCellSetLabelSize:{A:16},embeddingCellRadius:{A:1},embeddingZoom:{TSNE:3,UMAP:3},spatialZoom:{A:-4.4},spatialTargetX:{A:3800},spatialTargetY:{A:-900}},layout:[{component:"description",props:{description:me},x:9,y:0,w:3,h:2},{component:"status",x:9,y:2,w:3,h:2},{component:"cellSets",x:9,y:4,w:3,h:4},{component:"cellSetSizes",x:5,y:4,w:4,h:4},{component:"scatterplot",coordinationScopes:{embeddingType:"TSNE",embeddingZoom:"TSNE",embeddingCellSetLabelsVisible:"A",embeddingCellSetLabelSize:"A",embeddingCellSetPolygonsVisible:"A",embeddingCellRadius:"A"},x:0,y:2,w:5,h:4},{component:"spatial",props:{cellRadius:50},coordinationScopes:{spatialZoom:"A",spatialTargetX:"A",spatialTargetY:"A"},x:5,y:0,w:4,h:4},{component:"scatterplot",coordinationScopes:{embeddingType:"UMAP",embeddingZoom:"UMAP",embeddingCellSetLabelsVisible:"A",embeddingCellSetLabelSize:"A",embeddingCellSetPolygonsVisible:"A",embeddingCellRadius:"A"},x:0,y:0,w:5,h:4}]},"wang-2019":{name:"Wang",version:"1.0.0",description:be,public:!0,datasets:[{uid:"wang-2019",name:"Wang 2019",files:Ee.layers.map((function(e){return{type:e.type.toLowerCase(),fileType:e.fileType,url:e.url}}))}],initStrategy:"auto",coordinationSpace:{spatialZoom:{A:-1},spatialLayers:{A:[{type:"molecules",radius:2,opacity:1,visible:!0},{type:"cells",opacity:1,radius:50,visible:!0,stroked:!1}]}},layout:[{component:"spatial",coordinationScopes:{spatialZoom:"A",spatialLayers:"A"},x:0,y:0,w:10,h:2},{component:"genes",x:10,y:0,w:2,h:2}]},vanderbilt:Object(V.a)({},Ce,{version:"0.1.0",name:"Spraggins",public:!0,staticLayout:[{component:"spatial",props:{view:{zoom:-6.5,target:[2e4,2e4,0]}},x:0,y:0,w:9,h:2},{component:"layerController",x:9,y:0,w:3,h:2}]}),"just-higlass":{public:!1,initStrategy:"auto",version:"1.0.0",datasets:[{uid:"higlass-dataset",name:"HiGlass Dataset",files:[]}],name:"HiGlass demo",coordinationSpace:{genomicZoomX:{A:0},genomicZoomY:{A:0},genomicTargetX:{A:1549999999.5},genomicTargetY:{A:1549999999.5}},layout:[{component:"higlass",coordinationScopes:{genomicZoomX:"A",genomicZoomY:"A",genomicTargetX:"A",genomicTargetY:"A"},props:{hgViewConfig:{uid:"aa",autocompleteSource:"/api/v1/suggest/?d=OHJakQICQD6gTD7skx4EWA&",genomePositionSearchBox:{autocompleteServer:"//higlass.io/api/v1",autocompleteId:"OHJakQICQD6gTD7skx4EWA",chromInfoServer:"//higlass.io/api/v1",chromInfoId:"hg19",visible:!0},chromInfoPath:"//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv",tracks:{top:[{type:"horizontal-gene-annotations",height:60,tilesetUid:"OHJakQICQD6gTD7skx4EWA",server:"//higlass.io/api/v1",uid:"OHJakQICQD6gTD7skx4EWA",options:{name:"Gene Annotations (hg19)",fontSize:10,labelPosition:"hidden",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,minHeight:24,geneAnnotationHeight:16,geneLabelPosition:"outside",geneStrandSpacing:4,showMousePosition:!0,mousePositionColor:"#ff00ff",plusStrandColor:"#fdff54",minusStrandColor:"#68bf30",labelColor:"black",trackBorderWidth:0,trackBorderColor:"black"}},{chromInfoPath:"//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv",type:"horizontal-chromosome-labels",height:30,uid:"X4e_1DKiQHmyghDa6lLMVA",options:{color:"#808080",stroke:"black",fontSize:12,fontIsLeftAligned:!1,showMousePosition:!0,mousePositionColor:"#ff00ff"}}],left:[{type:"vertical-gene-annotations",width:60,tilesetUid:"OHJakQICQD6gTD7skx4EWA",server:"//higlass.io/api/v1",options:{labelPosition:"bottomRight",name:"Gene Annotations (hg19)",fontSize:10,labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,minWidth:24,geneAnnotationHeight:16,geneLabelPosition:"outside",geneStrandSpacing:4,showMousePosition:!0,mousePositionColor:"#ff00ff",plusStrandColor:"#fdff54",minusStrandColor:"#68bf30",labelColor:"black",trackBorderWidth:0,trackBorderColor:"black"},uid:"dqBTMH78Rn6DeSyDBoAEXw"},{chromInfoPath:"//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv",type:"vertical-chromosome-labels",width:30,uid:"RHdQK4IRQ7yJeDmKWb7Pcg",options:{color:"#777777",stroke:"black",fontSize:12,fontIsLeftAligned:!1,minWidth:35,showMousePosition:!0,mousePositionColor:"#ff00ff"}}],center:[{uid:"c1",type:"combined",height:600,contents:[{server:"//higlass.io/api/v1",tilesetUid:"CQMd6V_cRw6iCI_-Unl3PQ",type:"heatmap",options:{maxZoom:null,labelPosition:"bottomRight",name:"Rao et al. (2014) GM12878 MboI (allreps) 1kb",backgroundColor:"black",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,labelShowResolution:!0,labelShowAssembly:!0,labelColor:"#ffffff",labelTextOpacity:.5,labelBackgroundColor:"black",labelBackgroundOpacity:.01,colorRange:["#000000","#222e54","#448db2","#68bf30","#fdff54","#FFFFFF"],colorbarBackgroundColor:"black",colorbarBackgroundOpacity:.01,colorbarPosition:"topRight",trackBorderWidth:0,trackBorderColor:"black",heatmapValueScaling:"log",showMousePosition:!0,mousePositionColor:"#ff00ff",showTooltip:!1,extent:"full",zeroValueColor:null,scaleStartPercent:"0.00000",scaleEndPercent:"1.00000"},height:500,uid:"GjuZed1ySGW1IzZZqFB9BA",transforms:[{name:"ICE",value:"weight"}]}],options:{}}],right:[],bottom:[],whole:[],gallery:[]},layout:{w:12,h:12,x:0,y:0,moved:!1,static:!1}}},x:0,y:0,w:8,h:2},{component:"higlass",coordinationScopes:{genomicZoomX:"A",genomicZoomY:"A",genomicTargetX:"A",genomicTargetY:"A"},props:{hgViewConfig:{uid:"aa",autocompleteSource:"/api/v1/suggest/?d=OHJakQICQD6gTD7skx4EWA&",genomePositionSearchBox:{autocompleteServer:"//higlass.io/api/v1",autocompleteId:"OHJakQICQD6gTD7skx4EWA",chromInfoServer:"//higlass.io/api/v1",chromInfoId:"hg19",visible:!0},chromInfoPath:"//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv",tracks:{top:[{type:"horizontal-gene-annotations",height:60,tilesetUid:"OHJakQICQD6gTD7skx4EWA",server:"//higlass.io/api/v1",uid:"OHJakQICQD6gTD7skx4EWA",options:{name:"Gene Annotations (hg19)",fontSize:10,labelPosition:"hidden",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,minHeight:24,geneAnnotationHeight:16,geneLabelPosition:"outside",geneStrandSpacing:4,showMousePosition:!0,mousePositionColor:"#ff00ff",plusStrandColor:"#fdff54",minusStrandColor:"#68bf30",labelColor:"black",trackBorderWidth:0,trackBorderColor:"black"}},{chromInfoPath:"//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv",type:"horizontal-chromosome-labels",height:30,uid:"X4e_1DKiQHmyghDa6lLMVA",options:{color:"#808080",stroke:"black",fontSize:12,fontIsLeftAligned:!1,showMousePosition:!0,mousePositionColor:"#ff00ff"}}],left:[{type:"vertical-gene-annotations",width:60,tilesetUid:"OHJakQICQD6gTD7skx4EWA",server:"//higlass.io/api/v1",options:{labelPosition:"bottomRight",name:"Gene Annotations (hg19)",fontSize:10,labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,minWidth:24,geneAnnotationHeight:16,geneLabelPosition:"outside",geneStrandSpacing:4,showMousePosition:!0,mousePositionColor:"#ff00ff",plusStrandColor:"#fdff54",minusStrandColor:"#68bf30",labelColor:"black",trackBorderWidth:0,trackBorderColor:"black"},uid:"dqBTMH78Rn6DeSyDBoAEXw"},{chromInfoPath:"//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv",type:"vertical-chromosome-labels",width:30,uid:"RHdQK4IRQ7yJeDmKWb7Pcg",options:{color:"#777777",stroke:"black",fontSize:12,fontIsLeftAligned:!1,minWidth:35,showMousePosition:!0,mousePositionColor:"#ff00ff"}}],center:[{uid:"c1",type:"combined",height:600,contents:[{server:"//higlass.io/api/v1",tilesetUid:"CQMd6V_cRw6iCI_-Unl3PQ",type:"heatmap",options:{maxZoom:null,labelPosition:"bottomRight",name:"Rao et al. (2014) GM12878 MboI (allreps) 1kb",backgroundColor:"black",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,labelShowResolution:!0,labelShowAssembly:!0,labelColor:"#ffffff",labelTextOpacity:.5,labelBackgroundColor:"black",labelBackgroundOpacity:.01,colorRange:["#000000","#222e54","#448db2","#68bf30","#fdff54","#FFFFFF"],colorbarBackgroundColor:"black",colorbarBackgroundOpacity:.01,colorbarPosition:"topRight",trackBorderWidth:0,trackBorderColor:"black",heatmapValueScaling:"log",showMousePosition:!0,mousePositionColor:"#ff00ff",showTooltip:!1,extent:"full",zeroValueColor:null,scaleStartPercent:"0.00000",scaleEndPercent:"1.00000"},height:500,uid:"GjuZed1ySGW1IzZZqFB9BA",transforms:[{name:"ICE",value:"weight"}]}],options:{}}],right:[],bottom:[],whole:[],gallery:[]},layout:{w:12,h:12,x:0,y:0,moved:!1,static:!1}}},x:8,y:0,w:4,h:2}]},"sc-atac-seq-10x-genomics-pbmc":{version:"1.0.0",name:"HiGlass serverless demo with 10x Genomics scATAC-seq 5k PBMC dataset",datasets:[{uid:"10x-genomics-pbmc",name:"10x Genomics PBMC",files:[{type:"genomic-profiles",fileType:"genomic-profiles.zarr",url:"http://higlass-serverless.s3.amazonaws.com/multivec/pbmc_10x_peaks_by_cluster.zarr"}]}],layout:[{component:"genomicProfiles",props:{profileTrackUidKey:"file"},x:0,y:0,w:8,h:2},{component:"description",props:{description:"10x Genomics scATAC-seq of 5k PBMCs. Note: the Zarr HiGlass Plugin Datafetcher is not yet optimized. Please be patient while the HiGlass tracks load."},x:8,y:0,w:4,h:2}],initStrategy:"auto"}};function we(e){return Object.entries(Be).filter((function(t){return e||t[1].public})).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return{id:n,name:r.name,description:r.description}}))}function Qe(e){return Be[e]}var ke=n(177),_e=n(1084);function xe(e){var t=e.configs,n=e.theme,r=t.map((function(e){var t=e.id,r=e.name,i=e.description;return u.a.createElement("div",{className:"list-group-item list-group-item-action flex-column align-items-start bg-secondary",key:t},u.a.createElement("a",{href:"?dataset=".concat(t,"&theme=").concat(n),key:t},u.a.createElement("h5",null,r),u.a.createElement("p",null,i)),u.a.createElement("a",{href:"?dataset=".concat(t,"&theme=").concat(n,"&small"),style:{fontSize:"75%"}},r," as component"))}));return u.a.createElement("div",{className:"list-group"},r)}function Se(e){var t=e.configs,n=e.theme;return u.a.createElement("form",{method:"GET"},u.a.createElement("h1",null,"Vitessce"),u.a.createElement("div",null,"Select a dataset:"),u.a.createElement(xe,{configs:t,theme:n}),u.a.createElement("br",null),u.a.createElement("div",null,"Or specify URL of configuration:"),u.a.createElement("div",{className:"input-group mb-3"},u.a.createElement("input",{type:"text",name:"url",className:"form-control"}),u.a.createElement("input",{type:"hidden",name:"theme",value:n}),u.a.createElement("div",{className:"input-group-append"},u.a.createElement("button",{className:"btn btn-outline-secondary",type:"submit"},"Load"))))}function Oe(){return u.a.createElement(u.a.Fragment,null,u.a.createElement("p",{className:"info-paragraph"},"Vitessce is a visual integration tool for exploration of spatial single cell experiments. Its modular design is optimized for scalable, linked visualizations that support the spatial and non-spatial representation of tissue-, cell- and molecule-level data. Vitessce integrates the ",u.a.createElement("a",{href:"https://github.com/hms-dbmi/viv"},"Viv library")," to visualize highly multiplexed, high-resolution, high-bit depth image data directly from OME-TIFF files and Bio-Formats-compatible Zarr stores."),u.a.createElement("h5",{className:"info-section-text"},"Contributors"),u.a.createElement("ul",null,u.a.createElement("li",null,u.a.createElement("a",{href:"https://github.com/keller-mark"},"Mark Keller")),u.a.createElement("li",null,u.a.createElement("a",{href:"https://github.com/mccalluc"},"Chuck McCallum")),u.a.createElement("li",null,u.a.createElement("a",{href:"https://github.com/ilan-gold"},"Ilan Gold")),u.a.createElement("li",null,u.a.createElement("a",{href:"https://github.com/manzt"},"Trevor Manz")),u.a.createElement("li",null,u.a.createElement("a",{href:"https://github.com/thomaslchan"},"Tos Chan")),u.a.createElement("li",null,u.a.createElement("a",{href:"https://github.com/jkmarx"},"Jennifer Marx")),u.a.createElement("li",null,u.a.createElement("a",{href:"https://github.com/pkharchenko"},"Peter Kharchenko")),u.a.createElement("li",null,u.a.createElement("a",{href:"https://github.com/ngehlenborg"},"Nils Gehlenborg"))),u.a.createElement("h5",{className:"info-section-text"},"Source Code"),u.a.createElement("ul",null,u.a.createElement("li",null,u.a.createElement("a",{href:"https://github.com/hubmapconsortium/vitessce"},"GitHub")),u.a.createElement("li",null,u.a.createElement("a",{href:"https://www.npmjs.com/package/vitessce"},"NPM"))),u.a.createElement("h5",{className:"info-section-text"},"Funding"),u.a.createElement("ul",null,u.a.createElement("li",null,"NIH/OD Human BioMolecular Atlas Program (HuBMAP) (OT2OD026677, PI: Nils Gehlenborg)."),u.a.createElement("li",null,"NIH/NLM Biomedical Informatics and Data Science Research Training Program (T15LM007092, PI: Nils Gehlenborg)"),u.a.createElement("li",null,"Harvard Stem Cell Institute (CF-0014-17-03, PI: Nils Gehlenborg)")),u.a.createElement("p",{className:"info-section-text"},"This deployment: branch=",_e.branch," | hash=",_e.hash," | date=",_e.date))}function De(e){var t=e.configs,n=e.theme;return u.a.createElement("div",{className:"vitessce-container vitessce-theme-".concat(n," welcome-container")},u.a.createElement("div",{className:"react-grid-layout container-fluid",style:{height:"max(100vh, 100%)"}},u.a.createElement("div",{className:"row"},u.a.createElement("div",{className:"welcome-col-left"},u.a.createElement("div",{className:ke.b},u.a.createElement(Se,{configs:t,theme:n}))),u.a.createElement("div",{className:"welcome-col-right"},u.a.createElement("div",{className:ke.b},u.a.createElement(Oe,null))))))}function Re(e){var t=e.title,n=e.preformatted,r=e.unformatted,i=e.theme;return u.a.createElement("div",{className:"vitessce-container vitessce-theme-".concat(i)},u.a.createElement("div",{className:"warning-layout container-fluid"},u.a.createElement("div",{className:"row"},u.a.createElement("div",{className:"col-12"},u.a.createElement("div",{className:ke.b},u.a.createElement("h1",null,t),u.a.createElement("pre",null,n),u.a.createElement("div",null,r))))))}var je=n(859),Me=n(893),Ne=n(18),Fe=(n(28),n(368)),Te=n(765),Le=n(369);var Pe=function(e){var t=e.children,n=e.theme,r=Object(Te.a)(),i=u.a.useMemo((function(){var e=null===r?n:function(e,t){return"function"===typeof t?t(e):Object(Ne.a)({},e,{},t)}(r,n);return null!=e&&(e[Le.a]=null!==r),e}),[n,r]);return u.a.createElement(Fe.a.Provider,{value:i},t)},Ue=n(544),Ge=n(204),qe=n(1082),He=n(1323);function Ye(e){var t=e.onWarn,n=e.onConfigChange,r=e.onLoaderChange,i=e.validateOnConfigChange,a=Object(le.p)(),o=Object(le.h)();return Object(s.useEffect)((function(){return le.o.subscribe((function(e){i&&e&&function(e){try{var t=(new C.a).addSchema(D).compile(qe);if(!t(e)){var n=JSON.stringify(t.errors,null,2);throw new Error("Config validation failed: ".concat(n))}}catch(r){console.error(r)}}(e),n&&e&&n(e)}),(function(e){return e.viewConfig}))}),[n,i]),Object(s.useEffect)((function(){t&&a&&t(a)}),[a,t]),Object(s.useEffect)((function(){r&&o&&r(o)}),[o,r]),null}var Je=n(161),ze=n(178),Ke=n(176),We=n(240);function Ve(e){var t=e.description,n=e.metadata;return u.a.createElement("div",{className:"description"},u.a.createElement("p",null,t),n&&Array.from(n.entries()).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1],i=r.name,a=r.metadata;return a&&Object.entries(a).length>0?u.a.createElement("details",{key:n},u.a.createElement("summary",null,i),u.a.createElement("div",{className:"metadata-container"},u.a.createElement("table",null,u.a.createElement("tbody",null,Object.entries(a).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return u.a.createElement("tr",{key:n},u.a.createElement("th",{title:n},n),u.a.createElement("td",{title:r},r))})))))):null})))}var Xe=["raster"];var Ze=n(1056),$e=n(1057),et=n(1058),tt=n(897),nt=n(899),rt=n(898),it=n(1060),at=n(75),ot=n.n(at);var st=Object.freeze({initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.modulePath,n=void 0===t?".":t,r=e.importFunctionName,i=void 0===r?"__import__":r;try{self[i]=new Function("u","return import(u)")}catch(s){var a=new URL(n,location),o=function(e){URL.revokeObjectURL(e.src),e.remove()};self[i]=function(e){return new Promise((function(t,n){var r=new URL(e,a);if(self[i].moduleMap[r])return t(self[i].moduleMap[r]);var s=new Blob(["import * as m from '".concat(r,"';"),"".concat(i,".moduleMap['").concat(r,"']=m;")],{type:"text/javascript"}),u=Object.assign(document.createElement("script"),{type:"module",src:URL.createObjectURL(s),onerror:function(){n(new Error("Failed to import: ".concat(e))),o(u)},onload:function(){t(self[i].moduleMap[r]),o(u)}});document.head.appendChild(u)}))},self[i].moduleMap={}}}});window.higlassTracks=window.higlassTracks||{},window.higlassTracksByType=window.higlassTracksByType||{},window.higlassDataFetchersByType=window.higlassDataFetchersByType||{};var ut=function(){return Math.random().toString(36).substring(2,8)},At=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.force,r=void 0!==n&&n,i=ut();window.higlassTracks[i];)i=ut();e.name=i,window.higlassTracks[e.name]=e,window.higlassTracksByType[e.config.type]&&!r?console.warn("A track with the same type (".concat(e.config.type,") was already ")+"registered. To override it, set force to true."):window.higlassTracksByType[e.config.type]=e},ct=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.force,r=void 0!==n&&n;window.higlassDataFetchersByType[e.config.type]&&!r?console.warn("A data fetcher with the same type (".concat(e.config.type,") was already ")+"registered. To override it, set force to true."):window.higlassDataFetchersByType[e.config.type]=e},lt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.pluginType,r=void 0===n?"track":n;"track"===r?At(e,t):"dataFetcher"===r&&ct(e,t)};function ft(e,t,n){return(ft=ht()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&gt(i,n.prototype),i}).apply(null,arguments)}function ht(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function gt(e,t){return(gt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(u){i=!0,a=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||Ct(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pt(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 vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pt(Object(n),!0).forEach((function(t){yt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function It(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 bt(e,t,n){return t&&It(e.prototype,t),n&&It(e,n),e}function Et(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Ct(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f: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.")}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Ct(e,t){if(e){if("string"===typeof e)return Bt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bt(e,t):void 0}}function Bt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wt(e,t,n){var r=n?t[1]:t[0]*t[1],i=new Float32Array(r),a=0;if(n){var o,s=Et(e);try{for(s.s();!(o=s.n()).done;){var u=o.value.data;i.set(u,a),a+=u.length}}catch(g){s.e(g)}finally{s.f()}}else for(var A=t[0],c=0;c<A;c++){var l,f=Et(e);try{for(f.s();!(l=f.n()).done;){var h=l.value.data[c];i.set(h,a),a+=h.length}}catch(g){f.e(g)}finally{f.f()}}return i}var Qt=function e(t){if(!(this instanceof e?this.constructor:void 0))throw new Error('Uncaught TypeError: Class constructor cannot be invoked without "new"');for(var n=t.libraries.slugid,r=t.utils,i=r.absToChr,a=r.parseChromsizesRows,o=r.genomicRangeToChromosomeChunks,s=r.DenseDataExtrema1D,u=r.minNonZero,A=r.maxNonZero,c=function(){function e(t){mt(this,e),this.dataConfig=t,this.trackUid=n.nice(),t.url&&(this.store=new N.HTTPStore(t.url)),void 0!==t.row&&(this.row=t.row)}return bt(e,[{key:"tilesetInfo",value:function(e){var t=this;return this.tilesetInfoLoading=!0,this.store.getItem(".zattrs").then((function(e){var t=new TextDecoder("utf-8");return JSON.parse(t.decode(e))})).then((function(n){t.tilesetInfoLoading=!1;var r=n.multiscales.map((function(e){return[e.name,e.metadata.chromsize]})),i=n.multiscales[n.multiscales.length-1],a=i.metadata.chromoffset+i.metadata.chromsize,o=n.shape[1],s=vt(vt({},n),{},{shape:[n.shape[1],n.shape[0]],chromSizes:r,tile_size:o,max_width:a,min_pos:[0],max_pos:[a],max_zoom:Math.ceil(Math.log(a/o)/Math.log(2))});return e&&e(s),s})).catch((function(n){t.tilesetInfoLoading=!1,e&&e({error:"Error parsing zarr multivec: ".concat(n)})}))}},{key:"fetchTilesDebounced",value:function(e,t){var n,r={},i=[],a=[],o=Et(t);try{for(o.s();!(n=o.n()).done;){var s=n.value,u=s.split("."),A=parseInt(u[0],10),c=parseInt(u[1],10);Number.isNaN(c)||Number.isNaN(A)?console.warn("Invalid tile zoom or position:",A,c):(i.push(s),a.push(this.tile(A,c,s)))}}catch(l){o.e(l)}finally{o.f()}return Promise.all(a).then((function(t){for(var n=0;n<t.length;n++){var a=i[n];r[a]=t[n],r[a].tilePositionId=a}e(r)})),r}},{key:"tile",value:function(e,t,n){var r=this,c=this.store;return this.tilesetInfo().then((function(l){var f=+l.resolutions[e],h=+l.tile_size,g=f,d=t*h*f,p=d+h*f,v=l.chromSizes,y=a(v),m=dt(i(d,y),2),I=m[0],b=m[1],E=dt(i(p,y),2),C=E[0],B=E[1],w=o(v,{chr:I,pos:b},{chr:C,pos:B},g,h);return Promise.all(w.map((function(e){var t=dt(e,3),n=t[0],i=t[1],a=t[2];return Object(N.openArray)({store:c,path:"/chromosomes/".concat(n,"/").concat(f,"/"),mode:"r"}).then((function(e){return void 0!==r.row?e.getRaw([r.row,Object(N.slice)(i,a)]):e.get([null,Object(N.slice)(i,a)])}))}))).then((function(i){var a=wt(i,[l.shape[1],l.shape[0]],void 0!==r.row);return Promise.resolve({dense:a,denseDataExtrema:new s(a),dtype:"float32",min_value:Math.min.apply(null,a),max_value:Math.max.apply(null,a),minNonZero:u(a),maxNonZero:A(a),server:null,size:1,shape:l.shape,tileId:n,tilePos:[t],tilePositionId:n,tilesetUid:null,zoomLevel:e})}))}))}}]),e}(),l=arguments.length,f=new Array(l>1?l-1:0),h=1;h<l;h++)f[h-1]=arguments[h];return ft(c,f)};Qt.config={type:"zarr-multivec"};var kt=n(85),_t=Ue.dependencies["window-pixi"],xt=Ue.dependencies.higlass,St="https://unpkg.com/window-pixi@".concat(_t,"/dist/pixi.").concat("min.js"),Ot="https://unpkg.com/higlass@".concat(xt,"/dist/hglib.").concat("min.js");st.initialize(),lt({dataFetcher:Qt,config:Qt.config},{pluginType:"dataFetcher"});var Dt=u.a.lazy((function(){return window.React||(window.React=u.a),window.ReactDOM||(window.ReactDOM=ot.a),new Promise((function(e){var t=function(t){console.warn(t),e(Object(kt.f)(Object(kt.l)({title:"Could not load HiGlass",message:"The HiGlass scripts could not be dynamically imported."})))};__import__(St).then((function(){__import__(Ot).then((function(){e(Object(kt.f)(window.hglib.HiGlassComponent))})).catch(t)})).catch(t)}))}));function Rt(e){var t=e.coordinationScopes,n=e.theme,r=e.hgViewConfig,i=e.hgOptions,a=e.genomeSize,A=e.height,c=Object(le.d)(Ke.b.higlass,t),l=Object(o.a)(c,2),f=l[0],h=f.genomicZoomX,g=f.genomicZoomY,d=f.genomicTargetX,p=f.genomicTargetY,v=l[1],y=v.setGenomicZoomX,m=v.setGenomicZoomY,I=v.setGenomicTargetX,b=v.setGenomicTargetY,E=Object(Je.b)(),C=Object(o.a)(E,3),B=C[0],w=(C[1],C[2]),Q=Object(s.useState)(),k=Object(o.a)(Q,2),_=k[0],x=k[1],S=Object(s.useRef)(),O=Object(s.useMemo)((function(){return Object(V.a)({},i,{theme:n})}),[i,n]),D=Object(s.useMemo)((function(){var e=d,t=a/Math.pow(2,h),n=B/800,i=[e-t*n/2,e+t*n/2],o=p,s=a/Math.pow(2,g),u=A/800,c=[o-s*u/2,o+s*u/2];return{editable:!1,zoomFixed:!1,trackSourceServers:["//higlass.io/api/v1"],exportViewUrl:"//higlass.io/api/v1/viewconfs",views:[Object(V.a)({uid:"main"},r,{initialXDomain:i,initialYDomain:c})],zoomLocks:{locksByViewUid:{},locksDict:{}},locationLocks:{locksByViewUid:{},locksDict:{}},valueScaleLocks:{locksByViewUid:{},locksDict:{}}}}),[d,a,h,B,p,g,A,r]);return Object(s.useEffect)((function(){var e=function(){S.current=!0},t=function(){S.current=!1},n=w.current;return n.addEventListener("mouseenter",e),n.addEventListener("mouseleave",t),function(){n.removeEventListener("mouseenter",e),n.removeEventListener("mouseenter",t)}}),[w]),Object(s.useEffect)((function(){return _?(_.api.on("viewConfig",(function(e){if(S.current){var t=JSON.parse(e),n=t.views[0].initialXDomain,r=t.views[0].initialYDomain,i=Math.log2(a/((n[1]-n[0])*(800/B))),o=Math.log2(a/((r[1]-r[0])*(800/A))),s=n[0]+(n[1]-n[0])/2,u=r[0]+(r[1]-r[0])/2;y(i),m(o),I(s),b(u)}})),function(){return _.api.off("viewConfig")}):function(){}}),[_,a,B,A,y,m,I,b]),u.a.createElement("div",{className:"higlass-wrapper-parent"},u.a.createElement("div",{className:"higlass-wrapper",ref:w,style:{height:"".concat(A,"px")}},u.a.createElement(s.Suspense,{fallback:u.a.createElement("div",null,"Loading...")},u.a.createElement(Dt,{ref:x,zoomFixed:!1,viewConfig:D,options:O}))))}Rt.defaultProps={hgOptions:{bounded:!0,pixelPreciseMarginPadding:!0,containerPaddingX:0,containerPaddingY:0,sizeMode:"default"},genomeSize:31e8};var jt=[];var Mt=n(1059),Nt=n(19);var Ft=["genomic-profiles"],Tt={hg38:{chromosomes:"NyITQvZsS_mOFNlz5C2LJg",genes:"P0PLbQMwTYGy-5uPIQid7A"},hg19:{chromosomes:"N12wVGG9SPiTkk03yUayUw",genes:"OHJakQICQD6gTD7skx4EWA"},mm9:{chromosomes:"WAVhNHYxQVueq6KulwgWiQ",genes:"GUm5aBiLRCyz2PsBea7Yzg"},mm10:{chromosomes:"EtrWT0VtScixmsmwFSd7zg",genes:"QDutvmyiSrec5nX4pA5WGQ"}};var Lt={description:function(e){var t=e.coordinationScopes,n=e.description,r=e.removeGridComponent,i=e.theme,a=Object(le.h)(),A=Object(le.d)(Ke.b.description,t),c=Object(o.a)(A,1)[0],l=c.dataset,f=c.spatialLayers,h=Object(Je.c)(Xe),g=Object(o.a)(h,3),d=g[0],p=g[1],v=g[2];Object(s.useEffect)((function(){v()}),[a,l]);var y=Object(ze.g)(a,l,p,(function(){}),!1),m=Object(o.a)(y,3),I=m[0],b=m[1],E=m[2],C=Object(s.useMemo)((function(){var e=new Map;f&&f.length>0&&I&&E&&b&&f.filter((function(e){return"raster"===e.type})).forEach((function(t){E[t.index]&&e.set("".concat(t.index),{name:I.layers[t.index].name,metadata:b[t.index].getMetadata()})}));return e}),[I,f,E,b]);return u.a.createElement(We.a,{title:"Data Set",removeGridComponent:r,isScroll:!0,theme:i,isReady:d},u.a.createElement(Ve,{description:n,metadata:C}))},status:Ze.a,genes:$e.a,cellSets:et.a,scatterplot:tt.a,spatial:nt.a,heatmap:rt.a,layerController:it.a,cellSetSizes:Mt.a,genomicProfiles:function(e){var t=e.coordinationScopes,n=e.theme,r=e.removeGridComponent,i=e.profileTrackUidKey,a=void 0===i?"path":i,A=e.profileTrackNameKey,c=void 0===A?null:A,l=e.higlassServer,f=void 0===l?"https://higlass.io/api/v1":l,h=e.assembly,g=void 0===h?"hg38":h,v=Object(Je.b)(),y=Object(o.a)(v,3),m=(y[0],y[1]),I=y[2],b=Object(le.h)(),E=Object(le.d)(Ke.b.genomicProfiles,t),C=Object(o.a)(E,1)[0],B=C.dataset,w=C.cellSetColor,Q=C.cellSetSelection,k=Object(Je.c)(Ft),_=Object(o.a)(k,3),x=_[0],S=_[1],O=_[2],D=Object(Je.d)(),R=Object(o.a)(D,3),j=R[0],M=R[1],N=R[2],F=Object(ze.d)(b,B,S,M,!0),T=Object(o.a)(F,1)[0],L=Object(s.useMemo)((function(){if(!T||1!==j.length)return null;var e=j[0].url,t="dark"===n?"#C0C0C0":"#000000",r="dark"===n?"#000000":"#f1f1f1",i="dark"===n?"dimgray":"silver",o=[{type:"horizontal-chromosome-labels",server:f,tilesetUid:Tt[g].chromosomes,uid:"chromosome-labels",options:{color:t,fontSize:12,fontIsLeftAligned:!1,showMousePosition:!0,mousePositionColor:t},height:30},{type:"horizontal-gene-annotations",server:f,tilesetUid:Tt[g].genes,uid:"gene-annotations",options:{name:"Gene Annotations (hg38)",fontSize:10,labelPosition:"hidden",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,minHeight:24,geneAnnotationHeight:16,geneLabelPosition:"outside",geneStrandSpacing:4,showMousePosition:!0,mousePositionColor:t,plusStrandColor:t,minusStrandColor:t,labelColor:"black",labelBackgroundColor:r,trackBorderWidth:0,trackBorderColor:"black"},height:70}],s=function(e,t){var n=0;if(void 0===t){var r,i=Object(Nt.a)(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;(a=+a)&&(n+=a)}}catch(c){i.e(c)}finally{i.f()}}else{var o,s=-1,u=Object(Nt.a)(e);try{for(u.s();!(o=u.n()).done;){var A=o.value;(A=+t(A,++s,e))&&(n+=A)}}catch(c){u.e(c)}finally{u.f()}}return n}(o.map((function(e){return e.height}))),u=(m-s-10)/T.row_infos.length,A=T.row_infos.map((function(r,o){var s,A=r[a],l=Array.isArray(A),f=c?r[c]:l?A[A.length-1]:A,h=!!l&&(null===Q||void 0===Q?void 0:Q.find((function(e){return d()(e,A)}))),g=l?null===w||void 0===w||null===(s=w.find((function(e){return d()(e.path,A)})))||void 0===s?void 0:s.color:null,p=l?A.join("__"):A,v={type:"horizontal-bar",uid:"bar-track-".concat(p),data:{type:"zarr-multivec",url:e,row:o},options:{name:f,showMousePosition:!0,mousePositionColor:t,labelColor:"dark"===n?"white":"black",labelBackgroundColor:"dark"===n?"black":"white",labelShowAssembly:!1},height:u};if(g&&h){var y=g;v.options.barFillColor="rgb(".concat(y[0],",").concat(y[1],",").concat(y[2],")")}else v.options.barFillColor=i;return v}));return{tracks:{top:[].concat(o,Object(p.a)(A)),left:[],center:[],right:[],bottom:[],whole:[],gallery:[]},layout:{w:12,h:12,x:0,y:0,static:!1}}}),[T,j,n,m,a,c,Q,w,f,g]);return Object(s.useEffect)((function(){N(),O()}),[b,B]),u.a.createElement("div",{className:"higlass-title-wrapper"},u.a.createElement(We.a,{title:"Genomic Profiles",removeGridComponent:r,theme:n,isReady:x,urls:j},u.a.createElement("div",{className:"higlass-lazy-wrapper",ref:I},L?u.a.createElement(Rt,{coordinationScopes:t,theme:n,hgViewConfig:L,height:m}):null)))},higlass:function(e){var t=e.coordinationScopes,n=e.theme,r=e.hgViewConfig,i=e.removeGridComponent,a=Object(Je.b)(),s=Object(o.a)(a,3),A=(s[0],s[1]),c=s[2],l=Object(Je.c)(jt),f=Object(o.a)(l,3),h=f[0],g=(f[1],f[2],Object(Je.d)()),d=Object(o.a)(g,3),p=d[0];return d[1],d[2],u.a.createElement("div",{className:"higlass-title-wrapper"},u.a.createElement(We.a,{title:"HiGlass",removeGridComponent:i,theme:n,isReady:h,urls:p},u.a.createElement("div",{className:"higlass-lazy-wrapper",ref:c},u.a.createElement(Rt,{coordinationScopes:t,theme:n,hgViewConfig:r,height:A}))))}};function Pt(e){if(void 0===Lt[e])throw new Error('Could not find definition for "'.concat(e,'" in registry.'));return Lt[e]}function Ut(e,t){var n,r=Object.keys((null===e||void 0===e||null===(n=e.coordinationSpace)||void 0===n?void 0:n[t])||{}),i=e.layout.map((function(e){var n;return null===(n=e.coordinationScopes)||void 0===n?void 0:n[t]}));return Array.from(new Set([].concat(Object(p.a)(r),Object(p.a)(i))))}function Gt(e){var t=e,n=t,r=n.layout,i=n.datasets;return Object.values(Ke.c).forEach((function(e){if(!r.every((function(t){var n;return!Ke.b[t.component].includes(e)||(null===(n=t.coordinationScopes)||void 0===n?void 0:n[e])}))){var n=Ke.d[e];"dataset"===e&&i.length>=1&&(n=i[0].uid),t=Ke.a.includes(e)?function(e,t,n){var r=Object(V.a)({},e,{layout:Object(p.a)(e.layout)}),i={};return r.layout.forEach((function(a,o){var s;if(Ke.b[a.component].includes(t)&&!(null===(s=a.coordinationScopes)||void 0===s?void 0:s[t])){var u=Object(v.c)([].concat(Object(p.a)(Ut(e,t)),Object(p.a)(Object.keys(i))));i[u]=n,r.layout[o]=Object(V.a)({},a,{coordinationScopes:Object(V.a)({},a.coordinationScopes,Object(b.a)({},t,u))})}})),r.coordinationSpace=Object(V.a)({},r.coordinationSpace,Object(b.a)({},t,Object(V.a)({},r.coordinationSpace[t],{},i))),r}(t,e,n):function(e,t,n){var r,i=Object(v.c)(Ut(e,t));return Object(V.a)({},e,{coordinationSpace:Object(V.a)({},e.coordinationSpace,Object(b.a)({},t,Object(V.a)({},null===e||void 0===e||null===(r=e.coordinationSpace)||void 0===r?void 0:r[t],Object(b.a)({},i,n)))),layout:e.layout.map((function(e){var n;return Object(V.a)({},e,{coordinationScopes:Object(V.a)({},e.coordinationScopes,{},Ke.b[e.component].includes(t)&&!(null===(n=e.coordinationScopes)||void 0===n?void 0:n[t])?Object(b.a)({},t,i):{})})}))})}(t,e,n)}})),t}function qt(e,t,n){var r,i=Object.keys(n["".concat(e,"Zoom")]),a=Object.keys(n["".concat(e,"TargetX")]),s=Object.keys(n["".concat(e,"TargetY")]),u=Object(v.c)(i),A=Object(v.c)(a),c=Object(v.c)(s),l=t.zoom,f=Object(o.a)(t.target,2),h=f[0],g=f[1];return n["".concat(e,"Zoom")][u]=l,n["".concat(e,"TargetX")][A]=h,n["".concat(e,"TargetY")][c]=g,r={},Object(b.a)(r,"".concat(e,"Zoom"),u),Object(b.a)(r,"".concat(e,"TargetX"),A),Object(b.a)(r,"".concat(e,"TargetY"),c),r}var Ht=Object(je.a)({disableGlobal:!0});function Yt(e){var t=e.config,n=e.rowHeight,r=e.height,i=e.theme,a=e.onWarn,A=e.onConfigChange,c=e.onLoaderChange,l=e.validateOnConfigChange,f=void 0!==l&&l,h=Object(s.useMemo)((function(){if(!t)return[{title:"No such dataset",unformatted:"The dataset configuration could not be found."},!1];if(!t.version)return[{title:"Missing version",unformatted:"The dataset configuration is missing a version, preventing validation."},!1];var e=t;if("0.1.0"===t.version){var n=(new C.a).compile(He);if(!n(t))return[{title:"Config validation failed",preformatted:JSON.stringify(n.errors,null,2)},!1];e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={embeddingType:{},embeddingZoom:{},embeddingTargetX:{},embeddingTargetY:{},spatialZoom:{},spatialTargetX:{},spatialTargetY:{}},r=[];e.staticLayout.forEach((function(e){var t=Object(V.a)({},e,{coordinationScopes:{}});if("scatterplot"===e.component&&(e.props.mapping&&(n.embeddingType[e.props.mapping]=e.props.mapping,t=Object(V.a)({},t,{coordinationScopes:Object(V.a)({},t.coordinationScopes,{embeddingType:e.props.mapping})})),e.props.view)){var i=qt("embedding",e.props.view,n);t=Object(V.a)({},t,{coordinationScopes:Object(V.a)({},t.coordinationScopes,{},i)})}if("spatial"===e.component&&e.props.view){var a=qt("spatial",e.props.view,n);t=Object(V.a)({},t,{coordinationScopes:Object(V.a)({},t.coordinationScopes,{},a)})}r.push(t)}));var i=t||w()();return{version:"1.0.0",name:e.name,description:e.description,public:e.public,datasets:[{uid:i,name:i,files:e.layers.map((function(e){return{type:e.type.toLowerCase(),fileType:e.fileType,url:e.url}}))}],initStrategy:"auto",coordinationSpace:n,layout:r}}(t)}console.groupCollapsed("\ud83d\ude84 Vitessce (".concat(Ue.version,") view configuration")),console.info("data:,".concat(JSON.stringify(e))),console.info(JSON.stringify(e,null,2)),console.groupEnd();var r=(new C.a).addSchema(D).compile(qe);return r(e)?[function(e){return"auto"===e.initStrategy?Gt(e):e}(e),!0]:[{title:"Config validation failed",preformatted:JSON.stringify(r.errors,null,2)},!1]}),[t]),g=Object(o.a)(h,2),p=g[0],v=g[1];return Object(s.useEffect)((function(){v&&!d()(p,t)&&A&&A(p)}),[v,t,p,A]),v?u.a.createElement(Me.b,{generateClassName:Ht},u.a.createElement(Pe,{theme:Ge.a[i]},u.a.createElement(fe,{config:p,getComponent:Pt,rowHeight:n,height:r,theme:i}),u.a.createElement(Ye,{onWarn:a,onConfigChange:A,onLoaderChange:c,validateOnConfigChange:f}))):u.a.createElement(Re,Object.assign({theme:i},p))}n(1372),n(1373),n(1374);function Jt(e){var t=e.response,n=e.theme,r=Object(s.useState)(!0),i=Object(o.a)(r,2),a=i[0],A=i[1],c=Object(s.useRef)();return Object(s.useEffect)((function(){t.then((function(e){c.current=e,A(!1)}))}),[t]),a?u.a.createElement(Re,{title:"Loading...",theme:n}):u.a.createElement(c.current)}function zt(e){return"\n    ok: ".concat(e.ok,"\n    status: ").concat(e.status,"\n    statusText: ").concat(e.statusText,"\n    redirected: ").concat(e.redirected,"\n    type: ").concat(e.type,"\n    url: ").concat(e.url)}function Kt(e,t){return e.ok?e.text().then((function(n){try{var r=JSON.parse(n);return Promise.resolve((function(){return u.a.createElement(Yt,{config:r,theme:t})}))}catch(i){return Promise.resolve((function(){return u.a.createElement(Re,{title:"Error parsing JSON",preformatted:zt(e),unformatted:"".concat(i.message,": ").concat(n),theme:t})}))}})):Promise.resolve((function(){return u.a.createElement(Re,{title:"Fetch response not OK",preformatted:zt(e),theme:t})}))}function Wt(e){return["light","dark"].includes(e)?e:"dark"}function Vt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=new URLSearchParams(window.location.search),n=t.get("dataset"),r="true"===t.get("debug"),i=t.get("url"),a="all"===t.get("show"),o=Wt(t.get("theme"));if(n){var s=Qe(n);return u.a.createElement(Yt,{config:s,rowHeight:e,theme:o,onConfigChange:r?console.log:void 0,validateOnConfigChange:r})}if(i){var A=fetch(i).then((function(e){return Kt(e,o)})).catch((function(e){return Promise.resolve(u.a.createElement(Re,{title:"Error fetching",unformatted:e.message,theme:o}))}));return u.a.createElement(Jt,{response:A,theme:o})}var c=we(a);return u.a.createElement(De,{configs:c,theme:o})}var Xt=n(1324),Zt=n.n(Xt),$t=n(1309);var en={Chrome:32779,"Internet Explorer":2047,Edge:2047,Safari:65e3,Firefox:65e3},tn=function e(t){Object(A.a)(this,e),this.message=t};function nn(e){var t=e.conf,n=e.onOverMaximumUrlLength,r=void 0===n?function(){}:n,i=Object($t.compressToEncodedURIComponent)(JSON.stringify(t)),a="".concat("vitessce_conf_length","=").concat(i.length,"&").concat("vitessce_conf_version","=").concat("0.0.1","&").concat("vitessce_conf","=").concat(i),o=Zt.a.parse(window.navigator.userAgent).browser.name,s=en[o];if(a.length>s){var u=Object.entries(en).filter((function(e){return e[1]>a.length})).map((function(e){return e[0]})),A="Configuration is ".concat(i.length," characters; max URL for ").concat(o," is ").concat(s,": it will work on ").concat(u.join(", ")||"no browser",".");console.error(A),r({message:A,willWorkOn:u})}return a}function rn(e){var t=new URLSearchParams(e.replace("#","&")),n=t.get("vitessce_conf"),r=Number(t.get("vitessce_conf_length"));if(r!==n.length)throw new tn("Compressed conf length (".concat(n.length,") != expected (").concat(r,"). URL truncated?"));if("0.0.1"===t.get("vitessce_conf_version"))return JSON.parse(Object($t.decompressFromEncodedURIComponent)(n));throw new Error("Unrecognized URL Param Version")}var an=function(){function e(t,n,r){Object(A.a)(this,e),this.file={url:t,type:n,fileType:r}}return Object(c.a)(e,[{key:"toJSON",value:function(){return this.file}}]),e}(),on=function(){function e(t,n){Object(A.a)(this,e),this.dataset={uid:t,name:n,files:[]}}return Object(c.a)(e,[{key:"addFile",value:function(e,t,n){return this.dataset.files.push(new an(e,t,n)),this}},{key:"toJSON",value:function(){return Object(V.a)({},this.dataset,{files:this.dataset.files.map((function(e){return e.toJSON()}))})}}]),e}(),sn=function(){function e(t,n,r,i,a,o){Object(A.a)(this,e),this.view={component:t,coordinationScopes:n,x:r,y:i,w:a,h:o}}return Object(c.a)(e,[{key:"useCoordination",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n;return i.forEach((function(t){e.view.coordinationScopes[t.cType]=t.cScope})),this}},{key:"setXYWH",value:function(e,t,n,r){this.view.x=e,this.view.y=t,this.view.w=n,this.view.h=r}},{key:"toJSON",value:function(){return this.view}}]),e}(),un=function e(t){Object(A.a)(this,e),this.views=t},An=function e(t){Object(A.a)(this,e),this.views=t};function cn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new un(t);return r}function ln(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new An(t);return r}var fn=function(){function e(t,n){Object(A.a)(this,e),this.cType=t,this.cScope=n,this.cValue=null}return Object(c.a)(e,[{key:"setValue",value:function(e){return this.cValue=e,this}}]),e}(),hn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";Object(A.a)(this,e),this.config={version:"1.0.0",name:t,description:n,datasets:[],coordinationSpace:{},layout:[],initStrategy:"auto"}}return Object(c.a)(e,[{key:"addDataset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.config.datasets.map((function(e){return e.dataset.uid})),r=t||Object(v.c)(n),i=new on(r,e);this.config.datasets.push(i);var a=this.addCoordination(Ke.c.DATASET),s=Object(o.a)(a,1),u=s[0];return u.setValue(r),i}},{key:"addView",value:function(e,t,n){var r,i=n||{},a=i.x,s=void 0===a?0:a,u=i.y,A=void 0===u?0:u,c=i.w,l=void 0===c?1:c,f=i.h,h=void 0===f?1:f,g=i.mapping,d=void 0===g?null:g,p=this.config.coordinationSpace[Ke.c.DATASET]?Object.entries(this.config.coordinationSpace[Ke.c.DATASET]).filter((function(t){var n=Object(o.a)(t,2);n[0];return n[1].cValue===e.dataset.uid})).map((function(e){return Object(o.a)(e,1)[0]})):[];if(1!==p.length)throw new Error("No coordination scope matching the dataset parameter could be found in the coordination space.");r=Object(o.a)(p,1)[0];var v=Object(b.a)({},Ke.c.DATASET,r),y=new sn(t,v,s,A,l,h);if(d){var m=this.addCoordination(Ke.c.EMBEDDING_TYPE),I=Object(o.a)(m,1)[0];I.setValue(d),y.useCoordination(I)}return this.config.layout.push(y),y}},{key:"addCoordination",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n,a=[];return i.forEach((function(t){var n=e.config.coordinationSpace[t]?Object.keys(e.config.coordinationSpace[t]):[],r=new fn(t,Object(v.c)(n));e.config.coordinationSpace[r.cType]||(e.config.coordinationSpace[r.cType]={}),e.config.coordinationSpace[r.cType][r.cScope]=r,a.push(r)})),a}},{key:"linkViews",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.addCoordination.apply(this,Object(p.a)(t));return e.forEach((function(e){r.forEach((function(t){e.useCoordination(t)}))})),Array.isArray(n)&&n.length===t.length&&r.forEach((function(e,t){e.setValue(n[t])})),this}},{key:"layout",value:function(e){return function e(t,n,r,i,a){var o=r-n,s=a-i;if(t instanceof sn)t.setXYWH(n,i,o,s);else if(t instanceof un){var u=t.views,A=u.length;u.forEach((function(t,r){e(t,n+o/A*r,n+o/A*(r+1),i,a)}))}else if(t instanceof An){var c=t.views,l=c.length;c.forEach((function(t,a){e(t,n,r,i+s/l*a,i+s/l*(a+1))}))}}(e,0,12,0,12),this}},{key:"toJSON",value:function(){return Object(V.a)({},this.config,{datasets:this.config.datasets.map((function(e){return e.toJSON()})),coordinationSpace:Object(v.b)(Object.entries(this.config.coordinationSpace).map((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];return[n,Object(v.b)(Object.entries(r).map((function(e){var t=Object(o.a)(e,2);return[t[0],t[1].cValue]})))]}))),layout:this.config.layout.map((function(e){return e.toJSON()}))})}}],[{key:"fromJSON",value:function(t){var n=new e(t.name,t.description);return t.datasets.forEach((function(e){var t=n.addDataset(e.name,e.uid);e.files.forEach((function(e){t.addFile(e.url,e.type,e.fileType)}))})),Object.keys(t.coordinationSpace).forEach((function(e){if(e!==Ke.c.DATASET){var r=t.coordinationSpace[e];n.config.coordinationSpace[e]={},Object.entries(r).forEach((function(t){var r=Object(o.a)(t,2),i=r[0],a=r[1],s=new fn(e,i);s.setValue(a),n.config.coordinationSpace[e][i]=s}))}})),t.layout.forEach((function(e){var t=new sn(e.component,e.coordinationScopes,e.x,e.y,e.w,e.h);n.config.layout.push(t)})),n}}]),e}();n.d(t,"Heatmap",(function(){return r.Heatmap})),n.d(t,"Spatial",(function(){return i.Spatial})),n.d(t,"Scatterplot",(function(){return a.Scatterplot})),n.d(t,"VitessceGrid",(function(){return fe})),n.d(t,"createApp",(function(){return Vt})),n.d(t,"Vitessce",(function(){return Yt})),n.d(t,"encodeConfInUrl",(function(){return nn})),n.d(t,"decodeURLParamsToConf",(function(){return rn})),n.d(t,"VitessceConfig",(function(){return hn})),n.d(t,"hconcat",(function(){return cn})),n.d(t,"vconcat",(function(){return ln}))}])}));
//# sourceMappingURL=index.min.js.map

/***/ }),

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

var g;

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

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

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

module.exports = g;


/***/ }),

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

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


/***/ }),

/***/ "./package.json":
/*!**********************!*\
  !*** ./package.json ***!
  \**********************/
/*! exports provided: name, version, description, author, main, repository, keywords, files, scripts, devDependencies, dependencies, jupyterlab, babel, default */
/***/ (function(module) {

module.exports = JSON.parse("{\"name\":\"vitessce-jupyter\",\"version\":\"0.1.2\",\"description\":\"Jupyter widget facilitating interactive visualization of spatial single-cell data with Vitessce\",\"author\":\"Mark Keller\",\"main\":\"dist/index.js\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/vitessce/vitessce-jupyter.git\"},\"keywords\":[\"jupyter\",\"widgets\",\"ipython\",\"ipywidgets\",\"jupyterlab\",\"jupyterlab-extension\"],\"files\":[\"lib/**/*.js\",\"dist/*.js\"],\"scripts\":{\"build\":\"webpack\",\"watch\":\"webpack --watch --mode=development\",\"test\":\"echo \\\"Error: no test specified\\\" && exit 1\"},\"devDependencies\":{\"@babel/core\":\"7.9.0\",\"babel-loader\":\"8.1.0\",\"babel-preset-react-app\":\"^9.1.2\",\"css-loader\":\"^1.0.1\",\"pnp-webpack-plugin\":\"^1.6.4\",\"react-dev-utils\":\"^10.2.1\",\"resolve\":\"^1.17.0\",\"style-loader\":\"^0.23.1\",\"webpack\":\"^4.37.0\",\"webpack-cli\":\"^3.3.6\"},\"dependencies\":{\"@jupyter-widgets/base\":\"^1.1 || ^2 || ^3\",\"lodash\":\"^4.17.4\",\"pubsub-js\":\"^1.9.0\",\"react\":\"~16.9.0\",\"react-dom\":\"~16.9.0\",\"vitessce\":\"^1.1.1\"},\"jupyterlab\":{\"extension\":\"dist/labplugin\",\"externalExtensions\":{\"@jupyter-widgets/jupyterlab-manager\":\"2.0.0\"}},\"babel\":{\"presets\":[\"react-app\"]}}");

/***/ }),

/***/ "@jupyter-widgets/base":
/*!****************************************!*\
  !*** external "@jupyter-widgets/base" ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE__jupyter_widgets_base__;

/***/ })

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